/* OPD Triage Lens — styles v1.0 (12 Nov 2026)
   Identity: "OPD token desk" — Swiss editorial clinical.
   Paper + ink navy + monospace data labels + the 4-colour triage band.
   Motion: transform + opacity only. Reduced-motion + low-motion mode honoured. */

:root {
  --paper: #fafaf6;
  --card: #ffffff;
  --ink: #14213d;
  --ink-soft: #4a5568;
  --ink-faint: #718096;
  --rule: #ddd8cc;
  --rule-strong: #14213d;
  --red: #c81e1e;
  --red-soft: #fdecec;
  --amber: #b45309;
  --amber-bright: #d97706;
  --amber-soft: #fdf3e3;
  --green: #15803d;
  --green-soft: #e9f7ee;
  --blue: #1d4ed8;
  --blue-soft: #e9f0fe;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1120px;
  --pad: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
a { color: var(--blue); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}
.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: #fff; padding: 10px 16px; z-index: 50;
}
.skip:focus { left: 8px; top: 8px; }

/* ---------- top bar ---------- */
.top { border-bottom: 2px solid var(--rule-strong); background: var(--paper); position: sticky; top: 0; z-index: 20; }
.top-in { display: flex; align-items: center; gap: 24px; min-height: 56px; }
.brand { display: flex; align-items: baseline; gap: 8px; text-decoration: none; color: var(--ink); }
.brand-mark { font-size: 22px; line-height: 1; }
.brand-name { font-weight: 800; letter-spacing: -0.02em; font-size: 18px; }
.brand-tag { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); letter-spacing: 0.08em; }
.top-nav { margin-left: auto; display: flex; gap: 18px; }
.top-nav a { color: var(--ink-soft); text-decoration: none; font-size: 14px; font-weight: 600; }
.top-nav a:hover { color: var(--ink); text-decoration: underline; }
.motion-toggle {
  font-family: var(--mono); font-size: 12px; background: transparent;
  border: 1px solid var(--rule-strong); border-radius: 999px; padding: 6px 12px; cursor: pointer; color: var(--ink);
}
.motion-toggle[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* ---------- hero ---------- */
.hero { padding: 64px 0 40px; border-bottom: 1px solid var(--rule); }
.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-soft); margin: 0 0 18px;
}
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.02; letter-spacing: -0.03em;
  margin: 0 0 12px; font-weight: 800;
}
.hero h1 em { font-style: normal; color: var(--red); }
.hero-hi { font-size: 20px; color: var(--ink-soft); margin: 0 0 16px; }
.lede { font-size: 18px; color: var(--ink-soft); max-width: 720px; margin: 0 0 28px; }
.band { display: grid; grid-template-columns: repeat(4, 1fr); border: 2px solid var(--rule-strong); margin-bottom: 28px; }
.band-chip { padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--rule-strong); }
.band-chip:last-child { border-right: 0; }
.band-chip .dot { width: 12px; height: 12px; border-radius: 50%; margin-bottom: 6px; }
.band-chip strong { font-family: var(--mono); font-size: 15px; letter-spacing: 0.05em; }
.band-chip span:last-child { font-size: 13px; color: var(--ink-soft); }
.band-chip.red .dot { background: var(--red); }
.band-chip.amber .dot { background: var(--amber-bright); }
.band-chip.green .dot { background: var(--green); }
.band-chip.blue .dot { background: var(--blue); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 0 0 10px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.stats div { padding: 14px 16px 14px 0; border-right: 1px solid var(--rule); margin-right: 16px; }
.stats div:last-child { border-right: 0; margin-right: 0; }
.stats dt { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-faint); margin-bottom: 4px; }
.stats dd { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; font-family: var(--mono); }
.fine { font-size: 13px; color: var(--ink-faint); }
.disclaimer {
  border: 2px solid var(--red); background: var(--red-soft);
  padding: 12px 16px; font-size: 15px; margin: 18px 0 0;
}
.disclaimer.small { font-size: 13px; padding: 10px 12px; }

/* ---------- sections ---------- */
section { padding: 56px 0; }
.section-no { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 8px; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 12px; }
h3 { font-size: 18px; margin: 24px 0 8px; }

