/* CiteZero website — one stylesheet for every page.
   Colours come from the logo: navy #142741 (the "Cite") and blue #3fa1da (the "Zero").
   The logo blue is 2.9:1 on white, so it is never used for text on white; text links use
   --link (5.4:1). Every text pair here was measured at >= 4.5:1 (WCAG 2.2 AA). */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-wght-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #ffffff;
  --surface: #f4f6f9;
  --ink: #142741;          /* 15.0:1 on paper */
  --muted: #55607a;        /* 6.3:1 on paper, 5.8:1 on surface */
  --link: #1b6fa6;         /* 5.4:1 on paper */
  --brand-blue: #3fa1da;   /* decoration on paper; text only on navy (5.2:1) */
  --line: #d9dee6;
  --grid: #eef1f5;
  --panel-muted: #a8bfdc;  /* 8.0:1 on navy */
  --error: #b42318;        /* 6.6:1 */
  --ok: #1e6b3a;           /* 6.5:1 */

  --gutter: clamp(16px, 3.4vw, 48px);
  --header-h: 76px;
  --read: 68ch;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; border-radius: 2px; }
::selection { background: #cfe6f6; color: var(--ink); }
p { margin: 0 0 1em; }
b, strong { font-weight: 650; }

.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; font-weight: 600;
}
.skip:focus { top: 12px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* — the faint column grid behind every page (after futurebio.xyz) — decorative only — */
.grid-bg {
  position: fixed; inset: 0 var(--gutter); z-index: -1; pointer-events: none;
  border-left: 1px solid var(--grid); border-right: 1px solid var(--grid);
  background: repeating-linear-gradient(to right, transparent 0 calc(100% / 6 - 1px), var(--grid) calc(100% / 6 - 1px) calc(100% / 6));
}
@media (max-width: 700px) {
  .grid-bg { background: repeating-linear-gradient(to right, transparent 0 calc(100% / 2 - 1px), var(--grid) calc(100% / 2 - 1px) calc(100% / 2)); }
}

/* — header — */
.site-header {
  position: relative; z-index: 30;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter);
}
.brand { display: block; padding: 6px 0; }
.brand img { height: 30px; width: auto; }
@media (max-width: 600px) { .brand img { height: 24px; } }

/* — the menu button: three rules, one above the other — */
.menu-btn {
  position: relative; z-index: 60;
  width: 48px; height: 48px; margin-right: -10px;
  display: grid; place-content: center; gap: 6px;
  background: transparent; border: 0; border-radius: 4px; cursor: pointer; color: var(--ink);
}
.menu-btn .bar { display: block; width: 28px; height: 2px; background: currentColor; transition: transform .35s var(--ease), opacity .2s; }
.menu-open .menu-btn { color: #fff; }
.menu-open .menu-btn .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-open .menu-btn .bar:nth-child(2) { opacity: 0; }
.menu-open .menu-btn .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
.menu-btn:focus-visible { outline-color: currentColor; }
/* Without JavaScript the button cannot work, so it is hidden and a plain link row shows instead. */
.nojs-nav { display: flex; gap: 20px; font-size: 15px; }
.nojs-nav a { color: var(--ink); }

/* — the menu panel: a third of the screen, sliding in from the right, logo navy — */
.menu-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 50;
  width: max(33.333vw, 380px);
  background: var(--ink); color: #fff;
  padding: calc(var(--header-h) + 5vh) clamp(28px, 3.4vw, 56px) 32px;
  display: flex; flex-direction: column; justify-content: space-between;
  overflow-y: auto;
  transform: translateX(100%); visibility: hidden;
  transition: transform .5s var(--ease), visibility 0s linear .5s;
}
.menu-open .menu-panel { transform: none; visibility: visible; transition: transform .5s var(--ease), visibility 0s; }
@media (max-width: 700px) { .menu-panel { width: 100%; } }

