/* Super Duke Cancer Fund — site styles
   Layout concept: a clinical "treatment plan" system. Cool paper ground, Penn navy
   as the structural color, the logo's signal red reserved for giving and emphasis,
   and Duke's tan coat as a quiet warm accent. Isodose contour lines (from radiation
   treatment planning) are the recurring graphic motif. */

:root {
  --paper: #f4f6f9;
  --surface: #ffffff;
  --ink: #0c1324;
  --ink-2: #3a4560;
  --muted: #66718a;
  --rule: #d9dee8;
  --navy: #0b2a63;
  --navy-deep: #071a40;
  --red: #d22630;
  --red-ink: #b31d26;
  --tan: #b5773f;
  --tint: #e8edf6;
  --accent-ink: #0b2a63;
  --on-navy: #f2f5fb;
  --on-navy-muted: #a9b6d2;
  --iso-95: #d22630;
  --iso-80: #e39a3b;
  --iso-50: #4fa3d9;
  --good: #2f7d4f;
  --warn: #a8661a;
  --shadow: 0 1px 2px rgb(12 19 36 / 6%), 0 8px 28px rgb(12 19 36 / 8%);

  --f-display: "Archivo", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --f-ui: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Newsreader", Georgia, "Times New Roman", serif;

  --step--1: 0.8125rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.625rem;
  --step-3: clamp(1.9rem, 1.4rem + 2vw, 2.6rem);
  --step-4: clamp(2.4rem, 1.6rem + 3.4vw, 3.9rem);
  --step-5: clamp(2.8rem, 1.6rem + 5vw, 5.4rem);

  --wrap: 1200px;
  --radius: 6px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0a1020;
    --surface: #111a2e;
    --ink: #eef2f9;
    --ink-2: #c3cbdc;
    --muted: #8f9ab3;
    --rule: #233150;
    --navy: #16397f;
    --navy-deep: #060d1d;
    --red: #ef4450;
    --red-ink: #ff6b74;
    --tan: #d39a62;
    --tint: #16223b;
  --accent-ink: #7cc0ec;
    --accent-ink: #7cc0ec;
    --on-navy: #f2f5fb;
    --on-navy-muted: #a9b6d2;
    --good: #5cc287;
    --warn: #e0a454;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 10px 30px rgb(0 0 0 / 35%);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0a1020;
  --surface: #111a2e;
  --ink: #eef2f9;
  --ink-2: #c3cbdc;
  --muted: #8f9ab3;
  --rule: #233150;
  --navy: #16397f;
  --navy-deep: #060d1d;
  --red: #ef4450;
  --red-ink: #ff6b74;
  --tan: #d39a62;
  --tint: #16223b;
  --accent-ink: #7cc0ec;
  --on-navy: #f2f5fb;
  --on-navy-muted: #a9b6d2;
  --good: #5cc287;
  --warn: #e0a454;
  --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 10px 30px rgb(0 0 0 / 35%);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--step-0);
  line-height: 1.6;
  font-optical-sizing: auto;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--surface); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--red-ink); }
:focus-visible { outline: 3px solid var(--iso-50); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3, h4 { font-family: var(--f-display); line-height: 1.05; margin: 0; text-wrap: balance; color: var(--ink); }
h1 { font-size: var(--step-5); font-weight: 900; font-stretch: 112%; letter-spacing: -0.02em; }
h2 { font-size: var(--step-4); font-weight: 850; font-stretch: 108%; letter-spacing: -0.015em; }
h3 { font-size: var(--step-2); font-weight: 750; font-stretch: 100%; letter-spacing: -0.01em; line-height: 1.15; }
h4 { font-size: var(--step-1); font-weight: 700; line-height: 1.25; }
p { margin: 0; }
.prose { display: grid; gap: 1em; max-width: 66ch; }
.prose h3 { margin-top: 0.6em; }
.prose ul, .prose ol { margin: 0; padding-left: 1.2em; display: grid; gap: 0.4em; }
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--ink-2); max-width: 60ch; }
.slant { font-style: italic; }
.red { color: var(--red); }
.navy-text { color: var(--accent-ink); }

.eyebrow {
  font-family: var(--f-ui);
  font-size: var(--step--1);
  font-weight: 600;
  font-stretch: 125%;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex; align-items: center; gap: 0.75em;
}
.eyebrow::before { content: ""; width: 28px; height: 3px; background: var(--red); flex: none; }
.eyebrow.plain::before { display: none; }
.label {
  font-family: var(--f-ui); font-size: 0.72rem; font-weight: 600; font-stretch: 115%;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}

