:root {
  color-scheme: light;
  --ink: #20221b;
  --quiet-ink: #52574b;
  --olive: #4b601f;
  --olive-deep: #344515;
  --olive-wash: #f0f3e7;
  --soft-rule: #d5dcc6;
  --paper: #fff;
  font-family: Charter, "Bitstream Charter", Georgia, serif;
  font-size: 18px;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html { scroll-padding-top: 1.5rem; }
body { margin: 0; line-height: 1.6; overflow-wrap: break-word; }
button, input, textarea { font: inherit; }
a { color: var(--olive-deep); text-underline-offset: .2em; text-decoration-thickness: .08em; }
a:hover { text-decoration-thickness: .15em; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--olive);
  outline-offset: 4px;
}
button { cursor: pointer; }
[hidden] { display: none !important; }

.skip-reading {
  position: fixed;
  top: .5rem;
  left: .5rem;
  z-index: 5;
  padding: .6rem 1rem;
  min-height: 44px;
  background: white;
  transform: translateY(-180%);
}
.skip-reading:focus { transform: none; }
.guide-index {
  position: fixed;
  inset: 0 auto 0 0;
  width: 250px;
  padding: 2.5rem 1.2rem 1.5rem 1.6rem;
  border-right: 6px solid var(--olive-wash);
  overflow-y: auto;
}
.guide-name {
  display: flex;
  align-items: center;
  min-height: 48px;
  color: var(--ink);
  font-size: 1.4rem;
  line-height: 1.2;
  font-weight: 700;
  text-decoration: none;
}
.index-caption { margin: .5rem 0 1.7rem; color: var(--quiet-ink); }
.guide-index nav ul { list-style: none; margin: 0; padding: 0; }
.guide-index nav li { margin: .25rem 0; }
.guide-index nav a {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: .5rem .7rem;
  border-radius: 6px;
  line-height: 1.35;
  color: var(--ink);
  text-decoration: none;
}
.guide-index nav a[aria-current] { background: var(--olive); color: white; font-weight: 700; }
.guide-index nav a:hover { background: var(--olive-wash); color: var(--olive-deep); }
.guide-index nav a[aria-current]:hover { background: var(--olive-deep); color: white; }
.index-note { margin: 2rem .7rem 0; color: var(--quiet-ink); line-height: 1.8; }
main, .guide-footer { margin-left: 250px; }
.care-reading { max-width: 1160px; margin: 0 auto; padding: 3.6rem 4rem 2rem; }
.reading-opening { margin-bottom: 2.5rem; max-width: 830px; }
.guide-role { margin: 0 0 1.2rem; color: var(--olive-deep); font-size: 1.05rem; }
h1, h2, h3 { line-height: 1.15; font-weight: 700; text-wrap: pretty; }
h1 { font-size: 3.1rem; letter-spacing: -.025em; margin: 0 0 1.4rem; max-width: 17ch; }
h2 { font-size: 1.95rem; margin: 3rem 0 1.2rem; max-width: 27ch; }
h3 { font-size: 1.35rem; margin: 1.8rem 0 .7rem; }
p { margin: 0 0 1rem; max-width: 68ch; }
.reading-lead { font-size: 1.22rem; line-height: 1.55; max-width: 56ch; }
ul { max-width: 68ch; }
li { padding-left: .1rem; margin-bottom: .5rem; }

