/* Kodimo: two colors only. Paper is the base, Forest is the ink.
   Every tint below is Forest at reduced opacity, never a third hue. */

:root {
  --paper: #F2EFE6;
  --forest: #1F3A2E;
  --ink-80: rgba(31, 58, 46, 0.82);
  --ink-60: rgba(31, 58, 46, 0.62);
  --ink-40: rgba(31, 58, 46, 0.42);
  --rule: rgba(31, 58, 46, 0.16);
  --tint: rgba(31, 58, 46, 0.045);
  --paper-70: rgba(242, 239, 230, 0.72);
  --paper-40: rgba(242, 239, 230, 0.4);
  --paper-rule: rgba(242, 239, 230, 0.18);

  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --wrap: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --section-pad: clamp(64px, 10.5vh, 130px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--forest);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Faint graph-paper grid, like a lab notebook */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(var(--tint) 1px, transparent 1px),
    linear-gradient(90deg, var(--tint) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.35) 60%, rgba(0,0,0,.2) 100%);
}

::selection { background: var(--forest); color: var(--paper); }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }

img, svg, canvas { display: block; max-width: 100%; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.label {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-60);
}

.label b { font-weight: 500; color: var(--forest); }

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--forest); color: var(--paper); padding: 8px 12px; font-family: var(--mono); font-size: 13px;
}
.skip:focus { left: 8px; z-index: 100; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(242, 239, 230, 0.86);
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--rule); }

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 23px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.brand svg { width: 28px; height: 28px; }
.brand .gauss circle { transform-origin: 50% 50%; transform-box: view-box; transition: transform .6s var(--ease); }
.brand:hover .gauss circle:nth-child(2) { transform: scale(1.04); }
.brand:hover .gauss circle:nth-child(3) { transform: scale(1.08); }
.brand:hover .gauss circle:nth-child(4) { transform: scale(1.12); }
.brand:hover .gauss circle:nth-child(5) { transform: scale(1.16); }
.brand:hover .gauss circle:nth-child(6) { transform: scale(1.2); }

.nav { display: flex; gap: clamp(18px, 3vw, 36px); }
.nav a {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-60);
  padding: 6px 0;
  position: relative;
  transition: color .2s;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--forest); }
.nav a[aria-current="page"]::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--forest);
}

/* ---------- Buttons ---------- */

