/* ==========================================================================
   EEF1A2 Research Initiative — Design System
   Premium biomedical research aesthetic. Dark navy / white / turquoise.
   Mobile-first. No external dependencies, no webfonts, no tracking.
   ========================================================================== */

:root {
  /* --- Palette --------------------------------------------------------- */
  --navy-950: #060E1A;
  --navy-900: #0A1628;
  --navy-800: #0F2038;
  --navy-700: #16304F;
  --navy-600: #1E3E63;
  --navy-500: #2B5684;

  --teal-600: #0D9488;
  --teal-500: #14B8A6;
  --teal-400: #2DD4BF;
  --teal-300: #5EEAD4;
  --teal-050: #ECFEFA;

  --paper: #FFFFFF;
  --paper-alt: #F5F8FB;
  --paper-sunk: #EBF1F7;

  --ink-900: #0A1628;
  --ink-700: #22364F;
  --ink-500: #4A627E;
  --ink-400: #6B819B;

  --line: #D9E2EC;
  --line-soft: #E8EEF4;

  --amber-500: #D97706;
  --amber-050: #FFFBEB;
  --rose-600: #DC2626;
  --rose-050: #FEF2F2;

  /* --- Typography ------------------------------------------------------ */
  --font-sans: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  --step--1: clamp(0.80rem, 0.78rem + 0.10vw, 0.875rem);
  --step-0:  clamp(1.00rem, 0.97rem + 0.15vw, 1.0625rem);
  --step-1:  clamp(1.20rem, 1.14rem + 0.30vw, 1.3125rem);
  --step-2:  clamp(1.45rem, 1.33rem + 0.60vw, 1.75rem);
  --step-3:  clamp(1.75rem, 1.53rem + 1.10vw, 2.375rem);
  --step-4:  clamp(2.10rem, 1.70rem + 2.00vw, 3.25rem);

  /* --- Space / shape --------------------------------------------------- */
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --measure: 68ch;
  --wide: 1180px;
  --radius: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(10, 22, 40, .06), 0 1px 3px rgba(10, 22, 40, .05);
  --shadow-md: 0 4px 6px -1px rgba(10, 22, 40, .07), 0 10px 24px -6px rgba(10, 22, 40, .10);
  --shadow-lg: 0 20px 50px -14px rgba(10, 22, 40, .28);
}

/* --- Reset ------------------------------------------------------------- */
*, *::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-duration: .001ms !important; transition-duration: .001ms !important; }
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink-700);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { color: var(--ink-900); line-height: 1.2; font-weight: 650; margin: 0 0 .5em; letter-spacing: -0.015em; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); margin-top: 2.25em; }
h3 { font-size: var(--step-2); margin-top: 1.9em; }
h4 { font-size: var(--step-1); margin-top: 1.6em; }
p, ul, ol, dl, table, figure, blockquote { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.3em; }
li + li { margin-top: .3em; }
strong, b { font-weight: 650; color: var(--ink-900); }
small { font-size: var(--step--1); }
code, kbd, samp { font-family: var(--font-mono); font-size: .9em; background: var(--paper-sunk); padding: .12em .38em; border-radius: 4px; }

a { color: var(--teal-600); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--navy-700); }
:focus-visible { outline: 3px solid var(--teal-500); outline-offset: 2px; border-radius: 3px; }

