/*
Theme Name: EHCP Badger
Theme URI: https://ehcpbadger.co.uk/
Author: EHCP Badger
Description: Calm, accessible block theme for EHCP Badger. Built for parents in England, many of whom are neurodivergent themselves: plain layouts, readable type, one thing at a time. Includes the EHCP deadline checker block.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.3.0
License: Proprietary
Text Domain: ehcp-badger
*/

/* ------------------------------------------------------------------
   Dark theme: same tokens, swapped values (follows the device setting)
------------------------------------------------------------------ */
@media (prefers-color-scheme: dark) {
  :root:not(.badger-force-light) {
    --wp--preset--color--paper: #1A1816;
    --wp--preset--color--raised: #25221F;
    --wp--preset--color--ink: #F4EFE7;
    --wp--preset--color--ink-muted: #B7AFA4;
    --wp--preset--color--line: #3A3530;
    --wp--preset--color--bracken: #E39A62;
    --wp--preset--color--on-bracken: #1E1C1A;
    --wp--preset--color--bracken-deep: #EFB089;
    --wp--preset--color--bracken-soft: #3B2A1F;
    --wp--preset--color--brook: #7CC4CC;
    --wp--preset--color--alert: #FF8E80;
    color-scheme: dark;
  }
}

/* ------------------------------------------------------------------
   Base
------------------------------------------------------------------ */
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
*, *::before, *::after { box-sizing: border-box; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
h1, h2, h3, h4 { text-wrap: balance; }
p, li { text-wrap: pretty; }
a { text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--wp--preset--color--ink);
  outline-offset: 2px;
  border-radius: 4px;
}
::selection { background: var(--wp--preset--color--bracken-soft); color: var(--wp--preset--color--ink); }
img { height: auto; }
.screen-reader-text:focus { background: var(--wp--preset--color--raised); color: var(--wp--preset--color--ink); }
/* no italics anywhere for readability */
em, i, cite { font-style: normal; font-weight: 700; }
strong, b { font-weight: 700; }
.wp-block-post-content > * + h2 { margin-top: 2.75rem; }
.wp-block-post-content > * + h3 { margin-top: 2rem; }
.wp-block-post-content :where(ul, ol) { padding-left: 1.3em; }
.wp-block-post-content :where(li + li) { margin-top: 0.4rem; }
.has-small-font-size { line-height: 1.55; }
.muted, .has-ink-muted-color { color: var(--wp--preset--color--ink-muted); }

/* labels: sentence case, never block capitals */
.badger-label { font-weight: 700; font-size: 1rem; color: var(--wp--preset--color--bracken-deep); margin: 0; }

/* buttons */
.wp-element-button, .wp-block-button__link { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; transition: filter .15s ease; }
.wp-element-button:hover, .wp-block-button__link:hover { filter: brightness(1.05); }
.wp-block-button.is-style-secondary .wp-block-button__link {
  background: var(--wp--preset--color--raised); color: var(--wp--preset--color--ink);
  border-color: var(--wp--preset--color--line);
}
.wp-block-button.is-style-secondary .wp-block-button__link:hover { border-color: var(--wp--preset--color--ink-muted); filter: none; }