/* ---------- counter ---------- */
.counter { border-bottom: 1px solid var(--rule); }
.counter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.field-label { display: block; font-weight: 600; font-size: 14px; margin: 18px 0 6px; }
textarea, input[type="text"], input[type="number"], input[type="search"] {
  width: 100%; font: inherit; color: var(--ink); background: var(--card);
  border: 2px solid var(--rule-strong); border-radius: 0; padding: 12px 14px;
}
textarea:focus, input:focus { outline: 3px solid var(--blue); outline-offset: 1px; }
textarea { resize: vertical; min-height: 84px; }
.intake-row { display: flex; gap: 12px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.voice-note { font-size: 13px; color: var(--ink-faint); flex: 1; min-width: 200px; }
.btn {
  font: inherit; font-weight: 700; cursor: pointer; border: 2px solid var(--rule-strong);
  background: var(--card); color: var(--ink); padding: 10px 18px; border-radius: 0;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary { background: var(--ink); color: #fff; }
.btn.primary:hover { background: #000; }
.btn.big { width: 100%; padding: 14px; font-size: 18px; margin-top: 18px; }
.btn.ghost { padding: 8px 14px; font-size: 14px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-family: var(--mono); font-size: 13px; padding: 6px 12px; cursor: pointer;
  background: var(--card); border: 1px solid var(--rule-strong); border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.chip:hover { background: var(--ink); color: #fff; transform: translateY(-1px); }
.opts { border: 1px solid var(--rule); margin: 18px 0 0; padding: 12px 14px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.opts legend { font-weight: 700; font-size: 14px; padding: 0 6px; }
.opts label { font-size: 14px; cursor: pointer; display: flex; gap: 6px; align-items: center; }
.vitals { margin-top: 18px; border: 1px solid var(--rule); padding: 12px 14px; }
.vitals summary { cursor: pointer; font-weight: 700; font-size: 14px; }
.vitals-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.vitals-grid label { font-size: 13px; font-weight: 600; display: flex; flex-direction: column; gap: 4px; }
.vitals-grid label:last-child { grid-column: 1 / -1; }
.error { color: var(--red); font-weight: 700; font-size: 14px; margin: 12px 0 0; }
.samples { font-size: 14px; color: var(--ink-soft); margin: 14px 0 0; }
.linklike { background: none; border: 0; padding: 0; color: var(--blue); font: inherit; cursor: pointer; text-decoration: underline; }

/* ---------- result ---------- */
.result { position: sticky; top: 76px; }
.result-empty { border: 2px dashed var(--rule-strong); padding: 32px 24px; text-align: center; }
.result-empty .big-num { font-family: var(--mono); font-size: 64px; margin: 0; color: var(--ink-faint); }
.result-card { border: 2px solid var(--rule-strong); background: var(--card); padding: 20px; animation: rise 0.35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.verdict-head { display: flex; align-items: center; gap: 14px; border-bottom: 2px solid var(--rule-strong); padding-bottom: 14px; }
.verdict-dot { width: 28px; height: 28px; border-radius: 50%; flex: none; border: 2px solid var(--rule-strong); }
.verdict-colour { font-family: var(--mono); font-size: 34px; font-weight: 800; letter-spacing: 0.02em; margin: 0; line-height: 1; }
.verdict-label { margin: 2px 0 0; color: var(--ink-soft); font-size: 14px; }
.conf { margin-left: auto; font-family: var(--mono); font-size: 12px; border: 1px solid var(--rule-strong); padding: 4px 10px; white-space: nowrap; }
.result-card[data-colour="RED"] { border-color: var(--red); }
.result-card[data-colour="RED"] .verdict-dot { background: var(--red); }
.result-card[data-colour="RED"] .verdict-colour { color: var(--red); }
.result-card[data-colour="AMBER"] { border-color: var(--amber-bright); }
.result-card[data-colour="AMBER"] .verdict-dot { background: var(--amber-bright); }
.result-card[data-colour="AMBER"] .verdict-colour { color: var(--amber); }
.result-card[data-colour="GREEN"] { border-color: var(--green); }
.result-card[data-colour="GREEN"] .verdict-dot { background: var(--green); }
.result-card[data-colour="GREEN"] .verdict-colour { color: var(--green); }
.result-card[data-colour="BLUE"] { border-color: var(--blue); }
.result-card[data-colour="BLUE"] .verdict-dot { background: var(--blue); }
.result-card[data-colour="BLUE"] .verdict-colour { color: var(--blue); }
.result-card[data-colour="UNKNOWN"] .verdict-dot { background: var(--ink-faint); }
.verdict-advice { font-size: 17px; font-weight: 600; margin: 16px 0; }
.verdict-facts { margin: 0; }
.verdict-facts div { display: grid; grid-template-columns: 130px 1fr; gap: 10px; padding: 8px 0; border-top: 1px solid var(--rule); font-size: 14px; }
.verdict-facts dt { color: var(--ink-faint); text-transform: uppercase; font-size: 11px; letter-spacing: 0.06em; padding-top: 2px; }
.verdict-facts dd { margin: 0; }
.notes { margin-top: 12px; }
.notes p { margin: 6px 0; font-size: 14px; padding: 8px 12px; background: var(--amber-soft); border-left: 4px solid var(--amber-bright); }
.notes.esc p { background: var(--blue-soft); border-left-color: var(--blue); }
.handoff-title { font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; margin: 20px 0 8px; }
.handoff {
  font-family: var(--mono); font-size: 12.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-word;
  background: var(--paper); border: 1px solid var(--rule); padding: 14px; margin: 0; max-height: 320px; overflow: auto;
}
.handoff-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; align-items: center; }
.copy-msg { font-size: 13px; color: var(--green); font-weight: 700; }

/* ---------- dial (CSS 3D) ---------- */
.dial-section { border-bottom: 1px solid var(--rule); }
.dial-stage { display: grid; grid-template-columns: 380px 1fr; gap: 48px; align-items: center; margin-top: 24px; perspective: 900px; }
.dial { display: flex; justify-content: center; }
.dial-face {
  position: relative; width: 320px; height: 320px; border-radius: 50%;
  background: conic-gradient(var(--red) 0deg 90deg, var(--amber-bright) 90deg 180deg, var(--green) 180deg 270deg, var(--blue) 270deg 360deg);
  border: 3px solid var(--rule-strong);
  transform-style: preserve-3d;
  transition: transform 0.25s ease-out;
  box-shadow: 0 18px 40px rgba(20, 33, 61, 0.18);
}
.quad {
  position: absolute; width: 50%; height: 50%; border: 0; background: transparent; cursor: pointer;
  color: #fff; font-family: var(--mono); font-weight: 800; font-size: 15px; letter-spacing: 0.08em;
}
.quad span { position: absolute; }
.q-red { top: 0; right: 0; border-top-right-radius: 100%; }
.q-red span { top: 26px; right: 34px; }
.q-amber { bottom: 0; right: 0; border-bottom-right-radius: 100%; }
.q-amber span { bottom: 26px; right: 26px; }
.q-green { bottom: 0; left: 0; border-bottom-left-radius: 100%; }
.q-green span { bottom: 26px; left: 30px; }
.q-blue { top: 0; left: 0; border-top-left-radius: 100%; }
.q-blue span { top: 26px; left: 34px; }
.dial-hub {
  position: absolute; top: 50%; left: 50%; width: 110px; height: 110px; transform: translate(-50%, -50%);
  background: var(--paper); border: 3px solid var(--rule-strong); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-weight: 800; font-size: 20px; letter-spacing: 0.05em;
}
.needle {
  position: absolute; left: 50%; bottom: 50%; width: 4px; height: 138px; margin-left: -2px;
  background: var(--ink); transform-origin: 50% 100%; transform: rotate(-90deg);
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.needle::after {
  content: ""; position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
  border: 7px solid transparent; border-bottom: 12px solid var(--ink);
}
.dial-legend { margin: 0; }
.dial-legend div { padding: 12px 0; border-top: 1px solid var(--rule); }
.dial-legend dt { font-family: var(--mono); font-weight: 800; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.dial-legend dd { margin: 4px 0 0; color: var(--ink-soft); font-size: 15px; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.sw.red { background: var(--red); } .sw.amber { background: var(--amber-bright); }
.sw.green { background: var(--green); } .sw.blue { background: var(--blue); }

/* ---------- corpus ---------- */
.corpus-section { border-bottom: 1px solid var(--rule); }
.corpus-controls { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin: 20px 0; }
.filter-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-btn {
  font-family: var(--mono); font-size: 13px; font-weight: 700; padding: 8px 14px; cursor: pointer;
  background: var(--card); border: 2px solid var(--rule-strong);
}
.filter-btn.active { background: var(--ink); color: #fff; }
.corpus-search { font-size: 14px; font-weight: 600; display: flex; gap: 8px; align-items: center; flex: 1; min-width: 220px; }
.corpus-search input { max-width: 320px; }
.corpus-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.rule-card { background: var(--card); border: 2px solid var(--rule-strong); padding: 16px; border-top-width: 8px; }
.rule-card[data-colour="RED"] { border-top-color: var(--red); }
.rule-card[data-colour="AMBER"] { border-top-color: var(--amber-bright); }
.rule-card[data-colour="GREEN"] { border-top-color: var(--green); }
.rule-card[data-colour="BLUE"] { border-top-color: var(--blue); }
.rule-card h3 { margin: 0 0 4px; font-size: 16px; }
.rule-tag { font-family: var(--mono); font-size: 11px; font-weight: 800; letter-spacing: 0.06em; }
.rule-tag.RED { color: var(--red); } .rule-tag.AMBER { color: var(--amber); }
.rule-tag.GREEN { color: var(--green); } .rule-tag.BLUE { color: var(--blue); }
.rule-kws { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); margin: 8px 0; line-height: 1.7; }
.rule-advice { font-size: 14px; margin: 8px 0 0; }
.rule-flag { display: inline-block; margin-top: 8px; font-family: var(--mono); font-size: 11px; font-weight: 800; color: var(--red); border: 1px solid var(--red); padding: 2px 8px; }

/* ---------- how ---------- */
.steps { list-style: none; margin: 24px 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.steps li { border-top: 3px solid var(--rule-strong); padding-top: 12px; font-size: 15px; }
.steps strong { display: block; font-size: 16px; margin-bottom: 4px; }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 32px; }
.how-grid h3 { border-top: 2px solid var(--rule-strong); padding-top: 10px; }
.how-grid ul { padding-left: 18px; }
.how-grid li { margin-bottom: 6px; }
code { font-family: var(--mono); font-size: 0.85em; background: #eceade; padding: 1px 5px; }

/* ---------- footer ---------- */
.foot { padding: 40px 0 48px; font-size: 14px; color: var(--ink-soft); }
.foot p { margin: 6px 0; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .counter-grid { grid-template-columns: 1fr; gap: 32px; }
  .result { position: static; }
  .dial-stage { grid-template-columns: 1fr; gap: 32px; }
  .corpus-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .how-grid { grid-template-columns: 1fr; gap: 16px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats div:nth-child(2) { border-right: 0; }
  .top-nav { display: none; }
}
@media (max-width: 620px) {
  .brand-tag { display: none; }
  .band { grid-template-columns: 1fr 1fr; }
  .band-chip:nth-child(2) { border-right: 0; }
  .band-chip:nth-child(1), .band-chip:nth-child(2) { border-bottom: 1px solid var(--rule-strong); }
  .corpus-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .vitals-grid { grid-template-columns: 1fr; }
  .dial-face { width: 280px; height: 280px; }
  .needle { height: 118px; }
  .verdict-facts div { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- reduced motion / low motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
html[data-low-motion="true"] *, html[data-low-motion="true"] *::before, html[data-low-motion="true"] *::after {
  animation-duration: 0.01ms !important; transition-duration: 0.01ms !important;
}
html[data-low-motion="true"] { scroll-behavior: auto; }

/* ---------- print: handoff + prevention plan (see end of file) ---------- */

/* ---------- Prevent mode (v1.1) ---------- */
.mode-switch { display: flex; gap: 0; margin: 0 0 28px; max-width: 560px; border: 2px solid var(--rule-strong); }
.mode-btn {
  flex: 1; font: inherit; font-weight: 700; font-size: 15px; padding: 12px 16px; cursor: pointer;
  background: var(--card); color: var(--ink); border: 0; border-right: 2px solid var(--rule-strong);
  transition: background 0.15s ease, color 0.15s ease;
}
.mode-btn:last-child { border-right: 0; }
.mode-btn.active { background: var(--ink); color: #fff; }
.prevent-section { border-bottom: 1px solid var(--rule); }
.prevent-steps {
  list-style: none; margin: 24px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0;
  border: 2px solid var(--rule-strong); counter-reset: pstep;
}
.prevent-steps li {
  flex: 1; min-width: 90px; padding: 10px 12px; font-family: var(--mono); font-size: 12px;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint);
  border-right: 1px solid var(--rule-strong); text-align: center;
}
.prevent-steps li:last-child { border-right: 0; }
.prevent-steps li[aria-current="step"] { background: var(--ink); color: #fff; }
.prevent-step { margin-top: 24px; }
.prevent-step h3 { margin-top: 0; }
.p-fieldset { border: 1px solid var(--rule); margin: 18px 0 0; padding: 12px 14px 16px; }
.p-fieldset legend { font-weight: 700; font-size: 14px; padding: 0 6px; }
.p-fieldset label { font-size: 14px; cursor: pointer; display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; }
.p-fieldset .field-label { margin: 14px 0 4px; }
.p-fieldset .field-label:first-of-type { margin-top: 6px; }
.p-fieldset select {
  width: 100%; font: inherit; color: var(--ink); background: var(--card);
  border: 2px solid var(--rule-strong); border-radius: 0; padding: 10px 12px;
}
.p-fieldset select:focus { outline: 3px solid var(--blue); outline-offset: 1px; }
.urgent-field { border: 2px solid var(--red); background: var(--red-soft); }
.demo-bar {
  border: 1px solid var(--rule); padding: 12px 14px; margin-top: 18px;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.demo-bar p { margin: 0 8px 0 0; font-size: 14px; }
.prevent-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; align-items: start; }
.nav-row { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.panel { border: 2px solid var(--blue); background: var(--blue-soft); padding: 12px 16px; margin: 18px 0; }
.panel h3 { margin: 0 0 6px; }
.panel p { margin: 6px 0; font-size: 15px; }
.signal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 18px; }
.signal-card { background: var(--card); border: 2px solid var(--rule-strong); border-top-width: 8px; padding: 16px; }
.signal-card h3 { margin: 0 0 8px; font-size: 16px; }
.signal-card.level-lower { border-top-color: var(--green); }
.signal-card.level-review { border-top-color: var(--amber-bright); }
.signal-card.level-strong { border-top-color: var(--red); }
.signal-level { font-family: var(--mono); font-size: 16px; font-weight: 800; margin: 0 0 10px; }
.signal-level .score { font-size: 22px; }
.signal-card.level-lower .signal-level { color: var(--green); }
.signal-card.level-review .signal-level { color: var(--amber); }
.signal-card.level-strong .signal-level { color: var(--red); }
.signal-card ul { padding-left: 18px; margin: 8px 0; font-size: 14px; }
.signal-card li { margin-bottom: 4px; }
.signal-card p { font-size: 14px; }
.next-step {
  border: 2px solid var(--rule-strong); background: var(--card);
  padding: 14px 16px; font-size: 16px; margin: 18px 0;
}
.triage-body h3 { font-size: 18px; }
.triage-body h4 { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; margin: 18px 0 4px; }
.triage-body p { margin: 6px 0; }
.triage-urgent { border: 2px solid var(--red); background: var(--red-soft); padding: 14px 16px; margin: 0 0 12px; }
.triage-urgent h3 { margin: 0 0 8px; color: var(--red); }
.referral-count { font-family: var(--mono); font-size: 14px; font-weight: 700; margin: 18px 0 10px; }
.schedule-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--rule-strong); }
.schedule-row { border-bottom: 1px solid var(--rule); padding: 14px 0; }
.schedule-row label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-weight: 700; font-size: 16px; }
.schedule-row input[type="checkbox"] { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--green); }
.schedule-name { flex: 1; }
.schedule-row input[type="checkbox"]:checked ~ .schedule-name { text-decoration: line-through; color: var(--ink-faint); }
.schedule-meta { display: block; font-family: var(--mono); font-size: 12.5px; color: var(--ink-soft); margin: 6px 0 2px 30px; }
.schedule-why { display: block; font-size: 14px; color: var(--ink-soft); margin-left: 30px; }
.schedule-deferred { border: 2px solid var(--red); background: var(--red-soft); padding: 14px 16px; list-style: none; }

@media (max-width: 960px) {
  .prevent-grid { grid-template-columns: 1fr; }
  .signal-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .mode-switch { flex-direction: column; }
  .mode-btn { border-right: 0; border-bottom: 2px solid var(--rule-strong); }
  .mode-btn:last-child { border-bottom: 0; }
  .prevent-steps li { min-width: 50%; border-bottom: 1px solid var(--rule-strong); }
}

/* ---------- print: handoff + prevention plan ---------- */
@media print {
  body * { visibility: hidden; }
  .result-card, .result-card * { visibility: visible; }
  .result-card { position: absolute; top: 0; left: 0; width: 100%; border: 0; animation: none; }
  #pSummaryText { visibility: visible; position: absolute; top: 0; left: 0; width: 100%; }
  .handoff-actions { display: none; }
}
