:root {
  color-scheme: dark;
  --bg: #0b0b0d;
  --panel: #121216;
  --panel-2: #18181d;
  --ink: #f5f4f0;
  --muted: #99979f;
  --line: rgba(255, 255, 255, 0.105);
  --purple: #9b6de0;
  --purple-soft: rgba(142, 88, 219, 0.14);
  --lime: #c4db22;
  --orange: #ff9b61;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); }
button, select, input { font: inherit; }
a { color: inherit; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  height: 72px; padding: 0 clamp(18px, 4vw, 58px);
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 11, 13, 0.88); backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand img, .site-footer img { width: 38px; height: 38px; border-radius: 10px; }
.brand > span, .site-footer div > span { display: grid; gap: 2px; }
.brand strong { font-size: 14px; }
.brand small, .site-footer small { color: var(--muted); font-size: 10px; letter-spacing: .06em; }
.topbar-actions { display: flex; align-items: center; gap: 20px; }
.docs-link { color: #c9b3ec; font-size: 11px; font-weight: 650; text-decoration: none; }
.docs-link:hover { color: var(--ink); }
.runtime { display: flex; align-items: center; gap: 9px; color: var(--muted); font: 600 10px ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; }
.runtime b { color: var(--ink); border-left: 1px solid var(--line); padding-left: 12px; }
.status-dot, .live-dot, .source-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 12px rgba(196, 219, 34, .65); }
.source-dot { background: var(--orange); box-shadow: 0 0 12px rgba(255, 155, 97, .55); }

main { min-width: 0; }
.intro {
  max-width: 1580px; margin: 0 auto; padding: clamp(52px, 6vw, 92px) clamp(18px, 4vw, 58px) clamp(34px, 4vw, 60px);
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); align-items: end; gap: clamp(36px, 8vw, 130px);
}
.eyebrow { margin: 0 0 14px; color: var(--lime); font-size: 10px; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; }
.intro h1, .section-heading h2, .evidence h2 { margin: 0; letter-spacing: -.045em; }
.intro h1 { max-width: 900px; font-size: clamp(42px, 6vw, 88px); line-height: .98; font-weight: 580; }
.intro h1 em { color: var(--purple); font-family: Georgia, serif; font-weight: 400; }
.intro > p { margin: 0 0 5px; color: #c3c1c6; font-size: clamp(15px, 1.35vw, 19px); line-height: 1.65; }

.workbench {
  max-width: 1580px; margin: 0 auto clamp(90px, 10vw, 150px); padding: 0 clamp(18px, 4vw, 58px);
  display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 16px; align-items: stretch;
}
.scene-sidebar, .player-column { border: 1px solid var(--line); background: var(--panel); border-radius: 14px; overflow: hidden; }
.scene-sidebar { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.sidebar-heading { height: 30px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font: 650 10px ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; }
.sidebar-heading small { color: #67656d; }
.scene-card {
  width: 100%; padding: 8px; display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 11px; align-items: center;
  text-align: left; color: var(--ink); border: 1px solid transparent; border-radius: 10px; background: transparent; cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.scene-card:hover { background: rgba(255,255,255,.035); transform: translateY(-1px); }
.scene-card.is-active { border-color: rgba(155,109,224,.72); background: var(--purple-soft); }
.scene-card img { width: 72px; aspect-ratio: 4/3; object-fit: cover; border-radius: 7px; background: #050505; }
.scene-card-copy { min-width: 0; display: grid; gap: 5px; }
.scene-card-copy > span { display: flex; justify-content: space-between; gap: 5px; }
.scene-card-copy b, .scene-card-copy i { font: 700 8px ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; }
.scene-card-copy b { color: var(--purple); }
.scene-card-copy i { color: var(--lime); font-style: normal; }
.scene-card-copy strong { font-size: 13px; }
.scene-card-copy small { color: var(--muted); font: 9px ui-monospace, monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-note { margin-top: 10px; padding: 15px; border-radius: 9px; background: #0e0e11; border: 1px solid var(--line); }
.sidebar-note span, .baseline-links > span { color: var(--muted); font: 700 9px ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; }
.sidebar-note p { margin: 9px 0 0; color: #bab8bf; font-size: 12px; line-height: 1.55; }
.baseline-links { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 3px; }
.baseline-links > span { padding: 4px 7px 8px; }
.baseline-links a { padding: 8px 7px; display: flex; justify-content: space-between; color: #c9c7cc; font-size: 11px; text-decoration: none; border-radius: 6px; }
.baseline-links a:hover { color: var(--ink); background: rgba(255,255,255,.04); }
.baseline-links b { color: var(--purple); }

.player-column { min-width: 0; background: #08080a; }
.player-heading { min-height: 76px; padding: 15px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.player-heading > div { display: grid; gap: 5px; }
.player-heading span { color: var(--purple); font: 700 9px ui-monospace, monospace; letter-spacing: .11em; text-transform: uppercase; }
.player-heading h2 { margin: 0; font-size: clamp(17px, 1.7vw, 24px); letter-spacing: -.02em; }
.player-heading p { max-width: 410px; margin: 0; color: var(--muted); font-size: 11px; text-align: right; }
.viewer-topline { min-height: 38px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); color: var(--muted); font: 650 9px ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; }
.viewer-topline > span:first-child { display: inline-flex; align-items: center; gap: 8px; color: #c8c6cb; }
.viewer-topline > span:last-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.canvas-wrap, .flames-stage { position: relative; aspect-ratio: 16 / 9; min-height: 430px; overflow: hidden; background: #000; }
canvas { width: 100%; height: 100%; display: block; }
#reference-video { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; display: none; object-fit: contain; pointer-events: none; clip-path: inset(0 50% 0 0); }
.compare-active #reference-video, .compare-active .compare-divider, .compare-active .compare-label { display: block; }
.compare-divider { display: none; position: absolute; z-index: 2; top: 0; bottom: 0; left: 50%; width: 1px; background: rgba(255,255,255,.8); box-shadow: 0 0 12px rgba(255,255,255,.38); }
.compare-label { display: none; position: absolute; z-index: 3; bottom: 16px; padding: 7px 10px; color: #fff; background: rgba(4,4,5,.82); border: 1px solid rgba(255,255,255,.24); border-radius: 6px; font: 700 8px ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; }
.compare-label-left { left: 16px; } .compare-label-right { right: 16px; }
.fallback { position: absolute; inset: 0; z-index: 8; padding: 30px; display: grid; place-content: center; text-align: center; background: #09090b; }
.fallback p { color: var(--muted); }
.scene-badge { position: absolute; z-index: 3; top: 14px; left: 14px; padding: 10px 12px; display: grid; gap: 4px; color: var(--muted); background: rgba(10,10,12,.75); border: 1px solid rgba(255,255,255,.13); border-radius: 7px; backdrop-filter: blur(10px); }
.scene-badge span { color: var(--purple); font: 700 8px ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; }
.scene-badge strong { color: #d7d5da; font-size: 10px; font-weight: 550; }
.metrics-panel { position: absolute; z-index: 3; top: 14px; right: 14px; width: 180px; padding: 10px 12px; display: grid; gap: 7px; background: rgba(10,10,12,.78); border: 1px solid rgba(255,255,255,.13); border-radius: 7px; backdrop-filter: blur(10px); }
.metrics-panel div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.metrics-panel span { color: var(--muted); font: 8px ui-monospace, monospace; text-transform: uppercase; }
.metrics-panel strong { color: #e7e5e9; font: 650 9px ui-monospace, monospace; white-space: nowrap; }
.gesture-hint { position: absolute; left: 16px; bottom: 16px; color: rgba(255,255,255,.52); font: 8px ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; }

.transport { min-height: 58px; padding: 9px 13px; display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line); color: var(--muted); font: 650 9px ui-monospace, monospace; letter-spacing: .07em; text-transform: uppercase; }
.transport button, .transport select, .rate-control select { height: 34px; color: var(--ink); background: #111116; border: 1px solid var(--line); border-radius: 7px; cursor: pointer; }
.transport button { padding: 0 12px; white-space: nowrap; }
.transport button:hover, .transport select:hover { border-color: rgba(155,109,224,.75); }
.transport button[aria-pressed="true"] { color: var(--lime); border-color: rgba(196,219,34,.6); background: rgba(196,219,34,.07); }
.icon-button { width: 36px; padding: 0 !important; font-size: 14px; }
#timeline { flex: 1; min-width: 80px; accent-color: var(--purple); }
.rate-control { display: inline-flex; align-items: center; gap: 7px; }
.rate-control > span { color: var(--muted); }
.rate-control select { width: 62px; padding: 0 7px; font: 10px ui-monospace, monospace; }
#camera-mode { max-width: 152px; padding: 0 27px 0 9px; font: 10px ui-monospace, monospace; }
#reset-camera { margin-left: auto; }
.player-footer { min-height: 58px; padding: 11px 18px; display: grid; grid-template-columns: minmax(180px,1fr) minmax(220px,1fr) auto; align-items: center; gap: 22px; border-top: 1px solid var(--line); }
.player-footer div { display: grid; gap: 3px; min-width: 0; }
.player-footer span { color: var(--muted); font: 700 8px ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; }
.player-footer strong { overflow: hidden; color: #c6c4ca; font-size: 10px; font-weight: 550; white-space: nowrap; text-overflow: ellipsis; }
.player-footer a { color: var(--purple); font-size: 10px; text-decoration: none; }

.flames-stage video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
#flames-stream-start { position: absolute; inset: 0; margin: auto; width: 230px; height: 72px; display: grid; place-content: center; gap: 5px; color: var(--ink); background: rgba(14,14,17,.86); border: 1px solid rgba(196,219,34,.65); border-radius: 11px; cursor: pointer; backdrop-filter: blur(12px); }
#flames-stream-start:hover { background: rgba(31,30,37,.94); transform: translateY(-1px); }
#flames-stream-start span { font-weight: 700; }
#flames-stream-start small { color: var(--muted); font: 9px ui-monospace, monospace; text-transform: uppercase; }
.flames-facts { min-height: 58px; padding: 9px 16px; display: grid; grid-template-columns: repeat(3,1fr); align-items: center; gap: 14px; border-top: 1px solid var(--line); }
.flames-facts span { display: grid; gap: 3px; color: #c5c3c9; font-size: 10px; }
.flames-facts b { color: var(--muted); font: 700 8px ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; }
#flames-stream-status[data-state="ready"] { color: var(--lime); }
#flames-stream-status[data-state="error"] { color: var(--orange); }

.docs-cta {
  max-width: 1460px; margin: 0 auto clamp(90px, 10vw, 150px); padding: 36px clamp(18px, 4vw, 58px);
  display: grid; grid-template-columns: minmax(260px, .75fr) minmax(300px, 1fr) minmax(270px, .72fr); align-items: center; gap: clamp(28px, 5vw, 72px);
  border-block: 1px solid var(--line); background: linear-gradient(90deg, rgba(155,109,224,.09), transparent 45%);
}
.docs-cta h2 { margin: 0; font-size: clamp(32px, 4vw, 58px); line-height: 1; letter-spacing: -.045em; font-weight: 540; }
.docs-cta > p { margin: 0; color: #aaa8af; font-size: 14px; line-height: 1.7; }
.docs-cta > a { min-height: 104px; padding: 19px 21px; display: grid; align-content: space-between; border: 1px solid rgba(155,109,224,.52); border-radius: 11px; background: var(--purple-soft); text-decoration: none; }
.docs-cta > a:hover { border-color: var(--lime); transform: translateY(-1px); }
.docs-cta > a span { color: var(--muted); font: 700 9px ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; }
.docs-cta > a b { color: var(--ink); font-size: 13px; }

.positioning, .evidence { max-width: 1460px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 58px) clamp(90px, 10vw, 150px); }
.section-heading { max-width: 850px; margin-bottom: 38px; }
.section-heading h2, .evidence h2 { font-size: clamp(36px, 4.6vw, 66px); line-height: 1.02; font-weight: 540; }
.section-heading > p:last-child { max-width: 720px; margin: 20px 0 0; color: #b3b1b7; font-size: 16px; line-height: 1.65; }
.edge-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 18px; }
.edge-cards article { min-height: 210px; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.edge-cards article.ours { border-color: rgba(155,109,224,.55); background: linear-gradient(145deg, var(--purple-soft), var(--panel) 70%); }
.edge-cards span { color: var(--purple); font: 700 9px ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; }
.edge-cards h3 { margin: 18px 0 10px; font-size: 19px; }
.edge-cards p { margin: 0; color: #aaa8af; font-size: 13px; line-height: 1.65; }
.comparison-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.comparison-table { width: 100%; min-width: 920px; border-collapse: collapse; background: var(--panel); }
.comparison-table th, .comparison-table td { padding: 17px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 12px; line-height: 1.45; }
.comparison-table thead th { color: var(--muted); background: #0e0e11; font: 700 9px ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; }
.comparison-table tbody th { width: 150px; color: var(--muted); font-weight: 550; }
.comparison-table td { color: #b8b6bd; }
.comparison-table td a { color: #c9b3ec; text-underline-offset: 3px; }
.comparison-table td strong { color: var(--ink); font-weight: 650; }
.comparison-table td:nth-child(2) strong { color: var(--lime); }
.comparison-table td small { display: block; margin-top: 4px; color: var(--muted); }
.comparison-table .limit { color: #a19fa6; }
.comparison-table tr:last-child > * { border-bottom: 0; }
.comparison-table tr > *:last-child { border-right: 0; }
.comparison-note { color: var(--muted); font-size: 11px; line-height: 1.55; }
.comparison-note code { color: var(--purple); }

.evidence > div:first-child { display: grid; grid-template-columns: 1fr 1.5fr; align-items: end; gap: 40px; margin-bottom: 38px; }
.evidence-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.evidence-grid article { padding: 24px; border-top: 1px solid var(--purple); background: var(--panel); }
.evidence-grid span { color: var(--purple); font: 700 10px ui-monospace, monospace; }
.evidence-grid h3 { margin: 30px 0 10px; font-size: 18px; }
.evidence-grid p, .details-grid p { margin: 0; color: #aaa8af; font-size: 13px; line-height: 1.65; }
.evidence-grid p a { color: #c9b3ec; text-underline-offset: 3px; }
.evidence details { margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.evidence summary { padding: 18px 22px; cursor: pointer; color: #d0ced4; font-size: 12px; }
.details-grid { padding: 0 22px 22px; display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; }
.sources { max-width: 1460px; margin: 0 auto 100px; padding: 0 clamp(18px, 4vw, 58px); display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.sources a { min-height: 106px; padding: 20px; display: grid; align-content: space-between; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); text-decoration: none; }
.sources a:hover { border-color: rgba(155,109,224,.6); }
.sources span { color: var(--muted); font: 700 9px ui-monospace, monospace; letter-spacing: .09em; text-transform: uppercase; }
.sources strong { font-size: 13px; }
.site-footer { min-height: 110px; padding: 24px clamp(18px, 4vw, 58px); display: grid; grid-template-columns: 1fr 1fr auto; align-items: center; gap: 30px; border-top: 1px solid var(--line); }
.site-footer > div { display: flex; align-items: center; gap: 10px; }
.site-footer strong { font-size: 13px; }
.site-footer p { margin: 0; color: var(--muted); font-size: 11px; }
.site-footer > a { color: var(--purple); font-size: 11px; text-decoration: none; }

@media (max-width: 1100px) {
  .workbench { grid-template-columns: 225px minmax(0,1fr); }
  .scene-card { grid-template-columns: 58px minmax(0,1fr); }
  .scene-card img { width: 58px; }
  .transport { gap: 8px; }
  .transport > span { display: none; }
  #reset-camera { display: none; }
  .metrics-panel { width: 170px; }
}
@media (max-width: 860px) {
  .runtime span:not(.status-dot) { display: none; }
  .intro { grid-template-columns: 1fr; gap: 22px; }
  .workbench { grid-template-columns: 1fr; }
  .scene-sidebar { display: grid; grid-template-columns: 1fr 1fr; }
  .sidebar-heading, .sidebar-note, .baseline-links { grid-column: 1 / -1; }
  .baseline-links { grid-template-columns: 1fr 1fr; }
  .baseline-links > span { grid-column: 1 / -1; }
  .canvas-wrap, .flames-stage { min-height: 360px; }
  .docs-cta { grid-template-columns: 1fr; }
  .edge-cards, .evidence-grid, .details-grid, .sources { grid-template-columns: 1fr; }
  .evidence > div:first-child { grid-template-columns: 1fr; }
  .site-footer { grid-template-columns: 1fr auto; }
  .site-footer p { display: none; }
}
@media (max-width: 620px) {
  .topbar { height: 64px; }
  .brand img { width: 34px; height: 34px; }
  .docs-link { display: none; }
  .intro { padding-top: 42px; }
  .intro h1 { font-size: 43px; }
  .scene-sidebar { padding: 10px; gap: 7px; }
  .scene-card { grid-template-columns: 1fr; padding: 6px; }
  .scene-card img { width: 100%; }
  .scene-card-copy { padding: 2px 3px 5px; }
  .player-heading { align-items: flex-start; }
  .player-heading p { display: none; }
  .viewer-topline > span:last-child { max-width: 54%; }
  .canvas-wrap, .flames-stage { min-height: 300px; aspect-ratio: 4 / 3; }
  .scene-badge, .gesture-hint { display: none; }
  .metrics-panel { top: 8px; right: 8px; width: 148px; }
  .metrics-panel div:nth-child(4), .metrics-panel div:nth-child(6) { display: none; }
  .transport { display: grid; grid-template-columns: 36px minmax(70px,1fr) 62px 112px; }
  #timeline { width: 100%; min-width: 0; }
  .rate-control > span { display: none; }
  #camera-mode { width: 112px; }
  #compare-toggle { grid-column: 1 / -1; }
  .player-footer { grid-template-columns: 1fr auto; }
  .player-footer div:nth-child(2) { display: none; }
  .flames-facts { grid-template-columns: 1fr; padding-block: 13px; }
  .section-heading h2, .evidence h2 { font-size: 38px; }
  .edge-cards article { min-height: 0; }
  .site-footer { grid-template-columns: 1fr; }
  .site-footer > a { display: none; }
}
