/* Empero site. Two surfaces: night (the machine) and paper (the page).
   Newsreader for display, Hanken Grotesk for text, JetBrains Mono for figures. */

@font-face { font-family: "Newsreader"; src: url("fonts/newsreader.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-italic.woff2") format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("fonts/hanken-grotesk.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("fonts/hanken-grotesk-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; font-style: normal; font-display: swap; }

:root {
  --night: #0e0b13;
  --night-2: #16121d;
  --night-3: #1f1a28;
  --on-night: #eeeaf4;
  --on-night-2: rgba(238, 234, 244, 0.68);
  --on-night-3: rgba(238, 234, 244, 0.5);
  --night-line: rgba(238, 234, 244, 0.12);
  --night-line-2: rgba(238, 234, 244, 0.22);

  --paper: #f4f1eb;
  --paper-2: #ece7de;
  --card: #fbfaf7;
  --ink: #16131b;
  --ink-2: #57525e;
  --ink-3: #6f6976;
  --line: rgba(22, 19, 27, 0.12);
  --line-2: rgba(22, 19, 27, 0.24);

  --violet: #5b36d6;
  --violet-2: #4a28be;
  --violet-bright: #b48cff;
  --violet-deep: #2c2163;

  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --max: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --section: clamp(88px, 11vw, 168px);
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }
::selection { background: var(--violet-bright); color: var(--night); }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--ink); color: var(--paper); border-radius: 6px; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 3px; }
.night :focus-visible { outline-color: var(--violet-bright); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- surfaces ---------- */
.night { background: var(--night); color: var(--on-night); }
.paper { background: var(--paper); color: var(--ink); }
.paper-2 { background: var(--paper-2); color: var(--ink); }

/* ---------- type ---------- */
.display {
  font-family: var(--serif);
  font-weight: 330;
  font-size: clamp(46px, 6.6vw, 96px);
  line-height: 1.0;
  letter-spacing: -0.022em;
  font-optical-sizing: auto;
}
.display em, .h2 em { font-style: italic; font-weight: 300; }
.h1 { font-family: var(--serif); font-weight: 340; font-size: clamp(42px, 5.4vw, 76px); line-height: 1.03; letter-spacing: -0.02em; }
.h2 { font-family: var(--serif); font-weight: 350; font-size: clamp(34px, 3.9vw, 54px); line-height: 1.06; letter-spacing: -0.016em; }
.h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 2.1vw, 30px); line-height: 1.15; letter-spacing: -0.01em; }
.h4 { font-family: var(--serif); font-weight: 420; font-size: 22px; line-height: 1.2; letter-spacing: -0.006em; }
.lead { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.55; color: var(--ink-2); max-width: 40em; }
.night .lead { color: var(--on-night-2); }
.muted { color: var(--ink-2); }
.night .muted { color: var(--on-night-2); }
.small { font-size: 14.5px; line-height: 1.55; }
.mono { font-family: var(--mono); font-size: 0.82em; letter-spacing: -0.01em; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; font-weight: 500; color: var(--ink-3); }
.night .meta { color: var(--on-night-3); }

/* The tag: a small label with the logo's square. */
.tag {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 550; letter-spacing: 0.01em;
  color: var(--ink-2);
}
.tag::before { content: ""; width: 7px; height: 7px; background: var(--violet); flex: none; }
.night .tag { color: var(--on-night-2); }
.night .tag::before { background: var(--violet-bright); }

