/* ===================================================================
   COIN benchmark site — dark, technical, precise.
   =================================================================== */
:root {
  --bg: #080b11;
  --bg-1: #0d121b;
  --bg-2: #111826;
  --bg-3: #16202f;
  --border: #202b3d;
  --border-2: #2c3a51;
  --text: #e8eef6;
  --muted: #93a1b5;
  --muted-2: #6b7a90;
  --accent: #34d399; /* emerald — "reach" */
  --accent-d: #0e8a63;
  --accent-2: #38bdf8; /* cyan */
  --gold: #f6c445;
  --danger: #f87171;
  --radius: 14px;
  --radius-s: 9px;
  --mono: ui-monospace, "JetBrains Mono", "SF Mono", "Cascadia Code", Menlo, monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --maxw: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
code, pre { font-family: var(--mono); }
img { max-width: 100%; display: block; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 820px; }
.center { text-align: center; }

/* ---------------- nav ---------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(8, 11, 17, 0.72);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, background 0.25s;
}
.nav.scrolled { border-bottom-color: var(--border); }
.nav-inner { display: flex; align-items: center; gap: 20px; height: 62px; }
.brand { font-weight: 800; font-size: 1.15rem; letter-spacing: 0.04em; display: flex; align-items: center; gap: 9px; }
.brand-mark { color: var(--accent); font-size: 0.95em; }
.nav-links { display: flex; gap: 26px; margin-left: 14px; flex: 1; }
.nav-links a { color: var(--muted); font-size: 0.92rem; font-weight: 500; transition: color 0.18s; }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; gap: 10px; }
.nav-burger { display: none; background: none; border: 0; color: var(--text); font-size: 1.3rem; cursor: pointer; }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px; font-size: 0.9rem; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; transition: all 0.18s ease; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #04140d; box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5); }
.btn-primary:hover { background: #4ee6ad; transform: translateY(-1px); box-shadow: 0 8px 26px -10px rgba(52, 211, 153, 0.7); }
.btn-outline { border-color: var(--border-2); color: var(--text); background: rgba(255, 255, 255, 0.02); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost { color: var(--muted); padding: 7px 12px; }
.btn-ghost:hover { color: var(--text); }
.btn-ic { width: 16px; height: 16px; flex: none; }
.btn-ic-emoji { font-size: 1.02rem; line-height: 1; flex: none; }

/* ---------------- hero ---------------- */
.hero { position: relative; padding: 92px 0 72px; overflow: hidden; border-bottom: 1px solid var(--border); }
.hero-grid {
  position: absolute; inset: -2px 0 auto 0; height: 620px;
  background-image:
    radial-gradient(60% 60% at 50% 0%, rgba(52, 211, 153, 0.14), transparent 70%),
    linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: auto, 46px 46px, 46px 46px;
  -webkit-mask-image: radial-gradient(70% 80% at 50% 0%, #000 40%, transparent 100%);
  mask-image: radial-gradient(70% 80% at 50% 0%, #000 40%, transparent 100%);
}
.hero-inner { position: relative; text-align: center; }
.eyebrow {
  display: inline-block; font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent); border: 1px solid var(--border-2);
  border-radius: 999px; padding: 6px 14px; background: rgba(52, 211, 153, 0.06); margin-bottom: 26px;
}
.title {
  font-size: clamp(4.5rem, 15vw, 9rem); font-weight: 850; letter-spacing: -0.04em; margin: 0;
  background: linear-gradient(180deg, #fff 30%, #9fb3c8 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.subtitle { font-size: clamp(1.3rem, 3.4vw, 2rem); font-weight: 650; margin: 6px 0 0; letter-spacing: -0.02em; }
.subtitle .accent { color: var(--accent); }
.lede { max-width: 680px; margin: 26px auto 0; color: var(--muted); font-size: 1.08rem; }
.lede em { color: var(--text); font-style: normal; font-weight: 600; }

.stat-row {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 60px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-1); padding: 8px;
}
/* stat band relocated into the (alt/bg-1) construction section — lift to bg-2 so it reads as a panel */
.stat-row.section-stats { margin: 4px 0 8px; background: var(--bg-2); }
.stat { padding: 18px 10px; text-align: center; border-radius: var(--radius-s); }
.stat-num { font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 800; letter-spacing: -0.03em; color: var(--text); }
.stat-num span { color: var(--accent); }
.stat-lbl { font-size: 0.8rem; color: var(--muted-2); margin-top: 2px; letter-spacing: 0.01em; }

/* ---------------- abstract band ---------------- */
.band { padding: 64px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-1); }
.abstract { font-size: 1.16rem; color: var(--muted); margin: 0; }
.abstract strong { color: var(--text); font-weight: 650; }

/* ---------------- sections ---------------- */
.section { padding: 92px 0; }
.section.alt { background: var(--bg-1); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.sec-head { max-width: 780px; margin-bottom: 48px; }
.kicker {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); font-weight: 600;
}
.sec-head h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); font-weight: 800; margin: 14px 0 0; }
.sec-sub { color: var(--muted); font-size: 1.06rem; margin: 16px 0 0; }
.sec-sub code, .abstract code { color: var(--accent-2); background: rgba(56, 189, 248, 0.08); padding: 1px 6px; border-radius: 5px; font-size: 0.9em; }
.hint { color: var(--muted-2); font-size: 0.9rem; }

