@font-face { font-family: Suisse; src: url(/assets/SuisseIntl-Regular.otf) format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: Plex; src: url(/assets/IBM-Plex-Mono.ttf) format("truetype"); font-weight: 400; font-display: swap; }

/* Light console theme. The films are dark, so the page around them is light and quiet. */
:root {
  --bg: #f5f5f2;
  --surface: #ffffff;
  --sunk: #ecece8;
  --line: rgba(10, 10, 11, .1);
  --line-strong: rgba(10, 10, 11, .18);
  --text: #0a0a0b;
  --muted: rgba(10, 10, 11, .62);
  --faint: rgba(10, 10, 11, .42);
  --blue: #0055ff;
  --blue-hi: #3478ff;
  --blue-soft: rgba(0, 85, 255, .08);
  --star: #0a0a0b;
  --focus: #0055ff;
  --col: 1080px;
  --inset: 20px;
  --shadow: 0 1px 2px rgba(10, 10, 11, .04), 0 8px 24px rgba(10, 10, 11, .06);
}
* { box-sizing: border-box; }
html { background: var(--bg); color-scheme: light; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 Suisse, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 1px solid var(--focus); outline-offset: 4px; }
.mono { font-family: Plex, monospace; }
.muted { color: var(--muted); }
a { color: inherit; }