/* --- Skip link --------------------------------------------------------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--navy-900); color: #fff; padding: .75rem 1.25rem;
  border-radius: 0 0 var(--radius) 0; font-weight: 600;
}
.skip-link:focus { left: 0; color: #fff; }

/* --- Layout ----------------------------------------------------------- */
.wrap { width: min(100% - (var(--gutter) * 2), var(--wide)); margin-inline: auto; }
.prose { max-width: var(--measure); }
.prose > * + h2, .prose > * + h3 { margin-top: 2em; }
section.band { padding: clamp(3rem, 7vw, 5.5rem) 0; }
section.band + section.band { border-top: 1px solid var(--line-soft); }
.band--alt { background: var(--paper-alt); border-top: 1px solid var(--line-soft); }
.band--dark { background: var(--navy-900); color: #C7D5E5; border: 0; }
.band--dark h2, .band--dark h3, .band--dark h4 { color: #fff; }
.band--dark a { color: var(--teal-300); }
.band--dark strong { color: #fff; }

.grid { display: grid; gap: clamp(1.25rem, 3vw, 2rem); }
@media (min-width: 42rem) { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 60rem) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 52rem) {
  .grid--sidebar { grid-template-columns: minmax(0, 1fr) 19rem; align-items: start; }
}

/* --- Header ----------------------------------------------------------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 22, 40, .94);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.site-head__inner { display: flex; align-items: center; gap: 1rem; min-height: 4.25rem; }
.brand { display: flex; align-items: center; gap: .7rem; color: #fff; text-decoration: none; font-weight: 650; letter-spacing: -0.01em; }
.brand:hover { color: #fff; }
.brand__mark { width: 30px; height: 30px; flex: 0 0 auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__text span { white-space: nowrap; }
.brand__text span:first-child { font-size: .9375rem; }
.brand__text span:last-child { font-size: .66rem; font-weight: 500; color: var(--teal-300); letter-spacing: .06em; text-transform: uppercase; }

.nav-toggle {
  margin-left: auto; display: inline-flex; align-items: center; gap: .5rem;
  background: transparent; border: 1px solid rgba(255,255,255,.22); color: #fff;
  padding: .5rem .8rem; border-radius: 8px; font: inherit; font-size: .875rem; cursor: pointer;
}
@media (min-width: 70rem) { .nav-toggle { display: none; } }

.site-nav { margin-left: auto; min-width: 0; }
.site-nav ul { list-style: none; display: flex; flex-wrap: nowrap; gap: .1rem; margin: 0; padding: 0; }
.site-nav a {
  display: block; padding: .45rem .5rem; border-radius: 7px;
  color: #BACBDE; text-decoration: none; font-size: .78rem; font-weight: 550;
  letter-spacing: 0; white-space: nowrap;
}
.site-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.site-nav a[aria-current="page"] { color: #fff; background: rgba(45, 212, 191, .16); box-shadow: inset 0 -2px 0 var(--teal-400); }
@media (max-width: 69.99rem) {
  .site-nav { display: none; width: 100%; margin: 0; order: 3; }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; flex-wrap: wrap; padding: .5rem 0 1rem; }
  .site-nav a { padding: .7rem .5rem; font-size: .95rem; }
  .site-head__inner { flex-wrap: wrap; }
}

.lang-switch { display: flex; gap: .25rem; margin-left: .6rem; flex: 0 0 auto; }
.lang-switch a {
  font-size: .75rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase;
  color: #8CA3BC; text-decoration: none; padding: .3rem .45rem; border-radius: 6px;
}
.lang-switch a:hover { color: #fff; background: rgba(255,255,255,.08); }
.lang-switch a[aria-current="true"] { color: var(--navy-900); background: var(--teal-300); }

/* --- Hero ------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(120% 90% at 78% 8%, var(--navy-700) 0%, var(--navy-900) 48%, var(--navy-950) 100%);
  color: #C7D5E5;
  padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(3rem, 7vw, 5.5rem);
}
.hero__art {
  position: absolute; top: 50%; right: max(0px, calc((100vw - 1240px) / 2)); transform: translateY(-50%);
  width: min(44vw, 600px); height: auto; pointer-events: none;
  filter: drop-shadow(0 0 48px rgba(45, 212, 191, .22));
}
@media (max-width: 860px) {
  .hero__art { width: 120vw; right: -48vw; opacity: .2; filter: none; }
}
.hero__credit { font-size: .75rem; line-height: 1.5; color: #8FA5BD; max-width: 62ch; margin: 1.5rem 0 0; }
.hero__credit a { color: inherit; text-decoration: underline; }
.hero__inner { position: relative; }
.hero h1 { color: #fff; max-width: 22ch; text-wrap: balance; }
.hero__kicker {
  display: inline-block; font-size: .75rem; font-weight: 650; letter-spacing: .14em;
  text-transform: uppercase; color: var(--teal-300); margin-bottom: 1.1rem;
}
.hero__sub { font-size: var(--step-1); color: #AFC2D6; max-width: 56ch; margin-top: 1rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

/* --- Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .72rem 1.3rem; border-radius: 9px; font: inherit; font-size: .9375rem; font-weight: 600;
  text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: transform .12s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--teal-500); color: var(--navy-950); }
.btn--primary:hover { background: var(--teal-400); color: var(--navy-950); }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.28); }
.btn--ghost:hover { background: rgba(255,255,255,.1); color: #fff; }
.btn--solid { background: var(--navy-800); color: #fff; }
.btn--solid:hover { background: var(--navy-700); color: #fff; }
.btn--outline { background: transparent; color: var(--navy-700); border-color: var(--line); }
.btn--outline:hover { background: var(--paper-alt); color: var(--navy-800); }

/* --- Cards ------------------------------------------------------------ */
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 1.85rem); box-shadow: var(--shadow-sm);
}
.card h3, .card h4 { margin-top: 0; }
.card--link { text-decoration: none; color: inherit; display: block; transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease; }
.card--link:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: #C4D3E2; color: inherit; }
.card__eyebrow { font-size: .7rem; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--teal-600); display: block; margin-bottom: .55rem; }
.card > :last-child { margin-bottom: 0; }