.btn {
  --h: 46px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: var(--h);
  padding: 0 20px;
  border: 1px solid var(--forest);
  border-radius: 999px;
  background: var(--forest);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.btn:hover { background: transparent; color: var(--forest); }
.btn .arr { transition: transform .3s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn--ghost { background: transparent; color: var(--forest); }
.btn--ghost:hover { background: var(--forest); color: var(--paper); }
.btn--small { --h: 38px; padding: 0 16px; font-size: 11.5px; }

.on-dark .btn { background: var(--paper); color: var(--forest); border-color: var(--paper); }
.on-dark .btn:hover { background: transparent; color: var(--paper); }

/* ---------- Sections ---------- */

.section { padding: var(--section-pad) 0; position: relative; }
.section > .wrap > :last-child { margin-bottom: 0; }
.section + .section { border-top: 1px solid var(--rule); }

.section-head {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px 48px;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.section-head h2 {
  margin: 0;
  font-weight: 400;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 20ch;
}
.section-head h2 em { font-style: italic; }
.section-head .label { padding-top: 12px; }

.lede {
  font-size: clamp(20px, 1.7vw, 23px);
  line-height: 1.5;
  color: var(--ink-80);
  max-width: 36em;
}

/* ---------- Hero ---------- */

/* hero + backers strip (about 84px) together fill the first screen */
.hero {
  min-height: calc(100vh - 68px - 84px);
  min-height: calc(100svh - 68px - 84px);
  display: flex;
  align-items: center;
  padding: clamp(24px, 4vh, 56px) 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

.hero h1 {
  margin: 0 0 24px;
  font-weight: 350;
  font-size: clamp(44px, 5.4vw, 80px);
  line-height: 1.0;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.hero-sub {
  margin: 0 0 44px;
  font-size: clamp(22px, 2.2vw, 32px);
  font-weight: 350;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink-80);
  max-width: 26ch;
}
.hero-sub em { font-style: italic; color: var(--forest); }

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

.figure { margin: 0; }
.figure figcaption {
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.6;
  letter-spacing: 0.02em;
  color: var(--ink-60);
  max-width: 44ch;
}
.figure figcaption b { color: var(--forest); font-weight: 500; }

.scope {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  max-width: min(480px, 52vh);
  margin-left: auto;
}
.scope canvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid var(--forest);
  background: var(--paper);
}
.scope::after {
  /* reticle */
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1px dashed var(--ink-40);
  pointer-events: none;
}
.scope .scale {
  position: absolute;
  right: 14%;
  bottom: 13%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--forest);
  background: var(--paper);
  padding: 4px 6px;
}
.scope .scale i { display: block; width: 56px; height: 3px; background: var(--forest); }
.scope .tag {
  position: absolute;
  left: 50%;
  top: -26px;
  transform: translateX(-50%);
  background: var(--paper);
  padding: 0 10px;
  white-space: nowrap;
  z-index: 2;
}

.hero-figure { justify-self: end; width: 100%; }
.hero-figure figcaption { margin: 34px 0 0 auto; max-width: min(480px, 52vh); min-width: 300px; }

/* ---------- The loop ---------- */

.loop {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}

.dial { position: relative; width: 100%; max-width: 520px; margin: 0 auto; }
.dial svg { width: 100%; height: auto; overflow: visible; }
.dial .tick { stroke: var(--forest); stroke-width: 1; opacity: .35; }
.dial .tick.major { opacity: .8; }
.dial .track { fill: none; stroke: var(--forest); stroke-width: 1; }
.dial .progress { fill: none; stroke: var(--forest); stroke-width: 3; stroke-linecap: round; }
.dial .node circle.bg { fill: var(--paper); stroke: var(--forest); stroke-width: 1.2; transition: fill .4s var(--ease); }
.dial .node text { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; fill: var(--forest); text-anchor: middle; }
.dial .node .num { font-family: var(--serif); font-size: 19px; letter-spacing: 0; transition: fill .4s var(--ease); }
.dial .node.is-active circle.bg { fill: var(--forest); }
.dial .node.is-active .num { fill: var(--paper); }
.dial .node .halo { fill: none; stroke: var(--forest); stroke-width: 1; opacity: 0; }
.dial .node.is-active .halo { animation: halo 1.8s var(--ease) infinite; }
.dial .node { cursor: pointer; }
.dial .node:focus { outline: none; }
.dial .node:focus-visible circle.bg { stroke-width: 3; }
.dial .pulse { fill: var(--forest); }
.dial .center-label { font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; fill: var(--ink-60); text-anchor: middle; }
.dial .center-num { font-family: var(--serif); font-size: 64px; font-weight: 300; fill: var(--forest); text-anchor: middle; letter-spacing: -0.02em; }
.dial .center-sub { font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; fill: var(--forest); text-anchor: middle; }

@keyframes halo {
  0% { r: 22; opacity: .7; }
  100% { r: 40; opacity: 0; }
}

.steps { position: relative; display: grid; }
.step-tabs { grid-row: 1; }
.step-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--rule); margin-bottom: 28px; }
.step-tabs button {
  flex: 1;
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 10px 0 12px;
  text-align: left;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-40);
  cursor: pointer;
  position: relative;
  transition: color .3s;
}
.step-tabs button[aria-selected="true"] { color: var(--forest); }
.step-tabs button .bar {
  position: absolute; left: 0; bottom: -1px; height: 2px; width: 0; background: var(--forest);
}
.step-tabs button[aria-selected="true"] .bar { width: var(--p, 0%); }

.step { grid-row: 2; grid-column: 1; visibility: hidden; opacity: 0; }
.step.is-active { visibility: visible; opacity: 1; animation: rise .6s var(--ease) both; }
.step h3 {
  margin: 0 0 12px;
  font-weight: 400;
  font-size: clamp(28px, 2.8vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.015em;
}
.step p { margin: 0 0 26px; color: var(--ink-80); max-width: 34em; }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.viz {
  border: 1px solid var(--forest);
  background: var(--paper);
  padding: 18px;
  min-height: 262px;
  font-family: var(--mono);
  font-size: 11.5px;
  position: relative;
}
.viz-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: 10px; margin-bottom: 14px; border-bottom: 1px solid var(--rule);
  color: var(--ink-60); letter-spacing: .08em; text-transform: uppercase; font-size: 10.5px;
}
.viz-head b { color: var(--forest); font-weight: 500; }

