:root {
  --bg: #121214;
  --bg-2: #1a1a1e;
  --panel: #1f1f24;
  --line: #2d2d34;
  --text: #ecebe8;
  --muted: #a3a1a8;
  --accent: #f5b72f;
  --link: #f5c95c;
  --none: #4cb782;
  --mild: #a6c64b;
  --moderate: #f2c230;
  --strong: #f08a2c;
  --pervasive: #e5484d;
  --radius: 10px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #faf9f6;
    --bg-2: #f1efea;
    --panel: #ffffff;
    --line: #e2dfd8;
    --text: #1c1b1f;
    --muted: #66636b;
    --accent: #e0a114;
    --link: #a46a00;
    --none: #2f9a66;
    --mild: #7c9b23;
    --moderate: #c99a06;
    --strong: #d06c12;
    --pervasive: #cc2f35;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
}
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.small { font-size: 13px; color: var(--muted); }

/* header */
.top { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.top-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-size: 21px; letter-spacing: -0.02em; }
.brand b { color: var(--accent); }
.logo-mark { width: 28px; height: 28px; }
.top nav { display: flex; gap: 20px; }
.top nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.top nav a:hover { color: var(--text); }

/* footer */
.foot { border-top: 1px solid var(--line); margin-top: 72px; padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
.foot p { max-width: 720px; }

/* home */
.hero { padding: 48px 0 24px; max-width: 760px; }
.hero h1 { font: 700 clamp(32px, 6vw, 52px)/1.08 var(--font); letter-spacing: -0.03em; margin: 0 0 14px; }
.hero p { color: var(--muted); font-size: 18px; margin: 0; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.toolbar input, .toolbar select {
  background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 12px; font: inherit; font-size: 15px;
}
.toolbar input { flex: 1 1 200px; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: transparent;
  color: var(--muted); border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 13px; cursor: pointer;
}
.chip span { opacity: .7; }
.chip.on, .chip:hover { color: var(--text); border-color: var(--muted); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; display: inline-block; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 24px 18px; }
.card { color: var(--text); text-decoration: none; }
.card[hidden] { display: none; }
.poster { position: relative; aspect-ratio: 2 / 3; background: var(--bg-2); border-radius: var(--radius); overflow: hidden; }
.poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.card:hover .poster img { transform: scale(1.03); }
.badge {
  position: absolute; left: 8px; bottom: 8px; font-weight: 700; font-size: 15px; padding: 3px 9px;
  border-radius: 7px; color: #111; background: var(--c);
}
.card-text h3 { font-size: 15px; line-height: 1.3; margin: 10px 0 2px; }
.card-text p { margin: 0; font-size: 13px; color: var(--muted); }
.empty { color: var(--muted); }

/* band colours */
.band-none { --c: var(--none); }
.band-mild { --c: var(--mild); }
.band-moderate { --c: var(--moderate); }
.band-strong { --c: var(--strong); }
.band-pervasive { --c: var(--pervasive); }
.band-text { color: var(--c); }
.dot.band-none, .dot.band-mild, .dot.band-moderate, .dot.band-strong, .dot.band-pervasive { background: var(--c); }

/* meter */
.meter { position: relative; padding-top: 4px; }
.meter-track { display: flex; gap: 3px; height: 8px; }
.meter-big .meter-track { height: 12px; }
.seg { border-radius: 3px; opacity: .9; }
.seg-none { background: var(--none); flex: 1.5; }
.seg-mild { background: var(--mild); flex: 2; }
.seg-moderate { background: var(--moderate); flex: 2; }
.seg-strong { background: var(--strong); flex: 2.5; }
.seg-pervasive { background: var(--pervasive); flex: 2; }
.meter-pin {
  position: absolute; top: -2px; width: 4px; height: 20px; margin-left: -2px; border-radius: 2px;
  background: var(--text); box-shadow: 0 0 0 2px var(--bg);
}
.meter-big .meter-pin { height: 24px; }
.meter-scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 4px; }

/* review */
.review-head { display: grid; grid-template-columns: 240px 1fr; gap: 36px; padding: 40px 0 28px; align-items: start; }
.review-poster img { border-radius: var(--radius); width: 100%; height: auto; box-shadow: 0 10px 40px rgba(0,0,0,.35); }
.kicker { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; color: var(--accent); font-weight: 600; margin: 0 0 6px; }
.review h1 { font: 700 clamp(30px, 5vw, 46px)/1.1 var(--font); letter-spacing: -0.03em; margin: 0 0 8px; }
.review h1 .orig { font-weight: 400; color: var(--muted); font-size: .55em; }
.meta { color: var(--muted); margin: 0 0 22px; font-size: 15px; }
.score-block { display: flex; gap: 22px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px; max-width: 560px; }
.score-num { font-weight: 800; line-height: 1; color: var(--c); white-space: nowrap; }
.score-num span { font-size: 64px; letter-spacing: -0.04em; }
.score-num small { font-size: 20px; color: var(--muted); font-weight: 600; margin-left: 2px; }
.score-side { flex: 1; min-width: 0; }
.band-label { font-weight: 700; font-size: 20px; margin: 0 0 10px; }
.verdict { font: 400 20px/1.5 var(--serif); margin: 22px 0 0; max-width: 640px; }

.review section { margin-top: 44px; }
.review h2 { font-size: 22px; letter-spacing: -0.01em; margin: 0 0 8px; }
.hint { color: var(--muted); font-size: 14px; margin: 0 0 16px; max-width: 720px; }
.prose { max-width: 720px; }
.prose p { font: 400 18px/1.7 var(--serif); margin: 0 0 1.1em; }

.breakdown { width: 100%; border-collapse: collapse; font-size: 15px; }
.breakdown thead th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.breakdown tr.group th { text-align: left; padding: 22px 12px 6px; font-size: 13px; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; }
.breakdown tbody th[scope=row] { text-align: left; font-weight: 600; width: 26%; vertical-align: top; padding: 14px 12px; border-bottom: 1px solid var(--line); }
.breakdown td { vertical-align: top; padding: 14px 12px; border-bottom: 1px solid var(--line); }
.breakdown td p { margin: 0 0 6px; }
.breakdown tr.zero th, .breakdown tr.zero td { color: var(--muted); }
.cat-key { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--line); font-size: 12px; margin-right: 6px; }
.note { display: block; font-weight: 400; font-size: 12px; color: var(--muted); margin-top: 4px; }
.score { white-space: nowrap; width: 90px; }
.score .num { margin-left: 8px; font-weight: 700; }
.dots { display: inline-flex; gap: 4px; vertical-align: middle; }
.dots i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--muted); }
.dots i.on { background: var(--accent); border-color: var(--accent); }
.evidence { list-style: none; margin: 6px 0 0; padding: 0; font-size: 14px; color: var(--muted); }
.evidence li { position: relative; margin: 4px 0; padding-left: 14px; }
.evidence li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--line); }
.show-spoilers .evidence li.sp-full::before { background: var(--pervasive); }
.ts, .ep { display: inline-block; font-variant-numeric: tabular-nums; color: var(--text); font-size: 12.5px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; margin-right: 6px; line-height: 1.5; }
.ep { color: var(--accent); }
.evidence li.sp-count { padding-left: 0; text-indent: 0; }
.ts { display: inline-block; width: 66px; text-indent: 0; font-variant-numeric: tabular-nums; color: var(--text); font-size: 13px; background: var(--bg-2); border-radius: 4px; padding: 0 5px; margin-right: 4px; }
.evidence li.sp-count { font-style: italic; font-size: 13px; }
.evidence li.sp-count::before { display: none; }