.wrap {
  width: 100%; max-width: calc(var(--wrap) + 64px); margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 700px) { .wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); } }
.section { padding-block: clamp(56px, 8vw, 104px); }
.section.tight { padding-block: clamp(40px, 5vw, 64px); }
.section-head { display: grid; gap: 18px; margin-bottom: clamp(28px, 4vw, 48px); max-width: 820px; }
.band-tint { background: var(--tint); }
.band-surface { background: var(--surface); border-block: 1px solid var(--rule); }
.band-navy { background: var(--navy-deep); color: var(--on-navy); }
.band-navy h1, .band-navy h2, .band-navy h3, .band-navy h4 { color: var(--on-navy); }
.band-navy .eyebrow, .band-navy .label { color: var(--on-navy-muted); }
.band-navy .lede, .band-navy p { color: var(--on-navy-muted); }
.band-navy a { color: var(--on-navy); }

/* ---------- buttons ---------- */
.btn {
  --b: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  font-family: var(--f-ui); font-weight: 700; font-stretch: 118%; font-size: 0.82rem;
  letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none;
  padding: 0.95em 1.5em; border-radius: var(--radius); border: 1.5px solid var(--b);
  color: var(--b); background: transparent; cursor: pointer; transition: background .15s, color .15s, transform .15s;
  white-space: nowrap;
}
.btn:hover { background: var(--b); color: var(--paper); }
.btn .arr { transition: transform .15s; }
.btn:hover .arr { transform: translateX(3px); }
.btn-red { --b: var(--red); background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-ink); border-color: var(--red-ink); color: #fff; }
.band-navy .btn { --b: var(--on-navy); }
.band-navy .btn:hover { color: var(--navy-deep); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.textlink {
  font-family: var(--f-ui); font-weight: 700; font-stretch: 115%; font-size: 0.78rem; letter-spacing: 0.14em;
  text-transform: uppercase; text-decoration: none; color: var(--ink); display: inline-flex; gap: .5em; align-items: center;
}
.textlink:hover { color: var(--red-ink); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--rule);
  transition: transform .3s ease;
}
.site-header.is-hidden { transform: translateY(calc(-100% - env(safe-area-inset-top, 0px))); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.brand { display: block; flex: none; text-decoration: none; }
.brand-mark {
  display: block; width: 200px; aspect-ratio: 1358 / 217; max-width: 100%;
  background: var(--ink);
  -webkit-mask: url("../img/logo-oneline.png") center / contain no-repeat;
  mask: url("../img/logo-oneline.png") center / contain no-repeat;
}
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a {
  font-family: var(--f-ui); font-size: 0.78rem; font-weight: 600; font-stretch: 108%; letter-spacing: 0.06em;
  text-transform: uppercase; text-decoration: none; color: var(--ink-2); padding: 8px 10px; border-radius: 4px; white-space: nowrap;
}
.nav a:hover { color: var(--ink); background: var(--tint); }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--red); border-radius: 0; }
.header-cta { padding: 0.8em 1.2em; }
.menu-btn {
  display: none; margin-left: auto; background: none; border: 0; border-radius: var(--radius);
  color: var(--ink); width: 44px; height: 44px; padding: 0; align-items: center; justify-content: center; cursor: pointer;
}
.menu-btn:hover { background: var(--tint); }
.burger { position: relative; display: block; width: 24px; height: 16px; }
.burger i { position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: currentColor; transition: transform .3s ease, opacity .2s ease, top .3s ease; }
.burger i:nth-child(1) { top: 0; } .burger i:nth-child(2) { top: 7px; } .burger i:nth-child(3) { top: 14px; }
.menu-btn[aria-expanded="true"] .burger i:nth-child(1) { top: 7px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .burger i:nth-child(2) { opacity: 0; transform: scaleX(.2); }
.menu-btn[aria-expanded="true"] .burger i:nth-child(3) { top: 7px; transform: rotate(-45deg); }
@media (max-width: 1180px) {
  .menu-btn { display: inline-flex; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--rule); box-shadow: var(--shadow);
    padding: 8px max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px));
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 8px; border-bottom: 1px solid var(--rule); font-size: 0.85rem; }
  .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--red); padding-left: 14px; }
  .site-header .header-cta { order: 2; }
}
@media (max-width: 520px) {
  .site-header .header-cta { display: none; }
  .site-header .wrap { position: relative; justify-content: flex-end; min-height: 68px; }
  .brand { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
  .brand-mark { width: 184px; }
}

/* ---------- page hero (interior) ---------- */
.page-hero { padding-block: clamp(48px, 7vw, 92px) clamp(36px, 5vw, 60px); border-bottom: 1px solid var(--rule); position: relative; overflow: hidden; background: var(--surface); }
.page-hero .wrap { position: relative; display: grid; gap: 22px; }
.page-hero h1 { font-size: var(--step-4); max-width: 18ch; }
.page-hero .iso-bg { position: absolute; right: -120px; top: -80px; width: 640px; max-width: none; opacity: .55; pointer-events: none; }
@media (max-width: 700px) { .page-hero .iso-bg { right: -260px; opacity: .3; } }
.crumbs { font-family: var(--f-ui); font-size: 0.78rem; letter-spacing: .04em; color: var(--muted); }
.crumbs a { color: var(--muted); }

/* medical review flag (content governance) */
.review-flag {
  display: inline-flex; align-items: center; gap: 8px; width: fit-content;
  font-family: var(--f-ui); font-size: 0.74rem; font-weight: 600; letter-spacing: .04em;
  color: var(--warn); border: 1px dashed currentColor; border-radius: 999px; padding: 5px 12px;
}
.review-flag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ---------- home hero ---------- */
/* one continuous image area: Duke fills the right, copy and the give card sit over a soft wash on the left */
.hero {
  --hero-sky: radial-gradient(var(--hero-glow-size, 38% 60%) at var(--hero-glow-pos, 80% 36%), rgb(255 214 150 / 75%), transparent 70%), linear-gradient(180deg, #8fbbe6 0%, #c6dbf1 52%, #eef3f9 100%);
  --hero-wash: linear-gradient(90deg, rgb(244 246 249 / 96%) 0%, rgb(244 246 249 / 86%) 34%, rgb(244 246 249 / 0%) 60%);
  position: relative; overflow: hidden; border-bottom: 1px solid var(--rule); background: var(--hero-sky);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero {
    --hero-sky: radial-gradient(var(--hero-glow-size, 40% 62%) at var(--hero-glow-pos, 80% 38%), #1e56b4 0%, transparent 72%), linear-gradient(180deg, #0c2457 0%, #071431 60%, #060d1d 100%);
    --hero-wash: linear-gradient(90deg, rgb(6 13 29 / 94%) 0%, rgb(6 13 29 / 78%) 34%, rgb(6 13 29 / 0%) 60%);
  }
}
:root[data-theme="dark"] .hero {
  --hero-sky: radial-gradient(var(--hero-glow-size, 40% 62%) at var(--hero-glow-pos, 80% 38%), #1e56b4 0%, transparent 72%), linear-gradient(180deg, #0c2457 0%, #071431 60%, #060d1d 100%);
  --hero-wash: linear-gradient(90deg, rgb(6 13 29 / 94%) 0%, rgb(6 13 29 / 78%) 34%, rgb(6 13 29 / 0%) 60%);
}
.hero-art { position: absolute; inset: 0; pointer-events: none; }
.hero-art::after { content: ""; position: absolute; inset: 0; background: var(--hero-wash); }
.hero-art .duke { position: absolute; bottom: -14%; right: max(0px, calc((100% - var(--wrap)) / 2 - 40px)); height: 112%; width: auto; max-width: none; -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent 88%); mask-image: linear-gradient(180deg, #000 70%, transparent 88%); }
.hero .wrap { position: relative; z-index: 1; }
.hero-copy { padding-block: clamp(32px, 4.5vw, 64px); display: grid; gap: 18px; align-content: start; max-width: 560px; }
.hero .lede { font-size: var(--step-0); line-height: 1.5; }
.hero .give-card { padding: 18px; gap: 14px; }
.hero .amounts button, .hero .amounts .custom { padding-block: 10px; }
.hero h1 { font-size: clamp(2.8rem, 1.8rem + 4vw, 5rem); line-height: 0.95; }
.hero h1 em { font-style: italic; color: var(--accent-ink); font-weight: 900; }
.hero .give-card { background: var(--surface); box-shadow: var(--shadow); }
@media (max-width: 900px) {
  .hero { --hero-glow-pos: 50% 16%; --hero-glow-size: 90% 30%; }
  .hero-art { position: relative; height: clamp(320px, 86vw, 500px); }
  .hero-art::after { display: none; }
  .hero-art .duke { right: auto; left: 50%; transform: translateX(-50%); height: 104%; bottom: -4%; -webkit-mask-image: linear-gradient(180deg, #000 58%, transparent 92%); mask-image: linear-gradient(180deg, #000 58%, transparent 92%); }
  .hero-copy { padding-top: 0; margin-top: clamp(-72px, -12vw, -40px); }
}

/* donation meter */
.give-card { background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; padding: 22px; display: grid; gap: 18px; max-width: 560px; }
.meter-nums { display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; gap: 12px; }
.meter-nums div { display: grid; gap: 2px; }
.meter-nums b { font-family: var(--f-display); font-weight: 800; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.meter { height: 10px; background: var(--tint); border-radius: 99px; overflow: hidden; border: 1px solid var(--rule); }
.meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--navy), var(--red)); border-radius: 99px; }
.amounts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.amounts button, .amounts .custom {
  font-family: var(--f-ui); font-weight: 700; font-size: .95rem; font-variant-numeric: tabular-nums;
  padding: 12px 6px; border-radius: var(--radius); border: 1.5px solid var(--rule); background: var(--surface); color: var(--ink); cursor: pointer;
}
.amounts button:hover { border-color: var(--navy); }
.amounts button[aria-pressed="true"] { border-color: var(--navy); background: var(--navy); color: #fff; }
.amounts .custom { grid-column: span 2; display: flex; align-items: center; gap: 6px; padding-inline: 12px; cursor: text; }
.amounts .custom input { border: 0; background: transparent; color: inherit; font: inherit; width: 100%; min-width: 0; outline: none; }
@media (max-width: 460px) { .amounts { grid-template-columns: repeat(3, 1fr); } .amounts .custom { grid-column: span 3; } }
.give-card .btn-red { width: 100%; padding-block: 1.1em; }
.secure { font-family: var(--f-ui); font-size: .75rem; color: var(--muted); text-align: center; }

/* ---------- stats strip ---------- */
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); width: min(100% - 32px, var(--wrap)); margin: clamp(28px, 4vw, 56px) auto 0; border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; background: var(--surface); }
@media (min-width: 700px) { .stats { width: min(100% - 64px, var(--wrap)); } }
.stat { padding: 40px 24px 44px; min-height: 190px; display: grid; gap: 8px; align-content: start; border-right: 1px solid var(--rule); }
.stat:last-child { border-right: 0; }
.stat b { font-family: var(--f-display); font-weight: 850; font-stretch: 105%; font-size: clamp(1.8rem, 1.2rem + 1.6vw, 2.6rem); line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat b small { font-size: .45em; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; margin-left: .2em; }
.stat p { font-family: var(--f-ui); font-size: .8rem; line-height: 1.45; color: var(--ink-2); }
.stat .src { font-size: .68rem; color: var(--muted); }
@media (max-width: 1000px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stat { border-bottom: 1px solid var(--rule); } .stat:nth-child(2n) { border-right: 0; } .stat { min-height: 0; } .stat:last-child { grid-column: 1 / -1; border-bottom: 0; } }
.stats-dots { display: none; }
@media (max-width: 699px) {
  .stats {
    display: flex; gap: 12px; width: 100%; padding: 4px 9vw; position: relative;
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
    border: 0; border-radius: 0; background: none;
  }
  .stats::-webkit-scrollbar { display: none; }
  .stats .stat, .stats .stat:nth-child(2n), .stats .stat:last-child {
    flex: 0 0 82vw; scroll-snap-align: center; scroll-snap-stop: always;
    padding: 28px 24px 30px; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface);
  }
  .stats-dots { display: flex; justify-content: center; gap: 2px; margin-top: 10px; }
  .stats-dots button { width: 26px; height: 26px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
  .stats-dots button::before { content: ""; width: 8px; height: 8px; border-radius: 4px; background: var(--rule); transition: width .25s ease, background .25s ease; }
  .stats-dots button[aria-current="true"]::before { width: 20px; background: var(--red); }
}

/* ---------- pathway cards ---------- */
.paths { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.path { background: var(--surface); padding: 28px; display: grid; gap: 14px; align-content: start; text-decoration: none; color: var(--ink); transition: background .15s; min-width: 0; }
.path:hover { background: var(--tint); color: var(--ink); }
.path .ico { width: 44px; height: 44px; color: var(--accent-ink); }
.path h3 { font-size: 1.3rem; }
.path p { color: var(--ink-2); font-size: 1rem; }
.path .textlink { margin-top: 6px; }
@media (max-width: 900px) { .paths { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .paths { grid-template-columns: 1fr; } }

/* ---------- moonshot ---------- */
.moonshot { position: relative; overflow: hidden; }
.moonshot .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; position: relative; }
.moonshot h2 { font-size: var(--step-5); letter-spacing: -.02em; }
.pillars { display: grid; gap: 0; border-top: 1px solid rgb(255 255 255 / 14%); }
.pillar { display: grid; grid-template-columns: 52px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid rgb(255 255 255 / 14%); align-items: start; }
.pillar svg { width: 44px; height: 44px; color: var(--on-navy); }
.pillar h4 { font-family: var(--f-ui); font-size: .85rem; font-stretch: 120%; letter-spacing: .18em; text-transform: uppercase; color: var(--on-navy); margin-bottom: 4px; }
.pillar p { font-size: .98rem; }
.moonshot .rings { position: absolute; left: -260px; bottom: -340px; width: 820px; max-width: none; opacity: .5; pointer-events: none; }
@media (max-width: 900px) { .moonshot .wrap { grid-template-columns: 1fr; } }

/* ---------- split feature ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.split > * { min-width: 0; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.penn-card { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: clamp(24px, 4vw, 40px); display: grid; gap: 18px; box-shadow: var(--shadow); }
.penn-chip { background: #fff; border-radius: 6px; padding: 14px 18px; width: fit-content; }
.penn-chip img { width: 230px; }
.beam { position: relative; aspect-ratio: 4 / 3; max-width: 100%; border-radius: 10px; overflow: hidden; background: var(--navy-deep); }
.beam svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- generic cards / lists ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 24px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.card p, .card li { color: var(--ink-2); font-size: 1rem; }
.card ul { margin: 0; padding-left: 1.1em; display: grid; gap: .35em; }
.card h3 { font-size: 1.25rem; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font-family: var(--f-ui); font-size: .86rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink); }

/* evidence pills */
.ev { display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-ui); font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; border: 1px solid currentColor; width: fit-content; }
.ev i { display: inline-flex; gap: 2px; }
.ev i::before, .ev i::after, .ev i span { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .25; }
.ev-strong { color: var(--good); } .ev-strong i::before, .ev-strong i::after, .ev-strong i span { opacity: 1; }
.ev-moderate { color: var(--accent-ink); } .ev-moderate i::before, .ev-moderate i span { opacity: 1; }
.ev-limited { color: var(--warn); } .ev-limited i::before { opacity: 1; }
.ev-none { color: var(--muted); }
.ev-caution { color: var(--red-ink); }

/* callouts */
.callout { border-left: 4px solid var(--navy); background: var(--tint); padding: 18px 22px; border-radius: 0 8px 8px 0; display: grid; gap: 8px; max-width: 74ch; }
.callout.red { border-color: var(--red); }
.callout.tan { border-color: var(--tan); }
.callout strong { font-family: var(--f-ui); font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; }

/* sub-nav for long pages */
.subnav { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--header-h, 77px) - 1px); transition: transform .3s ease; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--rule); }
.header-hidden .subnav { transform: translateY(calc(1px - var(--header-h, 77px) - env(safe-area-inset-top, 0px))); }
.subnav .wrap { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-block: 10px; }
.subnav a { flex: none; font-family: var(--f-ui); font-size: .76rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; color: var(--ink-2); padding: 8px 14px; border: 1px solid var(--rule); border-radius: 999px; background: var(--surface); }
.subnav a:hover { border-color: var(--navy); color: var(--ink); }
.subnav .wrap { position: relative; scroll-padding-inline: 16px; }
.subnav a { transition: background .2s ease, color .2s ease, border-color .2s ease; }
.subnav a.is-active, .subnav a.is-active:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ---------- video ---------- */
.video { position: relative; aspect-ratio: 16 / 9; max-width: 100%; border-radius: 10px; overflow: hidden; background: var(--navy-deep); color: var(--on-navy); display: grid; place-items: center; }
.video svg.bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.video .play { position: relative; display: grid; justify-items: center; gap: 14px; text-align: center; padding: 20px; }
.video .play span.circle { width: 78px; height: 78px; border-radius: 50%; border: 2px solid var(--on-navy); display: grid; place-items: center; }
.video .play b { font-family: var(--f-display); font-weight: 800; font-size: clamp(1.1rem, .8rem + 1.2vw, 1.7rem); }
.video .play small { font-family: var(--f-ui); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--on-navy-muted); }
.chapters { display: grid; gap: 0; border-top: 1px solid var(--rule); }
.chapters li { display: grid; grid-template-columns: 64px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--rule); list-style: none; }
.chapters ol { margin: 0; padding: 0; }
.chapters time { font-family: var(--f-ui); font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent-ink); font-size: .9rem; }
.chapters p { font-size: .98rem; color: var(--ink-2); }
.chapters strong { font-family: var(--f-ui); font-size: .95rem; display: block; color: var(--ink); }

