/* ==========================================================================
   WRENCH — design system
   Light, modern, research-grade. Palette derived from the WRENCH logo.
   1. Tokens          5. Header / nav      9. Sections & cards
   2. Reset           6. Hero             10. Data views (lists, tables)
   3. Typography      7. Buttons          11. Footer
   4. Layout          8. Architecture     12. Motion, a11y, responsive
   ========================================================================== */

/* --------------------------------------------------------------- 1. Tokens */
:root {
  /* Brand (sampled from the WRENCH mark) */
  --brand:        #f16522;
  --brand-deep:   #d4500f;
  --brand-ink:    #a83c08;
  --crimson:      #ed515a;
  --amber:        #f8a01e;
  --yellow:       #ffdd02;
  --azure:        #2b6df6;
  --teal:         #12a594;

  /* Neutrals */
  --ink:          #10141d;
  --ink-2:        #333b4a;
  --body:         #4d5563;
  --muted:        #6f7787;
  --faint:        #99a0ad;
  --line:         #e6e8f0;
  --line-2:       #f0f2f7;
  --surface:      #ffffff;
  --surface-2:    #fafbfd;
  --canvas:       #f8f9fc;

  /* Tints */
  --brand-tint:   rgba(241, 101, 34, 0.08);
  --brand-tint-2: rgba(241, 101, 34, 0.16);
  --azure-tint:   rgba(43, 109, 246, 0.08);
  --teal-tint:    rgba(18, 165, 148, 0.10);

  /* Elevation */
  --sh-xs: 0 1px 2px rgba(16, 20, 29, .04);
  --sh-sm: 0 1px 2px rgba(16, 20, 29, .04), 0 4px 12px rgba(16, 20, 29, .04);
  --sh-md: 0 2px 4px rgba(16, 20, 29, .03), 0 14px 34px rgba(16, 20, 29, .07);
  --sh-lg: 0 4px 8px rgba(16, 20, 29, .03), 0 30px 70px rgba(16, 20, 29, .10);
  --sh-brand: 0 10px 26px rgba(241, 101, 34, .26);

  /* Geometry */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-pill: 999px;
  --shell: 1220px;
  --header-h: 68px;

  /* Type */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', -apple-system, sans-serif;
  --font-serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------------------------------------------------------------- 2. Reset */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 18px);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--body);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Ambient light: soft brand mesh over a fine grid, fixed behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(720px 480px at 8% -6%,  rgba(241, 101, 34, .10), transparent 62%),
    radial-gradient(680px 460px at 96% 2%,  rgba(255, 221, 2, .12),  transparent 60%),
    radial-gradient(760px 520px at 50% 34%, rgba(43, 109, 246, .05), transparent 66%),
    linear-gradient(180deg, #ffffff 0%, #f8f9fc 42%, #f7f8fb 100%);
}

img, svg, video { max-width: 100%; display: block; }
img { height: auto; }

a { color: var(--brand-deep); text-decoration: none; transition: color .18s var(--ease); }
a:hover { color: var(--brand); }

ul, ol { margin: 0; padding: 0; }
li { list-style: none; }

button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }

hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

::selection { background: rgba(241, 101, 34, .18); color: var(--ink); }

/* ----------------------------------------------------------- 3. Typography */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.022em;
  font-weight: 600;
}

h1 { font-size: clamp(2.25rem, 1.4rem + 3.2vw, 3.7rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.6rem); letter-spacing: -0.03em; }
h3 { font-size: clamp(1.2rem, 1.05rem + .6vw, 1.5rem); }
h4 { font-size: 1.0625rem; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

strong { color: var(--ink-2); font-weight: 600; }

.accent { color: var(--brand); }

/* Serif italic accent inside display headings */
.serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  font-family: var(--font-display);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--brand-deep);
  margin: 0 0 .9rem;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--crimson), var(--amber));
}

.lede {
  font-size: 1.075rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 62ch;
}

.section-subtitle {
  font-size: .95rem;
  line-height: 1.65;
  color: var(--muted);
  max-width: 70ch;
  margin-top: .4rem;
}

code, pre, kbd {
  font-family: var(--font-mono);
  font-size: .875em;
}

code {
  background: var(--brand-tint);
  color: var(--brand-ink);
  padding: .12em .4em;
  border-radius: 5px;
}

