/* ============================================
   HUNTERSPEDIA - Style System
   Clean, minimal dark theme with gold accents
   ============================================ */

:root {
  --bg-deep: #0a0c10;
  --bg: #0f1115;
  --bg-surface: #161a22;
  --bg-elevated: #1c2029;
  --bg-hover: #222733;

  --text: #e4e8f0;
  --text-secondary: #9aa3b8;
  --text-muted: #6b7489;

  --gold: #d4a843;
  --gold-light: #e8c36a;
  --gold-dim: #9a7a2e;

  --blue: #6aaddb;
  --blue-dim: #3d7aa8;

  --confirmed: #4ade80;
  --reported: #facc15;
  --interpretive: #a78bfa;
  --unsourced: #f87171;

  --border: #252a36;
  --border-light: #2f3545;

  --max-width: 820px;
  --nav-height: 56px;

  --font-body: 'Karla', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.72;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}


/* ---- Navigation ---- */
#nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 17, 21, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--gold);
  transition: letter-spacing 0.3s var(--ease), text-shadow 0.3s var(--ease);
}
.logo:hover {
  letter-spacing: 0.04em;
  text-shadow: 0 0 12px rgba(212, 168, 67, 0.25);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px 8px;
}

.nav-links {
  display: flex;
  gap: 2px;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 4px;
  transition: all 0.2s var(--ease);
}

.nav-links a:hover {
  color: var(--text);
  background: var(--bg-hover);
}

.nav-links a.active {
  color: var(--gold);
}

/* ---- Main Content ---- */
#app {
  flex: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px 80px;
  width: 100%;
}

/* Widen for homepage bento layout */
#app:has(.bento-grid) {
  max-width: 1100px;
}

/* ---- Bento Grid Layout ---- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: auto;
  gap: 14px;
  grid-template-areas:
    "facts    facts    spotlight spotlight"
    "sw       st       sc        sp"
    "theories theories theories  theories"
    "quiz     quiz     explore   explore"
    "path     timeline timeline  timeline"
    "path     chart    chart     chart"
    "accolades accolades accolades accolades";
  margin-bottom: 32px;
}

.bento-cell {
  border-radius: 14px;
  overflow: hidden;
}

/* Grid area assignments */
.bento-facts     { grid-area: facts; }
.bento-spotlight { grid-area: spotlight; }
.bento-theories  { grid-area: theories; }
.bento-quiz      { grid-area: quiz; }
.bento-explore   { grid-area: explore; }
.bento-path      { grid-area: path; }
.bento-timeline  { grid-area: timeline; }
.bento-chart     { grid-area: chart; }
.bento-accolades { grid-area: accolades; }
.bento-stat-words    { grid-area: sw; }
.bento-stat-time     { grid-area: st; }
.bento-stat-count    { grid-area: sc; }
.bento-stat-progress { grid-area: sp; }

/* Stat cells — compact bento boxes */
.bento-stat {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: border-color 0.2s var(--ease);
}

.bento-stat:hover {
  border-color: var(--gold-dim);
}

.bento-stat .stat-value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--gold);
  line-height: 1.1;
}

.bento-stat .stat-label {
  font-size: 0.62rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.bento-stat .tracker-bar {
  width: 60%;
  max-width: 80px;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 6px;
}

.bento-stat .tracker-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 2px;
  transition: width 0.4s ease;
}

/* Override widget margin-bottom inside bento (grid gap handles it) */
.bento-grid .widget,
.bento-grid .featured-sequel,
.bento-grid .quiz-banner,
.bento-grid .explore-section,
.bento-grid .accolades-bar {
  margin-bottom: 0;
}

/* Bento cells fill their grid area */
.bento-grid .widget-facts {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0;
}

