/* ============================================================
   Мастер — Concept C · «Архитектура ответственности»
   Increment 2: semantic desktop composition.
   Golos Text only. Approved emblem. Spruce field, doorway
   aperture, lime actions, cream continuation, 1px hairlines.
   Preserves the proven hero/form/review runtime CSS contract.
   WCAG 2.2 AA intent.
   ============================================================ */

/* ---- Fonts (read-only reference to existing assets) ---- */
@font-face {
  font-family: "Golos Text";
  src: url("assets/fonts/golos-text-400-600-cyrillic.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Golos Text";
  src: url("assets/fonts/golos-text-400-600-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2212, U+2215, U+2192, U+2193;
}

/* ---- Tokens ---- */
:root {
  --bg: #f1eee4;
  --surface: #e7e3d6;
  --ink: #15180f;
  --muted: #4c5047;
  --spruce: #17211b;
  --spruce-ink: #eef0e6;
  --spruce-muted: #a6b4a6;
  --lime: #cbe93f;
  --lime-dark: #596900;
  --lime-ink: #14180a;
  --rule: #cdc9ba;
  --rule-dark: #35443a;
  --danger-dark: #ffb3a6;
  --danger-light: #8a0f06;

  --header-h: 78px;
  --maxw: 1360px;
  --pad: clamp(1.1rem, 4vw, 3rem);
  --edge: max(var(--pad), calc((100vw - var(--maxw)) / 2));

  --h1: clamp(2.75rem, 5.2vw, 4.8rem);
  --h2: clamp(2rem, 4.2vw, 3.4rem);
  --hero-title: clamp(2.6rem, 4.8vw, 4.6rem);
}

/* ---- Reset / base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  font-size: clamp(1rem, 0.95rem + 0.28vw, 1.1rem);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.02; letter-spacing: -0.03em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; }
button { font-family: inherit; }
/* Author display rules outrank the UA [hidden] rule, so hidden wizard steps
   and controls would still render. Enforce the hidden contract globally. */
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- Focus / skip ---- */
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
/* bright lime focus on dark-context surfaces (ink outline would be invisible there) */
.site-header :focus-visible,
.hero :focus-visible,
.apply :focus-visible,
.final :focus-visible,
.site-footer :focus-visible { outline-color: var(--lime); }
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 12px 18px;
  transition: top .18s ease;
}
.skip-link:focus { top: 12px; }
@media (prefers-reduced-motion: reduce) { .skip-link { transition: none; } }

/* section anchor offset under sticky header */
[id] { scroll-margin-top: calc(var(--header-h) + 8px); }

/* ---- Buttons (square) ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px;
  font-weight: 600; font-size: 1rem; letter-spacing: -0.01em;
  border: 2px solid transparent; border-radius: 0; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn--lg { min-height: 56px; padding: 0 30px; font-size: 1.06rem; }
.btn--sm { min-height: 44px; padding: 0 16px; font-size: .95rem; }
.btn--full { width: 100%; }
.btn--accent { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); }
.btn--accent:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn--line { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--bg); }
.btn:active { transform: translateY(1px); }
/* line button on the dark form card keeps a visible light edge */
.apply .btn--line { color: var(--spruce-ink); border-color: var(--spruce-muted); }
.apply .btn--line:hover { background: var(--spruce-ink); color: var(--spruce); border-color: var(--spruce-ink); }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn:active { transform: none; } }

/* ---- Context labels ---- */
.eyebrow {
  display: inline-block;
  font-size: .82rem; font-weight: 600; letter-spacing: .02em;
  color: var(--muted); margin-bottom: 1.1rem;
}

/* ============================================================
   Header — solid spruce plane, single dark hairline
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--spruce); color: var(--spruce-ink);
  border-bottom: 1px solid #0b0f0a;
}
.header__inner {
  min-height: var(--header-h);
  padding-inline: var(--edge);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { display: inline-flex; align-items: center; gap: .7rem; line-height: 1.08; min-width: 0; }
.brand__mark {
  flex: none; width: 48px; height: 48px; overflow: hidden; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--rule-dark);
}
.brand__mark img { width: 100%; height: 100%; object-fit: cover; }
.brand__text { display: flex; flex-direction: column; min-width: 0; }
.brand__name { font-weight: 600; font-size: 1.32rem; letter-spacing: -0.03em; color: var(--spruce-ink); }
.brand__tag { font-size: .7rem; color: var(--spruce-muted); letter-spacing: .01em; white-space: nowrap; }

.site-nav__list { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.2rem); }
.site-nav__list a:not(.btn) {
  font-size: .98rem; font-weight: 500; padding: 6px 0; border-bottom: 2px solid transparent;
  color: var(--spruce-ink);
}
.site-nav__list a:not(.btn):hover { border-color: var(--spruce-ink); }
.site-nav__list a.is-active { border-color: var(--lime); }
.site-nav__phone { white-space: nowrap; }

.nav-toggle {
  display: none; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px;
  background: transparent; border: 0; border-radius: 0;
  font: inherit; font-weight: 600; cursor: pointer; color: var(--spruce-ink);
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  content: ""; display: block; width: 18px; height: 2px; background: var(--spruce-ink); position: relative;
}
.nav-toggle__bars::before { position: absolute; top: -6px; }
.nav-toggle__bars::after { position: absolute; top: 6px; }

/* Compact mobile phone action — hidden on desktop (the desktop nav owns the phone);
   shown alongside the menu button ≤1024. 44×44 target, accessible Russian label. */
.header__phone {
  display: none; flex: none;
  min-width: 44px; min-height: 44px; align-items: center; justify-content: center;
  color: var(--spruce-ink); border: 0; border-radius: 0;
}
.header__phone .header__phone-icon { width: 20px; height: 20px; }
.header__phone:hover { background: var(--spruce-ink); color: var(--spruce); }

/* ============================================================
   HERO — deep-spruce architectural three-column portal
   ============================================================ */
.hero {
  background: var(--spruce); color: var(--spruce-ink);
  padding: clamp(2rem, 4.5vw, 3.5rem) var(--edge) clamp(2.5rem, 5vw, 4rem);
}
.hero__portal { position: relative; }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 1.2fr) minmax(0, 0.92fr);
  column-gap: clamp(1.5rem, 3.5vw, 3.5rem);
  align-items: start;
}