/* Generate viz */
.brief { color: var(--forest); line-height: 1.6; margin-bottom: 14px; min-height: 3.2em; }
.brief .caret { display: inline-block; width: 7px; height: 13px; background: var(--forest); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.cands { display: grid; gap: 8px; }
.cand { display: grid; grid-template-columns: 44px 1fr 46px; gap: 10px; align-items: center; opacity: 0; transform: translateX(-6px); transition: opacity .4s var(--ease), transform .4s var(--ease); }
.cand.in { opacity: 1; transform: none; }
.cand .stack { display: flex; height: 12px; border: 1px solid var(--forest); }
.cand .stack span { display: block; height: 100%; }
.cand .stack span + span { border-left: 1px solid var(--paper); }
.cand .score { text-align: right; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 14px; color: var(--ink-60); font-size: 10.5px; }
.legend i { display: inline-block; width: 10px; height: 10px; border: 1px solid var(--forest); vertical-align: -1px; margin-right: 5px; }

/* Test viz */
.plate-wrap { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; }
.plate { display: grid; grid-template-columns: repeat(12, 14px); gap: 5px; padding: 10px; border: 1px solid var(--forest); border-radius: 8px; }
.plate i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--ink-40); transition: background .3s, border-color .3s; }
.plate i.done { border-color: var(--forest); }
.plate i.now { box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px var(--forest); }
.readout { list-style: none; margin: 0; padding: 0; line-height: 1.75; color: var(--ink-80); overflow: hidden; height: 150px; }
.readout li { white-space: nowrap; animation: rise .35s var(--ease) both; }
.readout li b { color: var(--forest); font-weight: 500; }

/* Learn viz */
.chart svg { width: 100%; height: auto; }
.chart .ax { stroke: var(--forest); stroke-width: 1; }
.chart .grid { stroke: var(--rule); stroke-width: 1; }
.chart .target { stroke: var(--forest); stroke-dasharray: 4 4; stroke-width: 1; }
.chart .pt { fill: var(--paper); stroke: var(--forest); stroke-width: 1; opacity: 0; transition: opacity .25s; }
.chart .pt.best { fill: var(--forest); }
.chart .pt.in { opacity: 1; }
.chart .bestline { fill: none; stroke: var(--forest); stroke-width: 2; }
.chart text { font-family: var(--mono); font-size: 9.5px; fill: var(--ink-60); letter-spacing: .04em; }
.chart .hit { fill: none; stroke: var(--forest); stroke-width: 1; opacity: 0; transition: opacity .3s; }
.chart .met { fill: var(--forest); font-weight: 500; letter-spacing: .1em; opacity: 0; transition: opacity .3s; }
.chart .hit.in, .chart .met.in { opacity: 1; }

/* Sneak peek fits in one screen: sized by viewport height */
.section--fit {
  min-height: calc(100vh - 68px);
  min-height: calc(100svh - 68px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--section-pad) 0;
}
.section--fit .section-head { margin-bottom: clamp(20px, 4vh, 48px); align-items: baseline; }
.section--fit .section-head .label { padding-top: 0; }
.section--fit .section-head h2 { font-size: clamp(28px, min(3.4vw, 5.2vh), 48px); max-width: none; }
.section--fit .dial { max-width: min(500px, 60vh); }
.section--fit .step-tabs { margin-bottom: clamp(14px, 2.4vh, 26px); }
.section--fit .step h3 { font-size: clamp(24px, min(2.4vw, 4vh), 34px); margin-bottom: 10px; text-wrap: balance; }
.section--fit .step p { font-size: clamp(16px, 2.1vh, 18px); line-height: 1.5; margin-bottom: clamp(14px, 2.4vh, 24px); }
.section--fit .viz { min-height: 0; padding: clamp(12px, 1.8vh, 18px); }
.section--fit .viz-head { margin-bottom: 10px; padding-bottom: 8px; }
.section--fit .plate { grid-template-columns: repeat(12, clamp(10px, 1.5vh, 14px)); gap: clamp(3px, .5vh, 5px); }
.section--fit .plate i { width: clamp(10px, 1.5vh, 14px); height: clamp(10px, 1.5vh, 14px); }
.section--fit .readout { height: clamp(110px, 17vh, 150px); line-height: 1.6; }
.section--fit .chart svg { max-height: 24vh; }
.section--fit .cands { gap: clamp(5px, .8vh, 8px); }
.section--fit .brief { margin-bottom: 10px; }

