/* ─── FilmIntel Design System ──────────────────────────────────── */

:root {
  --bg-base:        #0b0f1a;
  --bg-surface:     #131929;
  --bg-card:        #1a2235;
  --bg-card-hover:  #1f2a42;
  --border:         #2a3655;
  --border-subtle:  #1e2d48;

  --text-primary:   #e8edf5;
  --text-secondary: #8896b0;
  --text-muted:     #55657f;

  --accent:         #4f9cf9;      /* electric blue */
  --accent-gold:    #f5a623;      /* box-office gold */
  --accent-green:   #34c47c;      /* positive ROI */
  --accent-red:     #f05656;      /* negative */

  /* RGB triplets for building rgba() with variable alpha */
  --accent-rgb:     79, 156, 249;
  --gold-rgb:       245, 166, 35;

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-serif: 'DM Serif Display', Georgia, serif;

  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-pill: 999px;

  --shadow-card: 0 1px 3px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.25);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Tabular numerals for all data figures — the terminal texture. */
.num { font-variant-numeric: tabular-nums; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }

img { display: block; max-width: 100%; }

/* ─── Header ──────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11,15,26,.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 40px;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  letter-spacing: -.5px;
  color: var(--text-primary);
}
.logo span { color: var(--accent-gold); }

.nav-links {
  display: flex;
  gap: 24px;
  font-size: .875rem;
  font-weight: 500;
}
.nav-links a { color: var(--text-secondary); transition: color .15s; }
.nav-links a:hover { color: var(--text-primary); }

/* ── Nav search (compact, available on every page) ────────────── */
.nav-search-wrap {
  position: relative;
  margin-left: auto;
}

.nav-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0 12px;
  height: 34px;
  width: 200px;
  transition: border-color .15s, box-shadow .15s, width .15s;
}
.nav-search-bar:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.15);
  width: 260px;
}

.nav-search-icon {
  width: 15px;
  height: 15px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.nav-search-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: .85rem;
}
.nav-search-input::placeholder { color: var(--text-muted); }

.nav-search-spinner {
  width: 13px;
  height: 13px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity .15s;
}
.nav-search-spinner.active {
  opacity: 1;
  animation: spin .6s linear infinite;
}

.nav-search-wrap .search-results {
  left: auto;
  right: 0;
  width: 320px;
}

.badge {
  display: inline-block;
  font-size: .65rem;
  font-weight: 600;
  background: var(--border);
  color: var(--text-muted);
  border-radius: 4px;
  padding: 1px 5px;
  vertical-align: middle;
  margin-left: 4px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* ─── Footer ──────────────────────────────────────────────────── */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  padding: 20px 0;
  font-size: .8rem;
  color: var(--text-muted);
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}
.site-footer a { color: var(--text-secondary); }
.site-footer a:hover { color: var(--accent); }
.hero-sub { color: var(--text-secondary); font-size: 1.1rem; }

/* ── Watchlist bookmark (catalog card) ────────────────────────── */
.card-watchlist-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11,15,26,.72);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  cursor: pointer;
  transition: background .12s, border-color .12s, transform .12s;
}
.card-watchlist-btn:hover {
  border-color: var(--accent);
  transform: scale(1.08);
}
.card-watchlist-btn.active {
  background: var(--accent);
  border-color: var(--accent);
}

/* ── Watchlist toggle (film detail hero) ──────────────────────── */
.watchlist-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
.watchlist-btn:hover { border-color: var(--accent); }
.watchlist-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.stat-label {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stat-value {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -.5px;
  color: var(--text-primary);
}

.stat-value.roi { font-size: 1.3rem; }

/* ─── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
}

.card-title {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.rating-score {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -.5px;
}

/* ─── Utils ───────────────────────────────────────────────────── */
.muted { color: var(--text-muted); font-size: .875rem; }

/* ─── Search dropdown (shared by nav search) ──────────────────── */
/* Big hero search styles removed in the homepage redesign; the search
   results dropdown (.search-results / .sr-*) is reused by the nav search. */
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Results dropdown ──────────────────────────────────────────── */
.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  list-style: none;
  overflow: hidden;
  z-index: 200;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  max-height: 420px;
  overflow-y: auto;
}
.search-results::-webkit-scrollbar { width: 6px; }
.search-results::-webkit-scrollbar-track { background: transparent; }
.search-results::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.sr-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-subtle);
  transition: background .1s;
}
.sr-item:last-child { border-bottom: none; }
.sr-item:hover, .sr-item.sr-active { background: var(--bg-card-hover); }

.sr-poster {
  width: 40px;
  height: 56px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-surface);
}
.sr-poster img { width: 100%; height: 100%; object-fit: cover; }
.sr-poster-blank {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--text-muted);
}

.sr-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sr-title {
  font-size: .9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sr-year {
  font-size: .78rem;
  color: var(--text-muted);
}

.sr-status {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  flex-shrink: 0;
}
.sr-in-db {
  background: rgba(52,196,124,.12);
  color: var(--accent-green);
}
.sr-add {
  background: rgba(var(--accent-rgb),.12);
  color: var(--accent);
}

/* Person rows in nav search. A circular initials chip reads as "not a film" at
   a glance, so people and titles stay distinguishable in one mixed dropdown. */
.sr-avatar {
  height: 40px;                     /* square, unlike the 40x56 poster */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  font-family: var(--font-serif);
  font-size: .95rem;
  letter-spacing: .02em;
  color: var(--accent-gold);
  background: rgba(var(--gold-rgb),.14);
}
.sr-person {
  background: rgba(var(--gold-rgb),.14);
  color: var(--accent-gold);
}

.sr-no-results {
  padding: 20px 16px;
  color: var(--text-muted);
  font-size: .875rem;
  text-align: center;
}

/* ── Ingest overlay ────────────────────────────────────────────── */
.ingest-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11,15,26,.85);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
}
.ingest-overlay[hidden] { display: none; }

.ingest-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 48px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  box-shadow: 0 16px 64px rgba(0,0,0,.6);
}

.ingest-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.ingest-title {
  font-size: 1rem;
  font-weight: 600;
}
.ingest-sub {
  font-size: .83rem;
  color: var(--text-muted);
}

.wp-name {
  font-size: .65rem;
  color: var(--text-muted);
  text-align: center;
  width: 100%;
  line-height: 1.3;
  word-break: break-word;
}

.netflix-total {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  margin-bottom: 12px;
}

/* ─── Catalog Bar (sticky sort + filter) ─────────────────────── */
.catalog-bar {
  position: sticky;
  top: 56px;           /* height of site-header */
  z-index: 90;
  background: rgba(11,15,26,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.catalog-bar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 10px;
  padding-bottom: 10px;
}

/* ── Sort pills ─────────────────────────────────────────────── */
.sort-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.sort-pill {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: .78rem;
  font-weight: 500;
  padding: 5px 13px;
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
  white-space: nowrap;
}
.sort-pill:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}
.sort-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

.sort-arrow {
  font-size: .7em;
  margin-left: 3px;
}
.muted-arrow { opacity: .4; }

/* ── Filter selects ─────────────────────────────────────────── */
.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
}

.filter-select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: .78rem;
  padding: 5px 10px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2355657f'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  padding-right: 26px;
  transition: border-color .12s;
}
.filter-select:hover,
.filter-select:focus { border-color: var(--accent); outline: none; }
.filter-select.filter-active {
  border-color: var(--accent);
  color: var(--text-primary);
}

/* ── Streaming platform multi-select ──────────────────────────── */
.multiselect {
  position: relative;
}

.multiselect-toggle {
  font-family: var(--font-sans);
}

.multiselect-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 100;
  min-width: 180px;
  max-height: 280px;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  padding: 6px;
}

.multiselect-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: .8rem;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
}
.multiselect-option:hover {
  background: rgba(255,255,255,.04);
  color: var(--text-primary);
}
.multiselect-option input {
  accent-color: var(--accent);
}

.clear-filters {
  font-size: .75rem;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  transition: color .12s, border-color .12s;
  white-space: nowrap;
}
.clear-filters:hover { color: var(--accent-red); border-color: var(--accent-red); }

/* ─── Load more ──────────────────────────────────────────────── */
.load-more-wrap {
  display: flex;
  justify-content: center;
  padding: 40px 0 0;
}

.load-more-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: .875rem;
  font-weight: 500;
  padding: 11px 36px;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.load-more-btn:hover {
  border-color: var(--accent);
  color: var(--text-primary);
  background: rgba(var(--accent-rgb),.06);
}

/* ─── Platform badges ─────────────────────────────────────────── */
.platform-badge {
  display: inline-block;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
  background: var(--border);
  color: var(--text-primary);
  white-space: nowrap;
}

