:root {
  --navy: #0b2b35;
  --navy-soft: #163f49;
  --teal: #087e78;
  --teal-dark: #055e5a;
  --mint: #e7f5f1;
  --mint-strong: #c8e9df;
  --warning: #fff3cf;
  --warning-line: #e5b94f;
  --paper: #ffffff;
  --canvas: #f4f7f7;
  --line: #d5e1df;
  --ink: #132f36;
  --muted: #597077;
  --reader-scale: 1;
  --max: 1200px;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  line-height: 1.55;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 118px; }
body { margin: 0; background: var(--paper); }
body, button, input { color: var(--ink); }
a { color: inherit; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 3px solid #35b8ae;
  outline-offset: 3px;
}
.reading-progress { position: fixed; inset: 0 0 auto; height: 4px; background: transparent; z-index: 50; }
.reading-progress span { display: block; height: 100%; background: #34bcae; transform: scaleX(0); transform-origin: left; }
.site-header {
  min-height: 74px;
  padding: 12px max(24px, calc((100vw - var(--max)) / 2));
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 30;
}
.brand { color: var(--navy); font-size: 1.18rem; font-weight: 820; letter-spacing: -.02em; text-decoration: none; }
.brand span { display: block; color: var(--teal); font-family: "Cascadia Mono", Consolas, monospace; font-size: .65rem; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; }
.header-tools { display: flex; align-items: center; gap: 18px; }
.current-medicine { max-width: 320px; overflow: hidden; color: var(--muted); font-size: .82rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.font-controls { display: flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.font-controls button { min-width: 44px; min-height: 40px; border: 0; background: white; font-weight: 780; cursor: pointer; }
.font-controls button + button { border-left: 1px solid var(--line); }
.font-controls button:hover { background: var(--mint); }
.back-link { color: var(--teal-dark); font-size: .86rem; font-weight: 760; }
.snapshot-label { color: var(--muted); font-family: "Cascadia Mono", Consolas, monospace; font-size: .68rem; }
main { max-width: var(--max); margin: auto; padding: 0 24px; }
.hero { margin: 32px 0 18px; padding: 42px 48px 46px; border-radius: 22px; color: white; background: var(--navy); overflow: hidden; position: relative; }
.hero::after { content: ""; position: absolute; width: 360px; height: 360px; border: 72px solid rgba(52,188,174,.16); border-radius: 50%; right: -160px; top: -170px; }
.hero nav { display: flex; gap: 8px; color: #b8d7d5; font-size: .82rem; position: relative; z-index: 1; }
.hero nav a { color: white; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 56px; align-items: end; position: relative; z-index: 1; }
.eyebrow { margin: 0 0 7px; color: var(--teal); font-family: "Cascadia Mono", Consolas, monospace; font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.hero .eyebrow { margin-top: 38px; color: #6fe0d5; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1, h2, h3 { font-family: "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif; line-height: 1.12; }
h1 { max-width: 780px; margin: .08em 0 .22em; font-size: clamp(2.65rem, 5.4vw, 5rem); font-weight: 790; letter-spacing: -.055em; }
h2 { letter-spacing: -.025em; }
.lead { max-width: 700px; margin: 0; color: #d3e5e4; font-size: 1.08rem; }
.hero-facts { display: grid; gap: 14px; border-left: 1px solid rgba(255,255,255,.18); padding-left: 24px; }
.hero-facts span { color: #bad4d3; font-size: .73rem; line-height: 1.25; }
.hero-facts strong { display: block; color: white; font-family: "Cascadia Mono", Consolas, monospace; font-size: 1.25rem; }
.warning { display: grid; grid-template-columns: 28px 1fr; gap: 15px; align-items: start; margin: 0 0 34px; padding: 18px 22px; border: 1px solid var(--warning-line); background: var(--warning); }
.warning svg { width: 25px; fill: none; stroke: #8a5b00; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.warning p { margin: 0; }
.warning strong, .warning span { display: block; }
.warning span { margin-top: 2px; color: #694f1e; font-size: .9rem; }
.mobile-topic-strip { display: none; }
.page-grid { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 72px; align-items: start; }
.page-grid article { min-width: 0; }
.direct-answer { margin: 0 0 48px; padding: 30px 34px; border-left: 6px solid var(--teal); background: var(--mint); }
.direct-answer-label { color: var(--teal-dark); font-family: "Cascadia Mono", Consolas, monospace; font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.direct-answer h2 { margin: 8px 0 14px; font-size: clamp(1.7rem, 3vw, 2.35rem); }
.direct-answer p { margin: 0; font-family: Charter, "Bitstream Charter", Georgia, serif; font-size: calc(1.08rem * var(--reader-scale)); line-height: 1.72; }
.direct-answer a { display: inline-block; margin-top: 18px; color: var(--teal-dark); font-size: .85rem; font-weight: 800; }
.summary, .documents, .reader-tools, .faq, .source { padding: 0 0 42px; margin: 0 0 42px; border-bottom: 1px solid var(--line); }
.summary h2, .documents h2, .reader-tools h2, .faq h2, .source h2 { margin: 0 0 18px; font-size: 1.65rem; }
.summary dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0; background: var(--line); border: 1px solid var(--line); }
.summary dl div { min-height: 96px; padding: 17px 19px; background: white; }
.summary dt { color: var(--muted); font-family: "Cascadia Mono", Consolas, monospace; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.summary dd { margin: 8px 0 0; font-size: .94rem; font-weight: 750; }
.documents { display: flex; justify-content: space-between; gap: 28px; align-items: end; }
.documents h2 { margin-bottom: 0; }
.document-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.button { min-height: 48px; display: inline-flex; align-items: center; gap: 10px; padding: 11px 16px; border: 1px solid var(--teal); background: var(--teal); color: white; text-decoration: none; font-size: .86rem; font-weight: 800; }
.button:hover { background: var(--teal-dark); }
.button.secondary { border-color: var(--line); background: white; color: var(--ink); }
.button span { display: inline-grid; place-items: center; width: 27px; height: 27px; background: rgba(255,255,255,.18); font-family: "Cascadia Mono", Consolas, monospace; font-size: .58rem; }
.button.secondary span { background: var(--mint); color: var(--teal-dark); }
.reader-tools { display: grid; grid-template-columns: .8fr 1.2fr; gap: 32px; padding: 28px; background: var(--canvas); }
.reader-tools h2 { margin-bottom: 6px; }
.reader-tools p { margin: 0; color: var(--muted); font-size: .88rem; }
.reader-actions label { display: block; margin-bottom: 7px; font-size: .76rem; font-weight: 800; }
.reader-actions > div { display: grid; grid-template-columns: minmax(0,1fr) auto; }
.reader-actions input { min-width: 0; min-height: 48px; padding: 11px 14px; border: 1px solid #aabfbc; background: white; }
.reader-actions button { min-height: 48px; padding: 10px 14px; border: 0; background: var(--navy); color: white; font-size: .78rem; font-weight: 800; cursor: pointer; }
.reader-actions .search-status { min-height: 22px; margin-top: 7px; color: var(--teal-dark); font-weight: 750; }
.leaflet-section { scroll-margin-top: 112px; border-bottom: 1px solid var(--line); }
.leaflet-section[hidden] { display: none; }
.leaflet-section.priority { border-left: 4px solid var(--mint-strong); }
.leaflet-section details > summary { min-height: 112px; display: grid; grid-template-columns: 58px minmax(0,1fr) auto; gap: 18px; align-items: center; padding: 22px 20px; list-style: none; cursor: pointer; }
.leaflet-section summary::-webkit-details-marker { display: none; }
.leaflet-section summary:hover { background: var(--canvas); }
.section-number { color: var(--teal); font-family: "Cascadia Mono", Consolas, monospace; font-size: 1.1rem; font-weight: 800; }
.section-heading > span { display: block; margin-bottom: 4px; color: var(--teal-dark); font-size: .7rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.section-heading h2 { margin: 0; font-size: clamp(1.28rem, 2.2vw, 1.72rem); font-weight: 740; }
.summary-action { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.summary-action svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .2s ease; }
.leaflet-section details[open] .summary-action svg { transform: rotate(180deg); }
.leaflet-section details[open] .summary-action { color: var(--teal); }
.section-content { padding: 4px 34px 36px 96px; }
.section-content p { margin: 0; color: #203b42; font-family: Charter, "Bitstream Charter", Georgia, serif; font-size: calc(1.08rem * var(--reader-scale)); line-height: 1.78; white-space: pre-wrap; }
.next-topic { display: inline-flex; gap: 10px; align-items: center; margin-top: 26px; color: var(--teal-dark); font-size: .8rem; font-weight: 800; text-decoration: none; }
.topics { position: sticky; top: 100px; align-self: start; padding: 24px 0 18px; border-top: 5px solid var(--navy); border-bottom: 1px solid var(--line); }
.topics h2 { margin: 0; font-size: 1.4rem; }
.topics > p:not(.eyebrow) { margin: 6px 0 18px; color: var(--muted); font-size: .82rem; }
.topics ol, .topics-dialog ol { margin: 0; padding: 0; list-style: none; }
.topics li + li, .topics-dialog li + li { border-top: 1px solid var(--line); }
.topics a, .topics-dialog a { min-height: 44px; display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: center; padding: 9px 4px; text-decoration: none; }
.topics a:hover { color: var(--teal-dark); }
.topics a span, .topics-dialog a span { color: var(--teal); font-family: "Cascadia Mono", Consolas, monospace; font-size: .72rem; font-weight: 800; }
.topics a strong, .topics-dialog a strong { font-size: .78rem; }
.faq { padding-top: 64px; scroll-margin-top: 96px; }
.faq h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 2px; font-weight: 780; cursor: pointer; }
.faq summary::after { content: "+"; color: var(--teal); font-size: 1.35rem; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 2px 0 8px; font-family: Charter, "Bitstream Charter", Georgia, serif; font-size: calc(1.05rem * var(--reader-scale)); line-height: 1.72; }
.faq details small { display: block; padding-bottom: 20px; color: var(--muted); }
.source { color: var(--muted); font-size: .78rem; }
.source p { font-family: "Cascadia Mono", Consolas, monospace; word-break: break-word; }
.mobile-dock, .topics-dialog { display: none; }
.sample-list { padding: 12px 0 72px; }
.sample-hero .eyebrow { margin-top: 0; }
.sample-list > h2 { margin: 0 0 24px; font-size: clamp(1.75rem, 3vw, 2.5rem); }
.sample-list label { display: block; margin-bottom: 8px; font-weight: 800; }
.sample-list input { width: 100%; max-width: 620px; min-height: 52px; padding: 14px 17px; border: 1px solid #aabfbc; }
.cards { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1px; margin-top: 26px; background: var(--line); border: 1px solid var(--line); }
.card { min-height: 210px; padding: 28px; background: white; }
.card > span { color: var(--teal-dark); font-family: "Cascadia Mono", Consolas, monospace; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.card h2 { margin: .5em 0; font-size: 1.5rem; }
.card p { color: var(--muted); font-size: .86rem; }
.text-link { color: var(--teal-dark); font-weight: 800; }
footer { min-height: 110px; display: flex; justify-content: space-between; gap: 24px; margin-top: 64px; padding: 34px max(24px,calc((100vw - var(--max))/2)); background: var(--navy); color: white; }
footer span { color: #b9d1d0; font-size: .82rem; }
.topics-dialog { border: 0; }

@media (max-width: 900px) {
  :root { background: white; }
  body { padding-bottom: 70px; }
  html { scroll-padding-top: 132px; }
  main { padding: 0 16px; }
  .site-header { min-height: 68px; padding: 9px 16px; }
  .current-medicine, .back-link { display: none; }
  .snapshot-label { max-width: 150px; text-align: right; }
  .font-controls button { min-height: 42px; }
  .hero { margin: 16px 0 12px; padding: 28px 22px 24px; border-radius: 16px; }
  .hero::after { width: 230px; height: 230px; border-width: 46px; right: -120px; top: -130px; }
  .hero nav { font-size: .74rem; }
  .hero-grid { display: block; }
  .hero .eyebrow { margin-top: 28px; }
  h1 { font-size: clamp(2.05rem, 10vw, 3.1rem); letter-spacing: -.045em; }
  .lead { max-width: 92%; font-size: .96rem; }
  .hero-facts { grid-auto-flow: column; grid-auto-columns: minmax(116px,1fr); gap: 0; margin-top: 25px; padding: 16px 0 0; border-top: 1px solid rgba(255,255,255,.16); border-left: 0; overflow-x: auto; }
  .hero-facts span { padding-right: 14px; }
  .warning { margin-bottom: 12px; padding: 15px; }
  .warning span { font-size: .83rem; }
  .mobile-topic-strip { position: sticky; top: 68px; z-index: 20; display: flex; gap: 7px; margin: 0 -16px 24px; padding: 10px 16px; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
  .mobile-topic-strip::-webkit-scrollbar { display: none; }
  .mobile-topic-strip a { min-width: 42px; min-height: 42px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--teal-dark); font-family: "Cascadia Mono", Consolas, monospace; font-weight: 800; text-decoration: none; }
  .page-grid { grid-template-columns: 1fr; gap: 0; }
  .topics { display: none; }
  .direct-answer { margin-bottom: 38px; padding: 23px 20px; border-left-width: 5px; }
  .direct-answer h2 { font-size: 1.62rem; }
  .direct-answer p { font-size: calc(1.02rem * var(--reader-scale)); }
  .summary dl { grid-template-columns: 1fr; }
  .summary dl div { min-height: 82px; }
  .documents { display: block; }
  .document-actions { display: grid; margin-top: 20px; }
  .button { width: 100%; justify-content: flex-start; }
  .reader-tools { grid-template-columns: 1fr; gap: 20px; margin: 0 -16px 12px; padding: 24px 16px; }
  .reader-actions > div { grid-template-columns: 1fr; gap: 8px; }
  .reader-actions button { width: 100%; }
  .leaflet-section { margin: 0 -16px; scroll-margin-top: 128px; }
  .leaflet-section.priority { border-left-width: 4px; }
  .leaflet-section details > summary { min-height: 98px; grid-template-columns: 42px minmax(0,1fr) 26px; gap: 10px; padding: 17px 16px; }
  .section-number { font-size: .9rem; }
  .section-heading > span { font-size: .62rem; }
  .section-heading h2 { font-size: 1.13rem; line-height: 1.22; }
  .summary-action { font-size: 0; }
  .summary-action svg { width: 22px; }
  .section-content { padding: 2px 18px 30px 68px; }
  .section-content p { font-size: calc(1.04rem * var(--reader-scale)); line-height: 1.74; }
  .faq { padding-top: 50px; }
  .faq summary { min-height: 70px; }
  .mobile-dock { position: fixed; inset: auto 0 0; z-index: 35; display: grid; grid-template-columns: 1fr 1.3fr; min-height: 62px; padding: 7px; background: white; border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(11,43,53,.1); }
  .mobile-dock button, .mobile-dock a { min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: white; color: var(--navy); font-weight: 800; text-decoration: none; }
  .mobile-dock a { background: var(--teal); color: white; }
  .topics-dialog[open] { inset: auto 0 0; width: 100%; max-width: none; max-height: 82dvh; display: block; margin: 0; padding: 0 18px 22px; border-radius: 22px 22px 0 0; background: white; overflow-y: auto; }
  .topics-dialog::backdrop { background: rgba(4,27,34,.6); backdrop-filter: blur(2px); }
  .dialog-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; padding: 20px 0 13px; background: white; border-bottom: 1px solid var(--line); }
  .dialog-head span { color: var(--teal); font-family: "Cascadia Mono", Consolas, monospace; font-size: .66rem; font-weight: 800; text-transform: uppercase; }
  .dialog-head h2 { margin: 3px 0 0; }
  .dialog-head button { width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 50%; background: white; font-size: 1.7rem; cursor: pointer; }
  .topics-dialog a { min-height: 54px; }
  .topics-dialog a strong { font-size: .9rem; }
  .cards { grid-template-columns: 1fr; }
  footer { min-height: 130px; display: grid; margin-top: 36px; padding: 28px 18px 86px; }
}

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

@media print {
  .site-header, .reading-progress, .mobile-topic-strip, .mobile-dock, .topics, .reader-tools { display: none !important; }
  body { padding: 0; }
  main { max-width: none; padding: 0; }
  .hero { margin: 0; border-radius: 0; background: white; color: black; }
  .hero .lead, .hero nav, .hero-facts span { color: #333; }
  .page-grid { display: block; }
  .leaflet-section details > summary { break-after: avoid; }
}