.vetting-map { margin: 1.7rem 0 2.2rem; }
.care-stops { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2rem; list-style: none; padding: 0; margin: 0; }
.care-stops li { padding: 1.2rem 0 1rem; margin: 0; border-top: 5px solid var(--olive); }
.care-stops li:nth-child(even) { border-top-color: var(--soft-rule); }
.care-stops h3 { margin: 0 0 .6rem; font-size: 1.6rem; }
.care-stops p { margin-bottom: .4rem; min-height: 3.5em; }
.reading-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: .5rem 0;
  font-weight: 700;
  gap: .5rem;
}
.reading-link::after { content: "→"; }
figcaption { margin-top: 1rem; color: var(--quiet-ink); font-size: 1rem; line-height: 1.5; max-width: 72ch; }
.care-comparison { margin: 1.6rem 0; width: 100%; }
table { width: 100%; border-spacing: 0; table-layout: fixed; font-size: 1rem; line-height: 1.55; }
thead { background: var(--olive); color: white; }
thead th { padding: .85rem 1.1rem; font-size: 1.05rem; }
thead th:first-child { border-radius: 6px 0 0 0; width: 34%; }
thead th:last-child { border-radius: 0 6px 0 0; }
th { text-align: left; font-weight: 700; }
tbody th, td { padding: 1.2rem 1.1rem; vertical-align: top; border-bottom: 2px solid white; }
tbody th { background: var(--olive-wash); }
td { background: #f7f8f3; }
td p:last-child { margin-bottom: 0; }
tbody tr:last-child th { border-radius: 0 0 0 6px; }
tbody tr:last-child td { border-radius: 0 0 6px 0; }
.source-thread { margin: .5rem 0 1.4rem; }
.source-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: .5rem 0;
  max-width: 100%;
  font-size: 1rem;
  line-height: 1.45;
}
.next-reading {
  margin: 3rem 0 0;
  padding: 1.5rem 1.7rem;
  border-radius: 6px;
  background: var(--olive-wash);
}
.next-reading p { margin-bottom: .25rem; }
.guide-footer {
  padding: 1.8rem 4rem 2.8rem;
  border-top: 6px solid var(--olive-wash);
  font-size: 1rem;
}
.guide-footer p, .footer-reading { max-width: 1016px; margin-left: auto; margin-right: auto; }
.footer-reading { display: flex; flex-wrap: wrap; gap: .4rem 2rem; }

