/* NeuroSecondOpinion — editorial system
   Type: Source Serif 4 (display) + Inter (UI/body)
   Color: deep teal-navy primary, paper background, copper accent
*/

/* Fonts are loaded via <link rel="stylesheet"> in each HTML head so they
   download in parallel with this stylesheet rather than sequentially. */

:root {
  /* Color */
  --paper: #F6F1E8;
  --paper-2: #EFE8DA;
  --paper-3: #E5DDCB;
  --ink: #1A1A1A;
  --ink-2: #3A3A3A;
  --ink-3: #5A5A55;         /* darkened from #6B6B66 to pass WCAG AA on paper-2 */
  --rule: #C8BFAB;
  --rule-2: #D9D1BD;
  --primary: #0F2A2E;
  --primary-2: #1A3A3F;
  --accent: #75552D;        /* darkened from #8C6A3C; AA on paper backgrounds */
  --accent-2: #C09870;      /* lightened from #A07B49; AA on primary background */

  /* Type */
  --serif: "Source Serif 4", "Source Serif Pro", Georgia, serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Rhythm */
  --max: 1240px;
  --gutter: clamp(20px, 4vw, 64px);
  --rule-w: 1px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}

/* Type scale — editorial */
.serif  { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }
.mono   { font-family: var(--mono); font-weight: 400; letter-spacing: 0; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.012em; margin: 0; color: var(--ink); }
h1 { font-size: clamp(40px, 5.6vw, 76px); line-height: 1.02; }
h2 { font-size: clamp(28px, 3.4vw, 44px); line-height: 1.08; }
h3 { font-size: clamp(20px, 1.6vw, 24px); line-height: 1.18; font-weight: 500; }
p  { margin: 0; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-3);
}

.deck {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.5;
  color: var(--ink-2);
  text-wrap: pretty;
}

.tabular { font-variant-numeric: tabular-nums; }

a { color: var(--primary); text-decoration: none; border-bottom: 1px solid var(--rule); transition: border-color .15s ease, color .15s ease; }
a:hover { color: var(--accent); border-bottom-color: var(--accent); }
a.plain { border-bottom: 0; }

/* Global keyboard focus indicator */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* Layout */
.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.rule { height: 1px; background: var(--rule); border: 0; margin: 0; }
.rule-2 { height: 1px; background: var(--rule-2); border: 0; margin: 0; }

/* Buttons — restrained */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.005em;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
  text-decoration: none;
}
.btn-primary { background: var(--primary); color: var(--paper); }
.btn-primary:hover { background: var(--primary-2); color: var(--paper); }
.btn-ghost { background: transparent; color: var(--primary); border-color: var(--rule); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-link { background: transparent; padding: 0; border: 0; color: var(--primary); border-bottom: 1px solid var(--rule); border-radius: 0; }
.btn-link:hover { border-bottom-color: var(--primary); }

/* Subtle paper texture — barely there */
.paper-texture {
  background-image:
    radial-gradient(rgba(140, 106, 60, 0.025) 1px, transparent 1px),
    radial-gradient(rgba(15, 42, 46, 0.02) 1px, transparent 1px);
  background-size: 22px 22px, 33px 33px;
  background-position: 0 0, 11px 11px;
}

/* Header */
.header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--rule-2);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.brandmark {
  display: inline-flex; align-items: baseline; gap: 10px;
  font-family: var(--serif); font-size: 19px; letter-spacing: -0.01em;
  border: 0; color: var(--ink);
}
.brandmark .dot {
  width: 7px; height: 7px; background: var(--accent); display: inline-block;
}
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { border: 0; color: var(--ink-2); font-size: 14px; }
.nav-links a:hover { color: var(--primary); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: ""; display: block; height: 1px; margin-top: 2px;
  background: var(--accent);
}

/* Mobile nav toggle (shown <900px) */
.nav-toggle {
  display: none;
  background: transparent; border: 1px solid var(--rule);
  padding: 8px 14px; border-radius: 2px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink); cursor: pointer;
}
.nav-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nav-mobile {
  display: flex; flex-direction: column; gap: 0;
  border-top: 1px solid var(--rule-2);
  background: var(--paper);
  padding: 8px 0 16px;
}
.nav-mobile a {
  border: 0; padding: 14px var(--gutter);
  font-size: 16px; color: var(--ink-2);
  border-bottom: 1px solid var(--rule-2);
}
.nav-mobile a:last-child {
  margin: 16px var(--gutter) 0;
  padding: 14px 22px; border-bottom: 0; text-align: center;
}

/* Geo strip */
.geo {
  font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-3);
}