.card { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); }

/* ---------------- task ---------------- */
.task-cols { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 28px; align-items: start; }
.task-example { overflow: hidden; }
.card-head {
  display: flex; align-items: center; gap: 9px; padding: 13px 18px; border-bottom: 1px solid var(--border);
  font-family: var(--mono); font-size: 0.82rem; color: var(--muted); letter-spacing: 0.05em; text-transform: uppercase;
}
.card-head .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 10px var(--danger); }
.code { margin: 0; padding: 22px; font-size: 0.86rem; line-height: 1.75; color: #c7d3e2; overflow-x: auto; }
.c-key { color: var(--accent); }
.c-dim { color: var(--muted-2); }
.c-num { color: var(--gold); }
.c-tag { color: var(--muted-2); font-weight: 700; }
.c-tag.on { color: var(--accent); }
.task-why { display: flex; flex-direction: column; gap: 18px; }
.why h3 { font-size: 1.08rem; display: flex; align-items: center; gap: 10px; }
.why-ic { font-size: 1.1rem; }
.why p { color: var(--muted); margin: 8px 0 0; font-size: 0.98rem; }
.why em { color: var(--text); font-style: normal; }

/* ---------------- figures ---------------- */
.figure { margin: 0; }
.figure.wide { margin: 0 auto 44px; }
.figure img {
  width: 100%; border-radius: var(--radius); background: #fff; padding: 18px; border: 1px solid var(--border);
}
.figure.card img { border: 0; border-radius: var(--radius) var(--radius) 0 0; }
figcaption { color: var(--muted-2); font-size: 0.9rem; margin-top: 12px; padding: 0 4px 14px; }
.figure.card figcaption { padding: 14px 18px; margin-top: 0; }

/* ---------------- signals ---------------- */
.sig-block { margin-bottom: 26px; }
.sig-block-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; color: var(--muted); font-size: 0.9rem; }
.sig-group-tag { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; padding: 4px 11px; border-radius: 999px; }
.sig-group-tag.cov { color: var(--accent); background: rgba(52, 211, 153, 0.1); border: 1px solid rgba(52, 211, 153, 0.3); }
.sig-group-tag.fro { color: var(--gold); background: rgba(246, 196, 69, 0.1); border: 1px solid rgba(246, 196, 69, 0.3); }
.signal-grid { display: grid; gap: 18px; }
.signal-grid.three { grid-template-columns: repeat(3, 1fr); }
.signal-grid.two { grid-template-columns: repeat(2, 1fr); }
.signal { padding: 24px; position: relative; overflow: hidden; }
.sig-letter {
  font-family: var(--mono); font-size: 2rem; font-weight: 800; color: var(--accent);
  width: 52px; height: 52px; display: grid; place-items: center; border-radius: 12px;
  background: rgba(52, 211, 153, 0.08); border: 1px solid rgba(52, 211, 153, 0.25); margin-bottom: 16px;
}
.signal-grid.two .sig-letter { color: var(--gold); background: rgba(246, 196, 69, 0.08); border-color: rgba(246, 196, 69, 0.25); }
.signal h3 { font-size: 1.05rem; }
.signal p { color: var(--muted); font-size: 0.94rem; margin: 8px 0 0; }
.families { margin-top: 34px; }

