/* scroll.dicksimmons.com — one dark theme, no framework, reads at 400px. */
:root {
  --bg: #0f0f10;
  --bg-2: #161618;
  --bg-3: #1f1f22;
  --line: #2a2a2e;
  --fg: #f1f1f1;
  --fg-2: #aaaaae;
  --fg-3: #7a7a80;
  --accent: #ff4d4d;
  --chip: #26262a;
  --chip-on: #f1f1f1;
  --chip-on-fg: #0f0f10;
  --radius: 12px;
  --gutter: 16px;
  --top-h: 56px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 14px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(15, 15, 16, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: var(--top-h);
  padding: 0 var(--gutter);
  max-width: 1600px;
  margin: 0 auto;
}
.brand { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--bg-3);
  position: relative; flex: none;
}
.brand-mark::after {
  content: ""; position: absolute; left: 10px; top: 7px;
  border-left: 10px solid var(--accent);
  border-top: 6px solid transparent; border-bottom: 6px solid transparent;
}
.brand-name { font-weight: 700; letter-spacing: -0.01em; font-size: 17px; }
.brand-dot { color: var(--accent); }

.types { display: flex; gap: 6px; }
.type {
  background: transparent; border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 12px; cursor: pointer; color: var(--fg-2);
  text-transform: uppercase; letter-spacing: 0.06em; font-size: 11px; font-weight: 600;
}
.type.is-on { background: var(--bg-3); color: var(--fg); border-color: var(--bg-3); }
.type[disabled] { cursor: not-allowed; color: var(--fg-3); }
.type .soon {
  margin-left: 4px; font-size: 9px; padding: 1px 5px; border-radius: 999px;
  background: var(--chip); color: var(--fg-3); letter-spacing: 0.04em; vertical-align: 1px;
}
.count { color: var(--fg-3); font-weight: 500; margin-left: 3px; font-variant-numeric: tabular-nums; }
.type.is-on .count, .chip.is-on .count { color: inherit; opacity: 0.7; }

.chips-wrap { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
.chips-wrap::-webkit-scrollbar { display: none; }
.chips {
  display: flex; gap: 8px; padding: 0 var(--gutter) 12px;
  max-width: 1600px; margin: 0 auto; width: max-content; min-width: 100%;
}
.chip {
  flex: none; background: var(--chip); border: 0; border-radius: 8px;
  padding: 7px 12px; cursor: pointer; font-weight: 500; white-space: nowrap;
  transition: background 0.12s ease;
}
.chip:hover { background: var(--bg-3); }
.chip.is-on { background: var(--chip-on); color: var(--chip-on-fg); }

/* ---------- grid ---------- */
main { max-width: 1600px; margin: 0 auto; padding: 20px var(--gutter) 40px; }
.status { color: var(--fg-2); margin: 8px 0 16px; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px var(--gutter);
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; gap: 24px; }
}
@media (min-width: 1200px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1500px) {
  .grid { grid-template-columns: repeat(5, 1fr); }
}

.tile { display: block; outline-offset: 4px; border-radius: var(--radius); }
.tile:focus-visible { outline: 2px solid var(--fg); }
.thumb {
  position: relative; display: block;
  aspect-ratio: 16 / 9;
  background: var(--bg-2);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.16s ease;
}
.thumb img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 0.25s ease;
}
.thumb img.is-loaded { opacity: 1; }
.tile:hover .thumb { transform: translateY(-2px); }
.tile:hover .thumb::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at center, rgba(0,0,0,0.0) 40%, rgba(0,0,0,0.35));
}
.dur {
  position: absolute; right: 6px; bottom: 6px;
  background: rgba(0,0,0,0.82); color: #fff;
  font-size: 12px; font-weight: 600; padding: 2px 5px; border-radius: 4px;
  font-variant-numeric: tabular-nums; letter-spacing: 0.02em;
}
.dur:empty { display: none; }
.live-badge {
  position: absolute; left: 6px; bottom: 6px;
  background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 800; letter-spacing: 0.08em; padding: 2px 6px; border-radius: 4px;
}
.meta { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 2px 10px; padding: 10px 2px 0; }
.badge {
  grid-row: 1 / span 2;
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; letter-spacing: 0.02em;
  color: #fff; background: var(--bg-3);
  flex: none;
}
.title {
  font-weight: 600; font-size: 15px; line-height: 1.3; color: var(--fg);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  overflow-wrap: anywhere;
}
.date { color: var(--fg-2); font-size: 13px; }
.date .show-name { color: var(--fg-2); }
.date .show-name::after { content: " · "; color: var(--fg-3); }
.date .approx { color: var(--fg-3); }

/* per-show badge colours — one hue per show, stable across sessions */
.badge[data-show="wtyp"] { background: #b3421f; }
.badge[data-show="rm-brown"] { background: #6b4f2a; }
.badge[data-show="trash-future"] { background: #2f7a4f; }
.badge[data-show="kill-james-bond"] { background: #8a1c2c; }
.badge[data-show="lions-led-by-donkeys"] { background: #3d5a80; }
.badge[data-show="worst-of-all-possible-worlds"] { background: #6a3d9a; }
.badge[data-show="ben-financial"] { background: #1f7a8c; }
.badge[data-show="kamikaze-cash"] { background: #b8860b; }

.sentinel { height: 1px; }
.end { text-align: center; color: var(--fg-2); margin: 40px 0 0; }
.end a { color: var(--fg); border-bottom: 1px solid var(--fg-3); }

/* ---------- footer ---------- */
.foot {
  border-top: 1px solid var(--line);
  padding: 28px var(--gutter) 40px;
  max-width: 1600px; margin: 0 auto;
  color: var(--fg-2); font-size: 13px;
}
.foot-line { max-width: 70ch; margin: 0 0 10px; }
.foot a { color: var(--fg); border-bottom: 1px solid var(--fg-3); }
.foot-shows { list-style: none; padding: 0; margin: 14px 0 18px; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.foot-shows a { border-bottom: 0; color: var(--fg-2); }
.foot-shows a:hover { color: var(--fg); }
.foot-small { color: var(--fg-3); font-size: 12px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .thumb, .thumb img, .chip { transition: none; }
  .tile:hover .thumb { transform: none; }
}
