/* ==========================================================================
   翻车榜 — punchy/tabloid skin
   Color: charcoal bg, alarm red + warning yellow accents
   Typography: Noto Sans SC Black for headlines, slab numbers for stats
   ========================================================================== */

:root {
  --bg: #fafafa;
  --bg-card: #ffffff;
  --bg-card-hover: #f3f4f6;
  --border: #e5e7eb;
  --text: #111111;
  --text-muted: #4b5563;
  --text-dim: #64748b;  /* slate-500: ≥4.5:1 contrast on white (was #9ca3af) */

  --red: #dc2626;             /* 翻车 */
  --red-bg: rgba(220, 38, 38, 0.10);
  --yellow: #b45309;          /* 半应验 / 等判决 — darker for white-bg contrast */
  --yellow-bg: rgba(180, 83, 9, 0.12);
  --green: #15803d;           /* 神预言 */
  --green-bg: rgba(21, 128, 61, 0.10);
  --gray: #6b7280;            /* 查无对证 */

  --shadow: 0 4px 16px rgba(220, 38, 38, 0.12);
  --topnav-bg: rgba(255, 255, 255, 0.92);
}

* { box-sizing: border-box; }

/* Honor the hidden attribute even when an explicit display: rule (e.g.
   .leader-row { display: grid }) would otherwise shadow the browser default.
   Used by index.js to show-N-then-expand on .card-grid / .expandable-list. */
[hidden] { display: none !important; }

