/* Artificial League — light and dark themes in the manner of an analysis site:
   white page, grey bands, hairline cards, serif headlines, one violet accent.
   Team colours (P1 blue, P2 red) appear only where a side is meant: board, scores, comments. */
:root {
  --bg: #ffffff;
  --band: #f1f2f4;
  --card: #ffffff;
  --line: #d9d9d9;
  --line-soft: #e8e8ea;
  --text: #000000;
  --text-2: #3a3a3a;
  --muted: #787878;
  --accent: #8842fd;
  --accent-ink: #ffffff;
  --mk-purple: #8842fd;
  --mk-yellow: #f2cf00;
  --mk-orange: #ff7433;
  --p1: #2f66f0;
  --p1-soft: rgba(47, 102, 240, .10);
  --p2: #e0303a;
  --p2-soft: rgba(224, 48, 58, .10);
  --cell: #ffffff;
  --cell-line: #e2e2e5;
  --board: #f1f2f4;
  --wall-a: #e3e4e8;
  --wall-b: #f4f4f6;
  --gem: #f2b600;
  --meter: #e9e9ec;
  --serif: "Source Serif 4", "Noto Serif KR", Georgia, "Times New Roman", serif;
  --sans: "Pretendard Variable", Pretendard, -apple-system, "Segoe UI", system-ui, sans-serif;
  --radius: 8px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #111112;
  --band: #18181a;
  --card: #1c1c1f;
  --line: #333337;
  --line-soft: #29292d;
  --text: #f4f4f5;
  --text-2: #d4d4d8;
  --muted: #9a9aa2;
  --accent: #a57cff;
  --accent-ink: #111112;
  --mk-purple: #a57cff;
  --mk-yellow: #f5d63d;
  --mk-orange: #ff8a52;
  --p1: #5b8cff;
  --p1-soft: rgba(91, 140, 255, .14);
  --p2: #ff5a5f;
  --p2-soft: rgba(255, 90, 95, .14);
  --cell: #232327;
  --cell-line: #303035;
  --board: #18181a;
  --wall-a: #2b2b30;
  --wall-b: #1f1f23;
  --gem: #f5c518;
  --meter: #2c2c31;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111112; --band: #18181a; --card: #1c1c1f; --line: #333337; --line-soft: #29292d;
    --text: #f4f4f5; --text-2: #d4d4d8; --muted: #9a9aa2; --accent: #a57cff; --accent-ink: #111112;
    --mk-purple: #a57cff; --mk-yellow: #f5d63d; --mk-orange: #ff8a52;
    --p1: #5b8cff; --p1-soft: rgba(91, 140, 255, .14); --p2: #ff5a5f; --p2-soft: rgba(255, 90, 95, .14);
    --cell: #232327; --cell-line: #303035; --board: #18181a; --wall-a: #2b2b30; --wall-b: #1f1f23; --gem: #f5c518; --meter: #2c2c31;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
:lang(ko) { word-break: keep-all; overflow-wrap: anywhere; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 400 16px/1.6 var(--sans);
}
main { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px 72px; }
img, video, svg { max-width: 100%; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--text); color: var(--bg); padding: 6px 12px; border-radius: 6px; z-index: 10; }
.skip:focus { left: 12px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -0.01em; }
:lang(ko) h1, :lang(ko) h2, :lang(ko) h3 { font-weight: 500; letter-spacing: -0.03em; }
h1 { font-size: clamp(2.3rem, 1.3rem + 3.6vw, 4.6rem); }
h2 { font-size: clamp(1.4rem, 1.15rem + .8vw, 1.75rem); display: flex; align-items: center; gap: 12px; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.note { color: var(--muted); font-size: .9rem; max-width: 72ch; }
.num, .mr-score, .mh-score, .fighter-score, .board b, .idx b, .stats dd, .rank, .controls output { font-variant-numeric: tabular-nums; }
.mk { display: inline-block; width: 14px; height: 14px; flex: none; background: var(--mk-purple); }
.mk.yellow { background: var(--mk-yellow); } .mk.orange { background: var(--mk-orange); }

/* header */
.top { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; max-width: 1240px; width: 100%; margin: 0 auto; padding: 14px 24px; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; background: #000; color: #fff; padding: 5px 16px 5px 6px; border-radius: 999px; font: 500 1.02rem/1 var(--serif); box-shadow: 0 0 0 1px var(--line); }
.brand img { width: 30px; height: 30px; }
.top nav { justify-self: center; display: flex; gap: 2px; background: var(--band); border-radius: 999px; padding: 4px; }
.top nav a { text-decoration: none; padding: 5px 14px; border-radius: 999px; font-size: .9rem; color: var(--text-2); }
.top nav a:hover { background: var(--card); color: var(--text); }
.top nav a[aria-current="page"] { background: var(--card); color: var(--text); box-shadow: 0 0 0 1px var(--line) inset; }
.top-tools { display: flex; gap: 8px; align-items: center; }
.lang { font-size: .86rem; color: var(--text-2); text-decoration: none; border: 1px solid var(--line); padding: 5px 12px; border-radius: 999px; }
.lang:hover { color: var(--text); border-color: var(--muted); }
.theme-toggle { all: unset; cursor: pointer; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--text); color: var(--bg); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; padding: 22px 24px 18px; background: var(--band); }
.foot-in { max-width: 1192px; margin: 0 auto; }
.foot-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px 40px; }
.foot-id { flex: 1 1 420px; max-width: 760px; }
.foot-id p { margin: 0; line-height: 1.6; }
.foot-name { display: inline-block; margin-bottom: 4px; color: var(--text); font: 600 1rem/1.3 var(--serif); text-decoration: none; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; padding-top: 3px; }
.foot-nav a { color: var(--text-2); text-decoration: none; }
.foot-nav a:hover, .foot-name:hover { color: var(--text); text-decoration: underline; }
.foot-legal { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--line-soft); font-size: .76rem; }