/* Numbered cards / doors */
.door {
  position: relative;
  display: flex; flex-direction: column; gap: 18px;
  padding: 36px 32px;
  background: transparent;
  border: 1px solid var(--rule-2);
  border-radius: 2px;
  text-decoration: none; color: inherit;
  transition: background .2s ease, border-color .2s ease;
}
.door:hover { background: var(--paper-2); border-color: var(--rule); color: inherit; }
.door.featured { background: var(--primary); color: var(--paper); border-color: var(--primary); }
.door.featured:hover { background: var(--primary-2); }
.door.featured .door-kicker, .door.featured .door-route-note { color: rgba(246,241,232,0.7); }
.door.featured .door-route-price { color: var(--paper); }
.door.featured .rule { background: rgba(246,241,232,0.18); }

.door-kicker { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); }
.door-title { font-family: var(--serif); font-size: 26px; line-height: 1.15; }
.door-body { font-size: 15px; line-height: 1.55; color: inherit; opacity: 0.85; }
.door-route { display: flex; flex-direction: column; gap: 4px; margin-top: auto; padding-top: 18px; border-top: 1px solid var(--rule-2); }
.door.featured .door-route { border-top-color: rgba(246,241,232,0.18); }
.door-route-label { font-family: var(--sans); font-size: 13px; font-weight: 500; }
.door-route-price { font-family: var(--serif); font-size: 22px; }
.door-route-note { font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.06em; }

/* Consultant card — typographic monogram */
.cc {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 22px;
  padding: 22px 0;
  border-top: 1px solid var(--rule-2);
}
.cc:last-child { border-bottom: 1px solid var(--rule-2); }
.cc-monogram {
  width: 96px; height: 120px;
  background: var(--paper-2);
  border: 1px solid var(--rule-2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 38px; color: var(--primary);
  letter-spacing: -0.02em;
  position: relative;
}
.cc-monogram::after{
  content: ""; position: absolute; inset: 6px; border: 1px solid var(--rule-2);
}
.cc-name { font-family: var(--serif); font-size: 22px; line-height: 1.15; }
.cc-role { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin-top: 6px; }
.cc-inst { font-family: var(--sans); font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.cc-focus { font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--ink-2); margin-top: 10px; line-height: 1.45; }

/* TBD / recruiting variant of consultant card */
.cc-tbd .cc-monogram-tbd {
  background: transparent;
  border: 1px dashed var(--rule);
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.16em;
}
.cc-tbd .cc-monogram-tbd::after { border-style: dashed; border-color: var(--rule-2); }
.cc-name-tbd { color: var(--ink-3); font-style: italic; }
.recruiting-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent);
}
.recruiting-tag::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); display: inline-block;
}

/* Panel grid (consultant cards) */
.panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 64px; }
@media (max-width: 800px) { .panel-grid { grid-template-columns: 1fr; gap: 0; } }

/* Homepage — clinical leadership & network (Phase 6) */
.hp-sublead { max-width: 56ch; margin-top: 0; }
.hp-leadership-cards { margin-top: 20px; max-width: 720px; }
.hp-network-prose p:last-child { margin-bottom: 0; }
.hp-recruiting-list {
  margin: 18px 0 0;
  padding-left: 1.2em;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.6;
}

/* Panel disclosure block */
.panel-disclosure {
  margin-top: 36px; padding: 22px 24px;
  border: 1px solid var(--rule-2); background: var(--paper-2);
  font-family: var(--serif); font-style: italic; font-size: 15px; line-height: 1.55;
  color: var(--ink-2); max-width: 80ch;
}
.panel-disclosure strong {
  display: block; font-family: var(--mono); font-style: normal; font-weight: 400;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 10px;
}

/* Footer */
.footer {
  margin-top: 120px;
  padding: 64px 0 48px;
  border-top: 1px solid var(--rule);
  background: var(--paper);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer h4 { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em; font-weight: 400; color: var(--ink-3); margin-bottom: 14px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer a { font-size: 14px; color: var(--ink-2); border-bottom: 0; }
.footer a:hover { color: var(--primary); }
.footer-legal { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--rule-2); display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-legal small { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--ink-3); }

/* Stat */
.stat-figure { font-family: var(--serif); font-size: clamp(48px, 6vw, 80px); line-height: 0.95; letter-spacing: -0.02em; color: var(--primary); }
.stat-body { font-size: 15px; color: var(--ink-2); line-height: 1.5; max-width: 36ch; }

/* Section */
.section { padding: 96px 0; }
.section-tight { padding: 64px 0; }

.section-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  align-items: end;
  margin-bottom: 56px;
}
.section-head .lead { color: var(--ink-2); font-family: var(--serif); font-size: 22px; line-height: 1.4; max-width: 50ch; }
@media (max-width: 800px){
  .section-head { grid-template-columns: 1fr; gap: 16px; }
}

