:root {
  color-scheme: dark;
  --ink: #0b0c0a;
  --ink-2: #12140f;
  --panel: #171a14;
  --line: #30352a;
  --paper: #f2f1e9;
  --muted: #969b8b;
  --acid: #d8ff62;
  --coral: #ff654d;
  --serif: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", "Cascadia Code", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; min-height: 100%; background: var(--ink); }
body {
  min-height: 100%;
  margin: 0;
  color: var(--paper);
  font-family: var(--sans);
  background:
    radial-gradient(circle at 82% -10%, rgba(216, 255, 98, .08), transparent 31rem),
    var(--ink);
}
button, input { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--acid); outline-offset: 3px; }
::selection { color: var(--ink); background: var(--acid); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 72px;
  padding: 11px clamp(14px, 2.2vw, 34px);
  display: grid;
  grid-template-columns: 48px minmax(180px, 260px) minmax(260px, 680px) 1fr;
  align-items: center;
  gap: 12px;
  background: rgba(11, 12, 10, .9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.icon-button,
.menu-button {
  width: 46px;
  height: 46px;
  padding: 11px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
}
.icon-button:hover { border-color: var(--line); background: var(--panel); }
.icon-button svg { width: 100%; height: 100%; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--paper);
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.04em;
  text-decoration: none;
}
.brand > span:last-child > span { color: var(--acid); }
.brand-glyph { width: 27px; height: 27px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; transform: skewY(-11deg); }
.brand-glyph i { display: block; background: var(--acid); }
.brand-glyph i:nth-child(2) { translate: 0 4px; background: var(--coral); }
.brand-glyph i:nth-child(3) { translate: 0 8px; opacity: .45; }

.search {
  height: 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  background: #11130e;
  border: 1px solid #3a4032;
}
.search:focus-within { border-color: var(--acid); box-shadow: 0 0 0 1px var(--acid); }
.search input { min-width: 0; padding: 0 17px; color: var(--paper); background: transparent; border: 0; outline: 0; font-size: 14px; }
.search input::placeholder { color: #73796a; }
.search button { padding: 13px; border: 0; border-left: 1px solid var(--line); background: var(--panel); cursor: pointer; }
.search button:hover { color: var(--ink); background: var(--acid); }
.search svg { width: 100%; height: 100%; }
/* Paired devices choose where to search: the YouTube catalog or the open web. */
.search.has-scope { grid-template-columns: auto minmax(0, 1fr) 52px; }
.search-scope { display: flex; border-right: 1px solid var(--line); }
.search-scope button { min-width: 0; padding: 0 11px; color: var(--muted); background: transparent; border: 0; border-left: 0; font: 800 9px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.search-scope button + button { border-left: 1px solid var(--line); }
.search-scope button:hover { color: var(--paper); background: var(--panel); }
.search-scope button[aria-checked="true"] { color: var(--ink); background: var(--acid); }
.scope-short { display: none; }

.signal-pill {
  justify-self: end;
  min-height: 42px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  border: 1px solid var(--line);
  font: 700 9px/1 var(--mono);
  letter-spacing: .13em;
}
.state-light { width: 7px; height: 7px; border-radius: 50%; background: #555a4d; box-shadow: 0 0 0 4px rgba(85, 90, 77, .15); }
.state-light[data-state="busy"] { background: var(--acid); box-shadow: 0 0 15px rgba(216, 255, 98, .75); animation: pulse 1s ease-in-out infinite; }
.state-light[data-state="live"] { background: var(--coral); box-shadow: 0 0 15px rgba(255, 101, 77, .75); }
.state-light[data-state="error"] { background: var(--coral); }
@keyframes pulse { 50% { opacity: .35; } }

.app-shell { min-height: calc(100vh - 72px); display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.sidebar {
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  padding: 26px 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--line);
  background: #0d0f0b;
  transition: width .2s ease, transform .2s ease;
}
.sidebar nav { display: grid; gap: 4px; }
.nav-item {
  min-height: 50px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
}
.nav-item svg { width: 20px; height: 20px; flex: 0 0 auto; }
.nav-item:hover { color: var(--paper); background: var(--panel); }
.nav-item.is-active { color: var(--ink); background: var(--acid); }
.pipeline-note { position: relative; padding: 17px; overflow: hidden; color: var(--muted); border: 1px solid var(--line); font: 9px/1.6 var(--mono); }
.pipeline-note span { color: var(--acid); letter-spacing: .14em; }
.pipeline-note p { position: relative; z-index: 1; margin: 10px 0 0; }
.pipeline-note i { position: absolute; width: 65px; height: 65px; right: -22px; bottom: -26px; border: 1px solid rgba(216, 255, 98, .28); border-radius: 50%; box-shadow: 0 0 0 12px rgba(216, 255, 98, .04), 0 0 0 24px rgba(216, 255, 98, .025); }

.content { min-width: 0; padding: clamp(22px, 3.5vw, 58px); }
.feed-view, .watch-view { max-width: 1550px; margin: 0 auto; }
.feed-heading { margin-bottom: 34px; display: grid; grid-template-columns: 1fr minmax(250px, 420px); align-items: end; gap: 30px; }
.eyebrow { margin: 0 0 17px; color: var(--acid); font: 700 9px/1 var(--mono); letter-spacing: .22em; }
.feed-heading h1 { margin: 0; font-family: var(--serif); font-size: clamp(52px, 6vw, 102px); font-weight: 500; letter-spacing: -.06em; line-height: .8; }
.feed-intro { max-width: 400px; margin: 0 0 4px auto; color: var(--muted); font: 12px/1.75 var(--mono); }

.topic-strip { margin: 0 0 28px; padding: 9px 0; display: flex; gap: 9px; overflow-x: auto; scrollbar-width: none; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.topic-strip::-webkit-scrollbar { display: none; }
.topic-strip button { min-height: 42px; padding: 0 18px; flex: 0 0 auto; color: var(--muted); background: transparent; border: 1px solid transparent; cursor: pointer; font: 700 10px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.topic-strip button:hover { color: var(--paper); border-color: var(--line); }
.topic-strip button.is-active { color: var(--ink); background: var(--paper); }

/* Web results read like a signal log: one row per page, newest find first. */
.web-results { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.web-result { width: 100%; padding: 16px 0; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; color: inherit; background: transparent; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; text-align: start; }
.web-result:hover strong, .web-result:focus-visible strong { color: var(--acid); }
.web-thumb { position: relative; aspect-ratio: 16 / 9; display: block; overflow: hidden; background: var(--panel); border: 1px solid #262b21; }
.web-thumb img { width: 100%; height: 100%; display: block; object-fit: cover; }
.web-copy { min-width: 0; display: grid; gap: 7px; }
.web-site { display: flex; align-items: center; gap: 8px; color: var(--muted); font: 700 9px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.web-site i { padding: 3px 5px; color: var(--ink); background: var(--acid); font-style: normal; letter-spacing: .08em; }
.web-copy strong { display: -webkit-box; overflow: hidden; font-size: 16px; font-weight: 650; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.web-snippet { display: -webkit-box; overflow: hidden; color: var(--muted); font: 10px/1.6 var(--mono); -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
/* A page without a picture gets a muted test card with its site's initial. */
.thumb-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: var(--acid); background:
    linear-gradient(90deg, rgba(242,241,233,.09) 0 14%, rgba(216,255,98,.11) 14% 28%, rgba(255,101,77,.09) 28% 43%, rgba(150,155,139,.09) 43% 57%, rgba(216,255,98,.05) 57% 71%, rgba(255,101,77,.05) 71% 86%, rgba(242,241,233,.04) 86%),
    var(--panel); font: 800 28px var(--mono); }
.up-next-card .thumb-placeholder { width: 132px; height: auto; aspect-ratio: 16 / 9; font-size: 18px; }

.catalog-state { min-height: 280px; display: grid; place-content: center; justify-items: center; gap: 16px; color: var(--muted); font: 11px var(--mono); letter-spacing: .08em; }
.catalog-state.is-error { color: var(--coral); }
.catalog-spinner, .loader-ring { width: 34px; aspect-ratio: 1; border: 1px solid var(--line); border-top-color: var(--acid); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }

.video-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(24px, 2.4vw, 40px) clamp(14px, 1.8vw, 28px); }
.video-card { min-width: 0; padding: 0; color: inherit; background: transparent; border: 0; cursor: pointer; text-align: left; }
.video-thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--panel); border: 1px solid #262b21; }
.video-thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 55%, rgba(216, 255, 98, .11)); opacity: 0; transition: opacity .2s; }
.video-thumb img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .35s cubic-bezier(.2,.8,.2,1), filter .2s; }
.video-card:hover .video-thumb img, .video-card:focus-visible .video-thumb img { transform: scale(1.035); filter: saturate(1.12); }
.video-card:hover .video-thumb::after { opacity: 1; }
.duration { position: absolute; right: 7px; bottom: 7px; z-index: 2; padding: 4px 6px; color: #fff; background: rgba(0,0,0,.82); font: 700 9px/1 var(--mono); }
.card-copy { padding-top: 13px; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; }
.card-index { width: 31px; height: 31px; display: grid; place-items: center; color: var(--acid); border: 1px solid var(--line); font: 8px var(--mono); }
.card-copy h2 { display: -webkit-box; margin: 0 0 7px; overflow: hidden; font-size: 14px; font-weight: 650; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.card-copy p { margin: 0; overflow: hidden; color: var(--muted); font: 10px/1.5 var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.video-card:first-child { grid-column: span 2; grid-row: span 2; }
.video-card:first-child .video-thumb { aspect-ratio: 16 / 9; }
.video-card:first-child .card-copy h2 { font-family: var(--serif); font-size: clamp(22px, 2.3vw, 38px); font-weight: 500; letter-spacing: -.025em; line-height: 1.04; }

.back-button { min-height: 46px; margin: 0 0 18px; padding: 0 15px 0 0; color: var(--muted); background: transparent; border: 0; cursor: pointer; font: 700 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.back-button span { margin-right: 8px; color: var(--acid); font-size: 18px; }
.back-button:hover { color: var(--paper); }
.watch-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, 360px); gap: clamp(22px, 2.7vw, 42px); align-items: start; }
.watch-main { min-width: 0; }
.monitor { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; border: 1px solid #353b2f; box-shadow: 0 24px 70px rgba(0, 0, 0, .38); }
.monitor.is-fallback-fullscreen {
  position: fixed;
  z-index: 1000;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  aspect-ratio: auto;
  border: 0;
  box-shadow: none;
}
body.has-fallback-fullscreen { overflow: hidden; }
.monitor.is-fallback-fullscreen .player-controls {
  padding-bottom: max(7px, env(safe-area-inset-bottom));
  padding-left: max(15px, env(safe-area-inset-left));
  padding-right: max(15px, env(safe-area-inset-right));
}
.monitor::before { content: ""; position: absolute; z-index: 4; inset: 12px; pointer-events: none; border: 1px solid rgba(216, 255, 98, .12); }
.monitor canvas { width: 100%; height: 100%; display: block; object-fit: contain; opacity: 0; transition: opacity .2s; }
.monitor canvas.is-visible { opacity: 1; }
.scanlines { position: absolute; z-index: 2; inset: 0; pointer-events: none; opacity: .16; background: repeating-linear-gradient(to bottom, transparent 0 3px, rgba(255,255,255,.045) 4px); }
.player-standby { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 17px; color: var(--muted); background: radial-gradient(circle, #171b13, #030403 70%); font: 700 9px var(--mono); letter-spacing: .15em; text-transform: uppercase; transition: opacity .2s; }
.player-standby.is-hidden { opacity: 0; pointer-events: none; }
.status-card { position: absolute; z-index: 5; left: 23px; bottom: 72px; max-width: calc(100% - 46px); padding: 9px 12px; display: flex; align-items: center; gap: 10px; color: var(--paper); background: rgba(9,10,8,.86); border: 1px solid rgba(216,255,98,.3); backdrop-filter: blur(8px); transition: opacity .2s, translate .2s; }
.status-card.is-hidden { opacity: 0; translate: 0 8px; pointer-events: none; }
/* No signal from this page: say why, and offer the page itself. */
.page-fallback { position: absolute; z-index: 5; inset: 0; padding: 24px 24px 76px; display: grid; place-content: center; justify-items: center; gap: 14px; text-align: center; background: rgba(5, 6, 4, .84); backdrop-filter: blur(6px); }
.page-fallback::before { content: ""; width: min(300px, 70%); height: 7px; background: linear-gradient(90deg, var(--paper) 0 14%, var(--acid) 14% 28%, var(--coral) 28% 43%, var(--muted) 43% 57%, #3b4231 57% 71%, var(--coral) 71% 86%, var(--acid) 86%); opacity: .75; }
.page-fallback-site { margin: 0; color: var(--acid); font: 700 9px var(--mono); letter-spacing: .16em; text-transform: uppercase; }
.page-fallback-message { max-width: 30ch; margin: 0; color: var(--paper); font-family: var(--serif); font-size: clamp(18px, 2.3vw, 28px); line-height: 1.2; letter-spacing: -.02em; }
.page-fallback-link { min-height: 44px; padding: 0 18px; display: inline-flex; align-items: center; color: var(--ink); background: var(--acid); font: 800 10px var(--mono); letter-spacing: .1em; text-decoration: none; text-transform: uppercase; }
.page-fallback-link:hover { background: var(--paper); }
.status-card.is-error { border-color: var(--coral); }
.status-card span { padding: 5px 6px; color: var(--ink); background: var(--acid); font: 800 8px var(--mono); letter-spacing: .1em; }
.status-card.is-error span { background: var(--coral); }
.status-card p { margin: 0; font: 10px/1.35 var(--mono); }
.player-controls { position: absolute; z-index: 6; right: 0; bottom: 0; left: 0; min-height: 58px; padding: 7px 15px; display: flex; align-items: center; gap: 7px; background: linear-gradient(transparent, rgba(0,0,0,.9)); }
.player-button { width: 44px; height: 44px; padding: 11px; display: grid; place-items: center; border: 0; background: transparent; cursor: pointer; }
.player-button:hover { color: var(--acid); background: rgba(255,255,255,.06); }
.player-button svg { width: 100%; height: 100%; }
.player-button .play-icon { display: none; }
.player-button[aria-pressed="true"] .pause-icon { display: none; }
.player-button[aria-pressed="true"] .play-icon { display: block; }
.volume { width: 84px; height: 3px; margin: 0 9px 0 2px; appearance: none; background: rgba(255,255,255,.45); cursor: pointer; }
.volume::-webkit-slider-thumb { width: 15px; height: 15px; appearance: none; border-radius: 50%; background: var(--acid); }
.volume::-moz-range-thumb { width: 15px; height: 15px; border: 0; border-radius: 50%; background: var(--acid); }
.timecode { font: 9px var(--mono); font-variant-numeric: tabular-nums; }
.control-spacer { flex: 1; }
.canvas-badge { padding: 5px 7px; color: var(--acid); border: 1px solid rgba(216,255,98,.4); font: 800 8px var(--mono); letter-spacing: .12em; }
.quality-button { width: auto; min-width: 58px; height: 30px; padding: 0 9px; color: var(--paper); border: 1px solid rgba(242,241,233,.28); font: 800 9px var(--mono); letter-spacing: .1em; white-space: nowrap; }
.quality-button[data-quality="1080"] { color: var(--acid); border-color: rgba(216,255,98,.45); }
.timecode-total { color: var(--muted); font: 9px var(--mono); font-variant-numeric: tabular-nums; }

/* The timeline: a tape-transport strip along the top of the control bar.
   Acid is what has played, dim acid what has arrived, coral the record head. */
.monitor.has-timeline .player-controls { padding-top: 30px; }
.monitor.has-timeline .status-card { bottom: 110px; }
.timeline { --played: 0%; --buffered: 0%; --flag-x: 0px; position: absolute; top: 4px; right: 15px; left: 15px; height: 26px; }
.monitor.is-fallback-fullscreen .timeline { right: max(15px, env(safe-area-inset-right)); left: max(15px, env(safe-area-inset-left)); }
.timeline-track { position: absolute; top: 50%; right: 0; left: 0; height: 3px; overflow: hidden; translate: 0 -50%; background: rgba(242, 241, 233, .2); pointer-events: none; transition: height .12s ease; }
.timeline-track::before, .timeline-track::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; }
.timeline-track::before { width: var(--buffered); background: rgba(216, 255, 98, .3); }
.timeline-track::after { width: var(--played); background: var(--acid); }
.timeline.is-hovering .timeline-track, .timeline.is-scrubbing .timeline-track, .timeline:focus-within .timeline-track { height: 5px; }
.timeline-input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; appearance: none; background: transparent; cursor: pointer; }
.timeline-input::-webkit-slider-runnable-track { height: 100%; background: transparent; }
.timeline-input::-webkit-slider-thumb { width: 4px; height: 18px; margin-top: 4px; appearance: none; background: var(--coral); box-shadow: 0 0 0 1px rgba(5, 6, 4, .7), 0 0 12px rgba(255, 101, 77, .6); transition: height .12s ease, margin-top .12s ease; }
.timeline.is-scrubbing .timeline-input::-webkit-slider-thumb { height: 24px; margin-top: 1px; }
.timeline-input::-moz-range-track { height: 100%; background: transparent; }
.timeline-input::-moz-range-thumb { width: 4px; height: 18px; border: 0; border-radius: 0; background: var(--coral); box-shadow: 0 0 0 1px rgba(5, 6, 4, .7), 0 0 12px rgba(255, 101, 77, .6); }
.timeline-flag { position: absolute; bottom: calc(100% + 2px); left: var(--flag-x); padding: 5px 7px; color: var(--ink); background: var(--acid); font: 800 9px/1 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: .06em; white-space: nowrap; opacity: 0; translate: -50% 4px; pointer-events: none; transition: opacity .12s, translate .12s; }
.timeline.is-hovering .timeline-flag, .timeline.is-scrubbing .timeline-flag { opacity: 1; translate: -50% 0; }
/* Seeking or reconnecting: a band of light runs along the track until the picture returns. */
.monitor.is-relinking .timeline-track {
  background:
    linear-gradient(90deg, transparent, rgba(216, 255, 98, .8), transparent) -60% 0 / 35% 100% no-repeat,
    rgba(242, 241, 233, .2);
  animation: relink-sweep 1.1s linear infinite;
}
@keyframes relink-sweep { to { background-position: 160% 0, 0 0; } }

.watch-copy { padding: 25px 0 0; }
.watch-copy h2 { max-width: 920px; margin: 0 0 20px; font-family: var(--serif); font-size: clamp(28px, 3vw, 48px); font-weight: 500; letter-spacing: -.04em; line-height: 1.03; }
.watch-byline { padding: 16px 0; display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.channel-avatar { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; color: var(--ink); background: var(--acid); border-radius: 50%; font: 800 15px var(--mono); }
.watch-byline strong, .watch-byline span { display: block; }
.watch-byline strong { font-size: 13px; }
.watch-byline span { margin-top: 4px; color: var(--muted); font: 9px var(--mono); }
.telemetry { margin: 16px 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); }
.telemetry div { min-width: 0; padding: 11px 13px; border-left: 1px solid var(--line); }
.telemetry div:first-child { border-left: 0; }
.telemetry dt { margin: 0 0 5px; color: #676d5f; font: 7px var(--mono); letter-spacing: .13em; text-transform: uppercase; }
.telemetry dd { margin: 0; overflow: hidden; color: var(--paper); font: 9px var(--mono); text-overflow: ellipsis; white-space: nowrap; }

.up-next { min-width: 0; }
.up-next > header { min-height: 46px; margin-bottom: 14px; display: flex; align-items: center; gap: 12px; color: var(--acid); font: 800 9px var(--mono); letter-spacing: .16em; }
.up-next > header i { height: 1px; flex: 1; background: var(--line); }
.up-next-card { width: 100%; min-height: 96px; padding: 7px 0; display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 11px; color: inherit; background: transparent; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; text-align: left; }
.up-next-card img { width: 132px; aspect-ratio: 16 / 9; object-fit: cover; background: var(--panel); }
.up-next-card strong { display: -webkit-box; overflow: hidden; font-size: 11px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.up-next-card span { display: block; margin-top: 7px; color: var(--muted); font: 8px/1.4 var(--mono); }
.up-next-card:hover strong { color: var(--acid); }

@media (max-width: 1250px) {
  .video-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .watch-layout { grid-template-columns: minmax(0, 1fr) 300px; }
}

@media (max-width: 980px) {
  .topbar { grid-template-columns: 46px auto minmax(180px, 1fr); }
  .signal-pill { display: none; }
  .app-shell { grid-template-columns: 82px minmax(0, 1fr); }
  .sidebar { padding-inline: 11px; }
  .nav-item { justify-content: center; padding: 0; }
  .nav-item span, .pipeline-note { display: none; }
  .feed-heading { grid-template-columns: 1fr; }
  .feed-intro { margin-left: 0; }
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .watch-layout { grid-template-columns: 1fr; }
  .up-next > div { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 18px; }
}

@media (max-width: 680px) {
  .topbar { min-height: 66px; padding: 8px 10px; grid-template-columns: 44px auto 1fr; gap: 6px; }
  .brand { font-size: 0; gap: 0; }
  .brand-glyph { width: 27px; }
  .search { height: 46px; grid-template-columns: 1fr 48px; }
  .search input { padding-inline: 13px; font-size: 13px; }
  .app-shell { display: block; }
  .sidebar { position: fixed; z-index: 25; top: 66px; bottom: 0; left: 0; width: min(78vw, 280px); height: auto; padding: 17px 12px; transform: translateX(-105%); box-shadow: 25px 0 60px rgba(0,0,0,.45); }
  body.nav-open .sidebar { transform: translateX(0); }
  .nav-item { justify-content: flex-start; padding: 0 15px; }
  .nav-item span, .pipeline-note { display: block; }
  .content { padding: 24px 13px 40px; }
  .feed-heading { margin-bottom: 24px; }
  .feed-heading h1 { font-size: clamp(48px, 17vw, 75px); }
  .feed-intro { display: none; }
  .topic-strip { margin-inline: -13px; padding-inline: 13px; }
  .video-grid { grid-template-columns: 1fr; gap: 28px; }
  .video-card:first-child { grid-column: auto; grid-row: auto; }
  .video-card:first-child .card-copy h2 { font-family: var(--sans); font-size: 16px; font-weight: 650; line-height: 1.35; }
  .video-thumb, .video-card:first-child .video-thumb { aspect-ratio: 16 / 9; }
  .back-button { margin-bottom: 10px; }
  .watch-view { margin-inline: -13px; }
  .back-button, .watch-copy, .up-next { margin-inline: 13px; }
  .monitor { border-inline: 0; }
  .monitor::before, .scanlines { display: none; }
  .status-card { left: 12px; bottom: 64px; max-width: calc(100% - 24px); }
  .monitor.has-timeline .status-card { bottom: 96px; }
  .status-card p { font-size: 9px; }
  .player-controls { min-height: 54px; padding-inline: 8px; }
  .timeline { right: 8px; left: 8px; }
  .timecode-total { display: none; }
  .scope-full { display: none; }
  .scope-short { display: inline; }
  .search-scope button { padding: 0 9px; }
  .web-result { grid-template-columns: 124px minmax(0, 1fr); gap: 12px; padding: 13px 0; }
  .web-copy strong { font-size: 14px; }
  .web-snippet { -webkit-line-clamp: 1; }
  .up-next-card .thumb-placeholder { width: 145px; }
  .page-fallback { padding-bottom: 64px; }
  .volume { width: 58px; }
  .canvas-badge { display: none; }
  .watch-copy { padding-top: 18px; }
  .watch-copy h2 { font-size: 28px; }
  .telemetry { grid-template-columns: repeat(3, 1fr); }
  .telemetry div:nth-child(4) { border-left: 0; }
  .telemetry div:nth-child(n+4) { border-top: 1px solid var(--line); }
  .up-next > div { grid-template-columns: 1fr; }
  .up-next-card { grid-template-columns: 145px minmax(0, 1fr); }
  .up-next-card img { width: 145px; }
}

@media (hover: none) {
  .video-card:hover .video-thumb img { transform: none; }
  .nav-item, .topic-strip button, .player-button, .back-button { min-height: 48px; }
  .timeline-input::-webkit-slider-thumb { width: 6px; height: 22px; margin-top: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