/* ===== A11Y: keyboard focus + reduced motion ===== */
:focus { outline: none; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
  border-radius: 4px;
}
.leader-row:focus-visible, .channel-tile:focus-visible, .fail-card:focus-visible,
.hit-card:focus-visible, .pending-card:focus-visible, .partial-card:focus-visible {
  outline-offset: 4px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Skip-link (only visible on focus) */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 200;
  background: var(--yellow);
  color: var(--bg);
  padding: 8px 14px;
  border-radius: 4px;
  font-weight: 900;
  text-decoration: none;
}
.skip-link:focus { left: 8px; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  font-weight: 500;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== LEFT SIDENAV (replaces topnav for index + channel pages) ===== */
.sidenav {
  position: fixed; left: 0; top: 0; bottom: 0; width: 200px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 24px 20px;
  display: flex; flex-direction: column; gap: 24px;
  z-index: 50;
  overflow-y: auto;
}
.sidenav .brand {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-align: center;
  text-decoration: none;
  padding: 4px 0 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.sidenav .brand .brand-logo { width: 44px; height: 44px; }
.sidenav .brand .brand-text {
  font-weight: 900; font-size: 18px; line-height: 1.2;
  background: linear-gradient(90deg, var(--red), var(--yellow));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.sidenav .brand .sub-brand {
  font-size: 12px; font-weight: 700; opacity: 0.85;
}
.sidenav nav { display: flex; flex-direction: column; gap: 2px; }
.sidenav nav a {
  display: block; padding: 9px 12px; border-radius: 8px;
  color: var(--text-muted); font-size: 14px; font-weight: 700;
  line-height: 1.3;
  transition: background 0.15s, color 0.15s;
}
.sidenav nav a:hover { background: var(--bg-card-hover); color: var(--text); }
/* Two-layer sidebar: clickable group headers (预言更新 / 大V战绩) + indented sub-links */
.sidenav nav a.nav-group {
  margin-top: 10px;
}
.sidenav nav a.nav-group:first-child { margin-top: 0; }
.sidenav nav a.nav-group:hover { background: var(--bg-card-hover); color: var(--text); }
.sidenav nav a.nav-sub {
  padding-top: 6px; padding-bottom: 6px; padding-left: 30px;
  font-size: 13px; font-weight: 600; color: var(--text-muted);
}
.sidenav nav a.nav-sub:hover { background: var(--bg-card-hover); color: var(--text); }
/* Active-page highlight — the only thing that differs between identical navbars */
.sidenav nav a.is-current { color: var(--text); background: var(--bg-card-hover); }
.sidenav nav a.nav-group.is-current { color: var(--yellow); background: transparent; }
.sidenav .back-link {
  margin-top: auto; padding: 10px 12px; border-radius: 8px;
  color: var(--text-dim); font-size: 13px; font-weight: 700;
  text-decoration: none;
  border-top: 1px solid var(--border); padding-top: 14px;
  transition: color 0.15s;
}
.sidenav .back-link:hover { color: var(--text); }

/* Hamburger button — hidden on desktop where the full sidenav is visible */
.nav-toggle {
  display: none;
  background: transparent; border: 0;
  font-size: 26px; line-height: 1; font-weight: 700;
  padding: 8px 12px;
  min-width: 44px; min-height: 44px;
  cursor: pointer;
  color: var(--text);
  border-radius: 8px;
}
.nav-toggle:hover { background: var(--bg-card-hover); }

.has-sidenav .layout-main { margin-left: 200px; }
.has-sidenav .layout-main .container { max-width: 980px; }

@media (max-width: 820px) {
  /* Mobile: minimal header — brand on the left, hamburger on the right, back-link
     after that on channel pages. Tapping the hamburger reveals the section nav
     as a slide-down drawer (.sidenav.is-open). */
  .sidenav {
    position: relative; width: auto; height: auto; flex-direction: row;
    align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 14px;
    border-right: none; border-bottom: 1px solid var(--border);
    overflow: visible;
  }
  .sidenav .brand {
    flex-direction: row; gap: 8px; padding: 0;
    border-bottom: none; margin-bottom: 0;
    flex-shrink: 0;
  }
  .sidenav .brand .brand-logo { width: 26px; height: 26px; }
  .sidenav .brand .brand-text {
    flex-direction: row; gap: 6px; font-size: 15px;
    white-space: nowrap;
  }
  .sidenav .brand .sub-brand { display: none; }
  .nav-toggle { display: block; margin-left: auto; }  /* push to right edge */
  .sidenav nav { display: none; }       /* hidden by default; drawer opens it */
  .sidenav.is-open nav {
    display: flex;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg-card);
    flex-direction: column; gap: 0;
    padding: 6px 14px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.4);
    border-bottom: 1px solid var(--border);
    z-index: 60;
  }
  .sidenav.is-open nav a {
    padding: 14px 10px;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    font-size: 16px;
  }
  .sidenav.is-open nav a:last-child { border-bottom: 0; }
  .sidenav .back-link {
    margin: 0; padding: 6px 12px; border-top: none;
    font-size: 13px; flex-shrink: 0;
    color: var(--text-muted);
  }
  .has-sidenav .layout-main { margin-left: 0; }
}

/* ===== HERO ===== */
.hero {
  padding: 80px 0 60px;
  background:
    radial-gradient(ellipse at top, rgba(255, 59, 48, 0.18), transparent 60%),
    var(--bg);
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.hero.hero-compact { padding: 18px 0 16px; }
.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;
}
.page-meta {
  max-width: 760px;
  margin: 32px auto 16px;
  padding: 14px 18px;
  background: #f8f9fb;
  border-left: 3px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.7;
}
.page-meta a { color: var(--text-muted); text-decoration: underline; }
.page-meta a:hover { color: var(--red); }
.page-meta time { font-variant-numeric: tabular-nums; }

/* When a prediction row is the URL target (#pred-vid-n), give it a strong
   yellow outline so the linked-to row is obvious after scroll. */
tr[id^="pred-"]:target { outline: 3px solid #fbbf24; outline-offset: -3px; background: #fffbeb !important; }
tr[id^="pred-"]:target td { box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.3); }
/* Smooth scroll for in-page anchor clicks. */
html { scroll-behavior: smooth; scroll-padding-top: 16px; }
.top-banner {
  width: 100%;
  background: #fff;
  text-align: center;
  padding: 4px 16px 0;
}
.top-banner.text-left {
  text-align: left;
  max-width: 1080px;
  margin: 0 auto;
  padding: 4px 20px 0;
}
.has-sidenav .layout-main .top-banner.text-left { max-width: 980px; }
.top-banner img {
  display: inline-block;
  max-width: 560px;
  width: 92%;
  height: auto;
}
@media (max-width: 600px) {
  .top-banner { padding: 4px 12px 0; }
  .top-banner img { width: 96%; }
}
.layout-main > .container > .section:first-child { padding-top: 10px; }
.hero.hero-compact::before { display: none; }
.hero.hero-compact h1 { font-size: 42px; margin: 8px 0 6px; }
.hero.hero-compact .sub { font-size: 14px; margin: 0; }
.hero.hero-compact .hero-eyebrow { font-size: 11px; padding: 4px 10px; }
.hero-row { display: flex; align-items: center; gap: 24px; }
.hero-logo { width: 80px; height: 80px; flex-shrink: 0; filter: drop-shadow(0 4px 12px rgba(220, 38, 38, 0.25)); }
.hero-text { flex: 1; min-width: 0; }
@media (max-width: 600px) {
  .hero-row { gap: 14px; }
  .hero-logo { width: 56px; height: 56px; }
}
.hero::before {
  content: "💀💀💀💀💀💀💀💀💀💀💀";
  position: absolute; top: 12px; left: 0; right: 0;
  text-align: center;
  font-size: 20px; letter-spacing: 16px;
  opacity: 0.08; pointer-events: none;
}
.hero-eyebrow {
  display: inline-block;
  background: var(--red);
  color: white;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 2px;
  padding: 6px 12px;
  border-radius: 4px;
  text-transform: uppercase;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.hero h1 {
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 900;
  line-height: 1.0;
  letter-spacing: -2px;
  margin: 0 0 16px;
  text-shadow: 0 0 30px rgba(255, 59, 48, 0.3);
}
.hero h1 .flame { color: var(--red); }
.hero h1 .face { color: var(--yellow); }
.hero .sub {
  font-size: 18px;
  color: var(--text-muted);
  font-weight: 500;
  max-width: 620px;
  margin: 0 0 40px;
}
.hero .sub strong { color: var(--text); }

/* Ticker stats row */
.ticker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 16px;
}
.ticker .cell, .ticker > span {
  background: var(--bg-card);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.ticker .v {
  display: block;
  font-size: 36px;
  font-weight: 900;
  line-height: 1;
  font-feature-settings: "tnum";
}
.ticker .v.red { color: var(--red); }
.ticker .v.yellow { color: var(--yellow); }
.ticker .v.green { color: var(--green); }
.ticker .l {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 700;
}

/* ===== SECTION HEADERS ===== */
.section { padding: 28px 0; }
.section-head { margin-bottom: 18px; display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.section-head h2 {
  font-size: 36px; font-weight: 900; margin: 0; letter-spacing: -1px;
}
.section-head h2 .emoji { font-size: 0.9em; }
.section-head .note { color: var(--text-muted); font-size: 14px; }

/* ===== SHARED CARD MODULE ============================================================
   Used by fail / hit / pending cards. Layout + typography + interactions all live on
   `.card` and consume custom properties (--card-accent, --card-accent-bg, ...) that
   each variant class only redefines. Adding a new kind = one new modifier block. */
.fail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 720px) { .fail-grid { grid-template-columns: 1fr; } }

.card {
  /* Defaults — overridden by variant classes below */
  --card-accent: var(--text-muted);
  --card-accent-bg: var(--bg-card-hover);
  --card-accent-border: var(--border);
  --card-stamp-rotation: 8deg;

  background: var(--bg-card);
  border-left: 4px solid var(--card-accent);
  border-radius: 8px;
  padding: 24px;
  position: relative;
  transition: transform 0.2s, background 0.2s;
}
@media (hover: hover) {
  .card:hover { background: var(--bg-card-hover); transform: translateY(-2px); }
}
.card .stamp {
  position: absolute; top: 14px; right: 14px;
  font-size: 20px; opacity: 0.75;
  transform: rotate(var(--card-stamp-rotation));
}
/* Verdict text pill (replaces the legacy emoji stamp). Unambiguous label —
   "翻车" / "应验" / "半应验" / "等判决". Lives inline in .card-head, pushed to
   the right edge with margin-left:auto so it baseline-aligns with the
   difficulty + topic pills in the same flex row. */
.card .verdict-pill {
  margin-left: auto;
  background: var(--card-accent);
  color: #fff;
  font-size: 12px; font-weight: 800;
  padding: 3px 7px;
  border-radius: 999px;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
@media (max-width: 720px) {
  .card .verdict-pill { font-size: 11px; padding: 2px 6px; }
}
/* "X天前审判" badge on the 最新审判 strip — top-left corner so it doesn't
   collide with the stamp (top-right) or partial-hit marker (in card-head). */
.card .freshness {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 10px;
  background: var(--card-accent, #f0a500);
  color: #fff;
  font-size: 12px; font-weight: 800;
  border-radius: 999px;
  letter-spacing: 0.5px;
}
.section-head .section-subhead {
  font-size: 14px; color: var(--text-muted);
  flex-basis: 100%;
  margin-top: -4px;
}
.card .meta {
  font-size: 12px; color: var(--text-muted); letter-spacing: 1px;
}
.card .meta .date {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.3px;
}
.card .meta .ch {
  color: var(--card-accent); font-weight: 900;
  text-decoration: none;
  border-bottom: 1px dotted transparent;
  transition: border-color 0.15s;
}
.card .meta a.ch:hover { border-bottom-color: var(--card-accent); }
.card .quote {
  font-size: 17px; font-weight: 700; line-height: 1.4;
  margin-bottom: 16px; color: var(--text);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
  overflow: hidden;
}
.card.is-expanded .quote { -webkit-line-clamp: unset; overflow: visible; }
.card .vs {
  display: flex; align-items: center; gap: 10px;
  margin: 16px 0; color: #475569; font-size: 13px;
  font-weight: 700; letter-spacing: 1px;
  /* slate-600 instead of var(--text-dim) #9ca3af for WCAG AA contrast on white */
}
.card .vs::before, .card .vs::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.card .outcome,
.card .deadline {
  font-size: 14px; line-height: 1.5; color: var(--text);
  background: var(--card-accent-bg);
  border: 1px solid var(--card-accent-border);
  border-radius: 6px; padding: 12px 14px;
}
.card .outcome {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4;
  overflow: hidden; position: relative;
}
.card.is-expanded .outcome { -webkit-line-clamp: unset; overflow: visible; }
.card .outcome strong,
.card .deadline strong { color: var(--card-accent); }

/* ----- Variant modifiers — colors / stamp angle ---------------------------------- */
/* Note: --card-accent doubles as text color on --card-accent-bg via .outcome strong /
   .deadline strong. The brand --red (#dc2626) on --red-bg (#fce9e9) was 4.13:1 — just
   under WCAG AA. We use a darker shade (#b91c1c, red-700) for the text role while
   keeping the brand red elsewhere. Same pattern applies to hit/pending below. */
.fail-card {
  --card-accent: #b91c1c;
  --card-accent-bg: var(--red-bg);
  --card-accent-border: rgba(220, 38, 38, 0.3);
  --card-stamp-rotation: 15deg;
}
.hit-card {
  --card-accent: #166534;  /* green-800; brand --green (#15803d) was 4.38:1 on --green-bg, just under AA */
  --card-accent-bg: var(--green-bg);
  --card-accent-border: rgba(21, 128, 61, 0.3);
  --card-stamp-rotation: -12deg;
}
.pending-card {
  --card-accent: #92400e;  /* amber-800; brand --yellow (#b45309) was 4.25:1 on --yellow-bg, just under AA */
  --card-accent-bg: var(--yellow-bg);
  --card-accent-border: rgba(180, 83, 9, 0.3);
  --card-stamp-rotation: 8deg;
}
.partial-card {
  /* Traffic-light intuition: 部分应验 sits between fail (red) and hit (green).
     Brighter golden-yellow distinguishes it from the muted amber of pending. */
  --card-accent: #a16207;             /* yellow-700 */
  --card-accent-bg: rgba(250, 204, 21, 0.16); /* yellow-300 tint */
  --card-accent-border: rgba(202, 138, 4, 0.35);
  --card-stamp-rotation: -5deg;
}

/* Cross-page CTA — links between / and /leaderboard.html */
.section.page-cta { padding: 0; }
.page-cta-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
@media (hover: hover) {
  .page-cta-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--yellow);
    transform: translateY(-1px);
  }
}
.page-cta-icon { font-size: 32px; flex-shrink: 0; }
.page-cta-text { flex: 1; min-width: 0; }
.page-cta-title { font-size: 18px; font-weight: 900; margin-bottom: 4px; }
.page-cta-sub { font-size: 13px; color: var(--text-muted); }
.page-cta-arrow { font-size: 24px; font-weight: 900; color: var(--text-muted); flex-shrink: 0; }
@media (max-width: 540px) {
  .page-cta-card { padding: 16px; gap: 12px; }
  .page-cta-icon { font-size: 26px; }
  .page-cta-title { font-size: 16px; }
}

/* Visual divider line between two top-level groups in sidenav */
.sidenav nav .sidenav-divider {
  display: block;
  padding: 0;
  margin: 8px 12px;
  border-top: 1px solid var(--border);
  pointer-events: none;
}
.sidenav nav .sidenav-divider:hover { background: transparent; }
@media (max-width: 820px) {
  .sidenav.is-open nav .sidenav-divider { display: none; }
}

/* ===== CARD EXPAND ("查看完整" / "收起") ===== */
.card-more {
  display: inline-block; margin-top: 12px; margin-left: 14px;
  background: none; border: none; padding: 4px 0;
  font-size: 13px; font-weight: 700; cursor: pointer;
  color: var(--text-muted);
  transition: color 0.15s;
  vertical-align: baseline;
}
.card-more:hover { color: var(--text); }
.card-more:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; border-radius: 4px; }

/* ===== ALL CHANNELS GRID (homepage navigation) ===== */
.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.channel-tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
  transition: background 0.15s, transform 0.15s, border-color 0.15s;
  display: flex; flex-direction: column; gap: 8px;
}
@media (hover: hover) {
  .channel-tile:hover { background: var(--bg-card-hover); transform: translateY(-2px); border-color: var(--text-dim); }
}
.channel-tile .t-name { font-size: 17px; font-weight: 900; }
.channel-tile .t-handle { font-size: 12px; color: var(--text-dim); letter-spacing: 0.5px; }
.channel-tile .t-stats {
  display: flex; gap: 10px; align-items: baseline; margin-top: 4px;
}
.channel-tile .t-stat { font-size: 12px; color: var(--text-muted); font-weight: 700; }
.channel-tile .t-stat .v { font-size: 16px; font-weight: 900; margin-right: 4px; font-feature-settings: "tnum"; }
.channel-tile .t-stat .v.fail { color: var(--red); }
.channel-tile .t-stat .v.hit { color: var(--green); }
.channel-tile .t-stat .v.bold { color: #b94600; }  /* darkened from #ff6a00 for AA contrast on white */

/* ===== TRIPLE LEADERBOARDS (L2 / L3 / L4) ===== */
.triple-board { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; margin-bottom: 8px; }
.triple-board .board-col h3 {
  font-size: 18px; font-weight: 900; margin: 0 0 12px;
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
}
.triple-board .board-col h3 .pill {
  font-size: 10px; letter-spacing: 0.5px; text-transform: uppercase;
  background: var(--border); color: var(--text-muted);
  padding: 3px 7px; border-radius: 4px; font-weight: 700;
}
.triple-board .leaderboard .leader-row {
  grid-template-columns: 40px 1fr auto; gap: 10px; padding: 14px 14px;
}
.triple-board .leader-row .medal,
.triple-board .leader-row .stat.fail,
.triple-board .leader-row .cta { display: none; }
.triple-board .leader-row .stat .v { font-size: 20px; }
.triple-board .leader-row .name .ch { font-size: 14px; }
.triple-board .leader-row .name .style { font-size: 11px; }
.triple-board .empty-board { padding: 16px; color: var(--text-dim); font-size: 13px; background: var(--bg-card); border: 1px dashed var(--border); border-radius: 12px; }
@media (max-width: 900px) {
  .triple-board { grid-template-columns: 1fr; gap: 24px; }
}

/* ===== Mobile leaderboard level switcher =====
   Tabs hidden on desktop (≥821px); the triple-board shows all 3 columns then.
   On mobile (≤820px) the tabs appear and only the active board-col is shown. */
.lb-tabs { display: none; }
@media (max-width: 820px) {
  .lb-tabs {
    display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px;
  }
  .lb-tabs button {
    background: var(--bg-card); border: 1px solid var(--border); color: var(--text-muted);
    font-family: inherit; font-size: 13px; font-weight: 700;
    padding: 7px 12px; border-radius: 999px;
    cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s;
  }
  .lb-tabs button:hover { background: var(--bg-card-hover); color: var(--text); }
  .lb-tabs button.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }
  .lb-tabs button:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }

  .lb-pane { display: none; }
  .lb-pane.is-active { display: block; }
  .triple-board { gap: 0; }    /* only one board visible at a time, gap unused */
}