pre {
  margin: 0;
  padding: 1.1rem 1.2rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow-x: auto;
  font-size: .8125rem;
  line-height: 1.7;
  color: var(--ink-2);
  white-space: pre;
  tab-size: 2;
}
pre code { background: none; color: inherit; padding: 0; }
pre.wrap { white-space: pre-wrap; word-break: break-word; }

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  display: inline-block;      /* svg{display:block} would break inline runs */
  vertical-align: -0.18em;
}

/* -------------------------------------------------------------- 4. Layout */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2.5rem);
}

.section { padding: clamp(3.5rem, 7vw, 6.5rem) 0; position: relative; }
.section--tight { padding: clamp(2.5rem, 4.5vw, 4rem) 0; }

.section--panel {
  background: var(--surface);
  border-block: 1px solid var(--line);
}
.section--soft {
  background: linear-gradient(180deg, rgba(255,255,255,.7), rgba(255,255,255,0));
}

.section-head { max-width: 760px; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow { justify-content: center; }
.section-head--center .lede { margin-inline: auto; }
.section-head h2 + .lede { margin-top: 1rem; }

.section-head--split {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: end;
}

/* Grid/flex children default to min-width:auto, which lets a wide child (a
   <pre> of code) stretch its track past the viewport. Reset it everywhere the
   layout has tracks, so overflow scrolls inside the element instead. */
.grid > *,
.hero__inner > *,
.arch > *,
.section-head--split > *,
.footer-grid > *,
.team-grid > *,
.alumni-grid > *,
.feature-row > *,
.stats > *,
.ref > *,
.layer > *,
.window,
.window__body,
.window__pane,
.card,
.chart-card,
.cite-box,
.release {
  min-width: 0;
}

pre, .chart-wrap, .window__pane pre { max-width: 100%; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--ink);
  color: #fff;
  padding: .7rem 1.1rem;
  border-radius: 0 0 var(--r-xs) 0;
}
.skip-link:focus { left: 0; color: #fff; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

/* -------------------------------------------------------- 5. Header / nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease);
}
.site-header.is-stuck {
  border-bottom-color: var(--line);
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 8px 30px rgba(16, 20, 29, .06);
}

.site-header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-header__progress {
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--crimson), var(--brand), var(--amber), var(--yellow));
  transition: width .1s linear;
}

.brand { display: flex; align-items: center; flex: none; }
.brand img { height: 27px; width: auto; }

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  gap: 1.25rem;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: .25rem;
}
.site-nav__list a {
  display: inline-flex;
  align-items: center;
  gap: .35em;
  padding: .5rem .7rem;
  border-radius: var(--r-xs);
  font-size: .9rem;
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
  transition: color .18s var(--ease), background .18s var(--ease);
}
.site-nav__list a:hover { color: var(--ink); background: var(--brand-tint); }
.site-nav__list a.is-active { color: var(--brand-deep); background: var(--brand-tint); }
.site-nav__list a { position: relative; }

.ext-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--amber);
  display: inline-block;
}

.site-nav__aside { display: flex; align-items: center; gap: .4rem; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: var(--r-xs);
  color: var(--ink-2);
  transition: color .18s var(--ease), background .18s var(--ease), transform .18s var(--ease);
}
.icon-btn .icon { width: 18px; height: 18px; }
.icon-btn:hover { color: var(--ink); background: var(--line-2); transform: translateY(-1px); }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border-radius: var(--r-xs);
  color: var(--ink);
  place-items: center;
}
.nav-toggle .icon { width: 21px; height: 21px; }
.nav-toggle__close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: block; }

/* ------------------------------------------------------------- 6. Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  padding: .78rem 1.35rem;
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-size: .9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: transform .18s var(--ease), box-shadow .22s var(--ease),
              background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.btn .icon { width: 17px; height: 17px; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--crimson) 100%);
  color: #fff;
  box-shadow: var(--sh-brand);
}
.btn--primary:hover { color: #fff; box-shadow: 0 14px 32px rgba(241, 101, 34, .34); }

.btn--ghost {
  background: rgba(255, 255, 255, .8);
  color: var(--ink);
  border-color: var(--line);
  box-shadow: var(--sh-xs);
}
.btn--ghost:hover { color: var(--ink); border-color: #d6dae6; box-shadow: var(--sh-sm); }

.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { color: #fff; background: #1c2230; }

.btn--sm { padding: .5rem 1rem; font-size: .875rem; }
.btn--lg { padding: .95rem 1.7rem; font-size: 1rem; }

/* Quiet inline link with arrow */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  font-family: var(--font-display);
  font-size: .875rem;
  font-weight: 600;
  color: var(--brand-deep);
}
.link-arrow .icon { width: 15px; height: 15px; transition: transform .2s var(--ease); }
.link-arrow:hover .icon { transform: translateX(3px); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  padding: .34em .8em;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  font-family: var(--font-display);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--ink-2);
}
.pill .icon { width: 13px; height: 13px; }
.pill--brand { background: var(--brand-tint); border-color: var(--brand-tint-2); color: var(--brand-ink); }
.pill--azure { background: var(--azure-tint); border-color: rgba(43,109,246,.18); color: #1a4fbd; }
.pill--teal  { background: var(--teal-tint);  border-color: rgba(18,165,148,.2);  color: #0a7a6d; }
.pill--muted { color: var(--muted); }

.dot-live {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 3px rgba(18, 165, 148, .16);
}

/* ---------------------------------------------------------------- 7. Hero */
.hero {
  position: relative;
  padding: clamp(3rem, 6vw, 5.5rem) 0 clamp(3rem, 6vw, 5rem);
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 720px;
  pointer-events: none;
  background:
    radial-gradient(520px 340px at 18% 22%, rgba(237, 81, 90, .16), transparent 65%),
    radial-gradient(560px 360px at 78% 8%,  rgba(248, 160, 30, .18), transparent 62%),
    radial-gradient(600px 400px at 52% 60%, rgba(255, 221, 2, .10), transparent 68%);
  filter: blur(6px);
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr);
  gap: clamp(2rem, 5vw, 4.25rem);
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .38rem .38rem .38rem .85rem;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .85);
  border: 1px solid var(--line);
  box-shadow: var(--sh-xs);
  font-size: .8125rem;
  color: var(--muted);
  margin-bottom: 1.6rem;
}
.hero-badge b {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 600;
}
.hero-badge__tag {
  display: inline-flex;
  align-items: center;
  gap: .35em;
  padding: .2rem .65rem;
  border-radius: var(--r-pill);
  background: linear-gradient(135deg, var(--brand), var(--crimson));
  color: #fff;
  font-family: var(--font-display);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
}