/* --- Evidence classification badges ---------------------------------- */
.ev {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .6875rem; font-weight: 650; letter-spacing: .04em; text-transform: uppercase;
  padding: .26rem .6rem; border-radius: 999px; border: 1px solid; white-space: nowrap;
  vertical-align: middle;
}
.ev::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.ev--established  { color: #0F766E; background: var(--teal-050); border-color: #99E6DB; }
.ev--eef1a2       { color: #1D4ED8; background: #EFF6FF; border-color: #BFDBFE; }
.ev--related      { color: #7C3AED; background: #F5F3FF; border-color: #DDD6FE; }
.ev--computational{ color: var(--amber-500); background: var(--amber-050); border-color: #FDE68A; }
.ev--hypothesis   { color: #475569; background: #F1F5F9; border-color: #CBD5E1; }
.ev-key { display: grid; gap: .6rem; padding: 0; list-style: none; }
.ev-key li { display: grid; grid-template-columns: auto 1fr; gap: .75rem; align-items: start; margin: 0; }
.ev-key p { margin: 0; font-size: var(--step--1); color: var(--ink-500); }

/* --- Callouts --------------------------------------------------------- */
.note {
  border-left: 4px solid var(--teal-500); background: var(--teal-050);
  padding: 1.1rem 1.25rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.6em 0;
}
.note--caution { border-left-color: var(--amber-500); background: var(--amber-050); }
.note--limit { border-left-color: var(--navy-500); background: var(--paper-alt); }
.note > :first-child { margin-top: 0; }
.note > :last-child { margin-bottom: 0; }
.note__title { font-weight: 650; color: var(--ink-900); display: block; margin-bottom: .35rem; font-size: .9375rem; }

/* --- Tables ----------------------------------------------------------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); margin: 1.4em 0; }
table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
caption { text-align: left; font-size: var(--step--1); color: var(--ink-500); padding: .75rem 1rem; }
th, td { padding: .7rem .9rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-soft); }
thead th { background: var(--paper-alt); font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-500); font-weight: 650; position: sticky; top: 0; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #FBFDFF; }

/* --- Reference list --------------------------------------------------- */
.refs { list-style: none; padding: 0; counter-reset: ref; font-size: .9375rem; }
.refs li { counter-increment: ref; display: grid; grid-template-columns: 2.5rem 1fr; gap: .5rem; padding: .8rem 0; border-bottom: 1px solid var(--line-soft); margin: 0; }
.refs li::before { content: "[" counter(ref) "]"; color: var(--ink-400); font-variant-numeric: tabular-nums; font-size: .875rem; }
.refs__meta { display: block; color: var(--ink-400); font-size: .8125rem; margin-top: .2rem; }
a.cite { font-size: .78em; font-weight: 650; text-decoration: none; padding: 0 .1em; vertical-align: super; }

/* --- Variant explorer ------------------------------------------------- */
.filters { display: grid; gap: .9rem; margin-bottom: 1.5rem; }
@media (min-width: 42rem) { .filters { grid-template-columns: 2fr 1fr 1fr; align-items: end; } }
.field label { display: block; font-size: .78rem; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-500); margin-bottom: .35rem; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: .9375rem; padding: .62rem .75rem;
  border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink-900);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--teal-500); outline: 2px solid rgba(20,184,166,.25); outline-offset: 0; }
.domain-track { margin: 1.5rem 0 2rem; }
.variant-row__head { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.variant-row__name { font-family: var(--font-mono); font-weight: 650; color: var(--navy-800); font-size: 1rem; }
.pill { display: inline-block; font-size: .7rem; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; padding: .2rem .55rem; border-radius: 6px; background: var(--paper-sunk); color: var(--ink-500); }
.pill--focus { background: var(--navy-800); color: #fff; }
details.variant { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .7rem; background: var(--paper); }
details.variant > summary { padding: .95rem 1.1rem; cursor: pointer; list-style: none; }
details.variant > summary::-webkit-details-marker { display: none; }
details.variant[open] > summary { border-bottom: 1px solid var(--line-soft); }
.variant__body { padding: 1.1rem; font-size: .9375rem; }
.variant__body dl { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.1rem; margin: 0 0 1rem; }
.variant__body dt { font-size: .78rem; font-weight: 650; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-400); }
.variant__body dd { margin: 0; }
.empty-state { padding: 2.5rem 1rem; text-align: center; color: var(--ink-400); border: 1px dashed var(--line); border-radius: var(--radius); }

/* --- Timeline --------------------------------------------------------- */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: .45rem; top: .6rem; bottom: .6rem; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 1.6rem 2rem; margin: 0; }
.timeline li::before { content: ""; position: absolute; left: 0; top: .45rem; width: 1rem; height: 1rem; border-radius: 50%; background: var(--paper); border: 3px solid var(--teal-500); }
.timeline time { display: block; font-size: .78rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-400); margin-bottom: .2rem; }
.timeline h3 { margin: 0 0 .3rem; font-size: var(--step-1); }

/* --- Stage / roadmap -------------------------------------------------- */
.stage { display: grid; gap: 1rem; grid-template-columns: auto 1fr; margin-bottom: 1.75rem; }
.stage__num {
  width: 2.75rem; height: 2.75rem; border-radius: 12px; display: grid; place-items: center;
  background: var(--navy-800); color: #fff; font-weight: 700; font-size: 1.1rem; flex: 0 0 auto;
}
.stage__body > :first-child { margin-top: 0; }

/* --- Funding progress ------------------------------------------------- */
.meter { background: var(--paper-sunk); border-radius: 999px; height: .9rem; overflow: hidden; border: 1px solid var(--line); }
.meter__fill { height: 100%; background: linear-gradient(90deg, var(--teal-600), var(--teal-400)); border-radius: 999px; }
.meter-label { display: flex; justify-content: space-between; font-size: .875rem; color: var(--ink-500); margin-top: .5rem; }

/* --- Footer ----------------------------------------------------------- */
.site-foot { background: var(--navy-950); color: #8CA3BC; padding: clamp(2.5rem, 6vw, 4rem) 0 2rem; font-size: .9rem; }
.site-foot h2 { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: #fff; margin: 0 0 .9rem; }
.site-foot a { color: #B9CADC; text-decoration: none; }
.site-foot a:hover { color: #fff; text-decoration: underline; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin: 0 0 .45rem; }
.site-foot__bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 2.5rem; padding-top: 1.5rem; font-size: .8125rem; display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; }

/* --- Utilities -------------------------------------------------------- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lede { font-size: var(--step-1); color: var(--ink-500); }
.muted { color: var(--ink-400); }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.stack > * + * { margin-top: 1rem; }
.tag-row { display: flex; flex-wrap: wrap; gap: .4rem; margin: .6rem 0 1rem; }

/* --- Print ------------------------------------------------------------ */
@media print {
  .site-head, .site-foot, .hero__art, .nav-toggle, .lang-switch, .btn { display: none !important; }
  body { color: #000; font-size: 11pt; }
  .hero { background: none; color: #000; padding: 0 0 1rem; }
  .hero h1, .band--dark h2 { color: #000; }
  .band--dark { background: none; color: #000; }
  a::after { content: " (" attr(href) ")"; font-size: 9pt; color: #444; }
  details { display: block; } details > summary { font-weight: bold; }
}