/* ---------- anatomy figure ---------- */
.figure { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 18px; display: grid; gap: 10px; }
.figure svg { width: 100%; height: auto; }
.figure figcaption { font-family: var(--f-ui); font-size: .8rem; color: var(--muted); }

/* ---------- quick guide ---------- */
.guide-section { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); padding-block: clamp(44px, 6vw, 72px); border-bottom: 1px solid var(--rule); scroll-margin-top: 140px; }
.guide-section:last-child { border-bottom: 0; }
.guide-section aside { display: grid; gap: 12px; align-content: start; }
.guide-section aside .num { font-family: var(--f-display); font-weight: 900; font-style: italic; font-size: 3.4rem; line-height: 1; color: var(--red); }
@media (max-width: 820px) { .guide-section { grid-template-columns: 1fr; } }
.sym-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--rule); }
.sym { padding: 16px 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 22px 1fr; gap: 12px; padding-right: 18px; }
.sym::before { content: ""; width: 10px; height: 10px; border-radius: 50%; margin-top: .45em; background: var(--c, var(--navy)); }
.sym.red { --c: var(--red); }
.sym strong { font-family: var(--f-ui); font-size: .98rem; display: block; }
.sym p { font-size: .95rem; color: var(--ink-2); }
@media (max-width: 620px) { .sym-grid { grid-template-columns: 1fr; } }
.steps { display: grid; gap: 0; counter-reset: s; margin: 0; padding: 0; }
.steps li { list-style: none; counter-increment: s; display: grid; grid-template-columns: 48px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.steps li::before { content: counter(s); font-family: var(--f-display); font-weight: 800; font-size: 1.1rem; width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--accent-ink); display: grid; place-items: center; color: var(--accent-ink); }
.steps strong { font-family: var(--f-ui); display: block; font-size: 1rem; margin-bottom: 2px; }
.steps p { font-size: .98rem; color: var(--ink-2); }
.table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 640px; font-family: var(--f-ui); font-size: .88rem; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; background: var(--tint); }
tr:last-child td { border-bottom: 0; }
td b { font-weight: 700; }
td .num { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }

