/* ==========================================================================
   Open TV Guide
   Design direction: broadcast control room. Near-black rack panel, signal
   amber, SMPTE colour bars as the recurring motif, faint CRT scanlines.
   ========================================================================== */

:root {
  /* Surfaces, darkest to lightest */
  --bg:          #08090b;
  --surface:     #0f1116;
  --surface-2:   #161920;
  --surface-3:   #1d212a;
  --line:        #252a34;
  --line-soft:   #1a1e26;

  /* Ink */
  --ink:         #ecebe6;
  --ink-dim:     #99a0ab;
  --ink-faint:   #666d7a;

  /* Signal amber, the one accent */
  --amber:       #ffb224;
  --amber-soft:  #ffcd6b;
  --amber-deep:  #a36a08;
  --amber-glow:  rgba(255, 178, 36, .16);
  --live:        #ff4d3d;

  /* SMPTE colour bars */
  --bar-1: #c3c3c3; --bar-2: #c3c300; --bar-3: #00c3c3; --bar-4: #00c33c;
  --bar-5: #c300c3; --bar-6: #c32222; --bar-7: #2a2ac3;

  --font-display: 'Chakra Petch', 'Arial Narrow', sans-serif;
  --font-body:    'IBM Plex Sans', system-ui, sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, monospace;

  --radius:    4px;
  --radius-lg: 8px;
  --header-h:  62px;
  --shadow:    0 18px 50px rgba(0, 0, 0, .6);
  --ease:      cubic-bezier(.22, .61, .36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 520px at 82% -10%, rgba(255, 178, 36, .05), transparent 60%),
    radial-gradient(760px 420px at 6% 4%, rgba(42, 42, 195, .07), transparent 62%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* CRT texture. Two fixed layers, never interactive. */
body::before,
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9;
}
body::before {                                     /* scanlines */
  background: repeating-linear-gradient(
    to bottom, rgba(255, 255, 255, .022) 0 1px, transparent 1px 3px);
  opacity: .7;
}
body::after {                                      /* film grain */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E");
  opacity: .035;
  mix-blend-mode: overlay;
}

a { color: var(--amber); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--amber-soft); }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
  border-radius: 2px;
}

button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }

.shell { width: min(1440px, 100% - 40px); margin-inline: auto; }

/* SMPTE bars, used as a rule, a loader and a logo stand-in ------------------ */
.bars {
  display: flex;
  height: 3px;
  width: 100%;
}
.bars > i { flex: 1; }
.bars > i:nth-child(1) { background: var(--bar-1); }
.bars > i:nth-child(2) { background: var(--bar-2); }
.bars > i:nth-child(3) { background: var(--bar-3); }
.bars > i:nth-child(4) { background: var(--bar-4); }
.bars > i:nth-child(5) { background: var(--bar-5); }
.bars > i:nth-child(6) { background: var(--bar-6); }
.bars > i:nth-child(7) { background: var(--bar-7); }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(8, 9, 11, .93);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}
.site-header > .bars { height: 3px; }

.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  height: var(--header-h);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: .01em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.wordmark:hover { color: var(--ink); }
.wordmark .mark {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  width: 26px; height: 26px;
  border-radius: 3px;
  overflow: hidden;
  flex-shrink: 0;
}
.wordmark .mark i:nth-child(1) { background: var(--bar-2); }
.wordmark .mark i:nth-child(2) { background: var(--bar-3); }
.wordmark .mark i:nth-child(3) { background: var(--bar-4); }
.wordmark .mark i:nth-child(4) { background: var(--bar-5); }
.wordmark .mark i:nth-child(5) { background: var(--amber); }
.wordmark .mark i:nth-child(6) { background: var(--bar-6); }
.wordmark .mark i:nth-child(7) { background: var(--bar-7); }
.wordmark .mark i:nth-child(8) { background: var(--bar-1); }
.wordmark .mark i:nth-child(9) { background: var(--bar-3); }
.wordmark em { font-style: normal; color: var(--amber); }

/* Search ------------------------------------------------------------------- */
.search {
  position: relative;
  flex: 1;
  max-width: 520px;
}
.search svg {
  position: absolute;
  left: 13px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--ink-faint);
  pointer-events: none;
}
.search input {
  width: 100%;
  height: 40px;
  padding: 0 74px 0 38px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  transition: border-color .18s, background .18s, box-shadow .18s;
}
.search input::placeholder { color: var(--ink-faint); }
.search input:focus {
  outline: none;
  border-color: var(--amber-deep);
  background: var(--surface-3);
  box-shadow: 0 0 0 3px var(--amber-glow);
}
.search kbd {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-faint);
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 2px 6px;
  pointer-events: none;
}
.search input:focus ~ kbd { opacity: 0; }

