/* Brushdown website. Shares the broadcast's dark studio look: one gold accent, and each
   painter's own colour (--accent) wherever a block belongs to a painter. */
:root {
  --bg: #14121a;
  --panel: #1e1b27;
  --panel-2: #2a2636;
  --line: #3d3850;
  --text: #f6f2ea;
  --muted: #b3adc4;
  --gold: #f5c542;
  --good: #6fdc9a;
  --bad: #ff8a8a;
  --paper: #f5f1e8;
  --accent: var(--gold);
  --font: "Avenir Next", "Inter", "Segoe UI Variable Display", "Segoe UI", "Cantarell", "Noto Sans", "Helvetica Neue", system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 12px; background: var(--gold); color: #15121b; padding: 6px 12px; border-radius: 8px; z-index: 10; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

.top { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding: 12px max(16px, calc((100vw - 1200px) / 2)); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.logo { font-size: 26px; font-weight: 800; letter-spacing: 0.05em; text-decoration: none; line-height: 1; }
.logo span { color: var(--gold); }
nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
nav a { text-decoration: none; font-weight: 700; padding: 7px 12px; border-radius: 99px; color: var(--muted); }
nav a:hover, nav a[aria-current] { color: var(--text); background: var(--panel-2); }
nav a.watch { color: #15121b; background: var(--gold); margin-left: 6px; }
nav a.watch:hover { background: #ffd966; color: #15121b; }

main { max-width: 1200px; margin: 0 auto; padding: 28px 16px 72px; outline: none; }
footer { max-width: 1200px; margin: 0 auto; padding: 20px 16px 40px; color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px 24px; border-top: 1px solid var(--line); }
.loading, .empty { color: var(--muted); padding: 24px 0; }

h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.08; font-weight: 800; letter-spacing: -0.01em; text-wrap: balance; }
h2 { font-size: 24px; font-weight: 800; line-height: 1.2; margin: 44px 0 14px; }
h2 small { font-size: 15px; font-weight: 600; color: var(--muted); margin-left: 10px; }
h3 { font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.lede { color: var(--muted); font-size: 18px; max-width: 64ch; margin-top: 12px; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

.panel { background: var(--panel); border-radius: 14px; padding: 20px; }
.grid { display: grid; gap: 14px; }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.cols-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid.align-start { align-items: start; }
.cols-skills { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .cols-skills { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .cols-skills { grid-template-columns: 1fr; } }
.cols-4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }

/* ---- hero ---- */
.hero { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); align-items: center; padding: 20px 0 8px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.btn { display: inline-block; text-decoration: none; font-weight: 800; padding: 11px 18px; border-radius: 99px; background: var(--panel-2); }
.btn:hover { background: var(--line); }
.btn.primary { background: var(--gold); color: #15121b; }
.btn.primary:hover { background: #ffd966; }
.facts { display: flex; flex-wrap: wrap; gap: 10px 32px; margin-top: 26px; }
.fact b { display: block; font-size: 30px; line-height: 1.1; font-weight: 800; font-variant-numeric: tabular-nums; }
.fact span { color: var(--muted); font-size: 14px; }

/* ---- match card ---- */
.duel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.side { --accent: var(--gold); background: var(--panel); border-radius: 14px; overflow: hidden; border-top: 4px solid var(--accent); display: flex; flex-direction: column; }
.side img { width: 100%; aspect-ratio: 4 / 3; background: var(--paper); }
.side .body { padding: 14px 16px 16px; display: grid; gap: 8px; }
.side .who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.side .who a { font-size: 22px; font-weight: 800; text-decoration: none; }
.side .who a:hover { text-decoration: underline; }
.side.won { box-shadow: 0 0 0 2px var(--gold); }
.votes { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; margin-left: auto; }
.duel-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 12px; }
.duel-head .scene { font-size: 20px; font-weight: 700; }
.duel-head .scene::first-letter { text-transform: uppercase; }
@media (max-width: 640px) { .duel { grid-template-columns: 1fr; } }

.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 9px; border-radius: 99px; background: var(--panel-2); color: var(--text); white-space: nowrap; }
.tag.win { background: var(--gold); color: #15121b; }
.tag.outline { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; }

/* ---- tables ---- */
.table-wrap { overflow-x: auto; background: var(--panel); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.n, th.n { text-align: right; }
td a { text-decoration: none; font-weight: 700; }
td a:hover { text-decoration: underline; }
.name-cell { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.scene-cell { min-width: 220px; }
.scene-cell::first-letter { text-transform: uppercase; }

/* ---- painter cards ---- */
.pcard { --accent: var(--gold); display: grid; gap: 10px; text-decoration: none; background: var(--panel); border-radius: 14px; padding: 18px; border-top: 4px solid var(--accent); transition: transform 0.15s, background 0.15s; }
.pcard:hover { background: var(--panel-2); transform: translateY(-2px); }
.pcard .pname { font-size: 24px; font-weight: 800; color: var(--accent); line-height: 1.1; }
.pcard p { color: var(--muted); font-size: 14px; }
.kv { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; }
.kv b { font-variant-numeric: tabular-nums; }
.kv span { color: var(--muted); }

/* ---- profile ---- */
.profile-head { --accent: var(--gold); border-left: 6px solid var(--accent); padding-left: 18px; }
.profile-head h1 { color: var(--accent); }
.statline { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 18px; }
.subnav { display: flex; flex-wrap: wrap; gap: 6px; margin: 22px 0 0; }
.subnav a { text-decoration: none; font-size: 14px; font-weight: 700; padding: 5px 12px; border-radius: 99px; background: var(--panel-2); color: var(--muted); }
.subnav a:hover { color: var(--text); }

.meter { display: grid; grid-template-columns: minmax(96px, 150px) minmax(60px, 1fr) 44px; align-items: center; gap: 12px; padding: 7px 0; }
.meter .label { font-weight: 700; }
.meter .value { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.track { position: relative; height: 10px; border-radius: 99px; background: var(--line); }
.track i { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: var(--accent); }
.track b { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--text); border-radius: 2px; }
.meter-note { grid-column: 2 / -1; color: var(--muted); font-size: 14px; margin-top: -4px; }
.mood-name { font-size: 30px; font-weight: 800; line-height: 1.1; color: var(--accent); }
.legend-note { color: var(--muted); font-size: 13px; margin-top: 8px; }
.legend-note b { display: inline-block; width: 2px; height: 12px; background: var(--text); vertical-align: -2px; margin-right: 6px; }

.list li { padding: 9px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 6px 12px; border-radius: 99px; background: var(--panel-2); font-weight: 600; font-size: 15px; }

.delta { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 800; padding: 2px 8px; border-radius: 99px; white-space: nowrap; margin: 0 4px 4px 0; border: 1px solid var(--line); }
.delta.up { color: var(--good); border-color: color-mix(in srgb, var(--good) 45%, transparent); }
.delta.down { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }

/* ---- small charts ---- */
.spark { background: var(--panel-2); border-radius: 10px; padding: 12px 14px 8px; }
.spark .row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.spark .row b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.spark .row span { font-weight: 700; }
.spark small { color: var(--muted); display: block; min-height: 2.9em; font-size: 13px; line-height: 1.4; margin-top: 2px; }
svg.chart { display: block; width: 100%; height: auto; overflow: visible; margin-top: 6px; }
svg.chart .grid-line { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
svg.chart .series { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
svg.chart .pt { fill: var(--accent); stroke: var(--panel-2); stroke-width: 1.5; }
svg.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--font); }
svg.chart .hit { fill: transparent; cursor: default; }
svg.chart .pt.on { r: 8; }
.bars { display: grid; gap: 5px; }
.bar-row { display: grid; grid-template-columns: 74px 1fr 22px; align-items: center; gap: 8px; font-size: 13px; }
.bar-row .track { height: 8px; }
.bar-row b { text-align: right; font-variant-numeric: tabular-nums; }

#tip { position: fixed; z-index: 20; pointer-events: none; background: #0d0b12; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font-size: 13px; line-height: 1.4; max-width: 260px; box-shadow: 0 6px 20px rgb(0 0 0 / 0.4); }
#tip b { display: block; font-variant-numeric: tabular-nums; }

/* ---- style cards ---- */
.style-card { background: var(--panel-2); border-radius: 10px; padding: 14px 16px; }
.style-card .row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-weight: 800; }
.style-card .track { margin: 9px 0 7px; height: 8px; }
.style-card .sub { color: var(--muted); font-size: 14px; }
details { margin-top: 8px; font-size: 14px; }
summary { cursor: pointer; color: var(--muted); font-weight: 700; }
details ul { margin-top: 6px; padding-left: 18px; list-style: disc; display: grid; gap: 4px; }

/* ---- gallery ---- */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 18px 0 20px; }
.filters label { color: var(--muted); font-size: 14px; font-weight: 700; }
select { font: inherit; font-weight: 700; color: var(--text); background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; }
.works { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 14px; }
.work { --accent: var(--gold); background: var(--panel); border-radius: 12px; overflow: hidden; text-decoration: none; display: flex; flex-direction: column; transition: transform 0.15s; }
.work:hover { transform: translateY(-2px); }
.work img { width: 100%; aspect-ratio: 4 / 3; background: var(--paper); border-bottom: 3px solid var(--accent); }
.work .cap { padding: 10px 12px 12px; display: grid; gap: 7px; font-size: 14px; }
.work .scene { font-weight: 700; font-size: 15px; line-height: 1.35; }
.work .scene::first-letter { text-transform: uppercase; }
.work .by { display: flex; align-items: center; gap: 7px; font-weight: 700; }

/* ---- records ---- */
.record { --accent: var(--gold); background: var(--panel); border-radius: 14px; padding: 18px; border-left: 4px solid var(--accent); display: grid; gap: 6px; align-content: start; }
.record .big { font-size: 34px; font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; }
.record .holder { font-weight: 800; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.record .holder a { text-decoration: none; }
.record .holder a:hover { text-decoration: underline; }
.record p { color: var(--muted); font-size: 14px; }
.h2h td, .h2h th { text-align: center; padding: 8px 6px; font-size: 14px; }
.h2h th:first-child, .h2h td:first-child { text-align: left; }
.h2h .self { color: var(--line); }