.hero h1 { margin-bottom: 1.35rem; }
.hero__lede { font-size: clamp(1.05rem, .98rem + .35vw, 1.2rem); line-height: 1.65; color: var(--muted); max-width: 34em; }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 2rem;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.4rem;
  margin-top: 2.2rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}
.hero__meta-item { display: flex; flex-direction: column; }
.hero__meta-item b {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.hero__meta-item span { font-size: .78rem; color: var(--faint); letter-spacing: .01em; }

/* Code window */
.window {
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-lg);
  overflow: hidden;
}
.window__bar {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, var(--surface-2));
}
.window__dots { display: flex; gap: 6px; }
.window__dots i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.window__dots i:nth-child(1) { background: #ed515a; }
.window__dots i:nth-child(2) { background: #f8a01e; }
.window__dots i:nth-child(3) { background: #d3d7e0; }
.window__title {
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--faint);
}
.window__tabs { display: flex; gap: .25rem; margin-left: auto; }
.window__tab {
  padding: .3rem .7rem;
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-size: .74rem;
  font-weight: 600;
  color: var(--muted);
  transition: all .18s var(--ease);
}
.window__tab:hover { color: var(--ink); background: var(--line-2); }
.window__tab.is-active { background: var(--ink); color: #fff; }
.window__body { position: relative; }
.window__pane { display: none; }
.window__pane.is-active { display: block; }
.window__pane pre {
  border: 0;
  border-radius: 0;
  background: #fff;
  padding: 1.15rem 1.25rem 1.35rem;
  font-size: .78rem;
  line-height: 1.75;
  max-height: 340px;
}
.window__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem 1rem;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  font-size: .78rem;
  color: var(--muted);
}

/* Syntax tint (applied by JS-free spans in markup) */
.c-key { color: #a83c08; }
.c-type { color: #1a4fbd; }
.c-str { color: #0a7a6d; }
.c-com { color: var(--faint); font-style: italic; }
.c-num { color: #b4530a; }
.c-fn { color: var(--ink); font-weight: 500; }

/* Copy button */
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  padding: .3rem .7rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: #fff;
  font-family: var(--font-display);
  font-size: .74rem;
  font-weight: 600;
  color: var(--ink-2);
  transition: all .18s var(--ease);
}
.copy-btn .icon { width: 13px; height: 13px; }
.copy-btn:hover { border-color: var(--brand-tint-2); color: var(--brand-deep); background: var(--brand-tint); }
.copy-btn.is-done { color: #0a7a6d; border-color: rgba(18,165,148,.3); background: var(--teal-tint); }

/* Floating hero cards */
.hero__side { display: grid; gap: 1rem; }

.mini-card {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .85rem 1rem;
  border-radius: var(--r-md);
  background: rgba(255,255,255,.82);
  border: 1px solid var(--line);
  box-shadow: var(--sh-sm);
  backdrop-filter: blur(8px);
}
.mini-card__icon {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  flex: none;
  border-radius: 11px;
  background: var(--brand-tint);
  color: var(--brand-deep);
}
.mini-card__icon .icon { width: 19px; height: 19px; }
.mini-card b { display: block; font-family: var(--font-display); font-size: .875rem; color: var(--ink); font-weight: 600; }
.mini-card span { font-size: .78rem; color: var(--muted); }

/* Logo marquee / trust strip */
.trust {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.6);
  padding: 1.5rem 0;
}
.trust__inner {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  flex-wrap: wrap;
  justify-content: center;
}
.trust__label {
  font-family: var(--font-display);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--faint);
}
.trust__logos {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
  flex-wrap: wrap;
  justify-content: center;
}
.trust__logos img {
  height: 34px;
  width: auto;
  opacity: .68;
  filter: grayscale(1);
  transition: opacity .25s var(--ease), filter .25s var(--ease);
}
.trust__logos a:hover img { opacity: 1; filter: grayscale(0); }

/* ---------------------------------------------------------------- 8. Cards */
.card {
  position: relative;
  padding: 1.6rem;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-sm);
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), border-color .28s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--sh-md); border-color: #dde1ec; }
/* Cards in a row stretch to equal height; a trailing action sticks to the bottom */
.card { display: flex; flex-direction: column; }
.card > .link-arrow:last-child { margin-top: auto; padding-top: 1rem; }
.card h3, .card h4 { margin-bottom: .5rem; }
.card p { font-size: .925rem; color: var(--muted); }

.card__icon {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 13px;
  margin-bottom: 1.1rem;
  background: var(--brand-tint);
  color: var(--brand-deep);
}
.card__icon .icon { width: 21px; height: 21px; }
.card--crimson .card__icon { background: rgba(237,81,90,.1);  color: #c8323c; }
.card--amber   .card__icon { background: rgba(248,160,30,.13); color: #b26c05; }
.card--azure   .card__icon { background: var(--azure-tint);    color: #1a4fbd; }
.card--teal    .card__icon { background: var(--teal-tint);     color: #0a7a6d; }
.card--ink     .card__icon { background: #eef0f5;              color: var(--ink); }

/* Gradient hairline that appears on hover */
.card--glow::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--crimson), var(--amber), var(--yellow));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .3s var(--ease);
  pointer-events: none;
}
.card--glow:hover::before { opacity: 1; }

.grid { display: grid; gap: 1.15rem; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--auto { grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); }

/* ------------------------------------------------------------ 9. Stat band */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-sm);
}
.stat {
  background: var(--surface);
  padding: 1.7rem 1.4rem;
  transition: background .25s var(--ease);
}
.stat:hover { background: var(--surface-2); }
.stat__value {
  display: flex;
  align-items: baseline;
  gap: .06em;
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.5rem + 1.6vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
  color: var(--ink);
}
.stat__value sup {
  font-size: .42em;
  font-weight: 600;
  color: var(--brand);
  top: -.9em;
  letter-spacing: 0;
}
.stat__label {
  margin-top: .55rem;
  font-size: .82rem;
  line-height: 1.45;
  color: var(--muted);
}
.stat__bar {
  margin-top: .9rem;
  height: 3px;
  width: 34px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--crimson), var(--amber));
}
.stat:nth-child(2) .stat__bar { background: linear-gradient(90deg, var(--amber), var(--yellow)); }
.stat:nth-child(3) .stat__bar { background: linear-gradient(90deg, var(--azure), var(--teal)); }
.stat:nth-child(4) .stat__bar { background: linear-gradient(90deg, var(--teal), var(--yellow)); }
.stat:nth-child(5) .stat__bar { background: linear-gradient(90deg, var(--crimson), var(--brand)); }