.header-nav {
  display: flex;
  gap: 20px;
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.header-nav a { color: var(--ink-dim); text-decoration: none; }
.header-nav a:hover { color: var(--amber); }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding: 48px 0 30px;
  border-bottom: 1px solid var(--line-soft);
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 5.2vw, 52px);
  line-height: 1.04;
  letter-spacing: -.015em;
  margin: 0 0 14px;
  max-width: 17ch;
}
.hero h1 em { font-style: normal; color: var(--amber); }
.hero p {
  margin: 0;
  max-width: 62ch;
  color: var(--ink-dim);
  font-size: 16px;
}

.readout {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 30px;
  margin-top: 26px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: .03em;
}
.readout b {
  display: block;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0;
  line-height: 1.15;
}
.readout .live-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--live);
  margin-right: 7px;
  vertical-align: 1px;
  animation: pulse 2s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255, 77, 61, .5); }
  50%      { opacity: .65; box-shadow: 0 0 0 5px rgba(255, 77, 61, 0); }
}

/* ==========================================================================
   Filter toolbar
   ========================================================================== */

.toolbar {
  position: sticky;
  top: var(--header-h);
  z-index: 30;
  background: rgba(8, 9, 11, .93);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  margin-bottom: 26px;
}
.toolbar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.toolbar-row + .toolbar-row { margin-top: 10px; }

.field {
  position: relative;
  display: flex;
  align-items: center;
}
.field select {
  appearance: none;
  height: 34px;
  padding: 0 30px 0 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
  cursor: pointer;
  transition: border-color .18s;
  max-width: 210px;
}
.field select:hover { border-color: var(--line); background: var(--surface-3); }
.field::after {
  content: '';
  position: absolute;
  right: 12px;
  width: 6px; height: 6px;
  border-right: 1.5px solid var(--ink-faint);
  border-bottom: 1.5px solid var(--ink-faint);
  transform: translateY(-2px) rotate(45deg);
  pointer-events: none;
}
.field.is-set select { border-color: var(--amber-deep); color: var(--amber-soft); }

/* Category chips */
.chips {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 2px;
  flex: 1;
  min-width: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  -webkit-overflow-scrolling: touch;
}
.chips::-webkit-scrollbar { height: 4px; }
.chips::-webkit-scrollbar-thumb { background: var(--line); border-radius: 2px; }
.chip {
  flex-shrink: 0;
  height: 28px;
  padding: 0 12px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-dim);
  white-space: nowrap;
  transition: all .16s var(--ease);
}
.chip:hover { border-color: var(--amber-deep); color: var(--ink); }
.chip[aria-pressed='true'] {
  background: var(--amber);
  border-color: var(--amber);
  color: #14100a;
  font-weight: 600;
}
.chip .n { opacity: .55; margin-left: 5px; }

/* Toggle */
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 34px;
  padding: 0 13px 0 11px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 12.5px;
  color: var(--ink-dim);
  white-space: nowrap;
  user-select: none;
}
.toggle:hover { border-color: var(--amber-deep); color: var(--ink); }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle .track {
  position: relative;
  width: 30px; height: 17px;
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: 100px;
  transition: background .18s, border-color .18s;
  flex-shrink: 0;
}
.toggle .track::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--ink-faint);
  transition: transform .2s var(--ease), background .18s;
}
.toggle input:checked + .track { background: var(--amber-deep); border-color: var(--amber); }
.toggle input:checked + .track::after { transform: translateX(13px); background: var(--amber); }
.toggle:has(input:checked) { color: var(--ink); border-color: var(--amber-deep); }

.result-count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
  white-space: nowrap;
}
.result-count b { color: var(--amber); font-weight: 500; }

.btn-reset {
  height: 34px;
  padding: 0 12px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ink-faint);
  transition: all .16s;
}
.btn-reset:hover { color: var(--live); border-color: var(--live); }

/* ==========================================================================
   Channel grid
   ========================================================================== */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 14px;
  margin-bottom: 34px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-align: left;
  padding: 0;
  transition: border-color .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease);
  animation: card-in .34s var(--ease) both;
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(9px); }
  to   { opacity: 1; transform: none; }
}
.card:hover {
  border-color: var(--amber-deep);
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .5);
}
.card:hover .card-logo img { filter: none; transform: scale(1.04); }
.card:hover .card-name { color: var(--amber); }