.families { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }
.fam { padding: 24px; }
.fam-tag { display: inline-block; font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 11px; border-radius: 999px; font-weight: 700; margin-bottom: 14px; }
.fam-tag.frontier { color: var(--gold); background: rgba(246, 196, 69, 0.1); border: 1px solid rgba(246, 196, 69, 0.3); }
.fam-tag.gcs { color: var(--accent-2); background: rgba(56, 189, 248, 0.1); border: 1px solid rgba(56, 189, 248, 0.3); }
.fam h3 { font-size: 1.08rem; }
.fam p { color: var(--muted); font-size: 0.95rem; margin: 10px 0 0; }
.fam code { color: var(--text); background: var(--bg-3); padding: 2px 7px; border-radius: 5px; font-size: 0.86em; }
.funnel { padding: 24px; display: flex; flex-direction: column; justify-content: center; background: linear-gradient(135deg, var(--bg-2), var(--bg-3)); }
.funnel-num { font-family: var(--mono); font-size: 1.5rem; font-weight: 800; color: var(--accent); letter-spacing: -0.02em; }
.funnel p { color: var(--muted); font-size: 0.94rem; margin: 10px 0 0; }
.funnel strong { color: var(--gold); }

/* ---------------- leaderboard ---------------- */
.lead-callouts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 30px; }
.callout { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: center; }
.callout b { display: block; font-size: 1.9rem; font-weight: 800; color: var(--accent); letter-spacing: -0.02em; }
.callout span { color: var(--muted); font-size: 0.86rem; }
.callout em { color: var(--text); font-style: normal; font-weight: 600; }