/* Mobile: leader-row content was overflowing the .leaderboard's border-radius
   clip — tighten the row so name + style label fit alongside the stat. */
@media (max-width: 480px) {
  .triple-board .leaderboard .leader-row { padding: 12px 12px; gap: 8px; grid-template-columns: 30px 1fr auto; }
  .triple-board .leader-row .rank { font-size: 18px; }
  .triple-board .leader-row .name .ch { font-size: 13px; }
  .triple-board .leader-row .name .style { font-size: 10px; line-height: 1.3; }
  .triple-board .leader-row .stat .v { font-size: 17px; }
  .triple-board .leader-row .stat .l { font-size: 9px; }
}

/* ===== PER-BOARD SORT TOGGLE (应验/翻车) ===== */
.sort-toggle { display: flex; gap: 6px; margin-bottom: 10px; }
.sort-toggle .st-tab {
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text-muted);
  font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 999px;
  cursor: pointer; transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.sort-toggle .st-tab:hover { background: var(--bg-card-hover); color: var(--text); }
.sort-toggle .st-tab.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }
.sort-toggle .st-tab:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
.sort-pane { display: none; }
.sort-pane.is-active { display: block; }
.triple-board .leader-row .stat.fail { display: block; }
.triple-board .leader-row .stat.fail .v { color: var(--red); }
.triple-board .sort-pane[data-sort="fail"] .top1 .rank { color: var(--red); }
.triple-board .sort-pane[data-sort="hit"] .top1 .rank { color: var(--green); }