/* survival bars */
.surv { display: grid; gap: 14px; }
.surv-row { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr); gap: 16px; align-items: center; font-family: var(--f-ui); font-size: .86rem; }
.surv-row .track { position: relative; height: 26px; background: var(--tint); border-radius: 4px; }
.surv-row .range { position: absolute; top: 0; bottom: 0; border-radius: 4px; background: color-mix(in srgb, var(--accent-ink) 25%, transparent); border: 1px solid var(--accent-ink); }
.surv-row .range.red { background: color-mix(in srgb, var(--red) 25%, transparent); border-color: var(--red); }
.surv-row .range em { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-style: normal; font-weight: 700; font-size: .78rem; white-space: nowrap; color: var(--ink); }
.surv-axis { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr); gap: 16px; font-family: var(--f-ui); font-size: .7rem; color: var(--muted); }
.surv-axis .ticks { position: relative; height: 16px; }
.surv-axis .ticks span { position: absolute; transform: translateX(-50%); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .surv-row, .surv-axis { grid-template-columns: 1fr; gap: 6px; } .surv-axis > span:first-child { display: none; } }

/* ---------- care map ---------- */
.care-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 960px) { .care-layout { grid-template-columns: 1fr; } }
.map-box { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 14px; position: sticky; top: 100px; }
@media (max-width: 960px) { .map-box { position: static; } }
.map-box svg { width: 100%; height: auto; display: block; }
.map-box .state { fill: var(--tint); stroke: var(--surface); stroke-width: 1; }
.map-box .nation { fill: none; stroke: var(--rule); stroke-width: 1; }
.pin { cursor: pointer; }
.pin circle.dot { fill: var(--accent-ink); stroke: var(--surface); stroke-width: 2; transition: r .15s; }
.pin.partner circle.dot { fill: var(--red); }
.pin circle.halo { fill: none; stroke: var(--red); stroke-width: 1.5; opacity: 0; }
.pin.active circle.halo { opacity: 1; }
.pin.active circle.dot, .pin:hover circle.dot { r: 9; }
.pin.dim { opacity: .2; }
.map-legend { display: flex; flex-wrap: wrap; gap: 16px; font-family: var(--f-ui); font-size: .76rem; color: var(--muted); padding: 8px 4px 0; }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.map-legend span::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.field { display: grid; gap: 6px; flex: 1 1 180px; min-width: 0; }
.field label { font-family: var(--f-ui); font-size: .7rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit; font-family: var(--f-ui); font-size: .95rem; color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--rule); border-radius: var(--radius); padding: 11px 12px; width: 100%; min-width: 0;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--navy); outline: none; }
.center-list { display: grid; gap: 10px; }
.center { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 18px; display: grid; gap: 8px; cursor: pointer; transition: border-color .15s; }
.center:hover, .center.active { border-color: var(--navy); }
.center.active { box-shadow: inset 4px 0 0 var(--red); }
.center h3 { font-size: 1.05rem; font-family: var(--f-ui); font-weight: 700; }
.center .where { font-family: var(--f-ui); font-size: .82rem; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-family: var(--f-ui); font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: var(--tint); color: var(--ink-2); }
.tag.red { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red-ink); }
.count { font-family: var(--f-ui); font-size: .82rem; color: var(--muted); margin-bottom: 10px; }

