/* =========================================================================
   DeVA — project page styles
   Self-contained modern design system (no framework dependency)
   ========================================================================= */

:root {
  --ink:        #0e1020;
  --ink-soft:   #2a2e42;
  --muted:      #5c6379;
  --muted-2:    #878da0;
  --bg:         #ffffff;
  --bg-soft:    #f6f7fb;
  --bg-soft-2:  #eef0f8;
  --border:     #e6e8f2;
  --border-2:   #d9dcea;

  --accent:     #905f9e;   /* video / primary  (indigo) */
  --accent-ink: #6b4576;
  --accent-2:   #c77b4e;   /* action           (amber)  */
  --accent-3:   #4e7cb8;   /* guidance          (emerald)*/
  --accent-soft:#f3ecf4;

  --grad: linear-gradient(115deg, #905f9e 0%, #b07ac0 42%, #c77b4e 100%);
  --grad-soft: linear-gradient(180deg, #f8f2f8 0%, #ffffff 60%);

  --shadow-sm: 0 1px 2px rgba(16,18,40,.05), 0 1px 3px rgba(16,18,40,.06);
  --shadow-md: 0 8px 24px -8px rgba(16,18,40,.16), 0 2px 6px rgba(16,18,40,.05);
  --shadow-lg: 0 30px 60px -24px rgba(16,18,40,.30), 0 8px 20px -12px rgba(16,18,40,.14);

  --maxw: 1080px;
  --radius: 16px;
  --radius-sm: 11px;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-disp: "Space Grotesk", var(--font-sans);
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, video { max-width: 100%; display: block; }

a { color: var(--accent-ink); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent-2); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; margin-left: auto; margin-right: auto; }

/* ---------- Navbar ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  background: rgba(255,255,255,.72);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.nav.scrolled { border-color: var(--border); box-shadow: var(--shadow-sm); }
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 5px; font-family: var(--font-disp); font-weight: 700; letter-spacing: -.02em; font-size: 1.1rem; color: var(--ink); }
.brand .logo-img { height: 30px; width: auto; display: block; margin-top: -4px; }
.brand .logo {
  width: 30px; height: 30px; border-radius: 9px; background: var(--grad);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: .82rem; box-shadow: var(--shadow-sm);
}
.brand .logo::after { content: "◆"; font-size: .7rem; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  color: var(--muted); font-weight: 500; font-size: .93rem;
  padding: 7px 12px; border-radius: 8px; transition: all .15s ease;
}
.nav-links a:hover { color: var(--ink); background: var(--bg-soft); }

/* side scrollspy nav */
.sidenav { position: fixed; left: 26px; top: 50%; transform: translateY(-50%); z-index: 60; display: flex; flex-direction: column; gap: 2px; }
.sidenav a { display: flex; align-items: center; gap: 11px; text-decoration: none; padding: 5px 0; font-family: var(--font-mono); font-size: .72rem; font-weight: 600; letter-spacing: .01em; }
.sidenav .sn-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border-2); flex: none; transition: background .18s, box-shadow .18s, transform .18s; }
.sidenav .sn-lbl { color: var(--muted); opacity: .5; transition: opacity .18s, color .18s; }
.sidenav a:hover .sn-lbl { opacity: 1; color: var(--ink-soft); }
.sidenav a:hover .sn-dot { background: var(--muted-2); }
.sidenav a.active .sn-lbl { opacity: 1; color: var(--accent); }
.sidenav a.active .sn-dot { background: var(--accent); transform: scale(1.25); box-shadow: 0 0 0 4px rgba(144,95,158,.14); }
@media (max-width: 1280px){ .sidenav { display: none; } }
.nav-cta {
  color: #fff !important; background: var(--ink);
  padding: 8px 14px !important; border-radius: 9px; font-weight: 600 !important;
  display: inline-flex; align-items: center; gap: 6px;
}
.nav-cta:hover { background: var(--accent-ink); }
/* mirrors .btn.secondary (the "Watch Rollouts" style); keeps Code primary */
.nav-cta.alt { background: #fff; color: var(--ink) !important; border: 1px solid var(--border-2); }
.nav-cta.alt:hover { background: #fff; color: var(--ink) !important; border-color: var(--ink); }
.nav-cta.disabled { background: var(--bg-soft-2); color: var(--muted) !important; box-shadow: none; cursor: not-allowed; pointer-events: none; }
.nav-cta .soon { font-family: var(--font-mono); font-size: .68rem; font-weight: 500; opacity: .85; margin-left: 2px; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 6px; color: var(--ink); }

/* two CTAs + seven section links need ~965px; below that the row cramps and
   "Real Robot" wraps, so hand over to the menu button earlier than before */
@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 58px; right: 12px; left: 12px;
    background: #fff; border: 1px solid var(--border); border-radius: 14px;
    padding: 8px; box-shadow: var(--shadow-md);
  }
  .nav-toggle { display: inline-flex; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 68px 0 40px;
  background: var(--grad-soft);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 55% at 15% -5%, rgba(79,70,229,.14), transparent 60%),
    radial-gradient(50% 50% at 92% 0%, rgba(240,135,31,.12), transparent 60%);
}
.hero .container { position: relative; z-index: 1; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%;
  font-family: var(--font-mono); font-size: .78rem; font-weight: 500;
  letter-spacing: .04em; text-transform: uppercase; text-align: center;
  color: var(--accent-ink); background: #fff;
  border: 1px solid var(--border-2); border-radius: 999px;
  padding: 6px 14px; box-shadow: var(--shadow-sm);
}
.eyebrow .dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 0 4px rgba(240,135,31,.16); }
@media (max-width: 520px){ .eyebrow { font-size: .68rem; letter-spacing: .02em; padding: 6px 12px; } }