/* ------------------------------------------------------ 10. Architecture */
.arch {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
  gap: clamp(1.25rem, 3vw, 2.25rem);
  align-items: start;
}

.arch-stack { display: grid; gap: .8rem; }

.layer {
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: stretch;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-sm);
  overflow: hidden;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease);
}
.layer:hover { transform: translateX(4px); box-shadow: var(--sh-md); }

.layer__spine {
  display: grid;
  place-items: center;
  background: var(--c, var(--brand));
  color: #fff;
  font-family: var(--font-display);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  padding: 1rem .25rem;
}
.layer__body { padding: 1.15rem 1.35rem; }
.layer__body h3 {
  font-size: 1.02rem;
  letter-spacing: .01em;
  margin-bottom: .55rem;
}
.layer__tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .75rem; }
.layer__tags span {
  padding: .25em .65em;
  border-radius: var(--r-pill);
  background: var(--line-2);
  font-size: .74rem;
  font-weight: 500;
  color: var(--ink-2);
}
.layer__list { display: grid; gap: .3rem; margin-top: .35rem; }
.layer__list li {
  display: flex;
  gap: .55rem;
  font-size: .875rem;
  color: var(--muted);
}
.layer__list li::before {
  content: "";
  width: 5px; height: 5px;
  margin-top: .62em;
  flex: none;
  border-radius: 50%;
  background: var(--c, var(--brand));
}
.layer__list b { color: var(--ink-2); font-weight: 500; }