/* ---------- research library ---------- */
.lib-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip { font-family: var(--f-ui); font-size: .78rem; font-weight: 600; padding: 7px 14px; border-radius: 999px; border: 1.5px solid var(--rule); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.papers { display: grid; gap: 0; border-top: 1px solid var(--rule); }
.paper { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--rule); align-items: start; }
.paper .yr { font-family: var(--f-display); font-weight: 800; font-size: 1.25rem; font-variant-numeric: tabular-nums; color: var(--accent-ink); }
.paper h3 { font-family: var(--f-body); font-weight: 600; font-size: 1.12rem; line-height: 1.35; letter-spacing: 0; }
.paper .meta { font-family: var(--f-ui); font-size: .8rem; color: var(--muted); margin-top: 4px; }
.paper .why { font-size: .96rem; color: var(--ink-2); margin-top: 8px; }
.paper .tags { margin-top: 10px; }
@media (max-width: 640px) { .paper { grid-template-columns: 1fr; gap: 6px; } }
.trial { display: grid; gap: 10px; }
.status { font-family: var(--f-ui); font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 6px; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status.open { color: var(--good); }
.status.watch { color: var(--warn); }

/* ---------- frontier ---------- */
.tech { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); padding-block: clamp(44px, 6vw, 72px); border-bottom: 1px solid var(--rule); scroll-margin-top: 140px; }
.tech:last-of-type { border-bottom: 0; }
.tech.tech-feature { border-bottom: 1px solid var(--rule); }
.tech .spec { display: grid; gap: 16px; align-content: start; }
.tech .abbr { font-family: var(--f-display); font-weight: 900; font-style: italic; font-size: clamp(2.6rem, 2rem + 2vw, 3.6rem); line-height: .9; color: var(--accent-ink); letter-spacing: -.02em; }
.tech .diagram { background: var(--navy-deep); border-radius: 10px; aspect-ratio: 16 / 10; max-width: 100%; overflow: hidden; }
.tech .diagram svg { width: 100%; height: 100%; display: block; }
.tech .body { display: grid; gap: 20px; min-width: 0; }
@media (max-width: 860px) { .tech { grid-template-columns: 1fr; } }
.trial-list { display: grid; gap: 0; border-top: 1px solid var(--rule); }
.trial-row { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.trial-row .who { font-family: var(--f-ui); font-size: .82rem; font-weight: 700; display: grid; gap: 4px; align-content: start; }
.trial-row .who span { font-weight: 500; color: var(--muted); }
.trial-row p { font-size: 1rem; color: var(--ink-2); }
@media (max-width: 600px) { .trial-row { grid-template-columns: 1fr; gap: 6px; } }
.nasal-note { border: 1.5px solid var(--red); border-radius: 10px; padding: 16px 20px; display: grid; gap: 6px; background: color-mix(in srgb, var(--red) 5%, var(--surface)); }
.nasal-note strong { font-family: var(--f-ui); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--red-ink); }
.nasal-note p { font-size: 1rem; color: var(--ink-2); }
sup a { font-family: var(--f-ui); font-size: .7em; text-decoration: none; padding: 0 1px; }