/* ------------------------------------------------------------------
   Header
------------------------------------------------------------------ */
.site-header { border-bottom: 1px solid var(--wp--preset--color--line); background: var(--wp--preset--color--paper); }
.site-header .wp-block-navigation { gap: 1.75rem; }
.site-header .wp-block-navigation a { text-decoration: none; color: var(--wp--preset--color--ink); }
.site-header .wp-block-navigation a:hover { color: var(--wp--preset--color--bracken-deep); text-decoration: underline; }
.site-header .wp-block-navigation .wp-block-navigation-item.current-menu-item > a,
.site-header .wp-block-navigation a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }
.site-header .wp-block-navigation__submenu-container {
  background: var(--wp--preset--color--raised) !important; color: var(--wp--preset--color--ink) !important;
  border: 1px solid var(--wp--preset--color--line) !important; border-radius: 12px; padding: 0.5rem !important;
  min-width: 17rem !important; box-shadow: 0 12px 32px rgba(30, 28, 26, 0.10);
}
.site-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: 0.6rem 0.75rem !important; border-radius: 8px; font-weight: 400; }
.site-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover { background: var(--wp--preset--color--bracken-soft); text-decoration: none; }
.site-header .wp-block-navigation__submenu-container .wp-block-navigation-item:first-child .wp-block-navigation-item__content { font-weight: 700; }
/* mobile menu overlay */
.wp-block-navigation__responsive-container.is-menu-open {
  background: var(--wp--preset--color--paper) !important; color: var(--wp--preset--color--ink) !important;
  padding: 1.25rem max(16px, 4vw) 2rem !important;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { gap: 0.25rem; align-items: flex-start !important; padding-top: 4.75rem; }
.wp-block-navigation__responsive-container.is-menu-open :is(.wp-block-navigation__container, .wp-block-navigation-item, .wp-block-navigation__submenu-container) { align-items: flex-start !important; justify-content: flex-start !important; text-align: left; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { width: 100%; gap: 0.25rem !important; margin-top: 3.25rem; }
.site-header .nav-cta-mobile, .site-header .nav-search-mobile { display: none !important; }
.wp-block-navigation__responsive-container.is-menu-open .nav-search-mobile { display: block !important; width: 100%; margin-top: 1rem; }
@media (max-width: 959px) { .site-header .header-search { display: none; } }
.wp-block-navigation__responsive-container.is-menu-open .nav-cta-mobile { display: flex !important; }
.wp-block-navigation__responsive-container.is-menu-open .nav-cta-mobile > a { color: var(--wp--preset--color--bracken-deep) !important; text-decoration: underline !important; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { border-bottom: 1px solid var(--wp--preset--color--line); }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item { border-bottom: 0; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { width: 100%; font-size: 1.25rem; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { padding: 0.65rem 0 !important; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container { border: 0 !important; box-shadow: none; padding: 0 0 0.5rem 1rem !important; background: transparent !important; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item { font-size: 1.0625rem; }
.wp-block-navigation__responsive-container-open, .wp-block-navigation__responsive-container-close {
  min-width: 48px; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  border: 2px solid var(--wp--preset--color--line) !important; border-radius: 12px; padding: 0 .75rem !important;
}
.wp-block-navigation__responsive-container-open::after { content: "Menu"; font: 700 1rem/1 var(--wp--preset--font-family--sans); }
.wp-block-navigation__responsive-container-close { top: 1.25rem !important; right: max(16px, 4vw) !important; }
.wp-block-navigation__responsive-container-close::after { content: "Close"; font: 700 1rem/1 var(--wp--preset--font-family--sans); }
.site-header .wp-block-search__button-only .wp-block-search__button { width: 48px; padding: 0 !important; margin-left: 0; justify-content: center; }
.site-header .wp-block-search__button { min-width: 48px; min-height: 48px; border-radius: 12px; background: transparent; color: var(--wp--preset--color--ink); border: 2px solid var(--wp--preset--color--line); }
.site-header .wp-block-search__button:hover { border-color: var(--wp--preset--color--ink-muted); }
@media (max-width: 1100px) {
  .site-header .header-cta { display: none; }
}
/* switch to the menu button below 960px, so the header never crowds */
@media (max-width: 959px) {
  .site-header .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex !important; }
  .site-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none !important; }
}

/* logo block */
.badger-logo { display: inline-flex; line-height: 0; }
.badger-logo img { height: 44px; width: auto; display: block; }
.badger-logo .logo-dark { display: none; }
@media (prefers-color-scheme: dark) { .badger-logo .logo-light { display: none; } .badger-logo .logo-dark { display: block; } }
@media (max-width: 520px) {
  .badger-logo img { height: 31px; }
  .site-header .wp-block-group.is-content-justification-right { gap: 0.5rem !important; }
}
.site-footer .badger-logo img { height: 38px; }

/* ------------------------------------------------------------------
   Footer
------------------------------------------------------------------ */
.site-footer { border-top: 1px solid var(--wp--preset--color--line); }
.site-footer h2 { font-family: var(--wp--preset--font-family--sans); font-size: 1rem; margin: 0 0 0.75rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.site-footer a { color: var(--wp--preset--color--ink); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer a:hover { color: var(--wp--preset--color--bracken-deep); }

/* ------------------------------------------------------------------
   Block style variations
------------------------------------------------------------------ */
.wp-block-group.is-style-in-short {
  background: var(--wp--preset--color--bracken-soft); border-radius: 20px; padding: clamp(1.25rem, 3vw, 1.75rem);
}
.wp-block-group.is-style-in-short > :first-child { margin-top: 0; }
.wp-block-group.is-style-in-short > h2:first-child, .wp-block-group.is-style-in-short > h3:first-child {
  font-family: var(--wp--preset--font-family--sans); font-size: 1.0625rem; margin-bottom: 0.5rem;
}
.wp-block-group.is-style-note {
  background: var(--wp--preset--color--raised); border: 1px solid var(--wp--preset--color--line);
  border-radius: 16px; padding: clamp(1.1rem, 3vw, 1.5rem);
}
.wp-block-group.is-style-warning {
  background: var(--wp--preset--color--raised); border: 2px solid var(--wp--preset--color--alert);
  border-radius: 16px; padding: clamp(1.1rem, 3vw, 1.5rem);
}
.wp-block-group.is-style-card {
  background: var(--wp--preset--color--raised); border: 1px solid var(--wp--preset--color--line);
  border-radius: 20px; padding: clamp(1.25rem, 3vw, 2rem);
}
.wp-block-group.is-style-soft-band { background: var(--wp--preset--color--bracken-soft); }
.wp-block-group:where(.is-style-note, .is-style-warning, .is-style-card, .is-style-in-short) > * + * { margin-top: 0.75rem; }

ul.is-style-checklist { list-style: none; padding-left: 0 !important; }
ul.is-style-checklist li { position: relative; padding-left: 2rem; }
ul.is-style-checklist li::before {
  content: ""; position: absolute; left: 0; top: 0.35em; width: 1.25rem; height: 1.25rem;
  background: var(--wp--preset--color--brook);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%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='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}
ol.is-style-steps { list-style: none; padding-left: 0 !important; counter-reset: step; display: grid; gap: 1.25rem; }
ol.is-style-steps > li { counter-increment: step; position: relative; padding-left: 3.25rem; min-height: 2.25rem; margin: 0 !important; }
ol.is-style-steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 2.25rem; height: 2.25rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--wp--preset--color--bracken-soft); color: var(--wp--preset--color--ink);
  font-weight: 700;
}

/* tables */
.wp-block-table { overflow-x: auto; }
.wp-block-table table { border-collapse: collapse; width: 100%; }
.wp-block-table table th, .wp-block-table table td { border: 0; border-bottom: 1px solid var(--wp--preset--color--line); padding: 0.8rem 1.25rem 0.8rem 0; text-align: left; vertical-align: top; }
.wp-block-table table thead { border-bottom: 2px solid var(--wp--preset--color--ink-muted); }
.wp-block-table table th { font-weight: 700; }
.wp-block-table table td:first-child { font-weight: 700; }
.wp-block-table figcaption { text-align: left; margin-top: 0.75rem; }

/* details (accordions) */
.wp-block-details summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after { content: "Show"; font-weight: 400; font-size: 1rem; color: var(--wp--preset--color--bracken-deep); text-decoration: underline; text-underline-offset: 3px; flex: none; }
.wp-block-details[open] summary::after { content: "Hide"; }
.wp-block-details > :not(summary) { margin-top: 0.75rem; }
.wp-block-details + .wp-block-details { margin-top: 0; }

/* Yoast FAQ block */
.schema-faq { border-top: 1px solid var(--wp--preset--color--line); }
.schema-faq-section { border-bottom: 1px solid var(--wp--preset--color--line); padding: 1rem 0; }
.schema-faq-question { display: block; font-weight: 700; font-size: 1.125rem; margin-bottom: 0.4rem; }
.schema-faq-answer { margin: 0; }

/* ------------------------------------------------------------------
   Guide pages
------------------------------------------------------------------ */
.badger-crumbs { font-size: 1rem; color: var(--wp--preset--color--ink-muted); }
.badger-crumbs ol, .badger-crumbs > span { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; }
.badger-crumbs li + li::before { content: "/"; margin-right: 0.5rem; color: var(--wp--preset--color--ink-muted); }
.badger-crumbs a { color: var(--wp--preset--color--bracken-deep); }

.badger-review { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; font-size: 1rem; color: var(--wp--preset--color--ink-muted); margin: 0; }
.badger-review strong { color: var(--wp--preset--color--ink); }
.badger-review a { color: var(--wp--preset--color--bracken-deep); }

.guide-layout { display: grid; grid-template-columns: minmax(0, 680px) minmax(0, 300px); gap: clamp(2rem, 5vw, 4.5rem); justify-content: space-between; align-items: start; }
.guide-layout > .guide-main { min-width: 0; }
.guide-layout > .guide-aside { position: sticky; top: 1.5rem; display: grid; gap: 1.5rem; }
.badger-toc.toc-mobile { display: none; }
@media (max-width: 1000px) {
  .guide-layout { grid-template-columns: minmax(0, 1fr); }
  .guide-layout > .guide-aside { position: static; }
  .badger-toc.toc-mobile { display: block; }
  .badger-toc.toc-desktop { display: none; }
}

.badger-toc { border: 1px solid var(--wp--preset--color--line); border-radius: 16px; background: var(--wp--preset--color--raised); padding: 1.1rem 1.25rem; }
.badger-toc summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.badger-toc summary::-webkit-details-marker { display: none; }
.badger-toc summary::after { content: "Show"; font-weight: 400; font-size: 1rem; color: var(--wp--preset--color--bracken-deep); text-decoration: underline; }
.badger-toc[open] summary::after { content: "Hide"; }
.badger-toc ol { margin: 0.75rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.5rem; font-size: 1rem; line-height: 1.45; }
.badger-toc a { color: var(--wp--preset--color--ink); text-decoration: none; display: block; padding-left: 0.75rem; border-left: 3px solid transparent; }
.badger-toc a:hover { text-decoration: underline; }
.badger-toc a.is-current { border-left-color: var(--wp--preset--color--bracken); font-weight: 700; }

.badger-aside-cta { background: var(--wp--preset--color--bracken-soft); border-radius: 16px; padding: 1.25rem; display: grid; gap: 0.75rem; }
.badger-aside-cta p { margin: 0; }
.badger-aside-cta .title { font-weight: 700; font-size: 1.125rem; }

/* guide cards (query loops and related guides) */
.guide-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; list-style: none; margin: 0; padding: 0; }
.guide-cards.is-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .guide-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .guide-cards, .guide-cards.is-two { grid-template-columns: minmax(0, 1fr); } }
.guide-card, .wp-block-post-template.guide-cards > li {
  position: relative; display: flex; flex-direction: column; gap: 0.5rem;
  background: var(--wp--preset--color--raised); border: 1px solid var(--wp--preset--color--line);
  border-radius: 16px; padding: 1.25rem; margin: 0 !important; transition: border-color .15s ease;
}
.guide-card:hover, .wp-block-post-template.guide-cards > li:hover { border-color: var(--wp--preset--color--ink-muted); }
.guide-card .card-section, .wp-block-post-template.guide-cards .wp-block-post-terms { font-size: 0.9375rem; font-weight: 700; color: var(--wp--preset--color--bracken-deep); margin: 0; }
.wp-block-post-template.guide-cards .wp-block-post-terms a { color: inherit; text-decoration: none; position: relative; z-index: 2; }
.guide-card h3, .wp-block-post-template.guide-cards .wp-block-post-title { font: 700 1.1875rem/1.35 var(--wp--preset--font-family--sans); margin: 0; }
.guide-card h3 a, .wp-block-post-template.guide-cards .wp-block-post-title a { color: var(--wp--preset--color--ink); text-decoration: none; }
.guide-card h3 a::after, .wp-block-post-template.guide-cards .wp-block-post-title a::after { content: ""; position: absolute; inset: 0; border-radius: 16px; }
.guide-card h3 a:hover, .wp-block-post-template.guide-cards .wp-block-post-title a:hover { text-decoration: underline; }
.guide-card p, .wp-block-post-template.guide-cards .wp-block-post-excerpt { color: var(--wp--preset--color--ink-muted); font-size: 1rem; margin: 0; }
.wp-block-post-template.guide-cards .wp-block-post-excerpt__more-text { display: none; }

/* guide sections (the journey) */
.badger-stages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; list-style: none; margin: 0; padding: 0; counter-reset: stage; }
@media (max-width: 900px) { .badger-stages { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .badger-stages { grid-template-columns: minmax(0, 1fr); } }
.badger-stage { position: relative; display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: 0.25rem 1rem; align-content: start;
  background: var(--wp--preset--color--raised); border: 1px solid var(--wp--preset--color--line); border-radius: 16px; padding: 1.25rem; counter-increment: stage; }
.badger-stage:hover { border-color: var(--wp--preset--color--ink-muted); }
.badger-stage::before { content: counter(stage); grid-row: span 3; width: 2.5rem; height: 2.5rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--wp--preset--color--bracken-soft); font: 700 1.125rem/1 var(--wp--preset--font-family--display); }
.badger-stage a { font-weight: 700; font-size: 1.125rem; color: var(--wp--preset--color--ink); text-decoration: none; }
.badger-stage a::after { content: ""; position: absolute; inset: 0; border-radius: 16px; }
.badger-stage a:hover { text-decoration: underline; }
.badger-stage p { margin: 0; color: var(--wp--preset--color--ink-muted); font-size: 1rem; }
.badger-stage .count { font-size: 0.9375rem; color: var(--wp--preset--color--ink-muted); }
.badger-stage.is-current { border-color: var(--wp--preset--color--bracken-deep); background: var(--wp--preset--color--bracken-soft); }
.badger-stages.is-compact { grid-template-columns: minmax(0, 1fr); gap: 0.5rem; }
.badger-stages.is-compact .badger-stage { padding: 0.85rem 1rem; }
.badger-stages.is-compact .badger-stage p { display: none; }

/* photo + text */
.badger-photo img, .badger-photo svg { border-radius: 20px; width: 100%; height: auto; display: block; aspect-ratio: 4 / 3; object-fit: cover; }

/* signup + upgrade */
.badger-signup { display: grid; gap: 1rem; }
.badger-signup .row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.badger-signup .row input { flex: 1 1 16rem; }
.badger-signup.is-card { background: var(--wp--preset--color--raised); border: 1px solid var(--wp--preset--color--line); border-radius: 20px; padding: clamp(1.25rem, 3vw, 2rem); }
.badger-signup h2, .badger-signup h3 { margin: 0; }
.badger-upgrade { border: 2px solid var(--wp--preset--color--bracken); border-radius: 20px; padding: clamp(1.25rem, 3vw, 2rem); display: grid; gap: 0.75rem; background: var(--wp--preset--color--raised); }
.badger-upgrade .price { font: 700 1.75rem/1.2 var(--wp--preset--font-family--display); }

/* shared form controls */
.badger-form input[type="date"], .badger-form input[type="email"], .badger-form input[type="text"], .badger-form select,
.wp-block-search__input {
  font: 400 1.125rem/1.4 var(--wp--preset--font-family--sans); color: var(--wp--preset--color--ink);
  background: var(--wp--preset--color--raised); border: 2px solid var(--wp--preset--color--ink-muted) !important;
  border-radius: 8px; min-height: 52px; padding: 0.6rem 0.9rem; max-width: 100%;
}
.badger-form input[type="date"] { width: 100%; max-width: 22rem; }
.badger-form select { width: 100%; }
.badger-form label.field-label, .badger-form legend { font-weight: 700; font-size: 1.125rem; line-height: 1.4; padding: 0; }
.badger-form .hint { color: var(--wp--preset--color--ink-muted); font-size: 1rem; margin: 0; }
.badger-form .error { color: var(--wp--preset--color--alert); font-weight: 700; font-size: 1rem; margin: 0; }
.badger-form .field { display: grid; gap: 0.5rem; }
.badger-form .check { display: flex; gap: 0.75rem; align-items: flex-start; font-size: 1rem; }
.badger-form .check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--wp--preset--color--bracken-deep); flex: none; }
.badger-form .form-msg { font-weight: 700; font-size: 1rem; margin: 0; }
.badger-form .form-msg.ok { color: var(--wp--preset--color--brook); }
.badger-form .form-msg.err { color: var(--wp--preset--color--alert); }
.badger-form button.link { background: none; border: 0; padding: 0; min-height: 44px; font: 700 1.0625rem/1 var(--wp--preset--font-family--sans); color: var(--wp--preset--color--bracken-deep); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.wp-block-search__inside-wrapper { gap: 0.5rem; border: 0 !important; padding: 0 !important; }

/* ------------------------------------------------------------------
   Deadline checker
------------------------------------------------------------------ */
.bdc { container-type: inline-size; background: var(--wp--preset--color--raised); border: 1px solid var(--wp--preset--color--line); border-radius: 20px; padding: clamp(1.25rem, 3.5vw, 2rem); }
.bdc [hidden] { display: none !important; }
.bdc-step { display: grid; gap: 1.5rem; }
.bdc-count { font-weight: 700; font-size: 1rem; color: var(--wp--preset--color--ink-muted); margin: 0; }
.bdc-choices { display: grid; gap: 0.6rem; border: 0; margin: 0; padding: 0; min-width: 0; }
.bdc-choices legend { margin-bottom: 0.75rem; }
.bdc-choice { display: flex; gap: 0.9rem; align-items: center; padding: 0.85rem 1rem; border: 2px solid var(--wp--preset--color--line); border-radius: 12px; cursor: pointer; background: var(--wp--preset--color--raised); }
.bdc-choice:hover { border-color: var(--wp--preset--color--ink-muted); }
.bdc-choice input { width: 22px; height: 22px; accent-color: var(--wp--preset--color--bracken-deep); margin: 0; flex: none; }
.bdc-choice:has(input:checked) { border-color: var(--wp--preset--color--bracken-deep); background: var(--wp--preset--color--bracken-soft); }
.bdc-choice span { display: grid; line-height: 1.35; }
.bdc-choice small { font-size: 0.9375rem; color: var(--wp--preset--color--ink-muted); margin-top: 0.15rem; }
.bdc-actions { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; align-items: center; }
.bdc-results { display: grid; gap: 1.5rem; }
.bdc-results h2 { font-size: var(--wp--preset--font-size--x-large); margin: 0; }
.bdc-chosen { color: var(--wp--preset--color--ink-muted); margin: 0; display: flex; flex-wrap: wrap; gap: 0 1rem; align-items: baseline; }
.bdc-late { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 0.75rem; padding: 1rem 1.1rem; border-radius: 12px; border: 2px solid var(--wp--preset--color--alert); }
.bdc-late svg { color: var(--wp--preset--color--alert); margin-top: 2px; }
.bdc-late p { margin: 0; }
.bdc-next { display: grid; gap: 0.5rem; padding: 1.25rem; border-radius: 16px; background: var(--wp--preset--color--bracken-soft); }
.bdc-next p { margin: 0; }
.bdc-next .when { font: 700 1.6rem/1.2 var(--wp--preset--font-family--display); }
.bdc-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--wp--preset--color--line); }
.bdc-item { border-bottom: 1px solid var(--wp--preset--color--line); padding: 0.9rem 0; display: grid; gap: 0.15rem; }
.bdc-item .status { display: inline-flex; gap: 0.4rem; align-items: center; font-weight: 700; font-size: 1rem; }
.bdc-item .date { font-weight: 700; font-variant-numeric: tabular-nums; }
.bdc-item details { margin-top: 0.25rem; }
.bdc-item summary { cursor: pointer; color: var(--wp--preset--color--bracken-deep); font-size: 1rem; text-decoration: underline; text-underline-offset: 3px; width: max-content; max-width: 100%; }
.bdc-item .more { display: grid; gap: 0.5rem; padding-top: 0.6rem; }
.bdc-item .more p { margin: 0; }
.s-done { color: var(--wp--preset--color--brook); } .s-late { color: var(--wp--preset--color--alert); } .s-soon { color: var(--wp--preset--color--bracken-deep); } .s-upcoming, .s-info { color: var(--wp--preset--color--ink-muted); }
.bdc-icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bdc-remind { border-top: 1px solid var(--wp--preset--color--line); padding-top: 1.5rem; display: grid; gap: 1rem; }
.bdc-remind h3 { margin: 0; font-size: 1.1875rem; }
@container (min-width: 640px) {
  .bdc-item { grid-template-columns: 15.5rem minmax(0, 1fr) auto; gap: 0.25rem 1.25rem; align-items: baseline; }
  .bdc-item .status { order: 3; }
  .bdc-item details { grid-column: 1 / -1; }
}

