/* =================================================================
   bds421 — physics.bds421.com
   "Applied AI for the Unification of Physics"
   Light house shell. Tokens + fonts come from ../shared/tokens.css.
   Self-contained on purpose: this file must resolve identically at
   bds421.com/physics/ (path) and physics.bds421.com/ (subdomain),
   so it does NOT depend on the main site's website/styles.css.
   ================================================================= */

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--fg-1);
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---- Nav ------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  background: rgba(245, 246, 248, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: var(--bw-1) solid var(--line);
  z-index: 110;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 0;
  font-family: 'JetBrains Mono', 'IBM Plex Mono', 'SFMono-Regular', Menlo, monospace;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.04em;
  text-decoration: none;
  color: var(--fg-1);
  background-image: none;
}
.brand:hover { text-decoration: none; background-image: none; }
.brand .n { color: var(--accent); }
.brand .sep {
  font-family: var(--font-mono);
  font-weight: var(--fw-medium);
  font-size: 14px;
  color: var(--fg-4);
  margin: 0 8px;
}
.brand .tag {
  font-family: var(--font-mono);
  font-weight: var(--fw-medium);
  font-size: 14px;
  color: var(--fg-2);
  display: inline-block;
  min-width: 9ch;
  text-transform: lowercase;
}
#brand-tag::after {
  content: "█";
  margin-left: 1px;
  color: var(--accent);
  animation: tagblink 1.1s steps(1) infinite;
  font-weight: var(--fw-regular);
}
@keyframes tagblink {
  0%, 50%   { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--fg-2);
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}
/* Link back to the main site — pill, styled like the homepage lang toggle */
.home-link {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--fg-3);
  border: var(--bw-1) solid var(--line);
  border-radius: var(--r-pill);
  padding: 5px 12px;
  text-decoration: none;
  background-image: none;
  transition: color var(--dur-micro) var(--ease), border-color var(--dur-micro) var(--ease);
}
.home-link:hover { color: var(--ink); border-color: var(--line-strong); background-image: none; }

/* ---- Mobile menu ----------------------------------------------- */
.nav-toggle {
  display: none;
  width: 36px; height: 36px;
  background: transparent; border: 0; padding: 0;
  cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--ink);
  transform-origin: center;
  transition: transform 220ms var(--ease), opacity 150ms var(--ease);
}
body.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu { position: fixed; inset: 0; z-index: 100; pointer-events: none; }
.mobile-menu-backdrop {
  position: absolute; inset: 0;
  background: rgba(10, 10, 10, 0.45);
  opacity: 0; pointer-events: none;
  transition: opacity 280ms var(--ease);
}
.mobile-menu-inner {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(420px, 100vw);
  background: var(--ink); color: var(--paper);
  padding: 96px 32px 32px;
  display: flex; flex-direction: column; overflow-y: auto;
  transform: translateX(100%);
  transition: transform 280ms var(--ease);
  pointer-events: auto;
}
body.menu-open .mobile-menu { pointer-events: auto; }
body.menu-open .mobile-menu-backdrop { opacity: 1; pointer-events: auto; }
body.menu-open .mobile-menu-inner { transform: translateX(0); }
body.menu-open { overflow: hidden; }
.mobile-menu ul {
  list-style: none; padding: 0; margin: 0 0 auto;
  display: flex; flex-direction: column; gap: 4px;
}
.mobile-menu a {
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 32px; font-weight: var(--fw-semi);
  letter-spacing: -0.02em; text-decoration: none;
  padding: 10px 0; display: block; background-image: none;
  transition: color var(--dur-micro) var(--ease);
}
.mobile-menu a:hover { color: var(--accent); text-decoration: none; }
.mobile-menu-foot {
  padding-top: 32px;
  border-top: var(--bw-1) solid #24272B;
  display: flex; flex-direction: column; gap: 20px; align-items: flex-start;
}
.mobile-menu-meta {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--fg-5); letter-spacing: 0.08em;
}

/* ---- Buttons --------------------------------------------------- */
.btn {
  font-family: var(--font-sans);
  font-weight: var(--fw-medium);
  font-size: 14px;
  padding: 9px 16px;
  border-radius: var(--r-1);
  border: var(--bw-1) solid transparent;
  cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 10px; line-height: 1;
  position: relative; background-image: none;
  transition: background 140ms var(--ease), border-color 140ms var(--ease),
              color 140ms var(--ease), box-shadow 140ms var(--ease),
              transform 140ms var(--ease);
}
.btn, .btn:hover { text-decoration: none; background-image: none; }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: var(--ink); color: var(--paper);
  border-color: var(--ink); box-shadow: 3px 3px 0 var(--accent);
}
.btn.primary:hover {
  background: var(--accent); border-color: var(--accent);
  box-shadow: 0 0 0 var(--accent); transform: translate(3px, 3px); color: var(--paper);
}
.btn.primary:active { transform: translate(3px, 4px); }
.btn.secondary {
  background: transparent; color: var(--fg-1);
  border-color: var(--line-strong);
  font-family: var(--font-mono); font-size: 12px; font-weight: var(--fw-medium);
}
.btn.secondary:hover {
  border-color: var(--ink); background: var(--paper);
  box-shadow: inset 0 -2px 0 var(--accent);
}
.btn:focus-visible { outline: var(--bw-2) solid var(--accent); outline-offset: 2px; }