.card-logo {
  position: relative;
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, var(--surface-2), var(--surface));
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
}
.card-logo img {
  max-width: 74%;
  max-height: 66%;
  object-fit: contain;
  filter: saturate(.82) brightness(.97);
  transition: filter .2s, transform .25s var(--ease);
}

/* Channels with no logo get a colour-bar test card with their initials. */
.testcard {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.testcard .bars {
  position: absolute;
  inset: 0;
  height: 100%;
  opacity: .3;
}
.testcard span {
  position: relative;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: .04em;
  color: var(--ink);
  text-shadow: 0 2px 12px rgba(0, 0, 0, .9);
}

.badge {
  position: absolute;
  top: 7px; right: 7px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .05em;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(8, 9, 11, .82);
  border: 1px solid var(--line);
  color: var(--ink-dim);
  backdrop-filter: blur(4px);
}
.badge.hd { color: var(--amber); border-color: var(--amber-deep); }
.badge.ext {
  top: auto; bottom: 7px; right: 7px;
  color: var(--ink-faint);
}

.card-body { padding: 10px 11px 12px; }
.card-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.25;
  letter-spacing: .005em;
  margin: 0 0 5px;
  transition: color .18s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-faint);
  letter-spacing: .02em;
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  white-space: nowrap;
}
.card-meta .flag { font-size: 12px; }
.card-meta .sep { opacity: .4; }

/* Loading skeletons */
.skeleton {
  border-radius: var(--radius-lg);
  aspect-ratio: 16 / 15.4;
  background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%);
  background-size: 240% 100%;
  animation: sweep 1.35s linear infinite;
}
@keyframes sweep { to { background-position: -240% 0; } }

/* Empty state */
.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 76px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
}
.empty .bars { width: 84px; margin: 0 auto 20px; height: 5px; border-radius: 2px; overflow: hidden; }
.empty h3 {
  font-family: var(--font-display);
  font-size: 19px;
  margin: 0 0 8px;
}
.empty p { color: var(--ink-dim); margin: 0 0 18px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 18px;
  background: var(--amber);
  border: 1px solid var(--amber);
  border-radius: var(--radius);
  color: #14100a;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: filter .16s, transform .16s;
}
.btn:hover { filter: brightness(1.1); color: #14100a; transform: translateY(-1px); }
.btn.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn.ghost:hover { border-color: var(--amber); color: var(--amber); }

.load-more { display: grid; place-items: center; padding: 8px 0 44px; }

/* ==========================================================================
   Player
   ========================================================================== */

.player-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(4, 5, 7, .8);
  backdrop-filter: blur(7px);
  display: grid;
  place-items: center;
  padding: 20px;
  animation: fade .2s var(--ease);
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.player-backdrop[hidden] { display: none; }

.player {
  position: relative;
  width: min(920px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  animation: rise .26s var(--ease);
}
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.player > .bars { border-radius: var(--radius-lg) var(--radius-lg) 0 0; overflow: hidden; }

.player-close {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 3;
  width: 32px; height: 32px;
  display: grid;
  place-items: center;
  background: rgba(8, 9, 11, .78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink-dim);
  backdrop-filter: blur(6px);
  transition: all .16s;
}
.player-close:hover { color: var(--live); border-color: var(--live); }

.stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}
.stage video { width: 100%; height: 100%; display: block; background: #000; }

/* Viewfinder brackets */
.stage::before, .stage::after {
  content: '';
  position: absolute;
  width: 22px; height: 22px;
  border: 2px solid rgba(255, 178, 36, .5);
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity .3s;
}
.stage::before { top: 12px; left: 12px; border-right: 0; border-bottom: 0; }
.stage::after  { bottom: 12px; right: 12px; border-left: 0; border-top: 0; }
.stage.is-loading::before, .stage.is-loading::after { opacity: 1; }

.stage-status {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  text-align: center;
  padding: 26px;
  background: linear-gradient(180deg, #0b0c0f, #000);
  z-index: 1;
}
.stage-status[hidden] { display: none; }
.stage-status .bars {
  width: 128px;
  height: 7px;
  border-radius: 2px;
  overflow: hidden;
  animation: bars-scan 1.1s var(--ease) infinite;
}
@keyframes bars-scan {
  0%, 100% { opacity: .35; transform: scaleX(.9); }
  50%      { opacity: 1;   transform: scaleX(1); }
}
.stage-status p {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-dim);
  max-width: 46ch;
  line-height: 1.65;
}
.stage-status strong {
  display: block;
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--ink);
  margin-bottom: 4px;
  letter-spacing: .01em;
}
.stage-status .actions { display: flex; gap: 9px; flex-wrap: wrap; justify-content: center; }

.player-info { padding: 18px 20px 22px; }
.player-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 23px;
  letter-spacing: -.005em;
  margin: 0 0 7px;
  padding-right: 40px;
}
.player-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: .03em;
  margin-bottom: 16px;
}
.tag {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 3px;
  text-transform: uppercase;
}
.tag.amber { color: var(--amber); border-color: var(--amber-deep); }

