/* ==========================================================================
   The Watch Order — dark-only stylesheet
   Mobile-first. Single stylesheet used across every page on the site.
   Redesigned September 2026: dark-only, Inter font, cinema palette.
   ========================================================================== */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/inter-v20-latin-regular.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/inter-v20-latin-500.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/inter-v20-latin-600.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/inter-latin-700.woff") format("woff"); /* used for the logo wordmark */
}

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

:root {
  /* Surfaces — deep, near-true black. Cinema, not charcoal. */
  --page:      #0a0a0b;
  --sunken:    #141415;
  --sunken-2:  #1c1c1e;
  --line:      #222223;
  --line-2:    #33322f;

  /* Ink — warm off-white, like projected light rather than screen white. */
  --ink:       #f2efe9;
  --ink-2:     #a8a29a;
  --ink-3:     #837e77; /* was #74706a — 4.0:1 on --page, below AA; now 4.6:1 */

  /* Accent — a single warm amber, used only for things you can click. */
  --accent:      #e3b25c;
  --accent-soft: rgba(227, 178, 92, 0.12);

  /* Solids invert: off-white fill, black text. */
  --solid-bg:  #f2efe9;
  --solid-fg:  #0a0a0b;

  --radius-sm: 6px;
  --radius:    10px;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 112px;
  background: var(--page);
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

/* ==========================================================================
   Utility
   ========================================================================== */

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--solid-bg); color: var(--solid-fg);
  padding: 10px 16px; border-radius: 0 0 var(--radius-sm) 0; font-weight: 500;
}
.skip-link:focus { left: 0; }

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

/* ==========================================================================
   Sticky header
   ========================================================================== */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 10, 11, 0.82);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 700px; margin: 0 auto; padding: 0 20px;
  height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}

/* Logo: amber play mark + fading dots, then the wordmark (Inter Bold). */
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark { display: block; width: 29px; height: 19px; flex-shrink: 0; overflow: visible; }
.brand-name { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; white-space: nowrap; }

.header-actions { display: flex; align-items: center; gap: 2px; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--ink-2); cursor: pointer;
  transition: background-color 0.13s ease, color 0.13s ease;
}
.icon-btn:hover { background: var(--sunken-2); color: var(--ink); text-decoration: none; }
.icon-btn svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Header link version of icon-btn (for search link on non-homepage pages) */
a.icon-btn { text-decoration: none; }

/* ==========================================================================
   Shell
   ========================================================================== */

.page-wrap { max-width: 700px; margin: 0 auto; padding: 0 20px 72px; }

/* ==========================================================================
   Breadcrumb
   ========================================================================== */

.breadcrumb { margin: 24px 0 20px; }
.breadcrumb a {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500; color: var(--ink-3);
}
.breadcrumb a:hover { color: var(--ink); text-decoration: none; }
.breadcrumb svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ==========================================================================
   Page title / subtitle
   ========================================================================== */

.page-title {
  font-size: 28px; font-weight: 600; letter-spacing: -0.026em;
  line-height: 1.2; margin: 0 0 6px;
}

.page-subtitle {
  font-size: 15px; color: var(--ink-2); margin: 0 0 16px; max-width: 56ch;
}

.category-description {
  font-size: 15px; color: var(--ink-2); margin: 0 0 24px;
}

/* ==========================================================================
   Stat strip
   ========================================================================== */