/* ---- Hero ------------------------------------------------------ */
.hero {
  padding: 96px 0 64px;
  border-bottom: var(--bw-1) solid var(--line);
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  color: var(--fg-3);
  letter-spacing: var(--tr-eyebrow);
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(28px, 7vw, 80px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  font-weight: var(--fw-bold);
  margin: 0 0 24px;
  max-width: 16ch;
  overflow-wrap: break-word;
}
.hero h1 .n { color: var(--accent); }
.hero p {
  font-size: 20px; color: var(--fg-2);
  max-width: 60ch; line-height: 1.4; margin: 0 0 40px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-meta {
  display: flex; gap: 0;
  margin-top: 64px; padding-top: 32px;
  border-top: var(--bw-1) solid var(--line);
  font-family: var(--font-mono); font-size: var(--fs-xs);
  color: var(--fg-3); letter-spacing: 0.04em; flex-wrap: wrap;
}
.hero-meta span + span::before { content: " · "; color: var(--fg-4); white-space: pre; }

/* ---- Sections -------------------------------------------------- */
.section { padding: 60px 0; border-bottom: var(--bw-1) solid var(--line); }
.section.alt { background: var(--paper-soft); }
.section h2 {
  font-size: 44px; line-height: 1.05; letter-spacing: -0.02em;
  font-weight: var(--fw-semi); margin: 0 0 14px; max-width: 22ch;
}
.section .lede {
  font-size: 18px; color: var(--fg-2); max-width: 64ch; margin: 0 0 28px;
}
.section .lede strong { color: var(--fg-1); font-weight: var(--fw-semi); }

/* ---- Idea grid ------------------------------------------------- */
.idea-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: var(--bw-1) solid var(--ink);
  border-top: var(--bw-2) solid var(--accent);
  background: var(--paper);
}
.idea-cell {
  padding: 24px 22px 22px;
  border-right: var(--bw-1) solid var(--line);
  display: flex; flex-direction: column; gap: 8px;
}
.idea-cell:last-child { border-right: 0; }
.idea-cell .i-sym {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: var(--fw-bold);
  color: var(--accent); letter-spacing: 0.14em; text-transform: uppercase;
}
.idea-cell h3 {
  font-family: var(--font-display);
  font-size: 18px; font-weight: var(--fw-semi);
  letter-spacing: -0.01em; line-height: 1.2; margin: 0;
}
.idea-cell p { font-size: 13px; color: var(--fg-2); line-height: 1.55; margin: 0; }
.idea-cell .mono { font-family: var(--font-mono); color: var(--accent-2); font-size: 12px; }

/* ---- Chat mock ("Ask the graph") ------------------------------- */
.chat {
  border: var(--bw-1) solid var(--ink);
  background: var(--paper);
  max-width: 760px;
}
.chat-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  background: var(--ink); color: var(--paper);
}
.chat-title {
  font-family: var(--font-mono); font-size: 13px;
  font-weight: var(--fw-medium); letter-spacing: 0.02em;
}
.chat-title::before { content: "▌ "; color: var(--accent); }
.chat-status {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-5);
  border: var(--bw-1) solid #3A3F45; border-radius: var(--r-pill);
  padding: 3px 9px;
}
.chat-log {
  padding: 20px 18px;
  display: flex; flex-direction: column; gap: 16px;
  min-height: 120px;
}
.msg { display: flex; flex-direction: column; gap: 6px; max-width: 92%; }
.msg.user { align-self: flex-end; align-items: flex-end; }
.msg.bot  { align-self: flex-start; }
.msg-role {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-3);
}
.msg-body {
  font-size: 14px; line-height: 1.55; color: var(--fg-1);
  padding: 12px 14px; border-radius: var(--r-2);
}
.msg.user .msg-body { background: var(--accent-soft); border: var(--bw-1) solid var(--accent); }
.msg.bot .msg-body  { background: var(--paper-soft); border: var(--bw-1) solid var(--line); }
.msg-body ol, .msg-body ul { margin: 6px 0 0; padding-left: 18px; }
.msg-body li { margin: 3px 0; }
.provenance {
  display: flex; flex-wrap: wrap; gap: 8px 14px;
  margin-top: 4px; align-self: flex-start;
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-3);
}
.provenance .src::before { content: "source: "; color: var(--fg-4); }
.provenance .derived {
  color: var(--accent-2);
  border: var(--bw-1) dashed var(--accent-2);
  padding: 1px 7px; border-radius: var(--r-pill);
}
.typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--fg-4);
  animation: blink 1.2s infinite both;
}
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }

.chat-suggest {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 0 18px 16px;
}
.chip {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--accent-ink);
  background: var(--paper-sunk);
  border: var(--bw-1) solid var(--line-strong);
  border-radius: var(--r-pill);
  padding: 7px 13px; cursor: pointer; line-height: 1.3;
  transition: background var(--dur-micro) var(--ease), border-color var(--dur-micro) var(--ease), color var(--dur-micro) var(--ease);
}
.chip:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
.chip:focus-visible { outline: var(--bw-2) solid var(--accent); outline-offset: 2px; }
.chip[disabled] { opacity: 0.45; cursor: default; }

.chat-input {
  display: flex; gap: 0;
  border-top: var(--bw-1) solid var(--line);
}
.chat-input input {
  flex: 1; border: 0; background: transparent;
  padding: 14px 18px; font-family: var(--font-sans); font-size: 14px;
  color: var(--fg-1);
}
.chat-input input::placeholder { color: var(--fg-4); }
.chat-input input:disabled { cursor: not-allowed; }
.chat-input .send {
  border: 0; border-left: var(--bw-1) solid var(--line);
  background: transparent; color: var(--fg-4);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 0 20px; cursor: not-allowed;
}
.chat-note {
  font-size: 13px; color: var(--fg-3); line-height: 1.55;
  margin: 18px 0 0; max-width: 64ch;
}
.chat-note strong { color: var(--fg-2); font-weight: var(--fw-medium); }