/* ------------------------------------------------------------------
   Front page and hubs
------------------------------------------------------------------ */
.hero-ticks { margin-top: 1.75rem !important; }
.badger-review { margin-top: 0.25rem !important; }
.hero-ticks { list-style: none; padding: 0 !important; margin: 0; display: grid; gap: 0.6rem; }
.hero-ticks li { position: relative; padding-left: 2rem; margin: 0 !important; }
.hero-ticks li::before { content: ""; position: absolute; left: 0; top: 0.3em; width: 1.25rem; height: 1.25rem; background: var(--wp--preset--color--brook);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%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='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat; }
.section-line { border-top: 1px solid var(--wp--preset--color--line); }
.wp-block-query-pagination { gap: 1rem; font-weight: 700; }
.wp-block-query-no-results { color: var(--wp--preset--color--ink-muted); }

/* 404 / search */
.wp-block-search { max-width: 34rem; }
.wp-block-search__label { font-weight: 700; }

/* ------------------------------------------------------------------
   Homepage (v1.1): hero, key numbers, how it works, photo band
------------------------------------------------------------------ */
.home-main .wp-block-post-content { margin-top: 0; }
.home-main .wp-block-post-content > .alignfull { margin-top: 0; margin-bottom: 0; }
.home-main .wp-block-post-content > * + * { margin-top: 0; }

.home-hero {
  background:
    radial-gradient(60rem 30rem at 85% -10%, var(--wp--preset--color--bracken-soft) 0%, transparent 70%),
    var(--wp--preset--color--paper);
}
.home-title { font-size: clamp(2.1rem, 1.4rem + 2.6vw, 3.4rem); line-height: 1.12; letter-spacing: -0.01em; }
.hero-basis { color: var(--wp--preset--color--ink-muted); border-top: 1px solid var(--wp--preset--color--line); padding-top: 1rem; margin-top: 1.75rem !important; max-width: 30rem; }
.home-hero .bdc { box-shadow: 0 1px 2px rgba(30, 28, 26, .04), 0 12px 32px -12px rgba(30, 28, 26, .18); }

.home-stats { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--paper); }
.home-stats a { color: inherit; }
.home-stats .stats-row { margin: 0; }
.home-stats .stat { border-left: 3px solid var(--wp--preset--color--bracken); padding-left: 1rem; }
.home-stats .stat p { margin: 0; font-size: 1rem; line-height: 1.5; }
.home-stats .stat .stat-number {
  font-family: var(--wp--preset--font-family--display); font-weight: 700;
  font-size: clamp(1.9rem, 1.4rem + 1.4vw, 2.6rem); line-height: 1.1; margin-bottom: 0.4rem; color: var(--wp--preset--color--bracken);
}
.home-stats .stats-source { opacity: .8; margin-top: 1.75rem !important; }
@media (prefers-color-scheme: dark) {
  :root:not(.badger-force-light) .home-stats { background: var(--wp--preset--color--raised); color: var(--wp--preset--color--ink); }
}
@media (min-width: 600px) and (max-width: 959px) {
  .home-stats .stats-row { flex-wrap: wrap !important; }
  .home-stats .stats-row > .stat { flex-basis: calc(50% - 0.5rem) !important; flex-grow: 0; }
}