.stat-strip {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.stat-strip-2 { grid-template-columns: repeat(2, 1fr); }
.stat { padding: 13px 8px 14px; text-align: center; }
.stat + .stat { border-left: 1px solid var(--line); }

/* Compact one-line stat summary — replaces .stat-strip on franchise pages. */
.stat-line {
  font-size: 13.5px; color: var(--ink-2); margin: 0 0 16px;
  font-variant-numeric: tabular-nums;
}
.stat-line strong { color: var(--ink); font-weight: 600; }
.stat-line .sep { margin: 0 7px; color: var(--ink-3); }
.stat-value {
  display: block; font-size: 16px; font-weight: 600; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.stat-label { display: block; font-size: 12px; color: var(--ink-3); margin-top: 2px; }

/* Legacy stats-bar (old .stat-card markup) — maps to new strip look */
.stats-bar { display: block; margin-bottom: 24px; }
.stat-card {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: transparent; border-radius: 0; padding: 0;
}
.stat-card .stat-value {
  display: block; font-size: 16px; font-weight: 600; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink);
  padding: 13px 8px 0; text-align: center;
}
.stat-card .stat-label {
  display: block; font-size: 12px; color: var(--ink-3); margin-top: 2px;
  text-transform: none; letter-spacing: normal; text-align: center;
  padding: 0 8px 14px;
}

/* ==========================================================================
   Filters
   ========================================================================== */

.filter-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 10px; }

/* Two filter rows in a row (Marvel/DC: content filter + Road-to filter) sit
   as one visual block, not two separately-spaced controls. */
.filter-row + .filter-row { margin-top: -3px; }

.filter-btn {
  font-family: inherit; font-size: 13px; font-weight: 500; line-height: 1;
  padding: 9px 15px; border-radius: 999px;
  border: 1px solid var(--line-2); background: transparent; color: var(--ink-2);
  cursor: pointer;
  transition: background-color 0.13s ease, color 0.13s ease, border-color 0.13s ease;
}
.filter-btn:hover { color: var(--ink); border-color: var(--ink-3); }
.filter-btn[aria-pressed="true"] {
  background: var(--solid-bg); border-color: var(--solid-bg); color: var(--solid-fg); font-weight: 600;
}

/* Legacy btn-shine — neutralised, maps to filter-btn appearance */
.btn-shine {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: inherit; font-size: 13px; font-weight: 500; line-height: 1;
  padding: 9px 15px; border-radius: 999px;
  border: 1px solid var(--line-2); background: transparent; color: var(--ink-2);
  cursor: pointer;
  transition: background-color 0.13s ease, color 0.13s ease, border-color 0.13s ease;
}
.btn-shine:hover { color: var(--ink); border-color: var(--ink-3); text-decoration: none; }
.btn-shine::before { display: none; }

.order-note {
  font-size: 13.5px; color: var(--ink-2); line-height: 1.55;
  background: var(--sunken); border-radius: var(--radius);
  padding: 12px 15px; margin: 0 0 28px;
}

.ad-slot { margin: 28px 0; }
.ad-slot:empty { display: none; }

/* ==========================================================================
   Section headers
   ========================================================================== */

.section-header {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--ink-3); margin: 32px 0 10px;
}
.section-header:first-of-type { margin-top: 0; }

/* ==========================================================================
   Entry list — rows on a spine
   ========================================================================== */

.entry-list { list-style: none; margin: 0; padding: 0; }

/* New row-based entries */
.entry-row {
  position: relative;
  display: flex; align-items: flex-start; gap: 11px;
  padding: 11px 4px 11px 6px;
  margin: 0 -4px 0 -6px;
  border-radius: var(--radius);
  transition: background-color 0.13s ease;
}

.entry-row::before {
  content: ""; position: absolute;
  left: 17px; top: 31px; bottom: -1px; width: 1px;
  background: var(--line-2);
}
.entry-row.is-last-visible::before { display: none; }
.entry-row:hover { background: var(--sunken); }
.entry-row.is-hidden { display: none; }

/* Legacy card-based entries — remap to the same look as rows.
   Old pages use .entry-card until the patch script converts them. */
.entry-card {
  position: relative;
  display: flex; align-items: flex-start; gap: 11px;
  padding: 11px 4px 11px 6px;
  margin: 0 -4px 0 -6px;
  border-radius: var(--radius);
  background: transparent;
  transition: background-color 0.13s ease;
}
.entry-card:hover { background: var(--sunken); }
.entry-card.is-hidden { display: none; }

.entry-number {
  position: relative; z-index: 1;
  flex-shrink: 0; width: 23px; text-align: center;
  font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--accent); padding-top: 3px;
  min-width: 23px;
}

