/* MosaicTV — the website. Dark like the app, lit like a studio. */

:root {
  --canvas: #06070b;
  --sunken: #0a0c12;
  --surface: #10131b;
  --raised: #171b26;
  --edge: #1d222f;
  --edge-strong: #2b3243;
  --ink: #f2f4f8;
  --ink-soft: #c8cdd9;
  --ink-muted: #8f96a8;
  --ink-faint: #6a7184;
  --brand: #8b5cf6;
  --cue: #ffb020;
  --live: #ff3b4f;
  --rainbow: linear-gradient(90deg, #a855f7, #6366f1, #3b82f6, #22d3ee, #34d399, #fbbf24, #fb7185);
  --display: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 18px;
  --page: min(1240px, calc(100vw - 32px));
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: inherit;
}
::selection {
  background: rgba(139, 92, 246, 0.45);
}
.wrap {
  width: var(--page);
  margin: 0 auto;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ── Type ─────────────────────────────────────────────────────────────── */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 600 15px/1 var(--display);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cue);
}
.kicker::before {
  content: '';
  width: 26px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}
h1,
h2,
h3 {
  margin: 0;
  text-wrap: balance;
  font-family: var(--sans);
  letter-spacing: -0.035em;
  line-height: 1.02;
}
h1 {
  font-size: clamp(44px, 7.4vw, 104px);
  font-weight: 850;
}
h2 {
  font-size: clamp(34px, 4.6vw, 62px);
  font-weight: 800;
}
h3 {
  font-size: clamp(21px, 2vw, 26px);
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.lede {
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 62ch;
}
.muted {
  color: var(--ink-muted);
}
.rainbow {
  background: var(--rainbow);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
code,
kbd {
  font-family: var(--mono);
  font-size: 0.86em;
}
kbd {
  display: inline-block;
  min-width: 1.7em;
  padding: 1px 6px;
  border: 1px solid var(--edge-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--raised);
  color: var(--ink);
  text-align: center;
  line-height: 1.5;
}

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  padding: 0 22px;
  border-radius: 14px;
  border: 1px solid var(--edge-strong);
  background: var(--raised);
  color: var(--ink);
  font: 650 16px var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), border-color 0.2s, background 0.2s;
}
.btn:hover {
  transform: translateY(-2px);
  border-color: #3a4256;
}
.btn.primary {
  border: 0;
  background: #fff;
  color: #0b0c10;
  box-shadow: 0 10px 40px -10px rgba(139, 92, 246, 0.7);
}
.btn.primary:hover {
  background: #f1edff;
}
.btn svg {
  width: 20px;
  height: 20px;
}

/* ── Nav ──────────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(6, 7, 11, 0.72);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-color: rgba(43, 50, 67, 0.6);
}
.nav .wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font: 800 21px var(--sans);
  letter-spacing: -0.03em;
}
.brand img {
  width: 34px;
  height: 34px;
}
.brand b {
  background: linear-gradient(90deg, #22d3ee, #fbbf24);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nav nav {
  display: flex;
  gap: 4px;
  margin-left: 8px;
}
.nav nav a {
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 550;
  transition: color 0.2s, background 0.2s;
}
.nav nav a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
}
.nav .right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav .btn {
  height: 40px;
  padding: 0 16px;
  font-size: 14.5px;
  border-radius: 11px;
}
.nav .btn.icon {
  width: 40px;
  padding: 0;
  justify-content: center;
}
.nav .right {
  gap: 8px;
}
.gh-stars {
  font: 600 13px var(--mono);
  color: var(--ink-muted);
}
.nav nav a {
  white-space: nowrap;
}
@media (max-width: 1080px) {
  .nav nav {
    display: none;
  }
}
@media (max-width: 560px) {
  .nav .hide-sm {
    display: none;
  }
}

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 140px 0 40px;
  text-align: center;
  isolation: isolate;
  /* the glow behind the headline reaches past the edges */
  overflow-x: clip;
}
.hero::before {
  content: '';
  position: absolute;
  inset: -10% -10% auto;
  height: 900px;
  z-index: -1;
  background:
    radial-gradient(40% 50% at 22% 30%, rgba(168, 85, 247, 0.28), transparent 70%),
    radial-gradient(35% 45% at 78% 26%, rgba(34, 211, 238, 0.2), transparent 70%),
    radial-gradient(40% 40% at 55% 70%, rgba(251, 191, 36, 0.14), transparent 70%);
  filter: blur(10px);
}
.hero .onair {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 10px;
  border: 1px solid var(--edge-strong);
  border-radius: 999px;
  background: rgba(16, 19, 27, 0.7);
  font: 600 14px var(--display);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
}
.tally {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--live);
  color: #fff;
  font: 700 12px var(--display);
  letter-spacing: 0.14em;
}
.tally::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  animation: blink 1.6s infinite;
}
@keyframes blink {
  50% {
    opacity: 0.25;
  }
}
.hero h1 {
  margin: 26px auto 22px;
}
.hero .lede {
  margin: 0 auto;
  text-align: center;
}
.hero .ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 34px 0 0;
}