.how-steps .how-step { background: var(--wp--preset--color--raised); border: 1px solid var(--wp--preset--color--line); border-radius: 20px; padding: 0.75rem 0.75rem 1.5rem; }
.how-steps .how-step > :not(figure) { padding-inline: 0.75rem; }
.how-steps .how-step figure { margin: 0 0 1.25rem; }
.how-steps .how-step img { border-radius: 14px; aspect-ratio: 3 / 2; }
.how-steps .how-step h3 { font-family: var(--wp--preset--font-family--sans); font-size: 1.25rem; margin: 0 0 0.5rem; }
.how-steps .how-step p { margin: 0 0 0.75rem; }
.how-steps .how-step p:last-child { margin-bottom: 0; }
.how-steps .how-step a { font-weight: 700; }

.home-band { padding-block: var(--wp--preset--spacing--40) var(--wp--preset--spacing--60); }
.badger-photo.is-wide img { aspect-ratio: 21 / 9; border-radius: 24px; }
.band-quote {
  font-family: var(--wp--preset--font-family--display); font-weight: 600;
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.2rem); line-height: 1.25; text-align: center;
  max-width: 34ch; margin: 2rem auto 0 !important;
}

.home-main .is-style-soft-band .badger-photo img { box-shadow: 0 12px 32px -16px rgba(30, 28, 26, .25); }
.badger-photo { margin: 0; }
.home-main { margin-top: 0 !important; }
.home-main > .wp-block-post-content > :first-child { margin-top: 0 !important; }
.badger-stages > li, .badger-stages > li + li { margin: 0 !important; }
.home-band { padding-bottom: var(--wp--preset--spacing--40); }
.home-band + .wp-block-group { padding-top: var(--wp--preset--spacing--50) !important; }
.wp-block-group.is-style-card.is-layout-flex { gap: 0.75rem; }
.wp-block-group.is-style-card.is-layout-flex > * { margin: 0; }

/* ------------------------------------------------------------------
   Letter templates (v1.1)
------------------------------------------------------------------ */
.wp-block-group.is-style-letter {
  background: var(--wp--preset--color--raised); border: 1px solid var(--wp--preset--color--line);
  border-left: 6px solid var(--wp--preset--color--bracken); border-radius: 16px;
  padding: clamp(1.25rem, 4vw, 2.25rem); margin-top: 0.75rem !important;
}
.wp-block-group.is-style-letter > * { margin-top: 0; margin-bottom: 0; }
.wp-block-group.is-style-letter > * + * { margin-top: 1rem; }
.wp-block-group.is-style-letter :where(ul, ol) { padding-left: 1.3em; }
mark.letter-fill {
  background: var(--wp--preset--color--bracken-soft); color: var(--wp--preset--color--ink);
  border-radius: 4px; padding: 0 0.2em; box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.letter-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; margin-top: 1.5rem !important; }