/* Forms */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.field input, .field textarea, .field select {
  background: transparent; border: 0; border-bottom: 1px solid var(--rule);
  padding: 10px 0; font-family: var(--sans); font-size: 16px; color: var(--ink);
  border-radius: 0; outline: none; width: 100%;
}
.field input:focus, .field textarea:focus, .field select:focus { border-bottom-color: var(--primary); }

/* Tag / pill */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--ink-3);
}
.tag::before { content: ""; width: 5px; height: 5px; background: var(--accent); display: inline-block; }

/* Drop cap utility for editorial body */
.drop::first-letter {
  font-family: var(--serif);
  font-size: 4.6em;
  float: left;
  line-height: 0.85;
  padding: 0.05em 0.08em 0 0;
  color: var(--primary);
}

/* Material / texture placeholder block */
.material {
  background:
    repeating-linear-gradient( 90deg,
      transparent 0 22px,
      rgba(15,42,46,0.06) 22px 23px),
    linear-gradient(180deg, var(--paper-2), var(--paper-3));
  border: 1px solid var(--rule-2);
  position: relative;
}
.material::after {
  content: attr(data-label);
  position: absolute; bottom: 12px; left: 14px;
  font-family: var(--mono); font-size: 10px; color: var(--ink-3);
  letter-spacing: 0.14em; text-transform: uppercase;
}

/* Numbered list — editorial */
.numbered { list-style: none; padding: 0; margin: 0; }
.numbered li {
  display: grid; grid-template-columns: 56px 1fr; gap: 24px;
  padding: 28px 0; border-top: 1px solid var(--rule-2);
}
.numbered li:last-child { border-bottom: 1px solid var(--rule-2); }
.numbered .n { font-family: var(--mono); font-size: 12px; color: var(--accent); letter-spacing: 0.14em; padding-top: 4px; }
.numbered .t { font-family: var(--serif); font-size: 22px; line-height: 1.2; margin-bottom: 6px; }
.numbered .d { font-size: 15px; color: var(--ink-2); line-height: 1.55; max-width: 60ch; }

/* Responsive */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 901px) {
  .nav-mobile { display: none; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* Print-style content column for long-form */
.prose { max-width: 68ch; }
.prose p { margin-bottom: 1.1em; font-size: 17px; line-height: 1.7; color: var(--ink-2); }
.prose p:first-child { margin-top: 0; }
.prose h2 { margin-top: 1.6em; margin-bottom: 0.5em; }
.prose h3 { margin-top: 1.4em; margin-bottom: 0.4em; }
.prose ul { padding-left: 1.1em; }
.prose ul li { margin-bottom: 0.5em; color: var(--ink-2); line-height: 1.6; }

/* Hero variants */
.hero { padding: 96px 0 64px; }
.hero-eyebrow { margin-bottom: 32px; }
.hero h1 { text-wrap: balance; max-width: 18ch; }
.hero-sub { font-family: var(--serif); font-style: italic; font-size: clamp(19px, 1.6vw, 24px); line-height: 1.45; color: var(--ink-2); margin-top: 28px; max-width: 56ch; }
.hero-cta { display: flex; gap: 18px; margin-top: 36px; flex-wrap: wrap; align-items: center; }
.hero-note { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; color: var(--ink-3); text-transform: uppercase; margin-top: 18px; }

/* Hero A — image-led: split */
.hero-a-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 64px;
  align-items: stretch;
}
@media (max-width: 900px) { .hero-a-grid { grid-template-columns: 1fr; } }
.hero-a-figure {
  /* Fill the grid row height so the image matches the text column on the left
     instead of floating in a sea of empty space at the top right. */
  height: 100%;
  background: var(--paper-2);
  border: 1px solid var(--rule-2);
  position: relative;
  overflow: hidden;
  margin: 0;
}
@media (max-width: 900px) {
  /* Stacked layout: give the figure an explicit ratio since there is no
     sibling to stretch against. */
  .hero-a-figure { height: auto; aspect-ratio: 3 / 2; margin-top: 12px; }
}
.hero-a-figure img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  /* Editorial treatment: pull saturation back so the photo reads as
     atmosphere, not stock. The cool overlay below adds the brand cast. */
  filter: grayscale(0.25) contrast(1.02) brightness(0.97);
}
.hero-a-figure::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(15,42,46,0.04) 0%, rgba(15,42,46,0.18) 100%);
  pointer-events: none;
}
.hero-a-figure .corner {
  position: absolute; inset: 14px;
  border: 1px solid rgba(246,241,232,0.55);
  pointer-events: none;
  z-index: 1;
}
.hero-a-figure figcaption {
  position: absolute; left: 18px; bottom: 14px;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(246,241,232,0.85);
  z-index: 2;
}