.hero-title {
  font-family: var(--font-disp);
  font-weight: 700; letter-spacing: -.03em; line-height: 1.12;
  font-size: clamp(1.85rem, 4.2vw, 2.75rem);
  max-width: 940px; margin: 22px auto 8px; color: var(--ink);
}
.hero-title .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-title .title-logo { display: inline-block; height: 1.15em; width: auto; vertical-align: -0.22em; margin-right: .28em; }
.hero-sub {
  font-size: clamp(1.02rem, 1.7vw, 1.18rem); color: var(--ink-soft);
  max-width: 900px; margin: 0 auto 4px; font-weight: 450; line-height: 1.55;
}
.hero-center { text-align: center; }

.authors { margin: 26px auto 8px; color: var(--ink-soft); font-size: 1.1rem; font-weight: 550; line-height: 1.7; max-width: 780px; }
.authors .au { white-space: nowrap; }
.authors sup { color: var(--accent-ink); font-weight: 600; font-size: .72em; }
.affil { color: var(--muted); font-size: .97rem; margin-bottom: 4px; line-height: 1.6; }
.affil sup { color: var(--accent-ink); font-weight: 600; }

/* link buttons */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 28px 0 8px; }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 20px; border-radius: 11px; font-weight: 600; font-size: .96rem;
  border: 1px solid var(--ink); background: var(--ink); color: #fff;
  box-shadow: var(--shadow-sm); transition: transform .12s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn .ic { width: 17px; height: 17px; }