.entry-body { flex: 1; min-width: 0; }

.entry-title {
  font-size: 15.5px; font-weight: 500; letter-spacing: -0.008em;
  margin: 0; line-height: 1.35; color: var(--ink);
}

.entry-detail {
  display: flex; align-items: center; flex-wrap: wrap; gap: 7px;
  font-size: 12.5px; color: var(--ink-3); margin: 5px 0 0;
  font-variant-numeric: tabular-nums;
}

.entry-detail > span:not(.entry-type) + span::before {
  content: "\00b7"; margin-right: 7px; color: var(--line-2);
}

.entry-type {
  font-size: 11px; font-weight: 500; color: var(--ink-2); line-height: 1;
  background: var(--sunken-2); border-radius: 4px; padding: 3px 6px; white-space: nowrap;
}

.entry-note {
  font-size: 13px; color: var(--ink-2); margin: 6px 0 0; line-height: 1.45;
}

/* Legacy .entry-side — visually flatten until patched */
.entry-side {
  flex-shrink: 0; display: flex; flex-direction: column-reverse;
  align-items: flex-end; gap: 8px; padding-top: 1px;
}

/* ==========================================================================
   Watchlist — per-entry bookmark toggle
   ========================================================================== */

.watchlist-toggle {
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; margin: -9px -9px 0 2px; padding: 0;
  border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--ink-3); cursor: pointer;
  transition: background-color 0.13s ease, color 0.13s ease;
  font-size: 0; /* hide any text like "Watchlist" / "Saved" inside */
  overflow: hidden;
}
.watchlist-toggle svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linejoin: round; }
.watchlist-toggle:hover { color: var(--ink); background: var(--sunken-2); }
.watchlist-toggle[aria-pressed="true"] { color: var(--accent); }
.watchlist-toggle[aria-pressed="true"] svg { fill: currentColor; }

/* Legacy text label inside the toggle — hide it */
.watchlist-toggle-label { position: absolute; left: -9999px; }

/* ==========================================================================
   Watchlist — homepage header button + panel
   ========================================================================== */

.watchlist-header-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: inherit; font-size: 13px; font-weight: 600;
  color: var(--solid-fg); background: var(--solid-bg);
  border: 1px solid var(--solid-bg); border-radius: 999px;
  padding: 8px 15px; cursor: pointer; white-space: nowrap; flex-shrink: 0;
  transition: opacity 0.13s ease;
}
.watchlist-header-btn:hover { opacity: 0.88; text-decoration: none; }

.watchlist-header-icon {
  width: 14px; height: 14px; fill: currentColor; stroke: none; flex-shrink: 0;
}

.watchlist-mini-btn {
  display: inline-flex; align-items: center; gap: 5px;
  height: 34px; padding: 0 11px;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: transparent; color: var(--ink);
  font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums;
  transition: background-color 0.13s ease, border-color 0.13s ease;
}
.watchlist-mini-btn:hover { border-color: var(--ink-3); background: var(--sunken-2); text-decoration: none; }
.watchlist-mini-btn svg { width: 13px; height: 13px; fill: var(--accent); stroke: none; flex-shrink: 0; }

.watchlist-panel {
  background: var(--sunken); border-radius: var(--radius);
  padding: 14px; margin-bottom: 24px;
}
.watchlist-panel[hidden] { display: none; }

.watchlist-panel-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px;
}
.watchlist-panel-title {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--ink-3);
}

.watchlist-panel-actions { display: inline-flex; align-items: center; gap: 6px; }

.watchlist-close-btn,
.watchlist-clear-btn {
  font-family: inherit; font-size: 12px; font-weight: 500;
  color: var(--ink-2); background: transparent;
  border: 1px solid var(--line-2); border-radius: 999px;
  cursor: pointer; padding: 5px 11px;
  transition: color 0.13s ease, border-color 0.13s ease;
}
.watchlist-close-btn:hover,
.watchlist-clear-btn:hover { color: var(--ink); border-color: var(--ink-3); }
.watchlist-clear-btn[hidden] { display: none; }