/* ---- Examples archive ------------------------------------------ */
.archive {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.ex-card {
  display: flex; flex-direction: column;
  border: var(--bw-1) solid var(--ink);
  background: var(--paper);
  text-decoration: none; background-image: none;
  color: var(--fg-1);
  overflow: hidden;
  transition: box-shadow 160ms var(--ease), transform 160ms var(--ease);
}
a.ex-card:hover { text-decoration: none; background-image: none; box-shadow: var(--shadow-card); transform: translateY(-2px); }
.ex-thumb {
  height: 132px; position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse 80% 70% at 50% 0%, rgba(92,242,160,0.10), transparent 60%),
    linear-gradient(180deg, #070d12, #04080b);
  border-bottom: var(--bw-1) solid var(--ink);
}
.ex-thumb::before {
  /* phosphor baseline + two "photon" dots, echoing the demo */
  content: "";
  position: absolute; left: 8%; right: 8%; top: 58%;
  border-top: 1px dashed rgba(92,242,160,0.35);
}
.ex-thumb::after {
  content: "";
  position: absolute; top: calc(58% - 4px); left: 70%;
  width: 7px; height: 7px; border-radius: 50%;
  background: #5cf2a0; box-shadow: -120px 9px 0 #ffb13b, 0 0 12px #5cf2a0;
}
.ex-scopelabel {
  position: absolute; top: 10px; left: 12px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em;
  text-transform: uppercase; color: #2f7d57;
}
.ex-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.ex-meta {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 12px;
}
.ex-date { color: var(--accent); font-weight: var(--fw-bold); }
.ex-tag { color: var(--fg-4); }
.ex-card h3 {
  font-family: var(--font-display);
  font-size: 22px; font-weight: var(--fw-semi);
  letter-spacing: -0.015em; line-height: 1.18; margin: 0 0 10px;
}
.ex-card p { font-size: 14px; color: var(--fg-2); line-height: 1.55; margin: 0 0 18px; }
.ex-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: auto; padding-top: 14px;
  border-top: var(--bw-1) dashed var(--line);
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); letter-spacing: 0.04em;
}
.ex-go { color: var(--accent); font-weight: var(--fw-bold); }
.ex-card.ex-next {
  border-style: dashed; border-color: var(--line-strong); background: transparent;
}
.ex-card.ex-next .ex-thumb {
  background: var(--paper-soft); border-bottom: var(--bw-1) dashed var(--line-strong);
}
.ex-card.ex-next .ex-thumb::before,
.ex-card.ex-next .ex-thumb::after { content: none; }
.ex-card.ex-next h3 { color: var(--fg-3); }
.ex-next-mark {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--fg-4);
}

/* =================================================================
   Physics demo — light bds421 instrument (replaces the dark CRT look)
   ================================================================= */
.demo {
  border: var(--bw-1) solid var(--ink);
  border-top: var(--bw-2) solid var(--accent);
  background: var(--paper);
  margin-top: 8px;
}
.demo-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 16px; flex-wrap: wrap;
  padding: 14px 20px; border-bottom: var(--bw-1) solid var(--line);
}
.demo-cap {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--fg-3);
}
.demo-body { padding: 20px; }
.demo-instruction { font-size: 14px; color: var(--fg-2); line-height: 1.55; margin: 0 0 18px; max-width: 72ch; }
.k-amber { color: var(--warning); font-weight: var(--fw-semi); }
.k-green { color: var(--success); font-weight: var(--fw-semi); }

.scope {
  border: var(--bw-1) solid var(--line); border-radius: var(--r-1);
  background: var(--paper-sunk); overflow: hidden;
}
.scope canvas { display: block; width: 100%; height: auto; }

.controls { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 18px; }
.slider-block { flex: 1 1 300px; min-width: 240px; }
.slider-block label {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--fg-3); margin-bottom: 12px;
}
.slider-block label b { color: var(--accent); font-weight: var(--fw-bold); }
.slider-block input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 3px;
  background: var(--line-strong); border-radius: 3px; outline: none;
}
.slider-block input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--accent); cursor: pointer; box-shadow: var(--shadow-card);
}
.slider-block input[type=range]::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--accent); cursor: pointer;
}
.demo-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.demo-step { font-size: 13.5px; color: var(--fg-2); line-height: 1.5; margin: 16px 0 0; min-height: 3em; }
.demo-step b { color: var(--accent); font-weight: var(--fw-semi); }