/* Left column — headline / narrative / body / CTA */
.hero__lead { display: flex; flex-direction: column; gap: 1.1rem; align-self: center; }
.hero__headline { position: relative; }
.hero__title {
  position: relative; z-index: 2;
  font-size: var(--hero-title); letter-spacing: -0.04em; color: var(--spruce-ink);
  max-width: 12ch;
}
/* currentTime-synced decorative narrative lines. They now overlay the scene itself
   (inside .hero__arch, over the naturally dark left area — never a boxed subtitle).
   The active line is set as a [data-caption] attribute on the portal by JS and
   cross-fades in. A restrained localized dark gradient under the lines keeps them
   AA-legible over brighter video frames. */
.hero__narrative {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; pointer-events: none;
  padding: clamp(1.4rem, 4vw, 3.2rem) var(--edge) clamp(1.6rem, 4vw, 3rem);
  min-height: 62%;
  display: flex; align-items: flex-end;
  background: linear-gradient(to top, rgba(11, 15, 10, .68) 0%, rgba(11, 15, 10, .34) 42%, rgba(11, 15, 10, 0) 100%);
  opacity: 0; transition: opacity .3s ease;
}
/* The gradient only appears once a caption is active (i.e. while the scene plays). */
.hero__portal[data-caption="1"] .hero__narrative,
.hero__portal[data-caption="2"] .hero__narrative,
.hero__portal[data-caption="3"] .hero__narrative { opacity: 1; }
.hero__line {
  position: absolute; left: var(--edge); bottom: clamp(1.6rem, 4vw, 3rem); margin: 0;
  max-width: min(16ch, 78%);
  font-size: clamp(2rem, 4.4vw, 4rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1.02;
  color: var(--spruce-ink); opacity: 0; transition: opacity .45s ease;
  text-shadow: 0 1px 4px rgba(11, 15, 10, .6);
}
.hero__line[data-caption="3"] {
  font-size: clamp(1.55rem, 3.2vw, 2.5rem); max-width: min(26ch, 86%); line-height: 1.08;
}
.hero__portal[data-caption="1"] .hero__line[data-caption="1"],
.hero__portal[data-caption="2"] .hero__line[data-caption="2"],
.hero__portal[data-caption="3"] .hero__line[data-caption="3"] { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .hero__line, .hero__narrative { transition: none; }
}

/* Cinematic story: withhold only the large H1 until the film ends (bootstrap/JS-driven).
   H1 stays in the semantic DOM and accessibility tree the whole time. */
html.story-h1-hidden .hero__title { opacity: 0 !important; animation: none !important; }
html.story-h1-reveal .hero__title { animation: hero-in .6s ease-out forwards !important; }

.hero__lead-line {
  font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em;
  padding-left: 1rem; border-left: 1px solid var(--lime);
}
.hero__body { color: var(--spruce-muted); font-size: 1.02rem; max-width: 34ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0; margin-top: .4rem; }

/* Center column — architectural doorway aperture (finished state: materially wider) */
.hero__aperture { position: relative; display: flex; flex-direction: column; align-items: center; }
.hero__arch {
  position: relative; width: 100%; max-width: 500px;
  aspect-ratio: 3 / 4.4;
  border-radius: 0; /* rectangular doorway aperture — no arch/oval/curved mask */
  overflow: hidden;
  background: #0b0f0a url("assets/doorway-poster-runtime.webp") center / cover no-repeat;
}
.hero__video {
  display: none; pointer-events: none;
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.hero__portal[data-video-enabled] .hero__video { display: block; }

/* ============================================================
   Cinematic playing/pending state — driven by html.story-h1-hidden
   (set pre-paint on eligible loads, removed on finish, re-added on replay).
   The scene becomes the only visual subject: edge-to-edge 16:9 with the timed
   narrative overlaid. Supporting copy + ledger are moved out of visual flow but
   kept in the accessibility tree (clip technique, never display:none), so the
   scene reads full-width with no empty bands and no semantic loss.
   ============================================================ */
/* Restrained vertical breathing space around the scene (spruce field only — no card,
   frame, shadow or border); the scene is slightly inset and centred in the viewport. */
html.story-h1-hidden .hero { padding: clamp(.75rem, 1.5vw, 1.25rem) 0; }
html.story-h1-hidden .hero__grid { display: block; }
html.story-h1-hidden .hero__lead,
html.story-h1-hidden .hero__ledger {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: normal;
  pointer-events: none; gap: 0;
}
html.story-h1-hidden .hero__aperture { align-items: center; }
html.story-h1-hidden .hero__arch {
  max-width: none; width: min(92vw, 1320px); aspect-ratio: 16 / 9; border-radius: 0;
}
/* Replay stays hidden while playing (JS keeps [hidden]); gentle reveal of the
   finished informational blocks avoids a hard flash on finish. */
html.story-h1-reveal .hero__lead-line,
html.story-h1-reveal .hero__body,
html.story-h1-reveal .hero__actions,
html.story-h1-reveal .hero__ledger { animation: hero-in .5s ease-out .05s backwards; }
@media (prefers-reduced-motion: reduce) {
  html.story-h1-reveal .hero__lead-line,
  html.story-h1-reveal .hero__body,
  html.story-h1-reveal .hero__actions,
  html.story-h1-reveal .hero__ledger { animation: none; }
}

/* Accessible replay control — real button, keyboard reachable, under the aperture. */
.hero__replay {
  margin-top: 1rem;
  display: inline-flex; align-items: center; gap: .4rem;
  font: inherit; font-size: .9rem; font-weight: 600; line-height: 1;
  color: var(--ink);
  background: var(--bg);
  border: 2px solid var(--ink); border-radius: 0;
  padding: .55rem .95rem; cursor: pointer;
  transition: background .18s ease, color .18s ease, transform .12s ease;
}
.hero__replay[hidden] { display: none; }
.hero__replay:hover { background: var(--ink); color: var(--bg); }
.hero__replay:active { transform: translateY(1px); }
.hero__replay:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }
.hero__replay-icon { font-size: 1.05em; }

/* Right column — static responsibility ledger */
.hero__ledger { align-self: center; }
.ledger__title {
  font-size: 1.1rem; font-weight: 600; color: var(--spruce-ink);
  letter-spacing: -0.01em; margin-bottom: .4rem;
}
.ledger { display: block; }
.ledger__row {
  padding: clamp(1rem, 1.8vw, 1.6rem) 0;
  border-top: 1px solid var(--rule-dark);
}
.ledger__row:first-of-type { border-top: 0; }
.ledger__num {
  display: block;
  font-size: clamp(1.8rem, 2.6vw, 2.4rem); font-weight: 600; color: var(--spruce-ink);
  letter-spacing: .01em; font-variant-numeric: tabular-nums; line-height: 1;
  margin-bottom: .5rem;
}
.ledger__name { font-size: 1.15rem; font-weight: 600; color: var(--spruce-ink); }
.ledger__desc { margin-top: .3rem; color: var(--spruce-muted); font-size: .95rem; }

/* ============================================================
   PROCESS — editorial four-part sequence (cream)
   ============================================================ */
.process { padding: clamp(3.5rem, 7vw, 6rem) var(--edge); border-top: 1px solid var(--ink); }
.process__head { margin-bottom: clamp(2rem, 4vw, 3rem); }
.process__title { font-size: var(--h2); }
/* Four broad sequential rows with justified 01–04 numerals and 1px rules. */
.process__list { display: block; border-top: 1px solid var(--ink); }
.process__row {
  display: grid; grid-template-columns: minmax(3rem, 6rem) 1fr minmax(2rem, 3rem);
  gap: clamp(1rem, 3vw, 3rem); align-items: baseline;
  padding: clamp(1.6rem, 3vw, 2.6rem) 0; border-bottom: 1px solid var(--rule);
}
.process__row:last-child { border-bottom: 0; }
.process__num {
  font-size: clamp(1.1rem, 1.6vw, 1.4rem); font-weight: 600; color: var(--lime-dark);
  letter-spacing: .02em; font-variant-numeric: tabular-nums;
  position: relative; padding-bottom: .4rem; display: inline-block;
}
.process__row-body { max-width: 62ch; }
.process__list h3 { font-size: clamp(1.4rem, 2.4vw, 2rem); }
.process__list p { margin-top: .5rem; color: var(--muted); }
.process__arrow { color: var(--muted); font-size: 1.3rem; justify-self: end; align-self: center; }
/* Align the note with the process body column (empty leading cell mirrors the numeral). */
.process__note {
  margin-top: clamp(1.5rem, 3vw, 2.5rem); color: var(--muted); font-size: 1rem;
  padding-top: 1.2rem; border-top: 1px solid var(--rule);
  display: grid; grid-template-columns: minmax(3rem, 6rem) 1fr; gap: clamp(1rem, 3vw, 3rem);
}
.process__note::before { content: ""; }

/* ============================================================
   CARE PLAN — static ruled categories (cream)
   ============================================================ */
.care-plan { padding: clamp(3rem, 6vw, 5rem) var(--edge); border-top: 1px solid var(--ink); }
.care-plan__head { margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.care-plan__title { font-size: var(--h2); }
.care-plan__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(3, auto);
  grid-auto-flow: column;
  column-gap: clamp(1.5rem, 4vw, 4rem);
  border-top: 1px solid var(--ink);
}
.care-plan__row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: clamp(1.1rem, 2.2vw, 1.6rem) 0;
  border-bottom: 1px solid var(--rule);
}
.care-plan__name { font-size: clamp(1.1rem, 1.8vw, 1.4rem); font-weight: 600; letter-spacing: -0.01em; }
.care-plan__mark { color: var(--muted); font-size: 1.2rem; }

