  :root {
    --bg: #0a0b0d;
    --bg-panel: #131519;
    --bg-panel2: #191c21;
    --border: #24272d;
    --text: #e8e9eb;
    --text-dim: #9ca0a8;
    --text-faint: #5f6570;
    --accent: #ff5c3d;
    --accent-dim: #7a2e20;
    --win: #4ade80;
    --athlete1: #22d3ee;
    --athlete2: #fb923c;
    --lost: #f87171;
    --ref: #4ade80;
    --tb-standing: #4b5563;
    --tb-takedown: #f59e0b;
    --tb-guard: #22d3ee;
    --tb-side: #a78bfa;
    --tb-mount: #4ade80;
    --tb-back: #16a34a;
    --tb-sub: #fbbf24;
    --tb-passing: #f97316;
    --tb-headlock: #c026d3;
    --tb-turtle: #78716c;
    --tb-scramble: #eab308;
    --tb-halfguard: #60a5fa;
    --tb-notfighting: #374151;
    --tb-fullguard: #f472b6;
    --tb-northsouth: #38bdf8;
  }
  * { box-sizing: border-box; }
  body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, sans-serif;
    line-height: 1.6;
  }
  .wrap { max-width: 1000px; margin: 0 auto; padding: 0 24px; }
  video, img { max-width: 100%; display: block; }
  a { color: inherit; }

  /* ── Nav + version selector ── */
  nav {
    position: sticky; top: 0; z-index: 20;
    background: rgba(10,11,13,0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
  }
  nav .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; gap: 16px; flex-wrap: wrap; }
  .logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; letter-spacing: -0.02em; text-decoration: none; }
  .logo .logo-accent { color: var(--accent); }
  .logo-mark { width: 26px; height: 26px; border-radius: 7px; display: block; }
  .nav-links a { color: var(--text-dim); text-decoration: none; font-size: 14px; margin-left: 24px; }
  .nav-links a:hover { color: var(--text); }
  .version-switch {
    position: relative; display: flex; align-items: center; gap: 2px; background: var(--bg-panel);
    border: 1px solid var(--border); border-radius: 100px; padding: 3px;
  }
  .vs-thumb {
    position: absolute; top: 3px; left: 3px; height: calc(100% - 6px);
    background: var(--accent); border-radius: 100px;
    box-shadow: 0 0 14px 2px rgba(255,92,61,0.5);
    transition: left 0.25s cubic-bezier(.4,0,.2,1), width 0.25s cubic-bezier(.4,0,.2,1);
    z-index: 0;
  }
  .version-switch button {
    position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px;
    font-family: inherit; font-size: 12px; font-weight: 600; padding: 6px 14px; border-radius: 100px;
    border: none; background: transparent; color: var(--text-dim); cursor: pointer; transition: color .15s;
  }
  .version-switch button.active { color: #1a0d08; }
  .vs-icon { width: 14px; height: 14px; flex-shrink: 0; }

  /* ── Eyes mascot (matches the logo: elongated anaconda eye, orange-red gradient, slit pupil) ── */
  .grappler-eyes {
    display: flex; gap: 14px; justify-content: center; margin-bottom: 28px;
  }
  .eye-svg {
    width: 64px; height: 40px; overflow: visible;
    filter: drop-shadow(0 0 10px rgba(255,92,61,0.5));
    animation: aura 3.2s ease-in-out infinite;
  }
  .eye-svg.flip { transform: scaleX(-1); }
  .eye-svg .eye-shape { fill: url(#eyeGrad); }
  .eye-svg .pupil-wrap {
    transition: transform 0.7s cubic-bezier(.4,0,.2,1);
    transform-box: fill-box; transform-origin: center;
  }
  .eye-svg .pupil-slit {
    fill: #180400;
    animation: blink 5s ease-in-out infinite;
    transform-box: fill-box; transform-origin: center;
  }
  @keyframes aura {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(255,92,61,0.45)); }
    50% { filter: drop-shadow(0 0 17px rgba(255,92,61,0.8)); }
  }
  @keyframes blink {
    0%, 92%, 100% { transform: scaleY(1); }
    95% { transform: scaleY(0.15); }
  }

  /* ── Giant background eyes: revealed once you scroll past the hero, ──
     fixed in place so they keep "watching" behind the rest of the page. */
  .bg-eyes {
    position: fixed; inset: 0; z-index: -1;
    display: flex; align-items: center; justify-content: center; gap: 6vw;
    pointer-events: none;
    opacity: 0; transition: opacity 1.4s ease;
  }
  .bg-eyes.visible { opacity: 1; }
  /* One-shot entrance flash on arrival at the Live Output top (page load or
     logo click) -- independent of the scroll-based .visible toggle, which
     otherwise keeps these hidden while the hero is on screen. */
  @keyframes bgEyesFlash {
    0% { opacity: 1; }
    45% { opacity: 1; }
    100% { opacity: 0; }
  }
  .bg-eyes.flash { animation: bgEyesFlash 2.2s ease forwards; }
  .bg-eye-svg {
    width: 30vw; min-width: 220px; max-width: 460px; height: auto; overflow: visible;
    filter: drop-shadow(0 0 70px rgba(255,92,61,0.35));
  }
  .bg-eye-svg.flip { transform: scaleX(-1); }
  .bg-eye-svg .eye-shape { fill: url(#eyeGrad); opacity: 0.16; }
  .bg-eye-svg .pupil-slit { fill: #0d0300; opacity: 0.5; }
  .bg-eye-svg .pupil-wrap { transition: transform 0.4s ease-out; transform-box: fill-box; transform-origin: center; }
  @media (max-width: 700px) { .bg-eyes { display: none; } }

  /* ── Hero ── */
  header.hero { padding: 64px 0 32px; text-align: center; }
  header.hero + section { border-top: none; padding-top: 40px; }
  .kicker {
    display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--accent); background: rgba(255,92,61,0.1);
    border: 1px solid rgba(255,92,61,0.25); border-radius: 100px; padding: 5px 14px; margin-bottom: 24px;
  }
  h1 { font-size: clamp(36px, 6vw, 64px); font-weight: 800; letter-spacing: -0.03em; margin: 0 0 36px; }
  h1 .accent { color: var(--accent); }

  .hero-video-frame {
    border-radius: 14px; overflow: hidden; border: 1px solid var(--border);
    box-shadow: 0 30px 80px -30px rgba(255,92,61,0.15); margin-bottom: 48px;
    display: flex; justify-content: center; background: #000;
  }
  /* prep_comp1_reel.mp4 is native portrait (phone-shot, 9:16) -- without a
     height cap it fills its column's full width and ends up absurdly tall
     (e.g. 800px wide -> 1400px+ tall). Landscape videos are unaffected since
     they're already width-constrained well under this height. */
  #prepVideo { max-height: 75vh; width: auto; max-width: 100%; }

  .hero-explain {
    max-width: 720px; margin: 0 auto; text-align: center;
    font-size: clamp(19px, 2.6vw, 25px); font-weight: 600; line-height: 1.5;
    letter-spacing: -0.01em; color: var(--text);
  }

  .intro-copy {
    text-align: left; margin: 32px 0 0;
    background: var(--bg-panel); border: 1px solid var(--border); border-radius: 14px; padding: 28px 32px;
  }
  .intro-copy p { color: var(--text-dim); font-size: 15.5px; margin: 0 0 14px; }
  .intro-copy p:last-child { margin-bottom: 0; }
  .intro-copy strong { color: var(--text); }
  .signoff { margin-top: 18px; font-size: 14px; color: var(--text-faint); font-style: italic; }
  .personal-video-frame { margin-top: 24px; }
  .personal-video-frame video { border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
  .personal-video-placeholder {
    border: 2px dashed var(--border); border-radius: 14px; padding: 48px 24px; text-align: center;
    background: var(--bg);
  }
  .personal-video-placeholder .pv-icon { font-size: 30px; margin-bottom: 10px; }
  .personal-video-placeholder .pv-text { font-size: 15px; font-weight: 600; color: var(--text-dim); margin-bottom: 6px; }
  .personal-video-placeholder .pv-note { font-size: 12px; color: var(--text-faint); }
  .personal-video-placeholder code { background: var(--bg-panel); padding: 2px 6px; border-radius: 4px; }

  .reveal-phrase { opacity: 0; transition: opacity 0.6s ease; }
  .reveal-phrase.visible { opacity: 1; }

  /* ── Section shell ── */
  section { padding: 72px 0; border-top: 1px solid var(--border); }
  .section-head { max-width: 660px; margin: 0 auto 48px; text-align: center; }
  .section-head .kicker { margin-bottom: 16px; }
  .section-head h2 { font-size: clamp(26px, 4vw, 36px); font-weight: 800; letter-spacing: -0.02em; margin: 0 0 14px; }
  .section-head p { color: var(--text-dim); font-size: 16px; margin: 0; }

  /* ── Problem / Solution ── */
  .ps-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
  .ps-card { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 14px; padding: 30px; }
  .ps-card.problem { border-color: rgba(248,113,113,0.25); }
  .ps-card.solution { border-color: rgba(74,222,128,0.25); }
  .ps-card .ps-label {
    font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 12px; display: block;
  }
  .ps-card.problem .ps-label { color: var(--lost); }
  .ps-card.solution .ps-label { color: var(--win); }
  .ps-card h3 { margin: 0 0 12px; font-size: 19px; }
  .problem-photo {
    float: right; width: 180px; max-width: 45%; margin: 2px 0 12px 16px;
    border-radius: 10px; border: 1px solid var(--border); aspect-ratio: 3/4; object-fit: cover;
  }
  .ps-card p { color: var(--text-dim); font-size: 14.5px; margin: 0 0 10px; }
  .ps-card ul { margin: 12px 0 0; padding-left: 18px; color: var(--text-dim); font-size: 14.5px; }
  .ps-card li { margin-bottom: 6px; }
  @media (max-width: 720px) { .ps-grid { grid-template-columns: 1fr; } }

  /* ── Pipeline diagram ── */
  .pipeline { display: flex; align-items: stretch; gap: 0; overflow-x: auto; padding: 8px 4px 16px; margin-top: 40px; }
  .pipe-stage {
    flex: 1; min-width: 150px; background: var(--bg-panel); border: 1px solid var(--border);
    border-radius: 14px; padding: 26px 16px 20px; text-align: center; position: relative;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  }
  .pipe-stage:hover {
    transform: translateY(-4px); border-color: var(--stage-color, var(--accent));
    box-shadow: 0 12px 28px -12px var(--stage-color, var(--accent));
  }
  .pipe-stage .stage-num {
    position: absolute; top: 10px; right: 12px; font-family: ui-monospace, monospace; font-size: 10px;
    color: var(--text-faint); font-weight: 700;
  }
  .pipe-icon {
    width: 44px; height: 44px; margin: 0 auto 14px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--stage-color, var(--accent)) 14%, transparent);
    border: 1.5px solid color-mix(in srgb, var(--stage-color, var(--accent)) 45%, transparent);
    color: var(--stage-color, var(--accent));
  }
  .pipe-icon svg { width: 22px; height: 22px; }
  .pipe-stage h4 { margin: 0 0 6px; font-size: 14px; }
  .pipe-stage p { margin: 0; font-size: 12px; color: var(--text-faint); }
  .pipe-arrow {
    display: flex; align-items: center; justify-content: center; padding: 0 4px; flex-shrink: 0;
    color: var(--text-faint); font-size: 16px; align-self: center; margin-top: -20px;
  }

  /* ── Architecture: future benefits + dashboard CTA ── */
  .architecture-future {
    background: var(--bg-panel); border: 1px solid var(--border); border-radius: 14px;
    padding: 30px 34px; margin-top: 32px;
  }
  .architecture-future h3 { margin: 0 0 12px; font-size: 19px; }
  .architecture-future p { color: var(--text-dim); font-size: 14.5px; margin: 0 0 16px; }
  .benefits-list {
    list-style: none; margin: 0; padding: 0; display: grid;
    grid-template-columns: 1fr 1fr; gap: 12px;
  }
  .benefits-list li {
    display: flex; gap: 10px; align-items: flex-start;
    background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
    padding: 12px 14px; font-size: 13.5px; color: var(--text-dim); margin: 0;
  }
  .benefits-list li::before {
    content: "✓"; color: var(--win); font-weight: 800; flex-shrink: 0; margin-top: 1px;
  }
  @media (max-width: 640px) { .benefits-list { grid-template-columns: 1fr; } }
  .architecture-cta {
    display: block; text-align: center; margin: 32px auto 0; max-width: 320px;
    font-weight: 700; font-size: 14.5px; padding: 13px; border-radius: 8px;
    border: 1px solid var(--accent); color: var(--accent); text-decoration: none; cursor: pointer;
  }
  .architecture-cta:hover { background: rgba(255,92,61,0.1); }

  /* ── Legend for moments ── */
  .legend {
    display: flex; flex-wrap: wrap; gap: 20px; justify-content: center;
    margin: 0 0 48px; font-size: 13px; color: var(--text-dim);
  }
  .legend span { display: inline-flex; align-items: center; gap: 7px; }
  .swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

  /* ── Moment cards ── */
  .moments-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
  .moments-col .moment:last-child { margin-bottom: 0; }
  @media (max-width: 860px) { .moments-grid { grid-template-columns: 1fr; } }

  .moment {
    display: grid; grid-template-columns: 1fr; gap: 16px;
    background: var(--bg-panel); border: 1px solid var(--border); border-radius: 16px;
    padding: 22px; margin-bottom: 20px;
  }
  .moment.is-win { border-color: rgba(74,222,128,0.3); }
  .moment .crops { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .moment .crops img { border-radius: 8px; border: 1px solid var(--border); aspect-ratio: 16/9; object-fit: cover; }
  .moment .body .tag {
    display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    margin-bottom: 10px;
  }
  .moment .body .tag.win { color: var(--win); }
  .moment .body .tag.honest { color: var(--accent); }
  .moment .body h3 { font-size: 18px; font-weight: 700; margin: 0 0 8px; letter-spacing: -0.01em; }
  .moment .body p { color: var(--text-dim); font-size: 14.5px; margin: 0; }

  /* ── Email signup ── */
  .signup-box {
    background: var(--bg-panel); border: 1px solid var(--border); border-radius: 16px;
    padding: 36px 40px; max-width: 640px; margin: 0 auto;
  }
  .signup-box h3 { margin: 0 0 8px; font-size: 22px; }
  .signup-box p.lead { color: var(--text-dim); font-size: 14.5px; margin: 0 0 24px; }
  .signup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
  .signup-box input, .signup-box select, .signup-box textarea {
    width: 100%; font-family: inherit; font-size: 14px; padding: 11px 14px; border-radius: 8px;
    border: 1px solid var(--border); background: var(--bg); color: var(--text);
  }
  .signup-box textarea { resize: vertical; margin-bottom: 12px; }
  .signup-box input:focus, .signup-box select:focus, .signup-box textarea:focus { outline: none; border-color: var(--accent); }
  .signup-coach-check {
    display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-dim);
    margin: 0 0 12px;
  }
  .signup-coach-check input { width: auto; }
  .signup-box button {
    width: 100%; margin-top: 6px; font-family: inherit; font-weight: 700; font-size: 14.5px;
    padding: 13px; border-radius: 8px; border: none; background: var(--accent); color: #1a0d08; cursor: pointer;
  }
  .signup-box button:hover { filter: brightness(1.08); }
  .signup-note { font-size: 12px; color: var(--text-faint); margin-top: 12px; text-align: center; }
  @media (max-width: 560px) { .signup-grid { grid-template-columns: 1fr; } }

  .coffee-cta {
    display: block; text-align: center; margin: 20px auto 0; max-width: 100%;
    font-weight: 700; font-size: 14.5px; padding: 13px; border-radius: 8px;
    background: var(--accent); color: #1a0d08; text-decoration: none;
  }
  .coffee-cta:hover { filter: brightness(1.08); }

  footer { padding: 48px 0 64px; text-align: center; color: var(--text-faint); font-size: 13px; }

  .support-popup-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.65); backdrop-filter: blur(3px);
    display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px;
    opacity: 0; pointer-events: none; transition: opacity .25s ease;
  }
  .support-popup-overlay.visible { opacity: 1; pointer-events: auto; }
  .support-popup {
    background: var(--bg-panel); border: 1px solid var(--border); border-radius: 16px;
    padding: 32px; max-width: 380px; width: 100%; position: relative;
    box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6);
    transform: translateY(10px); transition: transform .25s ease;
  }
  .support-popup-overlay.visible .support-popup { transform: translateY(0); }
  .support-popup-close {
    position: absolute; top: 14px; right: 14px; background: none; border: none;
    color: var(--text-faint); font-size: 15px; cursor: pointer; padding: 6px; line-height: 1;
  }
  .support-popup-close:hover { color: var(--text); }
  .support-popup-icon { font-size: 28px; margin-bottom: 10px; }
  .support-popup h3 { margin: 0 0 10px; font-size: 20px; }
  .support-popup p { color: var(--text-dim); font-size: 14px; line-height: 1.55; margin: 0 0 20px; }
  .support-popup form input {
    width: 100%; padding: 11px 14px; border-radius: 8px; font-family: inherit; font-size: 14px;
    border: 1px solid var(--border); background: var(--bg); color: var(--text); margin-bottom: 10px;
  }
  .support-popup form button {
    width: 100%; padding: 12px; border-radius: 8px; border: none; background: var(--accent);
    color: #1a0d08; font-weight: 700; font-size: 14px; cursor: pointer; margin-top: 4px;
  }
  .support-popup form button:hover { filter: brightness(1.08); }
  .support-popup-note { font-size: 11.5px; color: var(--text-faint); text-align: center; margin-top: 12px; }
  .support-popup-full-link {
    display: block; text-align: center; margin-top: 10px; font-size: 12px;
    color: var(--text-faint); text-decoration: underline;
  }

  /* ── Version B: dashboard layout ── */
  #version-b { display: none; }
  .dash-banner {
    background: rgba(255,92,61,0.1); border-bottom: 1px solid rgba(255,92,61,0.25);
    color: var(--accent); font-size: 13px; font-weight: 600; text-align: center;
    padding: 10px 16px; display: flex; gap: 14px; justify-content: center; align-items: center; flex-wrap: wrap;
  }
  .dash-banner a { color: var(--accent); text-decoration: underline; }
  .dash-grid { display: grid; grid-template-columns: 260px 1fr; gap: 0; min-height: 100vh; }
  .dash-side {
    border-right: 1px solid var(--border); padding: 32px 20px; position: sticky; top: 57px;
    height: calc(100vh - 57px); overflow-y: auto;
  }
  .dash-side .dash-link {
    display: block; padding: 9px 12px; border-radius: 8px; color: var(--text-dim); text-decoration: none;
    font-size: 13.5px; margin-bottom: 2px;
  }
  .dash-side .dash-link:hover { background: var(--bg-panel); color: var(--text); }
  .dash-tab-btn {
    display: block; width: 100%; text-align: left; font-family: inherit; font-size: 13.5px; font-weight: 600;
    padding: 9px 12px; border-radius: 8px; border: none; background: transparent; color: var(--text-dim);
    cursor: pointer; margin-bottom: 2px;
  }
  .dash-tab-btn:hover { background: var(--bg-panel); color: var(--text); }
  .dash-tab-btn.active { background: var(--accent); color: #1a0d08; }
  .dash-main { padding: 32px 32px 80px; min-width: 0; }
  .dash-tab-head { margin-bottom: 28px; }
  .dash-tab-head h1 { font-size: 28px; margin: 0 0 8px; letter-spacing: -0.02em; }
  .dash-tab-head p { color: var(--text-dim); font-size: 14.5px; margin: 0; max-width: 620px; }
  .dash-panel { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 14px; padding: 24px; margin-bottom: 24px; }
  .rating-grid { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
  .rating-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .rating-row span { font-size: 13.5px; color: var(--text-dim); flex: 1; }
  .rating-row select { width: 168px; flex-shrink: 0; }
  .form-label { display: block; font-size: 13px; color: var(--text-dim); margin: 4px 0 6px; }
  .node-stats-row { display: flex; gap: 24px; align-items: flex-start; }
  .node-graph-col { flex: 1; min-width: 0; }
  .stats-col { width: 260px; flex-shrink: 0; }
  @media (max-width: 780px) { .node-stats-row { flex-direction: column; } .stats-col { width: 100%; } }

  .match-source-nav {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    flex-wrap: wrap; margin-bottom: 20px;
  }
  .match-source-current { font-size: 13px; font-weight: 600; color: var(--text-dim); }
  .match-source-next-btn {
    font-family: inherit; font-size: 12.5px; font-weight: 600; padding: 8px 18px; border-radius: 100px;
    border: 1px solid var(--border); background: var(--bg-panel); color: var(--text);
    cursor: pointer; transition: border-color .15s, background .15s;
  }
  .match-source-next-btn:hover { border-color: var(--accent); background: rgba(255,92,61,0.08); }
  .dash-panel h3 { margin: 0 0 14px; font-size: 16px; }

  /* Upload & Queue tab */
  .upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
  .upload-col .dash-panel:last-child { margin-bottom: 0; }
  @media (max-width: 860px) { .upload-grid { grid-template-columns: 1fr; } }
  .upload-zone {
    border: 2px dashed var(--border); border-radius: 14px; padding: 36px 24px; text-align: center;
    margin-bottom: 24px; background: var(--bg-panel); cursor: pointer; transition: border-color .15s, background .15s;
  }
  .upload-zone.over { border-color: var(--accent); background: rgba(255,92,61,0.06); }
  .upload-icon { font-size: 28px; color: var(--accent); margin-bottom: 10px; }
  .upload-text { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
  .upload-browse { color: var(--accent); text-decoration: underline; cursor: pointer; }
  .upload-note { font-size: 12px; color: var(--text-faint); }
  .queue-row {
    display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; align-items: center;
    padding: 12px 0; border-bottom: 1px solid var(--border);
  }
  .queue-row:last-child { border-bottom: none; }
  .queue-thumb img { width: 64px; aspect-ratio: 16/9; object-fit: cover; border-radius: 6px; }
  .queue-title { font-size: 13.5px; font-weight: 600; margin-bottom: 6px; }
  .queue-bar { height: 5px; border-radius: 3px; background: var(--bg); overflow: hidden; }
  .queue-bar-fill { height: 100%; background: var(--accent); border-radius: 3px; }
  .queue-status { font-size: 12px; font-weight: 700; white-space: nowrap; }
  .queue-status.processing { color: var(--accent); }
  .queue-status.done { color: var(--win); cursor: pointer; }
  .queue-status.done:hover { text-decoration: underline; }
  .queue-status.queued { color: var(--text-faint); }
  .insight-feed { display: flex; flex-direction: column; gap: 12px; }
  .insight-card { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 10px; background: var(--bg); border: 1px solid var(--border); }
  .insight-icon {
    font-size: 15px; width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; background: var(--bg-panel2); color: var(--text-dim);
  }
  .insight-card.win .insight-icon { color: var(--win); }
  .insight-card.warn .insight-icon { color: var(--lost); }
  .insight-title { font-size: 13.5px; font-weight: 600; margin-bottom: 3px; }
  .insight-sub { font-size: 12.5px; color: var(--text-dim); }
  .insight-sub a { color: var(--accent); }

  /* Match Breakdown tab */
  .tb-wrap { position: relative; padding-top: 30px; }
  .tb-current-label {
    position: absolute; top: 0; left: 0; transform: translateX(-50%);
    font-size: 13px; font-weight: 700; white-space: nowrap; color: var(--text);
    transition: left 0.12s linear, color 0.2s ease;
  }
  .tb-current-label.pop { animation: tbPop 0.5s ease; }
  @keyframes tbPop {
    0% { transform: translateX(-50%) scale(1); }
    35% { transform: translateX(-50%) scale(1.45); }
    100% { transform: translateX(-50%) scale(1); }
  }
  .match-timebar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; margin: 4px 0 10px; position: relative; }
  .tb-seg { height: 100%; }
  .tb-playhead { position: absolute; top: -3px; width: 2px; height: 20px; background: #fff; box-shadow: 0 0 6px rgba(255,255,255,0.8); transition: left 0.12s linear; }
  .match-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 11.5px; color: var(--text-dim); margin-bottom: 20px; }
  .match-legend span { display: inline-flex; align-items: center; gap: 6px; }
  .match-legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
  .match-breakdown-row { display: flex; gap: 22px; align-items: flex-start; }
  .match-video-col { flex: 1; min-width: 0; }
  .match-eyes-col { width: 300px; flex-shrink: 0; position: sticky; top: 16px; }
  @media (max-width: 900px) {
    .match-breakdown-row { flex-direction: column; }
    .match-eyes-col { width: 100%; position: static; }
  }
  .llm-callout {
    background: linear-gradient(180deg, rgba(255,92,61,0.08), var(--bg));
    border: 1px solid rgba(255,92,61,0.35); border-left: 3px solid var(--accent);
    border-radius: 10px; padding: 18px 20px; box-shadow: 0 0 24px -8px rgba(255,92,61,0.35);
    transition: border-color .3s, box-shadow .3s, background .3s;
  }
  /* Match-end state: same callout, swapped to the gold "submission/final"
     accent already used for the win node in the transition graph and the
     top-3 tutorial star badge -- reads as "this is the wrap-up", not a new color language. */
  .llm-callout.final {
    background: linear-gradient(180deg, rgba(251,191,36,0.1), var(--bg));
    border: 1px solid rgba(251,191,36,0.4); border-left: 3px solid var(--tb-sub);
    box-shadow: 0 0 24px -8px rgba(251,191,36,0.4);
  }
  .llm-callout.final .llm-badge { color: var(--tb-sub); background: rgba(251,191,36,0.16); }
  .llm-badge {
    display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.03em;
    color: var(--accent); background: rgba(255,92,61,0.14); border-radius: 100px; padding: 3px 11px; margin-bottom: 10px;
  }
  .llm-callout p { margin: 0; font-size: 16px; line-height: 1.45; font-style: italic; color: var(--text); }
  .llm-callout p .caret {
    display: inline-block; width: 2px; height: 15px; background: var(--accent);
    margin-left: 1px; transform: translateY(2px); animation: caretBlink 0.9s step-end infinite;
  }
  @keyframes caretBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
  /* Real, always-changing readout (tied to actual playback position) instead
     of a decorative loop -- it's genuinely live because the numbers are
     real, not because it's animated forever regardless of what's happening. */
  .llm-framecounter {
    font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 10.5px; font-weight: 600;
    color: var(--text-faint); margin-left: 4px; letter-spacing: 0;
  }
  .tutorial-suggestions { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
  @keyframes tutFadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
  .tutorial-suggestions.refresh { animation: tutFadeIn 0.4s ease; }
  .tutorial-suggestions-label {
    font-size: 12px; font-weight: 700; letter-spacing: 0.02em;
    color: var(--text); margin: 4px 0 6px; display: flex; align-items: center; gap: 6px;
  }
  /* No-JS fallback only -- normally overwritten synchronously on load. */
  .tutorial-suggestions-placeholder {
    font-size: 12.5px; color: var(--text-faint); font-style: italic;
    border: 1px dashed var(--border); border-radius: 8px; padding: 14px 12px; text-align: center;
  }
  /* Preview state: real cards, dimmed, before the video has picked a
     scenario-specific match -- shows the UI works instead of a blank box. */
  .tutorial-suggestions.preview { opacity: 0.55; }
  .tutorial-suggestions.preview .tutorial-card:hover { transform: none; border-color: var(--border); background: var(--bg-panel, var(--bg)); }
  .tutorial-card {
    display: flex; align-items: center; gap: 10px;
    background: var(--bg-panel, var(--bg)); border: 1px solid var(--border); border-radius: 8px;
    padding: 10px 12px; text-decoration: none; cursor: pointer;
    transition: border-color 0.15s, transform 0.15s, background 0.15s;
  }
  .tutorial-card:hover {
    border-color: var(--accent); background: rgba(255,92,61,0.08); transform: translateX(2px);
  }
  .tutorial-play {
    flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: rgba(255,92,61,0.18); color: var(--accent); font-size: 9px; padding-left: 2px;
  }
  .tutorial-card-body { flex: 1; min-width: 0; }
  .tutorial-title { display: block; font-size: 12.5px; font-weight: 600; color: var(--text); line-height: 1.35; margin-bottom: 6px; }
  .tutorial-badges { display: flex; gap: 6px; align-items: center; }
  .tutorial-arrow {
    flex-shrink: 0; color: var(--text-faint); font-size: 14px; transition: transform 0.15s, color 0.15s;
  }
  .tutorial-card:hover .tutorial-arrow { color: var(--accent); transform: translateX(3px); }

  /* Relevance tiers -- high should look genuinely tempting to click, low
     should visually recede rather than compete for attention. */
  .tutorial-card.relevance-high {
    border-color: rgba(255,92,61,0.55); background: rgba(255,92,61,0.11);
    box-shadow: 0 0 18px -7px rgba(255,92,61,0.5); padding: 13px 14px;
  }
  .tutorial-card.relevance-high .tutorial-title { font-size: 13.5px; font-weight: 700; }
  .tutorial-card.relevance-high .tutorial-play {
    width: 28px; height: 28px; font-size: 10px; background: rgba(255,92,61,0.3);
  }
  .tutorial-card.relevance-high:hover {
    border-color: var(--accent); background: rgba(255,92,61,0.16);
    box-shadow: 0 0 26px -6px rgba(255,92,61,0.65); transform: translateX(3px) scale(1.015);
  }
  .tutorial-badge-relevance {
    background: rgba(255,92,61,0.2); color: var(--accent); font-weight: 800;
  }
  .tutorial-card.relevance-medium { opacity: 0.92; }
  .tutorial-card.relevance-low {
    opacity: 0.52; padding: 8px 10px; box-shadow: none;
  }
  .tutorial-card.relevance-low .tutorial-title { font-size: 11.5px; font-weight: 500; }
  .tutorial-card.relevance-low .tutorial-play {
    width: 20px; height: 20px; font-size: 8px; background: var(--border); color: var(--text-faint);
  }
  .tutorial-card.relevance-low:hover {
    opacity: 0.8; border-color: var(--border); background: var(--bg-panel, var(--bg)); transform: none;
  }
  .tutorial-card.relevance-low:hover .tutorial-arrow { color: var(--text-faint); transform: none; }
  .tutorial-badge {
    font-size: 10px; font-weight: 700; padding: 1px 8px; border-radius: 100px; letter-spacing: 0.02em;
  }
  .tutorial-badge-level-fundamental { background: rgba(74,222,128,0.15); color: var(--win); }
  .tutorial-badge-level-intermediate { background: rgba(251,191,36,0.15); color: #fbbf24; }
  .tutorial-badge-level-advanced { background: rgba(255,92,61,0.15); color: var(--accent); }
  .tutorial-badge-format { background: var(--border); color: var(--text-dim); }
  .match-video { max-width: none; margin: 0 0 16px; }

  .overlay-toggle-row { display: flex; align-items: center; gap: 10px; margin: 10px 0 2px; }
  .overlay-toggle-label { font-size: 12.5px; color: var(--text-dim); font-weight: 600; }
  .switch { position: relative; display: inline-block; width: 38px; height: 22px; flex-shrink: 0; cursor: pointer; }
  .switch input { opacity: 0; width: 0; height: 0; position: absolute; }
  .switch-track {
    position: absolute; inset: 0; background: var(--border); border-radius: 100px;
    transition: background 0.2s;
  }
  .switch-thumb {
    position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%;
    background: #fff; transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.4);
  }
  .switch input:checked + .switch-track { background: var(--accent); }
  .switch input:checked + .switch-track .switch-thumb { transform: translateX(16px); }

  .node-graph-scroll { overflow-x: auto; }
  .node-graph-wrap { position: relative; min-width: 720px; padding-top: 38%; }
  .ng-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
  .ng-edge { fill: none; stroke: var(--border); stroke-width: 2; }
  .ng-edge-final { stroke: rgba(251,191,36,0.5); stroke-dasharray: 4 4; }
  .ng-node-wrap {
    position: absolute; transform: translate(-50%, -50%);
    display: flex; flex-direction: column; align-items: center; gap: 6px;
  }
  .ng-node-wrap.lbl-above { flex-direction: column-reverse; }
  .ng-dot { border-radius: 50%; box-shadow: 0 0 14px rgba(0,0,0,0.4); flex-shrink: 0; }
  .ng-text {
    font-size: 11.5px; font-weight: 700; white-space: nowrap; color: var(--text);
    background: rgba(10,11,13,0.8); padding: 3px 8px; border-radius: 6px;
  }
  .ng-node-wrap.final .ng-text {
    color: #fbbf24; font-size: 12.5px; white-space: normal; text-align: center; max-width: 140px; line-height: 1.3;
  }
  .ng-score {
    display: inline-block; font-size: 9.5px; font-weight: 800; color: var(--win); background: rgba(74,222,128,0.18);
    border-radius: 100px; padding: 1px 6px; margin-left: 5px;
  }
  .match-summary-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; }
  .stat-list { list-style: none; margin: 0; padding: 0; }
  .stat-list li { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; color: var(--text-dim); }
  .stat-list li:last-child { border-bottom: none; }
  .stat-list strong { color: var(--text); font-family: ui-monospace, monospace; }
  @media (max-width: 720px) { .match-summary-grid { grid-template-columns: 1fr; } }

  /* Profile tab */
  .profile-header { display: flex; align-items: center; gap: 20px; }
  .profile-avatar {
    width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent), #7a1f0a);
    display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800; color: #1a0d08;
  }
  .profile-info h2 { margin: 0 0 4px; font-size: 20px; }
  .profile-meta { font-size: 13px; color: var(--text-dim); margin-bottom: 10px; }
  .profile-stats-row { display: flex; gap: 20px; font-size: 12.5px; color: var(--text-dim); flex-wrap: wrap; }
  .profile-stats-row strong { color: var(--text); font-family: ui-monospace, monospace; }
  .profile-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 24px; }
  .profile-col-right { display: flex; flex-direction: column; gap: 24px; }
  @media (max-width: 720px) { .profile-grid { grid-template-columns: 1fr; } }
  .radar-svg { width: 100%; max-width: 320px; display: block; margin: 0 auto; }
  .radar-grid { fill: none; stroke: var(--border); stroke-width: 1; }
  .radar-axis { stroke: var(--border); stroke-width: 1; }
  .radar-data { fill: rgba(255,92,61,0.25); stroke: var(--accent); stroke-width: 2; }
  .radar-label { font-size: 11px; fill: var(--text-dim); }
  .quest-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
  .quest-row:last-child { border-bottom: none; }
  .quest-icon {
    font-size: 18px; width: 36px; height: 36px; border-radius: 50%; background: var(--bg);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  }
  .quest-body { flex: 1; min-width: 0; }
  .quest-title { font-size: 13.5px; font-weight: 600; margin-bottom: 6px; }
  .quest-bar { height: 5px; border-radius: 3px; background: var(--bg); overflow: hidden; }
  .quest-bar-fill { height: 100%; background: var(--accent); border-radius: 3px; }
  .quest-progress { font-size: 12px; font-weight: 700; color: var(--text-dim); white-space: nowrap; }

  @media (max-width: 860px) {
    .dash-grid { grid-template-columns: 1fr; }
    .dash-side { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--border); }
    .queue-row { grid-template-columns: 48px 1fr; }
    .queue-status { grid-column: 2; }
  }
