/* Layout: one calm long-read home page; sticky slim header; content in a 72rem column,
   sections separated by space and hairlines, not boxes. Cards only for people and forms. */
:root {
  --paper: #f3f5f2;
  --surface: #ffffff;
  --ink: #17211d;
  --muted: #55625c;
  --line: #d9dfd9;
  --teal: #2d5a6b;
  --teal-ink: #1f4250;
  --pine: #b98d4c;
  --leaf: #029000; /* green from the Better Me tree logo */
  --sand-head: #9e773e; /* deeper sand for the hero line, readable on the light background */
  --pine-soft: #efe5d4;
  --btn-bg: #2d5a6b;
  --btn-fg: #ffffff;
  --alert: #8f2a2a;
  --alert-bg: #fbeceb;
  --ok: #2f6b45;
  --focus: #c08a3e;
  --font-display: "Petrona", "Iowan Old Style", Georgia, serif;
  --font-body: "Nunito Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: 2.15rem;
  --step-4: clamp(2.4rem, 5.2vw, 3.6rem);
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #111816; --surface: #18211e; --ink: #e6ebe8; --muted: #a2aea8; --line: #2b3632;
    --teal: #86b7c7; --teal-ink: #b4d5df; --pine: #d6b47c; --sand-head: #d6b47c; --leaf: #5fc94a; --pine-soft: #2a2418;
    --btn-bg: #86b7c7; --btn-fg: #0f1a1e; --alert: #f2a7a2; --alert-bg: #3a1f1d; --ok: #8fd0a4; --focus: #e2b26a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #111816; --surface: #18211e; --ink: #e6ebe8; --muted: #a2aea8; --line: #2b3632;
  --teal: #86b7c7; --teal-ink: #b4d5df; --pine: #d6b47c; --sand-head: #d6b47c; --leaf: #5fc94a; --pine-soft: #2a2418;
  --btn-bg: #86b7c7; --btn-fg: #0f1a1e; --alert: #f2a7a2; --alert-bg: #3a1f1d; --ok: #8fd0a4; --focus: #e2b26a;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-size: var(--step-0); line-height: 1.6;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--paper); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--teal-ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.15; text-wrap: balance; margin: 0; color: var(--ink); }
h1 { font-size: var(--step-4); letter-spacing: -0.01em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); font-weight: 600; }
p { margin: 0; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 16px; top: 16px; z-index: 50; background: var(--surface); padding: .5rem 1rem; }