/* ---- "Before the experiment": three setup timesteps ------------- */
.pre-steps {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border: var(--bw-1) solid var(--ink); border-top: var(--bw-2) solid var(--accent);
  background: var(--paper);
}
.pre-step { padding: 24px 24px 26px; border-right: var(--bw-1) solid var(--line); position: relative; }
.pre-step:last-child { border-right: 0; }
.pre-step:not(:last-child)::after {
  content: "→"; position: absolute; right: -10px; top: 24px; z-index: 1;
  width: 20px; height: 20px; display: flex; align-items: center; justify-content: center;
  background: var(--paper); color: var(--fg-4); font-size: 14px;
}
.pre-n { font-family: var(--font-mono); font-size: 11px; font-weight: var(--fw-bold); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.pre-step h3 { font-family: var(--font-display); font-size: 18px; font-weight: var(--fw-semi); letter-spacing: -0.01em; margin: 8px 0 8px; color: var(--fg-1); }
.pre-step p { font-size: 14px; color: var(--fg-2); line-height: 1.55; margin: 0; }
@media (max-width: 720px) {
  .pre-steps { grid-template-columns: 1fr; }
  .pre-step { border-right: 0; border-bottom: var(--bw-1) solid var(--line); }
  .pre-step:last-child { border-bottom: 0; }
  .pre-step:not(:last-child)::after { content: "↓"; right: auto; left: 26px; top: auto; bottom: -10px; }
}

/* ---- Horizontal timeline (x = time): stages then the two arrivals -- */
.tlx-lead { font-size: 18px; color: var(--fg-2); line-height: 1.5; max-width: 60ch; margin: 0 0 8px; }
.tlx-lead b { color: var(--fg-1); font-weight: var(--fw-semi); }
.tlx { margin: 0; }
.tlx-axis { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-3); margin: 0 0 6px; }
.tlx-track {
  position: relative; height: 3px; background: var(--line-strong); border-radius: 2px;
  margin: 54px 14px 78px;
}
.tlx-track::after { /* arrow at the detector end */
  content: ""; position: absolute; right: -1px; top: -4px;
  border-left: 9px solid var(--line-strong); border-top: 6px solid transparent; border-bottom: 6px solid transparent;
}
/* the "setup" zone (pion + decay) sits left of the clock; a divider marks t=0 */
.tlx-clock0 { position: absolute; top: -30px; bottom: -30px; width: 0; border-left: var(--bw-1) dashed var(--accent); }
.tlx-clock0::after { content: "clock starts"; position: absolute; top: -16px; left: 6px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); white-space: nowrap; }
.tlx-gap {
  position: absolute; top: -3px; height: 9px;
  background: repeating-linear-gradient(45deg, var(--warning-soft), var(--warning-soft) 5px, transparent 5px, transparent 10px);
  border-left: var(--bw-1) dashed var(--warning); border-right: var(--bw-1) dashed var(--warning);
}
.tlx-m { position: absolute; top: 50%; transform: translateY(-50%); }
.tlx-m .dot { display: block; width: 13px; height: 13px; border-radius: 50%; margin-left: -6.5px; border: 2px solid var(--paper); background: var(--accent); }
.tlx-m.last .dot { box-shadow: 0 0 0 4px var(--accent-soft); }
/* every event label sits ABOVE the track; first is left-aligned, last right-aligned */
.tlx-m .lb { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); text-align: center; font-family: var(--font-mono); font-size: 11px; line-height: 1.3; white-space: nowrap; color: var(--fg-3); }
.tlx-m .lb b { display: block; font-size: 10.5px; font-weight: var(--fw-bold); letter-spacing: 0.03em; color: var(--fg-2); margin-top: 1px; }
.tlx-m.first .lb { left: 0; transform: none; text-align: left; }
.tlx-m.last .lb  { left: auto; right: 0; transform: none; text-align: right; }
.tlx-m.last .lb b { color: var(--accent); }
/* a labelled time interval BELOW the track: a small bracket plus a caption */
.tlx-span { position: absolute; top: 16px; text-align: center; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.04em; color: var(--fg-4); }
.tlx-span b { display: block; font-size: 10.5px; font-weight: var(--fw-bold); color: var(--fg-3); margin-top: 2px; }
.tlx-span::before { content: ""; position: absolute; left: 5px; right: 5px; top: -9px; height: 5px; border: 1px solid var(--line-strong); border-bottom: 0; }
.tlx-span.flight { color: var(--accent-ink); }
.tlx-span.flight b { color: var(--accent); }
.tlx-span.flight::before { border-color: var(--accent); opacity: 0.45; }

/* ---- Show-details (native <details>, no JS, CSP-safe) ------------- */
.more { border-top: var(--bw-1) solid var(--line); }
.more + .more { border-top: 0; }
.more > summary {
  cursor: pointer; list-style: none;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em;
  color: var(--accent); padding: 16px 0; display: flex; align-items: center; gap: 10px;
}
.more > summary::-webkit-details-marker { display: none; }
.more > summary::before {
  content: "+"; display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border: var(--bw-1) solid var(--accent); border-radius: 50%;
  font-size: 13px; line-height: 1;
}
.more[open] > summary::before { content: "\2212"; }
.more > summary:hover { color: var(--accent-ink); }
.more-body { padding: 2px 0 22px; }
.more-body p { font-size: 15px; color: var(--fg-2); line-height: 1.6; max-width: 68ch; margin: 0 0 12px; }
.more-body p:last-child { margin-bottom: 0; }
.more-body strong { color: var(--fg-1); font-weight: var(--fw-semi); }

/* compact figures table inside details */
.figs { display: grid; grid-template-columns: 1fr 1fr 1fr; border: var(--bw-1) solid var(--line); margin: 4px 0 14px; }
.figs > div { padding: 14px 16px; border-right: var(--bw-1) solid var(--line); }
.figs > div:last-child { border-right: 0; }
.figs dt { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 6px; }
.figs dd { margin: 0; font-size: 14px; color: var(--fg-1); line-height: 1.4; }
.figs .big-c { font-family: var(--font-display); font-size: 24px; font-weight: var(--fw-semi); letter-spacing: -0.01em; }

@media (max-width: 640px) {
  .tlx-track { margin: 52px 6px 82px; }
  .tlx-m .lb { font-size: 10.5px; }
  .figs { grid-template-columns: 1fr; }
  .figs > div { border-right: 0; border-bottom: var(--bw-1) solid var(--line); }
  .figs > div:last-child { border-bottom: 0; }
}

/* ---- Experiment page (light chrome) ---------------------------- */
.exp-head { padding: 44px 0 28px; border-bottom: var(--bw-1) solid var(--line); }
.exp-head .eyebrow { margin-bottom: 16px; }
.exp-title {
  font-family: var(--font-display);
  font-size: 44px; line-height: 1.04; letter-spacing: -0.025em;
  font-weight: var(--fw-bold); color: var(--fg-1); margin: 0 0 16px; max-width: 20ch;
}
.exp-title .n { color: var(--accent); }
.exp-intro { font-size: 17px; color: var(--fg-2); line-height: 1.5; max-width: 64ch; margin: 0; }
.exp-cta {
  background: var(--paper-soft);
  border-bottom: var(--bw-1) solid var(--line);
  padding: 36px 0;
}
.exp-cta .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.exp-cta p { font-size: 18px; color: var(--fg-1); max-width: 52ch; margin: 0; }
@media (max-width: 640px) {
  .exp-title { font-size: 32px; }
  .exp-head { padding: 40px 0 28px; }
}