.bento-grid .widget-reading-path {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.bento-grid .widget-timeline,
.bento-grid .widget-chart {
  margin: 0;
}

/* Timeline scrolls vertically in its bento cell */
.bento-grid .timeline {
  flex-direction: column;
  overflow-x: visible;
  overflow-y: auto;
  max-height: 280px;
  -webkit-mask-image: none;
  mask-image: none;
}

.bento-grid .timeline-item {
  border-left: 2px solid var(--border);
  min-width: unset;
  padding: 8px 14px;
}

/* Explore grid inside bento — 2x2 */
.bento-grid .explore-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.bento-grid .explore-card {
  aspect-ratio: unset;
  padding: 20px 12px;
}

/* Spotlight inside bento */
.bento-spotlight:empty {
  display: none;
}

.bento-spotlight .spotlight-widget {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-bottom: 0;
}

/* Quiz stretches to fill bento cell */
.bento-quiz.quiz-banner {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.bento-quiz .quiz-banner-inner {
  flex-direction: column;
  align-items: flex-start;
}

/* Explore fills its bento cell */
.bento-explore.explore-section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

/* Bento entrance animations — varied per cell type */
.bento-grid .bento-cell {
  opacity: 0;
  animation-fill-mode: both;
}
.bento-facts { animation: slideInLeft 0.38s ease 0.05s both; }
.bento-spotlight { animation: fadeInUp 0.42s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both; }
.bento-stat-words { animation: scaleIn 0.3s ease 0.14s both; }
.bento-stat-time { animation: scaleIn 0.3s ease 0.18s both; }
.bento-stat-count { animation: scaleIn 0.3s ease 0.22s both; }
.bento-stat-progress { animation: scaleIn 0.3s ease 0.26s both; }
.bento-theories { animation: fadeIn 0.5s ease 0.2s both; }
.bento-quiz { animation: slideInRight 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.28s both; }
.bento-explore { animation: fadeInUp 0.35s ease 0.24s both; }
.bento-path { animation: slideInLeft 0.4s ease 0.32s both; }
.bento-timeline { animation: fadeIn 0.45s ease 0.36s both; }
.bento-chart { animation: fadeInUp 0.38s ease 0.34s both; }
.bento-accolades { animation: slideInRight 0.35s ease 0.4s both; }

/* ---- Bento Responsive ---- */
@media (max-width: 900px) {
  #app:has(.bento-grid) {
    max-width: var(--max-width);
  }

  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-areas:
      "facts      facts"
      "spotlight   spotlight"
      "sw          st"
      "sc          sp"
      "theories    theories"
      "quiz        quiz"
      "explore     explore"
      "path        path"
      "timeline    timeline"
      "chart       chart"
      "accolades   accolades";
  }

  .bento-grid .timeline {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: visible;
    max-height: none;
  }

  .bento-grid .timeline-item {
    min-width: 140px;
  }

  .bento-grid .explore-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .bento-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    grid-template-areas:
      "facts      facts"
      "spotlight   spotlight"
      "sw          st"
      "sc          sp"
      "theories    theories"
      "quiz        quiz"
      "explore     explore"
      "path        path"
      "timeline    timeline"
      "chart       chart"
      "accolades   accolades";
  }
}

/* ---- Hero ---- */
.hero {
  text-align: center;
  padding: 48px 0 36px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 300px;
  background: radial-gradient(ellipse at center, rgba(212, 168, 67, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 14px;
  position: relative;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 1.4rem + 2vw, 2.8rem);
  color: var(--gold);
  margin-bottom: 14px;
  position: relative;
  text-shadow: 0 0 40px rgba(212, 168, 67, 0.15);
}

.hero-sub {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.6;
  position: relative;
}

.hero-count {
  font-size: 0.85rem;
  color: var(--gold);
  margin-top: 16px;
  font-weight: 500;
  position: relative;
}

/* ---- Home: Search ---- */
.search-container {
  margin-bottom: 20px;
}

.search-input {
  width: 100%;
  padding: 13px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: all 0.25s var(--ease);
}

.search-input:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--bg-elevated);
  box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.08);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-results {
  margin-bottom: 32px;
}

.search-result-link {
  display: block;
  margin-bottom: 8px;
}

.no-results {
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 16px;
  text-align: center;
}

/* ---- Homepage Widgets ---- */
.widget {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 24px;
  margin-bottom: 20px;
}

.widget-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-dim);
  margin-bottom: 10px;
}

/* Did You Know */
.widget-facts {
  height: 180px;
  display: flex;
  flex-direction: column;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  padding: 28px 28px;
  text-align: center;
  background: linear-gradient(135deg, var(--bg-surface) 0%, rgba(212, 168, 67, 0.04) 100%);
}

.fact-display {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.65;
  flex: 1;
  text-align: center;
  transition: opacity 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 4.5em;
  padding: 12px 16px;
  text-wrap: balance;
}

.fact-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

.fact-counter {
  font-size: 0.7rem;
  color: var(--text-muted);
  min-width: 40px;
  text-align: center;
}

.fact-arrow {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.65rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, border-color 0.2s;
  flex-shrink: 0;
}

.fact-arrow:hover {
  color: var(--gold);
  border-color: var(--gold-dim);
}


/* Sequel Countdown Banner */
.sequel-banner {
  text-align: center;
  padding: 20px 16px 16px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg) 100%);
}

.sequel-banner-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 420px;
  margin: 0 auto 14px;
}

.sequel-banner-headline {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--gold);
  margin-bottom: 4px;
}

.sequel-banner-countdown {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 2px;
  margin-bottom: 12px;
}

.sq-unit {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  min-width: 44px;
}

.sq-num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--text);
  line-height: 1;
}

.sq-lbl {
  font-size: 0.58rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 3px;
}

.sq-sep {
  font-size: 1rem;
  color: var(--border-light);
  margin: 0 1px;
  align-self: flex-start;
  line-height: 1;
}

.sequel-banner-link {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--gold);
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.sequel-banner-link:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Accolades Panel */
.accolades-bar {
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.accolades-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--bg-surface);
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.accolades-toggle:hover {
  background: var(--bg-elevated);
}

.accolades-summary {
  font-size: 0.78rem;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.accolades-cta {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  margin-left: 12px;
}

.accolades-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;
}

.accolades-panel.open {
  max-height: 600px;
  padding: 12px 16px 16px;
}

.accolades-group {
  margin-bottom: 10px;
}

.accolades-group-heading {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 4px;
}