/* ============================================================
   APPLY — dark form section, 4-step wizard
   ============================================================ */
.apply {
  background: var(--spruce); color: var(--spruce-ink);
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--edge);
  border-top: 1px solid var(--ink);
}
.apply__inner { max-width: var(--maxw); margin: 0 auto; }
.apply .eyebrow { color: var(--spruce-muted); }
.apply__title { font-size: var(--h2); margin-bottom: .8rem; }
.apply__intro { color: var(--spruce-muted); font-size: 1.05rem; max-width: 40rem; }

/* Two-column composition: explanation + step rail (left), active fields (right). */
.wizard { display: grid; grid-template-columns: 1fr; gap: 1.6rem; width: 100%; }
@media (min-width: 1024px) {
  .wizard { grid-template-columns: 5fr 7fr; gap: clamp(2rem, 4vw, 4.5rem); align-items: start; }
  .apply__aside { position: sticky; top: calc(var(--header-h) + 1.5rem); }
}
.apply__aside { display: flex; flex-direction: column; gap: 1rem; }

/* Named vertical step rail. JS toggles .is-done / [aria-current="step"] on each li. */
.wizard__steps { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--rule-dark); }
.wizard__step {
  display: flex; align-items: center; gap: .8rem;
  padding: .85rem 0; border-bottom: 1px solid var(--rule-dark);
  color: var(--spruce-muted); font-weight: 500;
}
.wizard__step::before {
  content: ""; flex: none; width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid var(--rule-dark); background: transparent;
}
.wizard__step.is-done { color: var(--spruce-ink); }
.wizard__step.is-done::before { background: var(--spruce-muted); border-color: var(--spruce-muted); }
.wizard__step[aria-current="step"] { color: var(--lime); font-weight: 600; }
.wizard__step[aria-current="step"]::before { background: var(--lime); border-color: var(--lime); }

.wizard__panel { display: flex; flex-direction: column; gap: 1.4rem; min-width: 0; }
.wizard__count { font-size: .82rem; font-weight: 600; letter-spacing: .02em; color: var(--lime); }

.step { display: flex; flex-direction: column; gap: 1.1rem; }
.step__title {
  display: block; width: 100%;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem); font-weight: 600; letter-spacing: -0.02em;
}

.wizard__nav { display: flex; gap: .8rem; margin-top: .2rem; }
.wizard__nav .btn { flex: 1; }

/* ---- Fields (dark card context) ---- */
.form__summary { border: 2px solid var(--danger-dark); background: rgba(255,179,166,.1); padding: 1rem 1.1rem; }
.form__summary-title { font-weight: 600; margin-bottom: .4rem; color: var(--spruce-ink); }
.form__summary ul { list-style: disc; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .2rem; }
.form__summary a { text-decoration: underline; color: var(--danger-dark); }

