:root { color-scheme: dark; --bg: #25292d; --text: #e8edef; --muted: #b7c2c9; --line: #485158; --green: #a6d9b7; --blue: #acd4ed; --gold: #e1ce98; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 system-ui,sans-serif; letter-spacing: 0; }
a { color: var(--blue); text-underline-offset: 4px; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
.topic-nav { position: sticky; top: 0; z-index: 5; border-bottom: 1px solid var(--line); background: var(--bg); }
.topic-nav > div { max-width: 1080px; margin: auto; display: flex; gap: 8px 20px; align-items: center; padding: 10px 24px; overflow-x: auto; }
.topic-nav a { flex: 0 0 auto; color: var(--muted); font-size: 13px; text-decoration: none; }
.topic-nav a:hover { color: white; }
.topic-nav .back-link { display: grid; place-items: center; width: 32px; height: 32px; }
svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
main { max-width: 1080px; margin: auto; padding: 28px 24px 60px; overflow-wrap: anywhere; }
section { padding: 0 0 26px; margin: 0 0 26px; border-bottom: 1px solid var(--line); }
h2 { margin: 0 0 16px; color: var(--green); font-size: 21px; font-weight: 650; line-height: 1.35; }
section:nth-of-type(3n+2) h2 { color: var(--blue); }
section:nth-of-type(3n) h2 { color: var(--gold); }
p { margin: 12px 0; }
strong { color: #fff; font-weight: 650; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; margin: 16px 0; font-size: 15px; line-height: 1.5; }
th,td { text-align: left; padding: 11px 14px; vertical-align: top; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
thead th { background: #30363a; color: var(--muted); font-size: 13px; font-weight: 600; }
tbody th { font-weight: 600; }
table:has(thead th:last-child:nth-child(2)) tr > :first-child { width: 29%; }
#infection table tr > :first-child { width: 50%; }
.sequence { border-left: 2px solid var(--gold); padding: 4px 0 4px 14px; }
dl { margin: 16px 0; }
dt { font-weight: 600; }
dd { margin: 0; }
.pairs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 24px; }
.pairs dd { color: var(--muted); }
.recall-list > div { display: grid; grid-template-columns: 27% 1fr; gap: 18px; padding: 10px 0; border-bottom: 1px solid #ffffff10; }
.sources { color: var(--muted); font-size: 13px; }
.sources summary { cursor: pointer; color: var(--blue); padding: 10px 0; }
.sources li { margin: 9px 0; }
.micro-term { appearance: none; border: 0; padding: 0; margin: 0; background: none; color: inherit; font: inherit; text-align: inherit; line-height: inherit; white-space: normal; cursor: help; text-decoration: underline dotted #b6c8cb60; text-underline-offset: 4px; overflow-wrap: anywhere; }
.micro-term:hover,.micro-term[aria-expanded=true] { color: #fff; text-decoration-color: var(--green); }
.term-popover { position: fixed; z-index: 20; width: 370px; max-width: calc(100vw - 24px); max-height: min(440px,calc(100dvh - 24px)); overflow-y: auto; overscroll-behavior: contain; background: #191e21; border: 1px solid #697a77; border-radius: 6px; padding: 16px 18px; box-shadow: 0 9px 28px #0007; font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.term-popover[hidden] { display: none; }
.term-popover h3 { margin: 0 30px 10px 0; color: var(--green); font-size: 16px; line-height: 1.4; }
.term-popover p { margin: 8px 0 0; }
.term-popover button { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 4px; background: none; color: var(--muted); cursor: pointer; }
.term-popover button:hover { background: #ffffff10; color: #fff; }
@media(max-width:600px) {
  main { padding: 22px 16px 40px; }
  .topic-nav > div { padding: 8px 16px; gap: 16px; }
  th,td { padding: 10px 8px; }
  table { font-size: 14px; }
  table:has(thead th:last-child:nth-child(2)) tr > :first-child { width: 34%; }
  #infection table tr > :first-child { width: 50%; }
  .recall-list > div { grid-template-columns: 1fr; gap: 3px; padding: 12px 0; }
  .pairs { gap: 12px; }
}
@media(max-width:380px) { .pairs { grid-template-columns: 1fr; } th,td { padding: 9px 6px; } }
@media(prefers-reduced-motion:reduce) { html { scroll-behavior: auto; } }
@media print {
  :root { color-scheme: light; --text: #151515; --muted: #333; --line: #bbb; --green: #174a31; --blue: #174564; --gold: #6a4c14; }
  body { background: #fff; font-size: 10pt; }
  main { padding: 0; max-width: none; }
  .topic-nav,.term-popover,.sources { display: none !important; }
  strong { color: #111; }
  h2 { font-size: 13pt; break-after: avoid; }
  tr { break-inside: avoid; }
  table { font-size: 9pt; }
  thead th { background: #eee; }
  .micro-term { text-decoration: none; }
}
