/* Shared by WorldTrainer and CommonGain. The Lab look: warm paper, ink, and one red
   for a checker's no. The field is a captioned figure, not a backdrop. */
:root {
  --sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --paper: #fbfaf7;
  --fig: #f3f0e9;
  --ink: #17150f;
  --ink-2: #48443c;
  --ink-3: #6f6a60;
  --rule: #e3ded4;
  --rule-2: #cdc6b8;
  --no: #c63d27;
  --no-soft: #fbe9e5;
  --pass: #2f7a4f;
  --pass-soft: #e5f1e9;
  --gain: #8f6f22;
  --gain-soft: #f5ecd6;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
html, body { margin: 0; background: var(--paper); color: var(--ink); }
body { font-family: var(--sans); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
code, .mono { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 80px); }

/* Header */
.top { border-bottom: 1px solid var(--rule); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 72px; }
.word { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; letter-spacing: -0.01em; text-decoration: none; }
.word i { width: 9px; height: 9px; border-radius: 50%; background: var(--no); }
.nav { display: flex; gap: 32px; font-size: 15px; color: var(--ink-2); }
.nav a { text-decoration: none; }
.nav a:hover { color: var(--ink); }
.nav a.key { color: var(--ink); border-bottom: 1px solid var(--ink); }

/* Hero: the claim on the left, Figure 1 on the right */
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(40px, 6vw, 88px); align-items: center;
  padding-top: clamp(56px, 9vh, 112px); padding-bottom: clamp(64px, 10vh, 120px);
}
h1 { margin: 0; font-weight: 500; font-size: clamp(42px, 5.2vw, 76px); line-height: 1.03; letter-spacing: -0.035em; text-wrap: balance; }
.dek { margin: 28px 0 0; font-size: clamp(18px, 1.4vw, 21px); line-height: 1.55; color: var(--ink-2); max-width: 30em; }
.acts { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 36px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 20px; border-radius: 4px;
  background: var(--ink); color: var(--paper); font-size: 16px; font-weight: 500; text-decoration: none; transition: background 160ms ease;
}
.btn:hover { background: #000; }
.link { font-size: 16px; text-decoration: none; border-bottom: 1px solid var(--ink); padding-bottom: 2px; }
.status { margin: 32px 0 0; font-size: 14px; color: var(--ink-3); }
.status b { font-weight: 500; color: var(--ink); }

/* Figures, each labelled as simulation or real data */
figure { margin: 0; }
.frame { position: relative; overflow: hidden; background: var(--fig); border: 1px solid var(--rule); border-radius: 4px; }
.frame.field { aspect-ratio: 4 / 3; }
.frame.field canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
figcaption { margin-top: 12px; font-size: 14px; line-height: 1.55; color: var(--ink-2); max-width: 46em; }
figcaption b { font-weight: 600; color: var(--ink); }
.kind { font-family: var(--mono); font-size: 12px; padding: 1px 6px; border-radius: 3px; margin-right: 6px; white-space: nowrap; }
.kind.sim { background: var(--gain-soft); color: #6b5317; }
.kind.real { background: var(--pass-soft); color: var(--pass); }

/* Entrance: one short fade, then stillness */
.rise { opacity: 0; transform: translateY(10px); animation: rise 300ms cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.rise.d2 { animation-delay: 80ms; } .rise.d3 { animation-delay: 160ms; } .rise.d4 { animation-delay: 240ms; }
@keyframes rise { to { opacity: 1; transform: none; } }
.still .rise { opacity: 1; transform: none; animation: none; }
@media (prefers-reduced-motion: reduce) { .rise { transform: none; } }

/* The no behind a red mark: hidden until someone points at one */
.no-tip { position: absolute; left: 0; top: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity 0.5s ease; }
.no-tip.on { opacity: 1; transition-duration: 0.15s; }
.no-tip i { position: absolute; width: var(--r, 16px); height: var(--r, 16px); left: calc(var(--r, 16px) / -2); top: calc(var(--r, 16px) / -2); border-radius: 50%; border: 1.5px solid var(--no); }
.no-tip b, .no-tip span { position: absolute; left: 16px; font-family: var(--mono); font-weight: 400; background: rgba(243, 240, 233, 0.94); padding: 1px 5px; border-radius: 2px; }
.no-tip b { top: -30px; white-space: nowrap; font-size: 12px; color: var(--ink); }
.no-tip span { top: -10px; width: max-content; max-width: min(520px, 60vw); font-size: 12.5px; line-height: 1.45; color: var(--no); }
.no-tip.left b, .no-tip.left span { left: auto; right: 16px; text-align: right; }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); padding-top: 48px; padding-bottom: 64px; }
  .nav a:not(.key) { display: none; }
}