.layer--sim   { --c: var(--crimson); }
.layer--user  { --c: var(--brand); }
.layer--dev   { --c: var(--amber); }
.layer--grid  { --c: var(--azure); }

.arch-flow {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  padding: 1.5rem;
  border-radius: var(--r-lg);
  background: linear-gradient(165deg, #fff, var(--surface-2));
  border: 1px solid var(--line);
  box-shadow: var(--sh-sm);
}
.arch-flow h4 { font-size: .95rem; margin-bottom: 1rem; }
.arch-flow__steps { display: grid; gap: 0; }
.arch-flow__step {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: .8rem;
  padding-bottom: 1.1rem;
  position: relative;
}
.arch-flow__step:last-child { padding-bottom: 0; }
.arch-flow__step::before {
  content: "";
  position: absolute;
  left: 12.5px; top: 26px; bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, var(--line), transparent);
}
.arch-flow__step:last-child::before { display: none; }
.arch-flow__num {
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: .72rem;
  font-weight: 600;
  color: var(--brand-deep);
  position: relative;
  z-index: 1;
}
.arch-flow__step b { display: block; font-family: var(--font-display); font-size: .875rem; color: var(--ink); }
.arch-flow__step p { font-size: .82rem; color: var(--muted); margin: .15rem 0 0; }

/* ------------------------------------------------------ 11. Audience cards */
.audience {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.8rem;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-sm);
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.audience::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--c1, var(--brand)), var(--c2, var(--amber)));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--ease);
}
.audience:hover { transform: translateY(-5px); box-shadow: var(--sh-md); }
.audience:hover::after { transform: scaleX(1); }
.audience__eyebrow {
  font-family: var(--font-display);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c1, var(--brand-deep));
  margin-bottom: .7rem;
}
.audience h3 { margin-bottom: .6rem; }
.audience p { font-size: .925rem; color: var(--muted); }
.audience ul { margin: 1rem 0 1.4rem; display: grid; gap: .5rem; }
.audience li {
  display: flex;
  gap: .55rem;
  font-size: .875rem;
  color: var(--body);
}
.audience li .icon { width: 15px; height: 15px; margin-top: .28em; color: var(--c1, var(--brand)); }
.audience .link-arrow { margin-top: auto; }
.audience--res { --c1: var(--brand); --c2: var(--crimson); }
.audience--edu { --c1: var(--amber); --c2: var(--yellow); }
.audience--dev { --c1: var(--azure); --c2: var(--teal); }