.bill-map { margin: 1.5rem 0 2rem; }
.bill-map dl { margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--olive); color: white; border-radius: 6px; padding: 1.4rem; gap: 1.4rem; }
.bill-map dt { font-size: 1.4rem; line-height: 1.2; font-weight: 700; padding-bottom: .8rem; }
.bill-map dd { margin: 0; font-size: 1rem; line-height: 1.5; }
.trial-comparison { padding: 1.5rem 1.6rem; margin: 1.6rem 0 1rem; background: var(--olive-wash); border-radius: 6px; }
.trial-row { margin-bottom: 1.2rem; }
.trial-row p { margin-bottom: .5rem; }
.trial-track { height: 28px; background: white; border-radius: 4px; overflow: hidden; }
.trial-track span { display: block; height: 100%; border-radius: 4px; }
.trial-medicine { width: 74.5%; background: var(--olive); }
.trial-comparison-fill { width: 12%; background: #777b6d; }
.trial-comparison figcaption { margin-bottom: .3rem; }
.source-shelf { border-top: 5px solid var(--olive); margin: 1.8rem 0; padding-top: .6rem; }
.source-shelf .source-thread { margin: 0; padding: .2rem 0; }

.question-sheet { border: 3px solid var(--olive); border-radius: 6px; margin: 2.5rem 0; padding: 1.8rem 1.6rem; }
.sheet-opening h2 { margin: 0 0 1.2rem; }
button { min-height: 48px; max-width: 100%; padding: .65rem 1rem; border: 0; border-radius: 6px; background: var(--olive); color: white; font-weight: 700; line-height: 1.4; margin-bottom: 1rem; }
button:hover { background: var(--olive-deep); }
fieldset { min-inline-size: 0; margin: 1.7rem 0; padding: .4rem 0 0; border: 0; border-top: 2px solid var(--soft-rule); }
legend { padding: 0 .7rem 0 0; font-weight: 700; font-size: 1.15rem; }
.question-to-keep { display: flex; align-items: flex-start; gap: .85rem; min-height: 48px; padding: .7rem .2rem; cursor: pointer; }
.question-to-keep input { flex: 0 0 44px; width: 44px; height: 44px; margin: .18rem 0 0; accent-color: var(--olive); }
.notes-label { display: block; font-weight: 700; padding-bottom: .7rem; }
textarea { display: block; width: 100%; padding: .8rem; resize: vertical; color: var(--ink); background: white; border: 2px solid #899770; border-radius: 6px; line-height: 1.55; }
.paper-notes { display: none; }

@media (max-width: 1100px) {
  .guide-index { width: 220px; padding-left: 1rem; }
  main, .guide-footer { margin-left: 220px; }
  .care-reading { padding: 3rem 2.4rem 2rem; }
  .guide-footer { padding-left: 2.4rem; padding-right: 2.4rem; }
  h1 { font-size: 2.7rem; }
  .bill-map dl { grid-template-columns: 1fr 1fr; gap: 1.6rem; }
}

@media (max-width: 760px) {
  .guide-index { position: static; width: auto; padding: 1.1rem 1.2rem 1rem; border: 0; border-bottom: 6px solid var(--olive-wash); }
  .guide-name { min-height: 44px; font-size: 1.35rem; }
  .index-caption { margin: 0 0 .75rem; }
  .index-note { display: none; }
  .guide-index nav ul { display: grid; grid-template-columns: 1fr 1fr; column-gap: .5rem; }
  .guide-index nav li { padding: 0; margin: .1rem 0; }
  .guide-index nav a { min-height: 48px; padding: .55rem .6rem; font-size: 1rem; }
  main, .guide-footer { margin-left: 0; }
  .care-reading { padding: 2rem 1.2rem 1.8rem; }
  h1 { font-size: 2.3rem; max-width: 19ch; }
  h2 { font-size: 1.7rem; margin-top: 2.5rem; }
  h3 { font-size: 1.3rem; }
  .reading-lead { font-size: 1.12rem; }
  .care-stops { column-gap: 1.2rem; }
  .care-stops h3 { font-size: 1.3rem; }
  .care-stops p { min-height: 0; }
  .guide-footer { padding: 1.6rem 1.2rem 2rem; }
  .footer-reading { gap: .1rem 1rem; }
  .next-reading { padding: 1.2rem; }
  .care-comparison th, .care-comparison td { padding: .85rem .7rem; }
  .care-comparison thead th:first-child { width: 37%; }
  .question-sheet { padding: 1.2rem 1rem; }
  .trial-comparison { padding: 1.2rem; }
}

@media (max-width: 460px) {
  .care-stops { grid-template-columns: 1fr; }
  .care-stops li { padding-bottom: 1.2rem; }
  .care-stops li:nth-child(even) { border-top-color: var(--olive); }
  .bill-map dl { padding: 1.2rem; gap: 1.5rem 1rem; }
  .care-comparison table, .care-comparison thead, .care-comparison tbody, .care-comparison tr, .care-comparison th, .care-comparison td { display: block; width: 100%; }
  .care-comparison thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .care-comparison tbody th { background: var(--olive); color: white; border: 0; padding: .7rem 1rem; border-radius: 6px 6px 0 0; }
  .care-comparison tbody td { padding: 1rem; border: 0; border-radius: 0 0 6px 6px; }
  .care-comparison tbody tr { margin-bottom: 1rem; }
}

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

@media print {
  @page { size: auto; margin: 16mm; }
  :root { font-size: 12pt; color: black; background: white; }
  body { line-height: 1.4; }
  .guide-index, .guide-footer, .skip-reading, .next-reading, button, .print-hint, .visit-context { display: none !important; }
  main { margin: 0; }
  .care-reading { max-width: none; padding: 0; }
  h1 { font-size: 25pt; max-width: none; margin-bottom: 10pt; }
  h2 { font-size: 18pt; }
  h3, legend { font-size: 13pt; }
  .reading-opening { margin-bottom: 16pt; }
  .reading-lead { font-size: 12pt; }
  .question-sheet { border: 0; margin: 0; padding: 0; }
  .sheet-opening h2 { margin-bottom: 10pt; }
  fieldset { margin: 12pt 0; break-inside: avoid; }
  .question-to-keep { min-height: 0; padding: 6pt 0; break-inside: avoid; gap: 9pt; }
  .question-to-keep input { flex-basis: 14pt; width: 14pt; height: 14pt; margin-top: 2pt; print-color-adjust: exact; }
  textarea { display: none; }
  .paper-notes { display: block; min-height: 70pt; white-space: pre-wrap; overflow-wrap: anywhere; border-bottom: 1pt solid black; }
  .notes-label { margin-top: 16pt; }
  a { color: black; }
  table { font-size: 12pt; }
  figure { break-inside: avoid; }
}