/* ---- Footer ---------------------------------------------------- */
.footer { background: var(--ink); color: var(--fg-5); padding: 64px 0 48px; }
.foot-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; margin-bottom: 48px;
}
.foot-brand .brand { color: var(--paper); }
.foot-brand .brand .sep, .foot-brand .brand .tag { color: var(--fg-5); }
.foot-brand p { font-size: 13px; color: var(--fg-5); margin: 16px 0 0; line-height: 1.55; max-width: 36ch; }
.foot-col h3 {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--paper); margin: 0 0 16px; font-weight: var(--fw-bold);
}
.foot-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.foot-col a { color: var(--paper); font-size: 14px; text-decoration: none; background-image: none; transition: color var(--dur-micro) var(--ease); }
.foot-col a:hover { color: var(--accent); background-image: none; }
.foot-rule {
  border-top: var(--bw-1) solid #24272B; padding-top: 24px;
  display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-5);
  letter-spacing: 0.04em; flex-wrap: wrap; gap: 16px;
}

/* ---- Responsive ------------------------------------------------ */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-right > .home-link { display: none; }
  .section h2 { font-size: 36px; }
  .idea-grid { grid-template-columns: repeat(2, 1fr); }
  .idea-cell:nth-child(2n) { border-right: 0; }
  .idea-cell:nth-child(-n+2) { border-bottom: var(--bw-1) solid var(--line); }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .hero { padding: 44px 0 32px; }
  .section { padding: 44px 0; }
  .idea-grid { grid-template-columns: 1fr; }
  .idea-cell { border-right: 0; border-bottom: var(--bw-1) solid var(--line); }
  .idea-cell:last-child { border-bottom: 0; }
  .archive { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ---- Motion preference ----------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  #brand-tag::after { animation: none; opacity: 1; }
}

/* =================================================================
   Example explainers — light, plain-language sections that sit below
   a dark .lab demo to make it legible for non-physicists.
   ================================================================= */
.explain { padding: 72px 0; border-bottom: var(--bw-1) solid var(--line); }
.explain.alt { background: var(--paper-soft); }
.explain .eyebrow { margin-bottom: 16px; }
.explain-h {
  font-family: var(--font-display);
  font-size: 34px; line-height: 1.08; letter-spacing: -0.02em;
  font-weight: var(--fw-semi); color: var(--fg-1); margin: 0 0 16px; max-width: 24ch;
}
.explain-lede { font-size: 17px; color: var(--fg-2); line-height: 1.55; max-width: 66ch; margin: 0 0 32px; }
.explain p { font-size: 16px; color: var(--fg-2); line-height: 1.6; max-width: 68ch; margin: 0; }
.explain p + p { margin-top: 14px; }
.explain strong { color: var(--fg-1); font-weight: var(--fw-semi); }

/* numbered steps */
.steps { list-style: none; padding: 0; margin: 0; max-width: 74ch; }
.steps li {
  display: grid; grid-template-columns: 40px 1fr; gap: 20px;
  padding: 22px 0; border-top: var(--bw-1) solid var(--line);
}
.steps li:first-child { border-top: 0; }
.step-n {
  font-family: var(--font-mono); font-weight: var(--fw-bold); font-size: 14px;
  color: var(--accent); width: 36px; height: 36px;
  border: var(--bw-1) solid var(--accent); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.steps h3 { font-family: var(--font-display); font-size: 18px; font-weight: var(--fw-semi); letter-spacing: -0.01em; margin: 5px 0 6px; color: var(--fg-1); }
.steps p { font-size: 15px; }

/* exact timeline ("the race") */
.race-axis { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-3); margin: 0 0 4px; }
.race-track {
  position: relative; height: 4px; background: var(--line-strong);
  border-radius: 2px; margin: 76px 14px 112px;
}
.race-track::after { /* arrowhead at the detector end */
  content: ""; position: absolute; right: -1px; top: -4px;
  border-left: 9px solid var(--line-strong); border-top: 6px solid transparent; border-bottom: 6px solid transparent;
}
.race-gap {
  position: absolute; top: -3px; height: 10px;
  background: repeating-linear-gradient(45deg, var(--warning-soft), var(--warning-soft) 5px, transparent 5px, transparent 10px);
  border-left: var(--bw-1) dashed var(--warning); border-right: var(--bw-1) dashed var(--warning);
}
.race-marker { position: absolute; top: 50%; transform: translateY(-50%); }
.race-marker .dot { display: block; width: 16px; height: 16px; border-radius: 50%; margin-left: -8px; border: 2px solid var(--paper); }
.race-marker.decay .dot { background: var(--fg-2); }
.race-marker.ballistic .dot { background: var(--warning); box-shadow: 0 0 0 4px var(--warning-soft); }
.race-marker.measured .dot { background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); }
.race-marker .race-lab { position: absolute; font-family: var(--font-mono); font-size: 12px; line-height: 1.35; white-space: nowrap; color: var(--fg-2); }
.race-marker .race-lab b { display: block; font-size: 11px; font-weight: var(--fw-bold); letter-spacing: 0.04em; }
.race-marker.decay .race-lab { bottom: 24px; left: -3px; }
.race-marker.decay .race-lab b { color: var(--fg-3); }
.race-marker.measured .race-lab { bottom: 24px; right: -3px; text-align: right; }
.race-marker.measured .race-lab b { color: var(--success); }
.race-marker.ballistic .race-lab { top: 24px; left: 50%; transform: translateX(-50%); text-align: center; }
.race-marker.ballistic .race-lab b { color: var(--warning); }
.race-note { font-size: 15px; color: var(--fg-2); line-height: 1.6; max-width: 66ch; margin: 8px 0 0; }
.race-note b { color: var(--fg-1); font-weight: var(--fw-semi); }