/* Gate */
.gate { min-height: 100dvh; display: grid; place-items: center; padding: var(--inset); }
.gate-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 40px 32px; box-shadow: var(--shadow); }
.gate-logo { display: block; margin-bottom: 40px; }
.gate h1 { font-size: 36px; line-height: 1; letter-spacing: -1px; font-weight: 400; margin: 0 0 12px; }
.gate p.muted { margin: 0 0 32px; }
.gate form { display: grid; gap: 20px; }
.gate label { display: grid; gap: 8px; font-size: 13px; color: var(--muted); }
.field { height: 48px; padding: 0 14px; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font-size: 16px; }
.field:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.gate-error { color: #c4282d; margin: -4px 0 0; font-size: 14px; }
.btn-primary { height: 48px; padding: 0 20px; border: 0; border-radius: 6px; background: var(--blue); color: #fff; font-size: 15px; transition: background .2s; }
.btn-primary:hover { background: var(--blue-hi); }
.btn-ghost { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); text-decoration: none; font-size: 14px; transition: border-color .2s, background .2s; }
.btn-ghost:hover { border-color: var(--text); }

/* Header */
.wrap { max-width: calc(var(--col) + var(--inset) * 2); margin: 0 auto; padding: 0 var(--inset); }
header.top { position: sticky; top: 0; z-index: 30; background: rgba(245, 245, 242, .86); backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
header.top .title { font-size: 14px; color: var(--muted); padding-left: 16px; border-left: 1px solid var(--line); white-space: nowrap; }
header.top .spacer { flex: 1; }
.round-pick { position: relative; }
.round-pick select { appearance: none; -webkit-appearance: none; height: 34px; padding: 0 30px 0 12px; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%230a0a0b' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat right 11px center; font-size: 13px; cursor: pointer; }
.who { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.who button { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px; height: 34px; padding: 0 12px; color: var(--text); }
.who button:hover { border-color: var(--text); }
header.top a.link { font-size: 13px; color: var(--muted); text-decoration: none; white-space: nowrap; }
header.top a.link:hover, header.top a.link[aria-current="page"] { color: var(--text); }

/* Intro */
.intro { padding: 64px 0 40px; display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: end; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 16px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 11px; letter-spacing: .02em; background: var(--sunk); color: var(--muted); }
.pill.open { background: rgba(22, 163, 74, .1); color: #12733a; }
.pill.open::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #16a34a; }
.intro h1 { font-size: 56px; line-height: .98; letter-spacing: -1.7px; font-weight: 400; margin: 0 0 16px; }
.intro p { margin: 0; max-width: 600px; color: var(--muted); font-size: 17px; line-height: 1.45; }
.intro .actions { display: flex; gap: 8px; }
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 40px; }
.how div { background: var(--surface); padding: 16px 18px; font-size: 13px; color: var(--muted); }
.how b { display: block; font-weight: 400; color: var(--text); font-size: 14px; margin-bottom: 2px; }

/* Ranking */
.ranking { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 72px; }
.ranking-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; font-size: 12px; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; }
.ranking ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ranking li button { width: 100%; display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 8px; text-align: left; padding: 10px 12px; border: 1px solid transparent; border-radius: 6px; background: var(--bg); transition: border-color .2s; }
.ranking li button:hover { border-color: var(--line-strong); }
.ranking .pos { color: var(--faint); font-size: 12px; }
.ranking .nm { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ranking .sc { font-size: 13px; }
.ranking .sc small { color: var(--faint); font-size: 11px; margin-left: 4px; }
.ranking li:first-child button.has { background: var(--blue-soft); border-color: rgba(0, 85, 255, .2); }

/* Side menu: a thin rail of ticks that opens into a table of contents on hover */
.rail { position: fixed; left: 20px; top: 50%; transform: translateY(-50%); z-index: 25; display: none; }
.rail-inner { position: relative; padding: 12px 10px; border-radius: 10px; border: 1px solid transparent; transition: background .2s, border-color .2s, box-shadow .2s, width .2s; width: 44px; overflow: hidden; }
.rail:hover .rail-inner, .rail:focus-within .rail-inner { width: 280px; background: rgba(255, 255, 255, .96); border-color: var(--line); box-shadow: var(--shadow); }
.rail ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.rail a { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 10px; height: 32px; padding: 0 2px; border-radius: 6px; text-decoration: none; color: var(--faint); white-space: nowrap; }
.rail a .tick { display: block; height: 2px; width: 14px; border-radius: 1px; background: currentColor; transition: width .2s, background .2s; }
.rail a .lbl, .rail a .val { opacity: 0; transition: opacity .15s; font-size: 13px; }
.rail a .val { font-size: 12px; color: var(--faint); padding-right: 6px; }
.rail:hover a .lbl, .rail:hover a .val, .rail:focus-within a .lbl, .rail:focus-within a .val { opacity: 1; }
.rail a:hover { background: var(--bg); color: var(--text); }
.rail a.active { color: var(--text); }
.rail a.active .tick { width: 22px; background: var(--blue); }
.rail .rail-title { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); padding: 0 4px 8px; opacity: 0; transition: opacity .15s; white-space: nowrap; }
.rail:hover .rail-title, .rail:focus-within .rail-title { opacity: 1; }
@media (min-width: 1240px) { .rail { display: block; } }

/* Compact jump menu for narrower screens */
.jump { position: fixed; left: 16px; bottom: 16px; z-index: 25; }
.jump > button { height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, .94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: var(--shadow); display: inline-flex; align-items: center; gap: 10px; font-size: 13px; }
.jump .menu { position: absolute; left: 0; bottom: 52px; width: min(300px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 8px; display: none; }
.jump.open .menu { display: block; }
.jump .menu a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 10px; border-radius: 6px; text-decoration: none; font-size: 14px; }
.jump .menu a:hover, .jump .menu a.active { background: var(--bg); }
.jump .menu a span:last-child { color: var(--faint); font-size: 12px; }
@media (min-width: 1240px) { .jump { display: none; } }

/* Film card */
.film { padding-bottom: 104px; scroll-margin-top: 80px; max-width: max(720px, calc((100dvh - 230px) * 16 / 9)); margin: 0 auto; }
.film-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 16px; }
.film-head .idx { color: var(--faint); font-size: 12px; }
.film-head h2 { font-size: 32px; line-height: 1.05; letter-spacing: -.7px; font-weight: 400; margin: 0; }
.film-head .ver { color: var(--faint); font-size: 32px; letter-spacing: -.7px; }
.film-head .meta { margin-left: auto; color: var(--faint); font-size: 12px; white-space: nowrap; }
.film-tagline { margin: -6px 0 18px; font-size: 17px; color: var(--muted); max-width: 720px; }
.variants { display: inline-flex; gap: 4px; padding: 4px; border-radius: 8px; background: var(--sunk); margin-bottom: 14px; }
.variants button { border: 0; background: transparent; padding: 7px 14px; border-radius: 6px; font-size: 13px; color: var(--muted); }
.variants button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.film-body { display: grid; grid-template-columns: 1fr 340px; gap: 24px; margin-top: 16px; }
.brief { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px; display: grid; gap: 16px; align-content: start; }
.brief h3 { margin: 0 0 4px; font-weight: 400; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.brief p { margin: 0; font-size: 15px; line-height: 1.55; }
.brief ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.brief ol li { display: grid; grid-template-columns: 56px 1fr; gap: 8px; font-size: 14px; line-height: 1.45; }
.brief ol li button { all: unset; cursor: pointer; font-family: Plex, monospace; font-size: 12px; color: var(--blue); padding-top: 2px; }
.brief ol li button:hover { text-decoration: underline; }
.brief .ask { background: var(--blue-soft); border-radius: 6px; padding: 12px 14px; }
.brief .ask h3 { color: var(--blue); }

/* Player */
.player { position: relative; aspect-ratio: 16 / 9; width: 100%; background: #000; border-radius: 10px; overflow: hidden; user-select: none; -webkit-user-select: none; box-shadow: 0 2px 6px rgba(0, 0, 0, .08), 0 18px 48px rgba(0, 0, 0, .14); }
.player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.player .big-play { position: absolute; inset: 0; margin: auto; width: 76px; height: 76px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .18); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); display: grid; place-items: center; transition: transform .2s, background .2s, opacity .2s; }
.player .big-play:hover { background: rgba(255, 255, 255, .28); transform: scale(1.05); }
.player.playing .big-play { opacity: 0; pointer-events: none; }
.player .spinner { position: absolute; inset: 0; margin: auto; width: 36px; height: 36px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .2); border-top-color: #fff; animation: spin .8s linear infinite; opacity: 0; pointer-events: none; transition: opacity .2s; }
.player.waiting .spinner { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }
.controls { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 14px 10px; background: linear-gradient(transparent, rgba(0, 0, 0, .72)); display: grid; gap: 6px; transition: opacity .25s; color: #fff; }
.player.playing.idle .controls { opacity: 0; }
.player.playing.idle { cursor: none; }
.scrub { position: relative; height: 18px; cursor: pointer; touch-action: none; }
.scrub .track { position: absolute; left: 0; right: 0; top: 8px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .22); transition: height .15s, top .15s; }
.scrub:hover .track { height: 5px; top: 7px; }
.scrub .buf, .scrub .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; }
.scrub .buf { background: rgba(255, 255, 255, .3); }
.scrub .fill { background: #fff; }
.scrub .knob { position: absolute; top: 3px; width: 13px; height: 13px; margin-left: -6px; border-radius: 50%; background: #fff; transform: scale(0); transition: transform .15s; }
.scrub:hover .knob, .scrub.drag .knob { transform: scale(1); }
.scrub .mark { position: absolute; top: 6px; width: 2px; height: 7px; margin-left: -1px; background: rgba(255, 255, 255, .55); border-radius: 1px; pointer-events: none; }
.bar { display: flex; align-items: center; gap: 6px; }
.bar button { height: 32px; min-width: 32px; border: 0; background: transparent; border-radius: 4px; display: grid; place-items: center; padding: 0 6px; color: #fff; }
.bar button:hover { background: rgba(255, 255, 255, .12); }
.bar .time { font-size: 12px; color: rgba(255, 255, 255, .8); margin-left: 4px; }
.bar .spacer { flex: 1; }
.seg { display: inline-flex; padding: 2px; border-radius: 5px; background: rgba(255, 255, 255, .12); }
.seg button { height: 26px; min-width: 34px; font-size: 12px; color: rgba(255, 255, 255, .7); }
.seg button[aria-pressed="true"] { background: #fff; color: #000; }
.seg button[aria-pressed="true"]:hover { background: #fff; }
.next-up { position: absolute; right: 16px; bottom: 76px; display: none; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 6px; border: 0; background: rgba(255, 255, 255, .16); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: #fff; font-size: 13px; }
.next-up:hover { background: rgba(255, 255, 255, .26); }
.player.ended .next-up { display: flex; }

/* Rating */
.rate { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px; align-self: start; }
.rate-label { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; display: flex; justify-content: space-between; }
.stars { display: flex; gap: 2px; margin: 0 -6px 6px; }
.stars button { width: 46px; height: 46px; border: 0; border-radius: 6px; background: transparent; display: grid; place-items: center; color: rgba(10, 10, 11, .16); transition: color .12s, transform .12s, background .12s; }
.stars button svg { width: 28px; height: 28px; }
.stars button.on { color: var(--star); }
.stars button:hover { background: var(--bg); }
.stars button:active { transform: scale(.9); }
.stars.sent button.on { color: var(--blue); }
.stars[aria-disabled="true"] { pointer-events: none; opacity: .5; }
.rate-note { min-height: 20px; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.note-form { display: none; gap: 8px; margin: 8px 0 4px; }
.note-form.show { display: grid; }
.note-form textarea { resize: vertical; min-height: 64px; padding: 10px 12px; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 14px; }
.note-form textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.note-form .row { display: flex; justify-content: flex-end; gap: 8px; }
.note-form .row button { height: 34px; padding: 0 12px; font-size: 13px; }
.score { display: flex; align-items: baseline; gap: 10px; margin: 18px 0 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.score .avg { font-size: 40px; line-height: 1; letter-spacing: -1px; }
.score .avg.none { font-size: 18px; color: var(--muted); letter-spacing: 0; }
.score .cnt { font-size: 13px; color: var(--muted); }
.dist { display: grid; gap: 4px; }
.dist .row { display: grid; grid-template-columns: 14px 1fr 28px; gap: 8px; align-items: center; font-size: 11px; color: var(--faint); }
.dist .row .b { height: 4px; border-radius: 2px; background: var(--sunk); overflow: hidden; }
.dist .row .b i { display: block; height: 100%; background: var(--text); transition: width .4s; }
.dist .row span:last-child { text-align: right; }

/* Name dialog */
dialog { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); padding: 24px; width: min(360px, calc(100vw - 40px)); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(10, 10, 11, .35); }
dialog h3 { font-weight: 400; font-size: 20px; margin: 0 0 16px; }
dialog .field { width: 100%; margin-bottom: 16px; }
dialog .row { display: flex; gap: 8px; justify-content: flex-end; }
dialog .row button { height: 40px; padding: 0 16px; }

/* Results */
.results-grid { display: grid; gap: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 16px 12px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { font-weight: 400; color: var(--faint); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td .bar-mini { display: inline-block; width: 80px; height: 4px; border-radius: 2px; background: var(--sunk); vertical-align: middle; margin-right: 8px; overflow: hidden; }
td .bar-mini i { display: block; height: 100%; background: var(--text); }
.results h2 { font-weight: 400; font-size: 24px; letter-spacing: -.4px; margin: 56px 0 12px; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.results h2 small { font-size: 13px; color: var(--muted); letter-spacing: 0; }
.notes { display: grid; gap: 10px; }
.notes .n { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; font-size: 14px; }
.notes .n .who { display: flex; gap: 8px; font-size: 12px; color: var(--faint); margin-bottom: 4px; }

@media (max-width: 900px) {
  .intro { grid-template-columns: 1fr; }
  .ranking ol { grid-template-columns: repeat(2, 1fr); }
  .film-body { grid-template-columns: 1fr; }
  .how { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .intro { padding: 36px 0 24px; }
  .intro h1 { font-size: 38px; letter-spacing: -1px; }
  .intro p { font-size: 15px; }
  header.top .title, .who .lbl, header.top a.link.hide-sm { display: none; }
  .film-head { flex-wrap: wrap; gap: 4px 12px; }
  .film-head h2, .film-head .ver { font-size: 24px; }
  .film-head .meta { margin-left: 0; width: 100%; }
  .film-tagline { font-size: 15px; }
  .player { border-radius: 0; margin: 0 calc(var(--inset) * -1); width: auto; }
  .bar .time { display: none; }
  .ranking ol { grid-template-columns: 1fr 1fr; gap: 6px; }
  .ranking li button { grid-template-columns: 1fr auto; padding: 9px 10px; }
  .ranking .pos, .ranking .sc small { display: none; }
  .film { padding-bottom: 72px; }
  .how { display: none; }
  .intro .actions .btn-primary { width: 100%; }
  .round-pick select { max-width: 132px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } html { scroll-behavior: auto; } }
