/* ============================================================
   Pediatric Dose Calculator
   Written for a parent with a sick child and a phone in one hand:
   one friendly sans (Figtree), large type, big tap targets, and
   one calm teal for everything you can act on.
   Light is the default for everyone; the toggle stamps data-theme="dark".
   ============================================================ */

:root {
  color-scheme: light;
  --bg:        #faf8f4;
  --surface:   #ffffff;
  --surface-2: #f3f0ea;
  --line:      #e3ddd2;
  --line-soft: #eee9e0;
  --text:      #1b2430;
  --text-2:    #4a5563;
  --text-3:    #6b7480;

  --primary:      #0f766e;
  --primary-ink:  #0b5d56;
  --primary-soft: #e3f3ef;
  --primary-line: #9fd5ca;
  --on-primary:   #ffffff;

  --stop:        #b42318;
  --stop-bg:     #fdf0ee;
  --stop-line:   #f1a59c;
  --doctor:      #8a4b06;
  --doctor-bg:   #fff6e5;
  --doctor-line: #f0c26f;
  --info:        #1f5fbf;
  --info-bg:     #eef4fd;
  --info-line:   #b3cdf2;

  --shadow-sm: 0 1px 2px rgba(27, 36, 48, 0.06);
  --shadow:    0 1px 2px rgba(27, 36, 48, 0.05), 0 8px 24px rgba(27, 36, 48, 0.07);
  --show-sun: none;
  --show-moon: block;

  --radius-sm: 10px;
  --radius:    14px;
  --radius-lg: 20px;
  --font: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --wrap: 1120px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f141a; --surface: #161d25; --surface-2: #1c252f; --line: #2a3542; --line-soft: #222c37;
  --text: #e9eef4; --text-2: #b0bbc8; --text-3: #8b98a7;
  --primary: #4fd1c0; --primary-ink: #7fe0d3; --primary-soft: rgba(79, 209, 192, 0.12); --primary-line: rgba(79, 209, 192, 0.4); --on-primary: #06201d;
  --stop: #ff8a7e; --stop-bg: rgba(255, 107, 94, 0.12); --stop-line: rgba(255, 138, 126, 0.5);
  --doctor: #ffc56b; --doctor-bg: rgba(255, 193, 94, 0.1); --doctor-line: rgba(255, 197, 107, 0.45);
  --info: #8ab8ff; --info-bg: rgba(110, 160, 255, 0.1); --info-line: rgba(138, 184, 255, 0.4);
  --shadow-sm: none; --shadow: 0 1px 0 rgba(255, 255, 255, 0.03);
  --show-sun: block; --show-moon: none;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 17px/1.6 var(--font); -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
img, svg { max-width: 100%; }
a { color: var(--primary-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--primary); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 10px 14px; z-index: 200; border-radius: var(--radius-sm); }
.skip:focus { left: 8px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 16px; }
@media (min-width: 700px) { .wrap { padding-inline: 28px; } }

/* ----------------------------------------------------------- chrome */

.draft-banner {
  background: var(--stop-bg); color: var(--text); border-bottom: 1px solid var(--stop-line);
  padding: 9px 16px; font-size: 15px; text-align: center;
}
.draft-banner strong { color: var(--stop); }

.help-bar { background: var(--surface-2); border-bottom: 1px solid var(--line-soft); font-size: 14px; color: var(--text-2); }
.help-inner { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 18px; padding-block: 7px; }
.help-bar a { color: var(--text); font-weight: 600; text-decoration: none; white-space: nowrap; }
.help-bar a:hover { color: var(--stop); text-decoration: underline; }
.help-bar .dot { color: var(--stop); margin-right: 6px; }

.site-head {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.head-inner { display: flex; align-items: center; gap: 10px 26px; flex-wrap: wrap; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand:hover { color: var(--text); text-decoration: none; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px; flex: 0 0 auto;
  display: grid; place-items: center; background: var(--primary); color: var(--on-primary);
  font: 800 14px/1 var(--font); letter-spacing: -0.02em;
}
.brand-name { font: 700 18px/1.1 var(--font); letter-spacing: -0.01em; white-space: nowrap; }
.brand-name em { color: var(--primary); font-style: normal; }
.site-nav { display: flex; gap: 4px; margin-left: auto; font-size: 16px; font-weight: 500; }
.site-nav a { color: var(--text-2); text-decoration: none; padding: 8px 12px; border-radius: 999px; white-space: nowrap; }
.site-nav a:hover { color: var(--text); background: var(--surface-2); }
.site-nav a[aria-current] { color: var(--primary-ink); background: var(--primary-soft); }
.theme-btn {
  display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 auto;
  background: transparent; border: 1px solid var(--line); color: var(--text-2);
  border-radius: 999px; cursor: pointer; padding: 0;
}
.theme-btn:hover { border-color: var(--primary); color: var(--primary); }
.theme-btn svg { width: 20px; height: 20px; }
.theme-btn .i-sun { display: var(--show-sun); }
.theme-btn .i-moon { display: var(--show-moon); }
@media (max-width: 760px) {
  .head-inner { padding-block: 10px 0; }
  .theme-btn { margin-left: auto; width: 36px; height: 36px; }
  .site-nav {
    order: 3; width: calc(100% + 32px); margin: 0 -16px; padding: 4px 12px 8px;
    overflow-x: auto; scrollbar-width: none; font-size: 15px;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { padding: 7px 10px; }
  .hide-sm { display: none; }
}

.main { padding-block: 28px 80px; }

.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 0 0 18px; font-size: 14px; color: var(--text-3); }
.crumbs li:not(:last-child)::after { content: "›"; margin-left: 6px; color: var(--text-3); }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--primary); text-decoration: underline; }

/* ----------------------------------------------------------- headings */

.hero, .page-head { margin-bottom: 24px; max-width: 780px; }
.eyebrow {
  display: inline-block; font: 600 14px/1.3 var(--font); color: var(--primary-ink);
  background: var(--primary-soft); border-radius: 999px; padding: 5px 12px; margin: 0 0 14px;
}
h1 { font: 800 clamp(32px, 5.4vw, 48px)/1.1 var(--font); letter-spacing: -0.025em; margin: 0 0 14px; }
.lede { color: var(--text-2); font-size: 19px; line-height: 1.55; max-width: 62ch; margin: 0; }
.aka { color: var(--text-3); font-size: 15px; margin: 0; }
h2 { font: 700 clamp(24px, 3.4vw, 30px)/1.2 var(--font); letter-spacing: -0.015em; margin: 0 0 14px; }
h3 { font: 700 18px/1.35 var(--font); margin: 22px 0 8px; }

.trust { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 15px; color: var(--text-2); }
.trust li { display: flex; align-items: center; gap: 7px; }
.trust li::before {
  content: ""; width: 18px; height: 18px; flex: 0 0 auto; border-radius: 50%;
  background: var(--primary-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%230f766e' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}

/* ----------------------------------------------------------- answer */

.answer {
  position: relative; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  padding: 20px 22px 18px; margin: 0 0 28px; max-width: 800px; border-radius: var(--radius);
  border-left: 5px solid var(--primary);
}
.answer::before { content: "Quick answer"; display: block; font: 700 13px/1 var(--font); color: var(--primary-ink); letter-spacing: 0.02em; margin-bottom: 10px; }
.answer p { margin: 0; font-size: 18px; line-height: 1.6; }
.answer .answer-src { margin-top: 12px; font-size: 14px; color: var(--text-3); }

/* ----------------------------------------------------------- calculator */

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow); }
@media (min-width: 700px) { .card { padding: 30px; } }
.calc { margin-bottom: 40px; }
.calc-head h2 { font-size: clamp(22px, 3vw, 26px); margin-bottom: 18px; }
.work { display: grid; gap: 24px; }
@media (min-width: 880px) { .work { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; align-items: start; } }

.calc-form { counter-reset: step; min-width: 0; }
.field { margin: 0 0 20px; padding: 0; border: 0; min-width: 0; }
.field > label, .field > legend {
  display: flex; align-items: center; gap: 10px; padding: 0;
  font: 700 16px/1.3 var(--font); color: var(--text); margin-bottom: 9px;
}
.calc-form > .field > label::before, .calc-form > .field > legend::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 26px; height: 26px; flex: 0 0 auto; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary-ink); font: 800 14px/1 var(--font);
}
.field[hidden] { display: none; }
.input-row { display: flex; gap: 8px; align-items: center; }
.input {
  width: 100%; min-height: 54px; background: var(--surface); color: var(--text);
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font: 600 19px/1.2 var(--font); font-variant-numeric: tabular-nums; padding: 12px 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); }
select.input {
  font: 500 17px/1.25 var(--font); cursor: pointer; appearance: none; -webkit-appearance: none; padding-right: 40px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 7.5l5 5 5-5' fill='none' stroke='%236b7480' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 12px center / 18px no-repeat;
}
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.input.unit { width: auto; flex: 0 0 auto; min-width: 104px; }
.input::placeholder { color: var(--text-3); font-weight: 400; }
textarea.input { min-height: 120px; font-weight: 400; }
.unit-static { font: 600 15px var(--font); color: var(--text-3); white-space: nowrap; }
.hint { font-size: 14.5px; color: var(--text-3); margin: 7px 0 0; }
.calc-foot { font-size: 15px; color: var(--text-2); margin: 24px 0 0; border-top: 1px solid var(--line-soft); padding-top: 16px; }