.accolades-item {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.7;
  padding-left: 10px;
  position: relative;
}

.accolades-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold-dim);
}

/* accolades mobile — handled in main responsive block below */

/* Viewership Chart */
.widget-chart {
  margin-bottom: 12px;
}

.chart-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
  font-weight: 500;
}

/* Cumulative viewership chart */
.cumulative-chart {
  margin: 12px 0 6px;
  min-height: 180px; /* prevent total collapse on mobile */
}

.view-chart-svg {
  width: 100%;
  height: auto;
  display: block;
  max-height: 380px; /* cap on very wide screens */
}

.view-chart-svg .vc-label {
  font-size: 9.5px;
  fill: var(--text-muted);
  font-family: var(--font-body);
}

.view-chart-svg .vc-end-label {
  font-size: 9px;
  font-weight: 600;
  font-family: var(--font-body);
}

.chart-legend {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

.chart-legend-item {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.chart-legend-dot {
  width: 8px;
  height: 3px;
  border-radius: 2px;
  display: inline-block;
}

.chart-note {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 10px;
  font-style: italic;
}

/* Timeline */
.widget-timeline {
  margin-bottom: 28px;
  padding: 28px 24px;
}

.timeline {
  display: flex;
  overflow-x: auto;
  gap: 0;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  -webkit-mask-image: linear-gradient(to right, transparent, black 0%, black 92%, transparent);
  mask-image: linear-gradient(to right, transparent, black 0%, black 92%, transparent);
}

.timeline-item {
  flex: 0 0 auto;
  padding: 12px 18px;
  border-left: 2px solid var(--border);
  min-width: 150px;
  transition: background 0.2s var(--ease);
}

.timeline-item:hover {
  background: rgba(212, 168, 67, 0.03);
  border-left-color: var(--gold-dim);
  padding-left: 18px;
}

.timeline-item:first-child {
  border-left: 2px solid var(--gold);
}

.timeline-item.highlight {
  border-left-color: var(--gold);
  background: rgba(212, 168, 67, 0.03);
}

.timeline-date {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.timeline-item.highlight .timeline-date {
  color: var(--gold);
}

.timeline-event {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.timeline-item.highlight .timeline-event {
  color: var(--text);
  font-weight: 500;
}

/* (Countdown removed) */

/* chart mobile — handled in main responsive block below */

/* ---- Home: Browse List (flat) ---- */
.browse-header {
  margin-bottom: 12px;
  margin-top: 8px;
}

.browse-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.browse-card {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 2px 12px;
  padding: 14px 16px;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s var(--ease);
  position: relative;
}

.browse-card:hover {
  background: var(--bg-surface);
  padding-left: 20px;
}

.browse-title {
  grid-column: 1;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
  transition: color 0.15s var(--ease);
}

.browse-lead {
  grid-column: 1;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.browse-tag {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-elevated);
  padding: 3px 10px;
  border-radius: 3px;
  white-space: nowrap;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: all 0.15s var(--ease);
}

.browse-card:hover .browse-title {
  color: var(--gold);
}

.browse-card:hover .browse-tag {
  color: var(--text-secondary);
  background: var(--bg-hover);
}

/* Section-colored tags on hover */
.browse-card.color-characters:hover .browse-tag { color: #a78bfa; }
.browse-card.color-lore:hover .browse-tag { color: #06b6d4; }
.browse-card.color-music:hover .browse-tag { color: #ec4899; }
.browse-card.color-film:hover .browse-tag { color: #f59e0b; }
.browse-card.color-sequel:hover .browse-tag { color: var(--gold); }

/* ---- Section Page ---- */
.section-header {
  margin-bottom: 32px;
}

.section-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  margin-bottom: 4px;
}

.section-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 560px;
  line-height: 1.6;
}

/* ---- Article List ---- */
.article-list {
  margin-top: 16px;
}

.article-link {
  display: block;
  padding: 16px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s var(--ease);
}

.article-link:hover {
  border-color: var(--gold-dim);
  background: var(--bg-elevated);
  transform: translateX(3px);
}

.al-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.al-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.al-word-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 400;
}

/* ---- Breadcrumb ---- */
.article-breadcrumb {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.article-breadcrumb a {
  color: var(--gold-dim);
  text-decoration: none;
}

.article-breadcrumb a:hover {
  color: var(--gold);
}

/* ---- Article Content ---- */
.article-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: none;
  position: relative;
}
.article-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 38%;
  height: 1px;
  background: linear-gradient(90deg, var(--gold-dim), transparent);
}

.article-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  line-height: 1.2;
  color: var(--text);
}

.article-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.article-body {
  font-size: 1rem;
  line-height: 1.78;
  color: var(--text);
}

/* Pull-quotes — used selectively in feature articles */
.pull-quote {
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.5;
  color: var(--gold-light);
  border-left: 2px solid var(--gold-dim);
  padding: 4px 0 4px 20px;
  margin: 28px 0 28px 8px;
  max-width: 85%;
  font-style: italic;
}

/* Table of Contents */
.table-of-contents {
  margin-bottom: 28px;
  padding: 16px 20px;
  background: var(--bg-surface);
  border-radius: 6px;
  border-left: 3px solid var(--gold-dim);
}

.toc-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gold-dim);
  margin-bottom: 10px;
}

.toc-list {
  list-style: none;
  padding-left: 0;
}

.toc-list li {
  margin-bottom: 6px;
}

.toc-link {
  color: var(--gold-dim);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s var(--ease);
}

.toc-link:hover {
  color: var(--gold-light);
}

.toc-toggle {
  cursor: pointer;
  user-select: none;
  transition: color 0.2s var(--ease);
}

.toc-toggle:hover {
  color: var(--gold-light);
}

.toc-list {
  max-height: 500px;
  overflow: hidden;
  transition: max-height 0.3s var(--ease), opacity 0.3s var(--ease);
  opacity: 1;
}

.toc-list.collapsed {
  max-height: 0;
  opacity: 0;
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--text);
  margin-top: 40px;
  margin-bottom: 14px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  scroll-margin-top: calc(var(--nav-height) + 20px);
}