/* -------------------------------------------------------- 12. Feature list */
.feature-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem 2rem;
}
.feature {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: .9rem;
  align-items: start;
}
.feature__icon {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--brand-tint);
  color: var(--brand-deep);
}
.feature__icon .icon { width: 17px; height: 17px; }
.feature h4 { font-size: .95rem; margin-bottom: .25rem; }
.feature p { font-size: .875rem; color: var(--muted); }

/* ------------------------------------------------------------- 13. Charts */
.chart-card {
  padding: 1.5rem;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-sm);
}
.chart-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
}
.chart-card__head h3 { font-size: 1.05rem; }
.chart-card__head p { font-size: .84rem; color: var(--muted); margin: .2rem 0 0; }
.chart-wrap { position: relative; height: 320px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: .4rem .9rem; margin-top: 1rem; }
.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  font-size: .78rem;
  color: var(--muted);
}
.chart-legend i { width: 10px; height: 10px; border-radius: 3px; display: block; }

/* ------------------------------------------- 14. Lists: pubs, citations */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.4rem;
}
.search {
  position: relative;
  flex: 1 1 260px;
  max-width: 380px;
}
.search .icon {
  position: absolute;
  left: .85rem; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--faint);
  pointer-events: none;
}
.search input {
  width: 100%;
  padding: .65rem 1rem .65rem 2.5rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  font-family: var(--font-sans);
  font-size: .9rem;
  color: var(--ink);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.search input::placeholder { color: var(--faint); }
.search input:focus {
  outline: none;
  border-color: var(--brand-tint-2);
  box-shadow: 0 0 0 4px var(--brand-tint);
}

.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
  padding: .42rem .9rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 500;
  color: var(--muted);
  transition: all .18s var(--ease);
}
.chip:hover { color: var(--ink); border-color: #d6dae6; }
.chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.chip b { font-weight: 600; opacity: .55; margin-left: .3em; font-size: .92em; }

.ref-list { display: grid; gap: .55rem; }

.ref {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 1.1rem;
  padding: 1.1rem 1.3rem;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color .22s var(--ease), box-shadow .22s var(--ease), transform .22s var(--ease);
}
.ref:hover { border-color: #dde1ec; box-shadow: var(--sh-sm); transform: translateY(-2px); }
.ref__year {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
  padding-top: .05rem;
}
.ref__year span { display: block; font-size: .68rem; font-weight: 500; color: var(--faint); letter-spacing: .04em; text-transform: uppercase; }
.ref__title {
  font-family: var(--font-display);
  font-size: .975rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
  margin: 0 0 .3rem;
}
.ref__title a { color: inherit; }
.ref__title a:hover { color: var(--brand-deep); }
.ref__authors { font-size: .85rem; color: var(--muted); margin: 0; }
.ref__meta { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .7rem; align-items: center; }
.ref__meta .pill { font-size: .7rem; padding: .22em .6em; }
.ref[hidden] { display: none; }

.empty-state {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--faint);
  font-size: .9rem;
}

.count-note { font-size: .82rem; color: var(--faint); }

/* ---------------------------------------------------------- 15. Page hero */
.figure-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 2rem;
}
.figure-stats li { display: flex; flex-direction: column; }
.figure-stats strong {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.figure-stats span { font-size: .78rem; color: var(--faint); }

/* --------------------------------------------------------- 16. Release UI */
.release {
  position: relative;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-sm);
  overflow: hidden;
}
.release--latest {
  box-shadow: var(--sh-md);
  border-color: var(--brand-tint-2);
}
.release--latest::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--crimson), var(--brand), var(--amber), var(--yellow));
}
.release__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 1.6rem 1.2rem;
  border-bottom: 1px solid var(--line-2);
}
.release__version {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.release__date { font-size: .84rem; color: var(--faint); }
.release__head .btn { margin-left: auto; }
.release__body { padding: 1.4rem 1.6rem; }
.release__body p { font-size: .925rem; color: var(--muted); }
.release__links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding: 0 1.6rem 1.5rem;
}
.reslink {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  padding: .5rem .9rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-family: var(--font-display);
  font-size: .82rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: all .18s var(--ease);
}
.reslink .icon { width: 15px; height: 15px; color: var(--muted); }
.reslink:hover {
  color: var(--brand-deep);
  border-color: var(--brand-tint-2);
  background: var(--brand-tint);
  transform: translateY(-1px);
}
.reslink:hover .icon { color: var(--brand-deep); }

