/* Film Room - screening-room library for Arminas's AI film breakdowns.
   Tokens: projector black, silver text, one tungsten accent for timecodes + active state. */
:root {
  --black: #000000;
  --stage: #161513;      /* raised surfaces: panels, inputs */
  --line: #2a2825;       /* separators */
  --silver: #d9d5cc;     /* body text */
  --white: #ffffff;      /* titles */
  --dim: #8a857b;        /* meta */
  --tungsten: #f3a73b;   /* timecodes, focus, active */
  --display: "Bebas Neue", "Oswald", Impact, sans-serif;
  --body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --poster-w: clamp(132px, 15vw, 196px);
  --wide-w: clamp(240px, 28vw, 380px);
}

* { box-sizing: border-box; }
html { background: var(--black); color-scheme: dark; }
body {
  margin: 0; background: var(--black); color: var(--silver);
  font: 400 16px/1.55 var(--body); font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--tungsten); outline-offset: 3px; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--tungsten); color: #000; padding: 8px 12px; z-index: 99; }
.skip:focus { left: 8px; }
main:focus { outline: none; }

/* ---------- top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 30;
  display: flex; align-items: center; gap: clamp(16px, 3vw, 40px);
  padding: 14px var(--gutter);
  background: linear-gradient(#000 0%, rgba(0,0,0,.75) 60%, rgba(0,0,0,0));
  transition: background .25s;
}
.topbar.solid { background: rgba(0,0,0,.94); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.brand-logo { display: block; height: 30px; width: auto; }
.brand-rule { width: 1px; height: 26px; background: rgba(255,255,255,.28); }
.brand-by { align-self: flex-end; padding-bottom: 3px; }
.brand-mark { font: 400 30px/1 var(--display); color: var(--white); letter-spacing: .02em; }
.brand-by { font-size: 13px; color: var(--dim); }
.nav { display: flex; gap: 22px; font-size: 15px; }
.nav a { white-space: nowrap; color: var(--dim); padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--white); }
.nav a[aria-current="page"] { color: var(--white); border-bottom-color: var(--tungsten); }
.search { margin-left: auto; }
.search input {
  width: clamp(160px, 22vw, 300px); padding: 9px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--stage); color: var(--white); font: inherit; font-size: 14px;
}
.search input::placeholder { color: var(--dim); }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: min(88vh, 820px);
  display: grid; align-items: end; padding: 120px var(--gutter) clamp(40px, 7vh, 80px);
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, #000 0%, rgba(0,0,0,.86) 34%, rgba(0,0,0,.2) 70%, rgba(0,0,0,.35) 100%),
    linear-gradient(0deg, #000 0%, rgba(0,0,0,0) 40%);
}
.hero-copy { position: relative; z-index: 1; max-width: 640px; }
.hero-kicker { font-size: 15px; color: var(--silver); margin: 0 0 6px; }
.hero-kicker time { color: var(--tungsten); font-variant-numeric: tabular-nums; }
.hero h1 {
  font: 400 clamp(56px, 9vw, 132px)/.88 var(--display); color: var(--white);
  margin: 0 0 18px; letter-spacing: .005em;
}
.hero h1.long { font-size: clamp(48px, 6.4vw, 96px); }
.hero p.lede { font-size: clamp(16px, 1.4vw, 19px); max-width: 56ch; margin: 0 0 26px; color: var(--silver); }

/* countdown strip under the hero title: the episode's picks as leader numbers */
.leader { display: flex; gap: 10px; margin: 0 0 28px; padding: 0; list-style: none; flex-wrap: wrap; }
.leader a {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px;
  padding: 6px 14px 6px 6px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px;
  background: rgba(0,0,0,.45); font-size: 14px; color: var(--white); max-width: 260px;
}
.leader a:hover { border-color: var(--tungsten); }
.leader .n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--white); color: #000; font: 400 19px/1 var(--display); padding-top: 2px; }
.leader .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 13px 22px; border-radius: 4px; border: 1px solid transparent; font-weight: 600; font-size: 15px;
}
.btn-play { background: var(--white); color: #000; }
.btn-play:hover { background: var(--tungsten); }
.btn-play::before { content: ""; width: 0; height: 0; border-left: 11px solid currentColor; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.btn-ghost { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.22); color: var(--white); }
.btn-ghost:hover { border-color: var(--white); }

/* ---------- rows ---------- */
.rows { position: relative; z-index: 2; padding-bottom: 40px; }
.row { margin: 0 0 clamp(34px, 5vh, 52px); }
.row-head { display: flex; align-items: baseline; gap: 16px; padding: 0 var(--gutter); margin-bottom: 14px; }
.row-head h2 { font: 650 clamp(19px, 1.7vw, 23px)/1.2 var(--body); color: var(--white); margin: 0; }
.row-head p { margin: 0; color: var(--dim); font-size: 14px; }
.row-head a.more { margin-left: auto; font-size: 14px; color: var(--dim); white-space: nowrap; }
.row-head a.more:hover { color: var(--white); }
.track {
  display: grid; grid-auto-flow: column; justify-content: start; gap: 14px; overflow-x: auto;
  padding: 4px var(--gutter) 14px; scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}

/* poster card: 2:3, the film itself */
.poster { width: var(--poster-w); display: block; }
.poster-img {
  position: relative; aspect-ratio: 2 / 3; border-radius: 3px; overflow: hidden; background: var(--stage);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}
.poster-img img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.poster-img .rank-badge { z-index: 2; }
.poster:hover .poster-img img { transform: scale(1.04); }
.poster:hover .poster-title { color: var(--tungsten); }
.poster-title { display: block; margin-top: 9px; color: var(--white); font-weight: 600; font-size: 15px; line-height: 1.25; }
.poster-by { display: block; color: var(--dim); font-size: 13px; margin-top: 2px; }
.tc { font-variant-numeric: tabular-nums; color: var(--tungsten); font-size: 13px; }
.poster .tc { display: block; margin-top: 3px; }
.rank-badge {
  position: absolute; left: 8px; top: 8px; min-width: 34px; height: 34px; padding: 3px 6px 0;
  display: grid; place-items: center; border-radius: 3px; background: rgba(0,0,0,.72); color: var(--white);
  font: 400 24px/1 var(--display);
}
/* typographic stand-in when a film has no still yet */
.poster-type {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 14px;
  background: radial-gradient(120% 80% at 20% 0%, #3a2a17 0%, #161513 55%, #0a0a0a 100%);
}
.poster-type b { font: 400 clamp(24px, 2.6vw, 34px)/.92 var(--display); color: var(--white); }
.poster-type i { font-style: normal; font-size: 12px; color: var(--silver); margin-top: 8px; }

/* wide card: 16:9, an episode */
.wide { width: var(--wide-w); display: block; }
.wide-img { aspect-ratio: 16 / 9; border-radius: 4px; overflow: hidden; background: var(--stage); position: relative; }
.wide-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.wide:hover .wide-img img { transform: scale(1.03); }
.wide:hover .wide-title { color: var(--tungsten); }
.wide-title { display: block; margin-top: 10px; color: var(--white); font-weight: 600; font-size: 16px; line-height: 1.3; }
.wide-meta { display: block; color: var(--dim); font-size: 13px; margin-top: 3px; }
.dur { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.8); color: var(--white); font-size: 12px; padding: 2px 6px; border-radius: 3px; font-variant-numeric: tabular-nums; }
.soon { position: absolute; left: 8px; bottom: 8px; background: var(--white); color: #000; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 3px; }

/* short: 9:16 */
.short { width: clamp(120px, 12vw, 160px); display: block; }
.short-img { aspect-ratio: 9 / 16; border-radius: 4px; overflow: hidden; background: var(--stage); }
.short-img img { width: 100%; height: 100%; object-fit: cover; }
.short:hover .poster-title { color: var(--tungsten); }

/* creator chip */
.creator { display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: center; width: 240px; padding: 10px; border-radius: 6px; border: 1px solid var(--line); }
.creator:hover { border-color: var(--silver); }
.avatar { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; background: var(--stage); display: grid; place-items: center; font: 400 24px/1 var(--display); color: var(--white); padding-top: 3px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.creator b { display: block; color: var(--white); font-weight: 600; font-size: 15px; line-height: 1.2; }
.creator span { display: block; color: var(--dim); font-size: 13px; }

/* ---------- inner pages ---------- */
.page { padding: 104px var(--gutter) 40px; }
.page-head { max-width: 900px; margin-bottom: 28px; }
.page-head h1 { font: 400 clamp(48px, 6.5vw, 92px)/.9 var(--display); color: var(--white); margin: 0 0 10px; }
.page-head p { margin: 0; max-width: 62ch; }

.filters { display: grid; gap: 12px; margin: 0 0 30px; }
.filter-group { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter-group > span { color: var(--dim); font-size: 14px; width: 92px; flex: none; }
.chip {
  border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 5px 13px;
  font-size: 14px; color: var(--silver); cursor: pointer; display: inline-block;
}
.chip:hover { border-color: var(--silver); color: var(--white); }
.chip[aria-pressed="true"] { background: var(--white); color: #000; border-color: var(--white); }
.result-count { color: var(--dim); font-size: 14px; margin: 0 0 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--poster-w), 1fr)); gap: 28px 16px; }
.grid .poster { width: auto; }
.grid-wide { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px 18px; }
.grid-wide .wide { width: auto; }
.grid-creators { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.grid-creators .creator { width: auto; }
.empty { padding: 40px 0; color: var(--silver); max-width: 52ch; }
.empty button { margin-top: 12px; }

/* film page */
.film-top { position: relative; padding: 110px var(--gutter) 40px; overflow: hidden; }
.film-backdrop { position: absolute; inset: 0; z-index: 0; }
.film-backdrop img { width: 100%; height: 100%; object-fit: cover; filter: blur(28px) saturate(1.1); transform: scale(1.15); opacity: .55; }
.film-backdrop::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, #000 0%, rgba(0,0,0,.55) 60%, rgba(0,0,0,.7) 100%); }
.film-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(180px, 300px) 1fr; gap: clamp(24px, 4vw, 56px); align-items: end; }
.film-grid .poster-img { box-shadow: 0 30px 60px rgba(0,0,0,.6); }
.film-info h1 { font: 400 clamp(52px, 7vw, 108px)/.88 var(--display); color: var(--white); margin: 0 0 12px; }
.film-by { font-size: 18px; margin: 0 0 10px; }
.film-by a { color: var(--white); border-bottom: 1px solid var(--dim); }
.film-by a:hover { border-color: var(--tungsten); }
.facts { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0 0 18px; padding: 0; list-style: none; color: var(--dim); font-size: 14px; }
.facts b { color: var(--silver); font-weight: 600; }
.logline { font-size: 18px; max-width: 60ch; margin: 0 0 24px; color: var(--white); }

.film-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: clamp(28px, 5vw, 72px); padding: 10px var(--gutter) 30px; }
.notes h2, .side h2 { font: 650 20px/1.2 var(--body); color: var(--white); margin: 0 0 14px; }
.note-list { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.note-list li {
  position: relative; padding: 16px 0 16px 22px; border-top: 1px solid var(--line);
  font-size: 18px; line-height: 1.5; color: var(--white); max-width: 66ch;
}
.note-list li::before { content: ""; position: absolute; left: 0; top: 27px; width: 9px; height: 2px; background: var(--tungsten); }
.note-src { color: var(--dim); font-size: 14px; margin-top: 12px; }
.side section { margin-bottom: 28px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.appear { display: grid; grid-template-columns: 112px 1fr; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.appear .wide-img { border-radius: 3px; }
.appear b { display: block; color: var(--white); font-weight: 600; font-size: 14px; line-height: 1.3; }
.appear span { display: block; font-size: 13px; color: var(--dim); }
.appear:hover b { color: var(--tungsten); }

/* episode page */
.ep-top { padding: 96px var(--gutter) 20px; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: clamp(24px, 4vw, 52px); align-items: start; }
.screen { position: relative; aspect-ratio: 16 / 9; background: var(--stage); border-radius: 4px; overflow: hidden; }
.screen img { width: 100%; height: 100%; object-fit: cover; }
.screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.screen-play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.25); border: 0; cursor: pointer; }
.screen-play span { width: 78px; height: 78px; border-radius: 50%; background: var(--white); display: grid; place-items: center; }
.screen-play span::before { content: ""; border-left: 22px solid #000; border-top: 14px solid transparent; border-bottom: 14px solid transparent; margin-left: 6px; }
.screen-play:hover span { background: var(--tungsten); }
.screen-soon { position: absolute; inset: auto 0 0 0; padding: 16px; background: linear-gradient(0deg, #000, transparent); color: var(--white); font-size: 15px; }
.ep-info h1 { font: 400 clamp(44px, 5vw, 76px)/.9 var(--display); color: var(--white); margin: 0 0 12px; }
.ep-info .facts { margin-bottom: 14px; }
.ep-info p { margin: 0 0 18px; }

.countdown { padding: 20px var(--gutter) 30px; }
.countdown h2 { font: 650 22px/1.2 var(--body); color: var(--white); margin: 0 0 6px; }
.countdown > p { margin: 0 0 18px; color: var(--dim); }
.pick { display: grid; grid-template-columns: 92px 120px minmax(0, 1fr) auto; gap: clamp(14px, 2vw, 26px); align-items: center; padding: 18px 0; border-top: 1px solid var(--line); }
.pick-n { font: 400 clamp(64px, 6vw, 96px)/.8 var(--display); color: var(--white); text-align: right; padding-top: 8px; }
.pick-n.also { font-size: 34px; color: var(--dim); }
.pick .poster-img { width: 120px; }
.pick h3 { margin: 0 0 3px; font: 650 19px/1.25 var(--body); color: var(--white); }
.pick h3 a:hover { color: var(--tungsten); }
.pick .by { margin: 0 0 8px; color: var(--dim); font-size: 14px; }
.pick .quote { margin: 0; max-width: 64ch; color: var(--silver); }
.pick .lesson { display: inline-block; margin-bottom: 6px; color: var(--tungsten); font-size: 14px; }
.seek {
  border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 8px 14px; cursor: pointer;
  font-size: 14px; color: var(--white); white-space: nowrap; font-variant-numeric: tabular-nums;
}
.seek:hover { border-color: var(--tungsten); color: var(--tungsten); }

/* creator page */
.creator-head { display: flex; gap: 22px; align-items: center; margin-bottom: 30px; }
.creator-head .avatar { width: 96px; height: 96px; font-size: 46px; }
.creator-head h1 { font: 400 clamp(46px, 6vw, 84px)/.9 var(--display); color: var(--white); margin: 0 0 6px; }

/* ---------- footer / signup ---------- */
.footer { border-top: 1px solid var(--line); padding: 44px var(--gutter) 36px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; }
.footer h2 { font: 400 44px/.95 var(--display); color: var(--white); margin: 0 0 10px; }
.footer p { margin: 0 0 16px; max-width: 52ch; }
.signup { display: flex; gap: 8px; flex-wrap: wrap; }
.signup input { flex: 1 1 220px; padding: 12px 14px; border-radius: 4px; border: 1px solid var(--line); background: var(--stage); color: var(--white); font: inherit; }
.signup-msg { font-size: 14px; color: var(--tungsten); min-height: 1.4em; margin-top: 8px; }
.footer-links { display: grid; gap: 10px; align-content: start; font-size: 15px; }
.footer-links a { color: var(--silver); }
.footer-links a:hover { color: var(--white); }
.footer-small { grid-column: 1 / -1; color: var(--dim); font-size: 13px; margin: 0; }

/* ---------- player overlay ---------- */
.player { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.92); display: grid; place-items: center; padding: 60px var(--gutter) 30px; }
.player[hidden] { display: none; }
.player-frame { width: min(1200px, 100%); aspect-ratio: 16 / 9; background: #000; }
.player-frame iframe, .player-frame video { width: 100%; height: 100%; border: 0; background: #000; }
.screen video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; }
.player-close { position: absolute; top: 16px; right: var(--gutter); background: transparent; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; padding: 8px 16px; cursor: pointer; }
.player-close:hover { border-color: var(--white); }

/* ---------- one orchestrated moment: hero title settles like a projector coming into focus ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero h1 { animation: focus-in .9s cubic-bezier(.2,.7,.2,1) both; }
  .hero-bg img { animation: lamp-up 1.4s ease-out both; }
}
@keyframes focus-in { from { filter: blur(14px); opacity: 0; letter-spacing: .08em; } to { filter: blur(0); opacity: 1; letter-spacing: .005em; } }
@keyframes lamp-up { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .nav { display: none; }
  .brand-by { display: none; }
  .brand-logo { height: 24px; }
  .brand-rule { height: 22px; }
  .brand-mark { font-size: 26px; }
  .search input { width: 46vw; }
  .film-grid { grid-template-columns: 140px 1fr; align-items: end; }
  .film-body, .ep-top, .footer { grid-template-columns: 1fr; }
  .pick { grid-template-columns: 54px 84px minmax(0, 1fr); }
  .pick .poster-img { width: 84px; }
  .pick .seek { grid-column: 3; justify-self: start; }
  .filter-group > span { width: 100%; }
  .mobile-nav { display: flex; }
}
.mobile-nav { display: none; gap: 18px; padding: 0 var(--gutter); margin: -10px 0 26px; font-size: 15px; position: relative; z-index: 2; }
.mobile-nav a { color: var(--dim); }
.mobile-nav a[aria-current="page"] { color: var(--white); }

/* ---------- film analysis (overview, shot study, transcript, frames) ---------- */
.poster-open { position: relative; display: block; }
.poster-open-cta {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 3; white-space: nowrap;
  padding: 8px 14px; border-radius: 999px; background: rgba(0,0,0,.78); border: 1px solid rgba(255,255,255,.3);
  color: var(--white); font-size: 13px; font-weight: 600; transition: background .2s, color .2s;
}
.poster-open:hover .poster-open-cta { background: var(--tungsten); color: #000; border-color: var(--tungsten); }
.btn-an { flex-direction: column; align-items: flex-start; gap: 1px; padding-top: 9px; padding-bottom: 9px; }
.btn-an span { font-weight: 400; font-size: 12px; color: var(--dim); }
.btn-an:hover span { color: var(--silver); }
.strip-shot { position: relative; display: block; width: clamp(150px, 14vw, 210px); aspect-ratio: 16 / 9; border-radius: 3px; overflow: hidden; background: var(--stage); }
.strip-shot.tall { width: clamp(92px, 8vw, 120px); aspect-ratio: 9 / 16; }
.strip-shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.strip-shot:hover img { transform: scale(1.05); }
.strip-shot .tc { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.78); padding: 1px 6px; border-radius: 3px; font-size: 12px; }

body.an-open { overflow: hidden; }
.an { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.82); display: grid; place-items: center; padding: clamp(0px, 2vw, 28px); }
.an[hidden] { display: none; }
.an-box {
  width: min(1480px, 100%); height: min(100%, 980px); display: grid; grid-template-rows: auto minmax(0, 1fr);
  background: #0b0b0a; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: 0 40px 120px rgba(0,0,0,.7);
}
@media (prefers-reduced-motion: no-preference) { .an:not([hidden]) .an-box { animation: an-in .28s cubic-bezier(.2,.7,.2,1) both; } }
@keyframes an-in { from { opacity: 0; transform: translateY(14px) scale(.99); } to { opacity: 1; transform: none; } }
.an-head { display: flex; align-items: flex-start; gap: 20px; padding: 22px clamp(18px, 3vw, 36px) 18px; border-bottom: 1px solid var(--line); }
.an-head > div { min-width: 0; }
.an-kicker { margin: 0 0 6px; font-size: 12px; letter-spacing: .28em; text-transform: uppercase; color: var(--dim); }
.an-head h2 { margin: 0; font: 400 clamp(34px, 4vw, 54px)/.92 var(--display); color: var(--white); }
.an-meta { margin: 6px 0 0; color: var(--dim); font-size: 14px; }
.an-close {
  margin-left: auto; flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 8px;
  border: 1px solid var(--line); font-size: 28px; line-height: 1; color: var(--white);
}
.an-close:hover { border-color: var(--tungsten); color: var(--tungsten); }
.an-body { display: grid; grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); min-height: 0; }
.an-side { overflow-y: auto; padding: 22px clamp(16px, 2vw, 26px) 30px; border-right: 1px solid var(--line); background: #0f0e0d; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.an-main { display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 0; }
.an-tabs { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 34px); padding: 0 clamp(18px, 3vw, 40px); border-bottom: 1px solid var(--line); overflow-x: auto; }
.an-tabs a { padding: 18px 2px 15px; color: var(--dim); font-size: 15px; white-space: nowrap; border-bottom: 2px solid transparent; }
.an-tabs a:hover { color: var(--white); }
.an-tabs a[aria-current="page"] { color: var(--white); border-bottom-color: var(--tungsten); }
.an-tabs a.an-dl { margin-left: auto; padding: 8px; border: 0; color: var(--dim); }
.an-tabs a.an-dl:hover { color: var(--tungsten); }
.an-panel { overflow-y: auto; padding: clamp(20px, 3vw, 36px) clamp(18px, 3vw, 40px) 50px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.an-panel:focus { outline: none; }
.an-wait { color: var(--dim); max-width: 56ch; }

/* side: shot viewer + inspector */
.an-viewer { position: relative; margin: 0 0 14px; max-height: 58vh; border-radius: 6px; overflow: hidden; background: #000; }
.an-viewer img { width: 100%; height: 100%; object-fit: contain; }
.an-viewer iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.an-viewer figcaption { position: absolute; inset: auto 0 0 0; display: flex; justify-content: space-between; padding: 26px 12px 10px; background: linear-gradient(0deg, rgba(0,0,0,.8), transparent); font-size: 13px; color: var(--white); }
.an-playfilm { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 64px; height: 64px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); cursor: pointer; display: grid; place-items: center; opacity: 0; transition: opacity .2s, background .2s; }
.an-viewer:hover .an-playfilm, .an-playfilm:focus-visible { opacity: 1; }
.an-playfilm:hover { background: var(--tungsten); }
.an-playfilm span { border-left: 18px solid #000; border-top: 11px solid transparent; border-bottom: 11px solid transparent; margin-left: 5px; }
@media (hover: none) { .an-playfilm { opacity: 1; width: 52px; height: 52px; } }
.pal { display: flex; height: 6px; border-radius: 2px; overflow: hidden; }
.pal i { display: block; min-width: 2px; }
.pal-lg { height: 14px; border-radius: 3px; margin-bottom: 8px; }
.an-hex { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 14px; font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.an-hex span { display: inline-flex; align-items: center; gap: 5px; }
.an-hex i { width: 9px; height: 9px; border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.an-note { margin: 0 0 14px; color: var(--white); font-size: 15px; line-height: 1.5; }
.an-dl-list, .an-stats { margin: 0 0 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.an-dl-list dt, .an-stats dt { font-size: 12px; color: var(--dim); }
.an-dl-list dd, .an-stats dd { margin: 1px 0 0; font-size: 14px; color: var(--silver); }
.an-stats { grid-template-columns: repeat(3, 1fr); padding-top: 16px; border-top: 1px solid var(--line); }
.an-stats dd { font: 400 26px/1.1 var(--display); color: var(--white); letter-spacing: .01em; }
.an-shot .tags { margin-bottom: 18px; }
.chip-static { cursor: default; font-size: 12px; padding: 3px 10px; }
.chip-static:hover { border-color: var(--line); color: var(--silver); }
.an-links { display: grid; gap: 8px; }
.an-links a, .an-links button { display: block; text-align: left; padding: 12px 14px; border-radius: 6px; border: 1px solid var(--line); background: var(--stage); color: var(--white); font-size: 14px; cursor: pointer; }
.an-links a:hover, .an-links button:hover { border-color: var(--tungsten); }

/* overview */
.an-badge { display: inline-block; padding: 5px 10px; border-radius: 4px; background: rgba(243,167,59,.12); color: var(--tungsten); font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.an-summary { margin: 16px 0 12px; font-size: clamp(19px, 1.6vw, 23px); line-height: 1.5; color: var(--white); max-width: 62ch; }
.an-src { margin: 0 0 22px; color: var(--dim); font-size: 13px; max-width: 72ch; }
.an-secs { list-style: none; margin: 0; padding: 0; }
.an-sec { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 16px; padding: 24px 0; border-top: 1px solid var(--line); }
.an-num { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 6px; border: 1px solid var(--line); font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }
.an-sec-k { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 4px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--tungsten); }
.an-conf { letter-spacing: 0; text-transform: none; color: var(--dim); white-space: nowrap; }
.an-sec h3 { margin: 0 0 8px; font: 650 clamp(19px, 1.5vw, 22px)/1.25 var(--body); color: var(--white); }
.an-sec p { margin: 0 0 12px; max-width: 68ch; line-height: 1.65; }
.an-evs { display: flex; flex-wrap: wrap; gap: 6px; }
.ev { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 4px; border: 1px solid var(--line); background: var(--stage); color: var(--silver); font-size: 12px; font-variant-numeric: tabular-nums; cursor: pointer; }
.ev:hover { border-color: var(--tungsten); color: var(--tungsten); }
.ev-play { border-left: 6px solid currentColor; border-top: 4px solid transparent; border-bottom: 4px solid transparent; }
.an-limits { margin-top: 10px; padding: 18px 20px; border-radius: 6px; background: var(--stage); }
.an-limits h3 { margin: 0 0 8px; font-size: 14px; color: var(--white); }
.an-limits ul { margin: 0; padding-left: 18px; color: var(--dim); font-size: 14px; }

/* shot study */
.an-shots-head h3, .an-h { margin: 0 0 6px; font: 650 clamp(22px, 2vw, 28px)/1.2 var(--body); color: var(--white); }
.an-shots-head p { margin: 0 0 18px; color: var(--dim); font-size: 14px; }
.an-filter { margin-bottom: 20px; }
.an-filter .chip { font-size: 13px; }
.an-filter .chip .n { color: var(--dim); margin-left: 3px; }
.an-filter .chip[aria-pressed="true"] .n { color: #555; }
.an-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px 16px; }
.an-grid.tall { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.shot { display: grid; gap: 8px; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.shot-img { position: relative; display: block; border-radius: 6px; overflow: hidden; background: var(--stage); box-shadow: 0 0 0 2px transparent; transition: box-shadow .15s; }
.shot-img img { width: 100%; height: 100%; object-fit: cover; }
.shot:hover .shot-img { box-shadow: 0 0 0 2px rgba(255,255,255,.4); }
.shot[aria-pressed="true"] .shot-img { box-shadow: 0 0 0 2px var(--tungsten); }
.shot-n, .shot-tc { position: absolute; background: rgba(0,0,0,.72); color: var(--white); border-radius: 4px; font-size: 13px; padding: 2px 7px; font-variant-numeric: tabular-nums; }
.shot-n { left: 8px; top: 8px; }
.shot-tc { right: 8px; bottom: 8px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; }
.shot-lab { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--silver); }
.shot-len { color: var(--dim); font-variant-numeric: tabular-nums; }

/* transcript */
.an-lines { list-style: none; margin: 0; padding: 0; max-width: 74ch; }
.an-lines li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 16px; color: var(--white); }
.an-lines button { justify-self: start; padding: 2px 0; border: 0; background: none; cursor: pointer; }
.an-lines button:hover { text-decoration: underline; }

/* frames contact sheet */
.an-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px; }
.an-sheet.tall { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.an-sheet button { position: relative; padding: 0; border: 0; background: var(--stage); cursor: pointer; border-radius: 3px; overflow: hidden; aspect-ratio: 16 / 9; }
.an-sheet.tall button { aspect-ratio: 9 / 16; }
.an-sheet img { width: 100%; height: 100%; object-fit: cover; }
.an-sheet .tc { position: absolute; right: 4px; bottom: 4px; background: rgba(0,0,0,.75); padding: 0 5px; border-radius: 2px; font-size: 11px; }
.an-sheet button:hover { outline: 2px solid rgba(255,255,255,.5); outline-offset: -2px; }
.an-sheet button[aria-pressed="true"] { outline: 2px solid var(--tungsten); outline-offset: -2px; }

@media (max-width: 900px) {
  .an { padding: 0; }
  .an-box { height: 100%; border-radius: 0; border: 0; display: block; overflow-y: auto; }
  .an-head { position: sticky; top: 0; z-index: 2; height: 76px; align-items: center; background: #0b0b0a; padding: 0 16px; }
  .an-kicker { display: none; }
  .an-head h2 { font-size: 30px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .an-meta { margin-top: 3px; font-size: 13px; }
  .an-close { width: 42px; height: 42px; }
  .an-hex, .an-dl-list, .an-shot .tags { display: none; }
  .an-stats { grid-template-columns: repeat(3, 1fr); }
  .an-body, .an-main { display: block; }
  .an-side { border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .an-viewer { margin-left: auto; margin-right: auto; }
  .an-tabs { position: sticky; top: 76px; z-index: 1; background: #0b0b0a; padding: 0 16px; }
  .an-viewer { max-height: 46vh; }
  .an-panel { overflow: visible; }
  .an-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .an-grid.tall { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}

/* breakdown page: per-film analysis entry */
.pick-acts { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.pick-acts .seek { text-align: center; }
.pick .poster-open-cta { bottom: 8px; padding: 5px 10px; font-size: 12px; }
.ep-info .actions { margin-top: 4px; }
@media (max-width: 860px) { .pick-acts { grid-column: 3; flex-direction: row; flex-wrap: wrap; } }

/* back + home buttons, always in the fixed top bar (hidden on the home page) */
.navbtns { display: flex; gap: 8px; margin-right: -6px; }
.navbtn {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(255,255,255,.22); background: rgba(0,0,0,.55); color: var(--white);
}
.navbtn:hover { border-color: var(--tungsten); color: var(--tungsten); }
body[data-section="home"] .navbtns { display: none; }
@media (max-width: 860px) { .navbtn { width: 36px; height: 36px; } .navbtns { gap: 6px; } }