/* two-theory contrast */
.theory-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: var(--bw-1) solid var(--ink); margin: 28px 0 24px; }
.theory { padding: 24px 26px; background: var(--paper); }
.theory.ball { border-right: var(--bw-1) solid var(--line); }
.theory .t-tag { font-family: var(--font-mono); font-size: 11px; font-weight: var(--fw-bold); letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 10px; }
.theory.ball .t-tag { color: var(--warning); }
.theory.rel .t-tag { color: var(--success); }
.theory.wave .t-tag { color: var(--accent); }
.theory-grid.three { grid-template-columns: repeat(3, 1fr); }
.theory-grid.three .theory { border-right: var(--bw-1) solid var(--line); }
.theory-grid.three .theory:last-child { border-right: 0; }
@media (max-width: 860px) {
  .theory-grid.three { grid-template-columns: 1fr; }
  .theory-grid.three .theory { border-right: 0; border-bottom: var(--bw-1) solid var(--line); }
  .theory-grid.three .theory:last-child { border-bottom: 0; }
}
.theory h3 { font-family: var(--font-display); font-size: 20px; font-weight: var(--fw-semi); letter-spacing: -0.01em; margin: 0 0 8px; color: var(--fg-1); }
.theory p { font-size: 14px; line-height: 1.55; color: var(--fg-2); margin: 0; }
.theory .t-eq { font-family: var(--font-mono); font-size: 14px; color: var(--fg-1); margin: 12px 0 0; padding-top: 12px; border-top: var(--bw-1) dashed var(--line); }
.explain-foot { font-size: 17px; color: var(--fg-1); line-height: 1.55; max-width: 66ch; margin: 8px 0 0; font-weight: var(--fw-medium); }

@media (max-width: 640px) {
  .explain { padding: 56px 0; }
  .explain-h { font-size: 26px; }
  .steps li { grid-template-columns: 32px 1fr; gap: 14px; }
  .step-n { width: 30px; height: 30px; font-size: 13px; }
  .race-track { margin: 68px 6px 116px; }
  .race-marker .race-lab { font-size: 11px; }
  .theory-grid { grid-template-columns: 1fr; }
  .theory.ball { border-right: 0; border-bottom: var(--bw-1) solid var(--line); }
}

/* =================================================================
   Language switcher (EN | DE), same look as the main site's .lang
   ================================================================= */
.lang {
  display: flex;
  border: var(--bw-1) solid var(--line);
  border-radius: var(--r-pill);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 11px;
}
.lang a {
  padding: 4px 10px;
  color: var(--fg-3);
  text-decoration: none;
  background-image: none;
  transition: background var(--dur-micro) var(--ease), color var(--dur-micro) var(--ease);
}
.lang a:hover { color: var(--ink); background-image: none; text-decoration: none; }
.lang a.active { background: var(--ink); color: var(--paper); }
.lang a.active:hover { color: var(--paper); }
/* inside the dark mobile menu */
.mobile-menu .lang { border-color: #3A3F45; }
.mobile-menu .lang a {
  font-family: var(--font-mono); font-size: 12px; font-weight: var(--fw-medium);
  letter-spacing: 0.04em; padding: 6px 14px; color: var(--fg-5);
}
.mobile-menu .lang a.active { background: var(--paper); color: var(--ink); }
@media (max-width: 960px) { .nav-right > .lang { display: none; } }

/* =================================================================
   Example #02 (momentum): formula, two stacked demos, live readouts
   ================================================================= */
.formula {
  display: inline-flex; flex-direction: column; gap: 4px;
  border: var(--bw-1) solid var(--ink); border-left: var(--bw-2) solid var(--accent);
  background: var(--paper); padding: 12px 20px; margin: 0 0 22px;
}
.formula span { font-family: var(--font-display); font-size: 30px; font-weight: var(--fw-semi); letter-spacing: -0.01em; color: var(--fg-1); }
.formula small { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--fg-3); }
.fig-note { font-size: 13px; color: var(--fg-3); line-height: 1.5; max-width: 72ch; margin: 0 0 14px; }

/* timeline with two stacked brackets + one label raised on phones */
.tlx-span.low { top: 50px; }
.tlx-crash .tlx-track { margin-bottom: 104px; }
@media (max-width: 640px) {
  .tlx-crash .tlx-track { margin-top: 88px; margin-bottom: 108px; }
  .tlx-m.up .lb { bottom: 50px; }
}