.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2); }
table.lead { width: 100%; border-collapse: collapse; min-width: 720px; }
.lead thead th {
  position: sticky; top: 0; text-align: right; font-size: 0.78rem; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.05em; padding: 15px 16px; background: var(--bg-3);
  border-bottom: 1px solid var(--border-2); cursor: pointer; user-select: none; white-space: nowrap;
}
.lead thead th.txt { text-align: left; }
.lead thead th:hover { color: var(--text); }
.lead thead th.sorted { color: var(--accent); }
.lead thead th.sorted::after { content: " ↓"; }
.lead thead th.asc.sorted::after { content: " ↑"; }
.lead tbody td { padding: 15px 16px; text-align: right; font-size: 0.94rem; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.lead tbody td.txt { text-align: left; }
.lead tbody tr:last-child td { border-bottom: 0; }
.lead tbody tr { transition: background 0.15s; }
.lead tbody tr:hover { background: rgba(52, 211, 153, 0.04); }
.rank { font-family: var(--mono); color: var(--muted-2); font-weight: 700; }
.rank.medal-1 { color: var(--gold); }
.rank.medal-2 { color: #cbd5e1; }
.rank.medal-3 { color: #d9a066; }
.m-name { font-weight: 650; color: var(--text); }
.m-fam { display: block; font-size: 0.78rem; color: var(--muted-2); }
.reach-cell { font-weight: 800; color: var(--accent); font-size: 1.02rem; }
.bar { position: relative; }
.bar i { position: absolute; left: 16px; bottom: 6px; height: 3px; background: var(--accent); border-radius: 2px; opacity: 0.55; }
.scaffold-tag { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }
.tbl-note { color: var(--muted-2); font-size: 0.86rem; margin-top: 16px; }

/* ---------------- findings ---------------- */
.find-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.find { padding: 26px; }
.find.span2 { grid-column: span 2; }
.figure.span2 { grid-column: span 2; }
.find h3 { font-size: 1.2rem; }
.find p { color: var(--muted); margin: 12px 0 0; font-size: 0.98rem; }
.find strong { color: var(--accent); font-weight: 700; }
.mini-bars { margin-top: 20px; display: flex; flex-direction: column; gap: 12px; }
.mb { display: grid; grid-template-columns: 78px 1fr 52px; align-items: center; gap: 12px; }
.mb-l { font-size: 0.85rem; color: var(--muted); }
.mb-track { height: 10px; background: var(--bg-3); border-radius: 6px; overflow: hidden; }
.mb-track i { display: block; height: 100%; background: var(--muted-2); border-radius: 6px; }
.mb-track i.hi { background: linear-gradient(90deg, var(--accent-d), var(--accent)); }
.mb-v { font-family: var(--mono); font-size: 0.85rem; color: var(--text); text-align: right; }

.tracks { margin-top: 42px; }
.tracks-title { font-size: 1.2rem; margin-bottom: 18px; }
.track-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.track { padding: 22px; }
.track b { color: var(--accent); font-size: 1.02rem; }
.track-kind { display: inline-block; margin-left: 8px; font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2); border: 1px solid var(--border-2); border-radius: 999px; padding: 2px 8px; vertical-align: middle; }
.track p { color: var(--muted); font-size: 0.94rem; margin: 8px 0 0; }
.track code { color: var(--text); background: var(--bg-3); padding: 1px 6px; border-radius: 5px; font-size: 0.86em; }

/* ---------------- live ---------------- */
.live-band { background: radial-gradient(80% 120% at 50% 0%, rgba(52, 211, 153, 0.08), transparent 70%), var(--bg-1); border-top: 1px solid var(--border); }
.live-copy { color: var(--muted); font-size: 1.1rem; max-width: 680px; margin: 20px auto 0; }

/* ---------------- copy button (shared: run-it panels) ---------------- */
.copy-btn {
  position: absolute; top: 12px; right: 12px; background: var(--bg-3); color: var(--muted); border: 1px solid var(--border-2);
  border-radius: 8px; padding: 6px 13px; font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: all 0.15s;
}
.copy-btn:hover { color: var(--accent); border-color: var(--accent); }
.copy-btn.done { color: var(--accent); }

/* ---------------- footer ---------------- */
.footer { border-top: 1px solid var(--border); padding: 50px 0 28px; background: var(--bg-1); }
.footer-inner { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.foot-brand { font-weight: 800; font-size: 1.1rem; display: flex; flex-direction: column; }
.foot-brand p { font-weight: 400; font-size: 0.92rem; color: var(--muted); margin: 10px 0 0; max-width: 320px; }
.foot-links { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.foot-links a { color: var(--muted); font-size: 0.94rem; transition: color 0.15s; }
.foot-links a:hover { color: var(--accent); }
.foot-fine { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--border); color: var(--muted-2); font-size: 0.84rem; }
.foot-fine a { color: var(--muted); }
.foot-fine a:hover { color: var(--accent); }

/* ---------------- reveal animation ---------------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------------- responsive ---------------- */
@media (max-width: 900px) {
  .nav-links, .nav-cta .btn-ghost { display: none; }
  .nav-burger { display: block; }
  .nav.open .nav-links { display: flex; position: absolute; top: 62px; left: 0; right: 0; flex-direction: column; background: var(--bg-1); border-bottom: 1px solid var(--border); padding: 14px 24px; gap: 16px; }
  .stat-row { grid-template-columns: repeat(3, 1fr); }
  .task-cols { grid-template-columns: 1fr; }
  .signal-grid.three, .signal-grid.two { grid-template-columns: repeat(2, 1fr); }
  .families { grid-template-columns: 1fr; }
  .lead-callouts { grid-template-columns: repeat(2, 1fr); }
  .find-grid { grid-template-columns: 1fr; }
  .find.span2, .figure.span2 { grid-column: span 1; }
  .track-row { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .signal-grid.three, .signal-grid.two, .lead-callouts { grid-template-columns: 1fr; }
  .section { padding: 66px 0; }
  .wrap { padding: 0 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ===================================================================
   Upgrades: byline/thesis · ladder · results matrix · trace · run-it
   =================================================================== */

/* ---- hero thesis ---- */
.thesis { max-width: 720px; margin: 26px auto 0; font-size: 1.18rem; color: var(--text); font-weight: 500; line-height: 1.55; }
.thesis em { color: var(--accent); font-style: normal; font-weight: 700; }
.thesis-hi { color: var(--gold); font-weight: 800; font-variant-numeric: tabular-nums; }
.coin-mark { font-family: var(--mono); font-weight: 600; color: var(--muted); white-space: nowrap; }
.coin-mark b { color: var(--accent); font-weight: 800; }

/* ---- positioning: forward vs backward ---- */
.ladder-sec { padding: 78px 0; }
.center-sub { margin-left: auto; margin-right: auto; }
.fb-grid { margin: 44px 0 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 18px; }
.fb-panel { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 22px; }
.fb-panel.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 14px 40px -22px rgba(52, 211, 153, 0.6); background: linear-gradient(160deg, rgba(52, 211, 153, 0.07), var(--bg-2)); }
.fb-tag { display: inline-block; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-2); border: 1px solid var(--border-2); border-radius: 999px; padding: 3px 10px; margin-bottom: 14px; }
.fb-panel.on .fb-tag { color: var(--accent); border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.06); }
.fb-panel b { display: block; font-size: 1.12rem; letter-spacing: -0.01em; }
.fb-panel span { display: block; color: var(--muted); font-size: 0.93rem; margin-top: 8px; }
.fb-arrow { display: flex; align-items: center; justify-content: center; position: relative; min-width: 34px; }
.fb-arrow::before { content: "→"; font-family: var(--mono); font-size: 1.5rem; color: var(--accent); }
.fb-arrow span { position: absolute; top: calc(50% + 20px); left: 50%; transform: translateX(-50%); white-space: nowrap; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-2); }
.fb-note { margin: 24px 0 0; text-align: center; color: var(--muted); font-size: 0.97rem; max-width: 760px; margin-left: auto; margin-right: auto; }
.fb-note b { color: var(--fg); font-weight: 650; }

/* ---- results matrix ---- */
.matrix-legend { display: flex; flex-wrap: wrap; gap: 16px 22px; margin-bottom: 20px; font-size: 0.82rem; color: var(--muted); }
.lg { display: inline-flex; align-items: center; gap: 7px; }
.lg .sw { width: 13px; height: 13px; border-radius: 3px; display: inline-block; }
.matrix-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2); }
.matrix { display: grid; min-width: 620px; }
.mx-row { display: grid; grid-template-columns: 210px repeat(8, 1fr) 46px; align-items: center; }
.mx-row.head { position: sticky; top: 0; background: var(--bg-3); z-index: 2; border-bottom: 1px solid var(--border-2); }
.mx-row.head .mx-cell, .mx-row.head .mx-lbl, .mx-row.head .mx-solve { padding: 12px 4px; font-size: 0.72rem; color: var(--muted); font-family: var(--mono); letter-spacing: 0.02em; text-align: center; }
.mx-row.head .mx-lbl { text-align: left; padding-left: 16px; text-transform: uppercase; letter-spacing: 0.08em; }
.mx-lbl { padding: 0 8px 0 16px; font-family: var(--mono); font-size: 0.76rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-lbl .mx-proj { color: var(--text); }
.mx-cell { height: 30px; display: flex; align-items: center; justify-content: center; }
.mx-sq { width: 22px; height: 22px; border-radius: 5px; cursor: pointer; transition: transform 0.1s; }
.mx-sq:hover { transform: scale(1.28); box-shadow: 0 0 0 2px var(--bg-2), 0 0 0 3px currentColor; z-index: 3; position: relative; }
.mx-solve { text-align: center; font-family: var(--mono); font-size: 0.78rem; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.mx-row:not(.head):hover { background: rgba(255, 255, 255, 0.02); }
.mx-fam { grid-column: 1 / -1; padding: 11px 16px; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; background: var(--bg-1); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; gap: 10px; align-items: center; }
.mx-fam.frontier { color: var(--gold); }
.mx-fam.gcs { color: var(--accent-2); }
.mx-fam b { color: var(--muted-2); font-weight: 500; text-transform: none; letter-spacing: 0; }
/* outcome colors */
.o-R { background: var(--accent); }
.o-W { background: var(--gold); }
.o-A { background: #a78bfa; }
.o-T { background: #45536b; }
.o-N { background: #2a3547; }
.o-E { background: var(--danger); }

.tooltip { position: fixed; z-index: 100; pointer-events: none; background: #04070c; border: 1px solid var(--border-2); border-radius: 9px; padding: 10px 13px; font-size: 0.82rem; color: var(--text); max-width: 280px; opacity: 0; transform: translateY(4px); transition: opacity 0.12s; box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.8); }
.tooltip.show { opacity: 1; transform: none; }
.tooltip .tt-t { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); margin-bottom: 5px; }
.tooltip .tt-o { font-weight: 700; }

/* ---- run it yourself ---- */
.run-tabs { display: inline-flex; gap: 4px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 999px; padding: 4px; margin-bottom: 18px; }
.run-tab { background: none; border: 0; color: var(--muted); font-size: 0.9rem; font-weight: 600; padding: 8px 18px; border-radius: 999px; cursor: pointer; transition: all 0.15s; font-family: inherit; }
.run-tab.active { background: var(--accent); color: #04140d; }
.run-panel { position: relative; }
.run-panel pre { margin: 0; padding: 24px; overflow-x: auto; font-size: 0.9rem; line-height: 1.85; color: #c7d3e2; }
.c-str { color: var(--accent); }

@media (max-width: 900px) {
  .fb-grid { grid-template-columns: 1fr; }
  .fb-arrow { min-height: 30px; }
  .fb-arrow::before { content: "↓"; }
  .fb-arrow span { position: static; transform: none; margin-left: 10px; }
  .mx-row { grid-template-columns: 150px repeat(8, 1fr) 40px; }
  .mx-sq { width: 18px; height: 18px; }
}