/* Doors row */
.doors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px){ .doors { grid-template-columns: 1fr; } }

/* Conditions grid */
.cond-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--rule-2); }
@media (max-width: 900px){ .cond-grid { grid-template-columns: 1fr; } }
.cond-cell {
  padding: 30px 28px; border-bottom: 1px solid var(--rule-2);
  border-right: 1px solid var(--rule-2);
  text-decoration: none; color: inherit;
  display: flex; flex-direction: column; gap: 10px;
  transition: background .15s ease;
}
.cond-cell:hover { background: var(--paper-2); color: inherit; }
.cond-cell:nth-child(3n) { border-right: 0; }
.cond-name { font-family: var(--serif); font-size: 24px; }
.cond-sub { font-size: 14px; color: var(--ink-3); }
.cond-arrow { margin-top: auto; font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; color: var(--accent); }

/* Coming-soon condition cell */
.cond-cell-soon { cursor: default; opacity: 0.7; }
.cond-cell-soon:hover { background: transparent; }
.cond-arrow-soon {
  color: var(--ink-3); text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 8px;
}
.cond-arrow-soon::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink-3); display: inline-block; opacity: 0.6;
}

/* Dementia subtype grid (replaces inline styles) */
.subtype-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--rule);
}
@media (max-width: 800px) { .subtype-grid { grid-template-columns: 1fr; } }
.subtype-cell {
  display: block; padding: 32px 32px 32px 0;
  border-bottom: 1px solid var(--rule-2);
  color: inherit; text-decoration: none;
}
.subtype-cell + .subtype-cell:nth-child(2n) { padding-left: 32px; }
.subtype-grid > .subtype-cell:nth-child(2n+1) { border-right: 1px solid var(--rule-2); }
@media (max-width: 800px) {
  .subtype-cell, .subtype-cell + .subtype-cell:nth-child(2n) { padding: 28px 0; }
  .subtype-grid > .subtype-cell:nth-child(2n+1) { border-right: 0; }
}
a.subtype-cell:hover { background: var(--paper-2); }
div.subtype-cell { cursor: default; opacity: 0.75; }
.subtype-arrow {
  margin-top: 16px; font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.16em; color: var(--accent); text-transform: uppercase;
}
.subtype-arrow-soon {
  color: var(--ink-3);
  display: inline-flex; align-items: center; gap: 8px;
}
.subtype-arrow-soon::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink-3); display: inline-block; opacity: 0.6;
}

/* Footer disabled link */
.footer .link-soon {
  color: var(--ink-3); cursor: default; opacity: 0.7;
}
.footer .link-soon::after {
  content: " · soon"; font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.12em; color: var(--ink-3); text-transform: uppercase;
}
.footer .link-soon:hover { color: var(--ink-3); }

/* Trust list */
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
@media (max-width: 900px){ .trust-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px){ .trust-grid { grid-template-columns: 1fr; } }
.trust-item .t { font-family: var(--serif); font-size: 19px; line-height: 1.25; margin-bottom: 8px; }
.trust-item .d { font-size: 14px; color: var(--ink-3); line-height: 1.5; }