/* Per-platform colors */
.platform-netflix            { background: #e50914; color: #fff; }
.platform-hbo-max            { background: #741ef4; color: #fff; }
.platform-disney-plus        { background: #113ccf; color: #fff; }
.platform-amazon-prime-video { background: #00a8e0; color: #fff; }
.platform-prime-video        { background: #00a8e0; color: #fff; }
.platform-peacock            { background: #f47b00; color: #fff; }
.platform-hulu               { background: #1ce783; color: #000; }
.platform-paramount-plus     { background: #0064ff; color: #fff; }
.platform-apple-tv-plus      { background: #555;    color: #fff; }
.platform-starz              { background: #000;    color: #fff; }
.platform-showtime           { background: #c00;    color: #fff; }

/* Compact variant — secondary feature below the charts, not the page's lead */
.home-hero--compact { min-height: 300px; border-top: 1px solid var(--border-subtle); }

/* ── Homepage responsive ──────────────────────────────────────── */
@media (max-width: 760px) {
  .home-band { grid-template-columns: 1fr; }
  .home-hero-content { padding-top: 40px; padding-bottom: 32px; }
  .home-hero-stats { gap: 20px; }
}
.compare-search-wrap { position: relative; }
.compare-search-wrap .nav-search-bar { width: 100%; height: 42px; }
.compare-search-wrap .search-results { left: 0; right: 0; width: auto; }
.compare-change-btn {
  font-size: .74rem;
  font-weight: 600;
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  background: transparent;
  cursor: pointer;
  transition: border-color .12s;
}
.compare-change-btn:hover { border-color: var(--accent); }

/* ── Reduced motion ──────────────────────────────────────────────
   Applies before the width-based rules below so it always wins,
   regardless of viewport. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ══════════════════════════════════════════════════════════════════
   HOMEPAGE REDESIGN (design_handoff_filmintel_homepage)
   Fully scoped: every rule targets `.fih*` or `body.fih`, so the
   other eight pages and the shared components they use are untouched.
   Colours are the handoff's oklch tokens; type is Newsreader (serif)
   / IBM Plex Mono (figures) / Archivo (UI).
   ═════════════════════════════════════════════════════════════════ */

body.fih {
  --fih-bg:          oklch(0.155 0.018 264);
  --fih-bg-deep:     oklch(0.135 0.016 264);
  --fih-panel:       oklch(0.19 0.02 264);
  --fih-panel-2:     oklch(0.21 0.02 264);
  --fih-line:        oklch(0.29 0.02 264 / 0.6);
  --fih-line-soft:   oklch(0.27 0.02 264 / 0.45);
  --fih-text:        oklch(0.95 0.006 90);
  --fih-title:       oklch(0.97 0.006 90);
  --fih-muted:       oklch(0.72 0.02 264);
  --fih-dim:         oklch(0.58 0.02 264);
  --fih-faint:       oklch(0.48 0.02 264);
  --fih-amber:       oklch(0.8 0.13 78);
  --fih-indigo:      oklch(0.72 0.095 264);
  --fih-indigo-hi:   oklch(0.82 0.1 264);
  --fih-green:       oklch(0.74 0.15 152);
  --fih-red:         oklch(0.68 0.18 25);
  --fih-serif:       'Newsreader', Georgia, serif;
  --fih-mono:        'IBM Plex Mono', ui-monospace, monospace;
  --fih-sans:        'Archivo', system-ui, sans-serif;
  background: var(--fih-bg);
}

.fih {
  font-family: var(--fih-sans);
  color: var(--fih-text);
}
.fih a { color: var(--fih-indigo); transition: color .12s; }
.fih a:hover { color: var(--fih-indigo-hi); }

.fih-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px;
}

/* ── Header (homepage only — height/typography differ from site nav) ── */
body.fih .site-header {
  background: oklch(0.155 0.018 264 / 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid oklch(0.3 0.02 264 / 0.5);
}
body.fih .nav-inner {
  max-width: 1400px;
  padding: 0 40px;
  height: 68px;
  gap: 40px;
}
body.fih .logo {
  font-family: var(--fih-serif);
  font-size: 1.625rem;      /* 26px */
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fih-title);
}
body.fih .logo span { color: var(--fih-amber); }
body.fih .nav-links {
  gap: 28px;
  font-size: .9375rem;      /* 15px */
  font-weight: 500;
}
body.fih .nav-links a { color: var(--fih-muted); }
body.fih .nav-links a:hover { color: var(--fih-title); }
body.fih .nav-links a.nav-active { color: var(--fih-title); }
body.fih .nav-links .nav-analysis,
body.fih .nav-links .nav-analysis.nav-active { color: var(--fih-amber); }
body.fih .nav-search-bar {
  background: var(--fih-panel-2);
  border: 1px solid oklch(0.3 0.02 264 / 0.7);
  border-radius: 9px;
  padding: 9px 14px;
  height: auto;
  width: 260px;
}
body.fih .nav-search-bar:focus-within { width: 260px; box-shadow: none; }
body.fih .nav-search-input { font-family: var(--fih-sans); font-size: .875rem; }

/* Analysis nav link is amber site-wide; keep it self-contained so it renders
   on pages that don't load the homepage tokens (film detail / person / compare). */
.nav-analysis { color: oklch(0.8 0.13 78); }

/* Collapsed state: a quiet strip in place of the marquee, so a dismissed
   ticker is always recoverable without clearing site data. */
.fih-ticker-restore {
  display: block;
  width: 100%;
  padding: 5px 0;
  background: var(--fih-bg-deep);
  border: none;
  border-bottom: 1px solid oklch(0.3 0.02 264 / 0.4);
  font-family: var(--fih-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fih-faint);
  cursor: pointer;
  transition: color .15s;
}


/* Shared delta / trend colour classes (ticker + box-office rows) */
.fih-delta--up    { color: var(--fih-green); }
.fih-delta--down  { color: var(--fih-red); }
.fih-delta--amber,
.fih-delta--new   { color: var(--fih-amber); }
.fih-delta--mute  { color: var(--fih-dim); }

/* ── Data panels ─────────────────────────────────────────────────── */
.fih-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.fih-card {
  background: var(--fih-panel);
  border: 1px solid var(--fih-line);
  border-radius: 16px;
  padding: 26px 28px 12px;
}
.fih-phead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}
.fih-phead-l { display: flex; align-items: baseline; gap: 12px; }
.fih-ptitle {
  font-family: var(--fih-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fih-text);
}
.fih-pdate { font-family: var(--fih-mono); font-size: 12px; color: var(--fih-dim); }
.fih-plink { font-size: 13px; font-weight: 600; white-space: nowrap; }

.fih-box-row {
  display: grid;
  grid-template-columns: 34px 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 15px 0;
  border-top: 1px solid var(--fih-line-soft);
}
.fih-box-row--nospark { grid-template-columns: 34px 1fr auto; }
.fih-str-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 15px 0;
  border-top: 1px solid var(--fih-line-soft);
}
.fih-rank {
  font-family: var(--fih-serif);
  font-size: 24px;
  font-weight: 600;
  color: var(--fih-amber);
  text-align: center;
}
.fih-row-main { min-width: 0; }
.fih-row-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--fih-title);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fih-row-title a { color: var(--fih-title); }
.fih-row-title a:hover { color: var(--fih-indigo-hi); }
.fih-tag {
  font-family: var(--fih-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fih-dim);
  margin-top: 3px;
}
.fih-spark-cell { display: inline-flex; }
.fih-spark { overflow: visible; }
.fih-spark--new  { stroke: var(--fih-amber); }
.fih-spark--up   { stroke: var(--fih-green); }
.fih-spark--down { stroke: var(--fih-red); }
.fih-row-right { text-align: right; min-width: 96px; }
.fih-gross {
  font-family: var(--fih-mono);
  font-size: 16px;
  font-weight: 600;
  color: var(--fih-title);
}
.fih-row-right .fih-delta { font-family: var(--fih-mono); font-size: 12px; font-weight: 500; margin-top: 2px; }

.fih-str-titlerow { display: flex; align-items: center; gap: 9px; }
.fih-bar {
  height: 4px;
  border-radius: 3px;
  background: oklch(0.27 0.02 264);
  margin-top: 8px;
  overflow: hidden;
}
.fih-bar-fill { height: 100%; border-radius: 3px; background: var(--fih-amber); }
.fih-mins {
  text-align: right;
  min-width: 92px;
  font-family: var(--fih-mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--fih-title);
}
.fih-mins-unit { font-size: 11px; font-weight: 400; color: var(--fih-dim); }

/* ── Platform pills ──────────────────────────────────────────────── */
.fih-pill {
  flex-shrink: 0;
  font-family: var(--fih-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 5px;
  background: oklch(0.3 0.02 264);
  color: oklch(0.9 0.006 90);
  white-space: nowrap;
}
.fih-pill--onimg { padding: 4px 9px; border-radius: 6px; }
.fih-pill.platform-netflix       { background: oklch(0.55 0.19 24);  color: oklch(0.98 0.01 24); }
.fih-pill.platform-disney-plus   { background: oklch(0.42 0.13 255); color: oklch(0.97 0.01 255); }
.fih-pill.platform-hulu          { background: oklch(0.72 0.17 155); color: oklch(0.16 0.03 155); }
.fih-pill.platform-hbo-max       { background: oklch(0.45 0.16 300); color: oklch(0.97 0.01 300); }
.fih-pill.platform-max           { background: oklch(0.45 0.16 300); color: oklch(0.97 0.01 300); }
.fih-pill.platform-paramount-plus{ background: oklch(0.5 0.15 250);  color: oklch(0.98 0.01 250); }
.fih-pill.platform-apple-tv-plus { background: oklch(0.3 0.005 264); color: oklch(0.95 0.006 90); }
.fih-pill.platform-prime-video,
.fih-pill.platform-amazon-prime-video { background: oklch(0.6 0.12 220); color: oklch(0.16 0.02 220); }
.fih-pill.platform-peacock       { background: oklch(0.68 0.16 45);  color: oklch(0.16 0.03 45); }

/* ── Hero ────────────────────────────────────────────────────────── */
.fih-hero {
  position: relative;
  margin-top: 52px;   /* matches .fih-rail-section/.fih-grid-section rhythm */
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--fih-line);
  min-height: 440px;
  display: flex;
  align-items: flex-end;
}
.fih-hero-bg {
  position: absolute;
  inset: 0;
  background-image: var(--backdrop);
  background-size: cover;
  background-position: center 20%;
}
.fih-hero-stripe {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(135deg,
    oklch(0.2 0.02 264), oklch(0.2 0.02 264) 11px,
    oklch(0.23 0.02 264) 11px, oklch(0.23 0.02 264) 22px);
}
.fih-hero-placeholder {
  position: absolute;
  top: 24px;
  right: 24px;
  font-family: var(--fih-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fih-dim);
}
.fih-hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    oklch(0.14 0.016 264) 0%,
    oklch(0.14 0.016 264 / 0.92) 42%,
    oklch(0.14 0.016 264 / 0.2) 100%);
}
.fih-hero-content { position: relative; padding: 48px 52px; max-width: 640px; }
.fih-hero-eyebrow {
  font-family: var(--fih-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fih-amber);
  margin-bottom: 14px;
}
.fih-hero-title {
  font-family: var(--fih-serif);
  font-size: 60px;
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.015em;
  color: var(--fih-title);
}
.fih-hero-meta { font-size: 16px; color: var(--fih-muted); margin-top: 14px; }
.fih-hero-stats { display: flex; flex-wrap: wrap; gap: 34px; margin-top: 30px; }
.fih-hero-stat-label {
  font-family: var(--fih-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fih-dim);
}
.fih-hero-stat-value {
  font-family: var(--fih-mono);
  font-size: 26px;
  font-weight: 600;
  color: var(--fih-title);
  margin-top: 5px;
}
.fih-hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

/* ── Buttons ─────────────────────────────────────────────────────── */
.fih-btn {
  display: inline-flex;
  align-items: center;
  padding: 13px 26px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
}
/* `.fih` prefix keeps these above the generic `.fih a` link colour. */
.fih .fih-btn--primary { background: var(--fih-indigo); color: oklch(0.16 0.02 264); font-weight: 700; }
.fih .fih-btn--primary:hover { background: var(--fih-indigo-hi); color: oklch(0.16 0.02 264); }
.fih .fih-btn--amber { background: var(--fih-amber); color: oklch(0.16 0.02 264); font-weight: 700; }
.fih .fih-btn--amber:hover { background: oklch(0.85 0.13 78); color: oklch(0.16 0.02 264); }
.fih .fih-btn--outline {
  background: transparent;
  color: oklch(0.9 0.006 90);
  border: 1px solid oklch(0.4 0.02 264 / 0.7);
}
.fih .fih-btn--outline:hover { color: oklch(0.98 0.006 90); border-color: oklch(0.55 0.02 264 / 0.8); }

/* ── Pro band ────────────────────────────────────────────────────── */
.fih-pro {
  margin-top: 24px;
  border-radius: 16px;
  border: 1px solid oklch(0.8 0.13 78 / 0.35);
  background: linear-gradient(120deg, oklch(0.2 0.025 78 / 0.55), oklch(0.19 0.02 264));
  padding: 44px 48px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: center;
}
.fih-pro-stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  background: oklch(0.16 0.018 264 / 0.7);
  border: 1px solid var(--fih-line);
  border-radius: 12px;
  padding: 16px 20px;
}

/* ── Section headers (rail + grid) ───────────────────────────────── */
.fih-rail-section { margin-top: 52px; }
.fih-grid-section { margin-top: 56px; }
.fih-shead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 16px;
}
.fih-stitle {
  font-family: var(--fih-mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fih-text);
}
.fih-shead-r { display: flex; align-items: center; gap: 16px; }
.fih-arrows { display: flex; gap: 8px; }
.fih-arrow {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--fih-panel-2);
  border: 1px solid oklch(0.32 0.02 264 / 0.7);
  color: oklch(0.85 0.006 90);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: border-color .12s, background .12s;
}
.fih-arrow:hover { border-color: var(--fih-indigo); background: oklch(0.24 0.02 264); }

/* ── New-to-streaming rail ───────────────────────────────────────── */
.fih-noscroll { scrollbar-width: none; -ms-overflow-style: none; }
.fih-noscroll::-webkit-scrollbar { display: none; }
.fih-rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 4px;
}
.fih-rail-card {
  flex: 0 0 320px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--fih-line);
  background: var(--fih-panel);
  display: block;
  transition: border-color .15s, transform .15s;
}
.fih-rail-card:hover { border-color: oklch(0.4 0.02 264 / 0.8); transform: translateY(-2px); }
.fih-rail-img { position: relative; aspect-ratio: 16/9; background: var(--fih-panel-2); }
.fih-rail-img img { width: 100%; height: 100%; object-fit: cover; }
.fih-rail-stripe {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(135deg,
    oklch(0.22 0.02 264), oklch(0.22 0.02 264) 9px,
    oklch(0.25 0.02 264) 9px, oklch(0.25 0.02 264) 18px);
}
.fih-rail-img .fih-pill { position: absolute; top: 12px; left: 12px; }
.fih-poster-tag {
  position: absolute;
  bottom: 12px;
  right: 12px;
  font-family: var(--fih-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fih-dim);
}
.fih-rail-body {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px;
}
.fih-rail-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--fih-title);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fih-rail-year { font-family: var(--fih-mono); font-size: 13px; color: var(--fih-dim); flex-shrink: 0; }