/* ---------- Mission (inverted) ---------- */

.on-dark {
  background: var(--forest);
  color: var(--paper);
}
.on-dark .label { color: var(--paper-70); }
.on-dark .label b { color: var(--paper); }
.section.on-dark + .section { border-top: 0; }

.mission {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px 48px;
}
.mission .label { padding-top: 14px; }
.mission-text {
  margin: 0;
  font-size: clamp(24px, 2.25vw, 33px);
  font-weight: 300;
  line-height: 1.38;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}
.mission-text em { font-style: italic; }

/* ---------- Team ---------- */

.team {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px 48px;
}
.team-statement {
  margin: 0 0 36px;
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 350;
  line-height: 1.2;
  letter-spacing: -0.015em;
  max-width: 26ch;
}
/* ---------- Backers strip ---------- */

.backers-strip {
  border-top: 1px solid var(--forest);
  border-bottom: 1px solid var(--rule);
  padding: 24px 0;
}
.backers-strip .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px 22px;
}
.backers-strip .label, .backers-strip p, .backers-strip .more { line-height: 1; }
.backers-strip p, .backers-strip .more { margin: 0; font-size: 17px; color: var(--ink-80); position: relative; top: 1.5px; /* optical: serif sits high */ }
.backer-logos { display: inline-flex; align-items: center; gap: 22px; }
.backers-strip .sep { width: 1px; height: 28px; background: var(--rule); }
.logo { display: inline-flex; align-items: center; color: var(--forest); }
.logo svg, .logo img { height: 100%; width: auto; }
.logo--stellaris { height: 27px; transition: opacity .2s; }
.logo--stellaris .mask {
  display: block; height: 100%; aspect-ratio: 900 / 255;
  background: var(--forest);
  -webkit-mask: url("../img/logos/stellaris.png") center / contain no-repeat;
  mask: url("../img/logos/stellaris.png") center / contain no-repeat;
}
.logo--stellaris:hover { opacity: .7; }
.logo--unilever { height: 25px; }
.logo--pg { height: 27px; }
.logo--jnj { height: 15px; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--forest); padding: 40px 0 48px; }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.site-footer p { margin: 8px 0 0; font-size: 16px; color: var(--ink-80); max-width: 26ch; }
.site-footer ul { list-style: none; margin: 10px 0 0; padding: 0; font-size: 16px; line-height: 1.9; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .fine { grid-column: 1 / -1; display: flex; justify-content: space-between; padding-top: 28px; margin-top: 12px; border-top: 1px solid var(--rule); }
.linklike {
  appearance: none; background: none; border: 0; padding: 0; margin: 0;
  font: inherit; color: inherit; cursor: pointer; text-align: left;
}
.linklike:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Reveal on scroll ---------- */

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.hero .stagger > * { opacity: 0; animation: rise .9s var(--ease) forwards; }
.hero .stagger > *:nth-child(1) { animation-delay: .05s; }
.hero .stagger > *:nth-child(2) { animation-delay: .15s; }
.hero .stagger > *:nth-child(3) { animation-delay: .32s; }
.hero-figure { opacity: 0; animation: rise 1.2s var(--ease) .35s forwards; }

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

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .hero-grid, .loop { grid-template-columns: 1fr; }
  .hero-figure { justify-self: center; max-width: 440px; margin-top: 28px; }
  .scope { margin: 0 auto; }
  .hero-figure figcaption { margin: 40px auto 0; }
  .hero { min-height: 0; }
  .section--fit { min-height: 0; display: block; padding: clamp(80px, 11vw, 150px) 0; }
  .section--fit .dial { max-width: 440px; }
  .section-head, .team, .mission { grid-template-columns: 1fr; }
  .section-head .label, .mission .label { padding-top: 0; }
  .site-footer .wrap { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  body { font-size: 18px; }
  .backers-strip .sep { display: none; }
  .backers-strip p { flex-basis: 100%; text-align: center; }
  .backer-logos { flex-wrap: wrap; justify-content: center; gap: 14px 22px; }
  .nav { gap: 16px; }
  .nav a { font-size: 11.5px; }
  .brand { font-size: 20px; }
  .plate-wrap { grid-template-columns: 1fr; }
  .plate { grid-template-columns: repeat(12, 1fr); gap: 3px; }
  .plate i { width: 100%; height: auto; aspect-ratio: 1; }
  .readout { height: 110px; }
  .site-footer .wrap { grid-template-columns: 1fr; }
  .site-footer .fine { flex-direction: column; gap: 6px; }
}

/* =========================================================
   Inner pages: page header, Work index, article, careers
   ========================================================= */

.page-head { padding: clamp(56px, 8vw, 110px) 0 clamp(40px, 5vw, 64px); border-bottom: 1px solid var(--forest); }
.page-head h1 {
  margin: 18px 0 18px;
  font-weight: 350;
  font-size: clamp(44px, 5.4vw, 80px);
  line-height: 1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.page-head h1 em { font-style: italic; font-weight: 300; }
.page-head .lede { margin: 0; }

/* ---------- Work index (mirrors a simple news list) ---------- */

.news { width: 100%; max-width: calc(720px + 2 * var(--gutter)); margin: 0 auto; padding: clamp(48px, 7vw, 96px) var(--gutter) clamp(96px, 12vw, 160px); }
.news-head { padding-bottom: 40px; border-bottom: 1px solid var(--rule); margin-bottom: 64px; }
.news-head h1 { margin: 0; font-weight: 350; font-size: clamp(48px, 5vw, 64px); line-height: 1; letter-spacing: -0.025em; }
.news-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 96px; }
.news-list a { display: block; text-decoration: none; }
.news-list h2 { margin: 0 0 8px; font-weight: 350; font-size: clamp(28px, 3vw, 36px); line-height: 1.15; letter-spacing: -0.015em; text-wrap: balance; transition: opacity .2s; }
.news-list p { margin: 0; font-size: 20px; line-height: 1.45; color: var(--ink-60); }
.news-meta { display: flex; justify-content: space-between; margin-top: 28px; font-size: 16px; color: var(--ink-60); }
.news-list a:hover h2 { opacity: .7; }

/* ---------- Article ---------- */

.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--forest); transform-origin: 0 50%; transform: scaleX(0); }