.player-actions { display: flex; flex-wrap: wrap; gap: 9px; }

.stream-picker { margin-top: 18px; }
.stream-picker h4 {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--ink-faint);
  margin: 0 0 9px;
  font-weight: 500;
}
.stream-list { display: flex; flex-direction: column; gap: 6px; }
.stream-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-dim);
  text-align: left;
  transition: all .16s;
}
.stream-row:hover { border-color: var(--amber-deep); color: var(--ink); }
.stream-row[aria-current='true'] {
  border-color: var(--amber);
  color: var(--ink);
  background: rgba(255, 178, 36, .07);
}
.stream-row .q {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--amber);
  min-width: 48px;
}
.stream-row .u {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: .65;
  flex: 1;
  min-width: 0;
}
.stream-row .warn { color: var(--live); font-size: 10px; letter-spacing: .04em; }

/* ==========================================================================
   Advertising slots
   ========================================================================== */

.ad-slot {
  margin: 26px 0;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: center;
  min-height: 0;
}
.ad-slot::before {
  content: 'Advertisement';
  display: block;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 9px;
}
.ad-slot.in-grid { grid-column: 1 / -1; margin: 6px 0; }
.ad-slot ins { display: block; }

/* ==========================================================================
   Prose pages
   ========================================================================== */

.prose {
  max-width: 74ch;
  padding: 46px 0 66px;
}
.prose h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 4.4vw, 40px);
  line-height: 1.1;
  letter-spacing: -.015em;
  margin: 0 0 10px;
}
.prose .updated {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-faint);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 30px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line-soft);
}
.prose h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -.005em;
  margin: 38px 0 12px;
  padding-left: 13px;
  border-left: 3px solid var(--amber);
}
.prose h3 {
  font-family: var(--font-display);
  font-size: 16px;
  margin: 26px 0 8px;
}
.prose p, .prose li { color: var(--ink-dim); }
.prose li { margin-bottom: 7px; }
.prose ul, .prose ol { padding-left: 21px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose code {
  font-family: var(--font-mono);
  font-size: .88em;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  padding: 1px 5px;
  color: var(--amber-soft);
}
.callout {
  margin: 26px 0;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius);
}
.callout p { margin: 0; }
.callout p + p { margin-top: 9px; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  margin-top: 40px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  justify-content: space-between;
  padding: 34px 0 30px;
}
.footer-brand { max-width: 40ch; }
.footer-brand .wordmark { margin-bottom: 11px; }
.footer-brand p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-faint);
  line-height: 1.65;
}
.footer-links {
  display: flex;
  gap: 44px;
  flex-wrap: wrap;
}
.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .11em;
  color: var(--ink-faint);
  margin: 0 0 11px;
  font-weight: 500;
}
.footer-col a {
  display: block;
  font-size: 13px;
  color: var(--ink-dim);
  text-decoration: none;
  margin-bottom: 7px;
}
.footer-col a:hover { color: var(--amber); }
.footer-legal {
  border-top: 1px solid var(--line-soft);
  padding: 16px 0 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  line-height: 1.7;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(14px);
  z-index: 80;
  padding: 10px 18px;
  background: var(--amber);
  color: #14100a;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13.5px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s, transform .22s var(--ease);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
  .shell { width: calc(100% - 28px); }
  .header-nav { display: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 11px; }
  .hero { padding: 32px 0 22px; }
  .result-count { margin-left: 0; width: 100%; }
  .footer-links { gap: 30px; }
}

@media (max-width: 620px) {
  .header-inner { gap: 12px; }
  .wordmark span { display: none; }
  .search kbd { display: none; }
  .search input { padding-right: 14px; }
  .field select { max-width: 46vw; }
  .player-info { padding: 15px 16px 20px; }
  .player-title { font-size: 19px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); }
}

/* ==========================================================================
   Motion and print
   ========================================================================== */

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

@media print {
  body::before, body::after, .toolbar, .site-header, .ad-slot { display: none; }
}