/* spoilers and timestamps: both hidden by default */
html:not(.show-spoilers) .sp-full { display: none !important; }
html.show-spoilers .sp-safe { display: none !important; }
html:not(.show-ts) .ts, html:not(.show-ts) .tsx, html:not(.show-ts) .ts-only { display: none !important; }
.show-spoilers span.sp-full { background: color-mix(in srgb, var(--pervasive) 14%, transparent); border-radius: 3px; padding: 0 2px; }
.show-spoilers p.sp-full { border-left: 3px solid color-mix(in srgb, var(--pervasive) 60%, transparent); padding-left: 14px; margin-left: -17px; }
.evidence li.sp-full .ts { background: color-mix(in srgb, var(--pervasive) 30%, var(--bg-2)); }

.viewbar {
  position: sticky; top: 60px; z-index: 4; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
  padding: 12px 0; background: var(--bg); border-bottom: 1px solid var(--line);
}
.viewbar[hidden] { display: none; }
.toggle {
  display: inline-flex; align-items: center; gap: 9px; background: none; border: 0; padding: 4px 0;
  color: var(--text); font: inherit; font-size: 15px; cursor: pointer;
}
.sw { position: relative; width: 34px; height: 20px; border-radius: 10px; background: var(--line); transition: background .15s; flex: none; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--text); transition: transform .15s; }
.toggle[aria-pressed="true"] .sw { background: var(--accent); }
.toggle[aria-pressed="true"] .sw::after { transform: translateX(14px); background: var(--bg); }
.toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.viewbar-note { margin-left: auto; font-size: 13px; color: var(--muted); }

.calc ol { padding-left: 22px; max-width: 760px; }
.calc li { margin: 6px 0; }
.calc .alt { color: var(--muted); font-size: 14px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.facts h3 { font-size: 16px; margin: 0 0 8px; }
.facts ul { padding-left: 18px; margin: 0; color: var(--muted); }
.facts li { margin: 4px 0; }
.facts p { margin: 0 0 10px; color: var(--muted); }
.facts b { color: var(--text); }

/* method page */
.method { padding-top: 32px; }
.method h1 { font-size: 36px; letter-spacing: -0.02em; }
.method h2 { margin-top: 36px; }
.method p, .method li { font: 400 17px/1.7 var(--font); }
.method table { border-collapse: collapse; margin: 12px 0 20px; font-size: 15px; }
.method th, .method td { border-bottom: 1px solid var(--line); padding: 7px 12px; text-align: left; vertical-align: top; }
.method blockquote { margin: 16px 0; padding: 4px 18px; border-left: 3px solid var(--accent); color: var(--muted); }

@media (max-width: 760px) {
  .review-head { grid-template-columns: 1fr; gap: 20px; padding-top: 24px; }
  .review-poster { max-width: 180px; }
  .score-block { gap: 16px; padding: 14px 16px; }
  .score-num span { font-size: 48px; }
  .facts { grid-template-columns: 1fr; }
  .breakdown thead { display: none; }
  .breakdown, .breakdown tbody, .breakdown tr, .breakdown td, .breakdown th { display: block; width: auto; }
  .breakdown tbody th[scope=row] { border-bottom: 0; padding: 14px 0 4px; }
  .breakdown td { padding: 2px 0 12px; }
  .breakdown td.score { border-bottom: 0; }
  .breakdown tr.group th { padding: 20px 0 0; }
  .evidence li { padding-left: 0; text-indent: 0; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 20px 14px; }
  .top nav { gap: 14px; }
}
