/* Ringside demo page. Ringside's own night-time look (Part L tokens). */
:root {
  --ink: #07090d; --panel: #10141b; --line: #232c39; --text: #eef1f5; --dim: #8b95a7;
  --blue: #2e6bff; --red: #e5283a; --gold: #f2b53a; --ok: #3ddc84;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--ink); color: var(--text); font: 15px/1.45 'IBM Plex Sans', system-ui, sans-serif; display: flex; flex-direction: column; min-height: 100vh; }
button { font: inherit; color: inherit; cursor: pointer; }
b, h1, h2, h3, .st, .go, .ghost { font-family: 'Barlow Condensed', 'IBM Plex Sans', sans-serif; }

.top { display: flex; align-items: center; gap: 16px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, rgba(46,107,255,.14), transparent 40%, transparent 60%, rgba(229,40,58,.14)); flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 36px; height: 36px; border-radius: 8px; }
.brand b { display: block; font-size: 22px; letter-spacing: .08em; font-weight: 800; line-height: 1; }
.brand span { font-size: 12px; color: var(--dim); }
.demo-pill { background: var(--gold); color: #1a1200; font: 800 13px 'Barlow Condensed', sans-serif; letter-spacing: .08em; padding: 5px 12px; border-radius: 999px; text-transform: uppercase; }
.evname { color: var(--dim); font-size: 14px; }
.tools { margin-left: auto; display: flex; gap: 8px; }
.ghost { background: transparent; border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; font-weight: 700; font-size: 16px; letter-spacing: .02em; }
.ghost:hover { border-color: var(--dim); }
.go { background: var(--gold); color: #1a1200; border: 0; border-radius: 10px; padding: 12px 18px; font-weight: 800; font-size: 18px; letter-spacing: .02em; }

.steps { display: flex; gap: 6px; padding: 10px 16px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.st { flex: none; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.st i, h2 i, .flow i { font-style: normal; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--line); font: 700 13px 'JetBrains Mono', monospace; }
.st.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.st.on i { background: var(--gold); color: #1a1200; }

.stage { flex: 1; display: grid; grid-template-columns: 300px 1fr; min-height: 0; }
.guide { border-right: 1px solid var(--line); padding: 16px; overflow-y: auto; max-height: calc(100vh - 140px); position: sticky; top: 0; }
.guide h2 { margin: 0 0 10px; font-size: 26px; display: flex; gap: 10px; align-items: center; }
.guide ol { padding-left: 20px; margin: 0 0 14px; }
.guide li { margin-bottom: 10px; }
.guide li b { color: var(--gold); font-family: inherit; font-weight: 600; }
.tip { color: var(--dim); font-size: 13px; }
.chip { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; margin: 2px 0; font-size: 13px; }
.chip.on { border-color: var(--gold); }
.nav { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.dim { color: var(--dim); font-size: 13px; }

.panes { display: grid; gap: 8px; padding: 8px; min-height: 0; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); height: calc(100vh - 140px); }
.panes[data-n="0"] { display: none; }
.pane { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #000; }
.pane[hidden] { display: none; }
.pane.max { position: fixed; inset: 8px; z-index: 50; }
.ph { display: flex; align-items: center; gap: 10px; padding: 6px 10px; background: var(--panel); border-bottom: 1px solid var(--line); }
.ph b { font-size: 17px; letter-spacing: .02em; }
.ph span { color: var(--dim); font-size: 12px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini { background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px; font-size: 12px; }
.pane iframe { flex: 1; width: 100%; border: 0; background: var(--ink); }

body.intro .stage { grid-template-columns: 1fr; }
body.intro .guide { border-right: 0; max-height: none; position: static; }
.hero { max-width: 900px; margin: 0 auto; padding: 16px 0 32px; }
.hero h1 { font-size: 44px; line-height: 1.05; margin: 8px 0 14px; font-weight: 800; }
.lead { font-size: 17px; color: #cfd5df; max-width: 760px; }
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 20px 0; }
.flow button { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font: 700 17px 'Barlow Condensed', sans-serif; display: flex; gap: 8px; align-items: center; }
.flow span { color: var(--dim); }
.cardlist h3 { font-size: 22px; margin: 18px 0 8px; }
.bt { display: grid; grid-template-columns: 34px 1fr 24px 1fr; gap: 4px 10px; align-items: baseline; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; background: var(--panel); }
.bt .no { font: 700 15px 'JetBrains Mono', monospace; color: var(--dim); }
.bt .r { color: #ff8a95; font-weight: 600; } .bt .b { color: #8fb0ff; font-weight: 600; } .bt .v { color: var(--dim); text-align: center; }
.bt .dv, .bt .res { grid-column: 2 / -1; font-size: 13px; color: var(--dim); }
.bt .res { color: var(--ok); }
.foot { padding: 8px 16px; border-top: 1px solid var(--line); color: var(--dim); font-size: 12px; }

@media (max-width: 900px) {
  .stage { grid-template-columns: 1fr; }
  .guide { border-right: 0; border-bottom: 1px solid var(--line); max-height: none; position: static; }
  .panes { grid-auto-flow: row; grid-auto-rows: 80vh; grid-auto-columns: auto; height: auto; }
  .hero h1 { font-size: 34px; }
  .evname { display: none; }
}