.btn.secondary { background: #fff; color: var(--ink); border-color: var(--border-2); }
.btn.secondary:hover { color: var(--ink); border-color: var(--ink); }
.btn.disabled { opacity: .55; cursor: not-allowed; pointer-events: none; background:#fff; color: var(--muted); border-color: var(--border-2); }
.btn.disabled .soon { font-family: var(--font-mono); font-size: .7rem; margin-left: 2px; }

/* teaser media */
.hero-media {
  margin: 40px auto 0; max-width: 960px;
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-lg); border: 1px solid var(--border);
  background: #fff;
}
.hero-media video { width: 100%; display: block; }
.hero-media .cap {
  font-size: .9rem; color: var(--muted); text-align: center;
  padding: 12px 18px; background: #fff; border-top: 1px solid var(--border);
}

/* ---------- Stat strip ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin: 44px auto 0; max-width: 980px;
}
.stat {
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 20px 18px; text-align: center; box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.stat::before { content:""; position:absolute; left:0; top:0; height:3px; width:100%; background: var(--grad); opacity:.85; }
.stat .num { font-family: var(--font-disp); font-weight: 700; font-size: 1.9rem; letter-spacing: -.02em; color: var(--ink); line-height: 1; }
.stat .num .unit { font-size: 1rem; color: var(--muted); font-weight: 600; }
.stat .lbl { margin-top: 8px; font-size: .84rem; color: var(--muted); line-height: 1.35; }
@media (max-width: 720px){ .stats { grid-template-columns: repeat(2,1fr);} }

/* ---------- Sections ---------- */
section.block { padding: 52px 0; }
section.block.soft { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.sec-head { text-align: center; margin-bottom: 26px; }
.sec-eyebrow {
  font-family: var(--font-mono); font-size: 1.25rem; font-weight: 800; letter-spacing: .07em;
  text-transform: uppercase; color: var(--accent); display: block; margin-bottom: 10px;
}
.sec-title {
  font-family: var(--font-disp); font-weight: 700; letter-spacing: -.025em;
  font-size: clamp(1.6rem, 3.4vw, 2.3rem); margin: 0 0 6px; color: var(--ink);
}
.sec-desc { color: var(--muted); max-width: 640px; margin: 0 auto; font-size: 1.05rem; }

.lead { font-size: 1.12rem; color: var(--ink-soft); line-height: 1.7; text-align: justify; }
.lead strong { color: var(--ink); font-weight: 650; }

/* figure card */
.figure {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow-md); margin: 0 auto;
}
.figure img { border-radius: 8px; margin: 0 auto; }
.figure .cap { font-size: .93rem; color: var(--muted); margin-top: 14px; text-align: center; line-height: 1.5; }
.figure .cap b { color: var(--ink-soft); }

/* method feature cards */
.feature-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-top: 44px; }
@media (max-width: 860px){ .feature-grid { grid-template-columns: 1fr; } }
.feature {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 24px; box-shadow: var(--shadow-sm); position: relative;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--border-2); }
.feature .step {
  width: 38px; height: 38px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-disp); font-weight: 700; color: #fff; margin-bottom: 16px; font-size: 1.05rem;
  box-shadow: var(--shadow-sm);
}
.feature.c1 .step { background: linear-gradient(135deg,#905f9e,#b07ac0); }
.feature.c2 .step { background: linear-gradient(135deg,#c77b4e,#dc9a6a); }
.feature.c3 .step { background: linear-gradient(135deg,#4e7cb8,#7ea2cf); }
.feature h3 { font-family: var(--font-disp); font-size: 1.18rem; margin: 0 0 8px; letter-spacing: -.01em; color: var(--ink); }
.feature p { margin: 0; color: var(--muted); font-size: .98rem; line-height: 1.6; }

/* video grid */
.vid-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; }
@media (max-width: 720px){ .vid-grid { grid-template-columns: 1fr; } }
.vid-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.vid-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.vid-card video { width: 100%; display: block; background: #0e1020; aspect-ratio: 16/9; object-fit: cover; }
.vid-card .meta { padding: 14px 18px; display: flex; align-items: center; gap: 10px; }
.vid-card .tag {
  font-family: var(--font-mono); font-size: .68rem; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: #7d5389; padding: 4px 10px; border-radius: 6px; background: #f1eaf4;
  flex: none;
}
.vid-card .tag.t2 { color: #a35c2f; background: #fbe9de; }
.vid-card .tag.t3 { color: #3d6294; background: #e9eff7; }
.vid-card .tag.t4 { color: #6b7286; background: #eef0f6; }
.vid-card .meta span { font-size: .93rem; color: var(--ink-soft); font-weight: 500; }

/* two-up figure row */
.fig-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 820px){ .fig-row { grid-template-columns: 1fr; } }

/* efficiency callouts */
.callouts { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-top: 8px; }
@media (max-width: 820px){ .callouts { grid-template-columns: 1fr; } }
.callout {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow-sm);
}
.callout .big { font-family: var(--font-disp); font-weight: 700; font-size: 2.1rem; letter-spacing: -.02em; }
.callout.c1 .big { color: var(--accent); }
.callout.c2 .big { color: var(--accent-2); }
.callout.c3 .big { color: var(--accent-3); }
.callout p { margin: 6px 0 0; color: var(--muted); font-size: .95rem; }

/* bibtex */
.bibtex {
  background: #0e1020; color: #d7dbec; border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow-md); position: relative; overflow: hidden;
}
.bibtex pre {
  margin: 0; font-family: var(--font-mono); font-size: .84rem; line-height: 1.7;
  overflow-x: auto; color: #cfd4ea;
}
.bibtex .copy {
  position: absolute; top: 14px; right: 14px;
  background: rgba(255,255,255,.08); color: #d7dbec; border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px; padding: 6px 12px; font-size: .8rem; font-family: var(--font-mono); cursor: pointer;
  transition: background .15s ease;
}
.bibtex .copy:hover { background: rgba(255,255,255,.16); }

/* footer */
.footer { padding: 40px 0; border-top: 1px solid var(--border); background: var(--bg-soft); text-align: center; }
.footer p { color: var(--muted); font-size: .9rem; margin: 4px 0; }
.footer a { color: var(--accent-ink); }

/* ---------- Section intro / prose ---------- */
.intro { max-width: 720px; margin: 0 auto 40px; text-align: center; color: var(--ink-soft); font-size: 1.12rem; line-height: 1.7; }
.intro strong { color: var(--ink); font-weight: 650; }
.prose { max-width: 760px; margin: 0 auto; }
.prose p { font-size: 1.1rem; color: var(--ink-soft); line-height: 1.75; margin: 0 0 1.1rem; }
.prose p strong { color: var(--ink); font-weight: 650; }

/* ---------- TL;DR cards ---------- */
.tldr-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
@media (max-width: 860px){ .tldr-grid { grid-template-columns: 1fr; } }
.tldr {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 26px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.tldr:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.tldr .ico {
  width: 46px; height: 46px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 16px; box-shadow: var(--shadow-sm);
}
.tldr .ico svg { width: 24px; height: 24px; color: #fff; }
.tldr.c1 .ico { background: linear-gradient(135deg,#905f9e,#b07ac0); }
.tldr.c2 .ico { background: linear-gradient(135deg,#c77b4e,#dc9a6a); }
.tldr.c3 .ico { background: linear-gradient(135deg,#4e7cb8,#7ea2cf); }
.tldr h3 { font-family: var(--font-disp); font-size: 1.22rem; margin: 0 0 8px; letter-spacing: -.01em; }
.tldr p { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.6; }
.tldr p b { color: var(--ink-soft); }

/* ---------- Pull quote ---------- */
.pull {
  max-width: 860px; margin: 44px auto 0; padding: 34px 40px;
  border-radius: var(--radius); background: linear-gradient(120deg, #f5eff6, #fdf3ee);
  border: 1px solid var(--border-2); box-shadow: var(--shadow-sm); position: relative;
}
.pull::before {
  content: "\201C"; position: absolute; top: -6px; left: 20px;
  font-family: var(--font-disp); font-size: 4.5rem; color: var(--accent); opacity: .28; line-height: 1;
}
.pull p { margin: 0; font-family: var(--font-disp); font-weight: 500; font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  line-height: 1.4; letter-spacing: -.01em; color: var(--ink); text-align: center; }
.pull p .hl { background: linear-gradient(180deg, transparent 62%, rgba(240,135,31,.32) 62%); }

/* ---------- Comparison tables ---------- */
.table-block { margin-top: 8px; }
.table-title { font-family: var(--font-disp); font-weight: 600; font-size: 1.12rem; margin: 0 0 4px; color: var(--ink); }
.table-note { color: var(--muted); font-size: .9rem; margin: 0 0 14px; }
.rtable { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-sm); background:#fff; -webkit-overflow-scrolling: touch; }
table.cmp { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 460px; }
table.cmp thead th {
  background: var(--bg-soft-2); color: var(--ink-soft); font-weight: 600; text-align: right;
  padding: 12px 16px; font-size: .82rem; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap;
  border-bottom: 1px solid var(--border-2);
}
table.cmp thead th:first-child { text-align: left; }
table.cmp tbody td { padding: 11px 16px; text-align: right; border-bottom: 1px solid var(--border); color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
table.cmp tbody td:first-child { text-align: left; color: var(--muted); font-weight: 500; }
table.cmp tbody tr:last-child td { border-bottom: 0; }
table.cmp tbody tr.ours td { background: linear-gradient(90deg, rgba(79,70,229,.08), rgba(240,135,31,.06)); color: var(--ink); font-weight: 650; }
table.cmp tbody tr.ours td:first-child { color: var(--accent-ink); font-weight: 700; }
table.cmp td.best { color: var(--accent-ink); font-weight: 700; }
table.cmp tbody tr.ours td.best { text-decoration: underline; text-decoration-color: var(--accent-2); text-underline-offset: 3px; }
.tables-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: start; }
@media (max-width: 860px){ .tables-2 { grid-template-columns: 1fr; } }

/* ---------- Ablation progression ---------- */
.progressions { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
@media (max-width: 860px){ .progressions { grid-template-columns: 1fr; } }
.prog { background:#fff; border:1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.prog h4 { font-family: var(--font-disp); font-size: 1.02rem; margin: 0 0 4px; }
.prog .q { color: var(--muted); font-size: .9rem; margin: 0 0 16px; }
.prog .steps { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.prog .chip { font-family: var(--font-mono); font-size: .82rem; padding: 5px 10px; border-radius: 8px; background: var(--bg-soft-2); color: var(--muted); }
.prog .chip.win { background: var(--ink); color: #fff; font-weight: 600; }
.prog .arrow { color: var(--accent-2); font-weight: 700; }
.prog .gain { margin-top: 14px; font-size: .88rem; color: var(--accent-3); font-weight: 600; }
.prog.c1 .chip.win { background: linear-gradient(135deg,#905f9e,#b07ac0); }
.prog.c2 .chip.win { background: linear-gradient(135deg,#c77b4e,#dc9a6a); }
.prog.c3 .chip.win { background: linear-gradient(135deg,#4e7cb8,#7ea2cf); }

/* ---------- Takeaways ---------- */
.takeaways { max-width: 820px; margin: 0 auto; display: grid; gap: 14px; }
.take { display: flex; gap: 16px; align-items: flex-start; background:#fff; border:1px solid var(--border); border-radius: 14px; padding: 20px 22px; box-shadow: var(--shadow-sm); }
.take .check { flex: none; width: 30px; height: 30px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; }
.take .check svg { width: 18px; height: 18px; }
.take p { margin: 0; font-size: 1.02rem; color: var(--ink-soft); line-height: 1.55; }
.take p b { color: var(--ink); }

/* highlight-band CTA */
.cta-band { text-align: center; }
.cta-band .btn-row { margin-top: 24px; }

/* ---------- Media placeholder slot (for assets to be produced) ---------- */
.media-slot {
  position: relative; border: 2px dashed var(--border-2); border-radius: 12px;
  background: linear-gradient(135deg, #f7f1f7 0%, #fdf2ec 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 28px 24px; overflow: hidden; min-height: 240px; height: 100%;
}
.media-slot::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 25%, rgba(255,255,255,.55) 50%, transparent 75%);
  transform: translateX(-100%); animation: shimmer 3.4s ease-in-out infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }
.media-slot .film { width: 38px; height: 38px; color: var(--accent); opacity: .75; margin-bottom: 12px; position: relative; z-index: 1; }
.media-slot .kick { position: relative; z-index: 1; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); font-weight: 600; margin-bottom: 7px; }
.media-slot .slot-title { position: relative; z-index: 1; font-family: var(--font-disp); font-weight: 600; font-size: 1.04rem; color: var(--ink); margin-bottom: 7px; }
.media-slot .slot-desc { position: relative; z-index: 1; font-size: .86rem; color: var(--muted); line-height: 1.55; max-width: 360px; }
.media-slot .slot-desc b { color: var(--ink-soft); }
@media (prefers-reduced-motion: reduce){ .media-slot::after { animation: none; } }

/* ---------- Hero hook (3-panel synced teaser) ---------- */
.hero-hook {
  margin: 40px auto 0; max-width: 1010px;
  background: linear-gradient(135deg, #f4eff5 0%, #fdf3ee 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 18px;
}
/* columns match native widths (480 : 960 : 480 = 1 : 2 : 1) so the clips line up
   at equal height with no cropping */
.hook-grid { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 14px; align-items: stretch; }
.hook-col { min-width: 0; }

.hook-panel {
  position: relative; border-radius: 14px; overflow: hidden; background: #0a0c1e; line-height: 0; font-size: 0;
  box-shadow: var(--shadow-md);
}
.hook-panel > video, .hook-panel > img { width: 100%; height: auto; display: block; margin: 0; }

/* numbered corner badge */
.hook-num {
  position: absolute; top: 9px; left: 9px; z-index: 3;
  width: 26px; height: 26px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(14,16,32,.82); color: #fff; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  font-family: var(--font-disp); font-weight: 700; font-size: .85rem; line-height: 1;
}

/* bottom caption overlay with scrim */
.hook-label {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  padding: 28px 14px 11px; text-align: center;
  font-family: var(--font-sans); font-weight: 600; font-size: .92rem; line-height: 1.3;
  color: #fff; background: linear-gradient(to top, rgba(8,10,26,.80), rgba(8,10,26,.22) 58%, transparent);
}

.hook-cap { text-align: center; font-size: .85rem; color: var(--muted); padding: 16px 14px 4px; line-height: 1.55; max-width: none; margin: 0 auto; white-space: nowrap; }
.hook-cap b { color: var(--ink-soft); }
@media (max-width: 1000px){ .hook-cap { white-space: normal; font-size: .88rem; } }

/* ---------- Motivation rows (consortium) ---------- */
.mrow { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; margin-bottom: 32px; }
.mrow:last-child { margin-bottom: 0; }
.mrow.rev .mrow-media { order: 2; }
@media (max-width: 820px){
  .mrow { grid-template-columns: 1fr; gap: 22px; margin-bottom: 26px; }
  .mrow.rev .mrow-media { order: 0; }
}
.mrow-media .figure { padding: 12px; }

/* fixed 16:9 media area so placeholder and final asset share the same footprint */
.mrow-media .media-slot { aspect-ratio: 16 / 9; min-height: 0; padding: 22px 24px 36px; }
.media-slot .slot-file {
  position: absolute; left: 0; right: 0; bottom: 11px; z-index: 1; text-align: center;
  font-family: var(--font-mono); font-size: .72rem; font-weight: 600; color: var(--accent-ink);
}
.mrow-asset {
  aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #0f1116;
  box-shadow: var(--shadow-md); display: flex; align-items: center; justify-content: center;
}
.mrow-asset img, .mrow-asset video { width: 100%; height: 100%; object-fit: contain; display: block; }
.mrow-note { text-align: center; font-size: .82rem; color: var(--muted); margin-top: 11px; line-height: 1.5; }
.mrow-note code { font-family: var(--font-mono); font-size: .92em; color: var(--accent-ink); }

/* wide row: ~4/5 video, 1/5 concise text */
.mrow.mrow-wide { grid-template-columns: 4fr 1fr; gap: 28px; align-items: center; }
.mrow.mrow-wide.rev { grid-template-columns: 1fr 4fr; } /* alternating: video on the right */
@media (max-width: 820px){ .mrow.mrow-wide, .mrow.mrow-wide.rev { grid-template-columns: 1fr; } }
/* dashed soft-gradient card with a small white mat around the clip */
.mrow-wide .mrow-asset {
  aspect-ratio: auto; display: block; padding: 10px; border-radius: 18px;
  background: linear-gradient(135deg, #efe6f3 0%, #f5eff6 42%, #fdf3ee 100%);
  border: 2.5px dashed var(--border-2); box-shadow: none;
}
.mrow-wide .mrow-asset video {
  width: 100%; height: auto; border-radius: 11px; border: 4px solid #fff;
  box-shadow: 0 2px 10px rgba(16,18,40,.10); background: #fff;
}
.mrow-wide .mrow-num { margin-bottom: 12px; }
.mrow.mrow-wide .claim { font-size: 1.05rem; line-height: 1.28; }
.mrow.mrow-wide .body { font-size: .92rem; margin-top: 9px; }
.mrow-num {
  width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-disp); font-weight: 700; color: #fff; font-size: 1.15rem; margin-bottom: 16px; box-shadow: var(--shadow-sm);
}
.mrow.c1 .mrow-num { background: linear-gradient(135deg,#905f9e,#b07ac0); }
.mrow.c2 .mrow-num { background: linear-gradient(135deg,#c77b4e,#dc9a6a); }
.mrow.c3 .mrow-num { background: linear-gradient(135deg,#4e7cb8,#7ea2cf); }
.mrow .claim { font-family: var(--font-disp); font-weight: 650; letter-spacing: -.02em; line-height: 1.2;
  font-size: clamp(1.3rem, 2.6vw, 1.72rem); margin: 0 0 6px; color: var(--ink); }
.mrow .sub { color: var(--accent-ink); font-weight: 600; font-size: .92rem; margin: 0 0 14px; font-family: var(--font-mono); }
.mrow .body { color: var(--muted); font-size: 1.02rem; line-height: 1.65; margin: 0; }
.mrow .body b { color: var(--ink-soft); }
.vsrow { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 16px; }
.vschip { font-size: .84rem; padding: 7px 13px; border-radius: 9px; border: 1px solid var(--border-2); font-weight: 500; }
.vschip.bad { background: #fceee9; border-color: #f2cabb; color: #b23f39; }
.vschip.good { background: #eef3fa; border-color: #cbd9ec; color: #3d6294; }

/* ---------- Tabbed method video player ---------- */
.mtabs-wrap { max-width: 980px; margin: 0 auto; }
.mtabs { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 20px; }
.mtab {
  display: inline-flex; align-items: center; gap: 9px; padding: 10px 17px; border-radius: 11px;
  border: 1px solid var(--border); background: #fff; color: var(--muted);
  font-family: var(--font-sans); font-weight: 600; font-size: .95rem; cursor: pointer;
  transition: background .18s, color .18s, border-color .18s, box-shadow .18s;
}
.mtab .mn {
  width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center;
  font-family: var(--font-disp); font-size: .78rem; font-weight: 700;
  background: var(--bg-soft-2); color: var(--muted); transition: background .18s, color .18s;
}
.mtab:hover { color: var(--ink); border-color: var(--border-2); box-shadow: var(--shadow-sm); }
.mtab.is-active { color: #fff; border-color: transparent; box-shadow: var(--shadow-sm); }
.mtab.is-active .mn { background: rgba(255,255,255,.25); color: #fff; }
.mtab.t1.is-active { background: linear-gradient(135deg,#905f9e,#b07ac0); }
.mtab.t2.is-active { background: linear-gradient(135deg,#bf7346,#dc9a6a); }
.mtab.t3.is-active { background: linear-gradient(135deg,#456fa6,#6f95c5); }
.mtab.t4.is-active { background: linear-gradient(135deg,#7a7fb8,#a7abd6); }

.mstage {
  position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--border);
  background: #0e1020; box-shadow: var(--shadow-lg); aspect-ratio: 16 / 9;
}
.mpanel { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .35s ease; }
.mpanel.is-active { opacity: 1; visibility: visible; }
.mpanel video { width: 100%; height: 100%; object-fit: cover; display: block; background: #0e1020; }
.mph {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 11px; text-align: center; padding: 24px; background: linear-gradient(135deg,#1b1d30,#111320);
}
.mph .film { width: 40px; height: 40px; color: #8b90b5; }
.mph .t { font-family: var(--font-disp); font-weight: 600; font-size: 1.08rem; color: #fff; }
.mph .f { font-family: var(--font-mono); font-size: .78rem; color: #9aa0bd; }
.mph.hide { display: none; }

/* focus spotlight overlaid on each clip — dims the rest, highlights the tab's component */
.mfocus {
  position: absolute; z-index: 3; border-radius: 10px; pointer-events: none; color: #a06fae;
  box-shadow: 0 0 0 2.5px currentColor, 0 0 0 2000px rgba(9,11,25,.34);
  transition: top .55s cubic-bezier(.4,0,.2,1), left .55s cubic-bezier(.4,0,.2,1),
              width .55s cubic-bezier(.4,0,.2,1), height .55s cubic-bezier(.4,0,.2,1), color .4s ease;
}
@media (prefers-reduced-motion: reduce){ .mfocus { transition: color .3s ease; } }

.replay-btn {
  position: absolute; bottom: 14px; right: 14px; z-index: 5; display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 15px; border-radius: 10px; border: 1px solid rgba(255,255,255,.24);
  background: rgba(14,16,32,.6); color: #fff; font-family: var(--font-sans); font-weight: 600; font-size: .85rem;
  cursor: pointer; backdrop-filter: blur(6px); transition: background .15s, transform .12s;
}
.replay-btn:hover { background: rgba(14,16,32,.85); transform: translateY(-1px); }
.replay-btn svg { width: 15px; height: 15px; }

.mtab-cap { text-align: center; color: var(--muted); margin: 18px auto 0; font-size: 1.02rem; max-width: 680px; line-height: 1.55; }
.mtab-cap b { color: var(--ink-soft); }

/* ---------- Embedded animated bar charts ---------- */
.chart-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px 16px; box-shadow: var(--shadow-sm); }
.chart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.chart-title { font-family: var(--font-disp); font-weight: 650; font-size: 1.1rem; margin: 0; color: var(--ink); }
.chart-sub { color: var(--muted); font-size: .9rem; margin: 3px 0 0; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; }
.lg-item { display: inline-flex; align-items: center; gap: 7px; font-size: .85rem; color: var(--muted); font-weight: 500; }
.lg-item .sw { width: 14px; height: 14px; border-radius: 4px; flex: none; }
/* shallow tab palette: soft indigo (tab1) = Ours, soft amber (tab2) = Cosmos/baselines, soft emerald (tab3) = GR00T */
.sw.b-ours { background: #f6c8b6; } .sw.b-cos { background: #92b1d9; } .sw.b-mut { background: #cdd0ea; } .sw.b-g00 { background: #d4d4d4; } .sw.b-pi { background: #7ea2cf; }

.barchart svg { width: 100%; height: auto; display: block; }
.barchart text { font-family: var(--font-mono); }
.bar { fill: #f6c8b6; transform: scaleY(0); transform-box: fill-box; transform-origin: bottom; transition: transform .85s cubic-bezier(.2,.7,.3,1); stroke: #000; stroke-width: 1.4; }
.bar-sh { fill: #000; stroke: none; transform: scaleY(0); transform-box: fill-box; transform-origin: bottom; transition: transform .85s cubic-bezier(.2,.7,.3,1); }
.bar.b-ours { fill: #f6c8b6; } .bar.b-cos { fill: #92b1d9; } .bar.b-mut { fill: #cdd0ea; } .bar.b-g00 { fill: #d4d4d4; } .bar.b-pi { fill: #7ea2cf; }
.barchart.in .bar { transform: scaleY(1); }
.barchart.in .bar-sh { transform: scaleY(1); }
.bval { fill: #5c6379; opacity: 0; transition: opacity .4s ease; font-weight: 500; }
.bval.o { fill: #000; font-weight: 800; }
.barchart.in .bval { opacity: 1; }
@media (prefers-reduced-motion: reduce){ .bar { transform: none; } .bval { opacity: 1; } }

/* result block: qualitative visual + chart, alternating */
.result-block { margin-top: 40px; }
.rb-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.rb-badge { font-family: var(--font-mono); font-size: .72rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; padding: 5px 12px; border-radius: 8px; }
.rb-badge.rc { color: #7d5389; background: #f1eaf4; }
.rb-badge.lb { color: #3d6294; background: #e9eff7; }
.rb-badge.lp { color: #a35c2f; background: #fbe9de; }
.rb-head h3 { font-family: var(--font-disp); font-weight: 650; font-size: 1.3rem; margin: 0; letter-spacing: -.01em; }
.rb-head .rb-note { color: var(--muted); font-size: .92rem; margin-left: auto; }
.result-row { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: stretch; }
.result-row.rev .rr-media { order: 2; }
@media (max-width: 860px){ .result-row, .result-row.rev { grid-template-columns: 1fr; } .result-row.rev .rr-media { order: 0; } .rb-head .rb-note { margin-left: 0; flex-basis: 100%; } }
.result-row .figure, .result-row .chart-card { margin: 0; height: 100%; }
.result-row .chart-card { display: flex; flex-direction: column; justify-content: center; }

/* ---------- RoboCasa tabbed video window ---------- */
.rc-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.rc-tab {
  padding: 8px 15px; border-radius: 9px; border: 1px solid var(--border); background: #fff; color: var(--muted);
  font-family: var(--font-sans); font-weight: 600; font-size: .9rem; cursor: pointer;
  transition: background .16s, color .16s, border-color .16s;
}
.rc-tab:hover { color: var(--ink); border-color: var(--border-2); }
.rc-tab.is-active { background: #f1eaf4; color: #7d5389; border-color: #e2d2ea; }

.rc-window { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-md); background: #fff; }
.rc-titlebar { display: flex; align-items: center; gap: 12px; padding: 11px 16px; background: var(--bg-soft); border-bottom: 1px solid var(--border); }
.rc-dots { display: flex; gap: 7px; flex: none; }
.rc-dots i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.rc-dots i:nth-child(1) { background: #ff5f57; } .rc-dots i:nth-child(2) { background: #febc2e; } .rc-dots i:nth-child(3) { background: #28c840; }
.rc-wtitle { font-family: var(--font-mono); font-size: .82rem; color: var(--muted); }
.rc-count { font-family: var(--font-mono); font-size: .74rem; color: var(--faint, #8a90a2); margin-left: auto; }
.rc-body { max-height: 470px; overflow-y: auto; padding: 16px; background: #fbfcfe; }
.rc-body::-webkit-scrollbar { width: 10px; }
.rc-body::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 6px; border: 2px solid #fbfcfe; }
.rc-body::-webkit-scrollbar-track { background: transparent; }
.rc-panel { display: none; }
.rc-panel.is-active { display: block; }
.rc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 700px){ .rc-grid { grid-template-columns: 1fr; } }
.rc-vid { margin: 0; border-radius: 11px; overflow: hidden; border: 1px solid var(--border); background: #fff; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .2s ease; }
.rc-vid:hover { transform: translateY(-4px) scale(1.02); box-shadow: var(--shadow-md); position: relative; z-index: 2; }
/* film-strip frame: dark base with sprocket-hole perforations top & bottom */
.rc-film { position: relative; background: #191919; padding: 12px 14px; line-height: 0; }
.rc-film::before, .rc-film::after { content: ""; position: absolute; left: 0; right: 0; height: 12px; pointer-events: none;
  background: radial-gradient(circle at 11px 50%, #d6d6d6 2.6px, transparent 3.4px) 0 0 / 22px 100% repeat-x; }
.rc-film::before { top: 0; } .rc-film::after { bottom: 0; }
.rc-film video { display: block; width: 100%; aspect-ratio: 1440 / 500; object-fit: cover; background: #0e1020; border-radius: 3px; }
.rc-vid figcaption { font-family: var(--font-mono); font-size: .72rem; color: var(--ink-soft); font-weight: 600; padding: 7px 11px; background: #fff; }
@media (prefers-reduced-motion: reduce){ .rc-vid:hover { transform: none; } }
/* 3-up variant (LIBERO-Plus perturbation demos) */
.rc-grid.g3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 820px){ .rc-grid.g3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px){ .rc-grid.g3 { grid-template-columns: 1fr; } }
.lp-window .rc-film video { aspect-ratio: 798 / 408; }
/* ---------- Efficiency: stacked panels (training row, data row) ---------- */
.eff-panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 22px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; margin-bottom: 22px; }
.eff-panel:last-child { margin-bottom: 0; }
/* Both efficiency cards on one line: training (2 charts) wider, data (1 chart) narrower → charts stay ~equal size, cards equal height */
.eff-row { display: flex; gap: 14px; align-items: stretch; }
.eff-row .eff-panel { margin-bottom: 0; flex: 1 1 0; min-width: 0; }
.eff-row .eff-train { flex: 1.6 1 0; }
/* equal-height headers so both charts start at the same y */
.eff-row .eff-phead { flex-direction: column; align-items: flex-start; gap: 9px; min-height: 60px; margin-bottom: 16px; }
/* compact bar chart, wide convergence curve */
.eff-row .eff-train .eff-train-grid { grid-template-columns: 0.62fr 1fr; gap: 14px; }
@media (max-width: 900px){ .eff-row { flex-direction: column; } .eff-row .eff-panel, .eff-row .eff-train { flex: 1 1 auto; } .eff-row .eff-phead { min-height: 0; } }
.eff-phead { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.eff-phead .eff-badge { margin-bottom: 0; }
.eff-phead h3 { margin: 0; }
.eff-train-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: start; }
@media (max-width: 820px){ .eff-train-grid { grid-template-columns: 1fr; } }
.eff-cell { margin: 0; display: flex; flex-direction: column; }
.eff-cell .barchart, .eff-cell .linechart { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; padding: 8px 3px; height: 270px; display: flex; align-items: center; justify-content: center; }
.eff-cell .barchart svg, .eff-cell .linechart svg { width: 100%; height: 100%; }
.eff-cell figcaption { font-size: .8rem; color: var(--muted); line-height: 1.45; margin-top: 10px; }
.eff-data-grid { display: grid; grid-template-columns: 0.72fr 1fr; gap: 34px; align-items: center; }
@media (max-width: 820px){ .eff-data-grid { grid-template-columns: 1fr; gap: 22px; } }
.eff-dleft { display: flex; flex-direction: column; }
.eff-dleft .eff-metrics { margin-bottom: 0; }
/* line chart animation (fade only — no area fill) */
.linechart .ln-path { opacity: 0; transition: opacity .8s ease; }
.linechart .ln-dot { opacity: 0; transition: opacity .35s ease; }
.linechart.in .ln-path { opacity: 1; }
.linechart.in .ln-dot { opacity: 1; }
/* log bars — page palette: amber baseline, indigo ours (matches other charts) */
.bar.b-cream { fill: #92b1d9; }
.bar.b-gold { fill: #f6c8b6; }
.logbars .anno { opacity: 0; transition: opacity .5s ease; }
.logbars.in .anno { opacity: 1; }
@media (prefers-reduced-motion: reduce){ .linechart .ln-path, .linechart .ln-dot, .logbars .anno { transition: none; } }
.eff-badge { align-self: flex-start; font-family: var(--font-mono); font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 5px 12px; border-radius: 8px; margin-bottom: 14px; }
.eff-badge.tr { color: #7d5389; background: #f1eaf4; }
.eff-badge.da { color: #3d6294; background: #e9eff7; }
.eff-panel h3 { font-family: var(--font-disp); font-weight: 650; font-size: 1.3rem; letter-spacing: -.02em; margin: 0 0 18px; color: var(--ink); }
.eff-metrics { display: flex; gap: 30px; margin-bottom: 22px; flex-wrap: wrap; }
.eff-m .v { display: block; font-family: var(--font-disp); font-weight: 700; font-size: 2rem; letter-spacing: -.02em; line-height: 1; }
.eff-m .v i { font-style: normal; font-size: 1.05rem; margin-left: 1px; }
.eff-m.tr .v { color: #905f9e; } .eff-m.da .v { color: #4e7cb8; }
.eff-m .l { display: block; margin-top: 8px; font-size: .84rem; color: var(--muted); line-height: 1.4; }
.eff-fig { margin-top: 6px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.eff-fig img { width: 100%; display: block; }
.eff-fig figcaption { font-size: .8rem; color: var(--muted); padding: 9px 13px; background: var(--bg-soft); line-height: 1.45; }
.hbars { margin-top: 10px; display: flex; flex-direction: column; gap: 13px; }
.hbar { display: grid; grid-template-columns: 84px 1fr auto; align-items: center; gap: 12px; }
.hb-l { font-family: var(--font-mono); font-size: .82rem; color: var(--ink-soft); font-weight: 600; text-align: right; }
.hb-track { height: 22px; border-radius: 6px; background: var(--bg-soft-2); overflow: hidden; }
.hb-fill { display: block; height: 100%; min-width: 7px; border-radius: 6px; background: #cdd0ea; }
.hb-fill.ours { background: #f6c8b6; }
.hb-v { font-family: var(--font-mono); font-size: .82rem; font-weight: 700; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.hbar.ours .hb-v { color: #905f9e; }
.hb-note { grid-column: 1 / -1; font-size: .82rem; color: var(--muted); margin: 6px 0 0; line-height: 1.45; }
.hb-note b { color: var(--ink-soft); }

/* three benchmark charts in one row */
.chart-stack { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 820px){ .chart-stack { grid-template-columns: 1fr; } }
.chart-stack .chart-card { padding: 18px 14px 12px; }
.chart-stack .chart-head { flex-direction: column; gap: 7px; align-items: flex-start; margin-bottom: 4px; }
.chart-stack .chart-title { font-size: 1.02rem; }
.chart-stack .chart-sub { font-size: .82rem; }
.chart-stack .chart-legend { gap: 12px; }
.abl-bullets { max-width: 860px; margin: 26px auto 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 11px; }
.abl-bullets li { position: relative; padding-left: 22px; color: var(--muted); font-size: 1rem; line-height: 1.5; }
.abl-bullets li::before { content: ""; position: absolute; left: 3px; top: .6em; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }
.abl-bullets li b { color: var(--ink-soft); }
/* ablation takeaway line under each chart card */
.abl-take { font-size: .85rem; color: var(--muted); line-height: 1.5; margin: 12px 4px 2px; text-align: center; border-top: 1px solid var(--border); padding-top: 12px; }
.abl-take b { color: var(--ink-soft); font-weight: 700; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce){ .reveal { opacity:1; transform:none; transition:none; } html{scroll-behavior:auto;} }

/* =========================================================================
   PHONE / TABLET
   Everything below is scoped to a max-width query — the desktop layout is
   untouched. Ordered widest breakpoint first so narrower ones win.
   ========================================================================= */

/* ---- ≤900px: nothing may push the document wider than the viewport ---- */
@media (max-width: 900px) {
  /* the wide grouped bar chart (920-unit viewBox) becomes illegible when
     squeezed into a phone width — let it scroll sideways at a usable size */
  #chart-real { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  #chart-real svg { width: 640px; max-width: none; }

  /* headers of the benchmark blocks must wrap instead of squeezing into
     three slivers of text */
  .rb-head { flex-wrap: wrap; }
  .rb-badge { flex: none; }
}

/* ---- ≤760px: stack the hero hook; three columns become postage stamps ---- */
@media (max-width: 760px) {
  .hero-hook { padding: 12px; border-radius: 14px; }
  .hook-grid { grid-template-columns: 1fr; gap: 10px; }
  .hook-panel { border-radius: 12px; }
  .hook-num { top: 7px; left: 7px; width: 22px; height: 22px; font-size: .78rem; }
  .hook-label { font-size: .84rem; padding: 24px 12px 10px; }
  .hook-cap { padding: 13px 6px 2px; }

  /* justified text on a narrow column opens rivers of whitespace.
     these rules also override the inline style="text-align: justify" */
  .lead, .sec-desc, .mrow .body, .take p, .abl-bullets li,
  .eff-cell figcaption, .prose p { text-align: left !important; }
}

/* ---- ≤700px: video windows, charts, method player ---- */
@media (max-width: 700px) {
  /* a 470px scroll box inside a ~700px viewport traps touch scrolling —
     let the page itself do the scrolling */
  .rc-body { max-height: none; overflow-y: visible; padding: 12px; }
  .rc-titlebar { padding: 9px 12px; gap: 9px; }
  .rc-dots i { width: 9px; height: 9px; }
  .rc-wtitle { font-size: .74rem; }
  .rc-count { display: none; }
  .rc-tabs { gap: 6px; }
  .rc-tab { padding: 7px 11px; font-size: .82rem; }
  .rc-vid figcaption { font-size: .68rem; padding: 6px 9px; }
  /* these clips are very wide and short, so two up still reads fine */
  .rc-grid.g3 { grid-template-columns: 1fr 1fr; }

  /* method player */
  .mtabs { gap: 7px; margin-bottom: 14px; }
  .mtab { padding: 8px 12px; font-size: .85rem; gap: 6px; }
  .mtab .mn { width: 18px; height: 18px; font-size: .7rem; }
  .mtab-cap { font-size: .94rem; margin-top: 14px; }
  .replay-btn { bottom: 8px; right: 8px; padding: 6px 11px; font-size: .78rem; }
  .replay-btn svg { width: 13px; height: 13px; }

  /* let the efficiency charts use their natural aspect instead of being
     letterboxed inside a fixed 270px box */
  .eff-cell .barchart, .eff-cell .linechart { height: auto; padding: 8px 4px; }
  .eff-cell .barchart svg, .eff-cell .linechart svg { height: auto; }
  .eff-panel { padding: 18px 16px; }

  .vid-card .meta { padding: 12px 14px; flex-wrap: wrap; gap: 8px; }
  .vid-card .meta span { font-size: .88rem; }
}

/* ---- ≤560px: phone typography and spacing ---- */
@media (max-width: 560px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .nav-inner { padding: 10px 16px; }
  section.block { padding: 38px 0; }
  .hero { padding: 44px 0 30px; }

  .hero-sub { font-size: 1rem; }
  .authors { font-size: 1rem; margin: 20px auto 6px; }
  .affil { font-size: .88rem; }
  .btn-row { gap: 9px; margin-top: 22px; }
  .btn { padding: 10px 16px; font-size: .9rem; }

  .sec-eyebrow { font-size: 1rem; letter-spacing: .05em; }
  .sec-head { margin-bottom: 20px; }
  .lead { font-size: 1rem; }
  .sec-desc { font-size: .96rem; }

  .rb-head h3 { font-size: 1.12rem; }
  .rb-head .rb-note { font-size: .85rem; }
  .rc-grid.g3 { grid-template-columns: 1fr; }

  .chart-card { padding: 18px 14px 12px; }
  .chart-head { gap: 10px; }
  .chart-legend { gap: 12px; }

  .take { padding: 16px 16px; gap: 12px; }
  .take p { font-size: .96rem; }
  .abl-bullets li { font-size: .95rem; }
  .bibtex { padding: 18px 16px; }
  .bibtex pre { font-size: .74rem; }
  .bibtex .copy { top: 10px; right: 10px; padding: 5px 10px; font-size: .74rem; }
}