.watchlist-items { display: flex; flex-direction: column; gap: 6px; }

.watchlist-empty { font-size: 14px; color: var(--ink-3); margin: 0; padding: 6px 2px; }

.watchlist-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--sunken-2); border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.watchlist-item-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.watchlist-item-title { font-size: 14px; font-weight: 500; color: var(--ink); }
.watchlist-item-category { font-size: 12px; color: var(--ink-3); margin-top: 1px; }

.watchlist-item-actions { flex-shrink: 0; display: flex; align-items: center; gap: 6px; }

.watchlist-jump {
  font-size: 11px; font-weight: 500; padding: 5px 10px;
  border: 1px solid var(--line-2); border-radius: 999px;
  color: var(--ink-2); background: transparent;
  transition: color 0.13s ease, border-color 0.13s ease;
}
.watchlist-jump:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }

.watchlist-item-remove {
  flex-shrink: 0; font-family: inherit; font-size: 18px; line-height: 1;
  color: var(--ink-3); background: transparent;
  border: none; border-radius: var(--radius-sm);
  cursor: pointer; padding: 4px 8px;
  transition: color 0.13s ease;
}
.watchlist-item-remove:hover { color: var(--ink); }

/* ==========================================================================
   Filler guide
   ========================================================================== */

.filler-guide {
  margin-top: 28px; background: var(--sunken);
  border-radius: var(--radius); padding: 14px;
}
.filler-guide h2 {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.09em; color: var(--ink-3); margin: 0 0 8px;
}
.filler-guide p { font-size: 14px; color: var(--ink-2); line-height: 1.6; margin: 0 0 8px; }
.filler-guide p:last-child { margin-bottom: 0; }
.filler-ranges { font-size: 14px; color: var(--ink); line-height: 1.7; word-break: break-word; }

/* ==========================================================================
   FAQ
   ========================================================================== */

.faq-section { margin-top: 40px; }
.faq-title {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--ink-3); margin: 0 0 4px;
}
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:first-of-type { border-top: 1px solid var(--line); }
.faq-item summary {
  font-size: 15px; font-weight: 500; cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 15px 0;
  transition: color 0.13s ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--accent); }

/* Plus/minus icon — works with both old ::after content and new SVG chevron */
.faq-item summary::after {
  content: "+"; font-size: 18px; font-weight: 400; color: var(--ink-3); flex-shrink: 0;
}
.faq-item[open] summary::after { content: "\2212"; }
/* If the SVG chevron is present, hide the ::after */
.faq-item summary:has(.faq-chevron)::after { display: none; }

.faq-chevron {
  width: 14px; height: 14px; flex-shrink: 0; stroke: var(--ink-3); fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  transition: transform 0.18s ease;
}
.faq-item[open] .faq-chevron { transform: rotate(180deg); }

.faq-item p {
  font-size: 14.5px; line-height: 1.6; color: var(--ink-2);
  margin: -2px 0 17px; max-width: 64ch;
}

.where-to-watch { margin-top: 28px; font-size: 14px; color: var(--ink-2); }

/* ==========================================================================
   Related franchises
   ========================================================================== */

.related-section { margin-top: 40px; }

.related-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }

.related-card {
  display: block; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: transparent; color: var(--ink);
  transition: border-color 0.13s ease, background-color 0.13s ease;
}
.related-card:hover { text-decoration: none; border-color: var(--line-2); background: var(--sunken); }
.related-card .related-name { display: block; font-size: 14.5px; font-weight: 500; }
.related-card .related-category { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }

/* ==========================================================================
   Franchise grid (category landing pages)
   ========================================================================== */

.franchise-grid { display: grid; grid-template-columns: 1fr; gap: 4px; }