.article-head { padding-top: clamp(56px, 8vw, 104px); padding-bottom: clamp(36px, 5vw, 56px); }
.article-head .label a { text-decoration: none; }
.article-head .label a:hover { text-decoration: underline; }
.article-head h1 {
  margin: 20px 0 22px;
  font-weight: 350;
  font-size: clamp(38px, 4.8vw, 70px);
  line-height: 1.04;
  letter-spacing: -0.028em;
  max-width: 18ch;
  text-wrap: balance;
}
.dek { margin: 0 0 30px; font-size: clamp(20px, 1.8vw, 25px); line-height: 1.45; color: var(--ink-80); max-width: 38em; font-style: italic; font-weight: 350; }
.article-head .meta { padding-top: 18px; border-top: 1px solid var(--forest); margin: 0; }

.article-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 700px);
  gap: 48px;
  padding-bottom: clamp(80px, 10vw, 140px);
}

.toc { position: sticky; top: 100px; align-self: start; max-height: calc(100vh - 120px); overflow: auto; }
.toc ol { list-style: none; margin: 14px 0 0; padding: 0; }
.toc li a {
  display: grid; grid-template-columns: 30px 1fr; gap: 4px;
  padding: 5px 0;
  font-size: 15px; line-height: 1.35;
  text-decoration: none; color: var(--ink-60);
  transition: color .2s;
}
.toc li.l3 a { padding-left: 14px; font-size: 14px; grid-template-columns: 30px 1fr; }
.toc li a span { font-family: var(--mono); font-size: 11px; padding-top: 3px; }
.toc li a:hover, .toc li a.is-active { color: var(--forest); }
.toc li a.is-active { font-weight: 500; }