/* Pricing tiers */
.tiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--rule); }
@media (max-width: 900px){ .tiers { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px){ .tiers { grid-template-columns: 1fr; } }
.tier {
  padding: 32px 28px;
  border-right: 1px solid var(--rule-2);
  display: flex; flex-direction: column; gap: 10px;
}
.tier:last-child { border-right: 0; }
.tier-name { font-family: var(--serif); font-size: 20px; }
.tier-price { font-family: var(--serif); font-size: 38px; line-height: 1; letter-spacing: -0.02em; }
.tier-unit { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.tier-desc { font-size: 14px; color: var(--ink-2); line-height: 1.5; max-width: 32ch; }
.tier.featured .tier-name::before {
  content: "";
  display: block; width: 18px; height: 1px; background: var(--accent); margin-bottom: 10px;
}

/* Step indicator (flow) */
.steps {
  display: flex; gap: 0; padding: 0; margin: 0;
  list-style: none;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.step {
  flex: 1;
  border-right: 1px solid var(--rule-2);
}
.step:last-child { border-right: 0; }
.step-btn {
  width: 100%; height: 100%;
  background: transparent; border: 0; padding: 22px 18px;
  display: flex; flex-direction: column; gap: 6px;
  text-align: left; cursor: pointer; font: inherit; color: inherit;
}
.step-btn:disabled { cursor: default; }
.step-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.step .n { font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.16em; display: block; }
.step .t { font-family: var(--serif); font-size: 17px; color: var(--ink-2); display: block; }
.step.active { background: var(--paper-2); }
.step.active .n { color: var(--accent); }
.step.active .t { color: var(--ink); }
.step.done .n::after { content: " ✓"; color: var(--accent); }
.step.done .t { color: var(--ink-3); }
@media (max-width: 700px) {
  .steps { flex-direction: column; }
  .step { border-right: 0; border-bottom: 1px solid var(--rule-2); }
  .step:last-child { border-bottom: 0; }
  .step-btn { padding: 14px 16px; flex-direction: row; align-items: baseline; gap: 16px; }
  .step .n { white-space: nowrap; }
}

/* Flow page header (submit / consult) */
.flow-head {
  display: grid; grid-template-columns: 1fr auto;
  gap: 24px; align-items: end;
}
@media (max-width: 800px) {
  .flow-head { grid-template-columns: 1fr; }
}

/* Two-column field row (form inputs side-by-side) */
.field-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
@media (max-width: 600px) {
  .field-row { grid-template-columns: 1fr; }
}

/* CTA strip on placeholder pages — stacks under content on mobile */
.cta-strip {
  display: grid; grid-template-columns: 2fr 1fr;
  gap: 32px; align-items: center;
  padding: 32px var(--gutter);
}
@media (max-width: 700px) {
  .cta-strip { grid-template-columns: 1fr; gap: 18px; align-items: start; }
}

/* Form errors and required marker */
.form-err {
  display: block;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  color: #8a2a1c; margin-top: 6px;
}
.req { color: var(--accent); font-family: var(--sans); font-weight: 500; }
.field input:invalid:not(:placeholder-shown),
.field textarea:invalid:not(:placeholder-shown),
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"],
.field select[aria-invalid="true"] {
  border-bottom-color: #8a2a1c;
}

/* Skip link for keyboard users */
.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--primary); color: var(--paper);
  padding: 10px 16px; border: 0; border-radius: 2px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em;
  text-transform: uppercase; z-index: 100;
}
.skip-link:focus { left: 16px; outline: 2px solid var(--accent); outline-offset: 2px; }


/* Specialist picker chip (in flow) */
.spec-chip {
  display: grid; grid-template-columns: 56px 1fr auto; gap: 18px;
  padding: 18px 0; border-top: 1px solid var(--rule-2); cursor: pointer;
  align-items: center;
}
.spec-chip:last-child { border-bottom: 1px solid var(--rule-2); }
.spec-chip:hover { background: var(--paper-2); }
.spec-chip .mono-mini {
  width: 56px; height: 56px; background: var(--paper-2); border: 1px solid var(--rule-2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 22px; color: var(--primary);
}
.spec-chip.selected { background: var(--paper-2); }
.spec-chip.selected .mono-mini { border-color: var(--primary); }

/* Slot grid */
.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 700px){ .slots { grid-template-columns: 1fr 1fr; } }
.slot {
  padding: 12px 8px; text-align: center; font-family: var(--mono); font-size: 12px;
  border: 1px solid var(--rule-2); cursor: pointer; letter-spacing: 0.06em;
  background: transparent; color: var(--ink); border-radius: 0;
}
.slot:hover:not(:disabled) { border-color: var(--primary); }
.slot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.slot.selected { background: var(--primary); color: var(--paper); border-color: var(--primary); }
.slot.disabled, .slot:disabled { color: var(--rule); cursor: not-allowed; text-decoration: line-through; }
.slot.disabled:hover, .slot:disabled:hover { border-color: var(--rule-2); }

/* Upload tile */
.upload {
  border: 1px dashed var(--rule); padding: 36px;
  display: flex; flex-direction: column; gap: 8px; align-items: flex-start;
  background: var(--paper-2);
}
.upload .label { font-family: var(--serif); font-size: 22px; }
.upload .sub { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; color: var(--ink-3); text-transform: uppercase; }
.upload-list { display: flex; flex-direction: column; gap: 0; margin-top: 12px; width: 100%; }
.upload-list li {
  display: grid; grid-template-columns: 1fr auto auto; gap: 16px;
  padding: 12px 0; border-top: 1px solid var(--rule-2);
  font-size: 14px; align-items: center;
}
.upload-list li:last-child { border-bottom: 1px solid var(--rule-2); }

/* Long form section breaks */
.lede {
  font-family: var(--serif);
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.35;
  color: var(--ink);
  max-width: 32ch;
  text-wrap: pretty;
}

/* Sub-section title */
.sub-h {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 24px; padding-top: 18px; border-top: 1px solid var(--rule);
  display: inline-block; padding-right: 80px;
}

/* Asymmetric two-col */
.two-col { display: grid; grid-template-columns: 1fr 2fr; gap: 56px; }
@media (max-width: 900px){ .two-col { grid-template-columns: 1fr; gap: 24px; } }

/* Quiet card */
.quiet {
  padding: 28px;
  border: 1px solid var(--rule-2);
}

/* Stat row */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.stat-row-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px){ .stat-row, .stat-row-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px){ .stat-row, .stat-row-3 { grid-template-columns: 1fr; } }

