:root {
  color-scheme: dark;
  --bg: #08080b;
  --raise: #121218;
  --ink: #f5f3ee;
  --muted: #a9a6b3;
  --line: #ffffff1f;
  --accent: #d9ff43;
  --accent-ink: #10130a;
  --sans: system-ui, -apple-system, "Segoe UI Variable Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --header: 4.25rem;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1rem / 1.55 var(--sans);
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, ol, ul, dl, dd { margin: 0; padding: 0; }
ol, ul { list-style: none; }
a { color: inherit; text-underline-offset: 0.22em; }
a:hover { color: var(--accent); }
button { font: inherit; cursor: pointer; }
main:focus { outline: none; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 0.3rem;
}

.shell {
  width: min(100% - 2 * var(--gutter), 92rem);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 30;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 1rem;
  transform: translateY(-220%);
  border-radius: 0.5rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}

.skip-link:focus { transform: none; color: var(--accent-ink); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Header */

.site-header {
  position: fixed;
  z-index: 20;
  inset: 0 0 auto;
  border-bottom: 1px solid transparent;
  background: linear-gradient(#08080bd9, #08080b00);
  transition: background-color 0.3s, border-color 0.3s, opacity 1s;
}

[data-scrolled] .site-header {
  border-color: var(--line);
  background: #08080be0;
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: var(--header);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.wordmark:hover { color: var(--ink); }

.mark {
  width: 0.7rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 1.1rem var(--accent);
}

.wordmark-tv {
  margin-left: -0.15rem;
  padding: 0.1rem 0.2rem 0.1rem 0.4rem;
  border-radius: 0.25rem;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.72em;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2.4vw, 2.2rem);
  font-size: 0.95rem;
  font-weight: 600;
}

.site-header nav a {
  padding-block: 0.4rem;
  text-decoration: none;
  white-space: nowrap;
  opacity: 0.82;
}

.site-header nav a:hover,
.site-header nav a[aria-current] { color: var(--ink); opacity: 1; }
.site-header nav a[aria-current] { box-shadow: 0 2px 0 var(--accent); }

.site-header nav .nav-search {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-inline: -0.4rem -0.6rem;
  padding: 0;
  border-radius: 50%;
  opacity: 1;
}

.nav-search:hover { background: #ffffff1c; }

/* Shared pieces */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.chip {
  display: inline-grid;
  place-items: center;
  min-width: 2rem;
  height: 2rem;
  padding-inline: 0.45rem;
  border-radius: 0.5rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.film-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  color: var(--muted);
  font-weight: 500;
}

/* The dot trails its item, so a wrapped line never starts with one. */
.film-meta > :not(:last-child)::after {
  margin-inline: 0.55em;
  content: "·";
}

.film-meta time { white-space: nowrap; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 3.4rem;
  padding: 0 1.75rem;
  border: 1px solid #ffffff38;
  border-radius: 999px;
  background: #ffffff1c;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: transform 0.25s var(--ease), background-color 0.2s, color 0.2s;
}

.button:hover { background: #ffffff33; color: var(--ink); transform: translateY(-2px); }
.button-primary { border-color: transparent; background: var(--ink); color: #0a0a0d; }
.button-primary:hover { background: var(--accent); color: var(--accent-ink); }

.play-glyph {
  width: 0.8em;
  aspect-ratio: 0.9;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  background: currentColor;
}

.text-button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.text-button:hover { color: var(--accent); }

/* Generated posters. Each film takes a hue from its ID; YouTube's still covers it once artwork is on. */

.tone-0 { --hue: 12; } .tone-1 { --hue: 34; } .tone-2 { --hue: 57; } .tone-3 { --hue: 79; }
.tone-4 { --hue: 102; } .tone-5 { --hue: 124; } .tone-6 { --hue: 147; } .tone-7 { --hue: 169; }
.tone-8 { --hue: 192; } .tone-9 { --hue: 214; } .tone-10 { --hue: 237; } .tone-11 { --hue: 259; }
.tone-12 { --hue: 282; } .tone-13 { --hue: 304; } .tone-14 { --hue: 327; } .tone-15 { --hue: 349; }

.art {
  --a: oklch(0.72 0.19 var(--hue, 30));
  --b: oklch(0.42 0.2 calc(var(--hue, 30) + 62));
  --c: oklch(0.2 0.07 calc(var(--hue, 30) - 28));
  position: absolute;
  inset: 0;
  overflow: hidden;
  background-color: #1a1a22;
  background-image:
    radial-gradient(120% 95% at 14% 8%, var(--a), transparent 56%),
    radial-gradient(95% 120% at 92% 100%, var(--b), transparent 62%),
    linear-gradient(140deg, var(--c), #050507);
}

.art::after {
  position: absolute;
  z-index: 2;
  inset: 0;
  background: url("grain.svg");
  mix-blend-mode: overlay;
  opacity: 0.55;
  content: "";
  pointer-events: none;
}

.art img {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.7s;
}

.art[data-loaded] img { opacity: 1; }

.art-backdrop::before {
  position: absolute;
  inset: -35%;
  background: conic-gradient(from 20deg at 62% 42%, var(--a), transparent 22%, var(--b) 48%, transparent 72%, var(--a));
  filter: blur(80px);
  opacity: 0.85;
  animation: drift 60s linear infinite;
  content: "";
}

@keyframes drift { to { transform: rotate(1turn); } }
@keyframes settle { from { transform: scale(1.09); } to { transform: scale(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(1.5rem); } to { opacity: 1; transform: none; } }

/* Home: the feature */

.marquee { position: relative; }

.feature {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: end;
  min-height: min(100svh, 68rem);
  padding-block: calc(var(--header) + 3rem) clamp(3.5rem, 9vh, 7rem);
  overflow: hidden;
}

.feature .art { z-index: -2; }
.feature .art[data-loaded] img { animation: settle 14s var(--ease) both; }

.feature::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(0deg, var(--bg) 0%, #08080b00 34%),
    linear-gradient(90deg, #08080b80 0%, #08080b00 60%);
  content: "";
}

[data-artwork] .feature::after {
  background:
    linear-gradient(0deg, var(--bg) 0%, #08080b00 38%),
    linear-gradient(90deg, #08080be6 0%, #08080b8c 42%, #08080b00 78%);
}

.feature-copy { animation: rise 0.9s var(--ease) both; }
.feature-copy > * + * { margin-top: 1.1rem; }

.feature-title,
.series-title,
.film-heading h1,
.prose h1,
.unavailable h1 {
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.88;
  text-transform: uppercase;
  text-wrap: balance;
}

.feature-title { max-width: 16ch; text-shadow: 0 0.04em 0.5em #00000059; }
.feature-title.scale-xl { font-size: clamp(4rem, 15.5vw, 13.5rem); }
.feature-title.scale-lg { font-size: clamp(3.1rem, 10.5vw, 9.25rem); }
.feature-title.scale-md { max-width: 20ch; font-size: clamp(2.5rem, 7.2vw, 6.4rem); }

.feature .film-meta { color: var(--ink); font-size: clamp(1rem, 1.4vw, 1.2rem); opacity: 0.86; }

.hook {
  max-width: 36rem;
  font: 400 clamp(1.15rem, 1.75vw, 1.55rem) / 1.42 var(--serif);
  text-wrap: pretty;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  padding-top: 0.6rem;
}

.marquee-empty {
  display: grid;
  align-items: end;
  min-height: 70svh;
  padding-block: calc(var(--header) + 3rem) 4rem;
  background: radial-gradient(90% 120% at 80% 0%, #2a2440, var(--bg) 70%);
}

/* Home: the catalog */

.catalog { padding-block: clamp(2rem, 5vw, 4rem) clamp(4rem, 9vw, 8rem); }

.tier,
.row { margin-top: clamp(2.5rem, 5vw, 4.25rem); }

.catalog > section:first-of-type,
.finder-home + section { margin-top: 0; }

.row-head {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem 1.25rem;
  margin-bottom: clamp(0.9rem, 1.6vw, 1.35rem);
}

.row-head > :nth-child(2) { margin-left: auto; }

.row-title {
  font-size: clamp(1.45rem, 2.4vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1;
}

.see-all {
  padding-block: 0.2rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

/* Arrows stay out of sight until the pointer or keyboard is on the row. */
.row-nav { display: none; gap: 0.4rem; opacity: 0; transition: opacity 0.2s; }
section:hover > .row-head .row-nav,
.row-nav:focus-within { opacity: 1; }

.row-nav button {
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  padding: 0 0 0.15rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #ffffff0d;
  color: var(--ink);
  font-size: 1.3rem;
  line-height: 1;
}

.row-nav button:hover:enabled { border-color: var(--accent); color: var(--accent); }
.row-nav button:disabled { opacity: 0.3; cursor: default; }

@media (hover: hover) and (pointer: fine) {
  .row-nav { display: flex; }
}

.tier-heading {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
}

.tier-letter {
  font-size: clamp(3rem, 5.6vw, 4.9rem);
  font-weight: 800;
  line-height: 0.8;
}

.tier-name {
  font-size: clamp(0.85rem, 1.1vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.tier-empty { max-width: 34rem; color: var(--muted); font: 400 1.15rem / 1.5 var(--serif); }

.film-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr));
  gap: clamp(1.75rem, 2.4vw, 2.25rem) clamp(1rem, 1.8vw, 1.75rem);
}

/* A home row: one line of cards that scrolls sideways and runs to the edge of the screen. */
.film-row {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: clamp(15.5rem, 22vw, 21rem);
  gap: clamp(0.8rem, 1.4vw, 1.4rem);
  margin: -0.9rem calc(-1 * var(--gutter)) -1.4rem;
  padding: 0.9rem var(--gutter) 1.4rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-padding-inline: var(--gutter);
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.film-row::-webkit-scrollbar { display: none; }
.film-row > * { scroll-snap-align: start; }

/* The full list: as many columns as fit, two on a phone. */
.film-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr));
  gap: clamp(1.4rem, 2.1vw, 2rem) clamp(0.9rem, 1.4vw, 1.4rem);
}

.film-card a { display: block; text-decoration: none; }
.film-card a:hover { color: var(--ink); }

.poster {
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 0.95rem;
  box-shadow: 0 0 0 1px #ffffff14, 0 1.5rem 3rem -1.5rem #000;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.film-card a:hover .poster,
.film-card a:focus-visible .poster {
  transform: translateY(-0.4rem) scale(1.025);
  box-shadow: 0 0 0 2px var(--accent), 0 2.5rem 4.5rem -1.5rem #000;
}

.film-card a:focus-visible { outline: none; }
.poster .art { z-index: -1; transition: transform 0.9s var(--ease); }
.film-card a:hover .art { transform: scale(1.06); }

.poster .chip {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  box-shadow: 0 0.4rem 1.2rem #00000080;
}

.poster-title {
  position: absolute;
  inset: auto 6cqw 5cqw;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.9;
  text-transform: uppercase;
  text-wrap: balance;
  transition: opacity 0.5s;
}

.poster-title.scale-xl { font-size: 15cqw; }
.poster-title.scale-lg { font-size: 11cqw; }
.poster-title.scale-md { font-size: 8.4cqw; }
.art[data-loaded] ~ .poster-title { opacity: 0; }

.badge {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  padding: 0.3rem 0.55rem;
  border-radius: 0.4rem;
  background: #08080bd9;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

/* A film this visitor finished: flagged and dimmed until hovered. */
.badge ~ .badge-watched { top: 2.5rem; }
.film-card[data-watched] .poster { opacity: 0.55; }
#history .film-card[data-watched] .poster { opacity: 1; }
.film-card[data-watched] a:hover .poster,
.film-card[data-watched] a:focus-visible .poster { opacity: 1; }

.film-card h3 {
  display: -webkit-box;
  margin-top: 0.95rem;
  overflow: hidden;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.card-label {
  margin-top: 0.9rem;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.card-label + h3 { margin-top: 0.25rem; }

.film-card .film-meta { flex-wrap: nowrap; margin-top: 0.2rem; font-size: 0.95rem; white-space: nowrap; }
.film-card .film-meta > * { flex: none; }
.film-card .film-meta > :first-child { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.film-card .film-meta > :first-child::after { content: none; }
.film-card .film-meta > :first-child + *::before { margin-inline: 0.55em; content: "·"; }

/* Search and filters */

/* The single column may shrink, so nothing inside can widen the page. */
.finder { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.75rem; }
.finder-home { margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.finder-home .search-field { max-width: 46rem; }
.search-row { display: flex; gap: 0.6rem; }

.search-field {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  min-width: 0;
}

.search-field .icon {
  position: absolute;
  left: 1.2rem;
  color: var(--muted);
  pointer-events: none;
}

.search-field input {
  width: 100%;
  min-height: 3.5rem;
  padding: 0 1.25rem 0 3.2rem;
  border: 1px solid #ffffff30;
  border-radius: 999px;
  background: #ffffff14;
  color: var(--ink);
  font: 500 1.08rem var(--sans);
  -webkit-appearance: none;
  appearance: none;
}

.search-field input::placeholder { color: var(--muted); opacity: 1; }
.search-field input:focus { border-color: var(--accent); background: #ffffff1f; outline: none; }
.search-field input::-webkit-search-cancel-button { -webkit-appearance: none; }

/* Suggestions drop from the search box as someone types. Tags live here, not on the page. */
.suggest {
  position: absolute;
  z-index: 30;
  top: calc(100% + 0.45rem);
  right: 0;
  left: 0;
  padding: 0.4rem;
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  background: #16161df7;
  box-shadow: 0 1.5rem 3rem -1rem #000;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.suggest li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0.95rem;
  border-radius: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.suggest li:hover,
.suggest li[aria-selected="true"] { background: #ffffff17; }
.suggest small { color: var(--muted); font-size: 0.78rem; font-weight: 500; }

.filter-button {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.55rem;
  min-height: 3.5rem;
  padding: 0 1.25rem;
  border: 1px solid #ffffff30;
  border-radius: 999px;
  background: #ffffff14;
  color: var(--ink);
  font: 600 1rem var(--sans);
  white-space: nowrap;
}

.filter-button:hover { border-color: #ffffff66; }
.filter-button[aria-expanded="true"] { background: #ffffff26; }
.filter-button[data-on] { border-color: var(--accent); color: var(--accent); }

/* One panel, a few plainly labelled menus. */
.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.9rem;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  background: #ffffff0a;
}

.choice > span {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.choice select {
  width: 100%;
  min-height: 2.75rem;
  padding: 0 2.2rem 0 0.95rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: #ffffff0d url("chevron.svg") no-repeat right 0.85rem center;
  color: var(--ink);
  font: 600 0.95rem var(--sans);
  text-overflow: ellipsis;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.choice select:hover { border-color: #ffffff59; }
.choice select[data-on] { border-color: var(--accent); background-color: #d9ff431f; }
.choice option { background: var(--raise); color: var(--ink); }

.finder-status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1rem;
  min-height: 1.5em;
  color: var(--muted);
  font-size: 0.95rem;
}

.pill {
  display: inline-flex;
  flex: none;
  align-items: center;
  min-height: 2.35rem;
  padding: 0 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff0d;
  color: var(--ink);
  font: 600 0.9rem var(--sans);
  text-decoration: none;
  white-space: nowrap;
}

.pill:hover { border-color: var(--accent); color: var(--accent); }

/* Browse and series pages */

.browse { padding-block: calc(var(--header) + clamp(1.5rem, 4vw, 3.25rem)) clamp(4rem, 9vw, 8rem); }

.browse-title {
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.9;
  text-transform: uppercase;
}

.browse-lede { margin-top: 0.9rem; color: var(--muted); font-size: 1.1rem; }
.browse .eyebrow a { color: var(--accent); text-decoration: none; }
.browse .film-grid { margin-top: clamp(1.5rem, 3vw, 2.5rem); }
.browse .tier-empty { margin-top: 2rem; }

/* The search bar stays in reach while the list scrolls under it, unless the filter panel is open. */
.browse .finder:has(.filters:not([hidden])) { position: static; }

.browse .finder {
  position: sticky;
  z-index: 10;
  top: var(--header);
  margin: 1.1rem calc(-1 * var(--gutter)) 0;
  padding: 0.75rem var(--gutter) 0.5rem;
  background: #08080bf0;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.browse .finder + .film-grid { margin-top: 1rem; }
.browse #series-hits { margin-top: 1.25rem; }
.results-title { margin-top: clamp(2rem, 4vw, 3rem); }
#series-hits + .film-grid { margin-top: 1rem; }
.more-results { display: grid; place-items: center; margin-top: 2.5rem; }
.series-title { margin-top: 0.9rem; }
.series-title.scale-xl { font-size: clamp(3rem, 9.5vw, 8rem); }
.series-title.scale-lg { font-size: clamp(2.6rem, 6.8vw, 5.75rem); }
.series-title.scale-md { font-size: clamp(2.1rem, 4.9vw, 4.2rem); }

/* Film page: the stage */

.stage {
  position: relative;
  isolation: isolate;
  padding-block: calc(var(--header) + clamp(0.75rem, 2vw, 1.75rem)) clamp(1.5rem, 3vw, 2.75rem);
  overflow: hidden;
}

.stage > .art {
  z-index: -2;
  inset: -12%;
  filter: blur(70px) saturate(1.35);
  opacity: 0.7;
  transition: opacity 1.2s;
}

.stage::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(0deg, var(--bg) 2%, #08080b66 45%, #08080bb3 100%);
  content: "";
}

.stage-inner { width: min(100% - 2 * var(--gutter), 92rem, (100svh - 15rem) * 1.7778); min-width: min(100% - 2 * var(--gutter), 30rem); }

.video-screen {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: clamp(0.7rem, 1.4vw, 1.25rem);
  background: #000;
  box-shadow: 0 0 0 1px #ffffff1f, 0 3.5rem 7rem -2.5rem #000;
}

.video-screen .art { z-index: -2; }

/* A vertical film gets a tall player that still fits on the screen. */
.screen-vertical { aspect-ratio: 9 / 16; }
.screen-square { aspect-ratio: 1; }
.stage-vertical .stage-inner { width: min(100% - 2 * var(--gutter), (100svh - 11rem) * 0.5625); min-width: 0; }
.stage-square .stage-inner { width: min(100% - 2 * var(--gutter), 100svh - 13rem); min-width: 0; }

.video-screen::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(0deg, #000000e0 0%, #00000000 42%),
    radial-gradient(60% 60% at 50% 50%, #00000059, #00000026);
  content: "";
}

.video-screen iframe {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.video-screen:has(iframe:focus-visible) { outline: 3px solid var(--accent); outline-offset: 4px; }

.player-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1rem;
  padding: 1rem;
  text-align: center;
}

.player-placeholder > p { max-width: 26rem; font-size: 1.1rem; font-weight: 600; text-shadow: 0 1px 1rem #000; }

.player-actions { display: flex; flex-wrap: wrap; gap: 0.3rem 1.3rem; }

.player-note {
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

/* Film page: heading, review and notes */

.film { padding-bottom: clamp(3rem, 7vw, 6rem); transition: opacity 1s; }

.film-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: clamp(1rem, 2.5vw, 2.25rem);
  padding-block: clamp(0.75rem, 2vw, 1.5rem) clamp(2rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--line);
}

.grade {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.35rem;
  width: clamp(5.25rem, 9.5vw, 8.5rem);
  aspect-ratio: 1;
  border-radius: clamp(1rem, 1.6vw, 1.5rem);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: clamp(3rem, 6vw, 5.6rem);
  font-weight: 800;
  line-height: 0.85;
}

.grade-label {
  font-size: clamp(0.5rem, 0.72vw, 0.66rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
}

.film-heading h1.scale-xl { font-size: clamp(3rem, 9.5vw, 8rem); }
.film-heading h1.scale-lg { font-size: clamp(2.6rem, 6.8vw, 5.75rem); }
.film-heading h1.scale-md { font-size: clamp(2.1rem, 4.9vw, 4.2rem); }
.film-heading .film-meta { margin-top: 1rem; font-size: clamp(1rem, 1.3vw, 1.15rem); }
.film-heading .film-meta a { color: var(--ink); }
.film-heading .film-meta a:hover { color: var(--accent); }
.film-heading .film-facts,
.film-heading .series-line { margin-top: 0.35rem; font-size: clamp(0.95rem, 1.2vw, 1.05rem); }
.film-heading .series-line { color: var(--ink); }
.original-title { margin-top: 0.3rem; color: var(--muted); font-size: 0.9rem; }

.tags { margin-top: 1rem; }

.tags summary {
  display: inline-block;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.22em;
  cursor: pointer;
  list-style: none;
}

.tags summary::-webkit-details-marker { display: none; }
.tags summary:hover { color: var(--accent); }
.tags p { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.8rem; }
.tags .pill { min-height: 1.95rem; padding-inline: 0.75rem; color: var(--muted); font-size: 0.8rem; }

.film-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(2rem, 6vw, 6rem);
  padding-top: clamp(2rem, 4vw, 3.5rem);
}

.review-heading,
.notes h2,
.more h2 {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.review-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.4rem 1.5rem; margin-bottom: 1.4rem; }
.review-heading h2 { color: var(--ink); font: inherit; }
.review-byline { letter-spacing: 0.08em; }

.review > p {
  max-width: 44rem;
  font: 400 clamp(1.2rem, 1.65vw, 1.5rem) / 1.6 var(--serif);
  text-wrap: pretty;
}

.review > p + p { margin-top: 1em; }

.review > p:first-of-type::first-letter {
  float: left;
  margin: 0.06em 0.12em 0 0;
  color: var(--accent);
  font: 800 3.5em / 0.78 var(--sans);
}

.notes h2 { margin-bottom: 0.5rem; }
.notes dl > div { padding-block: 1.1rem; border-top: 1px solid var(--line); }
.notes dt { color: var(--accent); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
.notes dd { margin-top: 0.35rem; color: #f5f3eee0; }

.more { padding-bottom: clamp(4rem, 8vw, 7rem); transition: opacity 1s; }
.more .row-head { align-items: center; margin-bottom: 1.25rem; padding-top: clamp(2rem, 4vw, 3rem); border-top: 1px solid var(--line); }

/* Lights down: the page recedes once the visitor clicks into the player, and returns on hover or focus. */

[data-playing] .film,
[data-playing] .more,
[data-playing] .site-footer,
[data-playing] .site-header { opacity: 0.38; }

[data-playing] .film:is(:hover, :focus-within),
[data-playing] .more:is(:hover, :focus-within),
[data-playing] .site-footer:is(:hover, :focus-within),
[data-playing] .site-header:is(:hover, :focus-within) { opacity: 1; }

[data-playing] .stage > .art { opacity: 0.3; }

/* Text pages */

.prose,
.unavailable {
  max-width: 58rem;
  padding-block: calc(var(--header) + clamp(3rem, 8vw, 7rem)) clamp(4rem, 9vw, 8rem);
}

.prose > * + * { margin-top: 1.5rem; }
.prose h1, .unavailable h1 { font-size: clamp(2.8rem, 8vw, 6.5rem); }
.prose .eyebrow { color: var(--accent); }
.prose a { color: var(--accent); }
.prose p { max-width: 44rem; color: #f5f3eee0; font-size: 1.1rem; }
.prose .points { max-width: 44rem; padding-left: 1.3em; list-style: disc; color: #f5f3eee0; font-size: 1.1rem; }
.prose .points li + li { margin-top: 0.35rem; }
.lede { color: var(--ink) !important; font: 400 clamp(1.3rem, 2.1vw, 1.75rem) / 1.42 var(--serif) !important; }

.steps {
  display: grid;
  gap: 0;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  counter-reset: step;
}

.steps > * {
  display: grid;
  gap: 0.5rem;
  padding-block: 1.75rem;
  border-top: 1px solid var(--line);
}

.steps h2 { font-size: clamp(1.35rem, 2.2vw, 1.8rem); font-weight: 800; letter-spacing: -0.02em; }
.steps :is(p, ul) + :is(p, ul) { margin-top: 0.5rem; }

ol.steps > li {
  grid-template-columns: clamp(3.5rem, 8vw, 6.5rem) minmax(0, 1fr);
  column-gap: 1rem;
  counter-increment: step;
}

ol.steps > li::before {
  grid-row: span 2;
  font-size: clamp(3rem, 6.5vw, 5.5rem);
  font-weight: 800;
  line-height: 0.85;
  content: counter(step);
}

/* Outline letters. The system font's glyphs are built from overlapping shapes, so a plain stroke
   also traces the seams inside them (lines through the A's crossbar, the B's and 2's joins).
   Painting the fill over the stroke hides those seams and leaves a clean outline. */
.tier-letter,
ol.steps > li::before {
  color: var(--bg);
  -webkit-text-stroke: 4px var(--accent);
  paint-order: stroke fill;
}

.unavailable p { margin-top: 1.5rem; font-size: 1.15rem; }

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
  transition: opacity 1s;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2.5rem;
  padding-block: clamp(1.75rem, 3.5vw, 2.5rem);
}

.site-footer .wordmark { color: var(--ink); }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1.6rem; font-size: 0.9rem; }
.site-footer .text-button { text-decoration: none; }

@media (max-width: 52rem) {
  .film-layout { grid-template-columns: 1fr; }
  .feature::after {
    background:
      linear-gradient(0deg, var(--bg) 4%, #08080bbf 46%, #08080b33 100%);
  }
}

/* Portrait screens: a 16:9 still cropped to a tall hero loses most of the frame.
   Show the whole frame under the header and set the copy beneath it. */
@media (orientation: portrait) and (max-width: 52rem) {
  .feature {
    min-height: 0;
    padding-block: calc(var(--header) + 56.25vw - 1.5rem) 2.75rem;
  }
  .feature .art img {
    inset: var(--header) 0 auto;
    height: auto;
    aspect-ratio: 16 / 9;
    -webkit-mask-image: linear-gradient(#000 70%, transparent);
    mask-image: linear-gradient(#000 70%, transparent);
  }
  .feature::after,
  [data-artwork] .feature::after {
    background: linear-gradient(0deg, var(--bg) 0%, #08080bb3 45%, #08080b00 68%);
  }
}

@media (max-width: 34rem) {
  :root { --header: 3.6rem; }
  .wordmark { gap: 0.45rem; font-size: 0.76rem; letter-spacing: 0.12em; }
  .site-header .wordmark-tv { display: none; }
  .site-header nav { gap: 0.8rem; font-size: 0.82rem; }
  .button { min-height: 3.1rem; padding-inline: 1.35rem; }
  .actions .button { flex: 1 1 auto; }
  .stage-inner { width: 100%; min-width: 0; }
  .video-screen { border-radius: 0; }
  .stage-vertical .video-screen,
  .stage-square .video-screen { border-radius: 0.7rem; }
  .film-row { grid-auto-columns: 68vw; }
  .film-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem 0.7rem; }
  .film-grid .poster { border-radius: 0.6rem; }
  .film-grid .film-card h3 { margin-top: 0.6rem; font-size: 0.95rem; }
  .film-grid .card-label { margin-top: 0.6rem; font-size: 0.62rem; }
  .film-grid .card-label + h3 { margin-top: 0.15rem; }
  .film-grid .film-meta { font-size: 0.8rem; }
  .film-grid .chip { top: 0.45rem; left: 0.45rem; min-width: 1.6rem; height: 1.6rem; font-size: 0.85rem; }
  .film-grid .badge { top: 0.45rem; right: 0.45rem; font-size: 0.56rem; }
  .film-grid .badge ~ .badge-watched { top: 1.75rem; }
  .search-field input,
  .filter-button { min-height: 3.1rem; font-size: 1rem; }
  .filter-button { padding-inline: 1rem; }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0.9rem; }
  .player-note { padding-inline: var(--gutter); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