/* sections: grey band with white cards, like the reference */
.block { margin-top: 56px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 24px; }
.band { background: var(--band); border-radius: 14px; padding: 28px; }
.page-head { margin-top: 36px; }
.prose { max-width: 72ch; }
.about { margin-top: 40px; border-bottom: 1px solid var(--line); }
.about-sec { display: grid; grid-template-columns: minmax(160px, 300px) minmax(0, 1fr); gap: 16px 48px; padding: 32px 0; border-top: 1px solid var(--line); align-items: start; }
.about-sec h2 { margin: 0; }
.about-sec .prose > :last-child { margin-bottom: 0; }
.about-sec h3 { font: 600 1rem/1.4 var(--sans); margin: 1.6em 0 .4em; }
.about-sec li { margin-bottom: .35em; }
.rules-board { max-width: 340px; margin: 18px 0 8px; }
.rules-board .cell small { position: absolute; left: 3px; bottom: 1px; font: 500 9px/1 var(--sans); color: var(--muted); }
.rules-board .cell.p1 small, .rules-board .cell.p2 small { color: rgba(255, 255, 255, .8); }
.rules-board figcaption { margin-top: 8px; font-size: .84rem; color: var(--muted); }
.prose h2 { margin-top: 1.6em; }
.prose li { margin-bottom: .5em; }
.more { margin: 18px 0 0; }

.btn { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600; font-size: .92rem; padding: 9px 16px; border-radius: 6px; margin: 0 8px 8px 0; background: var(--accent); color: #fff; }
.btn.ghost { background: var(--card); color: var(--text); box-shadow: 0 0 0 1px var(--line) inset; }
.btn.ghost:hover { box-shadow: 0 0 0 1px var(--muted) inset; }
.chip { display: inline-block; font: 500 .74rem/1 var(--sans); padding: 4px 8px; border-radius: 999px; color: var(--text-2); background: var(--band); border: 1px solid var(--line-soft); vertical-align: middle; }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 48px; padding-top: 40px; align-items: start; }
.hero-copy p { color: var(--text-2); font-size: 1.05rem; max-width: 46ch; }
.hero-count { color: var(--muted) !important; font-size: .92rem !important; }
.hero-copy .cta { margin-top: 20px; max-width: none; display: flex; flex-wrap: wrap; gap: 8px; }
.cta .btn { margin: 0; white-space: nowrap; }
.hero-copy .more { white-space: nowrap; font-size: .92rem; }
.news { list-style: none; margin: 8px 0 0; padding: 0; }
.news li { border-bottom: 1px solid var(--line); }
.news a { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 14px 0; text-decoration: none; }
.news .when { grid-column: 1; font-size: .78rem; color: var(--accent); font-weight: 600; }
.news .what { grid-column: 1; font-weight: 500; }
.news .how { grid-column: 1; font-size: .86rem; color: var(--muted); }
.news .go { grid-column: 2; grid-row: 1 / span 3; align-self: start; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 4px; background: var(--band); font-size: .8rem; }
.news a:hover .what { text-decoration: underline; }