.wrap {
  width: 100%; max-width: 72rem; margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.eyebrow { font-size: var(--step--1); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.lead { font-size: var(--step-1); color: var(--muted); max-width: 40rem; }
.prose { max-width: 40rem; display: grid; gap: 1rem; }
.muted { color: var(--muted); }
.small { font-size: var(--step--1); }

/* Header */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 1rem; padding-block: .65rem; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand img { width: 40px; height: 40px; }
.brand-name { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; line-height: 1; }
.brand-name small { display: block; font-family: var(--font-body); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-top: .25rem; }
.nav { display: flex; gap: 1.25rem; align-items: center; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav a:hover { color: var(--teal); }
.menu-btn { display: none; background: none; border: 1px solid var(--line); color: var(--ink); border-radius: 999px; padding: .45rem .9rem; font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; }
@media (max-width: 860px) {
  .menu-btn { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: .5rem 1rem; }
  .nav.open { display: flex; }
  .nav a { padding: .7rem 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: .75rem; text-align: center; border-bottom: 0; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .8rem 1.3rem; border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg) !important; text-decoration: none; font-weight: 700; border: 1px solid var(--btn-bg);
  font: inherit; font-weight: 700; cursor: pointer; line-height: 1.2; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--ink) !important; border-color: var(--line); }
.btn.ghost:hover { border-color: var(--teal); }
.btn.small { padding: .5rem 1rem; font-size: .9rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* Sections */
section { padding-block: clamp(3rem, 7vw, 5.5rem); }
section + section { border-top: 1px solid var(--line); }
.section-head { display: grid; gap: .75rem; margin-bottom: 2rem; max-width: 46rem; }

/* Hero */
.hero { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3rem, 6vw, 4.5rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.hero-copy { display: grid; gap: 1.25rem; min-width: 0; }
.hero h1 span { display: block; color: var(--sand-head); }
.hero h1 span:nth-child(2) { color: var(--teal); }
.hero h1 span:nth-child(3) { color: var(--leaf); }
.notice { border-left: 3px solid var(--pine); padding: .25rem 0 .25rem 1rem; color: var(--muted); max-width: 38rem; font-size: .98rem; }
.path { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; display: grid; gap: 1.1rem; min-width: 0; }
.path h2 { font-size: var(--step-1); font-weight: 600; }
.path ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; counter-reset: step; }
.path li { display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: .75rem; counter-increment: step; }
.path li::before { content: counter(step); width: 2rem; height: 2rem; border-radius: 50%; background: var(--pine-soft); color: var(--ink);
  display: grid; place-items: center; font-weight: 800; font-size: .9rem; }
.path li strong { display: block; }
.path li p { color: var(--muted); font-size: .95rem; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }

/* Doctor */
.doctor { display: grid; grid-template-columns: minmax(0, 18rem) minmax(0, 1fr); grid-template-areas: "photo text" "creds text"; column-gap: clamp(1.5rem, 4vw, 3.5rem); row-gap: 1rem; align-items: start; }
.doctor figure { margin: 0; grid-area: photo; }
.doctor .creds { grid-area: creds; }
.doctor .prose { grid-area: text; grid-row: 1 / span 2; }
.doctor figure img { border-radius: var(--radius); width: 100%; aspect-ratio: 340 / 321; object-fit: cover; }
.creds { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; font-size: .95rem; }
.creds li { padding: .4rem 0; border-bottom: 1px solid var(--line); }
.creds .reg { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--teal); }
.doctor .prose { max-width: 42rem; }
@media (max-width: 760px) {
  .doctor { grid-template-columns: 1fr; grid-template-areas: "photo" "text" "creds"; row-gap: 1.5rem; }
  .doctor .prose { grid-row: auto; }
  .doctor figure img { max-width: 20rem; }
}

/* Team */
.team { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
@media (max-width: 960px) { .team { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .team { grid-template-columns: 1fr; } }
.person { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: grid; grid-template-rows: auto 1fr; min-width: 0; }
.person img { width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; object-position: center 25%; }
.person-body { padding: 1.1rem 1.2rem 1.25rem; display: grid; gap: .5rem; align-content: start; }
.person .role { color: var(--teal); font-weight: 700; font-size: .92rem; }
.person .qual { color: var(--muted); font-size: .9rem; }
.person details { margin-top: .35rem; }
.person summary { cursor: pointer; font-weight: 700; color: var(--teal); font-size: .95rem; list-style: none; }
.person summary::-webkit-details-marker { display: none; }
.person summary::after { content: " +"; }
.person details[open] summary::after { content: " −"; }
.person details p { margin-top: .75rem; font-size: .96rem; }

/* Services */
.services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 3rem; }
@media (max-width: 760px) { .services { grid-template-columns: 1fr; } }
.service { padding-block: 1.25rem; border-top: 1px solid var(--line); display: grid; gap: .4rem; min-width: 0; }
.service p { color: var(--muted); }

/* Tools */
.tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
@media (max-width: 860px) { .tools { grid-template-columns: 1fr; } }
.tool { display: grid; gap: .6rem; align-content: start; padding: 1.4rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.tool:hover { border-color: var(--teal); color: var(--ink); }
.tool .meta { font-size: var(--step--1); color: var(--muted); font-weight: 700; letter-spacing: .04em; }
.tool p { color: var(--muted); font-size: .96rem; }
.tool .go { color: var(--teal); font-weight: 700; }
.subhead { margin: 2.5rem 0 1rem; font-size: var(--step-1); font-weight: 600; }
.links { display: grid; gap: 0; max-width: 46rem; }
.links a, .links div.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; padding: 1rem 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.links a:last-child { border-bottom: 1px solid var(--line); }
.links span.k { font-weight: 700; }
.links span.d { color: var(--muted); display: block; font-size: .95rem; }
.links span.arrow { color: var(--teal); font-weight: 800; align-self: center; }

/* Media */
.media-list { list-style: none; margin: 0; padding: 0; max-width: 46rem; }
.media-list li { border-top: 1px solid var(--line); }
.media-list li:last-child { border-bottom: 1px solid var(--line); }
.media-list a, .media-list .item-row { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 1rem; padding: 1rem 0; text-decoration: none; color: var(--ink); }
.media-list .when { color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.media-list .outlet { font-weight: 700; display: block; }
@media (max-width: 520px) { .media-list a, .media-list .item-row { grid-template-columns: 1fr; gap: .2rem; } }

/* Contact + booking */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-facts { display: grid; gap: 1.5rem; min-width: 0; }
.fact .label { font-size: var(--step--1); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.fact .value { font-size: var(--step-1); }
.fact address { font-style: normal; }
.map { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4 / 3; max-width: 100%; background: var(--surface); }
.map .map-fallback { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 1rem; color: var(--muted); font-size: .95rem; }
.map iframe { position: relative; width: 100%; height: 100%; border: 0; display: block; }

.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2rem); display: grid; gap: 1.1rem; min-width: 0; }
.field { display: grid; gap: .35rem; }
.field label, .field legend { font-weight: 700; font-size: .95rem; }
.field .hint { font-size: .85rem; color: var(--muted); font-weight: 400; }
input[type=text], input[type=tel], input[type=email], textarea, select {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: .7rem .8rem; }
textarea { min-height: 5rem; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 25%, transparent); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.choices { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .35rem; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span { display: inline-block; padding: .5rem .9rem; border: 1px solid var(--line); border-radius: 999px; font-size: .95rem; background: var(--paper); }
.choice input:checked + span { background: var(--teal); border-color: var(--teal); color: var(--btn-fg); }
.choice input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.check { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .6rem; align-items: start; font-size: .92rem; color: var(--muted); }
.check input { width: 1.15rem; height: 1.15rem; margin-top: .2rem; accent-color: var(--teal); }
.hp { position: absolute; left: -5000px; }
.status { font-weight: 700; padding: .75rem 1rem; border-radius: 10px; }
.status.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.status.err { background: var(--alert-bg); color: var(--alert); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 2.5rem; background: var(--surface); font-size: .95rem; }
.site-footer .wrap { display: grid; gap: 1.5rem; }
.footer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h3 { font-size: 1rem; font-family: var(--font-body); font-weight: 800; margin-bottom: .4rem; }
.footer-grid p, .footer-grid li { color: var(--muted); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.crisis-line { border-top: 1px solid var(--line); padding-top: 1.25rem; color: var(--muted); }
.crisis-line strong { color: var(--ink); }

/* Sub-page header band */
.page-head { padding-block: clamp(2.5rem, 6vw, 4rem) 1.5rem; display: grid; gap: 1rem; }
.crumbs { font-size: var(--step--1); color: var(--muted); }
.crumbs a { color: var(--muted); }

/* Marriage counselling */
.themes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 3rem; max-width: 60rem; }
@media (max-width: 760px) { .themes { grid-template-columns: 1fr; } }
.theme { border-top: 1px solid var(--line); padding-block: 1.25rem; display: grid; gap: .5rem; }
.theme .q { font-family: var(--font-display); font-style: italic; font-size: 1.12rem; color: var(--teal); }

/* Screener */
.screener { display: grid; gap: 1rem; max-width: 46rem; }
.instructions { font-weight: 700; font-size: var(--step-1); font-family: var(--font-display); }
.progress { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 4.2rem); z-index: 5; background: var(--paper); padding-block: .6rem; display: grid; gap: .35rem; }
.progress .bar { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress .bar i { display: block; height: 100%; width: 0; background: var(--teal); transition: width .25s ease; }
.progress .count { font-size: var(--step--1); color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; display: grid; gap: .8rem; }
.item legend { font-weight: 700; display: grid; grid-template-columns: 1.75rem minmax(0, 1fr); gap: .25rem; float: left; width: 100%; }
.item legend .n { color: var(--pine); font-variant-numeric: tabular-nums; }
.item .opts { clear: both; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
.item .opts.two { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 20rem; }
@media (max-width: 640px) { .item .opts { grid-template-columns: 1fr 1fr; } }
.opt { position: relative; display: block; }
.opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.opt span { display: grid; place-items: center; text-align: center; min-height: 3.2rem; padding: .5rem; border: 1px solid var(--line); border-radius: 10px; font-size: .92rem; line-height: 1.25; background: var(--paper); height: 100%; }
.opt input:checked + span { background: var(--teal); border-color: var(--teal); color: var(--btn-fg); font-weight: 700; }
.opt input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.item.missing { border-color: var(--alert); }
.result { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2rem); display: grid; gap: 1rem; }
.score { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1rem; }
.score .num { font-family: var(--font-display); font-size: 3.2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.score .of { color: var(--muted); }
.band { display: inline-block; padding: .3rem .8rem; border-radius: 999px; font-weight: 800; font-size: .9rem; background: var(--pine-soft); color: var(--ink); }
.scale { display: grid; gap: .25rem; font-size: .88rem; }
.scale-row { display: grid; grid-template-columns: 5rem minmax(0, 1fr); gap: .5rem; padding: .3rem .5rem; border-radius: 6px; color: var(--muted); font-variant-numeric: tabular-nums; }
.scale-row.on { background: var(--pine-soft); color: var(--ink); font-weight: 700; }
.safety { background: var(--alert-bg); color: var(--ink); border: 1px solid var(--alert); border-radius: var(--radius); padding: 1.1rem 1.2rem; display: grid; gap: .5rem; }
.safety h3 { color: var(--alert); font-family: var(--font-body); font-weight: 800; font-size: 1.05rem; }
.safety .nums { display: grid; gap: .3rem; font-weight: 700; }
.attrib { font-size: .82rem; color: var(--muted); max-width: 46rem; }

/* Adult ADHD screen (multi-step), scoped to #adhd */
#adhd { display: grid; gap: 1.25rem; max-width: 46rem; }
#adhd .pmeta { display: flex; justify-content: space-between; gap: .75rem; flex-wrap: wrap; font-size: var(--step--1); color: var(--muted); font-weight: 700; }
#adhd .rule { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; margin-top: .35rem; }
#adhd .rule > i { display: block; height: 100%; width: 0; background: var(--teal); transition: width .25s ease; }
#adhd #progress { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 4.2rem); z-index: 5; background: var(--paper); padding-block: .6rem; }
#adhd #stage { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.1rem, 3vw, 1.75rem); display: flex; flex-direction: column; gap: 1.1rem; }
#adhd #stage h2 { font-size: var(--step-2); }
#adhd fieldset { display: flex; flex-direction: column; gap: .6rem; }
#adhd fieldset + fieldset { border-top: 1px solid var(--line); padding-top: 1.1rem; }
#adhd legend { padding: 0; font-weight: 700; float: left; width: 100%; margin-bottom: .6rem; }
#adhd legend + * { clear: both; }
#adhd .aopts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .4rem; }
#adhd .aopts.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#adhd .aopts.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#adhd .aopts input, #adhd .chk input { position: absolute; opacity: 0; pointer-events: none; }
#adhd .aopts label { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 3rem; padding: .4rem; border: 1px solid var(--line); border-radius: 10px; font-size: .92rem; line-height: 1.25; cursor: pointer; background: var(--paper); overflow-wrap: anywhere; }
#adhd .aopts input:checked + label { background: var(--teal); border-color: var(--teal); color: var(--btn-fg); font-weight: 700; }
#adhd .aopts input:focus-visible + label, #adhd .chk input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (max-width: 560px) { #adhd .aopts, #adhd .aopts.four, #adhd .aopts.three { grid-template-columns: 1fr; } #adhd .aopts label { justify-content: flex-start; padding-inline: .9rem; } }
#adhd .chk { display: flex; }
#adhd .chk label { display: flex; gap: .75rem; align-items: flex-start; padding: .75rem .9rem; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; width: 100%; background: var(--paper); }
#adhd .chk label::before { content: ""; flex: none; width: 1.2rem; height: 1.2rem; margin-top: .15rem; border: 2px solid var(--muted); border-radius: 4px; }
#adhd .chk input:checked + label { border-color: var(--teal); background: color-mix(in srgb, var(--teal) 12%, var(--surface)); }
#adhd .chk input:checked + label::before { background: var(--teal); border-color: var(--teal); box-shadow: inset 0 0 0 3px var(--surface); }
#adhd .row2 { display: grid; grid-template-columns: 2fr 1fr; gap: .75rem; }
@media (max-width: 480px) { #adhd .row2 { grid-template-columns: 1fr; } }
#adhd input[type=number] { width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: .7rem .8rem; }
#adhd .step-nav { display: flex; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
#adhd button { font: inherit; font-weight: 700; border-radius: 999px; padding: .75rem 1.3rem; min-height: 2.9rem; cursor: pointer; border: 1px solid var(--btn-bg); background: var(--btn-bg); color: var(--btn-fg); }
#adhd button.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
#adhd .err { color: var(--alert); font-size: .92rem; min-height: 1.25rem; font-weight: 700; }
#adhd .note { border-radius: 10px; padding: .9rem 1rem; font-size: .96rem; color: var(--ink); }
#adhd .note.alert { background: var(--alert-bg); border: 1px solid var(--alert); }
#adhd .note.flag { background: var(--pine-soft); border: 1px solid var(--pine); }
#adhd .note.calm { background: color-mix(in srgb, var(--teal) 10%, var(--surface)); border: 1px solid var(--teal); }
#adhd .stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .6rem; }
#adhd .stat { border: 1px solid var(--line); border-radius: 10px; padding: .75rem; display: flex; flex-direction: column; gap: .15rem; }
#adhd .stat b { font-family: var(--font-display); font-size: 1.8rem; font-variant-numeric: tabular-nums; }
#adhd .stat span { font-size: .82rem; color: var(--muted); }
#adhd textarea.out { min-height: 14rem; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .82rem; line-height: 1.5; }
#adhd details { border: 1px solid var(--line); border-radius: 10px; padding: .75rem 1rem; background: var(--surface); }
#adhd summary { cursor: pointer; font-weight: 700; }
#adhd details ul { margin: .6rem 0 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .5rem; font-size: .9rem; }
.media-list .kind { display: block; margin-top: .15rem; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 800; color: var(--pine); }
@media (max-width: 520px) { .media-list .kind { display: inline; margin: 0 0 0 .6rem; } }
.pubs { list-style: none; margin: 0; padding: 0; max-width: 52rem; }
.pubs li { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 1rem; padding: .9rem 0; border-top: 1px solid var(--line); }
.pubs li:last-child { border-bottom: 1px solid var(--line); }
.pub-kind { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 800; color: var(--pine); padding-top: .2rem; }
.pub-text { overflow-wrap: anywhere; }
.pub-text strong { font-weight: 800; }
.pub-text a { white-space: nowrap; }
@media (max-width: 560px) { .pubs li { grid-template-columns: 1fr; gap: .2rem; } .pub-text a { white-space: normal; } }
.press-line { font-size: .95rem; color: var(--muted); border-left: 3px solid var(--pine); padding-left: .8rem; }

/* Masthead carousel: outlet names set in the site's own display face, scrolling slowly */
.mastheads { overflow: hidden; border-block: 1px solid var(--line); margin-bottom: 2.5rem; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.mast-belt { display: flex; width: max-content; animation: mast-scroll 32s linear infinite; }
.mastheads:hover .mast-belt, .mastheads:focus-within .mast-belt { animation-play-state: paused; }
.mast-track { display: flex; list-style: none; margin: 0; padding: 0; }
.mast-track li { flex: none; }
.mast-track a { display: block; padding: 1.4rem 2.25rem; font-family: var(--font-display); font-size: clamp(1.3rem, 2.6vw, 1.75rem); font-weight: 600; color: var(--muted); text-decoration: none; white-space: nowrap; letter-spacing: .01em; }
.mast-track a:hover { color: var(--teal); }
@keyframes mast-scroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .mast-belt { animation: none; width: auto; }
  .mast-track[aria-hidden="true"] { display: none; }
  .mast-track { flex-wrap: wrap; justify-content: center; }
  .mastheads { -webkit-mask-image: none; mask-image: none; }
}

/* Media rail: horizontally scrolling cards, no count or pagination shown */
.media-rail { position: relative; }
.media-cards { list-style: none; margin: 0; padding: .25rem 0 1rem; display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; overscroll-behavior-x: contain; }
.media-cards::-webkit-scrollbar { display: none; }
.media-cards > li { flex: 0 0 min(19rem, 82%); scroll-snap-align: start; display: flex; }
.mcard { display: flex; flex-direction: column; gap: .5rem; width: 100%; padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-decoration: none; min-height: 13rem; }
a.mcard:hover { border-color: var(--teal); color: var(--ink); }
.mcard .kind { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 800; color: var(--pine); }
.mcard .outlet { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; line-height: 1.2; }
.mcard .desc { color: var(--muted); font-size: .94rem; flex: 1; }
.mcard .go { color: var(--teal); font-weight: 700; font-size: .92rem; }
.rail-btn { position: absolute; top: calc(50% - 1.6rem); z-index: 2; width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 1.1rem; font-weight: 800; cursor: pointer; box-shadow: 0 2px 8px color-mix(in srgb, var(--ink) 12%, transparent); }
.rail-btn:hover { border-color: var(--teal); color: var(--teal); }
.rail-btn.prev { left: -.75rem; }
.rail-btn.next { right: -.75rem; }
.rail-btn[disabled] { opacity: 0; pointer-events: none; }
@media (max-width: 600px) { .rail-btn { display: none; } }
.mcard .ptitle { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; line-height: 1.25; }
.mcard .venue { font-size: .88rem; color: var(--muted); }
.mcard .desc strong { color: var(--ink); font-weight: 800; }