.field-row { display: flex; flex-direction: column; gap: .5rem; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field-label { font-weight: 600; font-size: .95rem; color: var(--spruce-ink); }
.req { color: var(--lime); margin-left: 3px; }
.field-hint { font-size: .85rem; color: var(--spruce-muted); }
.field-error { font-size: .9rem; color: var(--danger-dark); font-weight: 500; }

.input {
  width: 100%; min-height: 48px; padding: .55rem 0;
  font: inherit; color: var(--spruce-ink); background: transparent;
  border: 0; border-bottom: 2px solid var(--rule-dark); border-radius: 0;
}
.input::placeholder { color: color-mix(in srgb, var(--spruce-muted) 85%, transparent); }
textarea.input { min-height: 90px; resize: vertical; }
select.input { color: var(--spruce-ink); }
select.input option { color: #14170f; background: #fff; }
.input:hover { border-bottom-color: var(--spruce-muted); }
.input:focus-visible { outline: none; border-bottom-color: var(--lime); border-bottom-width: 3px; }
.input[aria-invalid="true"] { border-bottom-color: var(--danger-dark); }

/* radio / checkbox choices */
.choice { display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; }
.choice__opt { display: inline-flex; align-items: center; gap: .5rem; font-weight: 500; }
.field-row--check .check { display: flex; align-items: flex-start; gap: .6rem; font-size: .92rem; color: var(--spruce-ink); }
input[type="radio"], input[type="checkbox"] { accent-color: var(--lime); width: 18px; height: 18px; flex: none; }

/* ---- Visit-day selector (Step 2) ----
   Compact seven-column selector on wide screens; wraps cleanly at 390/320 while
   keeping ≥44px targets. Square boxes only (no cards/pills/icons/gradients). */
.daypick__shortcuts { display: flex; flex-wrap: wrap; gap: .5rem; }
.daypick__shortcut {
  min-height: 44px; padding: 0 .95rem;
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-weight: 600; font-size: .9rem; letter-spacing: -0.01em;
  color: var(--spruce-ink); background: transparent;
  border: 2px solid var(--spruce-muted); border-radius: 0; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.daypick__shortcut:hover { border-color: var(--spruce-ink); }
.daypick__shortcut[aria-pressed="true"] {
  background: var(--lime); border-color: var(--lime); color: var(--lime-ink);
}
.daypick__shortcut:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }

.daypick {
  display: grid;
  grid-template-columns: repeat(7, minmax(44px, 1fr));
  gap: .4rem;
}
.daypick__day { margin: 0; display: block; }
/* Native checkbox stays in the DOM/AT tree and focusable, visually replaced by its box. */
.daypick__day input {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.daypick__box {
  display: flex; align-items: center; justify-content: center;
  min-height: 44px; padding: .35rem;
  font-weight: 600; font-size: .95rem; color: var(--spruce-ink);
  background: transparent; border: 2px solid var(--rule-dark); border-radius: 0;
  cursor: pointer; user-select: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.daypick__day:hover .daypick__box { border-color: var(--spruce-muted); }
.daypick__day input:checked + .daypick__box {
  background: var(--lime); border-color: var(--lime); color: var(--lime-ink);
}
.daypick__day input:focus-visible + .daypick__box {
  outline: 2px solid var(--lime); outline-offset: 2px;
}
/* Below 420px the seven boxes wrap to multiple rows, each still ≥44px wide. */
@media (max-width: 420px) {
  .daypick { grid-template-columns: repeat(auto-fit, minmax(44px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .daypick__shortcut, .daypick__box { transition: none; }
}
@media (hover: none), (pointer: coarse) {
  .daypick__shortcut:hover { border-color: var(--spruce-muted); }
  .daypick__day:hover .daypick__box { border-color: var(--rule-dark); }
}

/* ---- DaData combobox ---- */
.combo { position: relative; }
.combo__list {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 30; margin-top: 2px;
  background: var(--bg); color: var(--ink); border: 2px solid var(--ink);
  max-height: 240px; overflow-y: auto;
}
.combo__opt { padding: .55rem .7rem; cursor: pointer; border-bottom: 1px solid var(--rule); }
.combo__opt:last-child { border-bottom: 0; }
.combo__opt.is-active, .combo__opt:hover { background: var(--lime); color: var(--lime-ink); }

.apply__proto { font-size: .9rem; color: var(--spruce-muted); padding-top: 1rem; border-top: 1px solid var(--rule-dark); }
.form__status { font-weight: 600; min-height: 1.2em; }
.form__status.is-ok { color: var(--lime); }

/* ============================================================
   REVIEWS — one dominant quote (cream), no source label
   ============================================================ */
.reviews { padding: clamp(3.5rem, 7vw, 6rem) var(--edge); background: var(--surface); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.reviews__head { margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.reviews__title { font-size: var(--h2); }
/* Un-enhanced (no-JS) reading state: all three quotes remain visible and readable. */
.reviews__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(1.6rem, 3.2vw, 3rem) clamp(1rem, 2vw, 1.6rem); align-items: start; }
.review {
  margin: 0; background: transparent; border: 0; border-top: 1px solid var(--ink);
  padding: 1rem 0 0; display: flex; flex-direction: column; gap: .6rem;
}
.review--a { grid-column: 1 / 8; }
.review--b { grid-column: 8 / 13; align-self: end; }
.review--c { grid-column: 4 / 11; }
.review__quote { margin: 0; font-size: clamp(1.3rem, 2.2vw, 1.8rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.review--a .review__quote { font-size: clamp(2rem, 4.4vw, 3.4rem); line-height: 1.03; }

/* Carousel controls — inert/hidden until enhanced. Once shown, they frame the
   quote: previous at the left edge, next at the right edge, counter centred. */
.reviews__controls {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin-top: clamp(1rem, 2vw, 1.6rem);
}
.reviews__ctrl {
  min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg); border: 1px solid var(--ink); border-radius: 0; cursor: pointer; font: inherit; font-size: 1.1rem; color: var(--ink);
}
.reviews__ctrl:hover { background: var(--ink); color: var(--bg); }
.reviews__live { font-size: .9rem; font-weight: 600; color: var(--muted); text-align: center; }

/* ============================================================
   FINAL CTA — full-bleed spruce, poster crop
   ============================================================ */
.final { background: var(--spruce); color: var(--spruce-ink); padding: clamp(3.5rem, 7vw, 6rem) var(--edge); }
.final__inner { max-width: var(--maxw); margin: 0 auto; display: flex; flex-direction: column; gap: 1.6rem; }
.final__copy { display: flex; flex-direction: column; align-items: flex-start; gap: 1.4rem; max-width: 34rem; }
.final__title { font-size: var(--h2); }
.final__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; }
.final__phone { font-size: 1.2rem; font-weight: 600; color: var(--spruce-ink); white-space: nowrap; }
.final__phone:hover { color: var(--lime); }
.final__visual {
  align-self: stretch; min-height: clamp(200px, 26vw, 340px);
  background: #0b0f0a url("assets/final-memory-wall.jpg") center / cover no-repeat;
  border: 1px solid var(--rule-dark);
}
@media (min-width: 1024px) {
  .final__inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 4vw, 4rem); align-items: center; }
}

/* ============================================================
   Footer — dark, identity + navigation + phone
   ============================================================ */
.site-footer { background: var(--ink); color: var(--spruce-muted); padding: clamp(2rem, 4vw, 3rem) var(--edge); }
.footer__inner {
  display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 1.4rem 2rem; align-items: start;
}
.footer__brand-block { display: flex; align-items: center; gap: .8rem; }
.footer__mark { flex: none; width: 42px; height: 42px; overflow: hidden; border-radius: 50%; border: 1px solid var(--rule-dark); }
.footer__mark img { width: 100%; height: 100%; object-fit: cover; }
.footer__id { display: flex; flex-direction: column; }
.footer__brand { color: #fff; font-weight: 600; font-size: 1.05rem; }
.footer__meta { font-size: .95rem; }
.footer__nav ul { display: flex; flex-direction: column; gap: .5rem; }
.footer__nav a { font-size: .95rem; border-bottom: 1px solid transparent; padding-bottom: 2px; }
.footer__nav a:hover { color: #fff; border-bottom-color: var(--rule-dark); }
/* Standalone control, not an inline prose link: holds the 44px minimum target. */
.footer__phone {
  display: inline-flex; align-items: center; min-height: 44px;
  color: #fff; font-weight: 600; font-size: 1.25rem; white-space: nowrap; justify-self: end;
}
.footer__phone:hover { color: var(--lime); }
/* Opening hours belong beside every phone action (PRODUCT.md): a phone CTA
   without them is an implicit availability promise. Stacked so the control
   keeps its 44px target and the footer grid column keeps its width. */
.footer__call { display: flex; flex-direction: column; align-items: flex-end; gap: .1rem; justify-self: end; }
.footer__hours { font-size: .85rem; color: var(--spruce-muted); white-space: nowrap; }

/* ============================================================
   Responsive
   ============================================================ */
/* Header switches to the mobile menu pattern below 1024px so nav + CTA never wrap. */
@media (max-width: 1024px) {
  .nav-toggle { display: inline-flex; }
  .header__phone { display: inline-flex; }
  .header__inner { gap: .6rem; }
  .site-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--bg); color: var(--ink); border-bottom: 1px solid var(--ink);
    padding: 0 var(--edge); max-height: 0; overflow: hidden; /* instant open/close */
    visibility: hidden;
  }
  .site-nav.is-open { max-height: 70vh; visibility: visible; }
  .site-nav__list { flex-direction: column; align-items: stretch; gap: 0; padding-block: .5rem; }
  .site-nav__list li { border-top: 1px solid var(--rule); }
  .site-nav__list li:first-child { border-top: none; }
  .site-nav__list a:not(.btn) { display: block; padding: 14px 0; color: var(--ink); }
  .site-nav__list a:not(.btn):hover { border-color: var(--ink); }
  .site-nav__list .btn { width: 100%; margin: .6rem 0; }
  /* Menu drops onto the cream plane, so the hours line inverts with it. */
  .site-nav__hours { color: var(--muted); }
}

/* Tablet (761–1024): lead + rectangular doorway in two columns; the responsibility
   ledger drops below as a three-column ruled row so the H1 never collides with the scene. */
@media (min-width: 761px) and (max-width: 1024px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(220px, 0.8fr);
    column-gap: clamp(1.5rem, 3.5vw, 3rem); row-gap: clamp(1.8rem, 3.5vw, 2.6rem);
    align-items: start;
  }
  .hero__lead { align-self: center; }
  .hero__title, .hero__line { max-width: 14ch; }
  .hero__arch { max-width: 300px; }
  .hero__ledger {
    grid-column: 1 / -1; align-self: stretch;
    border-top: 1px solid var(--rule-dark); padding-top: clamp(1.2rem, 2.5vw, 2rem);
  }
  .hero__ledger .ledger {
    display: grid; grid-template-columns: repeat(3, 1fr); column-gap: clamp(1.2rem, 3vw, 2.6rem);
  }
  .hero__ledger .ledger__row { border-top: 0; padding: 0; padding-left: clamp(1rem, 2vw, 1.6rem); border-left: 1px solid var(--rule-dark); }
  .hero__ledger .ledger__row:first-of-type { padding-left: 0; border-left: 0; }
}

/* Mobile (≤760): approved single column — H1/narrative, body, CTA, scene, ledger.
   The 16:9 source scene becomes a wide cinematic frame at full width (no border radius). */
@media (max-width: 760px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); row-gap: clamp(1.6rem, 5vw, 2.6rem); }
  .hero__title, .hero__line { max-width: none; }
  .hero__line[data-caption="3"] { max-width: none; }
  .hero__aperture { align-items: stretch; }
  .hero__arch { max-width: none; width: 100%; aspect-ratio: 16 / 9; border-radius: 0; }
  /* Playing/pending scene on mobile: 12px side margins, centred, 16:9. */
  html.story-h1-hidden .hero__arch { width: calc(100vw - 24px); }
  .hero__replay { align-self: center; }
  .hero__ledger { align-self: stretch; }
  .hero__actions { display: block; }
  .hero__actions .btn { width: 100%; }
}

@media (max-width: 760px) {
  /* Process: numeral + body only; arrows removed so copy keeps a comfortable measure. */
  .process__row { grid-template-columns: minmax(2.2rem, 2.8rem) 1fr; gap: .9rem; }
  .process__arrow { display: none; }
  .process__list h3 { font-size: clamp(1.25rem, 5vw, 1.6rem); }
  .process__list p { font-size: 1rem; }
  .process__note { grid-template-columns: minmax(2.2rem, 2.8rem) 1fr; gap: .9rem; }

  /* Care-plan: single-column, static, non-interactive rows. */
  .care-plan__grid { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-flow: row; }

  /* Wizard: compact four-segment progress from the semantic <ol>. Step names stay in
     the DOM/AT tree (visually hidden); the visible "Шаг N из 4" count is the text cue. */
  .wizard { gap: 1.2rem; }
  .wizard__steps { flex-direction: row; gap: .4rem; border-top: 0; }
  .wizard__step {
    flex: 1; display: block; height: 6px; padding: 0; gap: 0;
    background: var(--rule-dark); border-bottom: 0; color: inherit; font-weight: 400;
  }
  .wizard__step::before { content: none; }
  .wizard__step.is-done { background: var(--spruce-muted); }
  .wizard__step[aria-current="step"] { background: var(--lime); }
  .wizard__step-name {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }

  /* Reviews: non-enhanced (no-JS) stack; enhanced carousel stays centred with
     edge arrows (handled by the [data-enhanced] rules). */
  .reviews__viewport:not([data-enhanced]) .reviews__grid { display: block; }
  .reviews__viewport:not([data-enhanced]) .review { grid-column: auto; margin-bottom: 1.6rem; }
  .reviews__viewport:not([data-enhanced]) .review:last-child { margin-bottom: 0; }

  /* Closing CTA: a true single-column closing scene (no text/photo split). */
  .final__inner { display: flex; flex-direction: column; }
  .final__copy { align-items: center; text-align: center; max-width: none; }
  .final__actions { flex-direction: column; align-items: stretch; width: 100%; gap: 1rem; }
  .final__actions .btn { width: 100%; }
  .final__phone { align-self: center; }
  .final__visual { min-height: clamp(180px, 52vw, 260px); }

  /* Footer: considered two-column information layout that collapses cleanly. */
  .footer__inner { grid-template-columns: 1fr 1fr; gap: 1.2rem 1.5rem; }
  .footer__brand-block { grid-column: 1 / -1; }
  .footer__nav { grid-column: 1; }
  .footer__phone { grid-column: 2; justify-self: end; align-self: start; }
}

@media (max-width: 560px) {
  .brand__mark { width: 44px; height: 44px; }
  .brand__name { font-size: 1.2rem; }
  .brand__tag { display: none; } /* keep brand + phone + menu clear of overlap */
  .field-grid { grid-template-columns: 1fr; }
  /* Long word «Профессиональная» must not overflow at 320; slightly smaller min. */
  .hero__title { font-size: clamp(1.75rem, 8.4vw, 2.5rem); line-height: 1.08; }
  .hero__line { font-size: clamp(1.75rem, 8.4vw, 2.5rem); line-height: 1.08; }
  .hero__line[data-caption="3"] { font-size: clamp(1.35rem, 6vw, 1.75rem); line-height: 1.1; }
}

@media (max-width: 420px) {
  .hero__actions .btn { width: 100%; }
  .wizard__nav { flex-direction: column; }
}

/* Footer keeps its considered two-column/two-row layout down through 390px and
   collapses to a single column only at 320px-class widths. */
@media (max-width: 340px) {
  .footer__inner { grid-template-columns: 1fr; }
  .footer__nav, .footer__phone { grid-column: 1; justify-self: start; }
}

/* ============================================================
   Motion — staged hero entrance (compositor-safe only)
   ============================================================ */
.hero__title, .hero__lead-line, .hero__body, .hero__actions {
  opacity: 0; transform: translateY(10px);
}
.hero.is-ready .hero__title { animation: hero-in .5s ease-out .05s forwards; }
.hero.is-ready .hero__lead-line { animation: hero-in .5s ease-out .22s forwards; }
.hero.is-ready .hero__body { animation: hero-in .5s ease-out .34s forwards; }
.hero.is-ready .hero__actions { animation: hero-in .5s ease-out .46s forwards; }

/* The category line now sits above the H1, so it reveals first and the title
   follows. Same treatment and same keyframes — only the order changes. */
.hero.is-ready .hero__category { animation: hero-in .5s ease-out .05s forwards; }
.hero.is-ready .hero__title { animation-delay: .18s; }
/* The support line is a full sentence, not the old three-word lead. */
.hero__body--support { max-width: 46ch; }
@keyframes hero-in { to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  .hero__title, .hero__lead-line, .hero__body, .hero__actions {
    opacity: 1; transform: none; animation: none !important;
  }
  html.story-h1-hidden .hero__title,
  html.story-h1-reveal .hero__title { opacity: 1 !important; animation: none !important; }
  .hero__replay { transition: none; }
  .hero__replay:active { transform: none; }
}
/* no-JS fallback: content must be visible without .is-ready ever being toggled */
.hero:not(.is-ready) .hero__title,
.hero:not(.is-ready) .hero__lead-line,
.hero:not(.is-ready) .hero__body,
.hero:not(.is-ready) .hero__actions {
  animation: hero-in-fallback 0s .01s forwards;
}
@keyframes hero-in-fallback { to { opacity: 1; transform: none; } }

/* ============================================================
   ENHANCED INTERACTIONS (increment 3, driven by premium.js)
   Progressive enhancement only: without JS these states never
   activate, so the no-JS composition above stands unchanged.
   ============================================================ */

/* Reviews carousel — one dominant quote, visually centred in a compact editorial
   frame. Non-active quotes stay in the DOM and AT reading order (opacity only). */
.reviews__viewport[data-enhanced] {
  border-top: 1px solid var(--ink);
  padding-top: clamp(1.6rem, 3vw, 2.4rem);
}
.reviews__viewport[data-enhanced] .reviews__grid {
  display: block; position: relative; min-height: clamp(3.5rem, 7vw, 5.5rem);
}
.reviews__viewport[data-enhanced] .review {
  position: absolute; inset: 0; grid-column: auto; margin: 0; padding: 0;
  display: flex; align-items: center; justify-content: center; text-align: center;
  border-top: 0;
  opacity: 0; pointer-events: none; transition: opacity .4s ease;
}
.reviews__viewport[data-enhanced] .review.is-active {
  position: relative; opacity: 1; pointer-events: auto;
}
.reviews__viewport[data-enhanced] .review__quote { font-size: clamp(1.9rem, 4.6vw, 3.2rem); line-height: 1.05; max-width: 22ch; }

/* Process scroll-progress cue: a lime underline grows beneath each numeral
   as its row enters view (line/number state, not a generic fade-up). */
.process__num::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px;
  background: var(--lime); transform: scaleX(0); transform-origin: left; transition: transform .5s ease;
}
.process__row.is-in .process__num::after { transform: scaleX(1); }

/* Wizard active-panel response, observed from the existing form state. */
.step.premium-enter { animation: premium-panel-in .28s ease-out; }
@keyframes premium-panel-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .reviews__viewport[data-enhanced] .review { transition: none; }
  .process__num::after { transition: none; }
  .step.premium-enter { animation: none; }
}

/* Touch / coarse-pointer devices: neutralize the color-inverting :hover states so a
   tap does not leave a control stuck in its inverted appearance. */
@media (hover: none), (pointer: coarse) {
  .btn--accent:hover { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); }
  .btn--line:hover { background: transparent; color: var(--ink); border-color: var(--ink); }
  .apply .btn--line:hover { background: transparent; color: var(--spruce-ink); border-color: var(--spruce-muted); }
  .site-nav__list a:not(.btn):hover { border-color: transparent; }
  .hero__replay:hover { background: var(--bg); color: var(--ink); }
  .reviews__ctrl:hover { background: var(--bg); color: var(--ink); }
  .combo__opt:hover { background: var(--bg); color: var(--ink); }
  .header__phone:hover { background: transparent; color: var(--spruce-ink); border-color: var(--spruce-ink); }
}