/* ── All-time grid ───────────────────────────────────────────────── */
.fih-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.fih-mcard {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--fih-line);
  background: var(--fih-panel);
  display: block;
  transition: border-color .15s, transform .15s;
}
.fih-mcard:hover { border-color: oklch(0.4 0.02 264 / 0.8); transform: translateY(-2px); }
.fih-mcard-img { position: relative; aspect-ratio: 2/3; background: var(--fih-panel-2); }
.fih-mcard-img img { width: 100%; height: 100%; object-fit: cover; }
.fih-mcard-stripe {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(135deg,
    oklch(0.22 0.02 264), oklch(0.22 0.02 264) 9px,
    oklch(0.25 0.02 264) 9px, oklch(0.25 0.02 264) 18px);
}
.fih-mrank {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--fih-amber);
  color: oklch(0.16 0.02 264);
  font-family: var(--fih-serif);
  font-size: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fih-mcard-body { padding: 14px 16px 18px; }
.fih-mcard-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--fih-title);
  line-height: 1.25;
  min-height: 38px;
}
.fih-mcard-meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.fih-mcard-year { font-family: var(--fih-mono); font-size: 12px; color: var(--fih-dim); }
.fih-genre {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 5px;
  background: oklch(0.27 0.02 264);
  color: var(--fih-muted);
}
.fih-mcard-gross {
  font-family: var(--fih-mono);
  font-size: 16px;
  font-weight: 600;
  color: var(--fih-amber);
  margin-top: 12px;
}
.fih-mcard-ww { font-size: 11px; font-weight: 400; color: var(--fih-dim); }

.fih-empty { color: var(--fih-dim); font-size: 14px; padding: 16px 0; }

/* ── Footer (homepage) ───────────────────────────────────────────── */
.fih-footer { border-top: 1px solid oklch(0.28 0.02 264 / 0.5); margin-top: 64px; padding: 0; }
.fih-footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 36px 40px;      /* 40px matches .nav-inner, so both flush left */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}
.fih-footer-top {
  display: flex;
  align-items: baseline;
  gap: 40px;               /* same as .nav-inner's logo-to-links gap */
  flex-wrap: wrap;
}
/* `.fih a` (0,1,1) outranks a bare `.fih-footer-logo` (0,1,0) regardless of
   source order, which rendered "Film" indigo while the `span` kept its amber.
   Same trap as `.fih a.fih-cmp-name`. Qualify the selector. */
.fih a.fih-footer-logo,
.fih-footer-logo {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  color: oklch(0.97 0.006 90);   /* same white as the nav logo */
}
.fih a.fih-footer-logo:hover { color: oklch(0.97 0.006 90); }
.fih-footer-logo span { color: oklch(0.8 0.13 78); }
.fih-footer-nav { display: flex; gap: 28px; font-size: 14px; flex-wrap: wrap; }
.fih-footer-nav a { color: oklch(0.65 0.02 264); }
.fih-footer-nav a:hover { color: oklch(0.8 0.006 90); }
.fih-footer-meta {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: oklch(0.48 0.02 264);
}

/* ── About page prose ────────────────────────────────────────────── */
.fih-about-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr);
  gap: 40px;
  align-items: start;
  margin-top: 22px;
}
/* As a side card the contact block stacks vertically instead of the wide
   flex-row used when .fih-analyst spans the page. */
