/* Blog post (Blog Post.dc.html) — hover rules of the prototype's style-hover attributes (inline styles win, hence !important). */
.bp-h1:hover { color:#fff !important }
.bp-h2:hover { color:var(--gds-blue) !important;text-decoration:none !important }
.bp-h3:hover { background:var(--gds-navy) !important;color:#fff !important;border-color:var(--gds-navy) !important }
.bp-h4:hover { text-decoration:underline !important }

/* Aside: sticky from 1000px up (the prototype's asidePos). */
.bp-aside { position:static }
@media (min-width:1000px) { .bp-aside { position:sticky } }

/* "On this page": the prototype's per-item inline values (h.weight/color/bg/bar), toggled by blog-post.js. */
a.bp-toc { font-weight:500;color:var(--fg-secondary);background:transparent;box-shadow:inset 2px 0 0 transparent }
a.bp-toc.is-active { font-weight:600;color:var(--gds-navy);background:var(--gds-slate-75);box-shadow:inset 2px 0 0 var(--gds-yellow) }
a.bp-toc:hover { background:var(--gds-slate-75);text-decoration:none }

/* =====================================================================================================
   Post body: Gutenberg blocks styled like the prototype's block renderers.
   Scoped to :is(.gds-article, .is-root-container) so the same rules style the article (single.php)
   and the block editor canvas (add_editor_style in inc/setup.php).
   ===================================================================================================== */

/* Layout (front end only): a 24px column like the prototype's <article>; spacers collapse into that gap. */
.gds-article { display:flex;flex-direction:column;gap:24px }
.gds-article > * { margin-block:0 }
.gds-article > :is(.alignwide, .alignfull) { max-width:none;width:auto;margin-inline:0 }
.gds-article > .wp-block-spacer, .gds-article > p:empty { display:none }

/* Paragraph */
:is(.gds-article, .is-root-container) > p { font-size:18px;line-height:1.75;color:var(--fg-secondary);text-wrap:pretty }
:is(.gds-article, .is-root-container) > p:not([class*="has-text-align"]) { text-align:justify }
:is(.gds-article, .is-root-container) :is(p, li) :is(strong, b) { font-weight:600;color:var(--gds-navy) }
:is(.gds-article, .is-root-container) :is(p, li) a { color:var(--gds-blue);font-weight:600 }

/* Lead (paragraph style "Lead"): highlighted intro with a yellow rule. */
:is(.gds-article, .is-root-container) > p.is-style-gds-lead { font-size:clamp(22px,2.2vw,26px);line-height:1.4;font-weight:500;letter-spacing:-0.01em;color:var(--gds-navy);padding:8px 0 8px 24px;border-left:3px solid var(--gds-yellow);text-align:start }

/* Headings: H2 = heading (listed in "On this page"), H3/H4 = subheading. */
:is(.gds-article, .is-root-container) > h2 { font-size:clamp(24px,2.4vw,30px);line-height:1.25;font-weight:700;letter-spacing:-0.02em;color:var(--gds-navy);margin-top:24px;scroll-margin-top:110px }
:is(.gds-article, .is-root-container) > :is(h3, h4, h5, h6) { font-size:20px;line-height:1.3;font-weight:600;color:var(--gds-navy);margin-top:8px }
:is(.gds-article, .is-root-container) :is(h2, h3, h4) :is(strong, b) { font-weight:inherit;color:inherit }

/* Earlier posts used the "Black" colour and the small/medium/large font-size presets everywhere (!important
   preset classes): they fall back to the design's colours and sizes. */
:is(.gds-article, .is-root-container) > :is(p, ul, ol).has-black-color,
:is(.gds-article, .is-root-container) li.has-black-color { color:var(--fg-secondary) !important }
:is(.gds-article, .is-root-container) > :is(h2, h3, h4, h5, h6).has-black-color { color:var(--gds-navy) !important }
:is(.gds-article, .is-root-container) > p:is(.has-small-font-size, .has-medium-font-size, .has-large-font-size):not(.is-style-gds-lead),
:is(.gds-article, .is-root-container) li:is(.has-small-font-size, .has-medium-font-size, .has-large-font-size) { font-size:18px !important }
:is(.gds-article, .is-root-container) > h2:is(.has-small-font-size, .has-medium-font-size, .has-large-font-size) { font-size:clamp(24px,2.4vw,30px) !important }
:is(.gds-article, .is-root-container) > :is(h3, h4, h5, h6):is(.has-small-font-size, .has-medium-font-size, .has-large-font-size) { font-size:20px !important }
:is(.gds-article, .is-root-container) .wp-block-quote p:is(.has-small-font-size, .has-medium-font-size, .has-large-font-size) { font-size:20px !important }
:is(.gds-article, .is-root-container) .wp-block-quote .has-black-color { color:var(--gds-navy) !important }

/* List: check icons (numbers on ordered lists). */
:is(.gds-article, .is-root-container) > :is(ul, ol):not(.is-style-gds-steps) { list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:14px }
:is(.gds-article, .is-root-container) > :is(ul, ol):not(.is-style-gds-steps) > li { position:relative;padding-left:40px;font-size:18px;line-height:1.75;color:var(--fg-secondary);text-wrap:pretty }
:is(.gds-article, .is-root-container) > :is(ul, ol):not(.is-style-gds-steps) > li::before { content:"";position:absolute;left:0;top:2px;width:28px;height:28px;border-radius:999px;background:var(--gds-navy) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F2C300' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 16px no-repeat }
:is(.gds-article, .is-root-container) > ol:not(.is-style-gds-steps) > li::before { content:counter(list-item);background-image:none;display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:700;line-height:1;color:var(--gds-yellow) }
:is(.gds-article, .is-root-container) li > :is(ul, ol) { margin:8px 0 0;padding-left:20px;list-style:disc }

/* List style "Steps": numbered how-to cards (an item starting with bold text uses it as the step title). */
:is(.gds-article, .is-root-container) > .is-style-gds-steps { list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:20px;counter-reset:gds-steps }
:is(.gds-article, .is-root-container) > .is-style-gds-steps > li { counter-increment:gds-steps;position:relative;min-height:40px;padding:28px 28px 28px 82px;border:1px solid var(--border-default);border-radius:var(--radius-xl);background:#fff;box-shadow:var(--shadow-sm);font-size:18px;line-height:1.75;color:var(--fg-secondary);text-wrap:pretty }
:is(.gds-article, .is-root-container) > .is-style-gds-steps > li::before { content:counter(gds-steps);position:absolute;left:28px;top:28px;width:40px;height:40px;border-radius:var(--radius-lg);background:var(--gds-yellow);color:var(--gds-navy);display:flex;align-items:center;justify-content:center;font-size:17px;font-weight:700;line-height:1 }
:is(.gds-article, .is-root-container) > .is-style-gds-steps > li > strong:first-child { display:block;margin-bottom:8px;font-size:20px;line-height:1.3;font-weight:600;color:var(--gds-navy) }
:is(.gds-article, .is-root-container) > .is-style-gds-steps > li img { display:block;max-width:100%;height:auto;margin-top:18px;border-radius:var(--radius-lg);border:1px solid var(--border-subtle) }

/* Group style "Step": one numbered how-to card (heading + text + image), numbered within a run of steps. */
:is(.gds-article, .is-root-container) > .is-style-gds-step { counter-increment:gds-step;padding:28px;border:1px solid var(--border-default);border-radius:var(--radius-xl);background:#fff;box-shadow:var(--shadow-sm) }
:is(.gds-article, .is-root-container) > .is-style-gds-step:first-child,
:is(.gds-article, .is-root-container) > :not(.is-style-gds-step) + .is-style-gds-step { counter-reset:gds-step }
.gds-article > .is-style-gds-step + .is-style-gds-step { margin-top:-4px } /* 20px between steps, as the prototype's steps list. */
:is(.gds-article, .is-root-container) :is(.is-style-gds-step, .is-style-gds-step > .wp-block-group__inner-container) { display:flex;flex-direction:column;gap:18px }
:is(.gds-article, .is-root-container) :is(.is-style-gds-step, .is-style-gds-step > .wp-block-group__inner-container) > * { margin:0 }
:is(.gds-article, .is-root-container) :is(.is-style-gds-step, .is-style-gds-step > .wp-block-group__inner-container) > :is(h2, h3, h4):first-child { position:relative;min-height:26px;padding:7px 0 7px 54px;font-size:20px;line-height:1.3;font-weight:600;letter-spacing:normal;color:var(--gds-navy) }
:is(.gds-article, .is-root-container) :is(.is-style-gds-step, .is-style-gds-step > .wp-block-group__inner-container) > :is(h2, h3, h4):first-child::before { content:counter(gds-step);position:absolute;left:0;top:50%;transform:translateY(-50%);width:40px;height:40px;border-radius:var(--radius-lg);background:var(--gds-yellow);color:var(--gds-navy);display:flex;align-items:center;justify-content:center;font-size:17px;font-weight:700;line-height:1 }
:is(.gds-article, .is-root-container) :is(.is-style-gds-step, .is-style-gds-step > .wp-block-group__inner-container) > p { font-size:18px;line-height:1.75;color:var(--fg-secondary);text-align:justify;text-wrap:pretty }

/* Image (+ caption). */
:is(.gds-article, .is-root-container) figure.wp-block-image:not(.wp-block-gallery figure) { margin:0;display:flex;flex-direction:column;gap:10px }
:is(.gds-article, .is-root-container) figure.wp-block-image.aligncenter { align-items:center }
:is(.gds-article, .is-root-container) .wp-block-image img { display:block;max-width:100%;height:auto;border-radius:var(--radius-lg);border:1px solid var(--border-subtle);background:var(--gds-slate-75) }
:is(.gds-article, .is-root-container) .wp-block-image figcaption { margin:0;font-size:14px;line-height:1.5;color:var(--fg-tertiary);text-align:start }

/* Gallery */
:is(.gds-article, .is-root-container) > figure.wp-block-gallery { margin:0;gap:16px;--wp--style--unstable-gallery-gap:16px }
:is(.gds-article, .is-root-container) .wp-block-gallery .wp-block-image img { border-radius:var(--radius-lg) }

/* Quote and pull quote: slate box. */
:is(.gds-article, .is-root-container) > :is(blockquote.wp-block-quote, figure.wp-block-pullquote) { margin:0;padding:28px 32px;border:0;border-radius:var(--radius-xl);background:var(--gds-slate-75);display:flex;flex-direction:column;gap:12px;text-align:start;font-size:inherit;line-height:inherit }
:is(.gds-article, .is-root-container) .wp-block-pullquote blockquote { margin:0;display:flex;flex-direction:column;gap:12px }
:is(.gds-article, .is-root-container) :is(.wp-block-quote, .wp-block-pullquote) p { margin:0;font-size:20px;line-height:1.55;font-weight:500;font-style:normal;color:var(--gds-navy);text-wrap:pretty }
:is(.gds-article, .is-root-container) :is(.wp-block-quote, .wp-block-pullquote) cite { display:block;margin:0;font-size:14px;font-weight:600;font-style:normal;color:var(--fg-tertiary);text-transform:none }

/* Separator */
:is(.gds-article, .is-root-container) > hr.wp-block-separator { width:100%;max-width:none;height:0;margin-block:8px;border:0;border-top:1px solid var(--border-subtle);background:none;opacity:1 }

/* Columns, and the columns style "Cards" (the prototype's feature grid). */
:is(.gds-article, .is-root-container) > .wp-block-columns { gap:16px;margin-block:0 }
:is(.gds-article, .is-root-container) > .wp-block-columns.is-style-gds-cards { display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:16px }
:is(.gds-article, .is-root-container) > .is-style-gds-cards > .wp-block-column { margin:0;padding:22px;border:1px solid var(--border-default);border-radius:var(--radius-lg);background:var(--gds-slate-75);display:flex;flex-direction:column;gap:12px }
:is(.gds-article, .is-root-container) > .is-style-gds-cards > .wp-block-column > * { margin:0 }
:is(.gds-article, .is-root-container) > .is-style-gds-cards > .wp-block-column > p { font-size:15px;line-height:1.6;color:var(--fg-secondary) }
:is(.gds-article, .is-root-container) > .is-style-gds-cards > .wp-block-column > p:first-child { font-size:16px;line-height:normal;font-weight:600;color:var(--gds-navy) }
:is(.gds-article, .is-root-container) > .is-style-gds-cards > .wp-block-column > p:has(> code) { display:flex;flex-wrap:wrap;gap:8px;line-height:normal }
:is(.gds-article, .is-root-container) > .is-style-gds-cards code { font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:15px;padding:2px 8px;border-radius:6px;background:#fff;border:1px solid var(--border-subtle);color:var(--gds-navy) }

/* Group style "Call to action": navy box (eyebrow paragraph before the title, title, paragraphs, button).
   Its block name (List View → Rename) is the "On this page" label, its HTML anchor the link target. */
:is(.gds-article, .is-root-container) > .is-style-gds-cta { scroll-margin-top:110px;margin-top:24px;padding:clamp(28px,4vw,44px);background:var(--gds-navy);border-radius:24px;color:#fff }
:is(.gds-article, .is-root-container) :is(.is-style-gds-cta, .is-style-gds-cta > .wp-block-group__inner-container) { display:flex;flex-direction:column;gap:16px }
:is(.gds-article, .is-root-container) :is(.is-style-gds-cta, .is-style-gds-cta > .wp-block-group__inner-container) > * { margin:0 }
:is(.gds-article, .is-root-container) :is(.is-style-gds-cta, .is-style-gds-cta > .wp-block-group__inner-container) > :is(h2, h3) { font-size:clamp(24px,2.4vw,30px);line-height:1.25;font-weight:700;letter-spacing:-0.02em;color:#fff }
:is(.gds-article, .is-root-container) :is(.is-style-gds-cta, .is-style-gds-cta > .wp-block-group__inner-container) > p { font-size:17px;line-height:1.7;color:rgba(255,255,255,0.78) }
:is(.gds-article, .is-root-container) :is(.is-style-gds-cta, .is-style-gds-cta > .wp-block-group__inner-container) > p:first-child:has(+ :is(h2, h3)) { font-size:12px;line-height:normal;font-weight:600;letter-spacing:0.14em;color:var(--gds-yellow) }
:is(.gds-article, .is-root-container) .is-style-gds-cta p :is(strong, b) { font-weight:600;color:#fff }
:is(.gds-article, .is-root-container) .is-style-gds-cta p a { color:var(--gds-yellow);font-weight:600 }
:is(.gds-article, .is-root-container) .is-style-gds-cta .wp-block-buttons { margin-top:8px }
:is(.gds-article, .is-root-container) .is-style-gds-cta .wp-block-button__link { display:flex;align-items:center;gap:8px;background:var(--gds-yellow);color:var(--gds-navy);font-weight:600;font-size:16px;line-height:normal;padding:14px 28px;border-radius:999px;text-decoration:none }
:is(.gds-article, .is-root-container) .is-style-gds-cta .wp-block-button__link::after { content:"";flex:none;width:16px;height:16px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat }
:is(.gds-article, .is-root-container) .is-style-gds-cta .wp-block-button__link:hover { background:#E0B400;color:var(--gds-navy);text-decoration:none }

/* Password-protected post: WordPress's password form. */
.gds-article .post-password-form { display:flex;flex-direction:column;gap:16px;font-size:18px;line-height:1.75;color:var(--fg-secondary) }
.gds-article .post-password-form p { margin:0 }
.gds-article .post-password-form input[type="password"] { margin-left:8px;height:44px;padding:0 14px;border:1px solid var(--border-default);border-radius:var(--radius-md);font:inherit;font-size:16px }
.gds-article .post-password-form input[type="submit"] { margin-left:8px;height:44px;padding:0 24px;border:0;border-radius:999px;background:var(--gds-yellow);color:var(--gds-navy);font:inherit;font-size:15px;font-weight:600;cursor:pointer }