.franchise-card {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 13px 14px;
  border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--ink);
  transition: background-color 0.13s ease;
}
.franchise-card:hover { text-decoration: none; background: var(--sunken); }
.franchise-card .franchise-name { font-size: 15px; font-weight: 500; }
.franchise-card .franchise-detail {
  font-size: 12.5px; color: var(--ink-3); white-space: nowrap; flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Category buttons (homepage)
   ========================================================================== */

.category-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 28px; }

.category-card {
  background: transparent; border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 20px 16px; display: flex; flex-direction: column; gap: 4px;
  color: var(--ink);
  transition: background-color 0.13s ease, border-color 0.13s ease;
}
.category-card:hover { text-decoration: none; background: var(--sunken); border-color: var(--ink-3); }
.category-card .category-name { font-size: 16px; font-weight: 600; color: var(--accent); }
.category-card .category-count { font-size: 13px; color: var(--ink-3); }

/* ==========================================================================
   Homepage
   ========================================================================== */

.hero { text-align: center; padding: 24px 0 20px; }
.hero h1 { text-wrap: balance; font-size: 26px; font-weight: 600; letter-spacing: -0.026em; margin: 0 0 6px; }
.hero p { font-size: 15px; color: var(--ink-2); margin: 0; }

.search-wrap { position: relative; margin-bottom: 28px; }

.search-input {
  width: 100%; font-family: inherit; font-size: 16px;
  padding: 12px 14px 12px 40px; border-radius: var(--radius);
  border: 1px solid var(--line-2); background: var(--sunken);
  color: var(--ink);
  transition: border-color 0.13s ease;
}
.search-input:focus { border-color: var(--ink-3); outline: none; }
.search-input::placeholder { color: var(--ink-3); }

.search-icon {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; stroke: var(--ink-3); fill: none;
  stroke-width: 2; pointer-events: none;
}

.search-results { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.search-results:empty { margin-top: 0; }
.search-no-results { font-size: 14px; color: var(--ink-3); padding: 10px 2px; }

.home-section { margin-bottom: 28px; }

.home-section-title {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.09em; color: var(--ink-3); margin: 0 0 10px;
}
.home-section-title a {
  float: right; text-transform: none; font-weight: 500;
  letter-spacing: normal; font-size: 13px;
}

/* ==========================================================================
   About / 404 pages
   ========================================================================== */

.prose p { font-size: 15px; line-height: 1.6; color: var(--ink-2); margin: 0 0 16px; }
.prose h1 { margin-bottom: 16px; }

.category-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.category-links a {
  font-size: 13px; font-weight: 500;
  border: 1px solid var(--line-2); border-radius: 999px;
  padding: 8px 16px; color: var(--ink-2);
  transition: color 0.13s ease, border-color 0.13s ease;
}
.category-links a:hover { border-color: var(--ink-3); color: var(--ink); text-decoration: none; }

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

.site-footer { margin-top: 60px; padding-top: 24px; border-top: 1px solid var(--line); }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 12px; }
.footer-links a { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.footer-links a:hover { color: var(--ink); text-decoration: none; }
.footer-disclaimer { font-size: 12px; color: var(--ink-3); line-height: 1.55; margin: 0; max-width: 62ch; }

/* ==========================================================================
   Section jump chips — sticky nav under header for long pages
   Built dynamically by main.js when a page has 4+ content sections.
   ========================================================================== */

.section-nav {
  position: sticky; top: 58px; z-index: 40;
  background: rgba(10, 10, 11, 0.88);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
  margin: 0 -20px; padding: 0 20px;
}

.section-nav-inner {
  display: flex; gap: 4px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding: 10px 0; max-width: 700px; margin: 0 auto;
  scrollbar-width: none;
}
.section-nav-inner::-webkit-scrollbar { display: none; }

.section-chip {
  flex-shrink: 0; font-family: inherit; font-size: 12px; font-weight: 500;
  line-height: 1; padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--line-2); background: transparent; color: var(--ink-3);
  cursor: pointer; white-space: nowrap;
  transition: background-color 0.13s ease, color 0.13s ease, border-color 0.13s ease;
  text-decoration: none;
}
.section-chip:hover { color: var(--ink); border-color: var(--ink-3); text-decoration: none; }
.section-chip.is-active {
  background: var(--solid-bg); border-color: var(--solid-bg); color: var(--solid-fg);
  font-weight: 600;
}

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