.fih-analyst--card {
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
  margin-top: 0;
  padding: 30px 32px;
}
@media (max-width: 900px) {
  .fih-about-cols { grid-template-columns: 1fr; }
}

.fih-about-body { max-width: 720px; }
.fih-about-body p {
  font-size: 16px;
  line-height: 1.72;
  color: var(--fih-muted);
  margin: 0 0 18px;
  text-wrap: pretty;
}
.fih-about-body p:last-child { margin-bottom: 0; }
.fih-about-body a { color: var(--fih-amber); }
.fih-about-body a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ── Footer attribution + /sources page ──────────────────────────── */
/* Credit line claims its own row inside the space-between footer flex. */
.fih-footer-credit {
  flex: 0 0 100%;
  border-top: 1px solid var(--fih-line-soft);
  padding-top: 18px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--fih-dim);
  max-width: 760px;
}
.fih-footer-credit a { color: var(--fih-muted); text-decoration: underline; text-underline-offset: 2px; }
.fih-footer-credit a:hover { color: var(--fih-amber); }
.fih-footer-credit-more {
  display: inline-block;
  margin-top: 6px;
  font-family: var(--fih-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-decoration: none !important;
  color: var(--fih-amber) !important;
}

.fih-source-list { display: flex; flex-direction: column; gap: 2px; margin-top: 40px; }
.fih-source {
  border-top: 1px solid var(--fih-line);
  padding: 26px 0;
}
.fih-source:last-child { border-bottom: 1px solid var(--fih-line); }
.fih-source-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.fih-source-name {
  font-family: var(--fih-serif);
  font-size: 26px;
  font-weight: 600;
  color: var(--fih-title);
  margin: 0;
}
.fih-source-kind {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fih-amber);
  border: 1px solid color-mix(in oklch, var(--fih-amber) 35%, transparent);
  border-radius: var(--radius-pill, 999px);
  padding: 3px 10px;
}
.fih-source-what { margin: 14px 0 0; font-size: 15px; line-height: 1.6; color: var(--fih-text); }
.fih-source-label {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fih-dim);
  margin-right: 8px;
}
.fih-source-note { margin: 8px 0 0; font-size: 14px; line-height: 1.65; color: var(--fih-muted); max-width: 720px; }
.fih-source-link {
  display: inline-block;
  margin-top: 14px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--fih-amber);
}
.fih-source-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.fih-source-legal {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--fih-line);
  max-width: 760px;
}
.fih-source-legal p { font-size: 13px; line-height: 1.75; color: var(--fih-dim); margin: 0 0 14px; }
.fih-source-contact a { color: var(--fih-amber); }
.fih-source-contact a:hover { text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 700px) {
  .fih-source-name { font-size: 21px; }
  .fih-footer-credit { font-size: 11px; }
}

/* ── Homepage responsive ─────────────────────────────────────────── */
@media (max-width: 1080px) {
  .fih-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .fih-panels { grid-template-columns: 1fr; }
  .fih-pro { grid-template-columns: 1fr; gap: 28px; padding: 32px 28px; }
  .fih-hero-title { font-size: 44px; }
  .fih-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .fih-wrap { padding: 24px 16px; }
  .fih-hero-content { padding: 32px 24px; }
  .fih-hero-title { font-size: 34px; }
  .fih-hero-scrim {
    background: linear-gradient(to top,
      oklch(0.14 0.016 264) 0%, oklch(0.14 0.016 264 / 0.7) 55%, oklch(0.14 0.016 264 / 0.25) 100%);
  }
  body.fih .nav-search-bar { width: 44px; }
}

/* ── Mobile pass (Phase 4) ───────────────────────────────────────
   Site had only two @media blocks before this; nav, stat bars,
   chart rows, catalog filters, and hero sections all broke below
   ~700px. This is the single mobile breakpoint for those. */
@media (max-width: 700px) {

  /* Nav: logo + search icon on row one, links scroll horizontally
     on row two. Search expands from a 34px icon to a full-width
     fixed overlay bar on tap — see the ~10-line toggle in base.html. */
  .nav-inner {
    height: auto;
    min-height: 56px;
    flex-wrap: wrap;
    padding: 10px 16px;
    gap: 10px 16px;
  }
  .nav-links {
    order: 3;
    flex-basis: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 18px;
    scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { white-space: nowrap; }

  .nav-search-bar {
    width: 34px;
    padding: 0;
    justify-content: center;
    overflow: hidden;
  }
  .nav-search-bar .nav-search-input,
  .nav-search-bar .nav-search-spinner { display: none; }
  .nav-search-wrap.expanded .nav-search-bar {
    position: fixed;
    left: 12px;
    right: 12px;
    top: 10px;
    z-index: 210;
    width: auto;
    padding: 0 12px;
    justify-content: flex-start;
  }
  .nav-search-wrap.expanded .nav-search-bar .nav-search-input,
  .nav-search-wrap.expanded .nav-search-bar .nav-search-spinner { display: flex; }
  .nav-search-wrap.expanded .search-results {
    position: fixed;
    left: 12px;
    right: 12px;
    top: 56px;
    width: auto;
  }

  /* Stat bars: forced 2-column grid instead of organic flex-wrap,
     which produced uneven row heights at narrow widths. */
  .stat-bar-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .stat-item {
    min-width: 0;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-subtle);
  }
  .stat-item:nth-child(2n) { border-right: none; }

  /* Chart rows: drop the thumbnail, tighten spacing — the title and
     numbers are the content that matters at this width. */
  .chart-row { gap: 10px; padding: 10px 14px; }
  .chart-row-thumb { display: none; }
  .chart-row-rank { min-width: 28px; }
  .chart-row-rank-num { font-size: 1.4rem; }
  .chart-row-title { font-size: .85rem; }

  /* Catalog filter bar: horizontal scroll instead of wrapping into
     a tall multi-row block. */
  .catalog-bar-inner {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .catalog-bar-inner::-webkit-scrollbar { display: none; }
  .sort-group, .filter-group { flex-shrink: 0; }

  /* Heroes: shorter, with a stronger scrim since the text column no
     longer sits in a narrow left-aligned block. */
  .film-hero { min-height: 340px; }
  .film-hero::after {
    background: linear-gradient(to bottom, rgba(11,15,26,.4) 0%, rgba(11,15,26,.8) 45%, rgba(11,15,26,.98) 100%);
  }
  .home-hero { min-height: 320px; }
  .home-hero--compact { min-height: 220px; }
  .home-hero::after {
    background: linear-gradient(to bottom, rgba(11,15,26,.4) 0%, rgba(11,15,26,.8) 40%, rgba(11,15,26,.98) 100%);
  }

  /* Catalog / leaderboard grids: smaller minimum card width so two
     columns fit on a phone instead of one. */
  .films-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
  }
}

/* ══════════════════════════════════════════════════════════════════
   SECONDARY PAGES REDESIGN (Films / Box Office / Streaming / My List /
   Analysis) — design handoff "FilmIntel Pages". Shares body.fih tokens,
   header, footer, and .fih wrapper with the homepage. Scoped to .fih*.
   ═════════════════════════════════════════════════════════════════ */

/* ── Shared page furniture ───────────────────────────────────────── */
.fih-wrap--page { padding-bottom: 72px; }
.fih-h1 {
  font-family: var(--fih-serif);
  font-size: 64px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--fih-title);
}
.fih-h1--sm { font-size: 56px; }
/* Mono, to match the .fih-ptitle panel headers ("WEEKEND BOX OFFICE"). Kept at
   sentence case and normal size rather than inheriting ptitle's uppercase +
   0.14em tracking, which is unreadable across a full sentence. */
.fih-subtitle {
  font-family: var(--fih-mono);
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: 0.01em;
  color: var(--fih-muted);
  margin-top: 16px;
}
.fih-subtitle .dim { color: var(--fih-dim); }
.fih-eyebrow {
  font-family: var(--fih-mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fih-dim);
}

/* ── Week nav (box office + streaming) ───────────────────────────── */
.fih-weeknav { display: flex; align-items: center; gap: 20px; margin-top: 26px; flex-wrap: wrap; }
.fih-weeknav a { font-size: 14px; font-weight: 600; }
.fih-weeknav-cur { display: flex; align-items: center; gap: 12px; }
.fih-weeknav-date { font-family: var(--fih-mono); font-size: 15px; font-weight: 600; color: var(--fih-text); }
.fih-latest {
  font-family: var(--fih-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 4px 9px;
  border-radius: 5px;
  border: 1px solid oklch(0.8 0.13 78 / 0.5);
  color: var(--fih-amber);
}
.fih-weeknav-off { font-size: 14px; font-weight: 600; color: oklch(0.45 0.02 264); pointer-events: none; }

/* ── Box office summary cards ────────────────────────────────────── */
.fih-bo-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 18px;
  margin-top: 32px;
}
.fih-sum-card { background: var(--fih-panel); border: 1px solid var(--fih-line); border-radius: 14px; padding: 24px 26px; }
.fih-sum-label {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--fih-mono); font-size: 12px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--fih-dim);
}
.fih-sum-value { font-family: var(--fih-mono); font-size: 38px; font-weight: 600; margin-top: 10px; }
.fih-sum-value--amber { color: var(--fih-amber); }
.fih-sum-value--white { color: var(--fih-title); }
.fih-sum-note { font-size: 13px; color: var(--fih-dim); margin-top: 4px; }
.fih-est {
  font-family: var(--fih-mono); font-size: 10px; font-weight: 600;
  padding: 2px 7px; border-radius: 4px; background: oklch(0.27 0.02 264); color: var(--fih-muted);
}