/* ---------- buttons and links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 46px; padding: 0 20px;
  border: 1px solid var(--line-2); border-radius: 3px;
  font-size: 15px; font-weight: 560; letter-spacing: 0.005em; white-space: nowrap;
  background: transparent; color: var(--ink); cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.btn:hover { border-color: var(--ink); }
.btn-solid { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn-solid:hover { background: #2b2633; border-color: #2b2633; }
.btn-violet { background: var(--violet); border-color: var(--violet); color: #fff; }
.btn-violet:hover { background: var(--violet-2); border-color: var(--violet-2); }
.night .btn { border-color: var(--night-line-2); color: var(--on-night); }
.night .btn:hover { border-color: var(--on-night); }
.night .btn-solid { background: var(--on-night); border-color: var(--on-night); color: var(--night); }
.night .btn-solid:hover { background: #fff; border-color: #fff; }
.btn .arr, .more .arr { transition: transform .18s ease; }
.btn:hover .arr, a:hover > .more .arr, .more:hover .arr { transform: translateX(3px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.more { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 560; color: var(--ink); }
.night .more { color: var(--on-night); }
.link { color: var(--violet); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: rgba(91, 54, 214, 0.35); }
.link:hover { text-decoration-color: currentColor; }
.night .link { color: var(--violet-bright); text-decoration-color: rgba(180, 140, 255, 0.4); }

/* ---------- announcement + header ---------- */
.announce { background: var(--violet-deep); color: var(--on-night); font-size: 14px; }
.announce .wrap { display: flex; justify-content: center; align-items: center; gap: 14px; min-height: 42px; padding-top: 8px; padding-bottom: 8px; text-align: center; flex-wrap: wrap; }
.announce a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(238, 234, 244, 0.45); }
.announce a:hover { text-decoration-color: currentColor; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper); color: var(--ink);
  border-bottom: 1px solid var(--line);
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.site-header[data-on="night"] { background: var(--night); color: var(--on-night); border-bottom-color: var(--night-line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand svg { width: 24px; height: 24px; }
.brand .word { font-family: var(--sans); font-weight: 640; font-size: 21px; letter-spacing: -0.03em; line-height: 1; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a { font-size: 15px; font-weight: 520; color: var(--ink-2); transition: color .15s ease; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.site-header[data-on="night"] .nav a { color: var(--on-night-2); }
.site-header[data-on="night"] .nav a:hover, .site-header[data-on="night"] .nav a[aria-current="page"] { color: var(--on-night); }
.nav .btn { height: 40px; padding: 0 16px; font-size: 14.5px; }
.site-header .nav .btn-violet, .site-header[data-on="night"] .nav .btn-violet { color: #fff; }
.menu-btn { display: none; width: 44px; height: 44px; margin-right: -10px; border: 0; background: transparent; cursor: pointer; }
.menu-btn span { display: block; width: 22px; height: 1.5px; margin: 6px auto; background: currentColor; transition: transform .2s ease, opacity .2s ease; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center; gap: 24px;
  min-height: min(calc(100svh - var(--header-h) - 42px - 150px), 720px);
  padding-top: clamp(56px, 7vw, 96px); padding-bottom: 40px;
}
.hero-copy { position: relative; z-index: 2; max-width: 760px; }
.hero-copy .display { margin: 26px 0 28px; }
.hero-copy .lead { margin-bottom: 36px; max-width: 34em; }
.hero-art { position: relative; justify-self: end; width: min(100%, 600px); aspect-ratio: 1; margin: 0 -2% 0 0; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.hero > .wrap { position: relative; z-index: 1; }
.hero-news {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--night-line);
  margin-top: clamp(24px, 4vw, 48px);
}
.hero-news a { display: block; padding: 22px 28px 30px 0; border-right: 1px solid var(--night-line); }
.hero-news a + a { padding-left: 28px; }
.hero-news a:last-child { border-right: 0; }
.hero-news .meta { margin-bottom: 8px; }
.hero-news .t { font-family: var(--serif); font-size: 20px; line-height: 1.3; letter-spacing: -0.005em; color: var(--on-night); }
.hero-news a:hover .t { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; text-decoration-color: var(--on-night-3); }

/* The seam: a dithered band between night and paper. */
.seam { position: relative; height: clamp(72px, 9vw, 120px); }
.seam canvas { width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; }

/* ---------- sections ---------- */
.section { padding: var(--section) 0; }
.section.tight-top { padding-top: clamp(40px, 6vw, 80px); }
.section.compact { padding: clamp(32px, 4.5vw, 60px) 0; }
.section.compact:last-of-type { padding-bottom: var(--section); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: clamp(36px, 4vw, 56px); }
.section-head .h2 { margin-top: 18px; max-width: 18em; }
.section-head .lead { margin-top: 20px; }

.statement { text-align: center; }
.statement .tag { margin-bottom: 32px; }
.statement p.big {
  font-family: var(--serif); font-weight: 340;
  font-size: clamp(27px, 3.1vw, 44px); line-height: 1.24; letter-spacing: -0.012em;
  max-width: 30em; margin: 0 auto;
}
.statement p.big .soft { color: var(--ink-3); }

/* ---------- research cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.card {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: var(--line-2); }
.card-figure { position: relative; aspect-ratio: 16 / 10; background: #fff; border-bottom: 1px solid var(--line); }
.card-figure img { position: absolute; left: 14px; top: 10px; width: calc(100% - 28px); height: calc(100% - 20px); object-fit: contain; }
.card-figure.art { background: var(--paper-2); }
.card-figure.art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 24px 26px 26px; }
.card-body .meta { margin-bottom: 14px; }
.card-body .h4 { margin-bottom: 4px; }
.card-body .sub { font-family: var(--serif); font-style: italic; font-size: 17px; line-height: 1.35; color: var(--ink-2); margin-bottom: 14px; }
.card-body p { font-size: 15.5px; line-height: 1.58; color: var(--ink-2); }
.card-body .more { margin-top: auto; padding-top: 8px; }

/* ---------- night panel (products) ---------- */
.panel { margin: 0 clamp(8px, 1.4vw, 20px); border-radius: clamp(16px, 2vw, 28px); padding: clamp(72px, 9vw, 128px) 0; }
.feature {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px);
  align-items: center; padding: clamp(40px, 5vw, 64px) 0; border-top: 1px solid var(--night-line);
}
.feature.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feature.flip .feature-copy { order: 2; }
.feature-copy .meta { margin-bottom: 14px; }
.feature-copy .h2 { font-size: clamp(32px, 3.4vw, 46px); margin-bottom: 18px; }
.feature-copy p { color: var(--on-night-2); max-width: 30em; }
.feature-copy .btn-row { margin-top: 28px; }
.shot { border-radius: 12px; overflow: hidden; border: 1px solid var(--night-line-2); background: var(--night-2); }
.shot img { width: 100%; height: auto; }
.code {
  display: block; margin-top: 22px; padding: 14px 16px;
  font-family: var(--mono); font-size: 13.5px; line-height: 1.6; letter-spacing: -0.01em;
  background: var(--night-2); border: 1px solid var(--night-line); border-radius: 8px;
  color: var(--on-night); overflow-x: auto; white-space: pre;
}
.code .c { color: var(--on-night-3); }
.mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: clamp(32px, 4vw, 48px); }
.mini > div {
  display: flex; flex-direction: column;
  background: var(--night-2); border: 1px solid var(--night-line); border-radius: 14px; padding: 28px 26px;
}
.mini .h4 { margin-bottom: 10px; }
.mini p { color: var(--on-night-2); font-size: 15.5px; line-height: 1.58; }
.mini .code { margin-top: 4px; margin-bottom: 18px; font-size: 12.5px; padding: 11px 13px; }
.mini .more { margin-top: auto; }
.mini ul.repos li { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-top: 1px solid var(--night-line); font-size: 14.5px; }
.mini ul.repos li:first-child { border-top: 0; padding-top: 0; }
.mini ul.repos a { font-weight: 560; color: var(--on-night); }
.mini ul.repos a:hover { color: var(--violet-bright); }
.mini ul.repos span { color: var(--on-night-3); text-align: right; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line-2); }
.stat { padding: 26px 24px 8px 0; }
.stat + .stat { padding-left: 24px; border-left: 1px solid var(--line); }
.stat b { display: block; font-family: var(--serif); font-weight: 340; font-size: clamp(40px, 4.4vw, 64px); line-height: 1; letter-spacing: -0.02em; font-variant-numeric: lining-nums tabular-nums; }
.stat span { display: block; margin-top: 12px; font-size: 14.5px; color: var(--ink-2); }
.night .stats { border-top-color: var(--night-line-2); }
.night .stat + .stat { border-left-color: var(--night-line); }
.night .stat span { color: var(--on-night-2); }
.stats-note { margin-top: 18px; font-size: 13px; color: var(--ink-3); }

/* ---------- model families ---------- */
.families { margin-top: clamp(48px, 6vw, 80px); border-top: 1px solid var(--line-2); }
.family {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr) minmax(0, 2fr) 28px;
  gap: 28px; align-items: start; padding: 30px 0; border-bottom: 1px solid var(--line);
  transition: background-color .2s ease;
}
.family .h3 { margin-bottom: 12px; }
.family p { margin: 0; color: var(--ink-2); font-size: 16px; }
.family .dl { font-family: var(--serif); font-size: 22px; line-height: 1.2; text-align: right; }
.family .dl small { display: block; font-family: var(--sans); font-size: 13px; color: var(--ink-3); margin-top: 4px; }
.family .go { align-self: center; justify-self: end; font-size: 20px; color: var(--ink-3); transition: transform .18s ease, color .18s ease; }
.family:hover .go { transform: translateX(3px); color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; height: 26px; padding: 0 9px; border: 1px solid var(--line-2); border-radius: 3px; font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
a.chip:hover { border-color: var(--ink); color: var(--ink); }

/* ---------- principles ---------- */
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-2); }
.principles.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.principle { padding: 30px 32px 10px 0; }
.principles:not(.four) .principle + .principle { padding-left: 32px; border-left: 1px solid var(--line); }
.principles.four .principle { padding: 32px 40px 32px 0; border-bottom: 1px solid var(--line); }
.principles.four .principle:nth-child(2n) { padding-left: 40px; border-left: 1px solid var(--line); }
.principle .n { font-family: var(--mono); font-size: 12.5px; color: var(--violet); margin-bottom: 18px; display: block; }
.principle .h4 { margin-bottom: 12px; }
.principle p { color: var(--ink-2); font-size: 16px; }