/* arena: the latest match plays on the board */
.arena {
  grid-column: 1 / -1; margin: 8px 0 0; display: grid; grid-template-columns: 1fr minmax(260px, 470px) 1fr; align-items: end; gap: 12px;
  padding: 28px 24px 18px; border-radius: 14px; background: var(--band);
}
.fighter { display: grid; justify-items: center; gap: 2px; }
.fighter-img { width: min(240px, 100%); height: auto; }
.fighter-name { font-weight: 700; font-size: 1rem; }
.fighter-score { font: 400 3rem/1 var(--serif); }
.fighter.p1 .fighter-score { color: var(--p1); }
.fighter.p2 .fighter-score { color: var(--p2); }
.arena-board { display: grid; gap: 10px; justify-items: center; align-self: center; }
.arena-turn { font-size: .86rem; color: var(--muted); }
.arena figcaption { grid-column: 1 / -1; text-align: center; color: var(--muted); font-size: .88rem; margin-top: 6px; }

/* board */
.board {
  --gap: 4px;
  display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: var(--gap);
  width: 100%; aspect-ratio: 1; padding: 10px; border-radius: 10px;
  background: var(--board); border: 1px solid var(--line);
}
.arena .board { background: var(--card); }
.cell { position: relative; border-radius: 4px; display: grid; place-items: center; background: var(--cell); border: 1px solid var(--cell-line); transition: background-color .25s, border-color .25s; }
.cell b { font-size: clamp(.7rem, .5rem + .9vw, 1.02rem); font-weight: 700; }
.cell.n b { color: var(--muted); }
.cell.p1 { background: var(--p1); border-color: var(--p1); color: #fff; }
.cell.p2 { background: var(--p2); border-color: var(--p2); color: #fff; }
.cell.res::before { content: ""; position: absolute; width: 20%; aspect-ratio: 1; top: 10%; right: 10%; background: var(--gem); transform: rotate(45deg); border-radius: 1px; }
.cell.p1.res::before, .cell.p2.res::before { background: #fff3b0; }
.cell.wall { background: repeating-linear-gradient(135deg, var(--wall-a) 0 5px, var(--wall-b) 5px 10px); border-color: var(--cell-line); }
.cell.base { box-shadow: 0 0 0 2px var(--text) inset; }
.cell.p1.base, .cell.p2.base { box-shadow: 0 0 0 2px #fff inset, 0 0 0 1px rgba(0, 0, 0, .25); }
.cell.cap { animation: cap .7s ease-out; }
@keyframes cap { from { box-shadow: 0 0 0 4px var(--accent); } to { box-shadow: 0 0 0 0 transparent; } }
.cell.base.cap { animation: none; }
.cell i { position: absolute; top: 2px; font: 700 .62rem/1 var(--sans); padding: 2px 3px; border-radius: 3px; pointer-events: none; }
.cell i.o1 { left: 2px; background: #dbe6ff; color: #12348f; }
.cell i.o2 { right: 2px; background: #ffdcdd; color: #8c0f17; }
.cell.res i.o2 { top: auto; bottom: 2px; }

/* leaderboard */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.leaderboard { width: 100%; border-collapse: collapse; min-width: 760px; font-size: .92rem; }
.leaderboard th, .leaderboard td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.leaderboard tbody tr:last-child td { border-bottom: 0; }
.leaderboard thead th { font-size: .78rem; color: var(--text-2); font-weight: 500; background: var(--band); white-space: nowrap; border-bottom: 1px solid var(--line); }
.leaderboard th button { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
.leaderboard th button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.leaderboard th[aria-sort="ascending"] button::after { content: "▲"; font-size: .55rem; }
.leaderboard th[aria-sort="descending"] button::after { content: "▼"; font-size: .55rem; }
.leaderboard th.num, .leaderboard td.num { text-align: right; }
.leaderboard tbody tr:hover { background: var(--band); }
.leaderboard .rank { font-weight: 600; color: var(--muted); width: 52px; }
.leaderboard .model { min-width: 270px; }
.leaderboard .model a { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; vertical-align: middle; margin-right: 8px; }
.leaderboard .model strong { display: block; font-weight: 600; }
.leaderboard .model small { display: block; color: var(--muted); font-size: .78rem; }
.avatar { border-radius: 50%; background: var(--band); object-fit: cover; flex: none; box-shadow: 0 0 0 1px var(--line-soft); }
.bar-cell { min-width: 160px; white-space: nowrap; }
.bar-cell .num { display: inline-block; min-width: 3.6em; text-align: right; }
.meter { display: inline-block; width: 90px; height: 8px; border-radius: 2px; background: var(--meter); vertical-align: middle; margin-right: 8px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--mk-purple); }
.meter.think i { background: var(--mk-yellow); }
.defs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 28px; margin: 18px 0 0; font-size: .84rem; color: var(--muted); }
.defs dt { color: var(--text); font-weight: 600; }
.defs dd { margin: 0; }

/* scatter */
.chart-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--band); border-radius: 999px; padding: 4px; margin-bottom: 1em; }
.seg button { all: unset; cursor: pointer; padding: 5px 14px; border-radius: 999px; font-size: .86rem; color: var(--text-2); }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--text); font-weight: 600; box-shadow: 0 0 0 1px var(--line) inset; }
.seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.scatter-wrap { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 8px; }
.scatter { width: 100%; height: auto; display: block; overflow: visible; }
.scatter .grid { stroke: var(--line-soft); }
.scatter .grid.mid { stroke: var(--muted); stroke-dasharray: 4 5; opacity: .6; }
.tick { fill: var(--muted); font: 500 11px var(--sans); }
.axis-label { fill: var(--text-2); font: 600 12px var(--sans); }
.pt { transform: translate(var(--x1), var(--y)); transition: transform .7s cubic-bezier(.2, .8, .2, 1), opacity .3s; }
.x-think .pt { transform: translate(var(--x2), var(--y)); }
.x-read .pt { transform: translate(var(--x3), var(--y)); }
.x-price .pt.no-price, .x-think .pt.no-think, .x-read .pt.no-read { opacity: 0; pointer-events: none; }
.pt .ring { fill: var(--band); stroke: var(--line); stroke-width: 1.5; }
.pt:hover .ring, .pt:focus .ring { stroke: var(--accent); stroke-width: 2.5; }
.pt-label { fill: var(--text); font: 600 11px var(--sans); paint-order: stroke; stroke: var(--card); stroke-width: 3px;
  transform: translate(var(--lx1), var(--ly1)); transition: transform .7s cubic-bezier(.2, .8, .2, 1); }
.x-think .pt-label { transform: translate(var(--lx2), var(--ly2)); }
.x-read .pt-label { transform: translate(var(--lx3), var(--ly3)); }
.scatter .xt, .scatter .xl { display: none; }
.x-price .xt-price, .x-price .xl-price, .x-think .xt-think, .x-think .xl-think, .x-read .xt-read, .x-read .xl-read { display: inline; }
.chart-foot { margin-top: 10px; font-size: .8rem; }

/* match lists */
.match-list { display: grid; gap: 8px; }
.match-row { display: grid; grid-template-columns: 120px 1fr 170px 1fr; align-items: center; gap: 14px; padding: 10px 16px; border-radius: var(--radius); text-decoration: none; background: var(--card); border: 1px solid var(--line); }
.match-row:hover { border-color: var(--muted); }
.mr-date { color: var(--muted); font-size: .84rem; }
.mr-side { display: flex; align-items: center; gap: 10px; opacity: .55; min-width: 0; }
.mr-side.won { opacity: 1; }
.mr-side.p2 { flex-direction: row-reverse; text-align: right; }
.mr-name { font-weight: 600; font-size: .94rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; }
.mr-name small { display: block; font-weight: 400; font-size: .74rem; color: var(--muted); }
.mr-side.p1 .avatar { box-shadow: 0 0 0 2px var(--p1); }
.mr-side.p2 .avatar { box-shadow: 0 0 0 2px var(--p2); }
.mr-score { display: grid; grid-template-columns: auto auto auto; justify-content: center; justify-items: center; column-gap: 8px; font: 400 1.5rem/1.2 var(--serif); }
.mr-score .p1 { color: var(--p1); } .mr-score .p2 { color: var(--p2); }
.mr-score i { font-style: normal; color: var(--muted); }
.mr-score small { grid-column: 1 / -1; font: 400 .74rem var(--sans); color: var(--muted); white-space: nowrap; }

/* match page */
.match-head { margin-top: 32px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; padding: 28px; border-radius: 14px; background: var(--band); }
.mh-side { display: grid; justify-items: center; text-align: center; gap: 4px; text-decoration: none; opacity: .7; }
.mh-side.won { opacity: 1; }
.mh-img { width: 120px; height: 120px; border-radius: 50%; background: var(--card); object-fit: cover; }
.mh-side.p1 .mh-img { box-shadow: 0 0 0 3px var(--p1); }
.mh-side.p2 .mh-img { box-shadow: 0 0 0 3px var(--p2); }
.mh-name { font-weight: 700; font-size: 1.2rem; }
.mh-full { color: var(--muted); font-size: .86rem; }
.mh-mid { text-align: center; }
.mh-score { font: 400 clamp(2.8rem, 2rem + 3vw, 4.4rem)/1 var(--serif); margin: 0 0 8px; display: flex; gap: 14px; justify-content: center; }
.mh-score .p1 { color: var(--p1); } .mh-score .p2 { color: var(--p2); }
.mh-score i { font-style: normal; color: var(--muted); }
.mh-result { font-weight: 700; font-size: 1.1rem; margin: 0 0 4px; }
.mh-meta { color: var(--muted); font-size: .86rem; margin: 0; }

.replay { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: 28px; align-items: start; }
.replay-main { display: grid; gap: 14px; }
.controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.controls button { all: unset; cursor: pointer; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 1.3rem; line-height: 1; }
.controls button:hover { border-color: var(--muted); }
.controls button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.controls .play { background: var(--text); color: var(--bg); border-color: var(--text); font-size: .85rem; }
.controls input[type="range"] { flex: 1; min-width: 140px; accent-color: var(--accent); }
.controls output { font-size: .88rem; color: var(--muted); min-width: 7em; text-align: right; }
.replay-side { display: grid; gap: 12px; }
.say { border-radius: var(--radius); padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--p1); }
.say.p2 { border-left-color: var(--p2); }
.say-head { display: flex; align-items: center; gap: 8px 10px; margin-bottom: 8px; flex-wrap: wrap; }
.say-idx { font-size: .78rem; color: var(--muted); }
.say.cast { border-left-color: var(--accent); background: var(--band); }
.say.cast dd.p1 { color: var(--p1); } .say.cast dd.p2 { color: var(--p2); }
.say-text { min-height: 3.2em; margin: 0 0 10px; font-size: 1rem; }
.say-text .orig { font-size: .7rem; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; margin-left: 6px; }
.say dl { display: flex; gap: 22px; margin: 0; font-size: .82rem; }
.say dt { color: var(--muted); }
.say dd { margin: 0; font-weight: 700; font-size: 1rem; }