/* ============================================================
   Evidence-led content expansion · 2026-08-07
   The approved visual system is preserved: editorial rows,
   hairlines and dark planes replace generic card grids.
   ============================================================ */
/* Phone-first CTA: the button carries an action label and the dialable number
   on two lines, so the number is visible and selectable on desktop where
   `tel:` activation does nothing. */
.btn__label { font-weight: 600; }
.btn__phone { font-size: .92em; font-weight: 500; white-space: nowrap; }
.btn:has(.btn__phone) {
  flex-direction: column;
  gap: .1rem;
  padding-block: .55rem;
  line-height: 1.25;
}

/* Phone numbers must never wrap mid-number. Handled here rather than with
   &nbsp;/&#8209; entities so the visible number stays literal digits and
   hyphens, and therefore remains copy-pasteable into a dialer. */
a[href^="tel:"] { white-space: nowrap; }

/* Inline contact links keep the hairline-underline idiom of the design. */
.link-inline {
  color: inherit;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}
.link-inline:hover { border-bottom-color: transparent; }

/* Nav CTA carries the number itself; hours sit under it so the desktop
   header never implies round-the-clock availability. */
.site-nav__cta {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: .25rem;
}
.site-nav__hours {
  color: var(--spruce-muted); /* header is the dark spruce plane */
  font-size: .78rem;
  text-align: center;
}