/* Choice buttons (medicine and product pickers): real radio inputs, styled as tiles */
.choices { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.choices.list { grid-template-columns: 1fr; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span {
  display: flex; flex-direction: column; justify-content: center; gap: 1px; min-height: 54px; height: 100%;
  padding: 9px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
  transition: border-color 0.15s, background 0.15s;
}
.choice b { font-weight: 700; font-size: 16.5px; line-height: 1.25; }
.choice small { font-size: 14px; color: var(--text-3); line-height: 1.3; }
.choice:hover span { border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); }
.choice input:checked + span { border-color: var(--primary); background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary); }
.choice input:checked + span small { color: var(--primary-ink); }
.choice input:focus-visible + span { outline: 3px solid var(--primary); outline-offset: 2px; }
.choices.list .choice span { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
.choices.list .choice small { text-align: right; white-space: nowrap; }

.readout { min-width: 0; }
.empty {
  border: 2px dashed var(--line); border-radius: var(--radius); padding: 26px;
  color: var(--text-3); font-size: 16px; min-height: 170px; display: flex; flex-direction: column; justify-content: center; gap: 6px;
  background: var(--bg);
}
.empty strong { color: var(--text); font-weight: 700; font-size: 18px; }
@media (min-width: 880px) { .empty { min-height: 260px; align-items: center; text-align: center; } }

.result {
  background: var(--primary-soft); border: 1.5px solid var(--primary-line); border-radius: var(--radius);
  padding: 20px 22px;
}
.readout > * + * { margin-top: 12px; }
.readout > .facts { margin-top: 16px; }
.result-label { font: 700 15px/1.35 var(--font); color: var(--text-2); margin-bottom: 6px; }
.result-value {
  font: 800 clamp(44px, 9vw, 60px)/1 var(--font); font-variant-numeric: tabular-nums;
  color: var(--primary-ink); letter-spacing: -0.03em;
}
.result-value .unit { font-size: 0.42em; font-weight: 700; color: var(--text-2); margin-left: 8px; letter-spacing: 0; }
.result-sub { color: var(--text); font-size: 16.5px; font-weight: 600; margin-top: 8px; }
.working {
  font: 400 14px/1.6 var(--font); font-variant-numeric: tabular-nums; color: var(--text-2);
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--primary-line); white-space: pre-line;
}
.working b { color: var(--text); font-weight: 600; }