/* Alzheimer's stages — 5 columns desktop, collapses to 2/1 */
.stages-grid {
  display: grid; grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--rule);
}
.stages-cell {
  padding: 24px 20px 28px;
  border-right: 1px solid var(--rule-2);
  border-bottom: 1px solid var(--rule-2);
}
.stages-grid > .stages-cell:last-child { border-right: 0; }
@media (max-width: 1024px) {
  .stages-grid { grid-template-columns: repeat(3, 1fr); }
  .stages-grid > .stages-cell:nth-child(3n) { border-right: 0; }
  .stages-grid > .stages-cell:nth-child(5):not(:last-child) { border-right: 1px solid var(--rule-2); }
  .stages-grid > .stages-cell:last-child { border-right: 0; }
}
@media (max-width: 700px) {
  .stages-grid { grid-template-columns: repeat(2, 1fr); }
  .stages-grid > .stages-cell { border-right: 1px solid var(--rule-2); }
  .stages-grid > .stages-cell:nth-child(2n) { border-right: 0; }
  .stages-grid > .stages-cell:last-child { border-right: 0; }
}
@media (max-width: 420px) {
  .stages-grid { grid-template-columns: 1fr; }
  .stages-grid > .stages-cell { border-right: 0; }
}

/* Stat citations and source list */
.stat-cite { font-size: 0.42em; vertical-align: super; margin-left: 4px; line-height: 1; }
.stat-cite a {
  font-family: var(--mono); color: var(--accent); border-bottom: 0;
  letter-spacing: 0; padding: 0 2px;
}
.stat-cite a:hover { color: var(--primary); }
.stat-sources {
  list-style: none; padding: 24px 0 0; margin: 36px 0 0;
  border-top: 1px solid var(--rule-2);
  display: flex; flex-direction: column; gap: 8px;
  font-family: var(--sans); font-size: 12px; line-height: 1.55;
  color: var(--ink-3); max-width: 92ch;
}
.stat-source-n { font-family: var(--mono); color: var(--accent); margin-right: 6px; }

/* Side note */
.side-note {
  font-family: var(--serif); font-style: italic; font-size: 17px; line-height: 1.45;
  color: var(--ink-2); padding-left: 22px; border-left: 1px solid var(--accent); max-width: 36ch;
}

/* ─── Specialist directory (v2 Phase 3) ────────────────────────────────────
   The directory is a single editorial surface. No drop shadows, no Yelp
   chrome. Cards are flat with rules. The grid collapses cleanly. */

.sp-monogram {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 500;
  background: var(--paper-2); color: var(--primary);
  border: 1px solid var(--rule-2);
  letter-spacing: 0.02em;
}
.sp-monogram-photo { padding: 0; overflow: hidden; }
.sp-monogram-photo img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* Compact (homepage) */
.sp-card-compact {
  display: grid; grid-template-columns: auto 1fr; gap: 18px;
  padding: 18px 0; border-top: 1px solid var(--rule-2);
  align-items: start; color: inherit; border-bottom: 0;
}
.sp-card-compact:last-child { border-bottom: 1px solid var(--rule-2); }
.sp-card-compact:hover { background: var(--paper-2); }

/* Consult flow — read-only specialist strip (not a link) */
.consult-specialist-summary.sp-card-compact {
  cursor: default;
  pointer-events: none;
}
.consult-specialist-summary.sp-card-compact:hover { background: transparent; }

.sp-name { font-family: var(--serif); font-size: 22px; line-height: 1.2; color: var(--ink); }
.sp-creds { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.sp-role { font-family: var(--sans); font-size: 14px; color: var(--ink-2); margin-top: 6px; }
.sp-focus { font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--ink-2); margin-top: 8px; max-width: 56ch; }

/* Directory variant — auto-fill so the grid honors the parent column width
   (the routing-helper sidebar narrows the parent on desktop). */
