/* ===========================================================================
   FloMo — "Tactile Compare Engine"
   Standalone theme. Built entirely from the LOCKED FloMo palette tokens.
   No @import of index.css. Light, panel-based, instrument-like.
   =========================================================================== */
:root {
  /* ---- LOCKED palette (verbatim) ---- */
  --flomo-orange: #f09018;
  --flomo-orange-dark: #d97d08;
  --flomo-teal: #307890;
  --flomo-teal-dark: #245d70;
  --ink: #1f2733;
  --muted: #5b6675;
  --soft-bg: #f6f8fa;
  --soft-teal: #eaf3f5;
  --soft-orange: #fcf1e3;
  --fail-red: #c0392b;
  --success-green: #1e7a3d;

  /* ---- derived (tints/shades/alpha of the locked hues only) ---- */
  --line: #e4e8ee;
  --line-strong: #d3dae1;
  --paper: #ffffff;
  --orange-12: rgba(240,144,24,.12);
  --orange-22: rgba(240,144,24,.22);
  --orange-40: rgba(240,144,24,.40);
  --teal-12: rgba(48,120,144,.12);
  --teal-22: rgba(48,120,144,.22);
  --ink-shadow: rgba(20,30,45,.10);
  --shadow-sm: 0 1px 2px rgba(20,30,45,.05);
  --shadow-md: 0 10px 30px rgba(20,30,45,.10);
  --radius: 16px;

  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.6;
  /* faint workbench dot-grid */
  background-image: radial-gradient(rgba(48,120,144,.05) 1px, transparent 1px);
  background-size: 22px 22px;
}
img { max-width: 100%; }
a { color: var(--flomo-teal-dark); }

/* progressive enhancement toggles */
html:not(.js) .js-only { display: none !important; }
html.js .nojs-fallback { display: none !important; }

/* clear sticky nav for in-page anchors */
section[id], footer[id] { scroll-margin-top: 76px; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 1.2rem; }
.has-text-centered { text-align: center; }

