:root {
  --bg: #121014;
  --surface: #1c191f;
  --surface-2: #26222a;
  --line: #34303a;
  --text: #f4efe8;
  --muted: #a49ca8;
  --then: #ffb547;
  --now: #7cc4ff;
  --radius: 14px;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #faf7f2;
    --surface: #ffffff;
    --surface-2: #f1ece4;
    --line: #e4ddd2;
    --text: #1b1720;
    --muted: #6b6370;
    --then: #c26a00;
    --now: #0a6fb8;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.55 var(--body); }
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.05; margin: 0; }
[hidden] { display: none !important; } /* components set display, which would otherwise override [hidden] */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

main, .site-header, .site-footer { width: min(1180px, 100% - 32px); margin-inline: auto; }

/* Header */
.site-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; }
.brand { display: flex; align-items: center; gap: 10px; font: 800 20px/1 var(--display); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--then); color: #121014; font-size: 18px; }
.site-header nav { display: flex; gap: 20px; font-size: 14px; }
.site-header nav a { text-decoration: none; color: var(--muted); }
.site-header nav a:hover { color: var(--text); }

/* Hero */
.hero { padding: 56px 0 40px; }
.eyebrow { margin: 0 0 12px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--then); }
.hero h1 { font-size: clamp(44px, 8vw, 96px); font-weight: 800; letter-spacing: -.03em; }
.hero h1 em { font-style: normal; color: var(--then); }
.lede { max-width: 540px; margin: 20px 0 0; font-size: 19px; color: var(--muted); }
.hero-stats { display: flex; flex-wrap: wrap; gap: 16px 48px; margin-top: 36px; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font: 700 34px/1 var(--display); }
.hero-stats span { margin-top: 6px; font-size: 14px; color: var(--muted); }

