/* Open Video Menu — site styles. No external fonts, scripts or trackers. */

:root {
  --bg: #07080b;
  --bg-raised: #0d1016;
  --surface: #121620;
  --surface-2: #181d29;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #ece8df;
  --muted: #a8a397;
  --faint: #7d796f;
  --gold: #ffcf6a;
  --gold-deep: #e3a93b;
  --gold-soft: rgba(255, 207, 106, 0.12);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  --radius: 14px;
  --wrap: 1160px;
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: #ffe2a3; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.4rem, 5.2vw, 4.1rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
code, pre { font-family: var(--mono); font-size: 0.88em; }
:not(pre) > code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 0.1em 0.4em; }

.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #000; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 12px; }
.eyebrow { font: 600 0.78rem/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); margin-bottom: 1.1em; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 42em; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

/* --- header -------------------------------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 8, 11, 0.82);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 600 1.15rem/1 var(--serif); white-space: nowrap; }
.brand img { width: 30px; height: 30px; }
.brand:hover { color: var(--text); }
.nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav a { color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-size: 0.95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--surface); }
.nav .btn { margin-left: 8px; }
@media (max-width: 860px) {
  .site-header .wrap { flex-wrap: wrap; row-gap: 0; padding-top: 10px; padding-bottom: 6px; }
  .nav { margin-left: 0; width: 100%; flex-wrap: wrap; gap: 0 14px; }
  .nav a { padding: 6px 0; font-size: 0.88rem; }
}

/* --- buttons ------------------------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font: 600 0.98rem/1 var(--sans); text-decoration: none;
  border: 1px solid transparent; transition: transform 0.15s, background 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--gold); color: #140f03; }
.btn-primary:hover { background: #ffdc8f; color: #140f03; transform: translateY(-1px); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--gold); color: var(--text); }
.btn-small { padding: 8px 16px; font-size: 0.9rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* --- placeholders: things that don't exist yet --------------------------------------------- */

.tbd {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px dashed rgba(255, 207, 106, 0.55); border-radius: 10px;
  background: repeating-linear-gradient(135deg, rgba(255, 207, 106, 0.05) 0 10px, transparent 10px 20px);
  color: var(--muted); padding: 8px 14px; font-size: 0.92rem;
}
.tbd::before { content: "Coming soon"; font: 700 0.68rem/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.tbd-block { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-height: 160px; padding: 24px; }
.tbd-block::before { margin-bottom: 6px; }
.btn.tbd-link { border-style: dashed; border-color: rgba(255, 207, 106, 0.55); color: var(--muted); background: transparent; cursor: default; }

/* --- sections ------------------------------------------------------------------------------ */

section { padding: 96px 0; }
section + section { border-top: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: 48px; }
.center { text-align: center; margin-inline: auto; }

.hero { padding: 88px 0 72px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto 40%; height: 120%;
  background: radial-gradient(closest-side, rgba(255, 207, 106, 0.16), transparent 70%);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.02fr 1.18fr; gap: 56px; align-items: center; position: relative; }
.hero h1 em { font-style: italic; color: var(--gold); }
.hero .lead { margin-top: 18px; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } }

.page-hero { padding: 80px 0 56px; }
.page-hero .lead { margin-top: 12px; }