.article-body h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.article-body h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text);
  margin-top: 28px;
  margin-bottom: 10px;
}

.article-body p {
  margin-bottom: 16px;
}

.article-body a {
  color: var(--blue);
  text-decoration: none;
  border-bottom: 1px solid rgba(106, 173, 219, 0.3);
}

.article-body a:hover {
  border-bottom-color: var(--blue);
}

/* Trust taxonomy markers */
.claim-confirmed {
  color: var(--confirmed);
  font-size: 0.8rem;
  font-weight: 600;
}

.claim-reported {
  color: var(--reported);
  font-size: 0.8rem;
  font-weight: 600;
}

.claim-interpretive {
  color: var(--interpretive);
  font-size: 0.8rem;
  font-weight: 600;
}

.claim-unsourced {
  color: var(--unsourced);
  font-size: 0.8rem;
  font-weight: 600;
}

/* Tables */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.9rem;
}

.article-body th {
  text-align: left;
  padding: 10px 14px;
  background: var(--bg-surface);
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--border-light);
}

.article-body td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.5;
}

.article-body tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Lists */
.article-body ul {
  padding-left: 24px;
  margin-bottom: 16px;
}

.article-body ul li {
  margin-bottom: 6px;
  list-style: disc;
}

.article-body ul li::marker {
  color: var(--gold-dim);
}

/* Sources */
/* Sources toggle */
.sources-toggle {
  display: inline-block;
  margin-top: 32px;
  padding: 6px 14px;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.sources-toggle:hover {
  color: var(--text-secondary);
  border-color: var(--text-muted);
}

/* Hide inline citation numbers by default */
.inline-cite {
  font-size: 0.75rem;
  color: var(--gold-dim);
  font-style: normal;
  display: none;
}
.article-body.show-sources .inline-cite {
  display: inline;
}

/* Hide sources block by default */
.sources-block {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 2px solid var(--border);
  display: none;
}
.article-body.show-sources .sources-block {
  display: block;
}

.sources-block h2 {
  border-top: none !important;
  padding-top: 0 !important;
  margin-top: 0 !important;
}

.source-item {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
  padding-left: 20px;
  position: relative;
  line-height: 1.5;
  word-break: break-word;
}

.source-item::before {
  content: attr(data-num);
  position: absolute;
  left: 0;
  color: var(--gold-dim);
  font-weight: 600;
  font-size: 0.78rem;
}

.source-item a {
  color: var(--blue-dim);
  text-decoration: none;
}

.source-item a:hover {
  color: var(--blue);
}

.source-type {
  display: inline-block;
  font-size: 0.72rem;
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  margin-left: 4px;
  vertical-align: middle;
}

/* ---- Article Nav (prev/next) ---- */
.article-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.article-nav-link {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.article-nav-link:hover {
  color: var(--gold);
}

.article-nav-link.next {
  text-align: right;
}

/* ---- About ---- */
.about-section {
  margin-bottom: 40px;
}

.about-section h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--gold);
  margin-bottom: 12px;
}

.about-section p {
  margin-bottom: 12px;
  color: var(--text-secondary);
  line-height: 1.72;
}

.trust-table {
  width: 100%;
  margin: 16px 0;
  border-collapse: collapse;
}

.trust-table th, .trust-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.trust-table th {
  background: var(--bg-surface);
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---- 404 ---- */
.page-404 {
  text-align: center;
  padding: 80px 20px;
}

.page-404 h2 {
  font-family: var(--font-display);
  margin-bottom: 12px;
}

.page-404 p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.page-404 a {
  color: var(--gold);
  text-decoration: none;
}

/* ---- Which Hunter Are You? Quiz ---- */

.quiz-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.quiz-header h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--gold);
  margin: 0.3rem 0;
}

.quiz-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0.25rem 0 1.5rem;
}

.quiz-progress {
  height: 4px;
  background: var(--bg-surface);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.3rem;
}

.quiz-progress-bar {
  height: 100%;
  background: var(--gold);
  border-radius: 2px;
  transition: width 0.4s ease;
}

