:root {
  --ink: #143332;
  --ink-2: #31504e;
  --paper: #f4f1e8;
  --paper-2: #fbfaf6;
  --white: #ffffff;
  --line: #d8d8ce;
  --line-dark: #a8b4ae;
  --teal: #103b3a;
  --teal-2: #1d5a56;
  --mint: #d8e9df;
  --sage: #8ba997;
  --amber: #e1aa58;
  --amber-soft: #f4e7c8;
  --coral: #df8b68;
  --coral-soft: #f6ddd2;
  --blue: #7199ad;
  --red: #a73c34;
  --red-soft: #f8dfdc;
  --shadow: 0 22px 70px rgba(24, 52, 50, 0.10);
  --shadow-small: 0 8px 28px rgba(24, 52, 50, 0.08);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --content: min(1180px, calc(100vw - 40px));
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 14% -4%, rgba(223, 139, 104, 0.12), transparent 28rem),
    radial-gradient(circle at 90% 22%, rgba(139, 169, 151, 0.14), transparent 30rem),
    var(--paper);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, textarea, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, textarea:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 3px solid rgba(223, 139, 104, 0.8);
  outline-offset: 3px;
}

.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  left: 18px;
  top: -80px;
  padding: 12px 18px;
  color: white;
  background: var(--teal);
  border-radius: 10px;
  transition: top 160ms ease;
}
.skip-link:focus { top: 18px; }

.site-header {
  width: var(--content);
  margin: 0 auto;
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: var(--paper-2);
  background: var(--teal);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: var(--shadow-small);
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 17px; letter-spacing: -0.01em; }
.brand small { margin-top: 1px; color: var(--ink-2); font-size: 12px; }

.privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid rgba(16, 59, 58, 0.13);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(12px);
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #4a9b6d; box-shadow: 0 0 0 4px rgba(74, 155, 109, 0.12); }

.screen { width: var(--content); margin: 0 auto; }
.start-screen { padding: 50px 0 80px; }

.journey-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 620px;
  margin: 0 0 42px;
  padding: 6px;
  border: 1px solid rgba(16, 59, 58, 0.13);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.48);
}
.journey-switcher a {
  min-width: 0;
  padding: 12px 15px;
  border-radius: 12px;
  color: var(--ink-2);
  text-decoration: none;
}
.journey-switcher a.active { color: var(--paper-2); background: var(--teal); box-shadow: var(--shadow-small); }
.journey-switcher span, .journey-switcher strong { display: block; overflow-wrap: break-word; }
.journey-switcher span { margin-bottom: 2px; font-size: 9px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.journey-switcher strong { font-size: 13px; line-height: 1.3; }

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.65fr);
  gap: clamp(36px, 7vw, 100px);
  align-items: center;
  min-height: 410px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.08; letter-spacing: -0.035em; }
.intro-copy h1 {
  max-width: 820px;
  margin-bottom: 26px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 6.5vw, 78px);
  font-weight: 500;
}
.lede {
  max-width: 720px;
  margin-bottom: 28px;
  color: var(--ink-2);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.58;
}
.trust-row { display: flex; flex-wrap: wrap; gap: 10px; }
.trust-row span {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.45);
  font-size: 12px;
  font-weight: 750;
}