.facts { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; font-size: 16px; }
.facts li { display: flex; gap: 10px; align-items: flex-start; }
.facts li::before {
  content: ""; width: 8px; height: 8px; margin-top: 9px; flex: 0 0 auto; border-radius: 50%; background: var(--primary);
}

.other-products { margin-top: 18px; font-size: 15.5px; }
.other-products .result-label { margin-bottom: 8px; }
.other-products table { min-width: 0; font-size: 15.5px; }
.other-products tbody th { white-space: normal; font-weight: 500; position: static; }

.flag { border-radius: var(--radius); padding: 16px 18px; font-size: 16px; margin-top: 12px; border: 1.5px solid; }
.flag:first-child { margin-top: 0; }
.flag strong { display: block; font-size: 17px; margin-bottom: 2px; }
.flag.stop { background: var(--stop-bg); border-color: var(--stop-line); }
.flag.stop strong { color: var(--stop); }
.flag.doctor { background: var(--doctor-bg); border-color: var(--doctor-line); }
.flag.doctor strong { color: var(--doctor); }
.flag.info { background: var(--info-bg); border-color: var(--info-line); }
.flag.info strong { color: var(--info); }
.flag a { color: inherit; }

.more-link { display: inline-block; margin-top: 16px; font-size: 16px; font-weight: 600; }