.quiz-progress-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.quiz-q-text {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: var(--text);
  line-height: 1.4;
  margin: 0 0 1.5rem;
}

.quiz-answers {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.quiz-answer {
  display: block;
  width: 100%;
  text-align: left;
  padding: 1rem 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--bg-elevated);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.45;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.quiz-answer:hover {
  background: var(--bg-elevated);
  border-color: var(--gold-dim);
  transform: translateX(4px);
}

.quiz-answer.selected {
  background: var(--bg-elevated);
  border-color: var(--gold);
  color: var(--gold-light);
}

/* Quiz result page */
.quiz-result {
  text-align: center;
  padding: 1rem 0;
}

.quiz-result-emoji {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
}

.quiz-result-name {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  margin: 0 0 0.4rem;
}

.quiz-result-tagline {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-style: italic;
  margin: 0 0 1.5rem;
}

.quiz-result-desc {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.6;
  max-width: 540px;
  margin: 0 auto 1.5rem;
  text-align: left;
}

.quiz-result-traits {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.quiz-trait {
  padding: 0.3rem 0.75rem;
  border: 1px solid;
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.quiz-result-weapon {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.quiz-weapon-label {
  font-weight: 600;
  color: var(--text-secondary);
}

.quiz-scores {
  text-align: left;
  margin: 2rem 0;
}

.quiz-scores h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--text);
  margin: 0 0 1rem;
}

.quiz-score-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.quiz-score-row.winner {
  font-weight: 600;
}

.quiz-score-name {
  width: 80px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.quiz-score-bar-track {
  flex: 1;
  height: 8px;
  background: var(--bg-surface);
  border-radius: 4px;
  overflow: hidden;
}

.quiz-score-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}

.quiz-score-pct {
  width: 36px;
  text-align: right;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.quiz-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.quiz-retake {
  padding: 0.65rem 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--bg-elevated);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.quiz-retake:hover {
  background: var(--bg-elevated);
  border-color: var(--gold-dim);
}

.quiz-read-more {
  padding: 0.65rem 1.5rem;
  background: var(--gold-dim);
  border: none;
  border-radius: 8px;
  color: var(--bg-deep);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}

.quiz-read-more:hover {
  background: var(--gold);
}

/* Placeholder notice */
.placeholder-notice {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* Back to top button */
#backToTopBtn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 8px 12px;
  background: rgba(10, 12, 16, 0.7);
  color: var(--gold);
  border: none;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  z-index: 90;
  backdrop-filter: blur(4px);
}

#backToTopBtn:hover {
  background: rgba(10, 12, 16, 0.9);
  color: var(--gold-light);
}

/* Reading progress bar */
#readingProgressBar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: var(--gold);
  z-index: 110;
  width: 0%;
  transition: width 0.1s linear;
}

/* ---- Footer ---- */
#footer {
  background: var(--bg-deep);
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.footer-disclaimer {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 560px;
  margin: 0 auto 12px;
}

.footer-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-meta a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-meta a:hover {
  color: var(--gold);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    padding: 8px;
    flex-direction: column;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 10px 14px;
  }

  #app {
    padding: 28px 16px 60px;
  }

  .hero {
    padding: 24px 0 20px;
    margin-bottom: 18px;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero-sub {
    font-size: 0.9rem;
  }

  .sequel-banner {
    padding: 16px 14px 14px;
  }

  .sequel-banner-headline {
    font-size: 1rem;
  }

  .sq-num {
    font-size: 1.3rem;
  }

  .sq-unit {
    min-width: 36px;
  }

  .browse-card {
    padding: 10px 12px;
  }

  .browse-tag {
    font-size: 0.6rem;
    padding: 2px 6px;
  }

  .widget {
    padding: 14px 14px;
  }

  .article-header h1,
  .section-header h1 {
    font-size: 1.6rem;
  }

  .article-nav {
    flex-direction: column;
  }

  .article-nav-link.next {
    text-align: left;
  }

  .article-body table {
    font-size: 0.8rem;
  }

  .article-body th, .article-body td {
    padding: 8px 10px;
  }

  .table-of-contents {
    margin-left: -16px;
    margin-right: -16px;
    margin-bottom: 28px;
    border-radius: 0;
    padding: 12px 16px;
  }

  .accolades-panel {
    grid-template-columns: 1fr;
  }

  .accolades-summary {
    font-size: 0.7rem;
  }

  .cumulative-chart {
    min-height: 150px;
    margin: 8px -4px 4px; /* slight negative margin to use full card width */
  }

  .view-chart-svg .vc-label {
    font-size: 8.5px;
  }

  .view-chart-svg .vc-end-label {
    font-size: 8px;
  }

  .chart-legend {
    gap: 10px;
  }

  .chart-legend-item {
    font-size: 0.65rem;
  }

  .timeline-item {
    min-width: 120px;
    padding: 8px 12px;
  }

  #backToTopBtn {
    bottom: 16px;
    right: 16px;
    padding: 6px 10px;
    font-size: 0.75rem;
  }

  /* Hide Honmoon patterns on small screens */
  body::before,
  body::after {
    display: none;
  }
}