.legal-note {
  max-width: 66ch;
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: .92rem;
}

.hero__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .7rem;
}

.hero__cta-hint {
  max-width: 30rem;
  color: var(--spruce-muted);
  font-size: .85rem;
}

.editorial-section,
.verification {
  padding: clamp(3.5rem, 7vw, 6rem) var(--edge);
  border-top: 1px solid var(--ink);
}

.section-head {
  max-width: 58rem;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.section-head h1,
.section-head h2 {
  max-width: 18ch;
  font-size: var(--h2);
}

.section-intro {
  max-width: 52rem;
  margin-top: 1rem;
  color: var(--muted);
}

.editorial-rows,
.format-list,
.verification__list {
  border-top: 1px solid var(--ink);
}

.editorial-row {
  display: grid;
  grid-template-columns: minmax(2.4rem, 4rem) minmax(0, 1fr);
  gap: clamp(1rem, 2.5vw, 2rem);
  padding: clamp(1.4rem, 3vw, 2.2rem) 0;
  border-bottom: 1px solid var(--rule);
}

.editorial-row__num,
.format-row__num,
.verification__list > li > span {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .04em;
}

.editorial-row h3 {
  font-size: clamp(1.35rem, 2.5vw, 2.15rem);
}

.editorial-row p {
  max-width: 65ch;
  margin-top: .65rem;
  color: var(--muted);
}

.format-row {
  display: grid;
  grid-template-columns: minmax(15rem, 1.1fr) minmax(9rem, .55fr) minmax(15rem, 1fr) minmax(18rem, 1.35fr);
  gap: clamp(1rem, 2.6vw, 2.4rem);
  align-items: start;
  padding: clamp(1.5rem, 3vw, 2.5rem) 0;
  border-bottom: 1px solid var(--rule);
}

.format-row__name {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  gap: .7rem;
}

.format-row__name h3 {
  font-size: clamp(1.35rem, 2.5vw, 2.15rem);
}

.format-row__price {
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  font-weight: 600;
  white-space: nowrap;
}

.format-row__price span {
  display: block;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 400;
}

.format-row > p:not(.format-row__price) {
  color: var(--muted);
}

.format-row--blocked {
  color: var(--spruce-ink);
  background: var(--spruce);
  margin-inline: calc(var(--edge) * -1);
  padding-inline: var(--edge);
  border-bottom-color: var(--spruce);
}

.format-row--blocked .format-row__num,
.format-row--blocked .format-row__price span,
.format-row--blocked > p:not(.format-row__price) {
  color: var(--spruce-muted);
}

.comparison {
  margin-top: clamp(3rem, 6vw, 5rem);
}

.comparison > h3 {
  margin-bottom: 1.2rem;
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
}

.comparison__scroll {
  overflow-x: auto;
  border-top: 1px solid var(--ink);
  -webkit-overflow-scrolling: touch;
}

.comparison table {
  width: 100%;
  min-width: 46rem;
  border-collapse: collapse;
  text-align: left;
}

.comparison th,
.comparison td {
  padding: 1rem .8rem 1rem 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

.comparison thead th {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .02em;
}

.comparison tbody th {
  font-weight: 600;
}

.scope-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
}

.scope-group {
  min-width: 0;
  padding: clamp(1.4rem, 3vw, 2.2rem);
  border-right: 1px solid var(--rule);
}

.scope-group:first-child {
  padding-left: 0;
}

.scope-group:last-child {
  padding-right: 0;
  border-right: 0;
}

.scope-group h3 {
  margin-bottom: 1.2rem;
  font-size: clamp(1.3rem, 2.1vw, 1.8rem);
}

.scope-group ul {
  display: grid;
  gap: .75rem;
}

.scope-group li {
  position: relative;
  padding-left: 1.1rem;
  color: var(--muted);
}

.scope-group li::before {
  content: "—";
  position: absolute;
  left: 0;
}

.care-plan__note {
  max-width: 58rem;
  margin-top: 1.5rem;
  color: var(--muted);
}

.verification {
  background: var(--surface);
}

.verification__list > li {
  display: grid;
  grid-template-columns: minmax(2.4rem, 4rem) minmax(0, 1fr);
  gap: clamp(1rem, 2.5vw, 2rem);
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--rule);
}