/* ── 17-week trend ───────────────────────────────────────────────── */
.fih-trend-head { display: flex; align-items: baseline; justify-content: space-between; margin-top: 34px; }
.fih-trend-title {
  font-family: var(--fih-mono); font-size: 13px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--fih-text);
}
.fih-trend-sub { font-size: 13px; color: var(--fih-dim); }
.fih-trend-bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; margin-top: 18px; }
.fih-trend-col { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; }
a.fih-trend-col { cursor: pointer; }
.fih-trend-bar { width: 100%; border-radius: 4px 4px 0 0; background: oklch(0.55 0.08 264); min-height: 2px; transition: filter .12s; }
.fih-trend-bar--cur { background: var(--fih-amber); }
.fih-trend-col:hover .fih-trend-bar { filter: brightness(1.18); }
.fih-trend-tip {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: var(--fih-panel-2); border: 1px solid var(--fih-line); border-radius: 6px;
  padding: 6px 10px; font-family: var(--fih-mono); font-size: 11px; color: var(--fih-muted);
  white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 20;
}
.fih-trend-tip strong { color: var(--fih-title); font-weight: 600; margin-left: 6px; }
.fih-trend-col:hover .fih-trend-tip, .fih-trend-col:focus-visible .fih-trend-tip { opacity: 1; }
.fih-trend-axis {
  display: flex; justify-content: space-between;
  font-family: var(--fih-mono); font-size: 11px; color: var(--fih-faint); margin-top: 10px;
}

/* ── Ranked list (box office + streaming) ────────────────────────── */
.fih-ranklist {
  margin-top: 32px; background: var(--fih-panel); border: 1px solid var(--fih-line);
  border-radius: 16px; overflow: hidden;
}
.fih-rankrow { display: grid; align-items: center; gap: 20px; padding: 18px 26px; border-top: 1px solid var(--fih-line-soft); }
.fih-rankrow:first-child { border-top: none; }
.fih-rankrow--box { grid-template-columns: 56px 92px 1fr auto; }
.fih-rankrow--stream { grid-template-columns: 56px 96px 1fr auto; padding: 16px 26px; }
.fih-rank-block { text-align: center; }
.fih-rank-num { font-family: var(--fih-serif); font-size: 30px; font-weight: 600; color: var(--fih-amber); line-height: 1; }
.fih-move { font-family: var(--fih-mono); font-size: 11px; font-weight: 600; margin-top: 2px; }
.fih-move--new { color: var(--fih-indigo); }
.fih-move--down { color: var(--fih-red); }
.fih-move--up, .fih-move--flat { color: var(--fih-dim); }
.fih-rank-thumb { aspect-ratio: 16/10; border-radius: 8px; overflow: hidden; background: var(--fih-panel-2); }
.fih-rank-thumb img { width: 100%; height: 100%; object-fit: cover; }
.fih-rank-stripe {
  width: 100%; height: 100%;
  background: repeating-linear-gradient(135deg, oklch(0.24 0.02 264), oklch(0.24 0.02 264) 6px, oklch(0.27 0.02 264) 6px, oklch(0.27 0.02 264) 12px);
}
.fih-rank-title { font-size: 19px; font-weight: 600; color: var(--fih-title); }
a.fih-rank-title { color: var(--fih-title); }
a.fih-rank-title:hover { color: var(--fih-indigo-hi); }
.fih-rank-meta { display: flex; align-items: center; gap: 9px; margin-top: 6px; }
.fih-rank-year { font-family: var(--fih-mono); font-size: 12px; color: var(--fih-dim); }
.fih-wk-pill {
  font-family: var(--fih-mono); font-size: 10px; font-weight: 500; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 2px 8px; border-radius: 5px; background: oklch(0.27 0.02 264); color: var(--fih-muted);
}
.fih-rank-unmatched { font-family: var(--fih-mono); font-size: 11px; color: var(--fih-faint); margin-top: 4px; }
.fih-rr-right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.fih-rr-gross { font-family: var(--fih-mono); font-size: 22px; font-weight: 600; color: var(--fih-amber); }
.fih-rr-todate { font-family: var(--fih-mono); font-size: 12px; color: var(--fih-dim); }
.fih-rr-pills { display: flex; gap: 8px; margin-top: 2px; align-items: center; }
.fih-delta-pill {
  font-family: var(--fih-mono); font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 6px;
  background: oklch(0.68 0.18 25 / 0.15); color: var(--fih-red);
}
.fih-delta-pill--pos { background: oklch(0.74 0.15 152 / 0.15); color: var(--fih-green); }
.fih-roi-pill {
  font-family: var(--fih-mono); font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 6px;
  border: 1px solid oklch(0.8 0.13 78 / 0.45); color: var(--fih-amber); cursor: default;
}
.fih-rr-stream { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.fih-rr-mins { font-family: var(--fih-mono); font-size: 20px; font-weight: 600; color: var(--fih-title); }
.fih-rr-mins .unit { font-size: 12px; font-weight: 400; color: var(--fih-dim); }

/* ── Films / My List catalog ─────────────────────────────────────── */
.fih-cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.fih-fcard {
  border-radius: 14px; overflow: hidden; border: 1px solid var(--fih-line); background: var(--fih-panel);
  display: block; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.fih-fcard:hover { transform: translateY(-4px); border-color: oklch(0.5 0.05 264 / 0.8); box-shadow: 0 16px 40px oklch(0.1 0.02 264 / 0.6); }
.fih-fcard-poster { position: relative; aspect-ratio: 16/10; background: var(--fih-panel-2); overflow: hidden; }
.fih-fcard-poster img { width: 100%; height: 100%; object-fit: cover; }
.fih-fcard-stripe {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(135deg, oklch(0.22 0.02 264), oklch(0.22 0.02 264) 9px, oklch(0.25 0.02 264) 9px, oklch(0.25 0.02 264) 18px);
}
.fih-bookmark {
  position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 999px;
  background: oklch(0.15 0.016 264 / 0.75); border: 1px solid oklch(0.4 0.02 264 / 0.5);
  display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 3;
  transition: background .12s, border-color .12s, transform .12s;
}
.fih-bookmark svg { width: 15px; height: 15px; fill: none; stroke: oklch(0.85 0.006 90); stroke-width: 2; }
.fih-bookmark:hover { border-color: var(--fih-indigo); transform: scale(1.06); }
.fih-bookmark.active { background: var(--fih-indigo); border-color: var(--fih-indigo); }
.fih-bookmark.active svg { fill: oklch(0.16 0.02 264); stroke: oklch(0.16 0.02 264); }
.fih-fcard-tag {
  position: absolute; bottom: 12px; right: 12px; font-family: var(--fih-mono); font-size: 10px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--fih-dim);
}
.fih-fcard-body { padding: 16px 18px 20px; }
.fih-fcard-title { font-size: 17px; font-weight: 600; color: var(--fih-title); line-height: 1.25; min-height: 42px; }
.fih-fcard-meta { display: flex; align-items: center; gap: 9px; margin-top: 8px; }
.fih-fcard-year { font-family: var(--fih-mono); font-size: 12px; color: var(--fih-dim); }
.fih-fcard-fin { display: flex; align-items: baseline; gap: 12px; margin-top: 14px; }
.fih-fcard-gross { font-family: var(--fih-mono); font-size: 16px; font-weight: 600; color: var(--fih-amber); }
.fih-fcard-gross .ww { font-size: 11px; color: var(--fih-dim); font-weight: 400; }
.fih-fcard-roi { font-family: var(--fih-mono); font-size: 13px; font-weight: 500; }
.fih-fcard-roi--pos { color: var(--fih-green); }
.fih-fcard-roi--neg { color: var(--fih-red); }
.fih-empty-note { color: var(--fih-muted); font-size: 15px; padding: 40px 0; }
.fih-empty-note a { color: var(--fih-indigo); }

/* restyle the existing (JS-wired) films filter bar to match the redesign */
body.fih .catalog-bar {
  position: static; background: transparent; border-bottom: 1px solid var(--fih-line);
  backdrop-filter: none; margin-bottom: 28px;
}
body.fih .catalog-bar-inner { max-width: none; margin: 0; padding: 0 0 22px; gap: 12px; }
body.fih .sort-group { gap: 12px; }
/* Amber + bold so these read as controls rather than labels. The muted grey
   they used before made them easy to miss as clickable. Active stays a solid
   amber fill so the selected sort is still unmistakable against the rest. */
body.fih .sort-pill {
  font-family: var(--fih-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.04em;
  padding: 9px 16px; border-radius: 999px;
  border: 1px solid color-mix(in oklch, var(--fih-amber) 32%, transparent);
  background: transparent; color: var(--fih-amber);
}
body.fih .sort-pill:hover {
  color: oklch(0.88 0.14 78);
  border-color: color-mix(in oklch, var(--fih-amber) 70%, transparent);
  background: color-mix(in oklch, var(--fih-amber) 10%, transparent);
}
body.fih .sort-pill.active {
  background: var(--fih-amber); border-color: var(--fih-amber);
  color: oklch(0.16 0.02 264);
}
body.fih .sort-pill:focus-visible {
  outline: 2px solid var(--fih-amber); outline-offset: 2px;
}

/* Divider between the pinned major services and the long tail. */
.multiselect-divider {
  font-family: var(--fih-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fih-dim);
  padding: 10px 12px 6px;
  margin-top: 6px;
  border-top: 1px solid var(--fih-line);
}
body.fih .filter-select, body.fih .multiselect-toggle {
  font-family: var(--fih-sans); font-size: 13px; padding: 9px 30px 9px 14px; border-radius: 9px;
  background-color: var(--fih-panel); border: 1px solid oklch(0.3 0.02 264 / 0.7); color: var(--fih-muted);
}
body.fih .filter-select.filter-active, body.fih .multiselect-toggle.filter-active { color: var(--fih-title); border-color: oklch(0.5 0.05 264 / 0.7); }
body.fih .multiselect-panel { background: var(--fih-panel); border: 1px solid var(--fih-line); }
body.fih .multiselect-option { color: var(--fih-muted); }
body.fih .clear-filters { color: var(--fih-dim); border-color: var(--fih-line); }

/* ── Analysis (Pro funnel) ───────────────────────────────────────── */
.fih-sec { margin-top: 56px; }
.fih-sec-label {
  font-family: var(--fih-mono); font-size: 13px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--fih-text);
}
.fih-pro-hero {
  border-radius: 20px; border: 1px solid oklch(0.8 0.13 78 / 0.35);
  background: linear-gradient(120deg, oklch(0.2 0.025 78 / 0.55), oklch(0.185 0.02 264) 60%);
  padding: 56px 56px 52px;
}
.fih-pro-hero-eyebrow {
  font-family: var(--fih-mono); font-size: 12px; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--fih-amber);
}
.fih-pro-hero-title {
  font-family: var(--fih-serif); font-size: 60px; font-weight: 600; line-height: 1.02;
  letter-spacing: -0.02em; color: var(--fih-title); margin-top: 18px; max-width: 900px; text-wrap: pretty;
}
.fih-pro-hero-sub { font-size: 18px; line-height: 1.6; color: var(--fih-muted); margin-top: 20px; max-width: 660px; text-wrap: pretty; }
.fih-pro-hero-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 44px;
  padding-top: 36px; border-top: 1px solid oklch(0.4 0.03 78 / 0.25);
}
.fih-pro-stat-v { font-family: var(--fih-mono); font-size: 34px; font-weight: 600; color: var(--fih-amber); }
.fih-pro-stat-l { font-family: var(--fih-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fih-dim); margin-top: 6px; }
.fih-deliverables { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 22px; }
.fih-dcard { background: var(--fih-panel); border: 1px solid var(--fih-line); border-radius: 16px; padding: 28px 26px 30px; transition: transform .16s ease, border-color .16s ease; }
.fih-dcard:hover { transform: translateY(-4px); border-color: oklch(0.8 0.13 78 / 0.45); }
.fih-dcard-n { font-family: var(--fih-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fih-amber); }
.fih-dcard-t { font-family: var(--fih-serif); font-size: 24px; font-weight: 600; color: var(--fih-title); margin-top: 14px; letter-spacing: -0.01em; }
.fih-dcard-b { font-size: 15px; line-height: 1.6; color: var(--fih-muted); margin-top: 12px; text-wrap: pretty; }
/* Pricing tiers, the locked sample-ROI table and the placeholder analyst
   photo were removed 2026-08-26 along with the commercial framing on
   /analysis. Do not reintroduce without real figures behind them. */