/* ---- Print Styles ---- */
@media print {
  #nav, #footer, #backToTopBtn, #readingProgressBar,
  .search-container, .table-of-contents, .article-nav {
    display: none !important;
  }

  body {
    background: white;
    color: #111;
    font-size: 11pt;
    line-height: 1.6;
  }

  #app {
    max-width: 100%;
    padding: 0;
    margin: 0;
  }

  .article-header {
    border-bottom: 1px solid #ccc;
  }

  .article-header h1 {
    color: #111;
    font-size: 22pt;
  }

  .article-body h2 {
    color: #222;
    border-top-color: #ddd;
    page-break-after: avoid;
  }

  .article-body h3 {
    color: #333;
    page-break-after: avoid;
  }

  .article-body p {
    orphans: 3;
    widows: 3;
  }

  .article-body a {
    color: #111;
    text-decoration: underline;
  }

  .article-body a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }

  .sources-block {
    border-top: 1px solid #ccc;
  }

  .source-item a[href]::after {
    content: none;
  }

  .article-body table {
    border: 1px solid #ccc;
  }

  .article-body th {
    background: #f0f0f0;
    color: #111;
  }

  .article-body td {
    border-bottom-color: #ddd;
  }

  .claim-confirmed { color: #16a34a; }
  .claim-reported { color: #ca8a04; }
  .claim-interpretive { color: #7c3aed; }
  .claim-unsourced { color: #dc2626; }
}

/* Article type tags */
.article-type-tag {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold-dim);
  border: 1px solid var(--gold-dim);
  border-radius: 3px;
  padding: 2px 8px;
  vertical-align: middle;
}

.article-type-tag.small {
  font-size: 0.6rem;
  padding: 1px 6px;
  opacity: 0.7;
}

/* ---- New Homepage: Featured Sequel Section ---- */
.featured-sequel {
  background: linear-gradient(135deg, rgba(212, 168, 67, 0.08) 0%, rgba(167, 139, 250, 0.05) 50%, rgba(212, 168, 67, 0.04) 100%);
  border: 1px solid rgba(212, 168, 67, 0.2);
  border-radius: 14px;
  padding: 40px 32px 36px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}

.featured-sequel::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 20%, rgba(212, 168, 67, 0.06) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 80%, rgba(167, 139, 250, 0.04) 0%, transparent 50%);
  pointer-events: none;
}

.featured-header {
  margin-bottom: 24px;
  text-align: center;
  position: relative;
}

.featured-headline {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 6px;
  font-weight: 600;
}

.featured-subhead {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.theory-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.theory-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 14px;
  background: linear-gradient(180deg, rgba(212, 168, 67, 0.06) 0%, var(--bg-surface) 100%);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.3;
  transition: all 0.25s var(--ease);
  min-height: 110px;
  aspect-ratio: 1 / 0.85;
  position: relative;
  overflow: hidden;
}

.theory-card::before {
  display: none;
}

.theory-card:hover {
  background: linear-gradient(180deg, rgba(212, 168, 67, 0.12) 0%, var(--bg-elevated) 100%);
  border-color: var(--gold-dim);
  color: var(--text);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(212, 168, 67, 0.08);
}

.theory-card:hover::before {
  display: none;
}

.theory-tag {
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 6px;
  display: block;
  line-height: 1;
  transition: color 0.2s var(--ease);
}

.theory-card:hover .theory-tag {
  color: var(--gold);
}

.theory-title {
  font-family: var(--font-body);
}

.sequel-countdown-embed {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 2px;
  margin-bottom: 6px;
  min-height: 60px;
}

.countdown-caveat {
  text-align: center;
  font-size: 0.62rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  font-style: italic;
  letter-spacing: 0.01em;
  line-height: 1.4;
}

.featured-cta {
  display: inline-block;
  text-align: center;
  font-size: 0.85rem;
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.25s var(--ease);
  padding: 8px 20px;
  border: 1px solid var(--gold-dim);
  border-radius: 6px;
  background: rgba(212, 168, 67, 0.06);
  position: relative;
  /* center the button */
  margin: 0 auto;
  width: fit-content;
}

.featured-sequel .featured-cta {
  display: block;
  width: fit-content;
  margin: 0 auto;
}

.featured-cta:hover {
  color: var(--bg);
  background: var(--gold);
  border-color: var(--gold);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212, 168, 67, 0.2);
}

/* ---- New Homepage: Quick Explore Grid ---- */
.explore-section {
  margin-bottom: 28px;
}

.section-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-dim);
  margin-bottom: 14px;
}

.explore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 0;
}

.explore-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  text-align: left;
  padding: 24px 18px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.25s var(--ease);
  position: relative;
  aspect-ratio: 1 / 0.9;
}

.explore-card.color-characters {
  border-left: 2px solid #a78bfa;
}

.explore-card.color-lore {
  border-left: 2px solid #06b6d4;
}

.explore-card.color-music {
  border-left: 2px solid #ec4899;
}

.explore-card.color-film {
  border-left: 2px solid #f59e0b;
}

.explore-card.color-sequel {
  border-left: 2px solid var(--gold);
}