/* ----------------------------------------------------------- tables */

.chart, .prose, .faq, .sources, .related, .group, .principles, .subpages { margin-block: 44px; }
.chart-meta { color: var(--text-2); margin: 0 0 14px; max-width: 70ch; }
.table-scroll {
  position: relative; /* keeps the absolutely positioned sr-only cell text inside the scroller */
  overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); -webkit-overflow-scrolling: touch; box-shadow: var(--shadow-sm);
}
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 16px; min-width: 560px; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
thead th { font: 700 14px/1.35 var(--font); color: var(--text-2); background: var(--surface-2); border-bottom: 1px solid var(--line); }
tbody th { font-weight: 600; white-space: nowrap; }
tbody tr:nth-child(even) > * { background: color-mix(in srgb, var(--surface-2) 45%, var(--surface)); }
tbody tr:last-child > * { border-bottom: 0; }
tbody tr:hover > * { background: var(--primary-soft); }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Keep the weight/age column in view while the doses scroll sideways on phones */
.table-scroll thead th:first-child, .table-scroll tbody th:first-child {
  position: sticky; left: 0; z-index: 1; background: var(--surface);
  box-shadow: 1px 0 0 var(--line-soft);
}
.table-scroll thead th:first-child { background: var(--surface-2); }
.sub { display: block; font-size: 13.5px; color: var(--text-3); font-weight: 400; }
.na { color: var(--text-3); }
.table-src { font-size: 14.5px; color: var(--text-3); margin: 12px 0 0; }
.gates { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; max-width: 800px; }
.gate { padding: 13px 16px; border-radius: var(--radius-sm); font-size: 16px; border: 1.5px solid; }
.gate.stop { background: var(--stop-bg); border-color: var(--stop-line); }
.gate.doctor { background: var(--doctor-bg); border-color: var(--doctor-line); }
.gate-inline.stop { color: var(--stop); font-weight: 600; }
tr.now > *, tr.now:hover > * { background: var(--primary-soft); }
tr.now th { box-shadow: inset 4px 0 0 var(--primary); }

/* ----------------------------------------------------------- prose */

.prose { max-width: 740px; }
.prose p, .prose li { color: var(--text); }
.prose ul, .prose ol { padding-left: 24px; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--primary); }

.faq { max-width: 800px; }
.faq details {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0; margin-bottom: 10px; box-shadow: var(--shadow-sm);
}
.faq summary {
  cursor: pointer; font-weight: 700; font-size: 17px; list-style: none; padding: 16px 20px;
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-ink); font-weight: 700; font-size: 18px;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0; padding: 0 20px 18px; color: var(--text-2); }

.sources ol { padding-left: 24px; font-size: 15px; color: var(--text-2); max-width: 820px; }
.sources li { margin-bottom: 10px; }
.sources li:target { background: var(--primary-soft); border-radius: 6px; }

.review { border-radius: var(--radius); padding: 16px 20px; margin-block: 32px; max-width: 800px; font-size: 15.5px; }
.review p { margin: 0; }
.review.pending { background: var(--doctor-bg); border: 1px solid var(--doctor-line); }
.review.ok { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--primary); }

.app-bridge {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--surface-2); border-radius: var(--radius); padding: 20px 22px; margin-block: 36px; max-width: 800px;
}
.app-bridge div { flex: 1 1 280px; font-size: 16px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
  background: var(--primary); color: var(--on-primary); text-decoration: none; border: 0;
  font: 700 16px/1 var(--font); padding: 14px 22px; border-radius: 999px; white-space: nowrap; cursor: pointer;
}
.btn:hover { background: var(--primary-ink); color: var(--on-primary); text-decoration: none; }