.sp-grid {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.sp-card-directory {
  position: relative;
  border: 1px solid var(--rule-2);
  background: var(--paper);
  transition: background 0.15s ease;
}
.sp-card-directory:hover { background: var(--paper-2); }
.sp-card-link {
  display: flex; flex-direction: column; gap: 16px;
  padding: 24px 24px 22px; color: inherit; text-decoration: none;
  border: 0; height: 100%;
}
.sp-card-link:hover { color: inherit; }
.sp-card-link:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }

.sp-card-head {
  display: grid; grid-template-columns: auto 1fr auto; gap: 18px;
  align-items: start;
}
.sp-card-id .sp-name { font-size: 24px; }

.sp-tier-tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); border: 1px solid var(--accent); padding: 4px 8px;
  align-self: start;
}

.sp-affiliation {
  font-family: var(--serif); font-style: italic; font-size: 15px;
  color: var(--ink-2); line-height: 1.45;
}
.sp-pending {
  color: var(--ink-3); font-style: normal; font-family: var(--sans);
  font-size: 13px;
}

.sp-conditions { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-condition-chip {
  font-family: var(--sans); font-size: 12px; color: var(--ink-2);
  background: var(--paper-2); border: 1px solid var(--rule-2);
  padding: 4px 9px; border-radius: 1px;
}
.sp-condition-more { font-size: 12px; color: var(--ink-3); align-self: center; padding-left: 4px; }

.sp-states { font-size: 13px; color: var(--ink-2); font-family: var(--sans); }
.sp-states-pending { color: var(--ink-3); }
.sp-languages { font-size: 13px; color: var(--ink-3); }
.sp-insurance { font-size: 13px; color: var(--ink-2); }

.sp-next { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.sp-next-pending { color: var(--ink-3); }

.sp-card-foot {
  margin-top: auto;
  display: flex; flex-direction: column; gap: 8px;
  padding-top: 14px; border-top: 1px solid var(--rule-2);
}
.sp-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-badge {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-2); border: 1px solid var(--rule);
  padding: 4px 8px;
}
.sp-pricing { font-family: var(--sans); font-size: 14px; color: var(--ink); }

.sp-cta {
  margin-top: 6px;
  font-family: var(--sans); font-size: 13px; color: var(--accent);
  letter-spacing: 0.02em;
}
.sp-card-directory:hover .sp-cta { color: var(--primary); }

/* Hero variant (Phase 4) */
.sp-hero {
  display: grid; grid-template-columns: auto 1fr; gap: 36px;
  padding: 56px 0; border-bottom: 1px solid var(--rule-2);
  align-items: start;
}
@media (max-width: 700px) { .sp-hero { grid-template-columns: 1fr; gap: 24px; } }
.sp-hero-portrait { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.sp-photo-status {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-3);
}
.sp-hero-name { font-family: var(--serif); font-size: clamp(40px, 5vw, 64px); line-height: 1.05; margin-top: 4px; }
.sp-practice { font-family: var(--sans); font-size: 14px; color: var(--ink-2); margin-top: 10px; }
.sp-hero-meta { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }

/* ─── Filter bar ────────────────────────────────────────────────────────── */
.filter-bar {
  border: 1px solid var(--rule-2);
  background: var(--paper);
  padding: 16px 20px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px;
}
.filter-bar h2 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); margin-right: 8px; font-weight: 400; }
.filter-bar select {
  font-family: var(--sans); font-size: 13px; color: var(--ink); background: var(--paper);
  border: 1px solid var(--rule); padding: 7px 28px 7px 12px; border-radius: 1px;
  appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.filter-bar select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.filter-clear {
  font-family: var(--sans); font-size: 13px; color: var(--accent); border: 0;
  background: transparent; cursor: pointer; padding: 6px 0; border-bottom: 0;
}
.filter-clear:hover { color: var(--primary); }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.filter-chip {
  font-family: var(--sans); font-size: 12px; color: var(--ink-2);
  background: var(--paper-2); border: 1px solid var(--rule);
  padding: 4px 8px 4px 10px; display: inline-flex; align-items: center; gap: 6px;
}
.filter-chip button {
  background: transparent; border: 0; color: var(--ink-3); cursor: pointer;
  font-size: 14px; padding: 0; line-height: 1;
}
.filter-chip button:hover { color: var(--primary); }

.results-meta {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-3); margin: 28px 0 18px;
}