/* ---------- updates list ---------- */
.updates { border-top: 1px solid var(--line-2); }
.update {
  display: grid; grid-template-columns: 112px 150px minmax(0, 1fr) 28px; gap: 24px; align-items: baseline;
  padding: 22px 0; border-bottom: 1px solid var(--line);
}
.update .d { font-family: var(--mono); font-size: 13px; color: var(--ink-3); }
.update .k { font-size: 13.5px; font-weight: 560; color: var(--ink-2); }
.update .t { font-family: var(--serif); font-size: 21px; line-height: 1.3; letter-spacing: -0.005em; }
.update .s { display: block; margin-top: 4px; font-size: 15px; color: var(--ink-2); }
/* post excerpts merged into the update lists run longer than the hand-kept summaries */
.update .s.clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.update .go { font-size: 18px; color: var(--ink-3); justify-self: end; transition: transform .18s ease, color .18s ease; }
a.update:hover .t { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; text-decoration-color: var(--line-2); }
a.update:hover .go { transform: translateX(3px); color: var(--ink); }
.month { margin-top: clamp(48px, 6vw, 72px); }
.month:first-child { margin-top: 0; }
.month > .h4 { margin-bottom: 18px; }

/* ---------- work with us ---------- */
.ctas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.cta { display: flex; flex-direction: column; padding: clamp(28px, 3.4vw, 44px); background: var(--night-2); border: 1px solid var(--night-line); border-radius: 16px; }
.cta .tag { margin-bottom: 22px; }
.cta .h3 { margin-bottom: 14px; }
.cta p { color: var(--on-night-2); max-width: 32em; }
.cta .btn-row { margin-top: auto; padding-top: 16px; }