.letter-tools .letter-copy::before {
  content: ""; display: inline-block; width: 1.1em; height: 1.1em; margin-right: 0.5em; vertical-align: -0.18em; 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='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='12' height='12' rx='2'/%3E%3Cpath d='M5 15H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v1'/%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='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='12' height='12' rx='2'/%3E%3Cpath d='M5 15H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v1'/%3E%3C/svg%3E") center / contain no-repeat;
}
.letter-status { margin: 0 !important; font-weight: 700; color: var(--wp--preset--color--brook); }
.letter-status:empty { display: none; }
.letter-hint { color: var(--wp--preset--color--ink-muted); font-size: 1rem; margin-top: 0.5rem !important; }
@media print {
  .site-header, .site-footer, .letter-tools, .letter-hint, .badger-signup, .wp-block-badger-related-guides { display: none !important; }
  .wp-block-group.is-style-letter { border: 0; padding: 0; }
  mark.letter-fill { background: none; }
}

/* ------------------------------------------------------------------
   Council pages (v1.1)
------------------------------------------------------------------ */
.council-stats {
  background: var(--wp--preset--color--raised); border: 1px solid var(--wp--preset--color--line);
  border-radius: 20px; padding: clamp(1.25rem, 3vw, 2rem); margin-top: 1.5rem !important;
}
.council-stats > * { margin-top: 0; margin-bottom: 0; }
.council-stats > * + * { margin-top: 1rem; }
.council-stats .wp-block-columns { margin-bottom: 0; gap: 1rem; }
.council-stats .stat { border-left: 3px solid var(--wp--preset--color--line); padding-left: 1rem; }
.council-stats .stat.is-main { border-left-color: var(--wp--preset--color--bracken); }
.council-stats .stat p { margin: 0; font-size: 1rem; line-height: 1.45; color: var(--wp--preset--color--ink-muted); }
.council-stats .stat .stat-number {
  font-family: var(--wp--preset--font-family--display); font-weight: 700; color: var(--wp--preset--color--ink);
  font-size: clamp(1.8rem, 1.3rem + 1.5vw, 2.4rem); line-height: 1.1; margin-bottom: 0.3rem;
}
.council-stats .stat.is-main .stat-number { color: var(--wp--preset--color--bracken-deep); }
.council-stats .stats-source { font-size: 0.9375rem; color: var(--wp--preset--color--ink-muted); }
.contact-cards .wp-block-group.is-style-card h3 { font-family: var(--wp--preset--font-family--sans); font-size: 1.1875rem; margin: 0; }
.contact-cards .wp-block-group.is-style-card p { margin: 0; }
.contact-cards .wp-block-group.is-style-card .card-tag { font-size: 0.9375rem; font-weight: 700; color: var(--wp--preset--color--brook); }
.contact-cards .wp-block-columns + .wp-block-columns { margin-top: 1rem; }

/* ------------------------------------------------------------------
   Homepage (v1.2): photo hero, sample result, councils, journey, FAQ
------------------------------------------------------------------ */
/* Hero: photo with the checker floating over its edge */
.hero-visual { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; margin: 0; }
.hero-visual > * { margin: 0 !important; }
.hero-visual .hero-photo { grid-column: 5 / 13; grid-row: 1; position: relative; }
.hero-visual .hero-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 28px; display: block; }
.hero-visual .wp-block-badger-deadline-checker, .hero-visual > .bdc { grid-column: 1 / 10; grid-row: 1; margin-top: clamp(9rem, 19vw, 16rem) !important; position: relative; z-index: 2; }
.hero-visual .bdc { box-shadow: 0 2px 4px rgba(30, 28, 26, .06), 0 24px 48px -16px rgba(30, 28, 26, .35) !important; }
.hero-chip {
  position: absolute; top: 1.25rem; right: 1.25rem; display: inline-flex; align-items: center; gap: .5rem;
  background: var(--wp--preset--color--raised); color: var(--wp--preset--color--ink); border-radius: 999px;
  padding: .5rem .9rem; font-size: .9375rem; font-weight: 700; box-shadow: 0 6px 18px -8px rgba(30, 28, 26, .4);
}
.hero-chip .bdc-icon { color: var(--wp--preset--color--brook); }
.home-hero .wp-block-columns { align-items: flex-start !important; }
@media (max-width: 781px) {
  .hero-visual { display: flex; flex-direction: column; gap: 0; }
  .hero-visual > * { width: 100%; }
  .hero-visual .hero-photo { order: 2; margin-top: 1.5rem !important; }
  .hero-visual .hero-photo img { aspect-ratio: 16 / 9; border-radius: 20px; }
  .hero-visual .wp-block-badger-deadline-checker, .hero-visual > .bdc { order: 1; margin-top: 0 !important; }
}

/* Section intro: label, heading, text in one tidy column */
.section-intro { max-width: 46rem; }
.section-intro > * { margin: 0 !important; }
.section-intro > * + * { margin-top: .75rem !important; }

/* "See what you get" sample result */
.bdc-sample { position: relative; box-shadow: 0 12px 32px -16px rgba(30, 28, 26, .25); }
.bdc-sample-tag { display: inline-flex; align-items: center; gap: .4rem; margin: 0 0 1rem; font-size: .9375rem; font-weight: 700; color: var(--wp--preset--color--ink-muted); }
.bdc-sample .bdc-item { grid-template-columns: 9.5rem minmax(0, 1fr) auto; }
@media (max-width: 600px) { .bdc-sample .bdc-item { grid-template-columns: minmax(0, 1fr); } }
.sample-points { display: grid; gap: 1.25rem; margin: 0; padding: 0 !important; list-style: none; counter-reset: sp; }
.sample-points li { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: .1rem 1rem; margin: 0 !important; counter-increment: sp; }
.sample-points li::before {
  content: counter(sp); grid-row: span 2; width: 2.5rem; height: 2.5rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--wp--preset--color--bracken-soft); color: var(--wp--preset--color--bracken-deep); font: 700 1.125rem/1 var(--wp--preset--font-family--display);
}
.sample-points strong { display: block; }

/* Council picker */
.badger-councils { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start;
  background: var(--wp--preset--color--raised); border: 1px solid var(--wp--preset--color--line); border-radius: 24px; padding: clamp(1.25rem, 3.5vw, 2.25rem); }
@media (max-width: 781px) { .badger-councils { grid-template-columns: minmax(0, 1fr); } }
.bcp-form { display: grid; gap: .6rem; }
.bcp-form label { font-weight: 700; }
.bcp-select { font: inherit; font-size: 1.0625rem; padding: .85rem 1rem; border-radius: 12px; border: 2px solid var(--wp--preset--color--line); background: var(--wp--preset--color--paper); color: var(--wp--preset--color--ink); width: 100%; }
.bcp-select:focus { outline: 3px solid var(--wp--preset--color--bracken); outline-offset: 2px; }
.bcp-more { margin: .25rem 0 0; font-size: 1rem; }
.bcp-result { display: grid; gap: 1rem; }
.bcp-result p { margin: 0; }
.bcp-bars { display: grid; gap: .75rem; }
.bcp-bar { display: grid; grid-template-columns: 9rem minmax(0, 1fr) 4rem; align-items: center; gap: .75rem; font-weight: 700; }
.bcp-bar[hidden] { display: none; }
.bcp-track { height: 14px; border-radius: 999px; background: var(--wp--preset--color--line); overflow: hidden; }
.bcp-fill { display: block; height: 100%; border-radius: 999px; background: var(--wp--preset--color--ink-muted); transition: width .4s ease; }
.bcp-bar.is-council .bcp-fill { background: var(--wp--preset--color--brook); }
.bcp-bar.is-council.is-below .bcp-fill { background: var(--wp--preset--color--alert); }
.bcp-num { text-align: right; font-variant-numeric: tabular-nums; }
.bcp-link a { font-weight: 700; }
@media (max-width: 600px) { .bcp-bar { grid-template-columns: minmax(0, 1fr) 3.5rem; } .bcp-bar .bcp-label { grid-column: 1 / -1; } }