.explore-card:hover {
  background: var(--bg-elevated);
  transform: translateX(3px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.explore-card.color-characters:hover { border-left-color: #c4b5fd; }
.explore-card.color-lore:hover { border-left-color: #22d3ee; }
.explore-card.color-music:hover { border-left-color: #f472b6; }
.explore-card.color-film:hover { border-left-color: #fbbf24; }

/* explore-icon removed — cards use text-only labels now */

.explore-name {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}

.explore-count {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* ---- Browse Cards with Color Accents ---- */
.browse-card {
  border-left: 3px solid var(--border);
}

.browse-card.color-characters {
  border-left-color: #a78bfa;
}

.browse-card.color-lore {
  border-left-color: #06b6d4;
}

.browse-card.color-music {
  border-left-color: #ec4899;
}

.browse-card.color-film {
  border-left-color: #f59e0b;
}

.browse-card.color-sequel {
  border-left-color: var(--gold);
}

.browse-card.color-home {
  border-left-color: var(--gold-dim);
}

.browse-card.color-about {
  border-left-color: var(--text-muted);
}

/* ---- Quiz CTA Banner ---- */
.quiz-banner {
  background: linear-gradient(135deg, rgba(212, 168, 67, 0.08) 0%, rgba(106, 173, 219, 0.06) 50%, rgba(167, 139, 250, 0.05) 100%);
  border: 1px solid rgba(212, 168, 67, 0.18);
  border-radius: 14px;
  padding: 36px 32px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}

.quiz-banner::before {
  content: '?';
  position: absolute;
  right: -10px;
  top: -20px;
  font-family: var(--font-display);
  font-size: 8rem;
  color: rgba(212, 168, 67, 0.04);
  pointer-events: none;
  line-height: 1;
}

.quiz-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.quiz-banner-text {
  flex: 1;
}

.quiz-banner-headline {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--gold);
  margin-bottom: 4px;
  font-weight: 600;
}

.quiz-banner-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.quiz-banner-link {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(212, 168, 67, 0.12);
  border: 1px solid var(--gold-dim);
  border-radius: 6px;
  color: var(--gold);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s var(--ease);
}

.quiz-banner-link:hover {
  background: rgba(212, 168, 67, 0.2);
  border-color: var(--gold);
  color: var(--gold-light);
}

/* ---- Responsive: New Homepage Sections ---- */
@media (max-width: 768px) {
  .featured-sequel {
    padding: 20px 18px;
    margin-bottom: 20px;
  }

  .featured-headline {
    font-size: 1.15rem;
  }

  .theory-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .theory-card {
    padding: 14px 10px;
    font-size: 0.75rem;
    min-height: 60px;
  }

  .sequel-countdown-embed {
    margin-bottom: 12px;
  }

  .explore-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .explore-card {
    padding: 18px 14px;
  }

  .explore-name {
    font-size: 0.88rem;
  }

  .explore-count {
    font-size: 0.65rem;
  }

  .quiz-banner {
    padding: 16px 18px;
  }

  .quiz-banner-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .quiz-banner-headline {
    font-size: 1rem;
  }

  .quiz-banner-desc {
    font-size: 0.8rem;
  }

  .quiz-banner-link {
    font-size: 0.8rem;
    padding: 6px 12px;
  }
}


/* ============================================
   ENGAGEMENT ADDITIONS
   ============================================ */

/* ---- Suggested Reading Path ---- */
.widget-reading-path {
  margin-bottom: 28px;
  border-color: rgba(212, 168, 67, 0.15);
  padding: 28px 24px;
}

.reading-path {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

/* Connecting line between steps */
.reading-path::before {
  content: '';
  position: absolute;
  left: 25px;
  top: 22px;
  bottom: 22px;
  width: 1px;
  background: linear-gradient(180deg, var(--gold-dim), var(--border));
  pointer-events: none;
}

.reading-step {
  display: grid;
  grid-template-columns: 32px 1fr;
  grid-template-rows: auto auto;
  gap: 0 14px;
  padding: 12px 14px;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s var(--ease);
  position: relative;
}

.reading-step:hover {
  background: rgba(212, 168, 67, 0.04);
  padding-left: 18px;
}

.step-num {
  grid-row: 1 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border-light);
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
  align-self: center;
  transition: all 0.2s var(--ease);
  position: relative;
  z-index: 1;
}

.reading-step:hover .step-num {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--bg);
  transform: scale(1.1);
}

.step-title {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
  transition: color 0.15s var(--ease);
}

.step-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.reading-step:hover .step-title {
  color: var(--gold);
}

/* ---- Related Articles (article bottom) ---- */
.related-articles {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.related-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-dim);
  margin-bottom: 12px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.related-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s var(--ease);
}

.related-card:hover {
  border-color: var(--gold-dim);
  background: var(--bg-elevated);
}

.related-title {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
}

.related-card:hover .related-title {
  color: var(--gold);
}

.related-section {
  font-size: 0.68rem;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .related-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- See Also Links ---- */
.see-also-link {
  color: var(--gold-dim) !important;
  text-decoration: none !important;
  border-bottom: 1px solid rgba(212, 168, 67, 0.25) !important;
  transition: color 0.2s, border-color 0.2s;
}

.see-also-link:hover {
  color: var(--gold) !important;
  border-bottom-color: var(--gold) !important;
}

/* ---- Quiz Share Button ---- */
.quiz-share {
  padding: 10px 20px;
  border-radius: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.quiz-share:hover {
  background: var(--gold);
  color: var(--bg);
}

/* ---- Random Article Button (Tier 2) ---- */
.random-article-btn {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 6px;
  transition: all 0.2s var(--ease);
  cursor: pointer;
  border: 1px solid transparent;
}

.random-article-btn:hover {
  color: var(--gold);
  background: rgba(212, 168, 67, 0.08);
  border-color: var(--border-light);
}

/* ---- Reading Progress Tracker (Tier 2) ---- */
.reading-tracker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 14px;
  padding: 6px 14px;
  background: rgba(212, 168, 67, 0.06);
  border: 1px solid var(--border);
  border-radius: 20px;
}

.tracker-bar {
  flex: 1;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  max-width: 100px;
}

.tracker-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 2px;
  transition: width 0.4s ease;
}

/* ---- TOC Scroll Spy Active State (Tier 2) ---- */
.toc-link.active {
  color: var(--gold);
  font-weight: 600;
}

/* ---- Encyclopedia Stats (Tier 2) ---- */
.encyclopedia-stats {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

.stat-item {
  text-align: center;
  min-width: 80px;
  padding: 10px 16px;
  background: rgba(212, 168, 67, 0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.2s var(--ease);
}

.stat-item:hover {
  border-color: var(--gold-dim);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--gold);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.62rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

/* ---- Keyboard Help Overlay (Tier 3) ---- */
.keyboard-help-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 12, 16, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.keyboard-help-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.keyboard-help-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 32px 36px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
  transform: translateY(8px);
  transition: transform 0.25s ease;
}

.keyboard-help-overlay.visible .keyboard-help-panel {
  transform: translateY(0);
}

.keyboard-help-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--gold);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.shortcut-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(37, 42, 54, 0.5);
}

.shortcut-row:last-child {
  border-bottom: none;
}

.shortcut-key {
  display: inline-block;
  padding: 3px 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-bottom: 2px solid var(--border-light);
  border-radius: 5px;
  font-size: 0.78rem;
  font-family: var(--font-body);
  color: var(--text);
  min-width: 32px;
  text-align: center;
}

.shortcut-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ---- Page Transition (Tier 3) ---- */
#app {
  transition: opacity 0.18s ease, transform 0.18s ease;
}

#app.transitioning {
  opacity: 0;
  transform: translateY(4px);
}

/* ---- Entrance animations for homepage sections ---- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-14px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(14px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Hero and search animate before bento grid */
.hero { animation: fadeInUp 0.4s ease both; }
.search-container { animation: fadeIn 0.35s ease 0.08s both; }
/* Bento cell animations are handled in the bento grid section above */

/* ---- Spotlight Article (Tier 3) ---- */
.spotlight-widget {
  background: linear-gradient(135deg, var(--bg-surface) 0%, rgba(212, 168, 67, 0.08) 100%);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 20px;
  text-decoration: none;
  display: block;
  transition: all 0.25s var(--ease);
  position: relative;
  overflow: hidden;
}

.spotlight-widget::after {
  content: '\2192';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%) translateX(-4px);
  font-size: 1.1rem;
  color: var(--gold-dim);
  opacity: 0;
  transition: all 0.25s var(--ease);
}

