/* The one stylesheet for the public site (ii export-site) and the live playground.
   Same language as the viewer (docs/DESIGN.md): Newsreader 400 for things you read,
   Geist 400/500 for things you use, five sizes, warm paper. Ember marks where a
   feature fires, cobalt marks steering, green only on a verified tick.
   One header, one button, one card, one code block. Do not add a sixth size,
   a third font or a second button style; reuse what is here. */

@font-face { font-family: Geist; src: url("fonts/geist-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Geist; src: url("fonts/geist-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: Newsreader; src: url("fonts/newsreader.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

:root {
  --paper: #faf9f5;
  --sheet: #ffffff;
  --well: #f0eee6;
  --plate: #1f1e1b;
  --ink: #141413;
  --ink-2: #5e5d59;
  --ink-3: #8f8d86;
  --line: #e8e6dc;
  --line-2: #d6d3c7;
  --signal: #e8582a;
  --signal-wash: #fbe6dc;
  --steer: #3a5bd9;
  --steer-wash: #e8ecfb;
  --real: #2f6b4b;
  --real-wash: #e3efe7;
  --fail: #a33a2a;

  --serif: Newsreader, "Iowan Old Style", Georgia, serif;
  --sans: Geist, ui-sans-serif, system-ui, sans-serif;
  --serif-track: -0.012em;

  --t-small: 13px;
  --t-body: 16px;
  --t-lead: 21px;
  --t-head: 30px;
  --t-display: 52px;

  --radius: 14px;
  --radius-sm: 8px;
  --gutter: 40px;
  color-scheme: light;
}
@media (max-width: 860px) {
  :root { --t-lead: 19px; --t-head: 26px; --t-display: 38px; --gutter: 16px; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
a:hover { text-decoration-color: var(--ink); }
button, input { font: inherit; color: inherit; }
code { font: inherit; background: var(--well); padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere; }
:focus-visible { outline: 2px solid var(--steer); outline-offset: 2px; }
[hidden] { display: none !important; }

h1, h2, h3, .lede { font-family: var(--serif); font-weight: 400; letter-spacing: var(--serif-track); }
h1 { font-size: var(--t-display); line-height: 1.08; margin: 0 0 20px; }
h2 { font-size: var(--t-head); line-height: 1.15; margin: 0 0 8px; }
h3 { font-size: var(--t-lead); line-height: 1.25; margin: 28px 0 8px; }
.lede { font-size: var(--t-lead); line-height: 1.45; color: var(--ink-2); margin: 0; }
.meta { font-size: var(--t-small); color: var(--ink-3); }
.meta a { color: inherit; text-decoration: none; }
.meta a:hover { color: var(--ink); }

/* ------------------------------------------------------------ header */
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--gutter);
}
.mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 500; white-space: nowrap; }
.site-nav { display: flex; gap: 22px; margin-left: auto; font-size: var(--t-small); }
.site-nav a { color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; }
@media (max-width: 560px) {
  .bar { flex-wrap: wrap; }
  .site-nav { margin-left: 0; width: 100%; gap: 18px; }
}

/* ------------------------------------------------------------ buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 20px; border-radius: 999px; border: 1px solid var(--ink);
  background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 500;
  cursor: pointer;
}
.button:hover { background: #2c2b28; }
.button-quiet { background: transparent; color: var(--ink); border-color: var(--line-2); }
.button-quiet:hover { background: var(--well); border-color: var(--ink); }

/* ------------------------------------------------------------ prose pages */
.prose { max-width: 880px; margin: 0 auto; padding: 40px var(--gutter) 96px; }
.prose > h2, .prose section > h2, .post h2 { margin-top: 64px; }
.prose p, .prose li { color: var(--ink-2); }
.prose p { margin: 0 0 16px; max-width: 68ch; }
.prose .lede { margin-bottom: 32px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.hero { padding: 24px 0 8px; }
.hero h1 { max-width: 16ch; }


/* A two-up block: words on the left, code on the right. */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; margin-top: 72px; padding-top: 40px; border-top: 1px solid var(--line); }
.split h2 { margin-top: 0; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }

/* The one code block. */
.code {
  margin: 12px 0 16px; padding: 16px 18px;
  background: var(--plate); color: var(--paper);
  border-radius: var(--radius); overflow-x: auto; font-size: var(--t-small); line-height: 1.6;
}
.code code { background: none; padding: 0; color: inherit; overflow-wrap: normal; white-space: pre; }

/* The one card: a link to a page, hairline border, no lift. */
.card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--sheet); text-decoration: none;
}
.card:hover { border-color: var(--ink); }
.card-title { font-family: var(--serif); font-size: var(--t-lead); letter-spacing: var(--serif-track); line-height: 1.3; color: var(--ink); }
.card-text { color: var(--ink-2); }