/* EHCP journey timeline */
.badger-journey { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1.25rem; position: relative; counter-reset: none; }
.badger-journey::before { content: ""; position: absolute; left: 1.25rem; right: 1.25rem; top: 1.25rem; height: 2px; background: var(--wp--preset--color--line); }
.journey-stage { position: relative; margin: 0 !important; display: grid; align-content: start; gap: .4rem; }
.journey-dot {
  width: 2.5rem; height: 2.5rem; border-radius: 50%; display: grid; place-items: center; position: relative; z-index: 1; margin-bottom: .6rem;
  background: var(--wp--preset--color--bracken); color: var(--wp--preset--color--on-bracken); font: 700 1.125rem/1 var(--wp--preset--font-family--display);
  box-shadow: 0 0 0 6px var(--wp--preset--color--paper);
}
.journey-stage:last-child .journey-dot { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--paper); }
.journey-when { margin: 0; font-size: .9375rem; font-weight: 700; color: var(--wp--preset--color--bracken-deep); }
.journey-title { margin: 0; font: 700 1.125rem/1.3 var(--wp--preset--font-family--sans); }
.journey-title a { color: var(--wp--preset--color--ink); text-decoration: none; }
.journey-title a:hover { text-decoration: underline; }
.journey-guides { list-style: none; margin: .35rem 0 0; padding: 0; display: grid; gap: .45rem; font-size: 1rem; line-height: 1.4; }
.journey-guides li { margin: 0 !important; }
.journey-desc, .journey-soon, .journey-more { margin: 0; font-size: 1rem; }
.journey-desc { color: var(--wp--preset--color--ink-muted); }
.journey-soon { color: var(--wp--preset--color--ink-muted); font-style: normal; font-size: .9375rem; }
.journey-more a { font-weight: 700; }
@media (max-width: 1080px) {
  .badger-journey { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 2rem; }
  .badger-journey::before { display: none; }
}
@media (max-width: 640px) {
  .badger-journey { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; padding-left: 3.5rem; }
  .badger-journey::before { display: block; left: 1.2rem; right: auto; top: .5rem; bottom: .5rem; width: 2px; height: auto; }
  .journey-dot { position: absolute; left: -3.5rem; top: 0; margin: 0; }
}

/* Guide cards with photos */
.guide-card .card-img, .wp-block-post-template.guide-cards .wp-block-post-featured-image {
  margin: -1.25rem -1.25rem .5rem !important; border-radius: 16px 16px 0 0; overflow: hidden;
}
.guide-card .card-img img, .guide-card img.card-img, .wp-block-post-template.guide-cards .wp-block-post-featured-image img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; border-radius: 16px 16px 0 0;
}
.guide-card img.card-img { margin: -1.25rem -1.25rem .5rem; width: calc(100% + 2.5rem); max-width: none; }
.wp-block-post-template.guide-cards .wp-block-post-featured-image a { position: static; }
.guide-cards .wp-block-post-featured-image img { transition: transform .4s ease; }
@media (prefers-reduced-motion: no-preference) {
  .guide-card:hover img.card-img, .wp-block-post-template.guide-cards > li:hover .wp-block-post-featured-image img { transform: scale(1.03); }
}

/* Single guide: featured photo */
.guide-main .wp-block-post-featured-image { margin-top: .5rem !important; }
.guide-main .wp-block-post-featured-image img { border-radius: 20px; width: 100%; object-fit: cover; }

/* FAQ */
.badger-faq .wp-block-details {
  border: 1px solid var(--wp--preset--color--line); border-radius: 14px; background: var(--wp--preset--color--raised); padding: 0; margin: 0 !important;
}
.badger-faq .wp-block-details + .wp-block-details { margin-top: .75rem !important; }
.badger-faq .wp-block-details summary { cursor: pointer; padding: 1.1rem 3rem 1.1rem 1.25rem; font-weight: 700; font-size: 1.125rem; list-style: none; position: relative; }
.badger-faq .wp-block-details summary::-webkit-details-marker { display: none; }
.badger-faq .wp-block-details summary::after {
  content: ""; position: absolute; right: 1.25rem; top: 50%; width: .7rem; height: .7rem; margin-top: -.5rem;
  border-right: 2.5px solid var(--wp--preset--color--bracken-deep); border-bottom: 2.5px solid var(--wp--preset--color--bracken-deep); transform: rotate(45deg); transition: transform .2s ease;
}
.badger-faq .wp-block-details[open] summary::after { transform: rotate(-135deg); margin-top: -.15rem; }
.badger-faq .wp-block-details > :not(summary) { padding: 0 1.25rem; margin: 0 0 1rem; }
.badger-faq .wp-block-details > :not(summary):first-of-type { margin-top: 0; }

/* Reminder sign-up band */
.reminder-band .reminder-art img { width: 100%; max-width: 420px; display: block; margin-inline: auto; }
.reminder-band .badger-signup.is-card, .reminder-band .badger-signup { background: var(--wp--preset--color--raised); }
.badger-councils-section { display: grid; gap: 1.75rem; }