.directory-empty {
  border: 1px solid var(--rule-2);
  padding: 56px 32px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.directory-empty h3 { font-family: var(--serif); font-size: clamp(22px, 2vw, 28px); margin: 0; }
.directory-empty p { font-family: var(--serif); font-style: italic; color: var(--ink-2); max-width: 44ch; }
.directory-empty .actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

/* ─── Routing helper sidebar ──────────────────────────────────────────── */
.directory-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px;
  align-items: start;
}
@media (max-width: 980px) { .directory-grid { grid-template-columns: 1fr; gap: 32px; } }

.routing-helper {
  border: 1px solid var(--rule-2); padding: 24px;
  display: flex; flex-direction: column; gap: 14px;
  position: sticky; top: 24px;
}
@media (max-width: 1024px) { .routing-helper { position: static; } }
.routing-title { font-family: var(--serif); font-size: 22px; line-height: 1.18; margin: 0; }
.routing-sub { font-family: var(--serif); font-style: italic; color: var(--ink-2); font-size: 15px; }
.routing-helper form { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.routing-helper .field { display: flex; flex-direction: column; gap: 4px; }
.routing-helper label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.routing-helper input,
.routing-helper select,
.routing-helper textarea {
  font-family: var(--sans); font-size: 14px; color: var(--ink); background: var(--paper);
  border: 1px solid var(--rule); padding: 8px 10px; border-radius: 1px;
}
.routing-helper textarea { resize: vertical; }
.routing-helper input:focus-visible,
.routing-helper select:focus-visible,
.routing-helper textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.routing-sent { background: var(--paper-2); }
.routing-helper .req { color: var(--accent); }
.routing-helper .form-err { font-size: 12px; color: #8B1E1E; }

/* Cross-link strip below directory */
.cross-strip {
  background: var(--paper-2); border-top: 1px solid var(--rule-2); border-bottom: 1px solid var(--rule-2);
  padding: 40px 0;
}
.cross-strip-grid {
  display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center;
}
@media (max-width: 700px) { .cross-strip-grid { grid-template-columns: 1fr; } }

/* ─── Specialist profile page (Phase 4) ─────────────────────────────────── */
.sp-crumb {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 28px;
}
.sp-crumb a { color: var(--accent); border-bottom: 0; }
.sp-crumb a:hover { color: var(--primary); }

.sp-hero-eyebrow-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 4px;
}
.sp-hero-eyebrow-row .eyebrow { margin-bottom: 0; }

.sp-profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 48px;
  align-items: start;
}
@media (max-width: 980px) {
  .sp-profile-grid { grid-template-columns: 1fr; gap: 40px; }
  .sp-profile-aside { order: -1; }
  .sp-profile-main { order: 1; }
}

.sp-aside-sticky {
  position: sticky;
  top: 20px;
}

.sp-detail-section { margin-bottom: 48px; }
.sp-detail-section:last-of-type { margin-bottom: 0; }

.sp-pending-block {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink-3);
  line-height: 1.55;
  margin: 0;
  max-width: 62ch;
}

.sp-chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

.sp-link-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
  max-width: 68ch;
}
.sp-link-list a {
  font-family: var(--sans); font-size: 15px;
  color: var(--accent); border-bottom: 1px solid var(--rule);
}
.sp-link-list a:hover { color: var(--primary); border-bottom-color: var(--primary); }

.sp-return {
  display: flex; flex-wrap: wrap; gap: 20px;
  padding-top: 32px; margin-top: 40px;
  border-top: 1px solid var(--rule-2);
}
.sp-return a { font-size: 14px; }

.sp-not-found { max-width: 52ch; }

.booking-widget {
  border: 1px solid var(--rule-2);
  padding: 24px 22px;
  background: var(--paper);
}
.booking-widget-muted { background: var(--paper-2); }

.booking-head { margin-bottom: 18px; }
.booking-title {
  font-family: var(--serif);
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.15;
  margin: 8px 0 0;
}
.booking-deck {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--ink-2);
  margin: 12px 0 0;
  line-height: 1.45;
}
.booking-fallback-note {
  font-size: 14px;
  color: var(--ink-2);
  margin: 0 0 16px;
  line-height: 1.5;
}
.booking-sent {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--ink);
  margin: 0;
}
.booking-form { display: flex; flex-direction: column; gap: 14px; }
.booking-form .field { display: flex; flex-direction: column; gap: 4px; }
.booking-form label {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3);
}
.booking-form input,
.booking-form textarea {
  font-family: var(--sans); font-size: 14px; color: var(--ink); background: var(--paper);
  border: 1px solid var(--rule); padding: 8px 10px; border-radius: 1px;
}
.booking-form textarea { resize: vertical; }
.booking-form input:focus-visible,
.booking-form textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.calendly-host {
  min-height: 720px;
  width: 100%;
  margin-top: 8px;
}