/* ===== LEVEL TABS (above card grids) ===== */
.level-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.section-head .level-tabs { margin-bottom: 0; }
.level-tabs .lv-tab {
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text-muted);
  font-size: 14px; font-weight: 700; padding: 8px 14px; border-radius: 999px;
  cursor: pointer; transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.level-tabs .lv-tab:hover { background: var(--bg-card-hover); color: var(--text); }
.level-tabs .lv-tab.is-active {
  background: var(--text); color: var(--bg); border-color: var(--text);
}
.level-tabs .lv-tab:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }

/* ===== EXPAND-MORE BUTTON ===== */
.grid-foot, .table-foot { margin-top: 16px; display: flex; gap: 12px; align-items: center; justify-content: center; }
.expand-btn {
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text);
  font-size: 14px; font-weight: 700; padding: 10px 18px; border-radius: 8px;
  cursor: pointer; transition: background 0.15s, border-color 0.15s;
}
.expand-btn:hover { background: var(--bg-card-hover); border-color: var(--text-muted); }
.expand-btn:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
.grid-empty-msg { color: var(--text-dim); font-size: 13px; }

/* ===== TWO-COL LEADERBOARDS (翻车王 vs 神预言王) ===== */
.dual-board { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.dual-board h3 {
  font-size: 24px; font-weight: 900; margin: 0 0 16px;
  display: flex; align-items: baseline; gap: 10px;
}
.dual-board h3 .pill {
  font-size: 11px; letter-spacing: 1px; text-transform: uppercase;
  background: var(--border); color: var(--text-muted);
  padding: 4px 8px; border-radius: 4px; font-weight: 700;
}
.dual-board .leaderboard .leader-row { grid-template-columns: 50px 1fr auto; gap: 14px; padding: 18px 18px; }
.dual-board .leader-row .medal,
.dual-board .leader-row .stat.hit { display: none; }  /* compact: just one big stat per board */
.dual-board .leader-row .stat .v { font-size: 24px; }
.dual-board .leader-row .name .ch { font-size: 16px; }
.dual-board .leader-row .cta { display: none; }
.dual-board.hit-side .stat.fail { display: none; }
.dual-board.hit-side .leader-row .stat.hit { display: block; }
.dual-board.hit-side .leaderboard { border-color: rgba(52, 199, 89, 0.3); }
.dual-board.hit-side .top1 .rank { color: var(--green); }
.dual-board.fail-side .leaderboard { border-color: rgba(255, 59, 48, 0.3); }
@media (max-width: 720px) {
  .dual-board { grid-template-columns: 1fr; gap: 32px; }
}

/* ===== CHANNEL LEADERBOARD ===== */
.leaderboard {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.leader-row {
  display: grid;
  grid-template-columns: 64px 1fr auto auto auto;
  align-items: center;
  gap: 20px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.leader-row:last-child { border-bottom: none; }
.leader-row:hover { background: var(--bg-card-hover); }
.leader-row .rank {
  font-size: 32px;
  font-weight: 900;
  text-align: center;
  color: var(--text-dim);
  font-feature-settings: "tnum";
}
.leader-row.top1 .rank { color: var(--red); }
.leader-row.top2 .rank { color: var(--yellow); }
.leader-row.top3 .rank { color: var(--green); }
.leader-row .medal { font-size: 28px; line-height: 1; }
.leader-row .name { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.leader-row .name .ch { font-size: 20px; font-weight: 900; }
.leader-row .name .style { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.leader-row .stat { text-align: center; min-width: 80px; }
.leader-row .stat .v { font-size: 28px; font-weight: 900; line-height: 1; font-feature-settings: "tnum"; }
.leader-row .stat.fail .v { color: var(--red); }
.leader-row .stat.hit .v { color: var(--green); }
.leader-row .stat .l { font-size: 11px; color: var(--text-muted); letter-spacing: 1px; text-transform: uppercase; margin-top: 4px; font-weight: 700; }
.leader-row .cta {
  background: var(--red);
  color: white;
  border-radius: 6px;
  padding: 10px 16px;
  font-weight: 900;
  font-size: 13px;
  white-space: nowrap;
  transition: background 0.15s;
}
.leader-row .cta:hover { background: #ff2419; }

@media (max-width: 720px) {
  .leader-row {
    grid-template-columns: 40px 1fr auto;
    gap: 14px;
    padding: 16px;
  }
  .leader-row .medal { display: none; }
  .dual-board .leader-row .stat.hit { display: none; }
  .leader-row .rank { font-size: 22px; }
  .leader-row .name .ch { font-size: 16px; }
  .leader-row .stat .v { font-size: 22px; }
  .leader-row .cta { padding: 8px 12px; font-size: 12px; }
}

/* ==========================================================================
   CHANNEL PAGE (punchy/channels/<slug>.html)
   ========================================================================== */

.ch-hero {
  padding: 60px 0 40px;
  background: radial-gradient(ellipse at top, rgba(255, 59, 48, 0.12), transparent 70%), var(--bg);
  border-bottom: 1px solid var(--border);
}
.ch-hero.ch-hero-compact { padding: 24px 0 20px; }
.ch-hero.ch-hero-compact h1 { font-size: clamp(28px, 4vw, 36px); margin: 0; }
.ch-hero.ch-hero-compact .crumb { margin-bottom: 10px; font-size: 12px; }

.ch-hero .crumb {
  font-size: 13px; color: var(--text-dim); letter-spacing: 1px;
  text-transform: uppercase; margin-bottom: 16px;
}
.ch-hero .crumb a { color: var(--text-muted); text-decoration: underline; }
.ch-hero h1 {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 900; letter-spacing: -1px;
  line-height: 1.0; margin: 0 0 12px;
}
.ch-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.ch-hero .meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ch-hero .meta a {
  color: var(--red); font-weight: 700; font-size: 13px;
  text-decoration: underline;
}
.ch-hero .meta .badge {
  background: var(--border); color: var(--text-muted);
  padding: 3px 8px; border-radius: 4px;
  font-size: 11px; letter-spacing: 1px; text-transform: uppercase; font-weight: 700;
}

.ch-stat-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }

.ch-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden;
  margin-bottom: 14px;
}
/* When the stat row is a sort-pane, override `.sort-pane.is-active { display: block }`
   so the grid layout actually applies (otherwise the 4 cells stack vertically). */
.ch-stats.sort-pane { display: none; }
.ch-stats.sort-pane.is-active { display: grid; }
.ch-stats .ch-stat { background: var(--bg-card); padding: 14px 16px; }
.ch-stats .ch-stat .v { font-size: 30px; font-weight: 900; line-height: 1; font-feature-settings: "tnum"; margin-bottom: 4px; }
.ch-stats .ch-stat .v.fail { color: var(--red); }
.ch-stats .ch-stat .v.hit { color: var(--green); }
.ch-stats .ch-stat .l { font-size: 11px; color: var(--text-muted); letter-spacing: 0.5px; text-transform: uppercase; font-weight: 700; line-height: 1.4; }
.ch-stats .ch-stat .l .muted { font-size: 10px; color: var(--text-dim); text-transform: none; letter-spacing: 0; }
@media (max-width: 720px) {
  .ch-stats { grid-template-columns: 1fr 1fr; }
}

.ch-pills {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  font-size: 12px; color: var(--text-muted); font-weight: 700;
  margin-bottom: 14px;
}
.ch-pills .b {
  background: var(--bg); border: 1px solid var(--border);
  padding: 4px 9px; border-radius: 4px; font-feature-settings: "tnum";
}
.ch-pills .b.hit { color: var(--green); border-color: rgba(21, 128, 61, 0.3); }
.ch-pills .b.partial { color: var(--yellow); border-color: rgba(180, 83, 9, 0.3); }
.ch-pills .b.miss { color: var(--red); border-color: rgba(220, 38, 38, 0.3); }
.ch-pills .b.pending { color: var(--text-muted); }
.ch-pills .b-sep { color: var(--text-dim); margin: 0 4px; }

.score-card {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 28px;
  margin-bottom: 24px;
}
.score-card .cell { background: var(--bg-card); padding: 24px 20px; }
.score-card .v { font-size: 48px; font-weight: 900; line-height: 1; font-feature-settings: "tnum"; margin-bottom: 6px; }
.score-card .v.fail { color: var(--red); }
.score-card .v.hit { color: var(--green); }
.score-card .l { font-size: 12px; color: var(--text-muted); letter-spacing: 1px; text-transform: uppercase; font-weight: 700; }
.score-card .verdict-bits {
  display: flex; flex-wrap: wrap; gap: 8px;
  font-size: 12px; color: var(--text-muted); font-weight: 700;
}
.score-card .verdict-bits .b {
  background: var(--bg); border: 1px solid var(--border);
  padding: 6px 10px; border-radius: 4px; font-feature-settings: "tnum";
}
.score-card .verdict-bits .b.hit { color: var(--green); border-color: rgba(52, 199, 89, 0.3); }
.score-card .verdict-bits .b.partial { color: var(--yellow); border-color: rgba(255, 214, 10, 0.3); }
.score-card .verdict-bits .b.miss { color: var(--red); border-color: rgba(255, 59, 48, 0.3); }
.score-card .verdict-bits .b.pending { color: var(--text-muted); }
@media (max-width: 720px) {
  .score-card { grid-template-columns: 1fr 1fr; }
  .score-card .cell:last-child { grid-column: 1 / -1; }
}

.finding-blurb {
  background: var(--bg-card);
  border-left: 3px solid var(--yellow);
  padding: 18px 22px;
  border-radius: 8px;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 8px;
}
.finding-blurb p { margin: 0 0 8px; }
.finding-blurb p:last-child { margin-bottom: 0; }

/* Pending cards: use a neutral grey for undated entries (the L3/L4 windows we
   couldn't parse), separate from the dated countdown. */
.pending-card .deadline.undated {
  color: var(--text-muted);
  background: var(--bg-card-hover);
  border-color: var(--border);
}
.pending-card .deadline.undated strong { color: var(--text-muted); }

/* ===== Subscribe CTA (compact horizontal bar) ===== */
.section.subscribe { padding-top: 14px; }
.subscribe-card {
  background: linear-gradient(135deg, var(--red-bg), var(--yellow-bg));
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: 12px;
  padding: 16px 24px;
  max-width: 880px;
  margin: 0 auto;
  display: flex; align-items: center; gap: 24px;
}
.subscribe-card .subscribe-copy { flex: 1; min-width: 0; }
.subscribe-card h3 {
  font-size: 17px; font-weight: 900; margin: 0 0 4px; color: var(--text);
  letter-spacing: -0.2px;
}
.subscribe-card p {
  color: var(--text-muted); font-size: 13px; line-height: 1.45;
  margin: 0;
}
.subscribe-card p strong { color: var(--red); }
.subscribe-card .subscribe-note { font-size: 11px; color: var(--text-dim); margin-top: 3px; }

.subscribe-form {
  flex-shrink: 0;
  display: flex; gap: 8px; align-items: center;
}
.subscribe-form input[type="email"] {
  flex: 1; min-width: 0;
  font-family: inherit; font-size: 14px;
  padding: 9px 12px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg-card); color: var(--text);
}
.subscribe-form input[type="email"]:focus-visible {
  outline: 2px solid var(--yellow); outline-offset: 2px; border-color: var(--text-muted);
}
.subscribe-cta {
  flex-shrink: 0;
  display: inline-block;
  font-family: inherit; font-size: 15px; font-weight: 900;
  padding: 10px 22px; border-radius: 8px; border: none;
  background: var(--red); color: white !important;
  text-decoration: none; cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: 0 3px 12px rgba(220, 38, 38, 0.22);
}
.subscribe-cta:hover { background: #b91c1c; box-shadow: 0 4px 14px rgba(220, 38, 38, 0.32); }
.subscribe-cta:active { transform: translateY(1px); }
.subscribe-cta:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }

@media (max-width: 600px) {
  .subscribe-card { flex-direction: column; align-items: stretch; text-align: center; padding: 16px 18px; gap: 12px; }
  .subscribe-form { flex-direction: column; gap: 10px; }
  .subscribe-cta { padding: 11px 22px; width: 100%; }
}

/* ===== Mobile / small-screen overrides (480px and below) ===== */
@media (max-width: 480px) {
  .container { padding: 0 14px; }
  .topnav .container { height: 52px; }
  .topnav .right { gap: 12px; font-size: 12px; }
  .topnav .right a.switch { padding-left: 10px; }
  .ticker { grid-template-columns: 1fr 1fr; }  /* 2x2 instead of 4-wide */
  .ticker .v { font-size: 28px; }
  .score-card { grid-template-columns: 1fr; }  /* stack to 1 column */
  .score-card .v { font-size: 36px; }
  .hero { padding: 56px 0 40px; }
  .hero .sub { font-size: 16px; }
  .section { padding: 36px 0; }
  .section-head h2 { font-size: 28px; }
  .fail-card, .hit-card, .pending-card, .partial-card { padding: 18px; }
  .fail-card .stamp, .hit-card .stamp, .pending-card .stamp, .partial-card .stamp { font-size: 18px; top: 10px; right: 10px; }
  .fail-card .quote, .hit-card .quote, .partial-card .quote { font-size: 16px; }
  .filter-row { gap: 6px; }
  .filter-chips button { padding: 10px 12px; min-height: 44px; }
}

/* Predictions table */
.pred-table-wrap { overflow-x: auto; }
table.predictions {
  width: 100%;
  table-layout: fixed;  /* enforce column widths so 实际结果 stops getting squeezed */
  border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden;
  font-size: 14px;
  line-height: 1.55;
}
table.predictions thead {
  background: var(--bg);
  color: var(--text-muted);
  font-size: 11px; letter-spacing: 1px; text-transform: uppercase; font-weight: 700;
}
table.predictions th { padding: 14px 12px; text-align: left; border-bottom: 1px solid var(--border); }
table.predictions td { padding: 16px 12px; vertical-align: top; border-bottom: 1px solid var(--border); word-wrap: break-word; overflow-wrap: anywhere; }
table.predictions tr:last-child td { border-bottom: none; }
/* Column widths sized to content density (applied via <colgroup>, since with
   table-layout: fixed only the first row's widths are honored — and our <th>s
   have no width classes).
     - 日期 fits "2026-05-09" only (~95px)
     - 判定 fits a verdict badge (~100px)
     - 预测 vs 实际结果 share the remainder ~4:5 (outcomes run longer than quotes) */
table.predictions col.col-date       { width: 140px; }
table.predictions col.col-prediction { width: 50%; }
table.predictions col.col-actual     { width: 50%; }
table.predictions col.col-verdict    { width: 100px; }

/* Cell-level styling (alignment, color, padding) still applies via td class */
table.predictions .col-date    { padding-left: 16px; color: var(--text-muted); font-feature-settings: "tnum"; font-size: 13px; }
table.predictions .col-date .yt { display: inline-block; margin-top: 4px; }
table.predictions .col-actual  { color: var(--text); }
table.predictions .col-verdict { padding-right: 16px; white-space: nowrap; }
table.predictions .col-prediction .pred-text { line-height: 1.45; }
table.predictions .col-prediction .pred-diff { margin-top: 3px; line-height: 1; }
table.predictions .col-prediction .pred-diff .diff {
  margin-right: 0;
  padding: 2px 6px; font-size: 10px;
}
table.predictions a { color: var(--yellow); text-decoration: underline; font-weight: 700; }
table.predictions .yt {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.15s;
}
@media (hover: hover) {
  table.predictions .yt:hover {
    background: var(--bg-card-hover);
    color: var(--text);
    border-color: var(--text-dim);
  }
}
@media (max-width: 720px) {
  table.predictions { font-size: 13px; }
  table.predictions th, table.predictions td { padding: 10px 8px; }
  table.predictions .col-date { width: 64px; padding-left: 10px; font-size: 12px; }
  table.predictions .col-verdict { width: 72px; padding-right: 10px; }
}

/* Verdict badges in table */
.vb {
  display: inline-block; padding: 4px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 900; letter-spacing: 0; white-space: nowrap;
}
.vb.hit { background: var(--green-bg); color: var(--green); border: 1px solid rgba(52, 199, 89, 0.3); }
.vb.partial { background: var(--yellow-bg); color: var(--yellow); border: 1px solid rgba(255, 214, 10, 0.3); }
.vb.miss { background: var(--red-bg); color: var(--red); border: 1px solid rgba(255, 59, 48, 0.3); }
.vb.pending { background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }
.vb.unverifiable { background: var(--bg); color: var(--text-dim); border: 1px solid var(--border); }

/* Filter chips */
.filter-chips {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px;
}
.filter-chips button {
  background: var(--bg-card); color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 8px 14px; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: all 0.15s;
  font-family: inherit;
}
.filter-chips button:hover { color: var(--text); border-color: var(--text-muted); }
.filter-chips button.active { background: var(--text); color: var(--bg); border-color: var(--text); }

/* Hide rows when filter is active and row doesn't match */
table.predictions tr.filtered-out { display: none; }

/* ===== Mobile: predictions table → vertical cards (≤600px) =====
   The 4-col table cramps content into ~80px columns on a 390px viewport.
   On mobile, reflow each row to a single column of stacked blocks. Pure CSS,
   no markup or JS change. The filter chips + load-more button continue to work
   the same way (rows are still tr elements, just rendered as blocks). */
@media (max-width: 600px) {
  table.predictions { display: block; border-radius: 8px; overflow: hidden; }
  table.predictions colgroup, table.predictions col,
  table.predictions thead { display: none; }
  table.predictions tbody, table.predictions tr { display: block; }
  table.predictions tr {
    padding: 14px 14px 12px;
    border-bottom: 1px solid var(--border);
    position: relative;
  }
  table.predictions tr:last-child { border-bottom: none; }
  table.predictions td {
    display: block; padding: 0; border: none;
    width: auto !important;
  }
  table.predictions td.col-date {
    font-size: 11px; color: var(--text-muted); letter-spacing: 0.5px;
    padding-left: 0; padding-right: 84px;  /* leave room for verdict badge */
    margin-bottom: 6px;
  }
  table.predictions td.col-date .yt {
    margin-top: 4px; margin-left: 8px; vertical-align: middle;
  }
  table.predictions td.col-prediction {
    font-size: 15px; font-weight: 700; line-height: 1.4;
    margin-bottom: 8px;
  }
  table.predictions td.col-prediction .pred-diff { margin-top: 4px; }
  table.predictions td.col-actual {
    font-size: 13px; line-height: 1.5; color: var(--text);
    padding: 8px 10px; background: var(--bg-card-hover);
    border-radius: 6px; margin-bottom: 0;
  }
  table.predictions td.col-actual::before {
    content: "结果："; font-weight: 700; color: var(--text-muted);
  }
  table.predictions td.col-verdict {
    position: absolute; top: 14px; right: 14px;
    padding: 0; white-space: nowrap;
  }
  /* Filter chips: tighter on mobile */
  .filter-chips button { padding: 6px 10px; font-size: 12px; min-height: 32px; }
  .filter-row { gap: 6px; }
  .filter-row .label { font-size: 12px; }
}

/* ===== Difficulty badges ===== */
.diff {
  display: inline-block; padding: 2px 6px; border-radius: 4px;
  font-size: 11px; font-weight: 900; letter-spacing: 0.5px; white-space: nowrap;
  margin-right: 6px; line-height: 1.3;
}
.diff.d1 { background: var(--bg); color: var(--text-dim); border: 1px solid var(--border); }
.diff.d2 { background: var(--bg); color: #854d0e; border: 1px solid rgba(255, 214, 10, 0.25); }
.diff.d3 { background: rgba(255, 100, 0, 0.10); color: #b94600; border: 1px solid rgba(255, 100, 0, 0.35); }
.diff.d4 { background: var(--red-bg); color: #b91c1c; border: 1px solid rgba(255, 59, 48, 0.45); }
/* d2/d3/d4 colors darkened from brand for WCAG AA contrast on their tinted bgs */
table.predictions .col-difficulty { white-space: nowrap; width: 100px; }
.fail-card .diff, .hit-card .diff, .pending-card .diff, .partial-card .diff { margin-bottom: 0; }
.partial-marker { background: var(--yellow-bg); color: #92400e; border: 1px solid rgba(180, 83, 9, 0.3); }
/* Category pills — small topic tag next to the difficulty badge on each card.
   Anchor variant links to /topics/<slug>.html; span variant is non-clickable
   (used for buckets below the page threshold, e.g. uncategorized). */
.cat-pill {
  display: inline-block; padding: 2px 6px; border-radius: 4px;
  font-size: 11px; font-weight: 700; white-space: nowrap;
  background: var(--bg); color: var(--text-dim);
  border: 1px solid var(--border); text-decoration: none;
  line-height: 1.3;
}
a.cat-pill:hover { color: var(--text); border-color: var(--text-dim); background: var(--surface); }
.fail-card .cat-pill, .hit-card .cat-pill, .pending-card .cat-pill, .partial-card .cat-pill { margin-bottom: 0; }

/* ===== Topic page hero (shown on /topics/<slug>.html in place of the
   logo-only banner used on the main page) ===== */
.topic-title { font-size: 32px; font-weight: 900; margin: 0 0 8px; }
.topic-title .topic-sub { font-size: 16px; font-weight: 500; color: var(--text-dim); }
.topic-hero-stats { font-size: 14px; color: var(--text-dim); display: flex; flex-wrap: wrap; gap: 6px 12px; }
.topic-hero-stats b { color: var(--text); font-weight: 800; }
.topic-hero-stats .hit b { color: var(--green); }
.topic-hero-stats .fail b { color: var(--red); }
@media (max-width: 720px) {
  .topic-title { font-size: 24px; }
  .topic-title .topic-sub { font-size: 13px; display: block; margin-top: 2px; }
}

/* ===== Topics index page — small tiles grid listing every topic page ===== */
.topic-tile {
  display: block; padding: 16px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--border);
  text-decoration: none; color: var(--text);
  transition: border-color 0.15s, transform 0.15s;
}
.topic-tile:hover { border-color: var(--text-dim); transform: translateY(-2px); }
.topic-tile .tt-name { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.topic-tile .tt-count { font-size: 12px; color: var(--text-dim); }
.topic-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.fail-card .card-head, .hit-card .card-head, .pending-card .card-head, .partial-card .card-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.fail-card .card-head .meta, .hit-card .card-head .meta, .pending-card .card-head .meta, .partial-card .card-head .meta { margin-bottom: 0; }

/* ===== Card footer row (源视频 left, 查看完整 right) ===== */
.card-foot {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-top: 12px;
}
.card-foot .src-link { margin-right: auto; }
.card-foot .card-more { margin-left: 0; }

.src-link {
  display: inline-block;
  font-size: 12px; font-weight: 700;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px dotted var(--text-dim);
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}
.src-link:hover { color: var(--text); border-bottom-color: var(--text); }
.src-link:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; border-radius: 2px; }

/* Two-row filter chips (verdict + difficulty) */
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.filter-row .label {
  font-size: 11px; color: var(--text-dim);
  letter-spacing: 1px; text-transform: uppercase; font-weight: 700;
  min-width: 40px;
}

/* ===== FOOTER ===== */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  margin-top: 60px;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
}
footer a { color: var(--text-muted); text-decoration: underline; }
footer a:hover { color: var(--text); }