/* Release timeline */
/* ---------------------------------------------------------- 17. Team grid */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.15rem;
}
.person {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.4rem;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-xs);
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), border-color .28s var(--ease);
}
.person:hover { transform: translateY(-4px); box-shadow: var(--sh-md); border-color: #dde1ec; }
.person__avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
  background: var(--line-2);
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--line);
}
.person h4 { font-size: .975rem; margin-bottom: .3rem; }
.person p { font-size: .82rem; color: var(--muted); line-height: 1.5; }
.person__links { display: flex; gap: .15rem; margin-top: auto; padding-top: 1rem; }
.person__links a {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 8px;
  color: var(--faint);
  transition: all .18s var(--ease);
}
.person__links a .icon { width: 15px; height: 15px; }
.person__links a:hover { color: var(--brand-deep); background: var(--brand-tint); }

.alumni-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: .5rem;
}
.alum {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .7rem .85rem;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  transition: all .2s var(--ease);
}
.alum:hover { background: var(--surface); border-color: var(--line); box-shadow: var(--sh-xs); }
.alum img {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  background: var(--line-2);
}
.alum b { display: block; font-family: var(--font-display); font-size: .85rem; font-weight: 600; color: var(--ink); }
.alum span { font-size: .74rem; color: var(--faint); line-height: 1.35; display: block; }

/* --------------------------------------------------- 18. Simulators/talks */
/* --------------------------------------------------------------- 19. CTA */
.cta {
  position: relative;
  padding: clamp(2.5rem, 5vw, 4rem);
  border-radius: var(--r-xl);
  background:
    radial-gradient(700px 320px at 12% 0%, rgba(241,101,34,.14), transparent 62%),
    radial-gradient(620px 320px at 90% 100%, rgba(255,221,2,.16), transparent 60%),
    linear-gradient(150deg, #fff, var(--surface-2));
  border: 1px solid var(--line);
  box-shadow: var(--sh-md);
  overflow: hidden;
  text-align: center;
}
.cta h2 { max-width: 20ch; margin-inline: auto; }
.cta .lede { margin: 1rem auto 0; }
.cta__actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin-top: 2rem; }
.cta__note { margin-top: 1.6rem; font-size: .82rem; color: var(--faint); }

/* Citation / bibtex block */
.cite-box {
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-sm);
  overflow: hidden;
}
.cite-box__head {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem 1.3rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, var(--surface-2));
}
.cite-box__head h3 { font-size: .95rem; }
.cite-box__head .copy-btn { margin-left: auto; }
.cite-box pre { border: 0; border-radius: 0; background: #fff; font-size: .76rem; }
.cite-box__foot { padding: .9rem 1.3rem; border-top: 1px solid var(--line-2); background: var(--surface-2); font-size: .82rem; color: var(--muted); }

/* ------------------------------------------- 19b. Expandable lists & rows */
/* Collapsed items are removed from flow entirely; without JS they all show. */
.is-collapsed { display: none !important; }

.expand-btn {
  margin-top: 1.15rem;
  width: 100%;
  justify-content: center;
}
.expand-btn[hidden] { display: none; }

/* ------------------------------------------------------------ 20. Footer */
.site-footer {
  margin-top: clamp(3.5rem, 7vw, 6rem);
  padding: clamp(2.75rem, 5vw, 4rem) 0 2rem;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, .85fr) 1.1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--line-2);
}
.footer-brand img { height: 30px; width: auto; margin-bottom: 1.1rem; }
.footer-brand p { font-size: .875rem; color: var(--muted); max-width: 34ch; }
.footer-social { display: flex; gap: .2rem; margin-top: 1.1rem; }
.footer-license { font-size: .8rem; color: var(--faint); margin-top: 1rem; }

.footer-col h4 {
  font-family: var(--font-display);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: .95rem;
}
.footer-col a {
  display: block;
  font-size: .875rem;
  color: var(--ink-2);
  padding: .26rem 0;
  transition: color .18s var(--ease), transform .18s var(--ease);
}
.footer-col a:hover { color: var(--brand-deep); transform: translateX(2px); }