/* ---------------------------------------------------------------- NAV ---- */
.flomo-nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.88);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1140px; margin: 0 auto; padding: .5rem 1.2rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.nav-brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; }
.nav-brand img { height: 1.7rem; display: block; }
.nav-links { display: flex; align-items: center; gap: .1rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav-links a {
  display: inline-block; padding: .35rem .6rem; border-radius: 8px;
  color: var(--muted); font-weight: 600; font-size: .88rem; text-decoration: none;
  border: 1px solid transparent; transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.nav-links a:hover { color: var(--ink); background: var(--soft-bg); }
.nav-links a.is-active { color: var(--flomo-orange-dark); background: var(--soft-orange); }
.nav-links a.nav-paper {
  border: 1px solid var(--flomo-teal-dark); background: var(--flomo-teal-dark); color: #fff;
  border-radius: 999px; padding: .28rem .8rem; font-weight: 700; font-size: .82rem;
}
.nav-links a.nav-paper:hover { border-color: var(--flomo-teal); background: var(--flomo-teal); color: #fff; }
.nav-links a.nav-code {
  border: 1px solid var(--flomo-orange); color: var(--flomo-orange-dark);
  border-radius: 999px; padding: .28rem .8rem; font-weight: 700; font-size: .82rem;
}
.nav-links a.nav-code:hover { background: var(--soft-orange); }
.nav-links a:focus-visible { outline: 2px solid var(--flomo-teal); outline-offset: 2px; }

/* --------------------------------------------------------------- HERO ---- */
.hero { padding: 3.2rem 0 2.6rem; }
.hero-grid {
  display: block; max-width: 47rem;
}
.venue-pill {
  display: inline-block; background: var(--soft-orange); color: var(--flomo-orange-dark);
  border: 1px solid #f0c89a; border-radius: 999px; padding: .25rem .9rem;
  font-weight: 600; font-size: .82rem; margin-bottom: 1.1rem;
}
.flomo-logo { height: 3.4rem; display: block; margin-bottom: 1.1rem; }
.paper-title {
  font-family: var(--font-display); font-weight: 700; line-height: 1.12;
  font-size: clamp(1.8rem, 3.6vw, 3rem); letter-spacing: -.015em;
  color: var(--ink); margin: 0 0 1.1rem;
}
.paper-title span { display: block; color: var(--flomo-teal-dark); }
.hero-thesis { font-size: 1.12rem; color: var(--ink); max-width: 36rem; margin: 0 0 1rem; }
.hero-thesis b { color: var(--flomo-orange-dark); }
.author-line { color: var(--muted); font-size: .95rem; margin: 0 0 1.4rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  border-radius: 999px; padding: .62rem 1.25rem; font-weight: 600; font-size: .95rem;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
.btn-ico { font-size: 1.05em; line-height: 1; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-dark.is-disabled { background: #cdd3da; color: #fff; cursor: not-allowed; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--flomo-orange); color: var(--flomo-orange-dark); transform: translateY(-1px); }

/* hero motion->colour key card */
.hero-key {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-md); padding: 1.3rem 1.4rem; position: relative;
}
.hero-key::before {
  content: ""; position: absolute; left: 0; top: 1.3rem; bottom: 1.3rem; width: 4px;
  border-radius: 0 4px 4px 0; background: linear-gradient(180deg, var(--flomo-orange), var(--flomo-teal));
}
.key-head { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; margin-bottom: .9rem; }
.key-eyebrow { font-family: var(--font-display); font-weight: 700; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--flomo-teal); }
.key-eq { font-family: var(--font-mono); font-size: .78rem; color: var(--muted); }
.key-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.key-list li { display: flex; align-items: center; gap: .7rem; font-size: .9rem; color: var(--ink); }
.key-sw { width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--line-strong); flex: 0 0 auto; box-shadow: var(--shadow-sm); }
.key-list code { margin-left: auto; font-family: var(--font-mono); font-size: .76rem; color: var(--muted); }
.key-foot { margin: .95rem 0 0; font-size: .82rem; color: var(--muted); }

/* wide 3-panel scene-flow clips: an inline auto-looping video on white.
   The clips are rendered "clean" (no baked-in titles), so the panel labels
   live in the HTML .flow-legend below and stay aligned + legible at any size. */
.flow-stage {
  max-width: 940px; margin: 1.4rem auto 0; overflow: hidden;
  aspect-ratio: 974 / 330; background: #fff;
  border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm);
}
.flow-video {
  display: block; width: 100%; height: 100%; object-fit: contain;
  background: #fff; border: 0; border-radius: 0; box-shadow: none;
}
/* legend: one centered label per panel on a 3-equal-column grid that mirrors
   the video's three equal panels, so each label sits under its panel at any width */
.flow-legend {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem;
  max-width: 940px; margin: .8rem auto 0;
  color: var(--muted); font-size: .82rem; text-align: center;
}
.flow-legend span { display: block; padding: 0 .3rem; line-height: 1.35; }
.flow-legend b { color: var(--ink); font-weight: 600; }
/* --------------------------------------------------------------- BANDS --- */
.band { padding: 3.4rem 0; border-top: 1px solid var(--line); }
.band-soft { background: var(--soft-bg); }
.band-head { text-align: center; max-width: 760px; margin: 0 auto 2rem; }
.kicker {
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: .14em;
  font-size: 1.02rem; font-weight: 700; color: var(--flomo-teal); margin: 0 0 .6rem;
}
.band-title {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em;
  font-size: clamp(1.5rem, 2.8vw, 2.1rem); margin: 0; color: var(--ink);
}
.band-title .accent { color: var(--flomo-orange); }
.band-sub { color: var(--muted); margin: .7rem auto 0; font-size: 1rem; max-width: 640px; }
.prose { max-width: 760px; margin: 0 auto; color: var(--ink); }
.prose p { margin: 0 0 1rem; }
.prose b { color: var(--ink); }
.prose em { color: var(--flomo-teal-dark); font-style: italic; }

.feature-title {
  font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; text-align: center;
  margin: 2.4rem 0 .5rem; color: var(--ink);
}
.feature-sub { color: var(--muted); text-align: center; max-width: 680px; margin: 0 auto 1.3rem; font-size: .95rem; }
.feature-sub b, .feature-foot b { color: var(--ink); }
.feature-foot { color: var(--muted); text-align: center; max-width: 680px; margin: 1rem auto 0; font-size: .85rem; }
.figure-caption { color: var(--muted); font-size: .9rem; margin-top: .6rem; text-align: center; }
.figure-caption b { color: var(--ink); }

.try-pill {
  display: inline-block; vertical-align: middle; font-family: var(--font-display);
  font-size: .6rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--flomo-orange-dark); background: var(--soft-orange);
  border: 1px solid #f0c89a; border-radius: 999px; padding: .15rem .55rem; margin-left: .4rem;
}

/* ---- generic panel ---- */
.panel {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 1.4rem; position: relative;
}
.panel-tab {
  display: inline-block; font-family: var(--font-display); font-size: .72rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--flomo-teal-dark);
  background: var(--soft-teal); border: 1px solid #d6e6ea; border-radius: 999px;
  padding: .22rem .75rem; margin-bottom: 1rem;
}
.panel-tab .dot { color: var(--flomo-orange-dark); }