@media (max-width: 380px) {
  .page-wrap { padding-left: 16px; padding-right: 16px; }
  .page-title { font-size: 25px; }
  .entry-title { font-size: 15px; }
  .stat-value { font-size: 15px; }
  .stat { padding-left: 4px; padding-right: 4px; }
}

/* Header on phones: the page already has its own side margin, so the header
   doesn't add a second one. Logo and buttons line up with the content below,
   and the "My Watchlist" pill always stays on one line. */
@media (max-width: 480px) {
  .header-inner { padding-left: 0; padding-right: 0; gap: 10px; }
  .watchlist-header-btn { padding: 8px 12px; gap: 6px; }
}
/* Very narrow phones (under 360px): slightly smaller logo, pill reads "Watchlist". */
@media (max-width: 359px) {
  .brand { gap: 8px; }
  .brand-mark { width: 26px; height: 17px; }
  .brand-name { font-size: 16px; }
  .watchlist-header-my { display: none; }
}

@media (min-width: 460px) {
  .related-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ==========================================================================
   Save-to-watchlist toast
   ========================================================================== */

.wl-toast {
  position: fixed; left: 50%; bottom: 18px; z-index: 90;
  display: flex; align-items: center; gap: 10px;
  max-width: calc(100% - 32px);
  padding: 10px 14px; border-radius: 999px;
  background: var(--solid-bg); color: var(--solid-fg);
  font-size: 13.5px; font-weight: 500; white-space: nowrap;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  opacity: 0; transform: translate(-50%, 8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}
.wl-toast.is-visible { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.wl-toast a { color: var(--solid-fg); text-decoration: underline; text-underline-offset: 2px; flex-shrink: 0; }

/* ==========================================================================
   Last updated line (franchise pages) + simple text pages (about, privacy)
   ========================================================================== */

.last-updated { margin: 6px 0 0; font-size: 13px; color: var(--ink-2); }

.prose { max-width: 62ch; }
.prose h2 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; margin: 32px 0 8px; }
.prose p, .prose li { font-size: 15px; line-height: 1.65; color: var(--ink-2); }
.prose p { margin: 0 0 14px; }
.prose ul { margin: 0 0 14px; padding-left: 20px; }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--ink); font-weight: 500; }
.page-title--solo { margin-top: 32px; }

/* ==========================================================================
   Desktop: section chips become a fixed left sidebar
   Only kicks in once there's genuine space beside the 700px column (roughly
   a 1280px+ laptop). Below that it stays the horizontal sticky bar.
   ========================================================================== */