.footer-logos { display: flex; align-items: center; gap: 1rem 1.25rem; flex-wrap: wrap; }
.footer-logos img { height: 34px; width: auto; opacity: .7; filter: grayscale(1); transition: all .25s var(--ease); }
.footer-logos a:hover img { opacity: 1; filter: grayscale(0); }
.footer-note { font-size: .8rem; color: var(--faint); margin-top: 1rem; }
.footer-note a { display: inline; padding: 0; }
.footer-note a:hover { transform: none; }

.footer-funding {
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line-2);
}
.footer-funding p { font-size: .78rem; line-height: 1.7; color: var(--faint); max-width: 92ch; }
.footer-funding strong { color: var(--muted); }
.footer-funding a { color: var(--muted); }
.footer-funding a:hover { color: var(--brand-deep); }

.footer-bottom {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .6rem;
  padding-top: 1.4rem;
  font-size: .8rem;
  color: var(--faint);
}
.footer-bottom__sep { color: var(--line); }
.to-top {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: .35em;
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
}
.to-top .icon { width: 14px; height: 14px; }
.to-top:hover { color: var(--brand-deep); }

/* --------------------------------------------------- 21. Motion & reveal */
/* Progressive enhancement: content is visible by default and only starts
   hidden once the inline bootstrap script confirms JS is running, so a script
   failure can never leave a section blank. */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  will-change: opacity, transform;
}
.js-reveal [data-reveal].is-visible { opacity: 1; transform: none; }
.js-reveal [data-reveal][data-delay="1"] { transition-delay: .08s; }
.js-reveal [data-reveal][data-delay="2"] { transition-delay: .16s; }
.js-reveal [data-reveal][data-delay="3"] { transition-delay: .24s; }
.js-reveal [data-reveal][data-delay="4"] { transition-delay: .32s; }
.js-reveal [data-reveal][data-delay="5"] { transition-delay: .40s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
  .js-reveal [data-reveal] { opacity: 1; transform: none; }
}

/* ------------------------------------------------------- 22. Responsive */
@media (max-width: 1080px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-col--wide { grid-column: 2 / -1; }
  .arch { grid-template-columns: 1fr; }
  .arch-flow { position: static; }
}

@media (max-width: 980px) {
  :root { --header-h: 62px; }

  .nav-toggle { display: grid; margin-left: auto; }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    display: block;
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 48px rgba(16, 20, 29, .1);
    padding: .75rem clamp(1.1rem, 4vw, 2.5rem) 1.25rem;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s;
  }
  .site-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .site-nav__list { display: block; }
  .site-nav__list a {
    display: flex;
    padding: .8rem .4rem;
    font-size: 1rem;
    border-bottom: 1px solid var(--line-2);
    border-radius: 0;
  }
  .site-nav__aside { padding-top: 1rem; }
  .site-nav__aside .btn { margin-left: auto; }

  .hero__inner { grid-template-columns: 1fr; }
  .hero__side { order: 3; }
  .section-head--split { grid-template-columns: 1fr; align-items: start; }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  body { font-size: 15.5px; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.75rem; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-col--wide { grid-column: 1 / -1; }
  .layer { grid-template-columns: 42px minmax(0, 1fr); }
  .layer__spine { font-size: .62rem; letter-spacing: .12em; }
  .ref { grid-template-columns: 1fr; gap: .5rem; }
  .ref__year { display: flex; align-items: baseline; gap: .5rem; }
  .ref__year span { display: inline; }
  .hero__meta { gap: 1.1rem 1.75rem; }
  .cta { padding: 2rem 1.4rem; border-radius: var(--r-lg); }
  .chart-wrap { height: 260px; }
  .window__pane pre { font-size: .72rem; }
  .figure-stats { gap: 1.25rem 1.75rem; }
}

@media (max-width: 480px) {
  .trust__inner { gap: 1rem; }
  .trust__logos img { height: 26px; }
  .btn { width: 100%; }
  .hero__actions, .cta__actions { flex-direction: column; }
  .site-nav__aside .btn { width: auto; }
}

/* ------------------------------------------------------------ 23. Print */
@media print {
  .site-header, .site-footer, .hero__glow, .toolbar, .btn { display: none !important; }
  body { background: #fff; }
  body::before { display: none; }
  .card, .ref, .release { box-shadow: none; break-inside: avoid; }
}