/* cradle per-ball table */
.mtable { margin-top: 12px; font-family: var(--font-mono); font-size: 12px; border: var(--bw-1) solid var(--line); }
.mrow { display: grid; grid-template-columns: minmax(84px, 1.4fr) repeat(6, minmax(0, 1fr)); }
.mrow > * { padding: 5px 8px; text-align: right; border-right: var(--bw-1) solid var(--line); overflow: hidden; }
.mrow > *:first-child { text-align: left; color: var(--fg-3); }
.mrow > *:last-child { border-right: 0; color: var(--accent); background: var(--paper-soft); }
.mrow + .mrow { border-top: var(--bw-1) solid var(--line); }
.mhead { color: var(--fg-3); font-size: 10.5px; letter-spacing: 0.08em; }
/* toggles: checkbox pills + segmented radio */
.toggles { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.tog { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 12px; color: var(--fg-2); cursor: pointer; }
.tog input { accent-color: var(--accent); width: 15px; height: 15px; margin: 0; }
.seg { display: inline-flex; border: var(--bw-1) solid var(--line-strong); border-radius: var(--r-pill); overflow: hidden; }
.seg label { position: relative; font-family: var(--font-mono); font-size: 12px; color: var(--fg-2); padding: 6px 12px; cursor: pointer; border-right: var(--bw-1) solid var(--line); }
.seg label:last-child { border-right: 0; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg label:has(input:checked) { background: var(--ink); color: var(--paper); }
.seg label:has(input:focus-visible) { outline: var(--bw-2) solid var(--accent); outline-offset: -2px; }
.btn[aria-pressed="true"] { border-color: var(--ink); background: var(--paper); box-shadow: inset 0 -2px 0 var(--accent); }

/* ---- #02 stages: the canvases are the hero ---------------------- */
.stage { margin-top: 26px; }
.stage-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 16px; flex-wrap: wrap; margin-bottom: 10px; }
.stage-title { font-family: var(--font-display); font-size: 22px; font-weight: var(--fw-semi); letter-spacing: -0.01em; margin: 0; color: var(--fg-1); }
.stage-hint { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.stage-cv { display: block; width: 100%; background: var(--paper); border-radius: 6px; box-shadow: 0 1px 0 var(--line), 0 8px 24px -18px rgba(10,10,10,0.35); touch-action: pan-y; }
.stage-cv + .stage-cv { margin-top: 10px; }
.stage-cv.graph { cursor: col-resize; }
#cv-cradle.grab { cursor: grab; }
#cv-cradle.grabbing { cursor: grabbing; }
.stage-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-top: 10px; font-family: var(--font-mono); font-size: 12px; color: var(--fg-2); }
.stage-bar b { color: var(--accent); font-weight: var(--fw-bold); }
.stage-tools { display: inline-flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-left: auto; }
.btn.sm { padding: 7px 12px; }
.stage .demo-step { min-height: 0; margin: 10px 0 0; }
.stage .more { margin-top: 10px; }
.speed-ctl { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 28px; margin-bottom: 12px; }
.speed-main { flex: 1 1 320px; display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 0 14px; }
.speed-main label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-3); }
.speed-main output { font-family: var(--font-display); font-size: 34px; font-weight: var(--fw-bold); letter-spacing: -0.02em; color: var(--fg-1); justify-self: end; }
.speed-main input { grid-column: 1 / -1; }
.speed-side { flex: 0 1 220px; }
.speed-side label { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 10px; }
.speed-side label b { color: var(--accent); }
.stage input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; background: var(--line-strong); border-radius: 4px; outline: none; margin: 12px 0; }
.stage input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--paper); border: 2px solid var(--accent); cursor: pointer; box-shadow: var(--shadow-card); }
.stage input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--paper); border: 2px solid var(--accent); cursor: pointer; }
.stage input.big-range { height: 6px; background: linear-gradient(90deg, var(--accent-soft), var(--accent-2-soft)); }
.stage input.big-range::-webkit-slider-thumb { width: 30px; height: 30px; border-width: 3px; }
.stage input.big-range::-moz-range-thumb { width: 26px; height: 26px; border-width: 3px; }
.lane-ctl { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 10px; }
.lane-pick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lane-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.lane-pick.b .lane-dot { background: var(--accent-2); }
.lane-name { font-family: var(--font-sans); font-size: 13px; font-weight: var(--fw-semi); color: var(--accent); }
.b > .lane-name, .lane-pick.b .lane-name { color: var(--accent-2); }
.lane-pick.b .seg label:has(input:checked) { background: var(--accent-2); }
.lane-pick.a .seg label:has(input:checked) { background: var(--accent); }
.seg label { padding: 7px 12px; }
.play-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 12px; }
.play-row .scrub { flex: 1 1 260px; margin: 0; }
.scrub label { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-3); }
.scrub label b { color: var(--ink); }
.scrub input[type=range] { margin: 8px 0 0; }
.lane-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 28px; margin-top: 16px; }
.lane-nums dl { display: flex; gap: 22px; margin: 4px 0 0; }
.lane-nums dt { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-3); }
.lane-nums dd { margin: 0; font-family: var(--font-display); font-size: 26px; font-weight: var(--fw-bold); letter-spacing: -0.02em; color: var(--accent); white-space: nowrap; }
.lane-nums .b dd { color: var(--accent-2); }
.alltab { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 12px; margin-bottom: 12px; }
.alltab th, .alltab td { text-align: right; padding: 6px 8px; border-bottom: var(--bw-1) solid var(--line); font-weight: var(--fw-regular); }
.alltab th[scope=row] { text-align: left; color: var(--fg-3); }
.alltab thead th { font-weight: var(--fw-semi); }
.alltab thead th.a { color: var(--accent); }
.alltab thead th.b { color: var(--accent-2); }
@media (max-width: 720px) {
  .mrow { grid-template-columns: 62px repeat(6, minmax(0, 1fr)); font-size: 11px; }
  .mrow > * { padding: 5px 4px; }
  .formula span { font-size: 24px; }
  .stage-tools { margin-left: 0; }
  .lane-nums { grid-template-columns: 1fr; }
  .lane-nums dd { font-size: 22px; }
  .speed-main output { font-size: 28px; }
  .alltab { font-size: 11px; }
  .alltab th, .alltab td { padding: 5px 4px; }
  .seg label { padding: 8px 10px; font-size: 11.5px; }
}

/* archive thumb for #02: a row of cradle balls */
.ex-thumb.t-cradle::before { left: 36%; right: 36%; top: 34%; border-top: 2px solid rgba(92,242,160,0.35); }
.ex-thumb.t-cradle::after {
  top: 62%; left: calc(50% - 6px); width: 12px; height: 12px;
  background: #5cf2a0;
  box-shadow: -13px 0 0 #2f7d57, -26px 0 0 #2f7d57, 13px 0 0 #2f7d57, 52px -16px 0 #ffb13b, 0 0 10px #5cf2a0;
}