/* --------------------------------------------------- TL;DR + ARCH ------- */
.tldr {
  display: flex; gap: 1rem; align-items: flex-start; max-width: 860px; margin: 0 auto 2rem;
  background: linear-gradient(180deg, var(--soft-teal), #fff);
  border: 1px solid #d6e6ea; border-left: 5px solid var(--flomo-teal);
  border-radius: 14px; padding: 1.2rem 1.4rem;
}
.tldr-tag {
  font-family: var(--font-display); font-weight: 700; font-size: .78rem; letter-spacing: .08em;
  text-transform: uppercase; color: #fff; background: var(--flomo-teal-dark);
  border-radius: 8px; padding: .25rem .6rem; flex: 0 0 auto; margin-top: .15rem;
}
.tldr p { margin: 0; color: var(--ink); }
.tldr b { color: var(--flomo-teal-dark); }

.arch-panel { max-width: 900px; margin: 0 auto; text-align: center; }
/* The source figure also contains the tokenization diagram. Crop that half out
   here so architecture gets a focused figure and tokenization can stand alone
   in the following section. */
.arch-crop {
  width: min(100%, 820px); aspect-ratio: 915 / 720; margin: 0 auto; overflow: hidden;
  border-radius: 10px; background: #fff;
}
.arch-crop > img {
  display: block; width: 175.19%; max-width: none; height: auto;
}

/* --------------------------------------------------- CONTRIBUTIONS ------ */
.contrib-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.contrib-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  padding: 1.5rem 1.4rem; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.contrib-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #f0c89a; }
.contrib-card .num {
  font-family: var(--font-mono); font-weight: 700; font-size: 1rem;
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.4rem; height: 2.4rem; border-radius: 10px;
  background: var(--soft-orange); color: var(--flomo-orange-dark);
  margin-bottom: .85rem; transition: background .18s ease, color .18s ease;
}
.contrib-card:hover .num { background: var(--flomo-orange); color: #fff; }
.contrib-card h4 { font-family: var(--font-display); font-weight: 700; margin: 0 0 .45rem; color: var(--ink); font-size: 1.05rem; }
.contrib-card p { color: var(--muted); font-size: .94rem; margin: 0; }
.contrib-card em { color: var(--flomo-orange-dark); font-style: normal; font-weight: 600; }

/* --------------------------------------------------- CHIPS / TABS ------- */
.chip-row { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin: 0 0 1.2rem; }
.task-chip {
  border: 1px solid var(--line-strong); background: #fff; color: var(--muted);
  border-radius: 999px; padding: .42rem .95rem; font-weight: 600; font-size: .88rem;
  cursor: pointer; font-family: var(--font-body); transition: all .15s ease;
}
.task-chip:hover { border-color: var(--flomo-orange); color: var(--ink); }
.task-chip.active { background: var(--flomo-orange); border-color: var(--flomo-orange); color: #fff; }
.task-chip:focus-visible { outline: 2px solid var(--flomo-teal); outline-offset: 2px; }

/* --------------------------------------------------- DEMO STAGE --------- */
.demo-stage {
  position: relative; max-width: 860px; margin: 0 auto; aspect-ratio: 16 / 9;
  background: #000; border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  cursor: pointer; box-shadow: var(--shadow-md); transition: box-shadow .18s ease;
}
.demo-stage.small { max-width: 520px; }
.stage-poster, .stage-video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; display: block;
}
.stage-poster { z-index: 1; }
.stage-video { z-index: 2; }
.stage-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 72px; height: 72px; border-radius: 50%; background: var(--flomo-orange);
  border: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 18px rgba(0,0,0,.35); transition: transform .15s ease, background .15s ease; z-index: 5;
}
.stage-play:hover { transform: translate(-50%, -50%) scale(1.07); background: var(--flomo-orange-dark); }
.stage-play:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.play-tri { width: 0; height: 0; border-style: solid; border-width: 13px 0 13px 22px; border-color: transparent transparent transparent #fff; margin-left: 5px; }
.demo-stage.is-playing { box-shadow: 0 0 0 4px var(--orange-40), var(--shadow-md); }
.demo-stage.is-playing .stage-play, .demo-stage.is-playing .stage-poster { display: none; }

.demo-meta { text-align: center; margin-top: 1rem; }
.demo-status.vbadge { font-size: .72rem; padding: .22rem .7rem; }
.demo-caption { color: var(--muted); margin: .55rem auto 0; max-width: 640px; }
.rollout-block { margin-top: 2.8rem; padding-top: .2rem; }
.rollout-panel { max-width: 940px; margin: 0 auto; }
.rollout-title { margin-top: 0; }

/* on-video annotation overlay, adapted from static/overlay-snippet.html */
.video-overlay {
  position: absolute; z-index: 4; pointer-events: none;
}
.video-overlay-top {
  top: .7rem; left: .7rem; right: .7rem;
  display: flex; gap: .4rem; flex-wrap: wrap; align-items: flex-start;
}
.video-overlay-bottom {
  left: 0; right: 0; bottom: 0; padding: 1.4rem .9rem .8rem;
  background: linear-gradient(to top, rgba(10,14,20,.72), rgba(10,14,20,0));
}
.ov-pill {
  display: inline-flex; align-items: baseline; gap: .32rem;
  border-radius: 999px; padding: .2rem .62rem;
  font-family: var(--font-display); font-size: .72rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  background: rgba(255,255,255,.92); color: var(--ink);
  box-shadow: 0 1px 6px rgba(20,30,45,.28);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.ov-pill .k {
  font-weight: 600; color: var(--muted); text-transform: uppercase; font-size: .62rem;
}
.ov-pill.model, .ov-pill.id { background: var(--soft-teal); color: var(--flomo-teal-dark); }
.ov-pill.speed, .ov-pill.ood { background: var(--soft-orange); color: var(--flomo-orange-dark); }
.ov-pill.ok { background: #e6f4ea; color: var(--success-green); }
.ov-pill.fail { background: #fdecec; color: var(--fail-red); }
.overlay-prompt {
  color: #fff; font-size: .95rem; line-height: 1.35; margin: .45rem 0 0;
  text-shadow: 0 1px 3px rgba(0,0,0,.6);
}
.overlay-prompt .k {
  font-family: var(--font-display); font-size: .64rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.72);
  margin-right: .4rem;
}

/* --------------------------------------------------- VBADGES ------------ */
.vbadge {
  display: inline-block; border-radius: 999px; padding: .08rem .55rem;
  font-size: .66rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  vertical-align: middle; margin-left: .35rem; font-family: var(--font-display);
}
.vbadge.id   { background: var(--soft-teal);   color: var(--flomo-teal-dark); }
.vbadge.ood  { background: var(--soft-orange); color: var(--flomo-orange-dark); }
.vbadge.ok   { background: #e6f4ea; color: var(--success-green); }
.vbadge.fail { background: #fdecec; color: var(--fail-red); }

/* --------------------------------------------------- VIDEO GRID --------- */
.vid-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.4rem; }
.vid-grid.two { grid-template-columns: repeat(2, 1fr); }
.video-card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
}
.video-card video { width: 100%; display: block; background: #000; aspect-ratio: 16 / 9; object-fit: contain; }
.video-card .vcap { padding: .6rem .9rem; font-size: .88rem; color: var(--muted); }
.video-card .vcap .task { font-weight: 700; color: var(--ink); }

/* ============================================================ SIGNATURE 1
   BEFORE / AFTER WIPE — pixels vs. motion
   ========================================================================= */
.cw {
  --split: 52;
  max-width: 560px; margin: 0 auto; --panel-aspect: 0.917;
}
.cw-window {
  position: relative; width: 100%; aspect-ratio: var(--panel-aspect);
  border-radius: 14px; overflow: hidden; background: #0d1117;
  border: 1px solid var(--line); box-shadow: var(--shadow-md);
  cursor: ew-resize; touch-action: pan-y;
}
.cw-layer { position: absolute; inset: 0; overflow: hidden; }
.cw-layer video {
  position: absolute; top: 0; height: 100%; width: auto; max-width: none; display: block;
}
.cw-before { z-index: 1; }
.cw-before video { left: 0; }                 /* panel 1: RGB observation */
.cw-after  { z-index: 2; clip-path: inset(0 0 0 calc(var(--split) * 1%)); }
.cw-after video { left: -200%; }              /* panel 3: scene flow as RGB */
.cw-tag {
  position: absolute; bottom: .6rem; z-index: 4; font-family: var(--font-display);
  font-size: .68rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  padding: .2rem .55rem; border-radius: 999px; pointer-events: none;
  background: rgba(13,17,23,.72); color: #fff; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.cw-tag-l { left: .6rem; }
.cw-tag-r { right: .6rem; color: #fff; }
.cw-handle {
  position: absolute; top: 0; bottom: 0; left: calc(var(--split) * 1%); z-index: 5;
  width: 3px; margin-left: -1.5px; background: var(--flomo-orange);
  box-shadow: 0 0 0 1px rgba(255,255,255,.5); pointer-events: none;
}
.cw-grip {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 34px; height: 34px; border-radius: 50%; background: var(--flomo-orange);
  border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,.35);
}
.cw-grip::before, .cw-grip::after {
  content: ""; position: absolute; top: 50%; width: 0; height: 0;
  border-style: solid; border-width: 5px 6px 5px 6px;
}
.cw-grip::before { left: 5px; transform: translateY(-50%); border-color: transparent #fff transparent transparent; }
.cw-grip::after  { right: 5px; transform: translateY(-50%); border-color: transparent transparent transparent #fff; }
.cw-range {
  position: absolute; inset: 0; z-index: 6; width: 100%; height: 100%;
  margin: 0; opacity: 0; cursor: ew-resize;
}
.cw-range:focus-visible + ::after { outline: none; }
.cw-window:focus-within { outline: 3px solid var(--flomo-teal); outline-offset: 2px; }
.cw-caption { text-align: center; color: var(--muted); max-width: 560px; margin: 1rem auto 0; }

/* --------------------------------------------------- TWO-STAGE ---------- */
.stage-flow {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: stretch;
  max-width: 860px; margin: 0 auto;
}
.stage-card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.3rem 1.4rem;
  box-shadow: var(--shadow-sm); border-top: 4px solid var(--flomo-teal);
  transition: transform .18s ease, box-shadow .18s ease;
}
.stage-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stage-card.s2 { border-top-color: var(--flomo-orange); }
.stage-num {
  display: inline-block; font-family: var(--font-display); font-size: .7rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--flomo-teal-dark);
  background: var(--soft-teal); border-radius: 999px; padding: .15rem .7rem; margin-bottom: .55rem;
}
.stage-card.s2 .stage-num { color: var(--flomo-orange-dark); background: var(--soft-orange); }
.stage-card h5 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; margin: 0 0 .4rem; color: var(--ink); }
.stage-card p { color: var(--muted); font-size: .93rem; margin: 0; }
.stage-card em { color: var(--flomo-orange-dark); font-style: normal; font-weight: 600; }
.stage-link { display: flex; align-items: center; justify-content: center; font-size: 1.8rem; color: var(--flomo-orange); font-weight: 700; }

/* ============================================================ SIGNATURE 3
   HEAD-TO-HEAD DUEL
   ========================================================================= */
.duel { max-width: 880px; margin: 0 auto 2.2rem; }
.duel-board {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 1.2rem; align-items: stretch; margin-top: .4rem;
}
.duel-side {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: var(--soft-bg); border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1rem 1.3rem;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.duel-side.is-winner { border-color: var(--flomo-orange); background: var(--soft-orange); box-shadow: 0 0 0 3px var(--orange-22); }
.duel-pick-label { display: flex; flex-direction: column; gap: .3rem; width: 100%; margin-bottom: .7rem; }
.duel-pick-label > span { font-family: var(--font-display); font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.duel-pick {
  font-family: var(--font-body); font-size: .92rem; font-weight: 600; color: var(--ink);
  background: #fff; border: 1px solid var(--line-strong); border-radius: 10px; padding: .5rem .7rem; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 1.15em, calc(100% - 13px) 1.15em; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.duel-pick:hover { border-color: var(--flomo-orange); }
.duel-pick:focus-visible { outline: 2px solid var(--flomo-teal); outline-offset: 2px; }
.duel-fixed-name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--ink); margin-bottom: .5rem; }
.duel-fixed-sub { font-size: .82rem; color: var(--muted); margin-top: .55rem; }
.duel-score {
  font-family: var(--font-mono); font-weight: 700; font-size: 2.9rem; line-height: 1; color: var(--ink);
  font-variant-numeric: tabular-nums; margin: .2rem 0 .7rem;
}
.duel-score.good { color: var(--flomo-teal-dark); }
.duel-score.bad  { color: var(--fail-red); }
.is-winner .duel-score { color: var(--flomo-orange-dark); }
.duel-meter { width: 100%; height: 14px; background: #e7ebef; border-radius: 999px; overflow: hidden; }
.duel-fill {
  height: 100%; width: 0%; border-radius: 999px; background: var(--flomo-teal);
  transition: width .9s cubic-bezier(.2,.7,.2,1);
}
.is-winner .duel-fill { background: var(--flomo-orange); }
.duel-fill.bad { background: var(--fail-red); }
.duel-vs { display: flex; align-items: center; justify-content: center; }
.duel-vs span {
  font-family: var(--font-display); font-weight: 700; font-size: .9rem; color: var(--muted);
  width: 44px; height: 44px; border-radius: 50%; border: 1px dashed var(--line-strong);
  display: flex; align-items: center; justify-content: center; background: #fff;
}
.duel-verdict { text-align: center; margin: 1.1rem 0 0; color: var(--ink); font-size: .98rem; min-height: 1.4em; }
.duel-verdict b { color: var(--flomo-orange-dark); }
.duel-verdict.static b { color: var(--fail-red); }

/* --------------------------------------------------- RESULTS SPLIT ------ */
.results-split { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; align-items: stretch; }
/* reset the browser's default <figure> margin so fig-card panels match the
   width/height of the sibling .panel divs in a .results-split grid */
.fig-card { margin: 0; display: flex; flex-direction: column; }
.fig-card img { border-radius: 10px; display: block; }
/* bottom-align the caption so it lines up with the rank-panel note across the split */
.fig-card .figure-caption { margin-top: auto; padding-top: 1rem; }
.lightboxable { cursor: zoom-in; }
.rank-panel { display: flex; flex-direction: column; }
.rank-note { color: var(--muted); font-size: .9rem; margin: 1rem 0 0; }
.rank-note b { color: var(--ink); }
.rank-note em { color: var(--flomo-orange-dark); font-style: normal; font-weight: 600; }

/* ---- vertical bar chart (compare-app.js sets bar heights from data-value) ---- */
.vbars {
  display: flex; align-items: stretch; justify-content: space-between; gap: .9rem;
  flex: 1 1 auto; min-height: 240px; margin: .9rem 0 .2rem;
}
.vbar-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.vbar-plot {
  flex: 1 1 auto; width: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end; gap: .3rem;
}
.vbar-val { font-family: var(--font-mono); font-weight: 700; font-size: .92rem; color: var(--ink); }
.vbar {
  width: 100%; max-width: 58px; height: 0; border-radius: 7px 7px 0 0;
  background: #aeb6c0; transition: height 1s cubic-bezier(.2,.7,.2,1);
}
.vbar.flomo { background: var(--flomo-orange); }
.vbar-label {
  margin-top: .55rem; font-size: .74rem; line-height: 1.2; font-weight: 600;
  color: var(--ink); text-align: center;
}

/* --------------------------------------------------- TABLES ------------- */
.ood-block { margin-top: 3.2rem; padding-top: 2.8rem; border-top: 1px solid var(--line); }
.results-table { margin: 0 auto; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm); background: #fff; }
.table-wrap { overflow-x: auto; }
.results-table.wide { max-width: 820px; }
.results-table table { width: 100%; border-collapse: collapse; }
.results-table th, .results-table td {
  text-align: center; vertical-align: middle; padding: .6rem .7rem; font-size: .9rem;
  border-bottom: 1px solid var(--line);
}
.results-table thead th { background: var(--soft-bg); font-family: var(--font-display); font-weight: 700; color: var(--ink); font-size: .82rem; }
.results-table .lcell { text-align: left; font-weight: 600; }
.results-table tbody tr { transition: background .15s ease; }
.results-table tbody tr:hover { background: var(--soft-teal); }
.results-table tr.ours { background: var(--soft-orange); font-weight: 700; }
.results-table tr.ours:hover { background: #fbe6cd; }
.results-table tr.ours .lcell { color: var(--flomo-orange-dark); }
.metric-sub { color: var(--muted); font-size: .78rem; font-weight: 400; }

.sim-fig { max-width: 980px; margin: 0 auto; }
.ood-layout { margin-top: 1.2rem; }
.ood-table { max-width: 980px; }
.ood-stage-wrap { margin-top: 2.8rem; }

/* --------------------------------------------------- CORE INSIGHTS ------ */
.insights-block {
  margin-top: 4.2rem; padding: 2.4rem;
  background: linear-gradient(135deg, var(--soft-teal) 0%, #fff 48%, var(--soft-orange) 100%);
  border: 1px solid var(--line-strong); border-top: 5px solid var(--flomo-orange);
  border-radius: 20px; box-shadow: var(--shadow-md);
}
.insights-head { max-width: 760px; margin: 0 auto 1.8rem; text-align: center; }
.insights-head .kicker { margin-bottom: .45rem; }
.insights-title {
  font-family: var(--font-display); font-size: clamp(1.5rem, 2.8vw, 2.15rem);
  line-height: 1.18; letter-spacing: -.015em; color: var(--ink); margin: 0;
}
.insights-head > p:last-child { max-width: 640px; margin: .7rem auto 0; color: var(--muted); }
.insights-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.3rem; }
.insight-card {
  margin: 0; padding: 1.35rem; overflow: hidden;
  background: rgba(255,255,255,.94); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow-sm);
}
.insight-stat { display: flex; align-items: center; gap: .85rem; margin-bottom: 1rem; }
.insight-stat strong {
  flex: 0 0 auto; font-family: var(--font-mono); font-size: clamp(2.3rem, 4.2vw, 3.6rem);
  line-height: .95; color: var(--flomo-orange-dark); letter-spacing: -.05em;
}
.insight-stat span {
  font-family: var(--font-display); font-size: .78rem; line-height: 1.25; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; color: var(--flomo-teal-dark);
}
.insight-visual {
  height: clamp(235px, 26vw, 330px); display: flex; align-items: center; justify-content: center;
  overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 11px;
}
.insight-visual img { width: 100%; height: 100%; object-fit: contain; display: block; }
.insight-card figcaption { color: var(--muted); font-size: .9rem; margin-top: 1rem; }
.insight-card figcaption b { color: var(--ink); }

/* auto-cycling OOD rollout carousel */
.ood-carousel { position: relative; width: 100%; max-width: 900px; margin: 0 auto; }
.ood-video {
  display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #000;
  border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-md);
}
.ood-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 42px; height: 42px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(13,17,23,.55); color: #fff; font-size: 1.5rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s ease, transform .15s ease;
}
.ood-arrow:hover { background: var(--flomo-orange); }
.ood-arrow:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.ood-arrow.prev { left: .55rem; }
.ood-arrow.next { right: .55rem; }
/* --------------------------------------------------- COMPARISON --------- */
/* three Pull String rollouts (FloMo + two baselines) autoplaying side by side */
.cmp { max-width: 1040px; margin: 0 auto; }
.cmp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; margin-top: .4rem; }
.cmp-card {
  margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
}
.cmp-card.win { border-color: var(--flomo-orange); box-shadow: 0 0 0 2px var(--orange-22), var(--shadow-sm); }
.cmp-video-wrap { position: relative; background: #000; aspect-ratio: 16 / 9; }
.cmp-video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #000; }
.cmp-card .video-overlay-top { top: .45rem; left: .45rem; right: .45rem; gap: .25rem; }
.cmp-card .ov-pill { font-size: .56rem; padding: .12rem .4rem; box-shadow: 0 1px 4px rgba(20,30,45,.24); }
.cmp-card .ov-pill .k { font-size: .5rem; }
.cmp-card figcaption {
  padding: .7rem .9rem .9rem; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem;
}
.cmp-name { font-family: var(--font-display); font-weight: 700; color: var(--ink); font-size: .95rem; }
.cmp-card.win .cmp-name { color: var(--flomo-orange-dark); }
@media (max-width: 768px) { .cmp-grid { grid-template-columns: 1fr; } }

/* --------------------------------------------------- LIGHTBOX ----------- */
.modal { display: none; position: fixed; inset: 0; z-index: 80; align-items: center; justify-content: center; }
.modal.is-active { display: flex; }
.modal-background { position: absolute; inset: 0; background: rgba(13,17,23,.82); }
.modal-content { position: relative; z-index: 1; max-width: 96vw; }
.lightbox-img { max-height: 86vh; max-width: 96vw; border-radius: 10px; background: #fff; display: block; margin: 0 auto; }
.modal-close {
  position: absolute; top: 1rem; right: 1rem; z-index: 2; width: 44px; height: 44px;
  border-radius: 50%; border: none; background: rgba(255,255,255,.18); cursor: pointer;
}
.modal-close::before, .modal-close::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 20px; height: 2px; background: #fff;
}
.modal-close::before { transform: translate(-50%,-50%) rotate(45deg); }
.modal-close::after  { transform: translate(-50%,-50%) rotate(-45deg); }
.modal-close:hover { background: rgba(255,255,255,.32); }

/* --------------------------------------------------- FOOTER ------------- */
.footer-flomo { background: var(--soft-bg); padding: 2.2rem 0; border-top: 1px solid var(--line); }
.footer-flomo p { color: var(--muted); font-size: .88rem; margin: 0; }
.footer-flomo a { color: var(--flomo-teal-dark); }

/* --------------------------------------------------- RESPONSIVE --------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .results-split { grid-template-columns: 1fr; }
  .contrib-grid { grid-template-columns: 1fr; }
  .insights-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .vid-grid, .vid-grid.two { grid-template-columns: 1fr; }
  .duel-board { grid-template-columns: 1fr; }
  .duel-vs { transform: rotate(90deg); margin: -.2rem 0; }
  .stage-flow { grid-template-columns: 1fr; }
  .stage-link { transform: rotate(90deg); }
  .tldr { flex-direction: column; }
  .vbars { min-height: 200px; }
  .insights-block { padding: 1.3rem; }
  .insight-visual { height: min(72vw, 320px); }
}
@media (max-width: 520px) {
  .video-overlay-top .ov-pill.model,
  .video-overlay-top .ov-pill.speed { display: none; }
  .overlay-prompt { font-size: .78rem; }
  .stage-play { width: 58px; height: 58px; }
  .play-tri { border-width: 10px 0 10px 17px; }
}

/* --------------------------------------------------- REDUCED MOTION ----- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { scroll-behavior: auto !important; }
  .vbar, .duel-fill, .duel-side,
  .contrib-card, .stage-card, .btn-ghost, .stage-play, .task-chip { transition: none !important; }
  .contrib-card:hover, .stage-card:hover, .btn-ghost:hover { transform: none; }
}