.patient-card {
  position: relative;
  overflow: hidden;
  padding: 30px;
  border: 1px solid rgba(16, 59, 58, 0.14);
  border-radius: var(--radius-xl);
  background: var(--teal);
  color: var(--paper-2);
  box-shadow: var(--shadow);
}
.patient-card::after {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  right: -70px;
  top: -65px;
  border: 28px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
}
.patient-card > * { position: relative; z-index: 1; }
.patient-card .eyebrow { color: #b9d2c3; }
.patient-card h2 { margin-bottom: 4px; font-family: Georgia, serif; font-size: 42px; font-weight: 500; }
.patient-card p { color: #d5e1db; }
.patient-portrait {
  display: grid;
  place-items: center;
  width: 148px;
  height: 148px;
  margin: -8px auto 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 32px;
  background: radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.17), rgba(255, 255, 255, 0.06) 70%);
}
.patient-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 7px;
  object-fit: contain;
  filter: drop-shadow(0 10px 14px rgba(2, 25, 24, 0.2));
}
.patient-identity { text-align: center; }
.patient-note {
  display: grid;
  gap: 5px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.patient-note strong { color: #f4cb90; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.patient-note span { color: #d5e1db; font-size: 16px; line-height: 1.5; }
.example-note { margin: 16px 0 0; color: #adc8bb !important; text-align: center; font-size: 11px; line-height: 1.45; }

.scope-note {
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(300px, 1.5fr);
  gap: 30px;
  margin: 20px 0 68px;
  padding: 22px 26px;
  border-left: 4px solid var(--amber);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 1px 0 rgba(16, 59, 58, 0.05);
}
.scope-note strong { font-size: 14px; }
.scope-note span { color: var(--ink-2); font-size: 13px; }

.scenario-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 40px;
  margin-bottom: 24px;
}
.scenario-heading h2 { margin-bottom: 0; font-family: Georgia, serif; font-size: clamp(30px, 4vw, 46px); font-weight: 500; }
.scenario-heading > p { max-width: 480px; margin-bottom: 4px; color: var(--ink-2); font-size: 14px; }

.visit-heading { margin: 58px 0 18px; }
.visit-starter {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(320px, 1.3fr);
  gap: 16px;
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid rgba(16, 59, 58, 0.14);
  border-top: 5px solid var(--coral);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-small);
}
.starter-field { display: grid; align-content: start; gap: 10px; min-width: 0; }
.starter-field label { display: grid; gap: 1px; }
.starter-field label .eyebrow { margin-bottom: 2px; }
.starter-field label strong { font-family: Georgia, serif; font-size: 22px; font-weight: 500; line-height: 1.2; }
.starter-field input,
.starter-field select,
.starter-field textarea {
  width: 100%;
  min-height: 58px;
  padding: 13px 15px;
  border: 1px solid var(--line-dark);
  border-radius: 14px;
  color: var(--ink);
  background: var(--paper-2);
  font-size: 16px;
  line-height: 1.35;
}
.starter-field input::placeholder,
.starter-field textarea::placeholder { color: #86918b; }
.starter-field select { padding-right: 48px; cursor: pointer; appearance: none; }
.starter-field small { color: var(--ink-2); font-size: 11px; line-height: 1.45; }
.select-shell { position: relative; }
.select-shell::after {
  content: "⌄";
  position: absolute;
  right: 18px;
  top: 50%;
  color: var(--teal-2);
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  transform: translateY(-58%);
  pointer-events: none;
}
.other-reason { grid-column: 1 / -1; }
.other-reason textarea { min-height: 120px; }
.visit-starter > .validation-message { grid-column: 1 / -1; margin: 0; }
.starter-button { grid-column: 1 / -1; justify-self: end; min-width: 220px; }
.check-in-note {
  grid-column: 1 / -1;
  max-width: 760px;
  margin: 4px auto 0;
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
}
.visit-summary-card > p { margin: 0; padding: 18px 24px; color: var(--ink-2); font-size: 13px; line-height: 1.55; }

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.scenario-card {
  position: relative;
  min-height: 290px;
  padding: 24px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 1px 0 rgba(16, 59, 58, 0.03);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.scenario-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-small); border-color: var(--line-dark); }
.scenario-card .scenario-number { display: block; margin-bottom: 44px; color: var(--line-dark); font: 600 13px/1 ui-monospace, monospace; }
.scenario-card > strong { display: block; max-width: 280px; margin-bottom: 12px; font-family: Georgia, serif; font-size: 26px; font-weight: 500; line-height: 1.15; letter-spacing: -0.025em; }
.scenario-card > span:not(.scenario-number):not(.eyebrow):not(.scenario-action) { display: block; color: var(--ink-2); font-size: 13px; line-height: 1.55; }
.scenario-action { position: absolute; left: 24px; right: 24px; bottom: 22px; display: flex; justify-content: space-between; color: var(--teal-2); font-size: 12px; font-weight: 800; }
.scenario-card.sage { border-top: 4px solid var(--sage); }
.scenario-card.amber { border-top: 4px solid var(--amber); }
.scenario-card.coral { border-top: 4px solid var(--coral); }
.scenario-card.blue { border-top: 4px solid var(--blue); }

.resume-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(16, 59, 58, 0.18);
  border-radius: var(--radius-md);
  background: var(--mint);
}
.resume-panel > div:first-child { display: grid; gap: 3px; }
.resume-panel span { color: var(--ink-2); font-size: 13px; }