/* ------------------------------------------------------------------
   v1.3 site-wide design system: surfaces, the sett arch, page header,
   dark footer. Four surfaces alternate: warm (bracken-soft), white,
   cool mist (a soft version of the brook "on time" colour) and ink.
------------------------------------------------------------------ */
:root {
  --badger-mist: #E5EFEE;
  --badger-mist-line: #CFE0DE;
  --badger-footer: #1E1C1A;
  --badger-arch: clamp(22px, 3.2vw, 44px);
}
@media (prefers-color-scheme: dark) {
  :root:not(.badger-force-light) { --badger-mist: #1B2526; --badger-mist-line: #2A3839; --badger-footer: #121110; }
}

/* Bands (Group block styles) */
.wp-block-group.is-style-white-band { background: var(--wp--preset--color--raised); }
.wp-block-group.is-style-mist-band { background: var(--badger-mist); }
.is-style-mist-band .wp-block-details, .is-style-mist-band .badger-councils, .is-style-mist-band .is-style-card { border-color: var(--badger-mist-line); }
.is-style-white-band .guide-card, .is-style-white-band .wp-block-post-template.guide-cards > li, .is-style-white-band .is-style-card { background: var(--wp--preset--color--paper); }
.is-style-white-band .journey-dot { box-shadow: 0 0 0 6px var(--wp--preset--color--raised); }
.is-style-mist-band .journey-dot { box-shadow: 0 0 0 6px var(--badger-mist); }

/* The sett arch: a low, wide curve. Used only under page headers and above the footer. */
.badger-page-header { border-radius: 0 0 50% 50% / 0 0 var(--badger-arch) var(--badger-arch); }
.site-footer { border-radius: 50% 50% 0 0 / var(--badger-arch) var(--badger-arch) 0 0; padding-top: calc(var(--wp--preset--spacing--50) + var(--badger-arch) * .6) !important; }

/* Page header */
.badger-page-header {
  background: var(--wp--preset--color--bracken-soft); margin: 0 !important;
  padding: clamp(1.5rem, 3vw, 2.25rem) var(--wp--style--root--padding-right, 1.25rem) calc(clamp(2.5rem, 4vw, 3.5rem) + var(--badger-arch) * .5) var(--wp--style--root--padding-left, 1.25rem);
}
.ph-inner { position: relative; z-index: 1; max-width: 1160px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; align-items: center; }
.has-visual .ph-inner { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 4.5rem); }
.ph-text { display: grid; gap: 1rem; align-content: start; max-width: 46rem; }
.ph-text > * { margin: 0; }
.ph-text .badger-crumbs { margin-bottom: .5rem; }
.ph-label { font-weight: 700; font-size: 1rem; color: var(--wp--preset--color--bracken-deep); }
.ph-title { font-size: clamp(2.1rem, 1.5rem + 2.3vw, 3.25rem); line-height: 1.1; letter-spacing: -0.01em; text-wrap: balance; }
.ph-lead { font-size: var(--wp--preset--font-size--large); line-height: 1.55; color: var(--wp--preset--color--ink-muted); max-width: 40rem; }
.ph-lead a { color: var(--wp--preset--color--bracken-deep); }
.badger-page-header .badger-review { margin-top: .25rem; }
.ph-photo { margin: 0; align-self: center; }
.ph-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 24px; box-shadow: 0 18px 40px -20px rgba(30, 28, 26, .45); }
.ph-art { margin: 0; justify-self: end; width: min(100%, 26rem); }
.ph-art img { display: block; width: 100%; height: auto; border-radius: 24px; }
.ph-figure { justify-self: end; width: min(100%, 22rem); background: var(--wp--preset--color--raised); border-radius: 24px; padding: 1.75rem 1.75rem 1.5rem; box-shadow: 0 18px 40px -24px rgba(30, 28, 26, .4); }
.ph-figure p { margin: 0; }
.ph-figure .num { font: 700 clamp(3rem, 2rem + 3vw, 4.25rem)/1 var(--wp--preset--font-family--display); color: var(--wp--preset--color--bracken-deep); margin-bottom: .6rem; }
.ph-search { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .5rem !important; max-width: 34rem; }
.ph-search input { flex: 1 1 14rem; font: inherit; padding: .8rem 1rem; border-radius: 12px; border: 2px solid var(--wp--preset--color--line); background: var(--wp--preset--color--raised); color: var(--wp--preset--color--ink); }
.ph-search input:focus { outline: 3px solid var(--wp--preset--color--bracken); outline-offset: 2px; }
/* Stage track on section pages */
.ph-track { list-style: none; margin: .75rem 0 0 !important; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .5rem; max-width: 46rem; }
.ph-track li { margin: 0; }
.ph-track a { display: block; padding-top: .7rem; border-top: 5px solid var(--wp--preset--color--line); font-size: .875rem; line-height: 1.3; color: var(--wp--preset--color--ink-muted); text-decoration: none; }
.ph-track .is-before a { border-top-color: var(--wp--preset--color--bracken); }
.ph-track .is-current a { border-top-color: var(--wp--preset--color--bracken-deep); color: var(--wp--preset--color--ink); font-weight: 700; }
.ph-track a:hover { color: var(--wp--preset--color--ink); text-decoration: underline; }
@media (max-width: 781px) {
  .has-visual .ph-inner { grid-template-columns: minmax(0, 1fr); }
  .ph-art { display: none; }
  .ph-figure { justify-self: start; }
  .ph-track { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: .75rem; }
}
.badger-page-header + .page-main, .badger-page-header + main { position: relative; z-index: 1; }
.badger-page-header + main .guide-aside { margin-top: 0; }

/* Body pages: comfortable reading, clear section starts */
.page-main .wp-block-post-content > h2 { margin-top: 2.75rem; }
.page-main .wp-block-post-content > h2:first-child { margin-top: 0; }
.section-aside .badger-aside-cta { position: sticky; top: 1.5rem; }

