/* NVI Knowledge Hub (home page).
   Layout concept: journal-like reading surface (serif headings, plain sans body) under a navy
   public-health header; JSI red is the only accent and marks the active state, as in the wireframes. */
:root { color-scheme: light }
[hidden] { display: none !important }

:root {
  --bg: #f6f8fa;
  --surface: #ffffff;
  --surface-2: #edf1f5;
  --ink: #22364a;
  --ink-2: #55687a;
  --line: #e0e6ec;
  --accent: #cf5128;
  --accent-ink: #ffffff;
  --accent-soft: #fdeee8;
  --accent-line: #f3c3ae;
  --nav: #234560;
  --bar: #234560;
  --bar-muted: #b8c9da;
  --head-num: #234560;
  --nav-ink: #eaf0fb;
  --nav-muted: #b8c9da;
  --warn-bg: #fff7e0;
  --warn-line: #f0d58a;
  --warn-ink: #8a4b0a;
  --ok: #1f9d55;
  --shadow: 0 1px 2px rgba(34, 54, 74, .05), 0 6px 18px rgba(34, 54, 74, .07);
  --shadow-up: 0 2px 4px rgba(16, 26, 46, .08), 0 10px 26px rgba(16, 26, 46, .12);
  --font-display: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 14px;
  --radius-sm: 6px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1a26; --surface: #152433; --surface-2: #1c3045; --ink: #e8eef5; --ink-2: #a9b9c9;
    --line: #27405a; --accent: #f2855f; --accent-ink: #2a0f05; --accent-soft: #2f1d17; --accent-line: #5e3426;
    --nav: #14293b; --bar: #14293b; --bar-muted: #94a3bd; --head-num: #9cc4e8; --nav-ink: #eaf0fb; --nav-muted: #94a3bd;
    --warn-bg: #2b2412; --warn-line: #5b4a1c; --warn-ink: #f0c36a; --ok: #3ddc84;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.3);
    --shadow-up: 0 2px 4px rgba(0,0,0,.5), 0 10px 26px rgba(0,0,0,.45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1a26; --surface: #152433; --surface-2: #1c3045; --ink: #e8eef5; --ink-2: #a9b9c9;
  --line: #27405a; --accent: #f2855f; --accent-ink: #2a0f05; --accent-soft: #2f1d17; --accent-line: #5e3426;
  --nav: #17133f; --bar: #3d3499; --bar-muted: #d6d2fb; --head-num: #9cc4e8; --nav-ink: #eaf0fb; --nav-muted: #94a3bd;
  --warn-bg: #2b2412; --warn-line: #5b4a1c; --warn-ink: #f0c36a; --ok: #3ddc84;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.3);
  --shadow-up: 0 2px 4px rgba(0,0,0,.5), 0 10px 26px rgba(0,0,0,.45);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); background: var(--bar); z-index: 60; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; margin: 0; text-wrap: balance; color: var(--ink); }