.verification__list p {
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  font-weight: 500;
}

.faq__list {
  border-top: 1px solid var(--ink);
}

.faq details {
  border-bottom: 1px solid var(--rule);
}

.faq summary {
  position: relative;
  padding: 1.4rem 3rem 1.4rem 0;
  cursor: pointer;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  font-weight: 600;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: .25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 1.5rem;
  font-weight: 400;
}

.faq details[open] summary::after {
  content: "−";
}

.faq details p {
  max-width: 66ch;
  padding: 0 3rem 1.4rem 0;
  color: var(--muted);
}

.apply__inner--static {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(20rem, 1.15fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}

.contact-panel {
  display: grid;
  gap: 1.4rem;
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  border: 1px solid var(--rule-dark);
}

.contact-panel__list {
  display: grid;
  gap: .85rem;
  margin: 0;
}

.contact-panel__row {
  display: grid;
  grid-template-columns: minmax(7.5rem, auto) minmax(0, 1fr);
  gap: .5rem 1rem;
  padding-bottom: .85rem;
  border-bottom: 1px solid var(--rule-dark);
}

.contact-panel__row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.contact-panel__row dt {
  color: var(--spruce-muted);
  font-size: .9rem;
}

.contact-panel__row dd {
  margin: 0;
  color: var(--spruce-ink);
  font-weight: 500;
}

.final .eyebrow {
  color: var(--spruce-muted);
}

.final__hours {
  margin-top: .9rem;
  color: var(--spruce-muted);
  font-size: .92rem;
}

.final__body {
  max-width: 50rem;
  color: var(--spruce-muted);
}

.footer__legal {
  grid-column: 1 / -1;
  display: grid;
  gap: .6rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule-dark);
  font-size: .92rem;
}