.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.mini { margin: 0; padding: 14px 14px 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.mini figcaption { font-size: .86rem; color: var(--text-2); margin-bottom: 4px; }
.mini svg { width: 100%; height: auto; display: block; }
.mini .grid { stroke: var(--line-soft); }
.mini .tick { font-size: 17px; }
.mini .line { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.mini .line.p1 { stroke: var(--p1); } .mini .line.p2 { stroke: var(--p2); }
.mini .bar.p1 { fill: var(--p1); } .mini .bar.p2 { fill: var(--p2); }
.mini .cursor { stroke: var(--text); stroke-width: 1.5; stroke-dasharray: 3 4; opacity: .55; }

.highlights { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.highlights li { padding: 12px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); }
.highlights button { all: unset; cursor: pointer; display: flex; gap: 12px; align-items: baseline; font-weight: 600; }
.highlights button b { font-weight: 500; font-size: .8rem; color: var(--text-2); background: var(--band); border-radius: 999px; padding: 2px 10px; }
.highlights button:hover span { text-decoration: underline; }
.highlights button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.highlights p { margin: 6px 0 0; color: var(--text-2); font-size: .94rem; }
.closing { max-width: 70ch; font-size: 1.05rem; color: var(--text-2); }

.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.quote { margin: 0; padding: 14px 18px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--p1); }
.quote.p2 { border-left-color: var(--p2); }
.quote p { margin: 0 0 8px; font-family: var(--serif); font-size: 1.08rem; line-height: 1.5; }
.quote footer { color: var(--muted); font-size: .8rem; }
.data-link { font-size: .88rem; color: var(--muted); }

.yt-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #000; }
.yt-frame img, .yt-frame iframe { width: 100%; height: 100%; object-fit: cover; border: 0; display: block; }
.yt-play { all: unset; cursor: pointer; position: absolute; inset: 0; display: grid; place-items: center; }
.yt-play svg { width: 76px; }
.yt-play path:first-child { fill: rgba(20, 20, 20, .8); } .yt-play:hover path:first-child { fill: #f00; }
.yt-play .tri { fill: #fff; }
.yt-play:focus-visible { outline: 3px solid #fff; outline-offset: -6px; }

/* model page */
.model-hero { margin-top: 32px; display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 44px; align-items: center; }
.model-media { border-radius: 14px; overflow: hidden; background: #000; aspect-ratio: 1; }
.model-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.dev { color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.aka { color: var(--text-2); font-weight: 500; }
.summary { font-size: 1.05rem; color: var(--text-2); max-width: 56ch; }
.specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 22px 0 10px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.specs div { padding: 12px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--card); }
.specs dt { color: var(--muted); font-size: .78rem; }
.specs dd { margin: 2px 0 0; font-weight: 600; font-size: 1.02rem; }
.specs dd small { color: var(--muted); font-weight: 400; font-size: .74rem; }
.idx { display: inline-flex; align-items: center; gap: 6px; margin-right: 10px; }
.stat-set { margin-top: 18px; }
.stat-set h3 { display: flex; align-items: center; gap: 10px; font-family: var(--sans); font-size: 1rem; font-weight: 600; }
.stat-set h3 small { color: var(--muted); font-weight: 400; font-size: .85rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0; }
.stats div { padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); }
.stats dt { color: var(--muted); font-size: .82rem; }
.stats dd { margin: 4px 0 0; font: 400 1.9rem/1.1 var(--serif); }
.stat-foot { margin-top: 12px; font-size: .84rem; }
.clips { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.clip { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--card); cursor: pointer; }
.clip video { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: #000; }
.clip figcaption { padding: 8px 12px; font-size: .86rem; color: var(--text-2); }
.clip:hover figcaption, .clip.playing figcaption { color: var(--text); }

/* red team faces left, toward the blue team */
.mh-side.p2 .mh-img, .fighter.p2 .fighter-img { transform: scaleX(-1); }

/* header YouTube link */
.yt-link { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.yt-link svg { width: 18px; height: 18px; }
.yt-link:hover { color: #ff0033; border-color: var(--muted); }

/* video badge in match lists */
.vbadge { display: block; width: fit-content; margin: 3px auto 0; padding: 1px 7px; border-radius: 999px; background: #ff0033; color: #fff; font-size: .68rem; font-weight: 600; vertical-align: 1px; }

/* caster */
.caster-card { display: grid; grid-template-columns: minmax(180px, 240px) 1fr; gap: 24px; align-items: start; padding: 20px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.caster-who { display: flex; align-items: center; gap: 14px; }
.caster-who strong { display: block; font-size: 1.1rem; }
.caster-who small { display: block; color: var(--muted); font-size: .82rem; }
.cast-call { font-weight: 600; margin-bottom: .6em; }
.caster-say .closing { margin: 0; }
.mini .area.p1 { fill: var(--p1); opacity: .22; }
.mini .area.p2 { fill: var(--p2); opacity: .22; }
.mini .line.cast { fill: none; stroke: var(--text); stroke-width: 2; stroke-linejoin: round; }
.mini .grid.mid { stroke: var(--muted); stroke-dasharray: 4 4; }
.mini .tick.side { font-weight: 600; }
.mini .tick.side.p1 { fill: var(--p1); } .mini .tick.side.p2 { fill: var(--p2); }

/* before / after quotes as two separate rows */
.quote-group + .quote-group { margin-top: 28px; }
.quote-group h3 { font-family: var(--sans); font-size: .95rem; font-weight: 600; color: var(--text-2); margin-bottom: 10px; }
.quote-group .quotes { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
@media (max-width: 700px) { .caster-card { grid-template-columns: 1fr; gap: 14px; } }

/* tablets and phones */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 860px) {
  .top { grid-template-columns: auto 1fr; gap: 10px 12px; }
  .top-tools { justify-self: end; grid-row: 1; grid-column: 2; }
  .top nav { grid-column: 1 / -1; justify-self: stretch; justify-content: space-between; }
  .arena { grid-template-columns: 1fr 1fr; padding: 18px 14px; }
  .arena-board { grid-column: 1 / -1; grid-row: 2; }
  .fighter-img { width: 120px; }
  .fighter-score { font-size: 2.2rem; }
  .replay, .model-hero { grid-template-columns: 1fr; }
  .model-media { max-width: 420px; }
  .match-row { grid-template-columns: 1fr auto 1fr; padding: 10px 12px; gap: 10px; }
  .about-sec { grid-template-columns: 1fr; padding: 24px 0; }
  .mr-date { grid-column: 1 / -1; }
  .match-head { grid-template-columns: 1fr 1fr; padding: 20px; }
  .mh-mid { grid-column: 1 / -1; grid-row: 2; }
  .mh-img { width: 84px; height: 84px; }
}
@media (max-width: 700px) {
  .table-wrap { border: 0; background: none; overflow: visible; }
  .leaderboard { min-width: 0; display: block; }
  .leaderboard thead, .sort-hint { display: none; }
  .leaderboard tbody { display: grid; gap: 8px; }
  .leaderboard tbody tr {
    display: grid; grid-template-columns: 30px repeat(3, minmax(0, 1fr)); gap: 8px 10px; padding: 12px 14px;
    grid-template-areas: "rank model model model" "rank rec win idx" "rank share think opp";
    border: 1px solid var(--line); border-radius: var(--radius); background: var(--card);
  }
  .leaderboard tbody tr:hover { background: var(--card); }
  .leaderboard td { padding: 0; border: 0; text-align: left !important; min-width: 0; }
  .leaderboard td[data-label]::before { content: attr(data-label); display: block; font-size: .72rem; color: var(--muted); }
  .leaderboard .rank { grid-area: rank; width: auto; }
  .leaderboard .model { grid-area: model; min-width: 0; }
  .leaderboard .c-rec { grid-area: rec; } .leaderboard .c-win { grid-area: win; } .leaderboard .c-idx { grid-area: idx; }
  .leaderboard .c-share { grid-area: share; } .leaderboard .c-think { grid-area: think; } .leaderboard .c-opp { grid-area: opp; }
  .bar-cell { min-width: 0; }
  .bar-cell .meter { width: 56px; }
  .c-think .meter, .c-share .meter { display: none; }
  .bar-cell .num { min-width: 0; text-align: left; }
  .scatter-wrap { overflow-x: auto; }
  .scatter { min-width: 620px; }
}
@media (max-width: 520px) {
  main { padding: 0 16px 48px; }
  .top { padding: 12px 16px; }
  .top nav a { padding: 5px 10px; }
  .mr-side .avatar { width: 32px; height: 32px; }
  .mr-name { font-size: .82rem; }
  .mr-score { font-size: 1.25rem; }
  .board { --gap: 3px; padding: 6px; }
  .cell i { font-size: .5rem; padding: 1px 2px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