/* A TV, for screenshots. */
.tv { position: relative; }
.tv-screen {
  border-radius: 12px; overflow: hidden; background: #000;
  border: 10px solid #15171c; outline: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(0, 0, 0, 0.6);
}
.tv-stand { width: 26%; height: 14px; margin: 0 auto; background: linear-gradient(#15171c, #0b0c10); border-radius: 0 0 10px 10px; }
.tv-caption { margin-top: 14px; font-size: 0.85rem; color: var(--faint); text-align: center; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.card h3 { margin-bottom: 0.4em; }
.card p:last-child { margin-bottom: 0; }
.card .icon { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); margin-bottom: 18px; }
.card .icon svg { width: 22px; height: 22px; }
.card-link { text-decoration: none; color: inherit; transition: border-color 0.15s, transform 0.15s; display: block; }
.card-link:hover { border-color: rgba(255, 207, 106, 0.45); color: inherit; transform: translateY(-2px); }
.card-link .more { color: var(--gold); font-weight: 600; font-size: 0.95rem; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split.reverse > :first-child { order: 2; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .split.reverse > :first-child { order: 0; } }

.steps { counter-reset: step; display: grid; gap: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.steps > li { list-style: none; counter-increment: step; }
.steps > li::before { content: counter(step); display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold); font: 600 0.95rem/1 var(--sans); margin-bottom: 16px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
ol.steps { padding: 0; margin: 0; }

.checks { list-style: none; padding: 0; margin: 0 0 1em; }
.checks li { padding-left: 30px; position: relative; margin-bottom: 0.6em; }
.checks li::before { content: ""; position: absolute; left: 4px; top: 0.55em; width: 12px; height: 7px; border-left: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(-45deg); }

pre.code {
  background: #0a0c11; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; overflow-x: auto; line-height: 1.6; color: #d8d3c7; margin: 0;
}
.code .k { color: #9ecbff; }
.code .s { color: #ffcf6a; }
.code .c { color: var(--faint); }
.code .n { color: #b5e0a8; }

.pill-row { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { border: 1px solid var(--line-strong); border-radius: 999px; padding: 8px 16px; font-size: 0.95rem; color: var(--text); background: var(--surface); }
.pill small { color: var(--muted); margin-left: 6px; }

.callout { border: 1px solid rgba(255, 207, 106, 0.35); background: linear-gradient(180deg, rgba(255, 207, 106, 0.08), rgba(255, 207, 106, 0.02)); border-radius: var(--radius); padding: 28px 30px; }
.callout h3 { color: var(--gold); }

table { width: 100%; border-collapse: collapse; font-size: 0.96rem; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }

.faq details { border-bottom: 1px solid var(--line); padding: 6px 0; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 40px 18px 0; position: relative; font: 600 1.15rem/1.4 var(--serif); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 14px; color: var(--gold); font: 400 1.6rem/1 var(--sans); }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 0 18px; color: var(--muted); max-width: 48em; }

.prose { max-width: 760px; }
.prose h2 { font-size: 1.6rem; margin-top: 2em; }
.prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 0.4em; }

/* --- footer -------------------------------------------------------------------------------- */

.site-footer { border-top: 1px solid var(--line); padding: 64px 0 40px; background: var(--bg-raised); font-size: 0.93rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.site-footer h4 { font: 600 0.78rem/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0 0 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.legal { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--faint); font-size: 0.85rem; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

/* Grid and flex children may shrink below their content (long code lines scroll instead of
   widening the page). */
.grid > *, .split > *, .hero-grid > *, .steps > *, .footer-grid > * { min-width: 0; }
.btn.tbd-link::before { content: "Soon"; font: 700 0.62rem/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); border: 1px solid rgba(255, 207, 106, 0.5); border-radius: 999px; padding: 3px 6px; }

/* --- specification pages (site/spec, built by tools/build-spec.mjs) ------------------------- */
.spec-page { padding: 40px 0 80px; }
.spec-nav { margin: 0 0 20px; }
.spec { max-width: 900px; }
.spec h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.spec h4 { font-size: 1.05rem; margin: 1.4em 0 0.4em; }
.spec .anchor { color: inherit; text-decoration: none; }
.spec .anchor:hover { text-decoration: underline; }
.spec pre { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; overflow-x: auto; line-height: 1.5; }
.spec pre code { background: none; border: 0; padding: 0; }
.spec .table-wrap { margin: 1em 0 1.4em; }
.spec td code, .spec th code { white-space: nowrap; }
.spec-toc { max-width: 900px; margin: 0 0 32px; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.spec-toc summary { cursor: pointer; color: var(--muted); }
.spec-toc ul { margin: 10px 0 0; padding-left: 0; list-style: none; columns: 2; column-gap: 32px; }
.spec-toc li { margin-bottom: 4px; break-inside: avoid; }
@media (max-width: 640px) { .spec-toc ul { columns: 1; } }