.fih-analyst { margin-top: 56px; display: flex; align-items: center; gap: 32px; background: var(--fih-panel); border: 1px solid var(--fih-line); border-radius: 16px; padding: 36px 40px; }
.fih-analyst-body { flex: 1; }
.fih-analyst-body h3 { font-family: var(--fih-serif); font-size: 24px; font-weight: 600; color: var(--fih-title); }
.fih-analyst-body p { font-size: 15px; line-height: 1.6; color: var(--fih-muted); margin-top: 8px; max-width: 620px; text-wrap: pretty; }

/* ── Secondary-page responsive ───────────────────────────────────── */
@media (max-width: 1080px) {
  .fih-cat-grid { grid-template-columns: repeat(3, 1fr); }
  .fih-deliverables { grid-template-columns: 1fr; }
  .fih-pro-hero-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .fih-cat-grid { grid-template-columns: repeat(2, 1fr); }
  .fih-h1 { font-size: 44px; }
  .fih-pro-hero { padding: 40px 32px; }
  .fih-pro-hero-title { font-size: 40px; }
  .fih-rankrow--box, .fih-rankrow--stream { grid-template-columns: 40px 1fr auto; gap: 14px; }
  .fih-rank-thumb { display: none; }
}
@media (max-width: 640px) {
  .fih-cat-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .fih-h1 { font-size: 34px; }
  .fih-pro-hero { padding: 28px 20px; }
  .fih-pro-hero-title { font-size: 30px; }
  .fih-pro-hero-stats { grid-template-columns: 1fr 1fr; }
  .fih-analyst { flex-direction: column; align-items: flex-start; gap: 20px; }
}

/* Films load-more button on redesigned pages */
body.fih .load-more-btn {
  font-family: var(--fih-sans); border: 1px solid var(--fih-line);
  background: var(--fih-panel); color: var(--fih-muted); border-radius: 10px; padding: 12px 36px;
}
body.fih .load-more-btn:hover { border-color: var(--fih-indigo); color: var(--fih-title); background: var(--fih-panel-2); }

/* ══════════════════════════════════════════════════════════════════
   DETAIL PAGES REDESIGN (film detail / person / compare) — brought onto
   the shared .fih design system to match the rest of the site. No design
   prototype for these; built from the established .fih conventions.
   ═════════════════════════════════════════════════════════════════ */

/* ── Generic panel + section title ───────────────────────────────── */
.fih-panel { background: var(--fih-panel); border: 1px solid var(--fih-line); border-radius: 16px; padding: 26px 28px; margin-top: 20px; }
.fih-panel-title {
  font-family: var(--fih-mono); font-size: 13px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--fih-text); margin-bottom: 16px;
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.fih-panel-title .sub { font-size: 11px; letter-spacing: 0.04em; text-transform: none; color: var(--fih-dim); font-weight: 400; }
.fih-prose { font-size: 16px; line-height: 1.7; color: var(--fih-muted); text-wrap: pretty; }
.fih-src { font-family: var(--fih-mono); font-size: 11px; letter-spacing: 0.04em; color: var(--fih-faint); margin-top: 16px; }

/* film hero reuses .fih-hero*; just make it flush to the top of the wrap */
.fih-hero--flush { margin-top: 0; }
.fih-hero-badge {
  display: inline-block; font-family: var(--fih-mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.08em; padding: 3px 8px; border-radius: 5px;
  border: 1px solid oklch(0.5 0.02 264 / 0.7); color: var(--fih-muted); margin-bottom: 14px;
}
.fih-hero-director { font-size: 15px; color: var(--fih-muted); margin-top: 10px; }
.fih-hero-director a { color: var(--fih-muted); }
.fih-hero-director a:hover { color: var(--fih-indigo-hi); }

/* watchlist button (film hero) */
.fih .fih-btn--wl { border: 1px solid oklch(0.4 0.02 264 / 0.7); background: transparent; color: oklch(0.9 0.006 90); gap: 9px; }
.fih .fih-btn--wl:hover { border-color: var(--fih-indigo); }
.fih .fih-btn--wl.active { background: var(--fih-indigo); border-color: var(--fih-indigo); color: oklch(0.16 0.02 264); }
.fih-btn--wl svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.fih-btn--wl.active svg { fill: currentColor; }

/* ── Film detail layout ──────────────────────────────────────────── */
.fih-detail-grid { display: grid; grid-template-columns: 1fr 300px; gap: 24px; margin-top: 24px; align-items: start; }
.fih-detail-main { min-width: 0; }

/* financials / career stat cards reuse .fih-bo-summary + .fih-sum-card */
.fih-sum-value--roi-pos { color: var(--fih-green); }
.fih-sum-value--roi-neg { color: var(--fih-red); }
.fih-caution {
  position: relative; display: inline-block; margin-left: 6px; color: var(--fih-amber);
  font-size: 14px; cursor: help;
}
.fih-caution .tip {
  position: absolute; bottom: calc(100% + 6px); left: 0; width: 220px; background: var(--fih-panel-2);
  border: 1px solid var(--fih-line); border-radius: 8px; padding: 8px 10px; font-family: var(--fih-sans);
  font-size: 12px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--fih-muted);
  opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 20;
}
.fih-caution:hover .tip { opacity: 1; }