/* Highlights */
.highlights { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 64px; }
.highlight { display: flex; gap: 14px; align-items: center; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; transition: border-color .15s; }
.highlight:hover { border-color: var(--then); }
.highlight img { width: 96px; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; flex: none; }
.highlight div { min-width: 0; }
.highlight p { margin: 0; }
.hl-label { font-size: 12px; color: var(--muted); }
.hl-value { font: 700 20px/1.2 var(--display); }
.hl-detail { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Grid controls */
.controls { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.controls h2 { font-size: 32px; }
.control-row { display: flex; flex-wrap: wrap; gap: 10px; }
.search, .sort { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; }
.search:focus-within, .sort:focus-within { border-color: var(--then); }
.search svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.search input, .sort select { border: 0; background: none; color: var(--text); font: inherit; font-size: 15px; outline: none; }
.search input { width: 180px; }
.sort span { font-size: 13px; color: var(--muted); }
.sort select { cursor: pointer; }
.sort option { background: var(--surface); }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px 18px; }
.card { min-width: 0; text-decoration: none; display: flex; flex-direction: column; gap: 12px; }
.card-thumb { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); aspect-ratio: 16/9; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.85); transition: transform .3s, filter .3s; }
.card:hover .card-thumb img { transform: scale(1.04); filter: none; }
.card-year, .card-rank { position: absolute; padding: 3px 8px; border-radius: 6px; font: 700 13px/1.3 var(--display); }
.card-year { left: 10px; bottom: 10px; background: var(--then); color: #121014; }
.card-rank { right: 10px; top: 10px; background: rgb(0 0 0 / .65); color: #fff; }
.card-body { display: flex; gap: 12px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; background: var(--surface-2); }
.card-text { min-width: 0; }
.card h3 { font-size: 18px; }
.card p { margin: 3px 0 0; font-size: 14px; color: var(--muted); }
.card-first { color: var(--text) !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-stats { font-size: 13px !important; }
.empty { color: var(--muted); text-align: center; padding: 40px 0; }

/* Creator page */
.creator { padding-bottom: 40px; }
.back { display: inline-block; margin: 8px 0 28px; font-size: 14px; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--text); }
.creator-head { display: flex; align-items: center; gap: 20px; margin-bottom: 36px; }
.avatar-lg { width: 88px; height: 88px; border-radius: 50%; flex: none; background: var(--surface-2); }
.creator-head .eyebrow { margin-bottom: 6px; }
.creator-head h1 { font-size: clamp(36px, 6vw, 60px); font-weight: 800; letter-spacing: -.02em; }
.creator-sub { margin: 8px 0 0; color: var(--muted); }
.creator-sub a { color: var(--text); }

.versus { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.side { padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px); min-width: 0; }
.side-then { --accent: var(--then); }
.side-now { --accent: var(--now); }
.side-label { display: flex; align-items: center; gap: 8px; margin: 2px 0 14px; font: 700 15px/1 var(--display); color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.v-title { margin: 14px 0 4px; font-weight: 600; font-size: 17px; line-height: 1.35; }
.v-meta { margin: 0; font-size: 14px; color: var(--muted); }
.note { margin: 14px 0 0; padding: 10px 12px; font-size: 14px; color: var(--muted); background: var(--surface-2); border-radius: 10px; }

.player { position: relative; display: block; width: 100%; aspect-ratio: 16/9; padding: 0; border: 0; border-radius: var(--radius); overflow: hidden; background: #000; cursor: pointer; text-decoration: none; }
.player img { width: 100%; height: 100%; object-fit: cover; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.play { position: absolute; inset: 0; margin: auto; width: 68px; height: 68px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); transition: transform .15s; }
.play svg { width: 30px; height: 30px; fill: #121014; margin-left: 3px; }
.player:hover .play, .player:focus-visible .play { transform: scale(1.08); }
.player:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.len { position: absolute; right: 8px; bottom: 8px; padding: 2px 6px; border-radius: 4px; background: rgb(0 0 0 / .8); color: #fff; font-size: 12px; font-weight: 600; }
.player-external img { opacity: .45; }
.external-label { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 600; }
.player-missing { display: grid; place-items: center; color: var(--muted); cursor: default; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 20px 0 40px; }
.tile { padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.tile strong { display: block; font: 800 32px/1 var(--display); }
.tile span { display: block; margin-top: 8px; font-size: 14px; color: var(--muted); }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pager a { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }
.pager a:hover { border-color: var(--then); }
.pager .next { text-align: right; }
.pager span { font-size: 13px; color: var(--muted); }
.pager strong { font: 700 20px/1.2 var(--display); }

/* About */
.prose { max-width: 680px; padding: 40px 0 64px; }
.prose h1 { font-size: 48px; margin-bottom: 20px; }
.prose h2 { font-size: 24px; margin: 32px 0 8px; }
.prose p { color: var(--muted); font-size: 17px; }

/* Footer */
.site-footer { padding: 40px 0 56px; margin-top: 64px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.site-footer p { margin: 4px 0; }

@media (max-width: 1100px) { .highlights { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .highlights { grid-template-columns: minmax(0, 1fr); }
  .versus { grid-template-columns: 1fr; }
  .hero { padding-top: 32px; }
  .creator-head { gap: 14px; }
  .avatar-lg { width: 64px; height: 64px; }
  .controls { align-items: stretch; flex-direction: column; }
  .search { flex: 1; }
  .search input { width: 100%; }
  .grid { grid-template-columns: minmax(0, 1fr); }
}

/* Creator mini wiki */
.about { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; margin: 8px 0 48px; }
.wiki h2, .facts h2 { font-size: 28px; margin-bottom: 12px; }
.wiki h3 { font-size: 20px; margin: 28px 0 6px; }
.wiki p { margin: 0 0 12px; font-size: 17px; line-height: 1.65; color: var(--text); max-width: 68ch; }
.wiki-more { color: var(--muted) !important; font-size: 15px !important; margin-top: 24px !important; }
.facts { position: sticky; top: 20px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.facts h2 { font-size: 20px; }
.facts dl { margin: 0; }
.facts dl div { padding: 10px 0; border-top: 1px solid var(--line); }
.facts dt { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 3px 0 0; font-size: 15px; }
@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; }
  .facts { position: static; order: -1; }
}