.spotlight-widget:hover {
  border-color: var(--border);
  transform: translateX(2px);
  box-shadow: 0 4px 16px rgba(212, 168, 67, 0.08);
}

.spotlight-widget:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.spotlight-eyebrow {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.spotlight-eyebrow::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: spotlightPulse 2s ease-in-out infinite;
}

@keyframes spotlightPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.spotlight-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: 6px;
  transition: color 0.2s var(--ease);
}

.spotlight-widget:hover .spotlight-title {
  color: var(--gold);
}

.spotlight-lead {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ---- Reading Streak (Tier 3) ---- */
.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(212, 168, 67, 0.1);
  border: 1px solid var(--gold-dim);
  border-radius: 20px;
  font-size: 0.72rem;
  color: var(--gold);
  font-weight: 500;
  margin-left: 8px;
}

/* ---- Konami code Easter egg: rainbow Honmoon flash ---- */
@keyframes honmoonShimmer {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}
.honmoon-rainbow {
  animation: honmoonShimmer 2s linear;
}
.honmoon-rainbow .logo {
  background: linear-gradient(90deg, #f87171, #facc15, #4ade80, #6aaddb, #a78bfa, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- 404 personality ---- */
.page-404 h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--gold-light);
  margin-bottom: 12px;
}
.page-404 p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 20px;
  max-width: 420px;
}
.page-404 a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid var(--gold-dim);
  padding-bottom: 1px;
  transition: border-color 0.2s var(--ease);
}
.page-404 a:hover {
  border-color: var(--gold);
}