.prose { font-size: 19.5px; line-height: 1.68; }
.prose p { margin: 0 0 1.15em; }
.prose h2 {
  margin: 2.4em 0 .8em;
  font-weight: 400;
  font-size: clamp(28px, 2.6vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.018em;
  scroll-margin-top: 96px;
}
.prose h3 {
  margin: 2em 0 .6em;
  font-weight: 500;
  font-size: 22px;
  line-height: 1.25;
  scroll-margin-top: 96px;
}
.prose .num { font-family: var(--mono); font-size: .5em; font-weight: 400; letter-spacing: .06em; color: var(--ink-60); margin-right: 14px; vertical-align: .35em; }
.prose h3 .num { font-size: .55em; vertical-align: .2em; }
.prose a { text-decoration-color: var(--ink-40); }
.prose a:hover { text-decoration-color: var(--forest); }

.cites { font-family: var(--mono); font-size: .62em; letter-spacing: .02em; vertical-align: .38em; line-height: 0; white-space: nowrap; color: var(--ink-60); margin-left: 2px; }
.cite { text-decoration: none !important; color: var(--forest); padding: 0 1px; border-radius: 2px; }
.cite:hover, .cite:focus-visible { background: var(--forest); color: var(--paper); outline: none; }
td .cites { vertical-align: 0; font-size: 11px; }

.abstract { border: 1px solid var(--forest); padding: 26px 30px 12px; margin: 0 0 2.2em; background: var(--paper); }
.abstract p.label { margin: 0 0 10px; font-size: 11.5px; line-height: 1.4; }
.abstract p { font-size: 18px; line-height: 1.6; }

.table-figure { margin: 2em 0 2.2em; overflow-x: auto; }
.table-figure table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.45; }
.table-figure th { font-family: var(--mono); font-weight: 500; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--forest); border-top: 1px solid var(--forest); }
.table-figure td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.table-figure td:first-child { font-family: var(--mono); font-size: 12.5px; padding-top: 12px; }
.table-figure figcaption, .diagram figcaption { margin-top: 14px; font-family: var(--mono); font-size: 11.5px; line-height: 1.6; color: var(--ink-60); }
.table-figure figcaption b, .diagram figcaption b { color: var(--forest); font-weight: 500; }

.diagram { margin: 2em 0 2.4em; padding: 26px 22px 18px; border: 1px solid var(--rule); background: var(--paper); }
.diagram svg { width: 100%; height: auto; color: var(--forest); overflow: visible; }
.diagram .dg .solid { fill: var(--forest); }
.diagram .dg .tint { fill: rgba(31, 58, 46, 0.06); }
.diagram .dt text { text-anchor: middle; fill: var(--forest); }
.diagram .dt .k { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; font-weight: 500; }
.diagram .dt .k.sm { font-size: 9.5px; letter-spacing: .1em; }
.diagram .dt .s { font-family: var(--serif); font-size: 13.5px; font-style: italic; }
.diagram .dt .inv { fill: var(--paper); }

.references { margin-top: 3.2em; padding-top: 8px; border-top: 1px solid var(--forest); scroll-margin-top: 96px; }
.references h2 { margin-top: 1em; }
.references ol { list-style: none; margin: 0; padding: 0; }
.references li {
  display: grid; grid-template-columns: 40px 1fr; gap: 8px;
  padding: 12px 0; border-bottom: 1px solid var(--rule);
  font-size: 15.5px; line-height: 1.5; color: var(--ink-80);
  scroll-margin-top: 110px;
}
.references li:target { background: rgba(31, 58, 46, 0.06); }
.references .rn { font-family: var(--mono); font-size: 12px; color: var(--forest); padding-top: 3px; }
.references b { font-weight: 500; color: var(--forest); }
.references a { font-family: var(--mono); font-size: 12px; word-break: break-all; }

