:root {
  --bg: #0a0c11;
  --bg-raise: #12171f;
  --bg-card: #161b23;
  --line: #2b323d;
  --text: #e8eaed;
  --text-dim: #9aa3af;
  --text-faint: #7d8794;
  --accent: #6e9bff;
  --accent-dim: #6e9bff26;
  --good: #4ade80;
  /* A raised surface catches light on its top edge. One line, no blur. */
  --lift: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 1px 2px rgba(0, 0, 0, 0.4);
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html {
  scroll-behavior: smooth; color-scheme: dark;
  /* The hero glow bleeds 200px past the content column on purpose. On a
     phone there is no margin for it to bleed into, so it made the whole
     page scrollable sideways over empty space. `clip` and not `hidden`:
     hidden would turn this into a scroll container and kill the sticky
     header. */
  overflow-x: clip;
}
pre, .snippet {
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
pre::-webkit-scrollbar, .snippet::-webkit-scrollbar { height: 6px; }
pre::-webkit-scrollbar-thumb, .snippet::-webkit-scrollbar-thumb {
  background: var(--line); border-radius: 3px;
}
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent-dim); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 24px; }

/* ---- header ----
   The one place on this page where glass is honest: real content scrolls
   under it, so there is something to refract. Opaque by default, translucent
   only where backdrop-filter exists (Chromium 76+, so never on an old TV). */
.header-bar {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
.header-bar.scrolled { border-bottom-color: var(--line); }
/* Out of flow, 1px: a zero-area target is not reliably observable. */
.scroll-sentinel { position: absolute; top: 0; width: 1px; height: 1px; }
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .header-bar {
    background: rgba(10, 12, 17, 0.72);
    -webkit-backdrop-filter: blur(14px) saturate(1.6);
    backdrop-filter: blur(14px) saturate(1.6);
  }
}
header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 0;
}
/* Anchor targets clear the sticky bar instead of hiding under it. */
section[id] { scroll-margin-top: 88px; }
.brand { font-weight: 700; font-size: 18px; letter-spacing: -0.02em; color: var(--text); }
.brand span { color: var(--accent); }
nav a { color: var(--text-dim); font-size: 14px; margin-left: 24px; white-space: nowrap; }
nav a:hover { color: var(--text); text-decoration: none; }
@media (max-width: 520px) {
  nav a { margin-left: 16px; }
}