/* The TV in the hero: real frames from the demo channels, flipped like a set. */
.tv-stage {
  position: relative;
  margin: 64px auto 0;
  width: min(1180px, calc(100vw - 32px));
  perspective: 2000px;
}
.tv-glow {
  position: absolute;
  inset: 6% 4% -2%;
  z-index: -1;
  background: var(--rainbow);
  filter: blur(80px) saturate(1.3);
  opacity: 0.38;
  border-radius: 40px;
  transition: opacity 0.6s;
}
.tv {
  position: relative;
  border-radius: 22px;
  padding: 12px;
  background: linear-gradient(180deg, #23283a, #12151f);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 50px 120px -30px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(255, 255, 255, 0.04);
}
.tv .screen {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}
.tv .screen img,
.tv .screen canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tv .screen canvas {
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}
.tv .screen.flipping canvas {
  opacity: 1;
}
.tv .screen::after {
  /* scanlines and a little glass */
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(transparent 50%, rgba(0, 0, 0, 0.07) 50%) 0 0 / 100% 4px,
    radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, 0.07), transparent 60%);
}
.osd {
  position: absolute;
  top: 5%;
  left: 4%;
  font: 700 clamp(28px, 5vw, 64px) var(--display);
  color: #7dff9a;
  text-shadow: 0 0 12px rgba(125, 255, 154, 0.7), 2px 2px 0 rgba(0, 0, 0, 0.6);
  letter-spacing: 0.04em;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.osd.show {
  opacity: 1;
}
.remote {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}
.remote button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 14px 0 10px;
  border-radius: 12px;
  border: 1px solid var(--edge);
  background: rgba(16, 19, 27, 0.8);
  color: var(--ink-muted);
  font: 600 15px var(--display);
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.remote button .num {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 22px;
  padding: 0 5px;
  border-radius: 6px;
  background: var(--raised);
  color: var(--ink-soft);
  font: 700 13px var(--mono);
}
.remote button:hover {
  color: var(--ink);
  border-color: var(--edge-strong);
}
.remote button[aria-pressed='true'] {
  color: #fff;
  border-color: rgba(139, 92, 246, 0.7);
  background: rgba(139, 92, 246, 0.18);
}
.remote button[aria-pressed='true'] .num {
  background: var(--brand);
  color: #fff;
}
.remote .hint {
  width: 100%;
  margin-top: 6px;
  font-size: 14px;
  color: var(--ink-faint);
}

/* Works-with strip */
.works {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  justify-content: center;
  align-items: center;
  margin: 70px auto 0;
  color: var(--ink-faint);
  font: 600 15px var(--display);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.works span {
  color: var(--ink-soft);
  letter-spacing: 0.08em;
  font-size: 19px;
}

/* ── Sections ─────────────────────────────────────────────────────────── */
section {
  position: relative;
  padding: clamp(70px, 9vw, 120px) 0;
}
.head {
  max-width: 820px;
  margin-bottom: clamp(40px, 5vw, 64px);
}
.head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.head.center .lede {
  margin: 0 auto;
}
.head h2 {
  margin: 18px 0 20px;
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.split.flip {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr);
}
.split > *,
.install > *,
.choose > * {
  min-width: 0;
}
.split.flip > :first-child {
  order: 2;
}
@media (max-width: 960px) {
  .split,
  .split.flip {
    grid-template-columns: minmax(0, 1fr);
  }
  .split.flip > :first-child {
    order: 0;
  }
}
.points {
  list-style: none;
  padding: 0;
  margin: 26px 0 0;
  display: grid;
  gap: 14px;
}
.points li {
  position: relative;
  padding-left: 30px;
  color: var(--ink-soft);
}
.points li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.55em;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--rainbow);
  background-size: 700% 100%;
}
.points li:nth-child(2)::before {
  background-position: 33% 0;
}
.points li:nth-child(3)::before {
  background-position: 66% 0;
}
.points li:nth-child(4)::before {
  background-position: 100% 0;
}
.points b {
  color: var(--ink);
  font-weight: 650;
}