h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.1rem; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; height: auto; }
ul, dl { margin: 0; padding: 0; }
li { list-style: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-2); font-weight: 400; }
.wrap { width: 100%; max-width: 1180px; margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip-link { position: absolute; left: 8px; top: -60px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; z-index: 100; border-radius: 6px; }
.skip-link:focus { top: calc(8px + env(safe-area-inset-top, 0px)); }

.eyebrow { font: 600 .78rem/1.2 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; min-height: 44px;
  font: 600 .95rem/1 var(--font-body); border-radius: var(--radius-sm); border: 1.5px solid transparent; cursor: pointer;
  text-decoration: none; transition: background .15s, box-shadow .15s, border-color .15s; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { box-shadow: var(--shadow-up); filter: brightness(1.06); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { min-height: 38px; padding: 8px 14px; font-size: .88rem; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: var(--bar); color: var(--nav-ink); border-bottom: 3px solid var(--accent); }
.header-inner { display: flex; align-items: center; gap: 12px 28px; padding-block: 10px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; margin-right: auto; }
.logo-tile { background: #fff; border-radius: 8px; padding: 3px 5px; display: grid; place-items: center; }
.logo-tile img { display: block; height: 40px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font: 600 1.2rem/1.2 var(--font-display); color: #fff; }
.brand-sub { font-size: .75rem; color: var(--bar-muted); }
.main-nav { display: flex; gap: 4px; }
.main-nav a { color: var(--bar-muted); text-decoration: none; font-weight: 600; font-size: .95rem; padding: 10px 14px; border-radius: 6px; border-bottom: 2px solid transparent; }
.main-nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.main-nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--accent); }
.main-nav a:focus-visible, .btn-login:focus-visible, .brand:focus-visible { outline-color: #fff; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.btn-login { display: inline-flex; align-items: center; background: transparent; color: var(--nav-ink); border: 1.5px solid rgba(255,255,255,.35); border-radius: 6px; padding: 8px 18px; min-height: 40px; font: 600 .9rem var(--font-body); cursor: pointer; text-decoration: none; }
.btn-login:hover { background: rgba(255,255,255,.1); border-color: #fff; color: var(--nav-ink); }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(180deg, var(--accent-soft), var(--bg)); border-bottom: 1px solid var(--line); padding-block: clamp(32px, 5vw, 64px) clamp(28px, 4vw, 48px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px 48px; align-items: end; }
.hero-lead { margin-top: 12px; font-size: 1.05rem; color: var(--ink-2); max-width: 54ch; }
.hero-lead span { color: var(--ink); font-weight: 700; }
.hero-search { display: flex; gap: 8px; }
.hero-search input { flex: 1; min-width: 0; }
.hero-tools { display: grid; gap: 14px; justify-items: start; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .88rem; color: var(--ink-2); }
.quick a { text-decoration: none; font-weight: 700; padding: 4px 12px; border-radius: 999px; border: 1.5px solid var(--accent-line); background: var(--surface); }
.quick a:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
input[type="search"] { font: inherit; padding: 12px 14px; min-height: 46px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); }
input[type="search"]::placeholder { color: var(--ink-2); opacity: .85; }
input[type="search"]:focus-visible { outline: 2px solid var(--accent); border-color: var(--accent); }
.panel-title { font-size: 1.05rem; }

.strip-wrap { margin-top: 28px; }
.strip { background: var(--nav); color: var(--nav-ink); border-radius: var(--radius); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); box-shadow: var(--shadow-up); }
.strip > div { padding: 14px 22px; display: flex; flex-direction: column; gap: 2px; }
.strip > div + div { border-left: 1px solid rgba(255,255,255,.14); }
.strip-k { font-size: .75rem; color: var(--nav-muted); }
.strip-v { font-weight: 700; }
.strip-status { color: #4ade80; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(36px, 5vw, 64px); }
.section-head { display: grid; gap: 6px; margin-bottom: 24px; max-width: 760px; }
.section-head p:not(.eyebrow) { color: var(--ink-2); }
.long-title { font-size: clamp(1.3rem, 2.4vw, 1.75rem); max-width: 30em; }
.band { background: transparent; }

/* antigen cards */
.antigen-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.antigen-card { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 22px; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; font: inherit; cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s, background .15s; }
.antigen-card:hover, .antigen-card:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow-up); border-color: var(--accent); background: var(--surface-2); }
.antigen-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ac-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ac-code { font: 700 .95rem var(--font-body); color: var(--accent); }
.ac-badge { font-size: .78rem; font-weight: 700; background: var(--accent); color: var(--accent-ink); padding: 3px 10px; border-radius: 4px; white-space: nowrap; }
.ac-count { font: 600 1.35rem/1.25 var(--font-display); margin-top: 4px; }
.ac-tag { color: var(--ink-2); font-size: .95rem; }
.ac-links { margin-top: 10px; font-size: .88rem; font-weight: 600; color: var(--accent); }

/* tabs (shared) */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 5px; background: var(--surface-2); border-radius: var(--radius); width: fit-content; max-width: 100%; }
.tab { font: 600 .92rem var(--font-body); color: var(--ink-2); background: transparent; border: 0; padding: 9px 16px; min-height: 40px; border-radius: 7px; cursor: pointer; display: inline-flex; gap: 6px; align-items: baseline; }
.tab:hover { color: var(--ink); background: var(--line); }
.tab[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.tab .n { font-weight: 500; opacity: .85; font-variant-numeric: tabular-nums; }
.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tab[aria-selected="true"]:focus-visible { outline-color: var(--ink); }

/* write-up panel */
.band-first { background: transparent; border-bottom: 1px solid var(--line); }
.band-first .section { padding-top: clamp(28px, 4vw, 48px); }
.wu-switch { display: grid; grid-template-columns: repeat(7, minmax(min-content, 1fr)); gap: 12px; }
.wu-tab { text-align: center; font: inherit; cursor: pointer; padding: 14px 18px; min-height: 80px; align-content: center; justify-content: center; border-radius: var(--radius); border: 1.5px solid var(--line); background: var(--surface); box-shadow: var(--shadow); color: var(--ink); display: grid; gap: 2px; transition: border-color .15s, background .15s; }
.wu-tab:hover { border-color: var(--accent); }
.wu-tab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.wu-code { font: 700 1.4rem/1.1 var(--font-display); white-space: nowrap; }
.wu-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wu-tab[aria-selected="true"]:focus-visible { outline-color: var(--ink); }
.wu-panel { margin-top: 20px; display: grid; gap: 28px; }
.wu-panel:focus-visible { outline-offset: 8px; }
.wu-figs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.fig { background: linear-gradient(135deg, #cfe5f7 0%, #a9cdee 100%); border: 1px solid rgba(34, 54, 74, .08); box-shadow: var(--shadow); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 4px; align-content: start; }
.fig b { font: 700 1.3rem/1.2 var(--font-display); color: var(--head-num); overflow-wrap: anywhere; }
.fig span { font-size: .84rem; color: var(--ink); opacity: .85; line-height: 1.4; }
/* A different light theme gradient on each of the four cards */
.fig:nth-child(1) { background: linear-gradient(135deg, #cfe5f7 0%, #a9cdee 100%); }
.fig:nth-child(2) { background: linear-gradient(135deg, #c6eee5 0%, #93d9c9 100%); }
.fig:nth-child(3) { background: linear-gradient(135deg, #fbd9c8 0%, #f4b394 100%); }
.fig:nth-child(4) { background: linear-gradient(135deg, #d9d4f7 0%, #b5adee 100%); }
.wu-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 40px; align-items: start; }
.wu-text h3 { font-size: 1.6rem; margin-bottom: 14px; }
.wu-text p { margin-bottom: 14px; text-align: justify; hyphens: auto; }
.wu-text p a { font-weight: 500; }
.wu-text ul { padding-left: 1.4em; margin-bottom: 14px; display: grid; gap: 6px; }
.wu-side { position: sticky; top: 96px; background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 12px; }
.wu-side h4 { margin: 0; font: 700 .95rem var(--font-body); }
.wu-side ul { display: grid; gap: 2px; }
.wu-side li a { display: grid; gap: 1px; text-decoration: none; color: var(--ink); font-size: .88rem; line-height: 1.4; padding: 8px 10px; margin: 0 -10px; border-radius: 6px; }
.wu-side li a:hover { background: var(--surface-2); color: var(--accent); }
.wu-side .k { font-size: .72rem; font-weight: 700; color: var(--accent); }
.wu-side .btn { width: 100%; }

/* newsletter */
.news-grid { display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: 24px; margin-bottom: 22px; align-items: stretch; }
.news-stats { display: grid; grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 12px; }
.news-stats div { color: #fff; border-radius: var(--radius); padding: 16px 22px; display: flex; align-items: center; gap: 16px; box-shadow: var(--shadow); min-height: 84px; }
.news-stats dd { order: 1; margin: 0; font: 700 2.8rem/1 var(--font-display); color: #fff; min-width: 1.1ch; font-variant-numeric: tabular-nums; }
.news-stats dt { order: 2; font-size: 1rem; font-weight: 600; color: rgba(255,255,255,.95); line-height: 1.3; }
.news-stats div:nth-child(1) { background: linear-gradient(135deg, #7b6bd6, #5f55c4); }
.news-stats div:nth-child(2) { background: linear-gradient(135deg, #4fc9ad, #2fa68e); }
.news-stats div:nth-child(3) { background: linear-gradient(135deg, #ea6a5a, #d84a4f); }
.news-list { display: grid; gap: 10px; }
.news-list a { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.news-list a:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.news-list .st { font-weight: 700; color: var(--accent); }
.news-list .tt { font-weight: 500; }

/* ---------- Repository ---------- */
.repo-head { background: linear-gradient(180deg, var(--accent-soft), var(--bg)); border-bottom: 1px solid var(--line); padding-block: clamp(20px, 3vw, 30px) 20px; }
.repo-head h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.repo-lead { margin-top: 10px; color: var(--ink-2); max-width: 66ch; }
.repo-search { position: relative; margin-top: 14px; max-width: 640px; }
.repo-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-2); pointer-events: none; }
.repo-search input { width: 100%; padding-left: 44px; }
.repo-body { padding-block: 18px 56px; }
.toolbar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; display: grid; gap: 12px; }
.tabs-row { overflow-x: auto; }
.tabs-row .tabs { flex-wrap: nowrap; background: transparent; padding: 0; gap: 2px; }
.tabs-row .tab { white-space: nowrap; min-height: 36px; padding: 6px 14px; font-size: .9rem; }
.selects { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.sel { display: flex; align-items: center; gap: 8px; min-width: 0; height: 38px; padding-left: 12px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--bg); }
.sel:focus-within { border-color: var(--accent); }
.sel label { font-size: .78rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.sel select { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; padding: 0 8px 0 0; font-size: .9rem; font-weight: 600; color: var(--ink); text-overflow: ellipsis; }
.sel select:focus-visible { outline: none; }
select { font: inherit; color: var(--ink); }
.result-bar { margin: 14px 0 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.chip { font: 600 .8rem var(--font-body); padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-line); cursor: pointer; max-width: 100%; overflow-wrap: anywhere; text-align: left; }
.chip:hover { background: var(--accent); color: var(--accent-ink); }
.result-bar .link-btn { min-height: 32px; padding: 4px 12px; }
.spotlight[hidden], .empty[hidden], .result-bar [hidden] { display: none !important; }
.spotlight { margin-top: 14px; background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--radius); padding: 16px 20px; display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; justify-content: space-between; }
.spotlight p { flex: 1 1 400px; font-size: .95rem; text-align: justify; hyphens: auto; }
.spotlight strong { display: block; color: var(--accent); margin-bottom: 2px; }
.spotlight a { font-weight: 600; white-space: nowrap; }

.result-count { margin: 0; font-size: .9rem; color: var(--ink-2); }
.result-count b { color: var(--ink); }
.results { display: grid; gap: 12px; }
.card { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; grid-template-columns: 164px minmax(0, 1fr); gap: 18px; align-items: start; transition: border-color .15s, box-shadow .15s; box-shadow: var(--shadow); }
.card:hover, .card:focus-within { border-color: var(--accent); box-shadow: var(--shadow-up); }
.card-eyebrow { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: .8rem; font-weight: 700; color: var(--accent); }
.card-eyebrow .sep { color: var(--ink-2); font-weight: 400; }
.card-eyebrow .type { color: var(--ink); }
.card h3 { font-size: 1.15rem; line-height: 1.35; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--accent); text-decoration: underline; }
.card .desc { color: var(--ink-2); font-size: .95rem; text-align: justify; hyphens: auto; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .76rem; padding: 3px 9px; background: var(--surface-2); color: var(--ink-2); border-radius: 4px; border: 0; font-family: inherit; cursor: pointer; }
.tag:hover { color: var(--accent); }
.flag { font-size: .76rem; padding: 3px 9px; border-radius: 4px; background: var(--warn-bg); color: var(--warn-ink); border: 1px solid var(--warn-line); }
.card-foot { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--line); }
.source { font-size: .84rem; color: var(--ink-2); overflow-wrap: anywhere; min-width: 0; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.link-btn { font: 600 .84rem var(--font-body); background: none; border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 7px 12px; min-height: 36px; color: var(--ink); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.link-btn:hover { border-color: var(--accent); color: var(--accent); }
.link-btn.open { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.link-btn.open:hover { filter: brightness(1.08); color: var(--accent-ink); }
details.note { font-size: .9rem; color: var(--ink-2); }
details.note summary { cursor: pointer; font-weight: 600; color: var(--ink); width: fit-content; }
details.note p { margin-top: 6px; max-width: 78ch; }
mark { background: #ffe58a; color: #1a1a1a; border-radius: 2px; padding: 0 1px; }

.empty { margin-top: 24px; background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: var(--radius); padding: 36px 20px; text-align: center; display: grid; gap: 10px; justify-items: center; }
.empty h2 { color: var(--warn-ink); font-size: 1.3rem; }
.empty p { color: var(--warn-ink); max-width: 46ch; }
.empty-icon { width: 34px; height: 34px; border-radius: 50%; background: #d97706; color: #fff; font-weight: 800; display: grid; place-items: center; }

/* ---------- Footer, toast ---------- */
.site-footer { background: var(--nav); color: var(--nav-muted); padding-block: 28px; margin-top: 24px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 20px 48px; justify-content: center; text-align: center; }
.footer-inner strong { color: #fff; font-family: var(--font-display); font-size: 1.1rem; }
.footer-inner p { max-width: 58ch; font-size: .88rem; margin: 4px auto 0; }
.footer-links { display: grid; gap: 6px; }
.footer-links a { color: var(--nav-ink); font-size: .92rem; }
.footer-links a:focus-visible, .site-footer a:focus-visible { outline-color: #fff; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 8px; font-size: .9rem; z-index: 80; box-shadow: var(--shadow-up); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .selects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-grid, .news-grid, .impact-grid, .wu-cols { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .wu-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wu-side { position: static; }
  /* Keep the seven write-up cards on one row; swipe sideways when they don't fit */
  .wu-switch { gap: 8px; grid-template-columns: repeat(7, minmax(max-content, 1fr)); overflow-x: auto; padding: 4px; margin-inline: -4px; scrollbar-width: thin; }
  .wu-tab { padding: 12px 14px; min-height: 64px; }
  .wu-code { font-size: 1.15rem; }
  .antigen-grid { grid-template-columns: minmax(0, 1fr); }
  .strip { grid-template-columns: minmax(0, 1fr); }
  .strip > div + div { border-left: 0; border-top: 1px solid rgba(255,255,255,.14); }
}
@media (max-width: 600px) {
  .header-inner { gap: 8px 12px; }
  .main-nav { order: 3; width: 100%; }
  .main-nav a { flex: 1; text-align: center; padding: 10px 6px; }
  .hero-search { flex-direction: column; }
  .wu-figs { grid-template-columns: minmax(0, 1fr); }
  .news-list a { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .selects { grid-template-columns: minmax(0, 1fr); }
  .brand-sub { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .antigen-card:hover { transform: none; }
}

.card-body { display: grid; gap: 8px; min-width: 0; }
.thumb { --tc: #546e85; aspect-ratio: 4 / 3; width: 100%; border-radius: 10px; overflow: hidden; position: relative; display: grid; place-items: center; background: color-mix(in srgb, var(--tc) 14%, var(--surface-2)); border: 1px solid var(--line); }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.th-RVV { --tc: #6556c8; } .th-PCV { --tc: #1f9a85; } .th-TCV { --tc: #d2473f; } .th-HPVV { --tc: #d9772a; } .th-RSV { --tc: #2f74bd; } .th-OTHER { --tc: #546e85; }
.doc { width: 66%; height: 86%; background: #fff; color: #22364a; border-radius: 3px; box-shadow: 0 2px 8px rgba(20, 30, 45, .28); display: flex; flex-direction: column; gap: 4px; padding: 0 0 6px; overflow: hidden; position: relative; }
.dp-head { background: var(--tc); color: #fff; padding: 4px 6px; display: flex; flex-direction: column; gap: 1px; }
.dp-head span { font: 700 .56rem/1.15 var(--font-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-head em { font: 500 .5rem/1.1 var(--font-body); opacity: .9; font-style: normal; }
.dp-title { font: 600 .56rem/1.25 var(--font-display); padding: 2px 6px 0; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.dp-lines { display: grid; gap: 3px; padding: 0 6px; margin-top: auto; }
.dp-lines i { display: block; height: 2px; background: #d3dbe3; border-radius: 1px; }
.dp-lines i:nth-child(2) { width: 85%; } .dp-lines i:nth-child(3) { width: 60%; }
.dp-badge { position: absolute; right: 4px; bottom: 4px; background: #d13b3b; color: #fff; font: 700 .5rem/1 var(--font-body); padding: 3px 4px; border-radius: 2px; }
.doc-news { padding-top: 0; }
.dp-mast { background: #22364a; color: #fff; font: 700 .5rem/1.2 var(--font-display); padding: 5px 6px; text-align: center; letter-spacing: .02em; }
.dp-state { font: 700 .95rem/1.1 var(--font-display); color: var(--tc); padding: 6px 6px 2px; }
.doc-web { padding-top: 0; }
.dp-bar { background: #e6ebf0; display: flex; gap: 3px; padding: 4px 5px; }
.dp-bar b { width: 4px; height: 4px; border-radius: 50%; background: #aab6c2; }
.dp-url { margin: 0 5px; padding: 2px 5px; background: #f1f4f7; border-radius: 8px; font: 600 .48rem/1.2 var(--font-body); color: #55687a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 600px) {
  .card { grid-template-columns: minmax(0, 1fr); }
  .thumb { aspect-ratio: 16 / 7; }
  .doc { width: 40%; }
}

/* ---------- Impact panel ---------- */
.impact-wrap { padding-block: clamp(28px, 4vw, 48px); }
.impact-panel { background: linear-gradient(135deg, var(--nav), #1b3a52); color: #fff; border-radius: 20px; padding: clamp(22px, 4vw, 40px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 28px 40px; align-items: stretch; box-shadow: var(--shadow-up); }
.impact-eyebrow { font: 700 .75rem/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: #f3b79f; margin-bottom: 10px; }
.impact-intro h2 { color: #fff; font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.impact-intro h2 span { color: #b8c9da; font-weight: 500; }
.impact-note { margin-top: 8px; color: #b8c9da; font-size: .92rem; }
.impact-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.impact-tiles div { border-radius: 14px; padding: 18px 20px; display: flex; flex-direction: column; }
.impact-tiles dd { order: 1; margin: 0; font: 700 3.2rem/1 var(--font-display); font-variant-numeric: tabular-nums; }
.impact-tiles dt { order: 2; margin-top: 6px; font-weight: 600; opacity: .95; }
.it-a { background: linear-gradient(135deg, #7b6bd6, #5144b3); }
.it-b { background: linear-gradient(135deg, #3fbfa3, #1f8f7c); }
.impact-chart { background: var(--surface); color: var(--ink); border-radius: 14px; padding: 20px 22px; }
.impact-chart h3 { font: 700 .95rem var(--font-body); margin-bottom: 14px; }
.bars { display: grid; gap: 12px; }
.bars li { display: grid; grid-template-columns: 88px minmax(0, 1fr) 24px; align-items: center; gap: 12px; font-size: .9rem; }
.bars .track { height: 14px; background: var(--surface-2); border-radius: 7px; overflow: hidden; }
.bars .fill { display: block; height: 100%; border-radius: 7px; }
.bars b { font-variant-numeric: tabular-nums; text-align: right; }
@media (max-width: 900px) { .impact-panel { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .bars li { grid-template-columns: 76px minmax(0, 1fr) 22px; } .impact-tiles dd { font-size: 2.6rem; } }
.bars .fill.th-RVV { background: linear-gradient(90deg, #7b6bd6, #5144b3); }
.bars .fill.th-PCV { background: linear-gradient(90deg, #3fbfa3, #1f8f7c); }
.bars .fill.th-TCV { background: linear-gradient(90deg, #ea6a5a, #c9403f); }
.bars .fill.th-HPVV { background: linear-gradient(90deg, #f0a050, #d9772a); }
.bars .fill.th-RSV { background: linear-gradient(90deg, #4a9be0, #2a6bb5); }
.bars .fill.th-OTHER { background: linear-gradient(90deg, #5f7a92, #3b536b); }

/* ---------- Home title banner ---------- */
.home-hero { position: relative; overflow: hidden; color: #fff; background: radial-gradient(120% 140% at 85% 0%, rgba(160, 205, 240, .38) 0%, rgba(160, 205, 240, 0) 55%), linear-gradient(135deg, #2f5f84 0%, #3f7399 55%, #34688d 100%); padding-block: clamp(8px, calc(6vw - 40px), 36px) clamp(84px, 9vw, 116px); }
.home-hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.14) 1.2px, transparent 1.4px); background-size: 24px 24px; mask-image: linear-gradient(100deg, transparent 35%, #000 100%); -webkit-mask-image: linear-gradient(100deg, transparent 35%, #000 100%); }
.home-hero::after { content: ""; position: absolute; right: -90px; top: -120px; width: 420px; height: 420px; border-radius: 50%; border: 44px solid rgba(255,255,255,.06); box-shadow: 0 0 0 90px rgba(255,255,255,.03); }
.hh-inner { position: relative; z-index: 1; }
.hh-title { color: #fff; font-size: clamp(1.9rem, 4.4vw, 3.2rem); line-height: 1.12; letter-spacing: -.015em; max-width: none; text-wrap: wrap; text-shadow: 0 2px 20px rgba(0,0,0,.18); }
.hh-title::after { content: ""; display: block; width: 84px; height: 5px; border-radius: 3px; margin-top: 22px; background: linear-gradient(90deg, #5fe0c4, #ff9a7a, #ffc36b); }
.band-first .wu-wrap { position: relative; z-index: 2; padding-bottom: clamp(32px, 4vw, 56px); }
.band-first .wu-switch { margin-top: -46px; }
.band-first .wu-tab { box-shadow: var(--shadow-up); }

/* ---------- Repository banner ---------- */
.repo-hero { padding-block: clamp(8px, calc(6vw - 40px), 36px) clamp(64px, 7vw, 84px); }
.repo-hero .hh-title { max-width: none; }
.repo-hero .hh-title::after { margin-top: 22px; }
.hh-lead { margin-top: 16px; max-width: 58ch; color: #e1ecf6; font-size: 1.02rem; }
.repo-body { position: relative; z-index: 2; padding-top: 0; }
.repo-body .repo-search { margin: -30px 0 16px; max-width: 760px; position: relative; }
.repo-body .repo-search input { height: 60px; padding-left: 52px; font-size: 1.02rem; border: 0; border-radius: 14px; box-shadow: var(--shadow-up); }
.repo-body .repo-search svg { left: 18px; color: var(--accent); }
.repo-body .repo-search input:focus-visible { outline: 2px solid var(--accent); }
/* Top bar spans the full page width */
.site-header .header-inner { max-width: none; padding-left: max(28px, env(safe-area-inset-left, 0px)); padding-right: max(28px, env(safe-area-inset-right, 0px)); }
@media (max-width: 600px) { .site-header .header-inner { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); } }

/* Logged-in user name in the header */
.user-name { color: var(--nav-ink); font-weight: 600; font-size: .9rem; margin-right: 6px; }
@media (max-width: 600px) { .user-name { display: none; } }

button, input, select, textarea { font-family: inherit; }

/* Flash notice: light yellow card centred in the middle of the header bar, hides itself after a few seconds */
.flash-bar { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 2; width: max-content; max-width: calc(100vw - 32px); background: #fff3b0; color: #b3261e; border: 1.5px solid #f0d34f; text-align: center; font: 600 1rem var(--font-body); padding: 9px 26px; border-radius: 14px; box-shadow: 0 6px 18px rgba(16, 26, 46, .3); transition: opacity .4s; }
.flash-bar.is-hiding { opacity: 0; }