/* ---------- donate ---------- */
.donate-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 900px) { .donate-layout { grid-template-columns: 1fr; } }
.seg { display: inline-grid; grid-auto-flow: column; border: 1.5px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.seg button { font-family: var(--f-ui); font-weight: 700; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; padding: 10px 18px; border: 0; background: var(--surface); color: var(--ink-2); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 520px) { .form-grid { grid-template-columns: 1fr; } }
.check { display: flex; gap: 10px; align-items: start; font-family: var(--f-ui); font-size: .9rem; color: var(--ink-2); }
.check input { margin-top: 4px; accent-color: var(--navy); }
.note-ok { font-family: var(--f-ui); font-size: .9rem; color: var(--good); }
#signup-msg { margin-top: 14px; }
.use-list { display: grid; gap: 0; border-top: 1px solid var(--rule); }
.use-list div { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.use-list b { font-family: var(--f-display); font-weight: 800; font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.use-list p { font-size: .98rem; color: var(--ink-2); }

/* ---------- about ---------- */
.timeline { display: grid; gap: 0; border-left: 2px solid var(--rule); margin-left: 6px; }
.timeline div { position: relative; padding: 0 0 26px 26px; display: grid; gap: 4px; }
.timeline div::before { content: ""; position: absolute; left: -8px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--navy); }
.timeline div.now::before { border-color: var(--red); background: var(--red); }
.timeline .label { color: var(--accent-ink); }
.portrait { background: radial-gradient(120% 90% at 60% 40%, #173f8a 0%, var(--navy-deep) 70%); border-radius: 10px; aspect-ratio: 4 / 3; max-width: 100%; display: grid; align-items: end; overflow: hidden; position: relative; }
.portrait img { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); height: 94%; width: auto; max-width: none; }
.duke-lead img { width: 100%; height: auto; border-radius: 10px; display: block; }
/* desktop: the portrait fills the full height of the bio beside it */
@media (min-width: 861px) {
  .duke-lead { align-self: stretch; position: relative; }
  .duke-lead img { position: absolute; inset: 0; height: 100%; object-fit: cover; object-position: 22% 50%; }
}
/* column widths follow each photo's shape, so all three share a height and none is cropped */
.duke-gallery { display: grid; grid-template-columns: .9004fr .7545fr 1.0054fr; align-items: start; gap: 14px; margin-top: clamp(28px, 4vw, 48px); }
.duke-gallery img { width: 100%; height: auto; border-radius: 10px; display: block; }
@media (max-width: 760px) {
  .duke-gallery { grid-template-columns: .9004fr .7545fr; }
  .duke-gallery img:last-child { grid-column: 1 / -1; }
}
.give-card .stretch { margin-top: -6px; }
.photo-slot { border: 1.5px dashed var(--rule); border-radius: 10px; aspect-ratio: 4 / 3; max-width: 100%; display: grid; place-items: center; text-align: center; padding: 20px; font-family: var(--f-ui); font-size: .8rem; color: var(--muted); background: var(--surface); }

/* ---------- footer ---------- */
.site-footer { background: var(--navy-deep); color: var(--on-navy-muted); padding-block: 64px 36px; font-family: var(--f-ui); font-size: .9rem; }
.site-footer .top { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 36px; padding-bottom: 40px; border-bottom: 1px solid rgb(255 255 255 / 12%); }
@media (max-width: 860px) { .site-footer .top { grid-template-columns: 1fr 1fr; } .site-footer .top > :first-child { grid-column: 1 / -1; } }
.site-footer h4 { font-family: var(--f-ui); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--on-navy); margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--on-navy-muted); text-decoration: none; }
.site-footer a:hover { color: #fff; }
.foot-mark { width: 240px; aspect-ratio: 1358 / 217; background: var(--on-navy); -webkit-mask: url("../img/logo-oneline.png") center / contain no-repeat; mask: url("../img/logo-oneline.png") center / contain no-repeat; margin-bottom: 18px; }
.signup { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.signup input { flex: 1 1 180px; min-width: 0; font: inherit; padding: 11px 12px; border-radius: var(--radius); border: 1px solid rgb(255 255 255 / 22%); background: rgb(255 255 255 / 6%); color: #fff; }
.signup .btn { --b: var(--on-navy); padding: .8em 1.2em; }
.signup .btn:hover { color: var(--navy-deep); }
.site-footer .legal { padding-top: 24px; display: grid; gap: 10px; font-size: .78rem; line-height: 1.6; }
.site-footer .legal p { max-width: 110ch; }
.site-footer .powered { font-size: .72rem; }
.site-footer .powered a { color: #6f95c9; opacity: .7; transition: opacity .2s ease; }
.site-footer .powered a:hover { color: #6f95c9; opacity: 1; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* gentle load-in from a visible resting state */
@keyframes rise { from { transform: translateY(10px); } to { transform: none; } }
.hero-copy > * { animation: rise .6s ease-out both; }
.hero-copy > *:nth-child(2) { animation-delay: .05s; } .hero-copy > *:nth-child(3) { animation-delay: .1s; } .hero-copy > *:nth-child(4) { animation-delay: .15s; }
@keyframes iso-draw { from { stroke-dashoffset: 1200; } to { stroke-dashoffset: 0; } }
.iso path.line { stroke-dasharray: 1200; animation: iso-draw 2.4s ease-out both; }