/* ---------- footer ---------- */
.site-footer { padding: clamp(64px, 8vw, 104px) 0 0; overflow: hidden; }
.footer-top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 96px); padding-bottom: clamp(56px, 7vw, 88px); border-bottom: 1px solid var(--night-line); }
.dispatch .h3 { margin-bottom: 12px; }
.dispatch p { color: var(--on-night-2); max-width: 30em; }
.dispatch form { margin-top: 22px; max-width: 440px; }
.field { display: flex; gap: 8px; }
.field input {
  flex: 1; min-width: 0; height: 46px; padding: 0 14px;
  background: var(--night-2); border: 1px solid var(--night-line-2); border-radius: 3px; color: var(--on-night);
}
.field input::placeholder { color: var(--on-night-3); }
.field input:focus { outline: none; border-color: var(--violet-bright); }
.dnote { display: block; margin-top: 10px; font-size: 13px; color: var(--on-night-3); min-height: 1.4em; }
.dnote.ok { color: #9be0b7; }
.dnote.err { color: #ff9eae; }
.footer-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.footer-cols h4 { font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: 0.02em; color: var(--on-night-3); margin-bottom: 16px; }
.footer-cols li { margin-bottom: 10px; }
.footer-cols a { font-size: 15px; color: var(--on-night-2); transition: color .15s ease; }
.footer-cols a:hover { color: var(--on-night); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 24px; padding: 26px 0; font-size: 13.5px; color: var(--on-night-3); }
.footer-bottom nav { display: flex; gap: 22px; }
.footer-bottom a:hover { color: var(--on-night); }
.footer-mark { font-family: var(--sans); font-weight: 680; font-size: clamp(96px, 21vw, 300px); line-height: 0.74; letter-spacing: -0.055em; color: rgba(238, 234, 244, 0.055); margin: 8px 0 -0.06em; white-space: nowrap; user-select: none; }

/* ---------- team ---------- */
.team { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 24px; }
.person { display: flex; flex-direction: column; }
.person .photo { aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden; background: var(--paper-2); border: 1px solid var(--line); }
.person .photo img { width: 100%; height: 100%; object-fit: cover; }
.person .photo.initial { display: grid; place-items: center; font-family: var(--serif); font-size: 64px; color: var(--ink-3); }
.person .who { padding-top: 14px; }
.person .name { display: block; font-family: var(--serif); font-size: 22px; line-height: 1.25; }
.person .role { display: block; margin-top: 2px; font-size: 15px; color: var(--ink-2); }
.person .bio { margin: 10px 0 0; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.person .contact { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; font-size: 14px; color: var(--ink-3); }
.person .contact a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.person .contact a:hover { color: var(--violet); }
.person.is-loading .photo { animation: none; background: var(--paper-2); }
.person.is-loading .name, .person.is-loading .role { background: var(--paper-2); border-radius: 3px; width: 60%; margin-top: 6px; }

/* ---------- long-form text (articles, policies) ---------- */
.richtext { max-width: 44em; font-size: 18px; line-height: 1.7; color: #2b2732; }
.richtext > *:first-child { margin-top: 0; }
.richtext p, .richtext ul, .richtext ol, .richtext blockquote, .richtext pre, .richtext .table-wrap, .richtext figure { margin: 0 0 1.15em; }
.richtext h2 { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.2; letter-spacing: -0.012em; color: var(--ink); margin: 1.8em 0 0.55em; scroll-margin-top: calc(var(--header-h) + 20px); }
.richtext h3 { font-family: var(--serif); font-weight: 420; font-size: 23px; line-height: 1.25; color: var(--ink); margin: 1.5em 0 0.45em; scroll-margin-top: calc(var(--header-h) + 20px); }
.richtext h4 { font-family: var(--sans); font-weight: 600; font-size: 17px; color: var(--ink); margin: 1.4em 0 0.4em; }
.richtext a { color: var(--violet); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: rgba(91, 54, 214, 0.35); }
.richtext a:hover { text-decoration-color: currentColor; }
.richtext strong { font-weight: 640; color: var(--ink); }
.richtext ul, .richtext ol { padding-left: 1.3em; }
.richtext ul { list-style: square; }
.richtext ol { list-style: decimal; }
.richtext li { margin: 0.3em 0; padding-left: 0.2em; }
.richtext li::marker { color: var(--violet); }
.richtext blockquote { padding: 2px 0 2px 22px; border-left: 2px solid var(--violet); color: var(--ink-2); font-family: var(--serif); font-size: 20px; }
.richtext code { font-family: var(--mono); font-size: 0.84em; padding: 2px 5px; background: var(--paper-2); border-radius: 3px; }
.richtext pre { padding: 18px 20px; overflow-x: auto; background: var(--night); color: var(--on-night); border-radius: 10px; font-size: 14px; line-height: 1.6; }
.richtext pre code { padding: 0; background: none; color: inherit; font-size: inherit; }
.richtext img { border: 1px solid var(--line); border-radius: 10px; }
/* a grid of images in a post (markdown: two or more lines that each hold only an image) */
.richtext .gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 1.15em; }
.richtext .gallery a { display: block; text-decoration: none; }
.richtext .gallery img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; transition: border-color .15s ease; }
.richtext .gallery a:hover img { border-color: var(--line-2); }
@media (max-width: 520px) { .richtext .gallery { gap: 8px; } }
.richtext hr { border: 0; border-top: 1px solid var(--line-2); margin: 2.2em 0; }
.richtext .table-wrap { overflow-x: auto; }
.richtext table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.richtext th { text-align: left; font-weight: 600; font-size: 13.5px; color: var(--ink-3); border-bottom: 1px solid var(--line-2); padding: 0 14px 10px 0; }
.richtext td { border-bottom: 1px solid var(--line); padding: 12px 14px 12px 0; vertical-align: top; }

/* ---------- writing ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.filter { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 3px; font-size: 14px; font-weight: 560; color: var(--ink-2); transition: border-color .15s ease, color .15s ease; }
.filter:hover { border-color: var(--ink); color: var(--ink); }
.filter.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.update .by { display: block; margin-top: 6px; font-size: 13.5px; color: var(--ink-3); }
.featured-post { display: block; margin-bottom: clamp(40px, 5vw, 64px); padding: clamp(28px, 4vw, 48px); background: var(--paper-2); border: 1px solid var(--line); border-radius: 16px; transition: border-color .2s ease; }
.featured-post:hover { border-color: var(--line-2); }
.featured-post .meta { margin-bottom: 18px; }
.featured-post .h2 { max-width: 20em; margin-bottom: 14px; }
.featured-post .lead { margin-bottom: 22px; }
.article-head .h1 { max-width: 18em; }
.article-head .meta { margin-top: 24px; font-size: 14.5px; }
.article-cover { margin: 0 0 clamp(36px, 5vw, 56px); }
.article-cover img { width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); }
.article-grid { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: clamp(32px, 5vw, 80px); align-items: start; }
/* the aside spans the article's full height so the sticky contents list can follow the reader */
.article-grid > aside { align-self: stretch; }
.toc { position: sticky; top: calc(var(--header-h) + 28px); display: flex; flex-direction: column; gap: 9px; padding-left: 18px; border-left: 1px solid var(--line-2); font-size: 14.5px; }
.toc .tag { margin-bottom: 6px; }
.toc a { color: var(--ink-2); line-height: 1.4; }
.toc a:hover { color: var(--ink); }
.toc a.lvl3 { padding-left: 12px; font-size: 14px; }
.article-foot { margin-top: clamp(48px, 6vw, 72px); padding-top: 28px; border-top: 1px solid var(--line); }

/* ---------- notes, cells, steps, forms ---------- */
.note { max-width: 46em; padding: 22px 24px; background: var(--card); border: 1px solid var(--line-2); border-left: 3px solid var(--violet); border-radius: 6px; }
.note p { margin: 0 0 10px; color: var(--ink); line-height: 1.6; }
.note p:last-child { margin: 0; }
.cells { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.cell { padding: 26px 24px 24px; background: var(--card); }
.cells.on-paper-2 .cell { background: var(--paper); }
.cell .h4 { margin-bottom: 8px; }
.cell p { margin: 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.58; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; counter-reset: step; }
.steps li { padding-top: 18px; border-top: 1px solid var(--line-2); color: var(--ink-2); font-size: 15.5px; line-height: 1.58; }
.steps li::before { counter-increment: step; content: "0" counter(step); display: block; margin-bottom: 14px; font-family: var(--mono); font-size: 12.5px; color: var(--violet); }
.steps li b { display: block; margin-bottom: 6px; font-family: var(--serif); font-weight: 420; font-size: 21px; color: var(--ink); }

.form { display: grid; gap: 20px; max-width: 760px; }
.form .row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.form .f { display: grid; gap: 8px; }
.form .f > span { font-size: 14px; font-weight: 560; color: var(--ink-2); }
.form .f small { font-size: 13px; color: var(--ink-3); }
/* a question above its answer field (the contributor skill task) */
.form .f > p { margin: 0; max-width: 72ch; line-height: 1.65; color: var(--ink); white-space: pre-line; }
.form input[type=text], .form input[type=email], .form input[type=url], .form input[type=search], .form input[type=date],
.form input[type=time], .form input[type=datetime-local], .form input[type=number], .form select, .form textarea {
  width: 100%; min-height: 46px; padding: 11px 13px;
  background: var(--card); border: 1px solid var(--line-2); border-radius: 4px;
  font: 400 16px/1.5 var(--sans); color: var(--ink);
}
.form textarea { resize: vertical; min-height: 120px; }
.form select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: calc(100% - 20px) 20px, calc(100% - 15px) 20px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 38px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(91, 54, 214, 0.14); }
.form .check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.form .check input { margin-top: 4px; width: 17px; height: 17px; accent-color: var(--violet); flex: none; }
.form-note { font-size: 14px; color: var(--ink-3); }
.form-note.ok { color: #1f7a4d; }
.form-note.err { color: #b42335; }

/* ---------- inner pages ---------- */
.page-hero { padding: clamp(64px, 9vw, 128px) 0 clamp(48px, 6vw, 80px); }
.page-hero .h1 { margin: 22px 0 24px; max-width: 14em; }
.page-hero .lead { max-width: 38em; }
.crumbs { display: flex; gap: 10px; font-size: 14px; color: var(--ink-3); }
.crumbs a:hover { color: var(--ink); }
.rule-top { border-top: 1px solid var(--line-2); }

.pub { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(28px, 4vw, 64px); align-items: start; padding: clamp(36px, 4vw, 56px) 0; border-bottom: 1px solid var(--line); }
.pub:first-of-type { border-top: 1px solid var(--line-2); }
.pub-figure { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.pub-figure img { width: 100%; height: auto; }
.pub .meta { margin-bottom: 14px; }
.pub .h3 { margin-bottom: 6px; }
.pub .sub { font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1.35; color: var(--ink-2); margin-bottom: 18px; }
.pub p { color: var(--ink-2); }
.pub .btn-row { margin-top: 24px; }

.rows { border-top: 1px solid var(--line-2); }
.row { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr) minmax(0, 1fr); gap: 28px; padding: 26px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.row .h4 { font-size: 21px; }
.row .meta { margin-top: 8px; }
.row p { margin: 0; color: var(--ink-2); font-size: 16px; }
.row .go { justify-self: end; font-size: 18px; color: var(--ink-3); }
a.row:hover .h4 { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; text-decoration-color: var(--line-2); }
a.row:hover .go { color: var(--ink); }

.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(28px, 5vw, 80px); }
.split > .side .tag { position: sticky; top: calc(var(--header-h) + 28px); }

/* paper detail */
.paper-head .sub { font-family: var(--serif); font-style: italic; font-weight: 340; font-size: clamp(24px, 2.6vw, 34px); line-height: 1.2; color: var(--ink-2); margin: -8px 0 28px; max-width: 26em; }
.paper-head .meta { font-size: 14.5px; }
.prose { max-width: 42em; }
.prose p { font-size: 18px; line-height: 1.68; color: #2b2732; }
.findings li { position: relative; padding: 20px 0 20px 28px; border-top: 1px solid var(--line); }
.findings li:last-child { border-bottom: 1px solid var(--line); }
.findings li::before { content: ""; position: absolute; left: 0; top: 30px; width: 7px; height: 7px; background: var(--violet); }
.findings b { display: block; font-family: var(--serif); font-weight: 420; font-size: 21px; line-height: 1.3; margin-bottom: 6px; }
.findings span { color: var(--ink-2); font-size: 16.5px; }
figure.fig { margin: 0; }
figure.fig .frame { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: clamp(14px, 2vw, 28px); }
figure.fig img { width: 100%; height: auto; }
figure.fig figcaption { margin-top: 14px; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); max-width: 46em; }
figure.fig figcaption b { color: var(--ink); font-weight: 600; }
.figs { display: grid; gap: clamp(40px, 5vw, 64px); }
.bib { position: relative; }
.bib pre {
  margin: 0; padding: 22px 24px; overflow-x: auto;
  font-family: var(--mono); font-size: 13px; line-height: 1.65;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; color: var(--ink);
}
.bib button { position: absolute; top: 12px; right: 12px; height: 32px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 3px; background: var(--paper); font-size: 13px; font-weight: 560; cursor: pointer; }
.bib button:hover { border-color: var(--ink); }

/* model tables */
.mtable { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.mtable th { text-align: left; font-size: 13px; font-weight: 600; letter-spacing: 0.01em; color: var(--ink-3); padding: 0 16px 12px 0; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.mtable td { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--line); vertical-align: baseline; }
.mtable td:first-child a { font-weight: 600; color: var(--ink); }
.mtable td:first-child a:hover { color: var(--violet); }
.mtable .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mtable th.num { text-align: right; }
.mtable .fmt a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.mtable .fmt a:hover { color: var(--violet); }
.mtable td.desc { color: var(--ink-2); }
.table-wrap { overflow-x: auto; }
.family-block { padding: clamp(40px, 5vw, 64px) 0; border-top: 1px solid var(--line-2); }
.family-block .split { align-items: start; }
.family-block .h3 { margin-bottom: 12px; }
.family-block .side p { color: var(--ink-2); font-size: 16px; }

.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-2); }
.contact-grid > div { padding: 26px 24px 26px 0; border-bottom: 1px solid var(--line); }
.contact-grid > div:not(:nth-child(3n+1)) { padding-left: 24px; border-left: 1px solid var(--line); }
.contact-grid .k { display: block; font-size: 13.5px; font-weight: 560; color: var(--ink-3); margin-bottom: 8px; }
.contact-grid a { font-family: var(--serif); font-size: 21px; }
.contact-grid a:hover { color: var(--violet); }
.contact-grid p { margin: 8px 0 0; font-size: 15px; color: var(--ink-2); }
.night .contact-grid { border-top-color: var(--night-line-2); }
.night .contact-grid > div { border-bottom-color: var(--night-line); }
.night .contact-grid > div:not(:nth-child(3n+1)) { border-left-color: var(--night-line); }
.night .contact-grid .k { color: var(--on-night-3); }
.night .contact-grid a { color: var(--on-night); }
.night .contact-grid a:hover { color: var(--violet-bright); }
.night .contact-grid p { color: var(--on-night-2); }

.staging-badge {
  position: fixed; right: 14px; bottom: 14px; z-index: 60;
  padding: 6px 10px; border-radius: 3px; font-size: 12px; font-weight: 600; opacity: .88;
  background: var(--ink); color: var(--paper); border: 1px solid rgba(255, 255, 255, 0.15);
  pointer-events: none;
}

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .nav { gap: 22px; }
  .team { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cells { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-grid { grid-template-columns: minmax(0, 1fr); }
  .article-grid aside { display: none; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards > :last-child { grid-column: span 2; }
  .cards > :last-child .card-figure { aspect-ratio: 32 / 9; }
  .mini { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mini > :last-child { grid-column: span 2; }
  .family { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) 28px; }
  .family .dl { display: none; }
  .footer-top { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  :root { --header-h: 60px; }
  .menu-btn { display: block; }
  .nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    display: none; flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 22px; background: var(--paper); border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -24px rgba(22, 19, 27, 0.25);
  }
  .site-header[data-on="night"] .nav { background: var(--night); border-bottom-color: var(--night-line); }
  .nav.open { display: flex; }
  .nav a { padding: 13px 0; font-size: 17px; border-top: 1px solid var(--line); }
  .site-header[data-on="night"] .nav a { border-top-color: var(--night-line); }
  .nav a:first-child { border-top: 0; }
  .nav .btn { margin-top: 12px; height: 46px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-top: 40px; gap: 0; }
  .hero-art { order: -1; justify-self: center; width: min(78vw, 360px); margin: 0 0 8px; }
  .hero-news { grid-template-columns: minmax(0, 1fr); }
  .hero-news a, .hero-news a + a { padding: 18px 0; border-right: 0; border-bottom: 1px solid var(--night-line); }
  .hero-news a:last-child { border-bottom: 0; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .cards > :last-child { grid-column: auto; }
  .cards > :last-child .card-figure { aspect-ratio: 16 / 10; }
  .feature, .feature.flip { grid-template-columns: minmax(0, 1fr); }
  .feature.flip .feature-copy { order: 0; }
  .mini { grid-template-columns: minmax(0, 1fr); }
  .mini > :last-child { grid-column: auto; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .night .stat:nth-child(n+3) { border-top-color: var(--night-line); }
  .family { grid-template-columns: minmax(0, 1fr) 24px; gap: 14px; }
  .family > div:nth-child(2) { grid-column: 1; grid-row: 2; }
  .family .go { grid-column: 2; grid-row: 1 / span 2; }
  .principles, .principles.four { grid-template-columns: minmax(0, 1fr); }
  .principles:not(.four) .principle + .principle, .principles.four .principle:nth-child(2n) { padding-left: 0; border-left: 0; }
  .principle { padding: 28px 0 14px; border-bottom: 1px solid var(--line); }
  .principles.four .principle { padding: 28px 0; }
  .update { grid-template-columns: minmax(0, 1fr) 24px; gap: 6px 14px; }
  .update .d, .update .k { grid-column: 1; }
  .update .d { order: 1; } .update .k { display: none; }
  .update .t-wrap { grid-column: 1; order: 2; }
  .update .go { grid-column: 2; grid-row: 1 / span 2; order: 3; align-self: center; }
  .ctas { grid-template-columns: minmax(0, 1fr); }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 36px; }
  .pub { grid-template-columns: minmax(0, 1fr); }
  .row { grid-template-columns: minmax(0, 1fr) 24px; gap: 8px 14px; }
  .row > div:nth-child(2) { grid-column: 1; }
  .row .go { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .split { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .split > .side .tag { position: static; }
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .team { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
  .cells, .steps, .form .row2 { grid-template-columns: minmax(0, 1fr); }
  .richtext { font-size: 17px; }
  .contact-grid > div:not(:nth-child(3n+1)) { padding-left: 0; border-left: 0; }
}
@media (max-width: 520px) {
  body { font-size: 16.5px; }
  .field { flex-direction: column; }
  .btn-row .btn { flex: 1 1 auto; }
  .stat b { font-size: 40px; }
  .mtable th:nth-child(3), .mtable td:nth-child(3) { display: none; }
}

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