/* Command list on the your-model page. */
.commands { list-style: none; margin: 0 0 16px; padding: 0; max-width: 68ch; }
.commands li { display: grid; grid-template-columns: 8em 1fr; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.commands li:last-child { border-bottom: 1px solid var(--line); }
.commands li > code { justify-self: start; align-self: start; }
@media (max-width: 560px) { .commands li { grid-template-columns: 1fr; gap: 4px; } }

/* Blog post. */
.post h1 { font-size: var(--t-head); line-height: 1.15; max-width: 24ch; }
@media (min-width: 861px) { .post h1 { font-size: 40px; } }
.post ol, .post ul { padding-left: 22px; max-width: 68ch; }
.post li { margin: 0 0 8px; }
.appendix { margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line); }
.appendix summary { cursor: pointer; font-weight: 500; color: var(--ink); }
.appendix[open] summary { margin-bottom: 16px; }
.appendix p { font-size: var(--t-small); }
.appendix h2 { font-size: var(--t-lead); margin-top: 24px; }
.score-table { width: 100%; border-collapse: collapse; font-size: var(--t-small); margin: 8px 0 24px; display: block; overflow-x: auto; }
.score-table th, .score-table td { text-align: left; padding: 6px 12px 6px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.score-table th { color: var(--ink-3); font-weight: 400; }
.score-table td { color: var(--ink-2); }

.foot { max-width: 880px; margin: 0 auto; padding: 0 var(--gutter) 48px; font-size: var(--t-small); color: var(--ink-3); }
.foot p { margin: 0; padding-top: 24px; border-top: 1px solid var(--line); }

/* ------------------------------------------------------------ home */
.prose-wide { max-width: 1160px; }
.hero-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px; align-items: center; }
.hero-split h1 { max-width: 13ch; }
.hero-split .lede { margin-bottom: 28px; }
@media (max-width: 860px) { .hero-split { grid-template-columns: 1fr; gap: 28px; } }
/* The stage: dark ground for video and where a feature fires. */
.stage { margin: 0; background: var(--plate); border-radius: var(--radius); padding: 10px; display: grid; gap: 10px; }
.stage video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-sm); background: #000; }
.tiles { display: flex; gap: 4px; }
.tile { width: 44px; height: 44px; border-radius: 6px; background-repeat: no-repeat; background-color: #000; }
/* The home picture's answer: the playground's answer card (static/drop.js) on the dark stage. */
.hero-flip { padding: 4px 6px 6px; }
.hero-flip .cap, .hero-flip .drop-hint-line, .hero-flip .dw small { color: var(--ink-3); }
.hero-flip .dw { color: #a9a69c; }
.hero-flip .dw:first-child { color: var(--paper); }
.hero-flip .dw.t { color: var(--signal); }
.hero-flip .cloud { min-height: 112px; }
.hero-flip .token { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.16); color: #c9c6bc; }
.hero-flip .token:hover { border-color: rgba(255, 255, 255, 0.42); color: var(--paper); }
.hero-flip .token.on { border-color: var(--paper); box-shadow: inset 0 0 0 1px var(--paper); color: var(--paper); }
.hero-flip .token.now.on { border-color: var(--signal); box-shadow: inset 0 0 0 1px var(--signal); color: var(--signal); }
.hero-flip .face .crop { box-shadow: 0 0 0 2px var(--plate); }
[data-testid="hero-picture"] { position: relative; display: block; border-radius: var(--radius-sm); }
.crops { display: flex; gap: 3px; }
.crop { position: relative; width: 30px; height: 30px; border-radius: 4px; overflow: hidden; background: #000; flex: none; }
.crop img { position: absolute; max-width: none; height: auto; }

/* ------------------------------------------------------------ answer card (static/drop.js) */
/* What the model sees, as words sized by how likely it says each, and two features to drop onto
   the picture. Words glide between answers; the found feature is ember, the random one ink. */
.drop { display: grid; gap: 12px; user-select: none; -webkit-user-select: none; }
.token img { -webkit-user-drag: none; }
.drop .cap { margin: 0; }
.drop .cloud { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 14px; min-height: 104px; align-content: flex-start; }
.dw { font-family: var(--serif); font-weight: 400; line-height: 1.1; letter-spacing: var(--serif-track); color: var(--ink-3); white-space: nowrap; transform-origin: 0 75%; transition: color 0.4s ease; }
.dw:first-child { color: var(--ink); }
.dw.t { color: var(--signal); }
.dw small { font-family: var(--sans); font-size: var(--t-small); letter-spacing: 0; color: var(--ink-3); margin-left: 6px; font-variant-numeric: tabular-nums; }
.tokens { display: flex; flex-wrap: wrap; gap: 8px; }
.tokens:empty { min-height: 38px; } /* the features' place, kept until there are some, so nothing below moves */
.token {
  display: inline-flex; align-items: center; gap: 10px; padding: 5px 14px 5px 6px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--sheet); color: var(--ink-2); font: inherit; font-size: var(--t-small);
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.token:hover { border-color: var(--ink-3); color: var(--ink); }
.token:active { transform: scale(0.98); }
.token.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); color: var(--ink); }
.token.now.on { border-color: var(--signal); box-shadow: inset 0 0 0 1px var(--signal); color: var(--signal); }
.face { display: inline-flex; flex: none; }
.face .previews, .face .crops { display: flex; gap: 0; }
.face .previews canvas, .face .crop { width: 26px; height: 26px; border-radius: 6px; box-shadow: 0 0 0 2px var(--sheet); display: block; }
.face .previews canvas + canvas, .face .crop + .crop { margin-left: -9px; }
.drop-hint-line { margin: -4px 0 0; font-size: var(--t-small); color: var(--ink-3); transition: opacity 0.4s ease; }
.drop-hint-line.gone { opacity: 0; }
.drop-ghost { position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none; filter: drop-shadow(0 10px 18px rgba(20, 20, 19, 0.28)); }
.drop-ghost .face .previews canvas, .drop-ghost .face .crop { width: 40px; height: 40px; border-radius: 8px; }
.drop-ghost .face .previews canvas + canvas, .drop-ghost .face .crop + .crop { margin-left: -14px; }
body.feature-drag, body.feature-drag * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }
.drop-over { box-shadow: 0 0 0 3px var(--signal); }
.drop-stamp {
  position: absolute; left: 12px; bottom: 12px; z-index: 3; display: flex; padding: 6px; border: 0; border-radius: 12px;
  background: rgba(20, 20, 19, 0.5); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); cursor: pointer;
  animation: drop-in 0.5s cubic-bezier(.22, .9, .3, 1);
}
.drop-stamp .face .previews canvas { position: static; inset: auto; }
.drop-stamp .face .previews canvas, .drop-stamp .face .crop { width: 34px; height: 34px; border-radius: 7px; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9); }
.drop-stamp .face .previews canvas + canvas, .drop-stamp .face .crop + .crop { margin-left: -12px; }
.drop-stamp.now { box-shadow: inset 0 0 0 2px var(--signal); }
@keyframes drop-in { from { opacity: 0; transform: translateY(-16px) scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .drop-stamp { animation: none; } .token, .dw { transition: none; } }

/* ------------------------------------------------------------ explore */
.id { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.8em; color: var(--ink-3); font-weight: 400; letter-spacing: 0; }
.evidence { display: inline-flex; gap: 4px; align-items: center; }
.dot, .mark-pass, .mark-fail, .mark-pending { width: 8px; height: 8px; border-radius: 50%; display: inline-block; box-sizing: border-box; }
.dot-pass, .mark-pass { background: var(--real); }
.dot-fail, .mark-fail { border: 1.5px solid var(--line-2); }
.dot-pending, .mark-pending { border: 1.5px dashed var(--ink-3); }
.lead { display: grid; gap: 12px; margin: 40px 0 40px; text-decoration: none; }
.lead .moments { margin: 0; }
.lead-name { display: flex; align-items: baseline; gap: 16px; font-size: var(--t-lead); }
.lead-name .row-name { flex: 1; }
.lead:hover .row-name { text-decoration: underline; }
.rows { list-style: none; padding: 0; margin: 0 0 16px; border-top: 1px solid var(--line); }
.rows a { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.rows a:hover .row-name { text-decoration: underline; }
.row-name { color: var(--ink); }
.plain { padding-left: 20px; max-width: 68ch; }
.plain li { margin-bottom: 6px; }
.plain b, .checks b { color: var(--ink); font-weight: 500; }
.fine { font-size: var(--t-small); color: var(--ink-3) !important; margin-top: 48px !important; }
.back { font-size: var(--t-small); margin: 0 0 12px !important; }
.back a { color: var(--ink-3); text-decoration: none; }
.back a::before { content: "\2190  "; }
.moments { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.moments .tile { width: auto; height: auto; aspect-ratio: 1; }
@media (max-width: 560px) { .moments { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.prose h2 + .checks { margin-top: 12px; }
.checks { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 12px; max-width: 68ch; }
.check { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.check > span:last-child { display: flex; flex-wrap: wrap; column-gap: 10px; }
.check > span:last-child > span { color: var(--ink-2); }
.stage-picture { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius-sm); }