.footer__contacts { color: #fff; }
.footer__entity,
.footer__disclaimer { color: var(--spruce-muted); }
.footer__disclaimer { max-width: 78ch; }

@media (max-width: 1080px) {
  .format-row {
    grid-template-columns: minmax(15rem, 1fr) minmax(8rem, .5fr) minmax(0, 1.3fr);
  }
  .format-row > p:last-child {
    grid-column: 1 / -1;
    padding-left: 3.3rem;
  }
}

@media (max-width: 760px) {
  .section-head h2 {
    max-width: none;
  }
  .format-row {
    grid-template-columns: 1fr;
  }
  .format-row > p:last-child {
    grid-column: auto;
    padding-left: 0;
  }
  .scope-groups {
    grid-template-columns: 1fr;
  }
  .scope-group,
  .scope-group:first-child,
  .scope-group:last-child {
    padding: 1.5rem 0;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }
  .scope-group:last-child {
    border-bottom: 0;
  }
  .apply__inner--static {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .editorial-row,
  .verification__list > li {
    grid-template-columns: 2.2rem minmax(0, 1fr);
    gap: .75rem;
  }
  .format-row__name {
    grid-template-columns: 2.2rem minmax(0, 1fr);
  }
  .contact-panel {
    padding-inline: 1.1rem;
  }
  .contact-panel__row {
    grid-template-columns: 1fr;
    gap: .2rem;
  }
}

/* ============================================================
   Conversion release candidate · 2026-08-08
   Reuses the existing form primitives (.field-row/.input/.form__summary/
   .form__status) so the lead form is native to the approved system.
   ============================================================ */

/* Hero: primary form CTA + equal phone action. */
.hero__cta-pair { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero__cta-pair .btn { flex: 1 1 14rem; }
.hero__actions .btn--line { color: var(--spruce-ink); border-color: var(--spruce-muted); }
.hero__actions .btn--line:hover { background: var(--spruce-ink); color: var(--spruce); border-color: var(--spruce-ink); }

/* Situation → service route line. */
.editorial-row__route { margin-top: .7rem; font-weight: 600; }

/* Contextual CTA on an available service row. */
.format-row__cta { margin-top: .4rem; }

/* Concrete-tasks list: two columns of ruled rows, no card grid. */
.tasks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: 0 clamp(1.5rem, 4vw, 3.5rem);
  border-top: 1px solid var(--ink);
}
.tasks__item {
  position: relative;
  padding: 1rem 0 1rem 1.6rem;
  border-bottom: 1px solid var(--rule);
  font-size: clamp(1rem, 1.5vw, 1.12rem);
}
.tasks__item::before { content: "—"; position: absolute; left: 0; color: var(--muted); }
.scope-note { max-width: 66ch; margin-top: 1.5rem; color: var(--muted); }

/* Conversion block: aside + form on the dark plane. */
.apply__inner--form {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(20rem, 1.1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.apply__call { margin-top: 1.6rem; }
.apply__call-hours { margin-top: .5rem; color: var(--spruce-muted); font-size: .9rem; }

.lead-form { display: flex; flex-direction: column; gap: 1.3rem; min-width: 0; }
.field-optional { font-weight: 400; color: var(--spruce-muted); font-size: .85rem; }
.input--area { min-height: 6.5rem; padding-top: .6rem; resize: vertical; }
.lead-form__alt { color: var(--spruce-muted); font-size: .92rem; }

/* Outcome panel. Failure must stay visibly distinct from success. */
.form__fallback { border: 2px solid var(--danger-dark); padding: 1rem 1.1rem; }
.form__fallback.is-ok { border-color: var(--lime); }
.form__fallback-title { font-weight: 600; margin-bottom: .35rem; color: var(--spruce-ink); }
.form__fallback p { color: var(--spruce-muted); }

.apply__contacts {
  max-width: var(--maxw);
  margin: clamp(2rem, 5vw, 3.5rem) auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule-dark);
}
.contact-panel__list--inline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem clamp(1.5rem, 4vw, 3rem);
}
.contact-panel__list--inline .contact-panel__row { border-bottom: 0; padding-bottom: 0; }

@media (max-width: 900px) {
  .apply__inner--form { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .hero__cta-pair .btn { flex: 1 1 100%; }
}

/* Consent is a required control, so it must meet the 44px target like any
   other standalone control, not inherit the browser's 13px checkbox. */
.field-row--check .check { min-height: 44px; padding-block: .35rem; cursor: pointer; }
.field-row--check .check input[type="checkbox"] {
  flex: none;
  width: 24px; height: 24px;
  margin: 0;
  accent-color: var(--lime);
}