/* ratings */
.fih-ratings { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.fih-rating { background: var(--fih-panel-2); border: 1px solid var(--fih-line); border-radius: 12px; padding: 16px; }
.fih-rating-src { font-family: var(--fih-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fih-dim); }
/* Scores render in the site's own amber, like every other stat numeral.
   Brand colors (IMDb yellow / RT red / MC green) were dropped 2026-08-27:
   RT's brand red read as "bad score" against this site's red=down convention. */
.fih-rating-score { font-family: var(--fih-mono); font-size: 26px; font-weight: 600; color: var(--fih-amber); margin-top: 8px; }

/* cast chips */
.fih-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fih-chip { display: inline-block; background: var(--fih-panel-2); border: 1px solid var(--fih-line); border-radius: 999px; padding: 6px 14px; font-size: 14px; color: var(--fih-muted); }
.fih-chip:hover { color: var(--fih-title); border-color: oklch(0.4 0.02 264 / 0.7); }

/* film mini stats (peak rank / opening / cumulative) */
.fih-ministats { display: flex; flex-wrap: wrap; gap: 32px; margin-bottom: 18px; }
.fih-ministat-v { font-family: var(--fih-mono); font-size: 26px; font-weight: 600; color: var(--fih-title); }
.fih-ministat-l { font-family: var(--fih-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fih-dim); margin-top: 4px; }

/* pure-CSS bar chart (film box office trajectory) */
.fih-mini-bars { display: flex; align-items: flex-end; gap: 4px; height: 90px; margin: 6px 0 18px; }
.fih-mini-col { flex: 1; height: 100%; display: flex; align-items: flex-end; min-width: 4px; }
.fih-mini-bar { width: 100%; border-radius: 3px 3px 0 0; background: oklch(0.55 0.08 264); min-height: 2px; }
.fih-mini-bar--peak { background: var(--fih-amber); }

/* data table (filmography, nielsen history, weekly box office) */
.fih-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.fih-table th {
  text-align: left; font-family: var(--fih-mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--fih-dim); padding: 0 12px 10px; border-bottom: 1px solid var(--fih-line);
}
.fih-table td { padding: 11px 12px; color: var(--fih-muted); border-bottom: 1px solid var(--fih-line-soft); font-family: var(--fih-mono); font-size: 13px; }
.fih-table tr:last-child td { border-bottom: none; }
.fih-table .t-title { font-family: var(--fih-sans); font-weight: 600; color: var(--fih-title); }
.fih-table a.t-title:hover { color: var(--fih-indigo-hi); }
.fih-table .t-rank { color: var(--fih-amber); font-weight: 600; }
.fih-table .t-strong { color: var(--fih-text); }
.fih-table-peak td { background: oklch(0.8 0.13 78 / 0.06); }
.fih-table-peak .t-rank { color: var(--fih-amber); }
.fih-table-wrap { overflow-x: auto; }

/* nielsen latest highlight */
.fih-nielsen-latest { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.fih-nielsen-num { font-family: var(--fih-serif); font-size: 40px; font-weight: 600; color: var(--fih-amber); line-height: 1; }
.fih-nielsen-week { font-family: var(--fih-mono); font-size: 13px; color: var(--fih-muted); }
.fih-nielsen-min { font-family: var(--fih-mono); font-size: 12px; color: var(--fih-dim); margin-top: 2px; }
.fih-peak-badge {
  margin-left: auto; font-family: var(--fih-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 5px;
  background: oklch(0.8 0.13 78 / 0.12); color: var(--fih-amber); border: 1px solid oklch(0.8 0.13 78 / 0.25);
}

/* watch providers */
.fih-wp { display: flex; flex-wrap: wrap; gap: 14px; }
.fih-wp-item { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 76px; text-align: center; }
.fih-wp-item img { width: 52px; height: 52px; border-radius: 12px; border: 1px solid var(--fih-line); object-fit: cover; transition: transform .15s; }
.fih-wp-item:hover img { transform: scale(1.06); }
.fih-wp-name { font-family: var(--fih-mono); font-size: 10px; letter-spacing: 0.02em; color: var(--fih-dim); line-height: 1.3; }
.fih-wp-link { display: inline-block; margin-top: 14px; font-size: 14px; color: var(--fih-indigo); }
.fih-netflix { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--fih-line-soft); }
.fih-netflix-total { display: flex; flex-wrap: wrap; gap: 32px; margin-bottom: 12px; }
.fih-netflix-v { font-family: var(--fih-mono); font-size: 28px; font-weight: 600; color: var(--fih-title); }
.fih-netflix-l { font-size: 14px; color: var(--fih-muted); margin-left: 8px; }
.fih-netflix-years { display: flex; flex-wrap: wrap; gap: 20px; }
.fih-netflix-yr-l { font-family: var(--fih-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fih-dim); }
.fih-netflix-yr-v { font-family: var(--fih-mono); font-size: 14px; color: var(--fih-muted); }

/* sidebar */
.fih-poster-wrap { border-radius: 14px; overflow: hidden; border: 1px solid var(--fih-line); margin-bottom: 20px; }
.fih-poster-wrap img { width: 100%; display: block; }
.fih-dl { display: grid; grid-template-columns: auto 1fr; gap: 9px 16px; font-size: 14px; }
.fih-dl dt { color: var(--fih-dim); font-family: var(--fih-mono); font-size: 12px; letter-spacing: 0.03em; white-space: nowrap; }
.fih-dl dd { color: var(--fih-muted); }
.fih-extlink { display: block; font-size: 14px; color: var(--fih-indigo); padding: 9px 0; border-bottom: 1px solid var(--fih-line-soft); }
.fih-extlink:last-child { border-bottom: none; }
.fih-extlink:hover { color: var(--fih-indigo-hi); }

/* ── Person page ─────────────────────────────────────────────────── */
.fih-roletag {
  display: inline-block; font-family: var(--fih-mono); font-size: 12px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--fih-amber); background: oklch(0.8 0.13 78 / 0.12);
  border: 1px solid oklch(0.8 0.13 78 / 0.25); border-radius: 999px; padding: 5px 13px; margin-right: 8px;
}

/* ── Compare page ────────────────────────────────────────────────── */
.fih-cmp-pickers { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; margin-top: 28px; padding-bottom: 32px; border-bottom: 1px solid var(--fih-line); }
.fih-cmp-vs { font-family: var(--fih-serif); font-size: 22px; color: var(--fih-dim); text-align: center; }
.fih-cmp-picked { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--fih-panel); border: 1px solid var(--fih-line); border-radius: 10px; padding: 12px 16px; font-weight: 600; color: var(--fih-title); }
.fih-cmp-change { font-family: var(--fih-mono); font-size: 12px; font-weight: 600; color: var(--fih-indigo); border: 1px solid var(--fih-line); border-radius: 999px; padding: 5px 12px; background: transparent; cursor: pointer; }
.fih-cmp-change:hover { border-color: var(--fih-indigo); }
.fih-cmp-search { position: relative; }
.fih-cmp-search .nav-search-bar { width: 100%; }
.fih-cmp-search .search-results { left: 0; right: 0; width: auto; }
.fih-cmp-head { display: grid; grid-template-columns: 1fr 200px 1fr; gap: 20px; padding: 32px 0 24px; }
.fih-cmp-film { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.fih-cmp-poster { display: block; width: 100%; max-width: 260px; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: var(--fih-panel-2); border: 1px solid var(--fih-line); }
.fih-cmp-poster img { width: 100%; height: 100%; object-fit: cover; }
/* .fih a sets the indigo link colour at equal-or-higher specificity, so these
   need the extra .fih to win; without it the film titles render link-blue. */
.fih a.fih-cmp-name { font-family: var(--fih-serif); font-size: 22px; color: var(--fih-title); }
.fih a.fih-cmp-name:hover { color: var(--fih-indigo-hi); }
.fih-cmp-meta { font-family: var(--fih-mono); font-size: 12px; color: var(--fih-dim); }
.fih-cmp-row { display: grid; grid-template-columns: 1fr 200px 1fr; gap: 20px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--fih-line-soft); }
.fih-cmp-row:last-child { border-bottom: none; }
.fih-cmp-label { text-align: center; font-family: var(--fih-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fih-dim); }
.fih-cmp-cell { display: flex; flex-direction: column; gap: 6px; }
.fih-cmp-cell--a { align-items: flex-end; text-align: right; }
.fih-cmp-cell--b { align-items: flex-start; text-align: left; }
.fih-cmp-val { font-family: var(--fih-mono); font-size: 18px; font-weight: 600; color: var(--fih-title); }
.fih-cmp-bar { width: 100%; height: 6px; background: var(--fih-line-soft); border-radius: 999px; overflow: hidden; }
.fih-cmp-bar--a { display: flex; justify-content: flex-end; }
.fih-cmp-bar-fill { height: 100%; background: var(--fih-amber); border-radius: 999px; }
.fih-cmp-row--platforms .fih-cmp-cell { flex-direction: row; flex-wrap: wrap; gap: 6px; }
.fih-cmp-row--platforms .fih-cmp-cell--a { justify-content: flex-end; }

/* ── Detail-pages responsive ─────────────────────────────────────── */
@media (max-width: 860px) {
  .fih-detail-grid { grid-template-columns: 1fr; }
  .fih-detail-side { order: -1; }
  .fih-cmp-pickers { grid-template-columns: 1fr; }
  .fih-cmp-vs { display: none; }
  .fih-cmp-head, .fih-cmp-row { grid-template-columns: 1fr; text-align: center; }
  .fih-cmp-cell--a, .fih-cmp-cell--b { align-items: center; text-align: center; }
  .fih-cmp-label { order: -1; }
  .fih-cmp-bar--a { justify-content: center; }
}

