/* Kinda Critic — design tokens.
 *
 * Dark editorial, art-led (IMDb-leaning). Deliberately distinct from
 * arkadendb.dk, whose brand is deep indigo + acid lime.
 *
 * The chart colours are NOT invented: they are the dataviz skill's validated
 * dark-mode palette, re-validated against this site's own surface (#1a1a19).
 * All checks pass — lightness band, chroma floor, CVD separation (worst
 * adjacent ΔE 8.4 protan), normal-vision floor (19.8), contrast ≥3:1.
 * Do not add a 5th series colour; fold to "Other" or facet.
 */
:root {
  /* Surfaces */
  --page:      #0d0d0d;   /* page plane */
  --surface:   #1a1a19;   /* cards, chart surface — the validator's surface */
  --raised:    #232322;   /* hover, table stripes */
  --hairline:  rgba(255,255,255,0.10);
  --grid:      #2c2c2a;
  --baseline:  #383835;

  /* Ink — contrast on --page: 19.4 / 10.9 / 5.4 */
  --ink:       #ffffff;
  --ink-2:     #c3c2b7;
  --ink-muted: #898781;

  /* Brand accent. UI only — links, focus, the score numeral.
   * NEVER a series colour (text wears text tokens; marks carry identity).
   * Contrast 9.67 on --page, 8.66 on --surface. */
  --accent:      #f0a93b;
  --accent-dim:  rgba(240,169,59,0.14);

  /* Series — validated set, fixed order, never cycled */
  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
  --series-4: #c98500;

  /* Diverging (agreement heatmap): blue ↔ red, neutral grey midpoint.
   * Validated: CVD ΔE 19.2, normal-vision 29.0. */
  --div-low:  #3987e5;
  --div-mid:  #383835;
  --div-high: #e66767;

  /* Status — reserved, never reused as a series */
  --warn:     #fab219;
  --critical: #d03b3b;

  --r-sm: 4px; --r-md: 8px; --r-lg: 14px;
  --pad: 20px;
  --maxw: 1180px;

  --font: system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font-family: var(--font); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }

/* ---- chrome ---- */
header.site {
  border-bottom: 1px solid var(--hairline); background: rgba(13,13,13,.9);
  backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 20;
}
header.site .wrap { display: flex; align-items: center; gap: 26px; height: 58px; }
.brand { font-weight: 800; letter-spacing: -.02em; font-size: 19px; color: var(--ink); }
.brand span { color: var(--accent); }
nav.site a { color: var(--ink-2); font-size: 14px; font-weight: 500; }
nav.site a:hover, nav.site a[aria-current] { color: var(--ink); text-decoration: none; }
nav.site { display: flex; gap: 20px; }
.searchbox {
  margin-left: auto; background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 999px; padding: 7px 14px; color: var(--ink-muted); font-size: 13px;
  min-width: 210px;
}

/* ---- procedural placeholder art ----
 * 0 of 1,630 media rows have artwork today, so this is the launch experience,
 * not a fallback. Hue is derived from the slug so a title always gets the same
 * colour, and the same generator gives each reviewer a consistent personal hue. */
.art { position: relative; border-radius: var(--r-md); overflow: hidden;
       background: var(--surface); display: block; }
.art .ph { position: absolute; inset: 0; display: grid; place-items: center; }
.art .ph b { font-size: 2.1em; font-weight: 800; letter-spacing: -.03em;
             color: rgba(255,255,255,.92); text-shadow: 0 1px 12px rgba(0,0,0,.45); }
.art.poster { aspect-ratio: 2/3; }
.art.wide   { aspect-ratio: 16/9; }
.art.face   { aspect-ratio: 1; border-radius: 999px; }

/* ---- score ----
 * IMDb-leaning: a gold numeral, not a colour-coded tier. The band NAME carries
 * the judgement, so meaning never rests on hue alone. */
.score { display: inline-flex; align-items: baseline; gap: 3px;
         font-variant-numeric: tabular-nums; }
.score b { color: var(--accent); font-weight: 800; letter-spacing: -.02em; }
.score .den { color: var(--ink-muted); font-size: .78em; }
.score.lg b { font-size: 40px; } .score.md b { font-size: 22px; } .score.sm b { font-size: 15px; }
.band { font-size: 11px; text-transform: uppercase; letter-spacing: .09em;
        color: var(--ink-2); font-weight: 700; }
.noscore { color: var(--ink-muted); font-style: italic; font-size: 13px; }