/* A screenshot in a window */
.shot {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--edge-strong);
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 40px 100px -40px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(0, 0, 0, 0.4);
}
.shot .bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  border-bottom: 1px solid var(--edge);
  background: #0d1017;
}
.shot .bar i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #2b3243;
}
.shot .bar span {
  margin: 0 auto;
  font: 500 12.5px var(--mono);
  color: var(--ink-faint);
  padding-right: 40px;
}
.shot img {
  width: 100%;
}
.frame {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--edge);
  background: #000;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9);
}
.caption {
  margin-top: 14px;
  font-size: 14.5px;
  color: var(--ink-faint);
  text-align: center;
}
.glow-behind {
  position: relative;
  isolation: isolate;
}
.glow-behind::before {
  content: '';
  position: absolute;
  inset: 8% 6%;
  z-index: -1;
  background: var(--g, var(--rainbow));
  filter: blur(70px);
  opacity: 0.32;
  border-radius: 40px;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ── Broadcast episodes: segments folding into a half-hour ──────────── */
.fold {
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--sunken));
  padding: clamp(18px, 3vw, 32px);
}
.fold .row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  align-items: center;
}
.fold .row + .row {
  margin-top: 16px;
}
.fold .label {
  font: 600 14px var(--display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.fold .track {
  position: relative;
  height: 66px;
  border-radius: 12px;
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(25% - 1px), rgba(255, 255, 255, 0.06) calc(25% - 1px) 25%),
    #0b0d14;
  overflow: hidden;
}
.seg {
  position: absolute;
  top: 7px;
  bottom: 7px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 13.5px;
  line-height: 1.25;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  transition: left 1.1s var(--ease), width 1.1s var(--ease), opacity 0.6s, border-radius 0.6s;
}
.seg small {
  font: 600 11.5px var(--display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.8;
}
.seg.a {
  background: linear-gradient(135deg, #6d28d9, #8b5cf6);
}
.seg.b {
  background: linear-gradient(135deg, #0e7490, #22d3ee);
  color: #04222b;
}
.seg.c {
  background: linear-gradient(135deg, #b45309, #fbbf24);
  color: #2a1500;
}
.seg.x {
  background: linear-gradient(135deg, #2b3243, #3a4256);
  color: var(--ink-soft);
}
.seg.gap {
  background: repeating-linear-gradient(135deg, #1b1f2b 0 6px, #141824 6px 12px);
  color: var(--ink-faint);
}
.fold .ticks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 10px 0 0 106px;
  font: 500 12.5px var(--mono);
  color: var(--ink-faint);
}
@media (max-width: 640px) {
  .fold .row {
    grid-template-columns: minmax(0, 1fr);
  }
  .fold .label {
    display: none;
  }
  .fold .ticks {
    margin-left: 0;
  }
  .seg {
    padding: 0 7px;
    font-size: 12px;
  }
}
.fold .after .seg {
  opacity: 0;
}
.fold.folded .after .seg {
  opacity: 1;
}
.fold .verdict {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--edge);
  font-size: 15px;
  color: var(--ink-muted);
}
.fold .verdict b {
  color: var(--ink);
}
.fold .together,
.fold.folded .apart {
  display: none;
}
.fold.folded .together {
  display: block;
}
.fold .track.parts {
  height: 92px;
}
.fold .track.parts .seg {
  top: 28px;
}
.fold .brace {
  position: absolute;
  top: 9px;
  height: 12px;
  border: 2px solid rgba(167, 139, 250, 0.85);
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  transition: left 1.1s var(--ease), width 1.1s var(--ease), opacity 0.6s;
}
.fold .brace span {
  position: absolute;
  left: 50%;
  top: -9px;
  transform: translateX(-50%);
  padding: 0 10px;
  background: #0b0d14;
  font: 600 11.5px var(--display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #c4b5fd;
}
@media (max-width: 640px) {
  .fold .brace span {
    font-size: 10px;
    letter-spacing: 0.06em;
  }
}
.toggle {
  display: inline-flex;
  flex-wrap: wrap;
  max-width: 100%;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--edge);
  background: var(--sunken);
  gap: 4px;
}
.toggle button {
  height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-muted);
  font: 600 14.5px var(--sans);
  cursor: pointer;
  transition: all 0.2s;
}
.toggle button[aria-pressed='true'] {
  background: var(--raised);
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--edge-strong);
}

/* Tabbed screenshots */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}
.tabs.center {
  justify-content: center;
}
.tab {
  height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--edge);
  background: var(--surface);
  color: var(--ink-muted);
  font: 600 15px var(--sans);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.tab:hover {
  color: var(--ink);
}
.tab[aria-selected='true'] {
  color: #fff;
  border-color: rgba(139, 92, 246, 0.6);
  background: rgba(139, 92, 246, 0.16);
}
.panes {
  position: relative;
}
.pane {
  display: none;
}
.pane.on {
  display: block;
  animation: fadein 0.5s var(--ease);
}
@keyframes fadein {
  from {
    opacity: 0;
    transform: scale(0.985);
  }
}
.pane-note {
  margin: 16px auto 0;
  max-width: 70ch;
  text-align: center;
  color: var(--ink-muted);
  font-size: 15.5px;
}

/* Ident gallery: a group per look */
.ident-groups {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.ident-group {
  padding: 22px;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--sunken));
}
.ident-group h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
}
.ident-group > p {
  margin: 0 0 16px;
  color: var(--ink-muted);
  font-size: 15px;
}
.badge {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.55);
  color: #ddd6fe;
  font: 600 12px var(--display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.idents {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 900px) {
  .ident-groups {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 460px) {
  .idents {
    grid-template-columns: minmax(0, 1fr);
  }
}
.ident {
  position: relative;
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--edge);
  background: #000;
  aspect-ratio: 16 / 9;
}
.ident video,
.ident img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ident figcaption {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(6, 7, 11, 0.72);
  backdrop-filter: blur(8px);
  font: 600 13.5px var(--display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Feature grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.card {
  position: relative;
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid var(--edge);
  background: linear-gradient(180deg, var(--surface), var(--sunken));
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--edge-strong);
}
.card .ico {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  margin-bottom: 18px;
  background: rgba(139, 92, 246, 0.14);
  color: #c4b5fd;
}
.card .ico svg {
  width: 22px;
  height: 22px;
}
.card h3 {
  font-size: 19px;
  margin-bottom: 8px;
}
.card p {
  margin: 0;
  font-size: 15.5px;
  color: var(--ink-muted);
}
.card.wide {
  grid-column: span 2;
}
.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 900px) {
  .grid.three {
    grid-template-columns: 1fr;
  }
}
.card .thumb {
  margin: 20px -26px -26px;
  border-top: 1px solid var(--edge);
}
@media (max-width: 640px) {
  .card.wide {
    grid-column: auto;
  }
}

/* Comparison */
.compare {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  font-size: 15.5px;
}
.compare th,
.compare td {
  padding: 18px 20px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--edge);
}
.compare tr:last-child td {
  border-bottom: 0;
}
.compare thead th {
  background: var(--raised);
  font: 600 15px var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.compare thead th:nth-child(2) {
  color: #fff;
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.28), rgba(139, 92, 246, 0.1));
}
.compare td:first-child {
  width: 22%;
  font-weight: 650;
  color: var(--ink);
}
.compare td:nth-child(2) {
  color: var(--ink);
  background: rgba(139, 92, 246, 0.05);
  width: 41%;
}
.compare td:nth-child(3) {
  color: var(--ink-muted);
}
.compare.features td:nth-child(2) {
  width: auto;
}
@media (max-width: 760px) {
  .compare.features {
    min-width: 0;
  }
  .compare.features td {
    padding: 14px;
  }
}
.compare .yes {
  color: #34d399;
  font-weight: 700;
}
.cmp-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 760px) {
  .compare {
    min-width: 680px;
  }
}
.choose {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}
@media (max-width: 760px) {
  .choose {
    grid-template-columns: 1fr;
  }
}
.choose .card h3 {
  font-size: 18px;
}