/* ---- hero ---- */
.hero { padding: 64px 0 40px; position: relative; }
.hero::before {
  /* one quiet glow, not a light show */
  content: ""; position: absolute; inset: -120px -200px auto;
  height: 420px; pointer-events: none;
  background: radial-gradient(600px 260px at 50% 0%, #6e9bff14, transparent 70%);
}
h1 {
  font-size: 48px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 750;
  max-width: 17ch;
}
.hero p.sub {
  margin: 22px 0 0;
  max-width: 54ch;
  font-size: 18px;
  color: var(--text-dim);
}
.hero p.sub strong { color: var(--text); font-weight: 600; }

.hero-code {
  margin-top: 34px;
  display: inline-flex; align-items: center;
  background: var(--bg-raise);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 18px;
  font-family: var(--mono);
  font-size: 14.5px;
  color: var(--text);
  box-shadow: var(--lift);
  max-width: 100%;
}
/* Only the code scrolls. The button used to sit inside the scroll area, so
   on a phone it was off-screen, exactly where the snippet matters most.
   Margin, not flex gap: gap in flexbox lands in Chromium 84, TVs are older. */
.hero-code .snippet {
  white-space: nowrap;
  overflow-x: auto;
  min-width: 0;
  margin-right: 14px;
}
.hero-code .tag { color: var(--text-faint); }
.hero-code .attr { color: var(--accent); }
.hero-code .val { color: var(--good); }
.copy-btn {
  font: 12px/1 system-ui, sans-serif;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  flex: none;
  cursor: pointer;
  transition: transform 140ms var(--ease-out), color 140ms ease, border-color 140ms ease;
}
.copy-btn:hover { color: var(--text); border-color: var(--text-faint); }
.copy-btn:active { transform: scale(0.96); }

/* ---- live panel ---- */
.live {
  margin: 46px 0 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-card);
  box-shadow: var(--lift);
  padding: 20px 22px;
}
.live-head { display: flex; align-items: flex-start; }
.dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--text-faint);
  flex: none;
  margin: 8px 14px 0 0;
  transition: background 300ms ease;
}
.live[data-state="hosted"] .dot { background: var(--good); box-shadow: 0 0 10px #4ade8055; }
.live[data-state="waiting"] .dot { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.live b { font-weight: 600; color: var(--text); }
.live .msg { font-size: 15px; color: var(--text-dim); }
.live .msg code { font-family: var(--mono); font-size: 13px; color: var(--text); }

/* The readout: what the boot script actually found, in both states. */
.readout {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.readout .row { display: flex; align-items: baseline; padding: 4px 0; }
.readout dt {
  width: 132px; flex: none;
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-faint);
}
.readout dd { font-family: var(--mono); font-size: 13.5px; color: var(--text-dim); }
.readout .val { color: var(--text); }
.tag-chip {
  display: inline-block;
  font-family: var(--mono); font-size: 12.5px;
  color: var(--text);
  background: var(--bg-raise);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 8px;
  margin: 0 6px 4px 0;
}
.live[data-state="hosted"] .readout .cap { color: var(--accent); }
@media (max-width: 520px) {
  .readout .row { display: block; padding: 8px 0 4px; }
  .readout dt { width: auto; margin-bottom: 6px; }
}
/* The one state change on this page worth animating: the answer fades in
   instead of teleporting over the "Checking…" line. */
.live .msg, .live .readout { transition: opacity 200ms ease; }
.live.swap .msg, .live.swap .readout { opacity: 0; }

/* ---- sections ---- */
section { padding: 72px 0 0; }
.kicker {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
h2 {
  font-size: 30px;
  font-size: clamp(24px, 3.6vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin-top: 10px;
  max-width: 24ch;
}
.lede { margin-top: 14px; max-width: 58ch; color: var(--text-dim); }

/* powers grid */
.grid {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}
.card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-card);
  box-shadow: var(--lift);
  padding: 20px;
  transition: border-color 180ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .card:hover { border-color: #38404c; }
}
.card.wide { grid-column: 1 / -1; }
.card h3 {
  font-family: var(--mono);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--accent);
  letter-spacing: -0.01em;
}
.card p { margin-top: 8px; font-size: 14.5px; color: var(--text-dim); }
.card pre {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-dim);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  overflow-x: auto;
}
.card pre .c { color: var(--text-faint); }
.card pre .k { color: var(--text); }

/* how it works */
.steps { margin-top: 36px; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.step {
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg-card); padding: 20px;
  box-shadow: var(--lift);
}
.step .n {
  font-family: var(--mono); font-size: 13px; color: var(--text-faint);
}
.step h3 { margin-top: 6px; font-size: 16px; font-weight: 650; line-height: 1.3; letter-spacing: -0.01em; }
.step p { margin-top: 6px; font-size: 14.5px; color: var(--text-dim); }
.step pre {
  margin-top: 12px; font-family: var(--mono); font-size: 12.5px; line-height: 1.55;
  color: var(--text-dim); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px;
  overflow-x: auto;
}
.step pre .k { color: var(--text); }

/* platforms */
.platforms { margin-top: 32px; display: flex; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px; font-size: 14px; color: var(--text-dim);
  background: var(--bg-card);
  margin: 0 10px 10px 0;
}
.chip b { color: var(--text); font-weight: 600; }

/* A statement of fact about the rollout, not a banner. */
.status {
  margin-top: 18px;
  border-left: 2px solid var(--accent);
  padding: 2px 0 2px 14px;
  color: var(--text-dim);
  font-size: 15px;
  max-width: 64ch;
}
.cta {
  margin: 64px 0 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--bg-card), var(--bg-raise));
  box-shadow: var(--lift);
  padding: 36px;
  text-align: center;
}
.cta h2 { margin: 0 auto; }
.cta p { margin: 12px auto 0; color: var(--text-dim); max-width: 50ch; }
.btn {
  display: inline-block;
  margin-top: 22px;
  background: var(--accent);
  color: #0b0d10;
  font-weight: 650;
  font-size: 15px;
  border-radius: 9px;
  padding: 12px 22px;
  transition: transform 140ms var(--ease-out), filter 140ms ease;
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn:active { transform: scale(0.97); }

footer {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  padding: 28px 0 44px;
  display: flex; flex-wrap: wrap; gap: 12px 28px;
  justify-content: space-between;
  color: var(--text-faint);
  font-size: 13.5px;
}
footer code { font-family: var(--mono); color: var(--text-dim); }

/* ---- scroll reveal ----
   Decorative and strictly progressive: content is VISIBLE by default and
   only hidden when JS has marked the document (html.js); a TV browser
   where anything fails still shows the whole page. */
html.js .reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
  transition-delay: var(--d, 0ms);
}
html.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { transform: none; transition: opacity 300ms ease; }
  .live[data-state="waiting"] .dot { animation: none; }
}

/* ---- focus ----
   On a TV the D-pad is the only way around this page, and the UA ring is
   hard to see on this background. Browsers without :focus-visible drop the
   second rule and simply keep the ring on every focus. */
a:focus, .btn:focus, .copy-btn:focus {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
a:focus:not(:focus-visible),
.btn:focus:not(:focus-visible),
.copy-btn:focus:not(:focus-visible) { outline: none; }
/* ---- the addon index ----
   Its own page, the same shell. A row is a card like the ones above, laid out
   as a list because a list is what it is. */
.page { padding: 56px 0 0; }
.page h1 { max-width: 20ch; }
.addons {
  list-style: none; padding: 0; margin: 36px 0 0;
  display: grid; gap: 12px;
}
.addon {
  display: flex; gap: 16px; align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-card);
  box-shadow: var(--lift);
  padding: 16px 18px;
}
.addon .icon {
  width: 40px; height: 40px; border-radius: 8px; flex: none;
  background: var(--bg-raise); overflow: hidden;
}
.addon .icon img { display: block; width: 100%; height: 100%; object-fit: cover; }
.addon h3 { font-size: 15px; font-weight: 650; letter-spacing: -0.01em; }
.addon p { margin-top: 4px; color: var(--text-dim); font-size: 14px; }
.addon code {
  display: inline-block; margin-top: 8px;
  font-family: var(--mono); font-size: 12.5px; color: var(--text-faint);
}
.note { margin-top: 28px; color: var(--text-dim); font-size: 14px; }