/* ══════════════════════════════════════════════════════════════════
   TRENDS SECTION  (/trends, /trends/box-office-recovery)
   Adds the site's first STACKED bar chart. Every other bar in the app
   is a single fill in a single track; here each column carries two
   segments that sum to 100% of that column's own total.
   Palette note: domestic = amber (the established primary-series
   colour), international = the muted indigo already used as the default
   bar fill. Deliberately NOT green/red — those read as direction
   (up/down) everywhere else on the site, not as categories.
   ══════════════════════════════════════════════════════════════════ */

/* ── Trends index ────────────────────────────────────────────────── */
.fih-dive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 18px;
  margin-top: 30px;
}
.fih-dive {
  display: block;
  padding: 26px 26px 20px;
  border: 1px solid var(--fih-line);
  border-radius: 10px;
  background: var(--fih-panel);
  transition: border-color .14s, background .14s, transform .14s;
}
.fih-dive:hover {
  border-color: rgba(var(--gold-rgb, 245 166 35), 0.5);
  background: var(--fih-panel-2);
  transform: translateY(-2px);
}
.fih-dive-eyebrow {
  font-family: var(--fih-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fih-amber);
}
.fih-dive-title {
  font-family: var(--fih-serif);
  font-size: 27px;
  line-height: 1.2;
  color: var(--fih-title);
  margin-top: 10px;
}
.fih-dive-blurb {
  font-size: 14px;
  line-height: 1.55;
  color: var(--fih-muted);
  margin-top: 10px;
}
.fih-dive-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--fih-line-soft);
  font-family: var(--fih-mono);
  font-size: 12px;
}
.fih-dive-metric { color: var(--fih-dim); letter-spacing: 0.06em; }
.fih-dive-go     { color: var(--fih-amber); }

.fih-crumb {
  font-family: var(--fih-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}
.fih-crumb a { color: var(--fih-dim); }
.fih-crumb a:hover { color: var(--fih-title); }

/* ── Toggle row ──────────────────────────────────────────────────── */
.fih-toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  align-items: center;
  margin: 26px 0 4px;
}
/* .sort-pill is a <button> on /films and an <a> here; keep them identical. */
body.fih a.sort-pill { display: inline-block; text-decoration: none; }

/* ── Legend ──────────────────────────────────────────────────────── */
.fih-legend {
  display: flex;
  gap: 22px;
  margin-top: 14px;
  font-family: var(--fih-mono);
  font-size: 12px;
  color: var(--fih-muted);
}
.fih-legend-item { display: inline-flex; align-items: center; gap: 8px; }
.fih-legend-dot {
  width: 11px; height: 11px;
  border-radius: 3px;
  display: inline-block;
}
.fih-legend-dot--dom  { background: var(--fih-amber); }
.fih-legend-dot--intl { background: oklch(0.55 0.08 264); }

/* ── Stacked bar chart ───────────────────────────────────────────── */
/* padding-top leaves room for the value label above the tallest bar;
   padding-bottom for the year labels, which are lifted out of flow. */
.fih-stack-chart { position: relative; margin-top: 20px; padding: 24px 0 40px; }

.fih-stack-bars {
  position: relative;   /* baseline line positions against this box */
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 320px;
}

/* Column owns the tooltip anchor + the bottom-aligned bar, same
   mechanics as .fih-trend-col on /boxoffice. */
.fih-stack-col {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  outline: none;
}

.fih-stack-val {
  position: relative;
  z-index: 4;              /* sits above the baseline rule, not under it */
  font-family: var(--fih-mono);
  font-size: 11px;
  color: var(--fih-dim);
  margin-bottom: 5px;
  padding: 0 3px;
  background: var(--fih-bg);
  white-space: nowrap;
  transition: color .12s;
}
.fih-stack-col:hover .fih-stack-val,
.fih-stack-col:focus-visible .fih-stack-val { color: var(--fih-title); }

.fih-stack-bar {
  width: 100%;
  display: flex;
  flex-direction: column;   /* international sits above domestic */
  border-radius: 4px 4px 0 0;
  overflow: hidden;
  min-height: 3px;
  transition: filter .12s;
}
.fih-stack-col:hover .fih-stack-bar { filter: brightness(1.15); }

.fih-stack-seg { width: 100%; display: block; }
.fih-stack-seg--dom  { background: var(--fih-amber); }
.fih-stack-seg--intl { background: oklch(0.55 0.08 264); }

/* Year still in progress: hatched so it can never be misread as final. */
.fih-stack-bar--partial .fih-stack-seg--dom {
  background: repeating-linear-gradient(
    -45deg,
    var(--fih-amber) 0 5px,
    oklch(0.8 0.13 78 / 0.35) 5px 10px
  );
}

/* Lifted out of flow so the bar's height:% resolves against the full plot
   height and every bar bottom sits on the same line as the baseline rule. */
.fih-stack-year {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  text-align: center;
  font-family: var(--fih-mono);
  font-size: 11px;
  color: var(--fih-faint);
  margin-top: 9px;
  white-space: nowrap;
}
.fih-stack-year em {
  display: block;
  font-style: normal;
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--fih-amber);
}
.fih-stack-col:focus-visible .fih-stack-year { color: var(--fih-title); }

/* Baseline reference line (the pre-COVID benchmark year) */
.fih-baseline {
  position: absolute;
  left: 0; right: 0;
  border-top: 1px dashed oklch(0.6 0.02 264 / 0.55);
  pointer-events: none;
  z-index: 1;
}
.fih-baseline-label {
  position: absolute;
  right: 0;
  top: -18px;
  font-family: var(--fih-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--fih-dim);
  background: var(--fih-bg);
  padding: 0 6px;
}

/* Tooltip — same pattern as .fih-trend-tip, widened for the breakdown */
.fih-stack-tip {
  position: absolute;
  bottom: calc(100% - 20px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 190px;
  background: var(--fih-panel-2);
  border: 1px solid var(--fih-line);
  border-radius: 7px;
  padding: 9px 12px;
  font-family: var(--fih-mono);
  font-size: 11px;
  color: var(--fih-muted);
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s;
  z-index: 20;
  text-align: left;
}
.fih-stack-col:hover .fih-stack-tip,
.fih-stack-col:focus-visible .fih-stack-tip { opacity: 1; }
.fih-stack-tip strong {
  display: block;
  color: var(--fih-title);
  font-size: 12px;
  margin-bottom: 6px;
}
.fih-tip-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 0;
}
.fih-tip-row b { color: var(--fih-title); font-weight: 600; }
.fih-tip-top {
  display: block;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--fih-line-soft);
  color: var(--fih-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Notes panel ─────────────────────────────────────────────────── */
.fih-notes { margin-top: 40px; }
.fih-note-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--fih-muted);
}
.fih-note-list li { margin-bottom: 7px; }
.fih-note-list strong { color: var(--fih-text); }

/* ── Trends responsive ───────────────────────────────────────────── */
@media (max-width: 860px) {
  .fih-stack-val { display: none; }   /* 17 columns: values collide first */
  .fih-stack-bars { height: 240px; gap: 4px; }
}
@media (max-width: 700px) {
  .fih-dive-grid { grid-template-columns: 1fr; }
  .fih-toggle-row { gap: 10px; }
  .fih-toggle-row .sort-group { overflow-x: auto; white-space: nowrap; }
  .fih-stack-bars { height: 200px; gap: 3px; }
  .fih-stack-year { font-size: 9px; margin-top: 6px; }
  .fih-stack-year em { display: none; }
  .fih-stack-tip { min-width: 150px; font-size: 10px; }
  .fih-baseline-label { font-size: 9px; }
}

/* ── Streaming revenue dive (/trends/streaming-revenue) ──────────────
   Five-band stacked chart. Categorical hues chosen to avoid 152 (green)
   and 25 (red) — those mean direction everywhere else on the site and
   would read as up/down rather than as a company. */
.fih-seg--netflix   { background: var(--fih-amber); }
.fih-seg--disney    { background: oklch(0.68 0.12 264); }
.fih-seg--hbo       { background: oklch(0.62 0.13 310); }
.fih-seg--paramount { background: oklch(0.70 0.10 220); }
.fih-seg--peacock   { background: oklch(0.72 0.08 190); }

/* Hairlines between bands so adjacent segments stay distinguishable
   at small heights without needing gaps (which would break the stack). */
.fih-stack-bar .fih-stack-seg + .fih-stack-seg {
  box-shadow: 0 -1px 0 oklch(0.155 0.018 264 / 0.55);
}

.fih-toggle-hint {
  font-size: 13px;
  color: var(--fih-dim);
}

/* Tooltip needs more room for a five-row breakdown */
.fih-stack-tip .fih-legend-dot {
  width: 8px; height: 8px;
  margin-right: 7px;
  vertical-align: middle;
}
.fih-tip-total {
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px solid var(--fih-line-soft);
}
.fih-tip-total b { color: var(--fih-amber); }

@media (max-width: 700px) {
  .fih-toggle-hint { display: none; }
}