.pill { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .07em;
        text-transform: uppercase; padding: 3px 8px; border-radius: 999px;
        border: 1px solid var(--hairline); color: var(--ink-2); }
.pill.rank { color: var(--series-1); border-color: rgba(57,135,229,.4); }
.pill.warn { color: var(--warn); border-color: rgba(250,178,25,.4); }

/* ---- layout pieces ---- */
.card { background: var(--surface); border: 1px solid var(--hairline);
        border-radius: var(--r-lg); padding: var(--pad); }
.hero { display: grid; grid-template-columns: 230px 1fr; gap: 30px;
        margin: 30px 0; align-items: start; }
.hero.home { grid-template-columns: 200px 1fr; gap: 26px; margin-bottom: 6px; }
.hero.person { grid-template-columns: 132px 1fr; gap: 26px; }
.grid-cards { display: grid; gap: 20px;
              grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
h1 { font-size: 34px; line-height: 1.15; letter-spacing: -.025em; margin: 0 0 6px; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .11em;
     color: var(--ink-muted); margin: 34px 0 14px; font-weight: 700; }
h3 { font-size: 17px; margin: 0 0 10px; letter-spacing: -.01em; }
.meta { color: var(--ink-muted); font-size: 13px; }
.rowgrid { display: grid; gap: 16px; }
.shelf { display: grid; grid-auto-flow: column; grid-auto-columns: 152px;
         gap: 14px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.shelf > * { scroll-snap-align: start; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
     color: var(--ink-muted); font-weight: 700; padding: 0 10px 8px; }
td { padding: 11px 10px; border-top: 1px solid var(--hairline); vertical-align: top; }
tr:hover td { background: var(--raised); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
blockquote { margin: 6px 0 0; padding-left: 12px; border-left: 2px solid var(--accent-dim);
             color: var(--ink-2); font-size: 13.5px; }
footer.site { border-top: 1px solid var(--hairline); margin-top: 56px; padding: 26px 0 44px;
              color: var(--ink-muted); font-size: 13px; }
.notice { background: var(--accent-dim); border: 1px solid rgba(240,169,59,.28);
          border-radius: var(--r-md); padding: 11px 14px; font-size: 13px; color: var(--ink-2); }

/* ---- transcript ----
 * Rendered as a flat string-built block: 459,230 segments across the corpus,
 * so per-item overhead is what decides build time. */
.transcript { max-height: 70vh; overflow-y: auto; font-size: 14px; line-height: 1.6; }
.tseg { padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,.04); scroll-margin-top: 72px; }
.tseg:target { background: var(--accent-dim); border-radius: var(--r-sm); }
.tstamp { font-variant-numeric: tabular-nums; margin-right: 6px; }
.tseg b { color: var(--ink-2); font-weight: 700; margin-right: 4px; }

/* ---- phones ----
 * The header wraps to two rows (brand + search, then a scrollable nav), heroes
 * shrink their art column instead of stacking, and the three-column review
 * table becomes stacked blocks — a quote column cannot survive 360px. */
@media (max-width: 760px) {
  header.site .wrap { flex-wrap: wrap; height: auto; gap: 8px 14px;
                      padding-top: 10px; }
  header.site .searchbox { flex: 1; min-width: 0; overflow: hidden;
                           text-overflow: ellipsis; white-space: nowrap; }
  nav.site { order: 2; flex-basis: 100%; overflow-x: auto; padding-bottom: 10px;
             -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  nav.site::-webkit-scrollbar { display: none; }
  nav.site a { white-space: nowrap; }
}
@media (max-width: 640px) {
  :root { --pad: 14px; }
  h1 { font-size: 24px; }
  .score.lg b { font-size: 32px; }
  td { padding: 9px 8px; }
  .card { overflow-x: auto; }   /* safety net: no table may widen the page */
  .hide-sm { display: none; }
  .hero, .hero.home { grid-template-columns: 104px 1fr; gap: 16px; }
  .hero.person { grid-template-columns: 84px 1fr; gap: 16px; }
  .grid-cards { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
                gap: 14px; }
  .t-reviews thead { display: none; }
  .t-reviews tr { display: flex; flex-wrap: wrap; align-items: baseline;
                  gap: 2px 12px; padding: 10px 0;
                  border-top: 1px solid var(--hairline); }
  .t-reviews td { display: block; border: 0; padding: 0; width: auto !important; }
  .t-reviews td:last-child { flex-basis: 100%; }
  .t-reviews tr:hover td { background: none; }
}