/* ----------------------------------------------------------- cards */

.card-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.card-list.wide { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.mini-card {
  position: relative; display: flex; flex-direction: column; gap: 4px; height: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 44px 16px 18px; text-decoration: none; color: var(--text); box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s var(--ease);
}
.mini-card::after {
  content: "\2192"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  color: var(--primary); font-weight: 700; font-size: 18px; transition: transform 0.15s var(--ease);
}
.mini-card:hover { border-color: var(--primary-line); color: var(--text); text-decoration: none; box-shadow: var(--shadow); transform: translateY(-1px); }
.mini-card:hover::after { transform: translate(3px, -50%); }
.mc-name { font: 700 19px/1.25 var(--font); }
.mc-generic { font-size: 14.5px; color: var(--primary-ink); font-weight: 500; }
.mc-use { font-size: 15px; color: var(--text-2); line-height: 1.45; }
.group-grid { columns: 3 300px; column-gap: 16px; }
.group-box {
  break-inside: avoid; margin: 0 0 16px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden;
}
.group-h { font: 700 14px/1.3 var(--font); color: var(--text-2); background: var(--surface-2); margin: 0; padding: 11px 18px; border-bottom: 1px solid var(--line-soft); }
.med-list { list-style: none; margin: 0; padding: 0; }
.med-list li + li { border-top: 1px solid var(--line-soft); }
.med-list a {
  position: relative; display: block; padding: 14px 44px 14px 18px; text-decoration: none; color: var(--text);
  transition: background 0.15s;
}
.med-list a::after {
  content: "\2192"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  color: var(--primary); font-weight: 700; transition: transform 0.15s var(--ease);
}
.med-list a:hover { background: var(--primary-soft); color: var(--text); text-decoration: none; }
.med-list a:hover::after { transform: translate(3px, -50%); }
.med-list .mc-name { font-size: 18px; }
.med-list .mc-use { display: block; margin-top: 1px; }

.principle-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.principle { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-sm); }
.principle h3 { margin-top: 0; font-size: 19px; }
.principle p { margin: 0; color: var(--text-2); font-size: 16px; }

.subpages ul { padding-left: 22px; }
.subpages li { margin-bottom: 6px; }

/* ----------------------------------------------------------- footer */

.site-foot { border-top: 1px solid var(--line); background: var(--surface); padding-block: 44px 52px; font-size: 15px; }
.foot-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.foot-h { font: 700 15px/1.2 var(--font); color: var(--text); margin: 0 0 12px; }
.site-foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-foot a { color: var(--text-2); text-decoration: none; }
.site-foot a:hover { color: var(--primary); text-decoration: underline; }
.foot-note { grid-column: 1 / -1; color: var(--text-3); border-top: 1px solid var(--line-soft); padding-top: 22px; }
.foot-note p { margin: 0 0 10px; max-width: 90ch; }
.foot-note strong { color: var(--text); }
.foot-note a { color: var(--text); text-decoration: underline; }

@media print {
  .site-head, .help-bar, .site-foot, .calc, .app-bridge, .draft-banner, .theme-btn, .crumbs { display: none !important; }
  body { background: #fff; color: #000; }
  .table-scroll { border: 0; overflow: visible; box-shadow: none; }
  table { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ----------------------------------------------------------- clinical + quiz */

.audience-note { display: inline-block; margin: 8px 0 0; font-size: 14.5px; color: var(--info); background: var(--info-bg); border-radius: 999px; padding: 5px 12px; }
.quiz-q { font-size: 18px; line-height: 1.5; margin: 0 0 18px; padding: 16px 18px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); }
.quiz-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.btn.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--primary); color: var(--primary-ink); background: transparent; }
.facts.steps { list-style: decimal; padding-left: 22px; }
.facts.steps li { display: list-item; }
.facts.steps li::before { content: none; }
.calc-head .hint { margin-top: -8px; margin-bottom: 16px; }
.prose details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.prose details summary { cursor: pointer; font-weight: 600; }