/* Footer: the dark close to every page */
.site-footer {
  background: var(--badger-footer); color: #E9E2D8; border-top: 0 !important;
  margin-top: var(--wp--preset--spacing--40) !important;
}
.site-footer a { color: #F4EFE7; }
.site-footer a:hover { color: #F2B98E; }
.site-footer h2 { color: #F2B98E; }
.site-footer .has-ink-muted-color, .site-footer p { color: #BEB5A9 !important; }
.site-footer .wp-block-separator { border-color: rgba(244, 239, 231, .16) !important; background: rgba(244, 239, 231, .16) !important; color: rgba(244, 239, 231, .16) !important; }
.site-footer .badger-logo .logo-light { display: none !important; }
.site-footer .badger-logo .logo-dark { display: block !important; }
.site-footer a:focus-visible { outline-color: #F2B98E; }
/* No gap of page colour between the last band and the footer */
.home-main + .site-footer, .wp-site-blocks > .site-footer { position: relative; }
.badger-faq.is-layout-constrained > * { max-width: 820px; margin-left: max(0px, calc((100% - 1160px) / 2)) !important; margin-right: auto !important; }
.home-main .home-councils .badger-councils-section { margin: 0; }
/* The footer sits straight under the last section; on the homepage its arch rises out of the sign-up band */
.wp-site-blocks > .wp-block-template-part:last-child { margin-top: 0 !important; }
.wp-site-blocks > .wp-block-template-part:last-child .site-footer { margin-top: 0 !important; }
body:has(.reminder-band) .wp-site-blocks > .wp-block-template-part:last-child { background: var(--wp--preset--color--bracken-soft); }

/* ------------------------------------------------------------------
   Designed pages (v1.3): wide sections, readable text, components
------------------------------------------------------------------ */
/* Plain text stays at a reading width, aligned to the page grid; sections can go wide or full */
.page-content.is-layout-constrained > :where(:not(.alignfull):not(.alignwide)) { max-width: 760px; margin-left: max(0px, calc((100% - 1160px) / 2)) !important; margin-right: auto !important; }
.page-content > .alignfull { margin-top: 0 !important; margin-bottom: 0 !important; }
.page-content > .alignfull + .alignfull { margin-top: 0 !important; }
.page-content > * + .alignfull { margin-top: var(--wp--preset--spacing--50) !important; }
.page-content > .alignfull + :not(.alignfull) { margin-top: var(--wp--preset--spacing--50) !important; }
.page-content > .alignfull:first-child { margin-top: calc(var(--wp--preset--spacing--50) * -1) !important; }
.page-content > .alignfull:last-child { margin-bottom: calc(var(--wp--preset--spacing--60) * -1) !important; }
.page-main:has(.page-content > .alignfull:last-child) { padding-bottom: var(--wp--preset--spacing--60) !important; }
.page-content > h2 { margin-top: 2.75rem; }
.page-content > h2:first-child { margin-top: 0; }

/* Section heading block: label, heading, intro */
.sec-head { max-width: 46rem; margin-bottom: 2rem !important; }
.sec-head > * { margin: 0 !important; }
.sec-head > * + * { margin-top: .75rem !important; }
.sec-head h2 { font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.4rem); }

/* Split: text beside a picture */
.split .badger-photo img, .split .split-img img { border-radius: 24px; width: 100%; display: block; object-fit: cover; }
.split .split-img img { aspect-ratio: 4 / 3; box-shadow: 0 18px 40px -24px rgba(30, 28, 26, .45); }
.split .split-art img { border-radius: 24px; width: 100%; display: block; aspect-ratio: 3 / 2; object-fit: cover; }

/* Feature cards: picture on top, words below */
.feature-cards .is-style-card { padding: .75rem .75rem 1.5rem !important; gap: 0 !important; }
.feature-cards .is-style-card > :not(figure) { padding-inline: .75rem; margin: 0; }
.feature-cards .is-style-card > figure { margin: 0 0 1.25rem; }
.feature-cards .is-style-card > figure img { border-radius: 14px; aspect-ratio: 3 / 2; object-fit: cover; width: 100%; display: block; }
.feature-cards .is-style-card h3 { font: 700 1.25rem/1.3 var(--wp--preset--font-family--sans); margin-bottom: .5rem; }
.feature-cards .is-style-card p + p { margin-top: .75rem; }
.feature-cards .is-style-card a { font-weight: 700; }

/* Tiles: short heading and a line of text, in a grid */
.tiles { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.tiles > * { margin: 0 !important; }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .tiles { grid-template-columns: minmax(0, 1fr); } }
.tiles .is-style-card { height: 100%; }
.tiles .is-style-card h3 { font: 700 1.125rem/1.3 var(--wp--preset--font-family--sans); margin: 0 0 .4rem; }
.tiles .is-style-card p { margin: 0; color: var(--wp--preset--color--ink-muted); }
.tiles .is-style-card p + p { margin-top: .75rem; color: inherit; }
.tile-tag { display: inline-block; font-size: .875rem !important; font-weight: 700; color: var(--wp--preset--color--brook) !important; margin-bottom: .6rem !important; }
.tiles a { font-weight: 700; }

/* Numbered process (a real sequence) */
.process { list-style: none; margin: 0 !important; padding: 0 !important; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; counter-reset: pr; }
.process li { margin: 0 !important; counter-increment: pr; display: grid; gap: .4rem; align-content: start; }
.process li::before { content: counter(pr); width: 2.75rem; height: 2.75rem; border-radius: 50%; display: grid; place-items: center; margin-bottom: .5rem;
  background: var(--wp--preset--color--bracken); color: var(--wp--preset--color--on-bracken); font: 700 1.25rem/1 var(--wp--preset--font-family--display); }
.process strong { font-size: 1.125rem; }
@media (max-width: 900px) { .process { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .process { grid-template-columns: minmax(0, 1fr); } }

/* Closing call to action band */
.cta-band .wp-block-heading { font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.4rem); }
.cta-band .cta-inner { max-width: 46rem; }
.is-style-ink-band { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--paper); }
.is-style-ink-band a:not(.wp-element-button) { color: inherit; }
.is-style-ink-band .badger-label { color: var(--wp--preset--color--bracken); }
.is-style-ink-band .has-ink-muted-color { color: #CFC6BA !important; }
.is-style-ink-band .is-style-secondary .wp-block-button__link { color: var(--wp--preset--color--paper); border-color: rgba(250, 246, 239, .5); background: transparent; }
@media (prefers-color-scheme: dark) { :root:not(.badger-force-light) .is-style-ink-band { background: #121110; color: var(--wp--preset--color--ink); } }

/* Big email card on Contact */
.email-card { background: var(--wp--preset--color--raised); border: 1px solid var(--wp--preset--color--line); border-radius: 24px; padding: clamp(1.5rem, 4vw, 2.5rem) !important; }
.email-card .email-big { font: 700 clamp(1.5rem, 1rem + 2vw, 2.25rem)/1.2 var(--wp--preset--font-family--display); word-break: break-word; margin: .25rem 0 !important; }
.email-card .email-big a { color: var(--wp--preset--color--ink); text-decoration-color: var(--wp--preset--color--bracken); text-underline-offset: 6px; }

/* Glossary: jump bar and term cards */
.az-bar { display: flex !important; flex-wrap: wrap; gap: .4rem; margin: 0 0 2.5rem !important; padding: 0; }
.az-bar a { display: grid; place-items: center; min-width: 2.75rem; height: 2.75rem; padding: 0 .5rem; border-radius: 10px; background: var(--wp--preset--color--raised); border: 1px solid var(--wp--preset--color--line);
  font: 700 1.125rem/1 var(--wp--preset--font-family--display); color: var(--wp--preset--color--ink); text-decoration: none; }
.az-bar a:hover { border-color: var(--wp--preset--color--bracken-deep); color: var(--wp--preset--color--bracken-deep); }
.az-letter { font-size: clamp(2rem, 1.6rem + 1.4vw, 2.75rem) !important; color: var(--wp--preset--color--bracken-deep); margin: 2.5rem 0 1rem !important; scroll-margin-top: 1.5rem; padding-bottom: .5rem; border-bottom: 1px solid var(--wp--preset--color--line); }
.az-letter:first-of-type { margin-top: 0 !important; }
.terms-grid { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.terms-grid > * { margin: 0 !important; }
@media (max-width: 700px) { .terms-grid { grid-template-columns: minmax(0, 1fr); } }
.terms-grid .is-style-card h3 { font: 700 1.1875rem/1.3 var(--wp--preset--font-family--sans); margin: 0 0 .4rem; }
.terms-grid .is-style-card p { margin: 0; }

/* Council cards */
.council-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 900px) { .council-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .council-cards { grid-template-columns: minmax(0, 1fr); } }
.council-card { position: relative; margin: 0 !important; background: var(--wp--preset--color--raised); border: 1px solid var(--wp--preset--color--line); border-radius: 16px; padding: 1.25rem; display: grid; gap: .6rem; transition: border-color .15s ease; }
.council-card:hover { border-color: var(--wp--preset--color--ink-muted); }
.council-card h3 { font: 700 1.1875rem/1.3 var(--wp--preset--font-family--sans); margin: 0; }
.council-card h3 a { color: var(--wp--preset--color--ink); text-decoration: none; }
.council-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 16px; }
.council-card h3 a:hover { text-decoration: underline; }
.cc-num { margin: 0; font: 700 2rem/1 var(--wp--preset--font-family--display); color: var(--wp--preset--color--brook); }
.council-card.is-below .cc-num { color: var(--wp--preset--color--alert); }
.cc-num span { font: 400 1rem/1.4 var(--wp--preset--font-family--sans); color: var(--wp--preset--color--ink-muted); margin-left: .35rem; }
.cc-bar { position: relative; height: 10px; border-radius: 999px; background: var(--wp--preset--color--line); }
.cc-fill { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--wp--preset--color--brook); }
.council-card.is-below .cc-fill { background: var(--wp--preset--color--alert); }
.cc-eng { position: absolute; top: -4px; bottom: -4px; width: 3px; border-radius: 2px; background: var(--wp--preset--color--ink); }
.cc-meta { margin: 0; font-size: .9375rem; color: var(--wp--preset--color--ink-muted); }
.council-key { font-size: .9375rem; color: var(--wp--preset--color--ink-muted); }

/* Document pages (privacy, terms) */
.doc-layout .guide-main .wp-block-post-content > h2 { margin-top: 2.5rem; }
.doc-layout .guide-main .wp-block-post-content > h2:first-child { margin-top: 0; }
/* Keep section intros and CTA text on the left edge of the page grid inside full-width bands */
.is-layout-constrained > .sec-head, .is-layout-constrained > .cta-inner { margin-left: max(0px, calc((100% - 1160px) / 2)) !important; margin-right: auto !important; }
.is-style-ink-band h1, .is-style-ink-band h2, .is-style-ink-band h3 { color: var(--wp--preset--color--paper); }
@media (prefers-color-scheme: dark) { :root:not(.badger-force-light) .is-style-ink-band h2, :root:not(.badger-force-light) .is-style-ink-band h3 { color: var(--wp--preset--color--ink); } }
/* Footer arch rises out of whatever band ends the page */
body:has(.page-content > .is-style-soft-band:last-child) .wp-site-blocks > .wp-block-template-part:last-child { background: var(--wp--preset--color--bracken-soft); }
body:has(.page-content > .is-style-mist-band:last-child) .wp-site-blocks > .wp-block-template-part:last-child { background: var(--badger-mist); }
body:has(.page-content > .is-style-white-band:last-child) .wp-site-blocks > .wp-block-template-part:last-child { background: var(--wp--preset--color--raised); }