/* Hardware tiers: the Recommended column is the highlighted one */
.hardware {
  margin-top: clamp(40px, 6vw, 72px);
}
.hardware h3 {
  margin: 0 0 8px;
}
.hardware > p:first-of-type {
  margin: 0 0 20px;
  color: var(--ink-muted);
}
.compare.specs td:nth-child(n + 2) {
  width: 26%;
  color: var(--ink);
  background: none;
}
.compare.specs thead th:nth-child(2) {
  color: var(--ink-muted);
  background: var(--raised);
}
.compare.specs thead th:nth-child(3) {
  color: #fff;
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.28), rgba(139, 92, 246, 0.1));
}
.compare.specs td:nth-child(3) {
  background: rgba(139, 92, 246, 0.05);
}

/* Install */
.install {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}
@media (max-width: 960px) {
  .install {
    grid-template-columns: minmax(0, 1fr);
  }
}
.steps {
  counter-reset: s;
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  gap: 18px;
}
.steps li {
  counter-increment: s;
  position: relative;
  padding-left: 52px;
  color: var(--ink-soft);
}
.steps li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: -2px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--raised);
  border: 1px solid var(--edge-strong);
  font: 700 16px var(--display);
  color: var(--cue);
}
.steps b {
  color: var(--ink);
}
.code {
  position: relative;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: #090b10;
  overflow: hidden;
}
.code pre {
  margin: 0;
  padding: 22px 24px;
  overflow-x: auto;
  font: 500 14px/1.7 var(--mono);
  color: #d6dbe6;
}
.code .c {
  color: #6a7184;
}
.code .k {
  color: #c4b5fd;
}
.code .s {
  color: #7dd3fc;
}
.copy {
  position: absolute;
  top: 10px;
  right: 10px;
  height: 34px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid var(--edge-strong);
  background: var(--raised);
  color: var(--ink-soft);
  font: 600 13px var(--sans);
  cursor: pointer;
}
.copy.done {
  color: #34d399;
}
.note {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 176, 32, 0.3);
  background: rgba(255, 176, 32, 0.06);
  color: var(--ink-soft);
  font-size: 15px;
}
.note b {
  color: var(--cue);
}