.menu-list { list-style: none; margin: 0; padding: 0; }
.menu-list li { margin: 0 0 clamp(20px, 4.5vh, 44px); }
.menu-list a {
  display: inline-flex; align-items: flex-start; gap: 4px;
  color: #fff; text-decoration: none;
  font-size: clamp(38px, 3.6vw, 60px); font-weight: 650; letter-spacing: -0.035em; line-height: 1.05;
}
.menu-list a sup {
  font-size: 0.3em; font-weight: 600; letter-spacing: 0; line-height: 1;
  color: var(--brand-blue); margin-top: 0.2em; position: static;
}
.menu-list a:hover .t, .menu-list a[aria-current="page"] .t { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; }
.menu-list a:focus-visible { outline-color: #fff; }
.menu-foot { font-size: 14px; color: var(--panel-muted); line-height: 1.7; }
.menu-foot a { color: #fff; }
.menu-foot a:focus-visible { outline-color: #fff; }

/* — dateline (the top row kept from the old site) — */
.dateline {
  margin: 0 var(--gutter);
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 8px 0;
  font-size: 12px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.dateline .mid { color: var(--ink); }
@media (max-width: 700px) { .dateline { flex-direction: column; gap: 2px; } }

/* — home hero: from the middle of the screen to the bottom — */
.hero {
  min-height: calc(100svh - var(--header-h) - 40px);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 12vh var(--gutter) clamp(28px, 6vh, 64px);
}
.hero-title {
  margin: 0;
  font-size: clamp(46px, 8.4vw, 150px);
  font-weight: 700; letter-spacing: -0.05em; line-height: 0.93;
}
.hero-title .line { display: block; }
@media (max-width: 860px) { .hero-title .line { display: inline; } }
.hero-rule { width: min(260px, 40vw); height: 1px; background: var(--ink); border: 0; margin: clamp(22px, 3.5vh, 36px) 0 16px; }
.hero-sub {
  margin: 0; max-width: 34ch;
  font-size: clamp(22px, 2.5vw, 40px); line-height: 1.12; letter-spacing: -0.025em; font-weight: 400;
}
.hero-sub b { font-weight: 700; }

/* word-by-word rise, after futurebio's letter drop. Words, not letters: a heading split into
   single letters is read letter by letter by some screen readers. */
.rise .w { display: inline-block; animation: rise 1s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms + 100ms); }
@keyframes rise { from { opacity: 0; transform: translateY(0.45em); } to { opacity: 1; transform: none; } }
.fade-in { animation: fade 1s ease both; animation-delay: .9s; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

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

/* — inner pages — */
.page-head { padding: 14vh var(--gutter) 0; }
.page-title {
  margin: 0;
  font-size: clamp(52px, 9vw, 150px); font-weight: 700; letter-spacing: -0.05em; line-height: 0.95;
}
.page-title sup { font-size: 0.26em; letter-spacing: 0; vertical-align: top; position: relative; top: 0.25em; margin-left: 0.06em; color: var(--link); font-weight: 600; }
.page-lead {
  max-width: 32ch; margin: clamp(22px, 3.5vh, 36px) 0 0; padding-top: 16px; border-top: 1px solid var(--ink);
  font-size: clamp(21px, 2.1vw, 32px); line-height: 1.2; letter-spacing: -0.02em;
}
.page-lead b { font-weight: 700; }

main.page { padding-bottom: 12vh; }
.content { padding: 0 var(--gutter); max-width: calc(var(--read) + 2 * var(--gutter)); }
.section { margin-top: clamp(64px, 12vh, 120px); }
.section > h2 {
  margin: 0 0 20px;
  font-size: clamp(28px, 3vw, 42px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.1;
}
.section h3 { margin: 28px 0 8px; font-size: 20px; font-weight: 650; letter-spacing: -0.015em; }
.kicker { display: block; margin-bottom: 10px; font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.cite { font-size: 0.72em; line-height: 0; vertical-align: super; margin-left: 1px; font-weight: 600; }
.cite a { text-decoration: none; padding: 0 1px; }
.cite a:hover { text-decoration: underline; }

/* big figures — a row of numbers with their sentences */
.stats { list-style: none; margin: 32px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 28px 32px; }
.stats li { border-top: 1px solid var(--ink); padding-top: 12px; }
.stats .n { display: block; font-size: clamp(48px, 5vw, 72px); font-weight: 700; letter-spacing: -0.05em; line-height: 1; margin-bottom: 8px; }
.stats .d { display: block; font-size: 16px; line-height: 1.45; color: var(--muted); }
.source { font-size: 14px; color: var(--muted); }

/* figures */
figure { margin: 36px 0; }
figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); }
figcaption b { color: var(--ink); }
/* caption whose continuation lines hang under the text after the bold label */
.cap-hang { display: flex; gap: 0.35em; }
.cap-hang b { flex: none; }
@media (max-width: 600px) { .cap-hang { display: block; } }
.loop svg { width: 100%; max-width: 640px; height: auto; }
blockquote { margin: 28px 0; padding-left: 20px; border-left: 2px solid var(--brand-blue); font-size: 20px; line-height: 1.4; letter-spacing: -0.01em; }
blockquote footer { margin-top: 8px; font-size: 14px; color: var(--muted); letter-spacing: 0; }

/* the platform flow (Methods) — an ordered list drawn as a diagram */
.flow { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0; counter-reset: step; }
.flow > li { position: relative; padding: 16px 28px 0 0; border-top: 2px solid var(--ink); counter-increment: step; }
.flow > li::before { content: counter(step, decimal-leading-zero); display: block; font-size: 13px; font-weight: 600; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 8px; }
.flow > li:not(:last-child)::after { content: ""; position: absolute; right: 12px; top: -7px; width: 12px; height: 12px; border-top: 2px solid var(--ink); border-right: 2px solid var(--ink); transform: rotate(45deg); }
.flow h3 { margin: 0 0 6px; font-size: 22px; }
.flow p { margin: 0; font-size: 16px; color: var(--muted); }
.flow ul { margin: 8px 0 0; padding: 0; list-style: none; font-size: 16px; color: var(--muted); }
.flow ul li::before { content: "→ "; color: var(--ink); }
@media (max-width: 760px) {
  .flow { grid-template-columns: 1fr; gap: 28px; }
  .flow > li:not(:last-child)::after { display: none; }
}
.status-note { display: inline-block; margin-top: 18px; font-size: 14px; color: var(--muted); }

.items { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 24px; }
.items > li { border-top: 1px solid var(--line); padding-top: 14px; }
.items h3 { margin: 0 0 4px; }
.items p { margin: 0; color: var(--muted); }

.card { margin-top: 28px; padding: 24px 26px; background: var(--surface); border-left: 3px solid var(--ink); }
.card h3 { margin-top: 0; font-size: 24px; }
.card .who { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.card .who b { display: block; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 2px; }

/* the footnote-style references at the foot of a page */
.refs { margin: 0; padding-left: 1.6em; font-size: 14px; line-height: 1.55; color: var(--muted); }
.refs li { margin-bottom: 6px; padding-left: 4px; }
.refs li:target { background: #eaf4fb; color: var(--ink); }

.founder { display: flex; align-items: center; gap: 22px; margin-top: 28px; }
.founder img { flex: none; width: 144px; height: 144px; object-fit: cover; border: 1px solid var(--line); }
.founder-sig { margin: 0; font-size: 15px; color: var(--muted); }
@media (max-width: 480px) { .founder img { width: 96px; height: 96px; } }
.founder-sig b { color: var(--ink); }

/* — Discussion: two large choices, each revealing its ask and form — */
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 40px; max-width: 900px; }
.choice {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px; text-align: left;
  min-height: 230px; padding: 28px 28px 24px;
  background: var(--paper); color: var(--ink); border: 1.5px solid var(--ink); border-radius: 0;
  font: inherit; cursor: pointer; transition: background .25s, color .25s;
}
.choice .big { font-size: clamp(34px, 4vw, 56px); font-weight: 700; letter-spacing: -0.045em; line-height: 1; }
.choice .small { font-size: 16px; color: var(--muted); transition: color .25s; }
.choice .arrow { margin-top: auto; font-size: 24px; line-height: 1; transition: transform .3s var(--ease); }
.choice:hover .arrow { transform: translateX(6px); }
.choice[aria-expanded="true"] { background: var(--ink); color: #fff; }
.choice[aria-expanded="true"] .small { color: var(--panel-muted); }
.choice[aria-expanded="true"] .arrow { transform: rotate(90deg); }
.choice:focus-visible { outline-offset: 4px; }
@media (max-width: 640px) { .choices { grid-template-columns: 1fr; } .choice { min-height: 140px; } }

.ask { margin-top: 48px; max-width: 760px; }
.ask[hidden] { display: none; }
.ask > h2 { margin: 0 0 14px; font-size: clamp(28px, 3vw, 42px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.1; }
.ask ul { padding-left: 1.2em; }
.ask li { margin-bottom: 6px; }

/* — forms — */
.form { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--ink); }
.req-note { font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .row { grid-template-columns: 1fr; } }
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 6px; font-size: 15px; font-weight: 550; }
.field .hint { display: block; margin: -2px 0 6px; font-size: 14px; color: var(--muted); }
.field .req { color: var(--ink); }
.input {
  width: 100%; min-height: 46px; padding: 10px 12px;
  font: inherit; font-size: 16px; color: var(--ink); background: var(--paper);
  border: 1px solid #7b869b; /* 3.6:1 against paper — WCAG 1.4.11 needs 3:1 for a control's edge */
  border-radius: 2px;
}
.input::placeholder { color: #6b7589; opacity: 1; } /* 4.7:1 on paper */
.input:hover { border-color: var(--ink); }
.input:focus-visible { outline: 3px solid var(--link); outline-offset: 0; border-color: var(--link); }
textarea.input { min-height: 120px; resize: vertical; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.input[aria-invalid="true"] { border-color: var(--error); border-width: 2px; }
.field-error { display: block; margin-top: 6px; font-size: 14px; font-weight: 550; color: var(--error); }
.field-error:empty { display: none; }
.field-error::before { content: "Error: "; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.ts { min-height: 70px; margin: 8px 0 16px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 12px 26px;
  font: inherit; font-size: 17px; font-weight: 600;
  background: var(--ink); color: #fff; border: 0; border-radius: 0; cursor: pointer;
}
.btn:hover { background: #22406a; }
.btn:disabled { background: #7b869b; cursor: not-allowed; }
.form-status { margin-top: 16px; font-size: 16px; font-weight: 550; min-height: 1.6em; }
.form-status.err { color: var(--error); }
.form-status.ok { color: var(--ok); }
.fineprint { margin-top: 14px; font-size: 14px; color: var(--muted); max-width: 62ch; }
.nojs-msg { padding: 14px 16px; background: var(--surface); border-left: 3px solid var(--ink); font-size: 15px; }

/* — privacy notice — */
.legal h2 { font-size: 24px !important; margin-top: 40px !important; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: 6px; }

/* — footer — */
.site-footer {
  margin: 0 var(--gutter); padding: 22px 0 32px;
  border-top: 1px solid var(--ink);
  display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; align-items: baseline;
  font-size: 14px; color: var(--muted);
}
.site-footer nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-footer a { color: var(--ink); display: inline-block; padding: 4px 0; }
.site-footer .contact { display: flex; flex-wrap: wrap; gap: 4px 20px; align-items: baseline; }
.site-footer .contact span { display: inline-block; padding: 4px 0; }