@media (min-width: 1280px) {
  .section-nav {
    position: fixed; top: 96px;
    left: max(24px, calc(50% - 550px));
    width: 190px; margin: 0; padding: 0;
    background: none; border: 0;
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .section-nav-inner {
    flex-direction: column; align-items: stretch;
    overflow: visible; max-width: none; margin: 0; padding: 0; gap: 4px;
  }
  .section-chip { width: 100%; text-align: left; white-space: normal; }
}

/* ==========================================================================
   Category pages: break the franchise grid out to a wider, multi-column
   layout on larger screens. Header/footer stay at the standard width —
   only this listing widens, since it's the one page type that's mostly a
   long single column with room to spare.
   ========================================================================== */

.grid-breakout {
  width: 100vw; position: relative; left: 50%; right: 50%;
  margin-left: -50vw; margin-right: -50vw;
}
.grid-breakout-inner { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

@media (min-width: 640px) {
  .franchise-grid { grid-template-columns: repeat(2, 1fr); gap: 6px 16px; }
}
@media (min-width: 1000px) {
  .grid-breakout .franchise-grid { grid-template-columns: repeat(3, 1fr); }
}

/* A–Z jump bar (category pages) */
.az-nav {
  position: sticky; top: 58px; z-index: 40;
  background: rgba(10, 10, 11, 0.88);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
  margin: 0 0 4px;
}
.az-nav-inner {
  display: flex; gap: 4px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding: 10px 20px; max-width: 1040px; margin: 0 auto; scrollbar-width: none;
}
.az-nav-inner::-webkit-scrollbar { display: none; }
.az-chip {
  flex-shrink: 0; width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: inherit; font-size: 12px; font-weight: 600;
  border-radius: 999px; border: 1px solid var(--line-2);
  background: transparent; color: var(--ink-3); text-decoration: none;
}
.az-chip:hover { color: var(--ink); border-color: var(--ink-3); text-decoration: none; }

.letter-header {
  font-size: 12px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase;
  color: var(--ink-3); padding: 16px 0 4px;
  /* No scroll-margin-top here: the site already sets a global
     scroll-padding-top (see html{} near the top of this file) sized for
     the sticky header, and scroll-padding/scroll-margin stack — adding
     one here double-counted the offset. */
}
.franchise-grid > .letter-header:first-child { padding-top: 2px; }
@media (min-width: 640px) {
  .franchise-grid > .letter-header { grid-column: 1 / -1; }
}

/* Genre filter chips on category pages */
.genre-row { display: flex; flex-wrap: nowrap; gap: 7px; margin: 2px 0 14px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.genre-row::-webkit-scrollbar { display: none; }
.genre-row .filter-btn { flex: 0 0 auto; white-space: nowrap; }
.franchise-card[hidden], .letter-header[hidden], .az-chip[hidden] { display: none; }

/* Desktop: wrap the genre chips onto two lines so none are hidden (mobile keeps the sideways-scrolling row) */
@media (min-width: 700px) { .genre-row { flex-wrap: wrap; overflow-x: visible; } }

/* Align genre chips, A-Z chips, letter headers and cards on one left edge inside the wide grid column */
.grid-breakout-inner .genre-row { margin: 14px 0 6px; }
.grid-breakout-inner .az-nav-inner { padding-left: 0; padding-right: 0; }

/* Small phones: page padding is 16px, so the section bar must bleed 16px (not 20px) or it overshoots by 4px */
@media (max-width: 380px) { .section-nav { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; } }

/* ==========================================================================
   Viewing progress — tick-off numbers, amber spine, progress panel
   Added 2026-09-22; behaviour is the last block in js/main.js.
   The number becomes a 40px tap target, but negative margins keep the
   numeral exactly where the old 23px span drew it, so rows don't shift.
   ========================================================================== */

button.entry-number {
  display: inline-grid; place-items: center;
  width: 40px; min-width: 40px; height: 40px;
  margin: -9px -8.5px 0;
  padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--accent);
  font: inherit; font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums;
  line-height: 1; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
/* the visible disc: 26px inside the 40px target */
button.entry-number::before {
  content: ""; position: absolute; top: 7px; right: 7px; bottom: 7px; left: 7px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px rgba(227, 178, 92, 0.38);
  transition: background-color 0.13s ease, box-shadow 0.13s ease;
}
button.entry-number > * { position: relative; grid-area: 1 / 1; }
button.entry-number:hover::before { background: var(--accent-soft); }
button.entry-number:focus-visible { outline: none; }
button.entry-number:focus-visible::before { box-shadow: inset 0 0 0 1.5px rgba(227, 178, 92, 0.38), 0 0 0 2px var(--accent); }

.entry-check-icon {
  display: none; width: 13px; height: 13px;
  fill: none; stroke: currentColor; stroke-width: 2.3;
  stroke-linecap: round; stroke-linejoin: round;
}
button.entry-number[aria-pressed="true"] { color: var(--solid-fg); }
button.entry-number[aria-pressed="true"]::before { background: var(--accent); box-shadow: none; }
button.entry-number[aria-pressed="true"] .entry-check-num { display: none; }
button.entry-number[aria-pressed="true"] .entry-check-icon { display: block; }

/* the next unwatched entry gets a ring — it's where the amber spine leads */
.entry-row.is-next button.entry-number::before,
.entry-card.is-next button.entry-number::before { box-shadow: inset 0 0 0 2px var(--accent); }
.entry-row.is-next button.entry-number:focus-visible::before,
.entry-card.is-next button.entry-number:focus-visible::before { box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 2px var(--accent); }

/* watched rows: the title steps back and the spine below turns amber */
.entry-row.is-watched .entry-title,
.entry-card.is-watched .entry-title { color: var(--ink-2); }
.entry-row.is-watched::before { background: rgba(227, 178, 92, 0.5); }

/* motion only in answer to a tap (the reduced-motion rule above switches it off) */
@keyframes entry-check-pop {
  0% { transform: scale(0.55); }
  60% { transform: scale(1.12); }
  100% { transform: scale(1); }
}
button.entry-number.is-popping::before { animation: entry-check-pop 0.22s ease-out; }

@keyframes entry-row-flash {
  from { background-color: var(--sunken-2); }
  to { background-color: transparent; }
}
.entry-row.is-flash, .entry-card.is-flash { animation: entry-row-flash 1.6s ease-out; }

/* panel under the stat line: next up, bar, count, clear */
.progress-panel { margin: -4px 0 20px; }
.progress-panel[hidden], .progress-hint[hidden] { display: none; }
.progress-next { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.progress-next a { font-weight: 500; }
.progress-bar {
  height: 3px; margin: 9px 0 8px;
  border-radius: 2px; background: var(--line-2); overflow: hidden;
}
.progress-bar span {
  display: block; width: 0; height: 100%;
  border-radius: inherit; background: var(--accent);
  transition: width 0.25s ease;
}
.progress-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums;
}
.progress-clear {
  margin: -8px -4px -8px 0; padding: 8px 4px;
  border: 0; background: none; cursor: pointer;
  font: inherit; color: var(--ink-3);
  text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px;
}
.progress-clear:hover { color: var(--ink); text-decoration-color: currentColor; }
.progress-hint {
  display: flex; align-items: center; gap: 8px;
  margin: -6px 0 18px; font-size: 13.5px; color: var(--ink-2);
}
.progress-hint-tick {
  flex-shrink: 0; display: inline-grid; place-items: center;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); color: var(--solid-fg);
}
.progress-hint-tick svg {
  width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2.4;
  stroke-linecap: round; stroke-linejoin: round;
}

/* "Undo" inside the shared toast */
.wl-toast-action {
  flex-shrink: 0; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-weight: 600; color: var(--solid-fg);
  text-decoration: underline; text-underline-offset: 2px;
}

/* Bottom bar: "Next up" stays in reach once the panel at the top scrolls away.
   Only exists for visitors who have ticked something on this page. */
.progress-dock {
  position: fixed; z-index: 80; left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  width: min(calc(100% - 24px), 560px);
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px 13px; overflow: hidden;
  background: var(--sunken-2); border: 1px solid var(--line-2); border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  font-size: 14px; color: var(--ink-2); text-decoration: none;
  opacity: 0; transform: translate(-50%, 10px);
  transition: opacity 0.18s ease, transform 0.18s ease, border-color 0.13s ease;
}
.progress-dock.is-visible { opacity: 1; transform: translate(-50%, 0); }
.progress-dock[hidden] { display: none; }
.progress-dock:hover { text-decoration: none; border-color: var(--ink-3); }
.progress-dock-bar {
  position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--line-2);
}
.progress-dock-bar span { display: block; width: 0; height: 100%; background: var(--accent); }
.progress-dock-next { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress-dock-next strong { font-weight: 500; color: var(--accent); }
.progress-dock-count { flex-shrink: 0; font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
/* keep the footer reachable and lift toasts above the bar */
body.has-progress-dock { padding-bottom: 76px; }
body.has-progress-dock .wl-toast { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