/* ---- #02 learner layout: examples row, prediction, counter, gauge, event strip -- */
[hidden] { display: none !important; }
.plain { font-size: 17px; color: var(--fg-2); line-height: 1.55; max-width: 64ch; margin: 0 0 12px; }
.plain strong { color: var(--fg-1); font-weight: var(--fw-semi); }
.ex-row { display: grid; grid-template-columns: repeat(3, 1fr); border: var(--bw-1) solid var(--ink); border-top: var(--bw-2) solid var(--accent); background: var(--paper); margin: 0 0 18px; }
.ex-item { padding: 14px 18px; border-right: var(--bw-1) solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.ex-item:last-child { border-right: 0; }
.ex-what { font-family: var(--font-sans); font-size: 14px; font-weight: var(--fw-semi); color: var(--fg-1); }
.ex-calc { font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); }
.ex-item b { font-family: var(--font-display); font-size: 30px; font-weight: var(--fw-bold); letter-spacing: -0.02em; color: var(--accent); line-height: 1.1; margin-top: 4px; }
.ex-unit { font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); }
.predict { border: var(--bw-1) solid var(--accent); border-left: var(--bw-2) solid var(--accent); background: var(--accent-soft); padding: 12px 16px; margin: 0 0 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.predict p { margin: 0; font-size: 16px; color: var(--fg-1); font-weight: var(--fw-medium); flex: 1 1 320px; }
.pred-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.pred-btns .btn { min-width: 44px; justify-content: center; background: var(--paper); }
.feedback { font-size: 16px; color: var(--fg-1); margin: 0 0 12px; padding: 10px 14px; border-left: var(--bw-2) solid var(--success); background: var(--success-soft); }
.feedback b { color: var(--success); }
.counter { font-family: var(--font-display); font-size: 30px; font-weight: var(--fw-bold); letter-spacing: -0.02em; color: var(--accent); line-height: 1; }
.takeaway { list-style: none; padding: 0; margin: 18px 0 8px; max-width: 70ch; display: flex; flex-direction: column; gap: 8px; }
.takeaway li { font-size: 16px; color: var(--fg-2); line-height: 1.5; padding-left: 14px; border-left: var(--bw-2) solid var(--line-strong); }
.takeaway b { color: var(--fg-1); font-weight: var(--fw-semi); }
.formula.big { display: flex; margin-bottom: 14px; }
.formula .f-words { font-family: var(--font-sans); font-size: 18px; font-weight: var(--fw-semi); letter-spacing: 0; color: var(--fg-1); line-height: 1.35; max-width: 34ch; }
.formula .f-sym { font-family: var(--font-display); font-size: 34px; font-weight: var(--fw-bold); letter-spacing: -0.01em; color: var(--accent); margin-top: 4px; }
.gauge-row { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; margin-top: 10px; }
.gauge { display: flex; align-items: center; gap: 12px; flex: 1 1 320px; }
.gauge-l { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-3); white-space: nowrap; }
.gauge-bar { flex: 1; height: 10px; background: var(--line); border-radius: 5px; overflow: hidden; }
.gauge-fill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 60ms linear; }
.gauge b, .watch b { font-family: var(--font-display); font-size: 20px; font-weight: var(--fw-bold); letter-spacing: -0.01em; color: var(--fg-1); white-space: nowrap; }
.watch { display: flex; align-items: center; gap: 12px; }
.ev-strip { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px 0; font-family: var(--font-mono); font-size: 11px; color: var(--fg-4); }
.ev-strip li { position: relative; padding: 3px 10px 3px 12px; }
.ev-strip li::before { content: ""; position: absolute; left: 0; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--line-strong); }
.ev-strip li.on { color: var(--fg-1); }
.ev-strip li.on::before { background: var(--accent); }
.lane-nums .bigw { display: block; font-family: var(--font-display); font-size: 28px; font-weight: var(--fw-bold); letter-spacing: -0.02em; color: var(--accent); line-height: 1.1; margin-top: 2px; }
.lane-nums .b .bigw { color: var(--accent-2); }
.lane-nums .subw { font-family: var(--font-mono); font-size: 11.5px; color: var(--fg-3); }
#k-stage2 { margin-top: 14px; }
#k-pred2 { margin-top: 14px; }
#k-graph-wrap { margin-top: 12px; }
.know { margin: 0 0 18px; padding-left: 0; list-style: none; counter-reset: k; max-width: 62ch; }
.know li { counter-increment: k; font-size: 20px; line-height: 1.4; color: var(--fg-1); font-weight: var(--fw-medium); padding: 10px 0 10px 44px; position: relative; border-top: var(--bw-1) solid var(--line); }
.know li:first-child { border-top: 0; }
.know li::before { content: counter(k); position: absolute; left: 0; top: 10px; width: 28px; height: 28px; border-radius: 50%; border: var(--bw-1) solid var(--accent); color: var(--accent); font-family: var(--font-mono); font-size: 13px; font-weight: var(--fw-bold); display: flex; align-items: center; justify-content: center; }
@media (max-width: 720px) {
  .ex-row { grid-template-columns: 1fr; }
  .ex-item { border-right: 0; border-bottom: var(--bw-1) solid var(--line); flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 10px 14px; }
  .ex-item:last-child { border-bottom: 0; }
  .ex-item b { font-size: 24px; margin-left: auto; margin-top: 0; }
  .ex-what { flex: 0 0 100%; }
  .formula .f-sym { font-size: 28px; }
  .counter { font-size: 24px; }
  .know li { font-size: 17px; }
  .gauge b, .watch b { font-size: 17px; }
}

/* cradle counter: hidden until the first hit fills it */
.counter:empty { display: none; }