.button-row, .review-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.button {
  max-width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 11px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, opacity 140ms ease;
}
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { opacity: 0.42; cursor: not-allowed; }
.button.primary { color: white; background: var(--teal); box-shadow: 0 6px 18px rgba(16, 59, 58, 0.16); }
.button.primary:hover { background: #174a48; }
.button.secondary { color: var(--teal); border-color: rgba(16, 59, 58, 0.18); background: rgba(255, 255, 255, 0.76); }

.intake-screen { padding: 32px 0 80px; }
.intake-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 760px);
  justify-content: center;
  gap: clamp(34px, 6vw, 82px);
  align-items: start;
}
.intake-rail { position: sticky; top: 24px; padding: 20px 0; }
.scenario-chip {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink-2);
  text-align: left;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
  cursor: pointer;
  text-decoration: none;
}
.progress-copy { display: flex; align-items: baseline; justify-content: space-between; margin: 30px 0 10px; }
.progress-copy span { color: var(--ink-2); font-size: 12px; }
.progress-copy strong { font-size: 24px; letter-spacing: -0.04em; }
.progress-track { width: 100%; height: 6px; overflow: hidden; border: 0; border-radius: 99px; background: #d9ddd5; appearance: none; }
.progress-track::-webkit-progress-bar { border-radius: 99px; background: #d9ddd5; }
.progress-track::-webkit-progress-value { border-radius: 99px; background: linear-gradient(90deg, var(--sage), var(--teal-2)); transition: width 220ms ease; }
.progress-track::-moz-progress-bar { border-radius: 99px; background: linear-gradient(90deg, var(--sage), var(--teal-2)); transition: width 220ms ease; }
.section-progress { display: grid; gap: 13px; margin: 30px 0; padding: 0; list-style: none; }
.section-progress li { display: grid; grid-template-columns: 10px 1fr; gap: 10px; align-items: center; color: #75817b; font-size: 11px; line-height: 1.25; }
.section-progress li > span { width: 8px; height: 8px; border: 1px solid #aab4ae; border-radius: 50%; }
.section-progress li.active { color: var(--ink); font-weight: 800; }
.section-progress li.active > span { background: var(--coral); border-color: var(--coral); box-shadow: 0 0 0 4px rgba(223, 139, 104, 0.12); }
.section-progress li.done > span { background: var(--sage); border-color: var(--sage); }
.rail-note { display: grid; gap: 2px; padding-top: 18px; border-top: 1px solid var(--line); }
.rail-note strong { font-size: 11px; }
.rail-note span { color: var(--ink-2); font-size: 10px; }

.question-stage { min-width: 0; }
.urgent-banner {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  margin-bottom: 14px;
  padding: 16px 18px;
  border: 1px solid rgba(167, 60, 52, 0.25);
  border-radius: var(--radius-md);
  background: var(--red-soft);
  color: #702a25;
}
.urgent-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--red); color: white; font-weight: 900; }
.urgent-banner strong { display: block; margin-bottom: 3px; font-size: 13px; }
.urgent-banner p { margin: 0; font-size: 12px; line-height: 1.45; }

.question-card {
  min-height: 590px;
  padding: clamp(26px, 5vw, 54px);
  border: 1px solid rgba(16, 59, 58, 0.12);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}
.question-meta { display: flex; justify-content: space-between; gap: 20px; align-items: baseline; margin-bottom: 20px; }
.question-meta .eyebrow { margin: 0; }
.text-button { padding: 0; border: 0; background: none; color: var(--teal-2); font-size: 12px; font-weight: 800; text-decoration: underline; text-decoration-color: rgba(29, 90, 86, 0.3); text-underline-offset: 3px; cursor: pointer; }
.question-card h1 { max-width: 660px; margin-bottom: 16px; font-family: Georgia, serif; font-size: clamp(30px, 4vw, 44px); font-weight: 500; }
.question-helper { max-width: 620px; margin-bottom: 28px; color: var(--ink-2); font-size: 14px; line-height: 1.55; }
.option-list { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; }
.option-card {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 13px;
  align-items: center;
  min-height: 58px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper-2);
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}
.option-card:hover { transform: translateX(2px); border-color: var(--line-dark); }
.option-card:has(input:focus-visible) { outline: 3px solid rgba(223, 139, 104, 0.8); outline-offset: 3px; }
.option-card:has(input:checked) { border-color: var(--teal-2); background: #eaf1ec; box-shadow: inset 4px 0 0 var(--teal-2); }
.option-card input { position: absolute; opacity: 0; pointer-events: none; }
.option-control { width: 19px; height: 19px; border: 1.5px solid #8d9a94; border-radius: 50%; background: white; }
input[type="checkbox"] + .option-control { border-radius: 5px; }
.option-card input:checked + .option-control { border: 5px solid var(--teal-2); }
input[type="checkbox"]:checked + .option-control { border-width: 2px; background: var(--teal-2); box-shadow: inset 0 0 0 4px white; }
.option-copy { display: grid; min-width: 0; gap: 2px; }
.option-copy strong { font-size: 13px; line-height: 1.35; }
.option-copy small { color: var(--ink-2); font-size: 11px; }
textarea {
  width: 100%;
  min-height: 190px;
  resize: vertical;
  padding: 16px 17px;
  border: 1px solid var(--line-dark);
  border-radius: 14px;
  color: var(--ink);
  background: var(--paper-2);
  font-size: 15px;
  line-height: 1.55;
}
textarea::placeholder { color: #86918b; }
.field-footer { display: flex; justify-content: space-between; margin-top: 7px; color: #77837d; font-size: 10px; }
.validation-message { margin: 16px 0 0; color: var(--red); font-size: 12px; font-weight: 750; }
.question-actions { display: flex; justify-content: space-between; gap: 16px; margin-top: 18px; }
.question-actions .button { min-width: 130px; }

.review-screen { padding: 48px 0 90px; }
.review-header { display: flex; justify-content: space-between; gap: 48px; align-items: end; margin-bottom: 34px; }
.review-header h1 { max-width: 730px; margin-bottom: 12px; font-family: Georgia, serif; font-size: clamp(34px, 5vw, 56px); font-weight: 500; }
.review-header p:last-child { max-width: 700px; margin: 0; color: var(--ink-2); }
.review-actions { justify-content: flex-end; max-width: 440px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 38px; }
.metric-card { display: grid; gap: 8px; min-height: 120px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(255, 255, 255, 0.7); }
.metric-card strong { font-size: 18px; line-height: 1.2; }
.metric-card span { align-self: end; color: var(--ink-2); font-size: 11px; }
.metric-card.critical { border-top: 4px solid var(--red); background: var(--red-soft); }
.metric-card.attention { border-top: 4px solid var(--amber); }
.metric-card.calm { border-top: 4px solid var(--sage); }

.stack-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 13px; }
.stack-heading h2, .summary-heading h2 { margin: 0; font-family: Georgia, serif; font-size: 28px; font-weight: 500; }
.stack-heading > span { color: var(--ink-2); font-size: 11px; }
.flag-stack { margin-bottom: 42px; }
.flag-card { display: grid; grid-template-columns: 90px 1fr; gap: 18px; margin-bottom: 8px; padding: 17px 20px; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(255, 255, 255, 0.78); }
.flag-card.critical { border-left: 5px solid var(--red); }
.flag-card.high { border-left: 5px solid var(--coral); }
.flag-card.medium { border-left: 5px solid var(--amber); }
.flag-level { padding-top: 2px; color: var(--ink-2); font-size: 10px; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; }
.flag-card h3 { margin: 0 0 5px; font-size: 15px; letter-spacing: -0.01em; }
.flag-card p { margin: 0 0 7px; color: var(--ink-2); font-size: 12px; }
.flag-card code { padding: 3px 6px; border-radius: 5px; background: #eef0ec; color: #59655f; font-size: 9px; }
.empty-flags { display: grid; gap: 3px; padding: 20px; border: 1px solid var(--line); border-left: 5px solid var(--sage); border-radius: var(--radius-md); background: rgba(255, 255, 255, 0.7); }
.empty-flags span { color: var(--ink-2); font-size: 12px; }

.review-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 24px; align-items: start; }
.review-layout.single-column { grid-template-columns: minmax(0, 1fr); }
.summary-stack { display: grid; gap: 18px; }
.summary-section { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(255, 255, 255, 0.74); }
.summary-heading { padding: 20px 24px 16px; border-bottom: 1px solid var(--line); background: rgba(216, 233, 223, 0.35); }
.summary-heading .eyebrow { margin-bottom: 5px; }
.response-list { display: grid; }
.response-card { padding: 19px 24px; border-bottom: 1px solid #e6e6de; }
.response-card:last-child { border-bottom: 0; }
.response-card h3 { margin: 0 0 7px; color: var(--ink-2); font-size: 11px; font-weight: 750; line-height: 1.4; letter-spacing: 0; }
.response-card > p { margin: 0; white-space: pre-wrap; font-size: 14px; font-weight: 650; line-height: 1.5; }
.response-card details { margin-top: 10px; color: #65716b; font-size: 10px; }
.response-card summary { width: fit-content; cursor: pointer; }
.response-card details span { display: block; max-width: 650px; margin-top: 5px; line-height: 1.45; }
.logic-panel { position: sticky; top: 24px; padding: 24px; border-radius: var(--radius-lg); background: var(--teal); color: var(--paper-2); box-shadow: var(--shadow-small); }
.logic-panel .eyebrow { color: #b9d2c3; }
.logic-panel h2 { margin-bottom: 18px; font-family: Georgia, serif; font-size: 28px; font-weight: 500; }
.logic-panel ol { margin: 0 0 24px; padding-left: 20px; color: #d6e2dc; font-size: 12px; }
.logic-panel li { margin-bottom: 10px; padding-left: 4px; }
.logic-fact { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.logic-fact span { color: #bfd1c8; font-size: 11px; }
.logic-fact strong { color: #f4cb90; font-size: 18px; }
.review-footer { display: flex; justify-content: center; margin-top: 44px; }
.danger-text { color: var(--red); }

.ready-start-screen { padding: 50px 0 80px; }
.ready-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.65fr);
  gap: clamp(36px, 7vw, 100px);
  align-items: center;
  min-height: 390px;
}
.ready-setup {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(340px, 1.3fr);
  gap: 16px;
  margin: 30px 0 52px;
  padding: 24px;
  border: 1px solid rgba(16, 59, 58, 0.14);
  border-top: 5px solid var(--sage);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-small);
}
.ready-setup > .validation-message { grid-column: 1 / -1; margin: 0; }
.plan-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 40px;
  margin-bottom: 24px;
}
.plan-heading h2 { margin-bottom: 0; font-family: Georgia, serif; font-size: clamp(30px, 4vw, 46px); font-weight: 500; }
.plan-heading > p { max-width: 500px; margin-bottom: 4px; color: var(--ink-2); font-size: 14px; }
.plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.plan-card {
  position: relative;
  min-height: 250px;
  padding: 25px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--sage);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.74);
}
.plan-card:nth-child(2) { border-top-color: var(--amber); }
.plan-card:nth-child(3) { border-top-color: var(--coral); }
.plan-card:nth-child(4) { border-top-color: var(--teal-2); }
.plan-card:nth-child(5) { grid-column: 1 / -1; border-top-color: var(--blue); }
.plan-number { display: block; margin-bottom: 30px; color: var(--line-dark); font: 600 13px/1 ui-monospace, monospace; }
.plan-card h3 { max-width: 430px; margin-bottom: 12px; font-family: Georgia, serif; font-size: 25px; font-weight: 500; line-height: 1.18; }
.plan-card > p:last-child { margin: 0; color: var(--ink-2); font-size: 13px; line-height: 1.62; }
.ready-start-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-top: 18px;
  padding: 22px 24px;
  border: 1px solid rgba(16, 59, 58, 0.16);
  border-radius: var(--radius-md);
  background: var(--mint);
}
.ready-start-actions > div { display: grid; gap: 3px; }
.ready-start-actions strong { font-size: 13px; }
.ready-start-actions span { color: var(--ink-2); font-size: 12px; }
.ready-check-screen { padding: 32px 0 80px; }
.ready-question-card { min-height: 650px; }
.ready-choice.last-choice:has(input:not(:checked)) { opacity: 0.78; }
.help-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 18px; }
.teachback-feedback {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--sage);
  border-radius: var(--radius-md);
  background: #edf5ef;
}
.teachback-feedback.needs-work { border-left-color: var(--amber); background: var(--amber-soft); }
.teachback-feedback.needs-person { border-left-color: var(--coral); background: var(--coral-soft); }
.teachback-feedback .eyebrow { margin-bottom: 6px; }
.teachback-feedback h2 { margin-bottom: 8px; font-family: Georgia, serif; font-size: 25px; font-weight: 500; }
.teachback-feedback > p:not(.eyebrow) { margin-bottom: 14px; color: var(--ink-2); font-size: 13px; line-height: 1.55; }
.concept-results, .attempt-concepts { display: flex; flex-wrap: wrap; gap: 7px; }
.concept-hit, .concept-miss {
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  padding: 5px 9px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
}
.concept-hit { color: #245840; background: #dcecdf; }
.concept-miss { color: #7d3c24; background: #f8ddc7; }
.ready-complete-screen { padding: 54px 0 90px; }
.completion-hero { max-width: 860px; margin-bottom: 34px; }
.completion-hero h1 { margin-bottom: 16px; font-family: Georgia, serif; font-size: clamp(40px, 6vw, 68px); font-weight: 500; }
.completion-hero > p:not(.eyebrow) { max-width: 760px; color: var(--ink-2); font-size: 17px; line-height: 1.58; }
.completion-token { display: inline-grid; gap: 3px; margin-top: 10px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, 0.72); }
.completion-token span { color: var(--ink-2); font-size: 9px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.completion-token strong { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 12px; letter-spacing: 0.02em; }
.caregiver-results { display: grid; gap: 8px; max-width: 820px; }
.caregiver-result {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: center;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.72);
}
.caregiver-result > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: white; background: var(--teal-2); font-size: 11px; font-weight: 900; }
.caregiver-result.review > span { background: var(--coral); }
.caregiver-result div { display: grid; gap: 2px; }
.caregiver-result strong { font-size: 13px; }
.caregiver-result small { color: var(--ink-2); font-size: 11px; }
.completion-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.understanding-note { max-width: 720px; margin-top: 24px; color: var(--ink-2); font-size: 11px; }
.attempt-card h3 { display: flex; align-items: center; gap: 8px; }
.attempt-concepts { margin-top: 12px; }
.plan-dialog { width: min(700px, calc(100vw - 30px)); }
.dialog-plan-list { display: grid; gap: 14px; }
.dialog-plan-list article { display: grid; gap: 4px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.dialog-plan-list article:last-child { padding-bottom: 0; border-bottom: 0; }
.dialog-plan-list strong { color: var(--teal-2); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.dialog-plan-list span { color: var(--ink-2); font-size: 13px; line-height: 1.55; }

.intro-copy h1, .question-card h1, .scenario-card > strong, .plan-card h3, .review-header h1, .completion-hero h1 {
  overflow-wrap: break-word;
}

.rationale-dialog {
  width: min(540px, calc(100vw - 30px));
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  color: var(--ink);
  background: var(--paper-2);
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.24);
}
.rationale-dialog::backdrop { background: rgba(11, 33, 32, 0.55); backdrop-filter: blur(4px); }
.rationale-dialog form { position: relative; padding: 32px; }
.rationale-dialog h2 { margin-right: 30px; font-family: Georgia, serif; font-size: 30px; font-weight: 500; }
.rationale-dialog p:not(.eyebrow) { color: var(--ink-2); font-size: 14px; line-height: 1.6; }
.dialog-close { position: absolute; right: 16px; top: 13px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #e9e9e2; font-size: 24px; cursor: pointer; }
.dialog-rule { display: grid; gap: 4px; margin-top: 22px; padding: 16px; border-left: 4px solid var(--sage); background: var(--mint); }
.dialog-rule strong { font-size: 12px; }
.dialog-rule span { color: var(--ink-2); font-size: 12px; }

.toast {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: 24px;
  max-width: calc(100vw - 30px);
  padding: 11px 16px;
  border-radius: 99px;
  color: white;
  background: var(--teal);
  box-shadow: var(--shadow-small);
  font-size: 12px;
  font-weight: 750;
  opacity: 0;
  transform: translate(-50%, 15px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

.site-footer { width: var(--content); margin: 0 auto; padding: 24px 0 32px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; color: #718079; font-size: 10px; }
.noscript { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 40px; color: white; background: var(--teal); text-align: center; }

@media (max-width: 900px) {
  .intro-grid { grid-template-columns: 1fr; gap: 34px; }
  .intro-copy h1 { font-size: clamp(44px, 10vw, 72px); }
  .patient-card { max-width: 520px; }
  .visit-starter { grid-template-columns: 1fr; }
  .other-reason, .visit-starter > .validation-message, .starter-button { grid-column: 1; }
  .check-in-note { grid-column: 1; }
  .scenario-grid { grid-template-columns: 1fr; }
  .scenario-card { min-height: 230px; }
  .scenario-card .scenario-number { margin-bottom: 25px; }
  .intake-shell { grid-template-columns: 1fr; gap: 16px; }
  .intake-rail { position: static; display: grid; grid-template-columns: 1fr auto; gap: 14px 24px; padding: 0; }
  .scenario-chip { grid-column: 1 / -1; }
  .progress-copy { margin: 0; }
  .progress-track { grid-column: 1 / -1; }
  .section-progress, .rail-note { display: none; }
  .review-header { display: grid; }
  .review-actions { justify-content: flex-start; max-width: none; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .review-layout { grid-template-columns: 1fr; }
  .logic-panel { position: static; }
  .ready-hero { grid-template-columns: 1fr; gap: 34px; }
  .ready-patient-card { max-width: 520px; }
  .ready-setup { grid-template-columns: 1fr; margin-top: 24px; }
  .ready-setup > .validation-message { grid-column: 1; }
  .plan-heading { display: grid; gap: 10px; }
}

@media (max-width: 620px) {
  :root { --content: min(100% - 24px, 1180px); --radius-xl: 21px; }
  .site-header { min-height: 72px; }
  .brand { min-width: 0; }
  .brand > span:last-child { min-width: 0; }
  .brand strong { line-height: 1.2; }
  .brand small { display: none; }
  .privacy-pill { flex: 0 0 auto; padding: 8px 10px; font-size: 10px; white-space: nowrap; }
  .start-screen { padding-top: 28px; }
  .journey-switcher { gap: 6px; margin-bottom: 30px; padding: 5px; }
  .journey-switcher a { padding: 10px 11px; }
  .journey-switcher span { font-size: 8px; letter-spacing: 0.07em; }
  .journey-switcher strong { font-size: 12px; line-height: 1.28; }
  .intro-grid { min-height: 0; }
  .intro-copy h1 { font-size: clamp(36px, 10.8vw, 52px); line-height: 1.1; letter-spacing: 0; }
  .lede { font-size: 16px; }
  .patient-card { padding: 24px; }
  .patient-portrait { width: 132px; height: 132px; border-radius: 28px; }
  .scope-note { grid-template-columns: 1fr; gap: 8px; margin-bottom: 48px; }
  .scenario-heading { display: grid; gap: 10px; }
  .visit-starter { gap: 22px; padding: 20px 16px; }
  .starter-field label strong { font-size: 20px; }
  .starter-field input, .starter-field select { min-height: 60px; font-size: 16px; }
  .starter-button { width: 100%; min-width: 0; }
  .check-in-note { font-size: 14px; text-align: center; }
  .scenario-card > strong { line-height: 1.2; letter-spacing: 0; }
  .resume-panel { align-items: stretch; flex-direction: column; }
  .resume-panel .button-row { display: grid; grid-template-columns: 1fr 1.3fr; }
  .intake-screen { padding-top: 16px; }
  .question-card { min-height: 560px; padding: 26px 19px; }
  .question-card h1 { font-size: clamp(27px, 8.2vw, 31px); line-height: 1.15; letter-spacing: 0; }
  .question-meta { align-items: start; }
  .question-meta .text-button { max-width: 100px; text-align: right; }
  .option-card { min-height: 62px; padding: 12px; }
  .option-copy strong { font-size: 13px; line-height: 1.42; letter-spacing: 0; overflow-wrap: break-word; }
  .question-actions { position: sticky; bottom: 0; z-index: 20; padding: 12px 0 max(12px, env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(244, 241, 232, 0), var(--paper) 25%); }
  .question-actions .button { flex: 1; min-width: 0; }
  .urgent-banner { grid-template-columns: 28px 1fr; padding: 14px; }
  .urgent-icon { width: 26px; height: 26px; }
  .review-screen { padding-top: 28px; }
  .review-header h1 { font-size: 38px; }
  .review-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
  .review-actions .button { width: 100%; min-width: 0; }
  .review-actions .button.primary { grid-column: auto; }
  .metric-grid { grid-template-columns: 1fr; gap: 8px; }
  .metric-card { min-height: 108px; padding: 15px; }
  .metric-card strong { font-size: 15px; }
  .flag-card { grid-template-columns: 1fr; gap: 8px; }
  .response-card, .summary-heading { padding-left: 17px; padding-right: 17px; }
  .stack-heading { align-items: start; }
  .site-footer { display: grid; text-align: center; }
  .ready-start-screen { padding-top: 28px; }
  .ready-hero { min-height: 0; }
  .plan-grid { grid-template-columns: 1fr; }
  .plan-card:nth-child(5) { grid-column: 1; }
  .plan-card { min-height: 0; padding: 22px 19px; }
  .plan-card h3 { font-size: 23px; line-height: 1.18; letter-spacing: 0; }
  .ready-start-actions { align-items: stretch; flex-direction: column; padding: 19px; }
  .ready-start-actions .button { width: 100%; }
  .ready-check-screen { padding-top: 16px; }
  .ready-question-card { min-height: 620px; }
  .help-actions { display: grid; justify-items: start; }
  .teachback-feedback { padding: 15px; }
  .completion-hero h1 { font-size: 38px; line-height: 1.08; letter-spacing: -0.018em; }
  .ready-complete-screen { padding-top: 30px; }
  .completion-actions { display: grid; grid-template-columns: 1fr; }
  .completion-actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

@media print {
  :root { --content: 100%; }
  body { background: white; color: black; font-size: 10pt; }
  .site-header, .no-print, .privacy-pill, .review-actions, .site-footer { display: none !important; }
  .review-screen { width: 100%; padding: 0; }
  .review-header { display: block; margin-bottom: 16pt; }
  .review-header h1 { font-size: 24pt; }
  .metric-grid { grid-template-columns: repeat(4, 1fr); gap: 6pt; }
  .metric-card, .flag-card, .summary-section { break-inside: avoid; box-shadow: none; background: white; }
  .review-layout { display: block; }
  .logic-panel { margin-top: 16pt; color: black; background: white; border: 1px solid #aaa; box-shadow: none; }
  .logic-panel .eyebrow, .logic-panel ol, .logic-fact span { color: #333; }
  .logic-fact strong { color: black; }
  .response-card details { display: none; }
}
