/* Squeek Stream Kit: tokens and components are described in DESIGN.md. */
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url(../fonts/ibm-plex-mono-400.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url(../fonts/ibm-plex-mono-500.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url(../fonts/barlow-condensed-700.woff2) format("woff2"); }

:root {
  --page: #000;
  --plate: #050507;
  --line: #1d1d23;
  --line-strong: #2d2d36;
  --ink: #f3f3f6;
  --text: #cfcfd8;
  --muted: #8d8d9b;
  --accent: #f6a63b;
  --on-accent: #120d05;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --font-head: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --wrap: 1180px;
  --gutter: 24px;
  color-scheme: dark;
}
[data-theme="green"] { --accent: #7fe08a; }
[data-theme="ice"] { --accent: #7fdcff; }
[data-theme="white"] { --accent: #f3e9cc; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- overlays: transparent pages for OBS */
html.overlay, html.overlay body { margin: 0; background: transparent; overflow: hidden; }
.plate { background: var(--plate); border-radius: 14px; padding: 2.2%; }
.plate canvas { display: block; }
.board-page { position: fixed; inset: 0; display: grid; place-items: center; }
[data-layout="strip"] .board-page { padding: 6px 10px; border-radius: 10px; }

.alert-page { position: fixed; inset: 0; overflow: hidden; }
.alert-card { position: absolute; inset: 0; display: grid; place-items: center; padding: 8px 12px; border-radius: 12px; transform: translateY(110%); opacity: 0; transition: transform 0.45s cubic-bezier(0.2, 0.9, 0.25, 1.2), opacity 0.3s; }
.alert-card.show { transform: none; opacity: 1; }
@media (prefers-reduced-motion: reduce) { .alert-card { transition: opacity 0.2s; transform: none; } }

.ticker { display: flex; align-items: stretch; height: 100vh; background: var(--plate); border-top: 2px solid var(--accent); font-family: var(--font-mono); }
.ticker .clock { flex: none; height: 100%; aspect-ratio: 3.4 / 1; padding: 11vh 6vh; display: grid; place-items: center; border-right: 1px solid var(--line-strong); }
.ticker .clock canvas { display: block; }
.ticker .lane { flex: 1; overflow: hidden; display: flex; align-items: center; mask-image: linear-gradient(90deg, transparent, #000 48px, #000 calc(100% - 32px), transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 48px, #000 calc(100% - 32px), transparent); }
.ticker .track { display: inline-flex; white-space: nowrap; animation: scroll linear infinite; animation-duration: 60s; }
.ticker .item { font-size: 34vh; color: var(--text); padding-right: 4em; }
.ticker .item b { color: var(--accent); font-weight: 500; margin-right: 0.7em; }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker .track { animation: none; } }

/* ---------------------------------------------------------------- site pages */
html.site, html.site body { margin: 0; background: var(--page); color: var(--text); font: 400 16px/1.6 var(--font-mono); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; text-transform: uppercase; color: var(--ink); line-height: 0.95; margin: 0; text-wrap: balance; }
h1 { font-size: 72px; }
h2 { font-size: 40px; margin-bottom: 28px; }
h3 { font-size: 22px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.fine { font-size: 13px; color: var(--muted); }
.label { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
code { background: #141418; color: var(--ink); padding: 1px 5px; border-radius: 3px; font-size: 0.93em; }

.bar { position: sticky; top: 0; z-index: 5; background: rgb(0 0 0 / 0.86); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); }
.bar .wrap { display: flex; align-items: center; gap: 28px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 700 22px/1 var(--font-head); text-transform: uppercase; letter-spacing: 0.02em; white-space: nowrap; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--ink); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 22px; border-radius: 6px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink); font: 500 13px/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--muted); color: var(--ink); }
.btn.solid { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.solid:hover { filter: brightness(1.08); }
.btn.small { min-height: 34px; padding: 0 14px; font-size: 11px; }

.block { padding: 88px 0; border-top: 1px solid var(--line); }
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; padding: 64px var(--gutter) 88px; }
.lead { max-width: 50ch; margin: 22px 0 32px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* a cage behind the previews: bars, bedding along the bottom, one cool lamp, so transparency reads as an overlay */
.stage { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-strong);
  background:
    linear-gradient(180deg, transparent 72%, rgb(120 84 40 / 0.55) 86%, rgb(150 110 60 / 0.75)),
    radial-gradient(60% 50% at 18% 12%, rgb(140 170 220 / 0.22), transparent 70%),
    repeating-linear-gradient(90deg, rgb(200 200 215 / 0.10) 0 3px, transparent 3px 34px),
    #0d0e13; }
.stage .tag { position: absolute; left: 12px; top: 10px; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: rgb(255 255 255 / 0.55); }
.stage .slot { position: absolute; overflow: hidden; }
.stage iframe { border: 0; transform-origin: 0 0; background: transparent; }

.setup { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 48px; align-items: start; }
.form { position: sticky; top: 84px; display: grid; gap: 22px; max-height: calc(100vh - 100px); overflow-y: auto; padding-right: 6px; scrollbar-width: thin; }
.field { display: grid; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 6px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.chip input:checked + span { border-color: var(--accent); color: var(--ink); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.swatch { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.range { display: flex; align-items: center; gap: 12px; }
.range input { flex: 1; accent-color: var(--accent); }
.range output { min-width: 5ch; text-align: right; color: var(--ink); }

.outputs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.stage.fit { aspect-ratio: auto; padding: 5% 4%; }
.stage.fit .slot { position: relative; }
.out { border: 1px solid var(--line); border-radius: 10px; padding: 18px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.out-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.url { display: flex; gap: 8px; }
.url input { flex: 1; min-width: 0; height: 36px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: #0b0b0e; color: var(--text); font: 400 12px var(--font-mono); }

.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 28px; }
.steps li { counter-increment: s; border-top: 1px solid var(--line-strong); padding-top: 14px; font-size: 14px; }
.steps li::before { content: "0" counter(s); display: block; color: var(--accent); font-size: 12px; letter-spacing: 0.12em; margin-bottom: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px 10px 0; border-top: 1px solid var(--line); vertical-align: top; }
th { font-weight: 500; color: var(--muted); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; }
td:first-child { color: var(--ink); white-space: nowrap; }

.foot { border-top: 1px solid var(--line); padding: 40px 0 56px; font-size: 13px; color: var(--muted); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 40px; justify-content: space-between; }

/* ---------------------------------------------------------------- the second screen */
.live { max-width: 560px; margin: 0 auto; padding: 16px; display: grid; gap: 16px; }
.live .plate { padding: 12px; }
.clockline { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.clockline strong { font: 700 34px/1 var(--font-head); color: var(--ink); }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 6.5em 1fr; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.feed li span:first-child { color: var(--muted); font-size: 12px; padding-top: 2px; }

@media (max-width: 960px) {
  .hero, .setup { grid-template-columns: minmax(0, 1fr); }
  .form { position: static; }
  h1 { font-size: 54px; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .nav { display: none; }
  h1 { font-size: 44px; }
  h2 { font-size: 32px; }
  .block { padding: 56px 0; }
  .hero { padding: 40px var(--gutter) 56px; }
}

/* ---------------------------------------------------------------- the watch page: the stream with the overlays on top */
.watch-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; min-height: 52px; padding: 8px 16px; border-bottom: 1px solid var(--line); }
.watch-top .brand { font-size: 20px; }
.watch-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.watch-main { width: min(100vw, calc((100vh - 53px) * 1.6667)); margin: 0 auto; }
.screen { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.screen .video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.screen .slot { position: absolute; overflow: hidden; pointer-events: none; }
.screen .slot iframe, .ticker-slot iframe { border: 0; transform-origin: 0 0; pointer-events: none; background: transparent; }
.board-slot { left: 1.5%; top: 2.5%; width: 30%; }
.alert-slot { left: 24%; width: 52%; bottom: 4%; }
.ticker-slot { position: relative; overflow: hidden; }
.offair { position: absolute; inset: 0; display: grid; align-items: center; justify-items: end; padding: 4% 6%;
  background:
    radial-gradient(55% 70% at 72% 40%, rgb(246 166 59 / 0.10), transparent 70%),
    repeating-linear-gradient(0deg, rgb(255 255 255 / 0.02) 0 1px, transparent 1px 4px),
    #07080b; }
.offair-box { width: min(52%, 560px); }
.offair-box h1 { font-size: clamp(22px, 3.4vw, 46px); margin: 8px 0 12px; }
.offair-box p { font-size: clamp(12px, 1.1vw, 15px); margin: 0; }
.paste { display: flex; gap: 8px; margin: 18px 0 10px; }
.paste input { flex: 1; min-width: 0; height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: #0b0b0e; color: var(--ink); font: 400 13px var(--font-mono); }
.paste input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
@media (max-width: 760px) {
  .watch-main { width: 100vw; }
  .offair { justify-items: center; align-items: center; padding: 0 4%; }
  .offair-box { width: 100%; }
  .offair-box h1, .offair-box > p:not(.fine), .offair-box .label, .offair-box .fine:not(.bad) { display: none; }
  .offair-box .fine.bad { color: var(--ink); background: rgb(0 0 0 / 0.7); padding: 2px 6px; border-radius: 4px; }
  .paste { margin: 0 0 6px; }
  .paste input, .paste .btn { height: 36px; min-height: 36px; }
}

/* ---------------------------------------------------------------- companion overlays: goal, round call, cam frame, scenes */
.goal-plate.done { animation: goal-pulse 1.2s ease-in-out infinite; }
@keyframes goal-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgb(246 166 59 / 0); } 50% { box-shadow: 0 0 0 6px rgb(246 166 59 / 0.35); } }
@media (prefers-reduced-motion: reduce) { .goal-plate.done { animation: none; } }

.frame-page { position: fixed; inset: 0; }
.frame-page #rim { position: absolute; left: 0; top: 0; }
.name-plate { position: absolute; left: 22px; bottom: 22px; padding: 8px 10px; border-radius: 8px; }
.name-plate canvas { max-width: 100%; }

html.scene, html.scene body { background: #050507; }
.scene-page { position: fixed; inset: 0; display: grid; place-items: center; padding: 2%;
  background:
    radial-gradient(60% 70% at 72% 42%, rgb(246 166 59 / 0.06), transparent 70%),
    repeating-linear-gradient(0deg, rgb(255 255 255 / 0.012) 0 1px, transparent 1px 6px),
    #050507; }
[data-theme="green"] .scene-page { background: radial-gradient(60% 70% at 72% 42%, rgb(127 224 138 / 0.06), transparent 70%), #050507; }
[data-theme="ice"] .scene-page { background: radial-gradient(60% 70% at 72% 42%, rgb(127 220 255 / 0.06), transparent 70%), #050507; }
.scene-page canvas { display: block; }

/* ---------------------------------------------------------------- the viewer's round call panel */
.callpanel { border: 1px solid var(--line-strong); border-radius: 10px; padding: 14px 16px 12px; display: grid; gap: 12px; background: #08080b; }
.cp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.cp-head .cp-title { display: block; font: 700 26px/1 var(--font-head); color: var(--ink); text-transform: uppercase; margin-top: 2px; }
.cp-right { display: grid; justify-items: end; gap: 4px; }
.cp-score { font: 700 15px/1 var(--font-head); text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink); padding: 4px 8px; border: 1px solid var(--line-strong); border-radius: 5px; }
.cp-score.hot { color: var(--accent); border-color: var(--accent); }
.cp-left.soon { color: var(--accent); }
.cp-buttons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cp-buttons button { display: grid; gap: 4px; min-height: 64px; padding: 10px 8px; border-radius: 8px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink); cursor: pointer; text-align: center; font-family: var(--font-mono); }
.cp-buttons button b { font: 700 20px/1 var(--font-head); text-transform: uppercase; letter-spacing: 0.02em; }
.cp-buttons button small { font-size: 11px; color: var(--muted); line-height: 1.3; }
.cp-buttons button:hover { border-color: var(--muted); }
.cp-buttons button[aria-pressed="true"] { border-color: var(--accent); background: rgb(246 166 59 / 0.1); }
.cp-buttons button[aria-pressed="true"] b { color: var(--accent); }
.cp-status { margin: 0; }
.cp-result { margin: 0; font-size: 14px; padding: 8px 10px; border-radius: 6px; background: #121216; }
.cp-result.good { color: #7fe08a; }
.cp-result.bad { color: var(--text); }
@media (max-width: 420px) { .cp-buttons button small { display: none; } .cp-buttons button { min-height: 48px; } }

.watch-deck { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; padding: 16px; }
.watch-note p { margin: 0 0 8px; font-size: 14px; }
@media (max-width: 760px) { .watch-deck { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- setup: companion fields and output groups */
.form-sep { margin: 10px 0 -6px; padding-top: 16px; border-top: 1px solid var(--line); }
.text, select { height: 38px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: #0b0b0e; color: var(--ink); font: 400 13px var(--font-mono); }
select { 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% - 16px) 16px, calc(100% - 11px) 16px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) 90px; gap: 8px; }
.outputs { gap: 0; }
.outputs-group { display: grid; gap: 28px; margin-bottom: 40px; }
.group-h { font-size: 26px; margin: 0 0 16px; color: var(--muted); }
#companion { padding-top: 8px; color: var(--ink); }
.group-lead { margin: -6px 0 22px; max-width: 70ch; font-size: 14px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 40px; }
.cols h3 { margin-bottom: 10px; }
.cols p { margin: 0; font-size: 14px; }
table.tight td { padding: 6px 10px 6px 0; border-top: 1px solid var(--line); font-size: 13px; }
table.tight td:first-child { white-space: nowrap; }
.quiet-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; color: var(--text); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line-strong); }
.quiet-link:hover { color: var(--ink); text-decoration-color: var(--accent); }