.ref-pop {
  position: fixed; z-index: 80; max-width: 380px;
  background: var(--forest); color: var(--paper);
  padding: 14px 16px; border-radius: 4px;
  font-size: 14.5px; line-height: 1.5;
  box-shadow: 0 10px 30px rgba(31, 58, 46, 0.22);
}
.ref-pop .rn { display: none; }
.ref-pop b { font-weight: 500; }
.ref-pop a { font-family: var(--mono); font-size: 11.5px; color: var(--paper-70); word-break: break-all; }

/* ---------- Careers ---------- */

.jobs-bar {
  position: sticky; top: 68px; z-index: 20;
  background: rgba(242, 239, 230, 0.92);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.jobs-bar .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; padding-bottom: 14px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button {
  appearance: none; cursor: pointer;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--forest); background: transparent;
  border: 1px solid var(--forest); border-radius: 999px; padding: 8px 14px;
  transition: background .2s, color .2s;
}
.filters button[aria-pressed="true"], .filters button:hover { background: var(--forest); color: var(--paper); }
.filters button .n { opacity: .6; margin-left: 6px; }

.job-group { padding: clamp(40px, 5vw, 64px) 0 0; }
.job-group > .label { display: block; padding-bottom: 14px; border-bottom: 1px solid var(--forest); }

.job { border-bottom: 1px solid var(--rule); }
.job summary {
  list-style: none; cursor: pointer;
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px 28px;
  padding: 24px 0;
}
.job summary::-webkit-details-marker { display: none; }
.job h3 { margin: 0; font-weight: 400; font-size: clamp(24px, 2.4vw, 32px); line-height: 1.15; letter-spacing: -0.015em; text-wrap: balance; }
.job .where { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.job .where span { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-60); border: 1px solid var(--rule); border-radius: 999px; padding: 4px 10px; }
.job .toggle { width: 38px; height: 38px; border: 1px solid var(--forest); border-radius: 50%; position: relative; transition: background .2s; }
.job .toggle::before, .job .toggle::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.4px; background: var(--forest); transform: translate(-50%, -50%); transition: transform .3s var(--ease), background .2s; }
.job .toggle::after { transform: translate(-50%, -50%) rotate(90deg); }
.job[open] .toggle { background: var(--forest); }
.job[open] .toggle::before, .job[open] .toggle::after { background: var(--paper); }
.job[open] .toggle::after { transform: translate(-50%, -50%) rotate(0deg); }
.job summary:hover h3 { opacity: .78; }
.job-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 48px; padding: 0 0 34px; animation: rise .5s var(--ease) both; }
.job-body .intro { grid-column: 1 / -1; margin: 0; color: var(--ink-80); max-width: 46em; }
.job-body h4 { margin: 0 0 10px; font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.job-body ul { margin: 0; padding-left: 1.1em; font-size: 17px; line-height: 1.55; color: var(--ink-80); }
.job-body li { margin-bottom: 6px; }
.job-body .apply { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.job-body .apply small { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: var(--ink-60); }
.job.is-hidden, .job-group.is-hidden { display: none; }

.open-call { margin-top: clamp(56px, 7vw, 96px); padding: clamp(36px, 5vw, 56px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.open-call h2 { margin: 0 0 8px; font-weight: 350; font-size: clamp(30px, 3.4vw, 46px); line-height: 1.05; letter-spacing: -0.02em; }
.open-call p { margin: 0; color: var(--paper-70); max-width: 36em; }

@media (max-width: 980px) {
  .article-grid { grid-template-columns: 1fr; }
  .toc { display: none; }
  .job-body { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .prose { font-size: 18px; }
  .abstract { padding: 20px 18px 6px; }
  .diagram { padding: 14px 8px 12px; margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); }
  .job summary { grid-template-columns: 1fr auto; }
  .job .where { grid-column: 1 / 2; grid-row: 2; justify-content: flex-start; }
  .job .toggle { grid-row: 1 / span 2; grid-column: 2; }
  .jobs-bar { position: static; }
  .jobs-bar #jobs-count { display: none; }
  .filters button { padding: 7px 11px; font-size: 10.5px; }
}