/* FAQ */
.faq {
  max-width: 860px;
  margin: 0 auto;
}
.faq details {
  border-bottom: 1px solid var(--edge);
}
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 40px 22px 0;
  position: relative;
  font-weight: 650;
  font-size: 18px;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  position: absolute;
  right: 4px;
  top: 16px;
  font: 300 30px var(--sans);
  color: var(--ink-faint);
  transition: transform 0.3s var(--ease);
}
.faq details[open] summary::after {
  transform: rotate(45deg);
}
.faq details p {
  margin: -6px 0 22px;
  color: var(--ink-muted);
}

/* Closing + footer */
.closing {
  text-align: center;
  overflow: hidden;
}
.closing h2 {
  max-width: 16ch;
  margin: 18px auto 22px;
}
.mosaic-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0.45;
  /* Clear behind the words, and fading out at the top and bottom. */
  mask-image: radial-gradient(60% 70% at 50% 50%, transparent 25%, #000 75%), linear-gradient(transparent, #000 22%, #000 78%, transparent);
  -webkit-mask-image: radial-gradient(60% 70% at 50% 50%, transparent 25%, #000 75%), linear-gradient(transparent, #000 22%, #000 78%, transparent);
  mask-composite: intersect;
  -webkit-mask-composite: source-in;
}
footer {
  border-top: 1px solid var(--edge);
  padding: 46px 0 60px;
  color: var(--ink-faint);
  font-size: 14.5px;
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 40px;
  justify-content: space-between;
  align-items: center;
}
footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}
footer a {
  color: var(--ink-muted);
  text-decoration: none;
}
footer a:hover {
  color: var(--ink);
}

/* Phones */
.phones {
  display: flex;
  justify-content: center;
  gap: clamp(14px, 3vw, 34px);
  flex-wrap: wrap;
}
.phone {
  width: min(270px, 42vw);
  border-radius: 38px;
  padding: 9px;
  background: linear-gradient(180deg, #2a2f40, #11141d);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.phone img {
  border-radius: 30px;
}
.phone:nth-child(2) {
  transform: translateY(-30px);
}
@media (max-width: 640px) {
  .phone:nth-child(2) {
    transform: none;
  }
  .phone:nth-child(3) {
    display: none;
  }
}

/* Stats ribbon */
.ribbon {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.ribbon div {
  padding: 26px 24px;
  border-right: 1px solid var(--edge);
}
.ribbon div:last-child {
  border-right: 0;
}
.ribbon b {
  display: block;
  font: 700 44px/1 var(--display);
  letter-spacing: 0.01em;
}
.ribbon span {
  display: block;
  margin-top: 8px;
  font-size: 14.5px;
  color: var(--ink-muted);
}
@media (max-width: 760px) {
  .ribbon {
    grid-template-columns: 1fr 1fr;
  }
  .ribbon div:nth-child(2) {
    border-right: 0;
  }
  .ribbon div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--edge);
  }
}

/* Click a picture to see it full size */
.zoomable {
  cursor: zoom-in;
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 40px);
  background: rgba(4, 5, 8, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: zoom-out;
  opacity: 0;
  transition: opacity 0.2s;
}
.lightbox.open {
  opacity: 1;
}
.lightbox figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 100%;
  max-height: 100%;
}
.lightbox img,
.lightbox video {
  max-width: min(100%, 2400px);
  max-height: calc(100vh - 110px);
  border-radius: 12px;
  box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.9);
}
.lightbox figcaption {
  max-width: 900px;
  text-align: center;
  font-size: 15px;
  color: var(--ink-muted);
}
.lightbox .close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--edge-strong);
  background: rgba(16, 19, 27, 0.85);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

/* ── Seasons: a day on one channel, four times a year ──────────────── */
.year {
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--sunken));
  padding: clamp(18px, 3vw, 32px);
}
.year-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-bottom: 22px;
}
.year-head h3 {
  margin: 0;
}
.year-head .muted {
  font-size: 14.5px;
}
/* Too narrow for a day's blocks: the rows scroll sideways instead of squashing. */
.year-scroll {
  overflow-x: auto;
  padding-bottom: 4px;
}
.year-scroll > * {
  min-width: 860px;
}
.yrow {
  display: grid;
  grid-template-columns: 196px 1fr;
  gap: 14px;
  align-items: center;
}
.yrow + .yrow {
  margin-top: 14px;
}
.ylabel {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ylabel img {
  width: 54px;
  flex: none;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.6));
}
.ylabel b {
  display: block;
  font-weight: 650;
  font-size: 16px;
  line-height: 1.25;
}
.ylabel span {
  font: 600 13px var(--display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cue);
}
.ytrack {
  position: relative;
  height: 74px;
  border-radius: 12px;
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(12.5% - 1px), rgba(255, 255, 255, 0.06) calc(12.5% - 1px) 12.5%),
    #0b0d14;
  overflow: hidden;
}
/* A sliver of the track between neighbours. */
.ytrack .seg {
  display: block;
  padding-top: 13px;
  border-right: 3px solid #0b0d14;
  text-overflow: ellipsis;
}
.ytrack .seg small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}
.seg.hw-o {
  background: linear-gradient(135deg, #9a3412, #f97316);
}
.seg.hw-p {
  background: linear-gradient(135deg, #4c1d95, #a855f7);
}
.seg.xm-r {
  background: linear-gradient(135deg, #7f1d1d, #dc2626);
}
.seg.xm-g {
  background: linear-gradient(135deg, #14532d, #16a34a);
}
.seg.xm-n {
  background: linear-gradient(135deg, #172554, #2563eb);
}
.seg.tg {
  background: linear-gradient(135deg, #78350f, #d97706);
}
/* A shorter season that took these hours from the blocks under it. */
.seg.won {
  outline: 2px dashed rgba(255, 255, 255, 0.75);
  outline-offset: -5px;
}
/* Midnight on Halloween: the changeover. */
.ymark {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0;
  border-left: 2px solid #fff;
  box-shadow: 0 0 12px 2px rgba(255, 255, 255, 0.55);
}
/* Under the tracks only: the label column (196px) and the gap (14px) are padding. */
.year .yticks {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  padding-left: 210px;
  margin-top: 10px;
  font: 500 12.5px var(--mono);
  color: var(--ink-faint);
}
.year-key {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--edge);
  font-size: 14.5px;
  color: var(--ink-muted);
}
.year-key b {
  color: var(--ink);
  font-weight: 650;
}
.year-key .sw {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  border-radius: 4px;
  vertical-align: -2px;
}
.sw.hw {
  background: linear-gradient(135deg, #f97316 50%, #a855f7 50%);
}
.sw.xm {
  background: linear-gradient(135deg, #dc2626 50%, #16a34a 50%);
}
.sw.won {
  background: #d97706;
  border: 2px dashed rgba(255, 255, 255, 0.85);
}
.sw.off {
  background: #2b3243;
}
/* Phones: each day's label above its track, and the tracks scroll sideways together. */
@media (max-width: 640px) {
  .year-scroll > * {
    min-width: 680px;
  }
  .yrow {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .yrow + .yrow {
    margin-top: 18px;
  }
  .ylabel {
    position: sticky;
    left: 0;
    width: max-content;
  }
  .ylabel img {
    width: 36px;
  }
  .year .yticks {
    padding-left: 0;
  }
}
