/* yomibench site. One token system: colour (light and dark), type scale, spacing, radius.
   The champion's side is the warm accent; its opponent (the previous best) is the cool one. */
:root {
  --bg: #f5f4f0; --bg-2: #eeece6; --panel: #ffffff; --panel-2: #f6f5f1; --panel-3: #ebe9e3; --ink: #121317; --ink-2: #3a3d47;
  --muted: #676c79; --line: #e3e0d9; --line-2: #cfcbc2;
  --accent: #d9480f; --accent-ink: #a63a0c; --accent-soft: #fdebe0; --on-accent: #ffffff;
  --cool: #2563eb; --cool-ink: #1d4ed8; --cool-soft: #e5edfd;
  --p1: #5a4fd0; --p2: #c4303b;  /* the game's seat colours (P1 lavender, P2 salmon), darkened to read on light */
  --win: #157f3c; --win-soft: #e2f3e8; --loss: #c0362c; --loss-soft: #fbe7e5;
  --hm-pos: #c2410c; --hm-neg: #1d4ed8; --hm-mid: #eceae4;
  --band-a: rgba(18, 19, 23, 0.025); --band-b: rgba(18, 19, 23, 0.055); --band-now: rgba(217, 72, 15, 0.07);
  --shadow: 0 1px 2px rgba(18, 19, 23, 0.05), 0 8px 24px rgba(18, 19, 23, 0.06);
  --hero-glow: rgba(217, 72, 15, 0.16);
  --display: "Chakra Petch", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --fs-xs: 0.75rem; --fs-sm: 0.875rem; --fs-base: 1rem; --fs-md: 1.125rem; --fs-lg: 1.375rem;
  --fs-xl: 1.75rem; --fs-2xl: clamp(2rem, 4.5vw, 2.75rem); --fs-hero: clamp(2.6rem, 7vw, 4.75rem);
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --r-sm: 6px; --r: 12px; --r-lg: 18px;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px)); --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0b0f; --bg-2: #0e1015; --panel: #12141a; --panel-2: #181b23; --panel-3: #20242e; --ink: #f1f2f6; --ink-2: #c5c9d4;
    --muted: #8d93a3; --line: #232731; --line-2: #333845;
    --accent: #ff7a38; --accent-ink: #ffa477; --accent-soft: #2c1910; --on-accent: #1a0b03;
    --cool: #5b9bff; --cool-ink: #8db8ff; --cool-soft: #111c31;
    --p1: #aa9fff; --p2: #ff777f;  /* the in-game fighter colours */
    --win: #46d17e; --win-soft: #10291b; --loss: #ff6b5e; --loss-soft: #33130f;
    --hm-pos: #e0601f; --hm-neg: #3b7bf0; --hm-mid: #262a33;
    --band-a: rgba(255, 255, 255, 0.02); --band-b: rgba(255, 255, 255, 0.045); --band-now: rgba(255, 122, 56, 0.08);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.35);
    --hero-glow: rgba(255, 122, 56, 0.22);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0b0f; --bg-2: #0e1015; --panel: #12141a; --panel-2: #181b23; --panel-3: #20242e; --ink: #f1f2f6; --ink-2: #c5c9d4;
  --muted: #8d93a3; --line: #232731; --line-2: #333845;
  --accent: #ff7a38; --accent-ink: #ffa477; --accent-soft: #2c1910; --on-accent: #1a0b03;
  --cool: #5b9bff; --cool-ink: #8db8ff; --cool-soft: #111c31;
  --p1: #aa9fff; --p2: #ff777f;
  --win: #46d17e; --win-soft: #10291b; --loss: #ff6b5e; --loss-soft: #33130f;
  --hm-pos: #e0601f; --hm-neg: #3b7bf0; --hm-mid: #262a33;
  --band-a: rgba(255, 255, 255, 0.02); --band-b: rgba(255, 255, 255, 0.045); --band-now: rgba(255, 122, 56, 0.08);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.35);
  --hero-glow: rgba(255, 122, 56, 0.22);
  color-scheme: dark;
}

/* base */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--fs-base)/1.6 var(--body); overflow-x: hidden; }
img, video, svg { max-width: 100%; }
a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-lg); }
h3 { font-size: var(--fs-md); }
p { margin: 0; }
code, pre { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dim { color: var(--muted); font-weight: 400; }
.small { color: var(--muted); font-size: var(--fs-sm); }
.eyebrow, .tname { font: 500 var(--fs-xs)/1.2 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-ink); }
.tname { color: var(--muted); letter-spacing: 0.08em; }
.lead { font-size: var(--fs-md); color: var(--ink-2); max-width: 68ch; }
.note { max-width: 80ch; }
.more { font-weight: 600; font-size: var(--fs-sm); text-decoration: none; white-space: nowrap; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 999px; font-weight: 600; font-size: var(--fs-sm);
       text-decoration: none; white-space: nowrap; border: 1px solid transparent; transition: filter 0.15s, border-color 0.15s, background 0.15s; }
.btn svg { width: 15px; height: 15px; fill: currentColor; }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.primary:hover { color: var(--on-accent); filter: brightness(1.08); }
.btn.ghost { border-color: var(--line-2); color: var(--ink); background: color-mix(in srgb, var(--panel) 60%, transparent); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent-ink); }
.btn.sm { padding: 7px 14px; }
.button { display: inline-flex; align-items: center; padding: 10px 16px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 600; text-decoration: none; white-space: nowrap; }

/* header */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); background: var(--panel); z-index: 10; }
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: color-mix(in srgb, var(--bg) 82%, transparent);
       backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.bar { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: var(--s5); padding-block: 10px;
       padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 1.15rem var(--display); color: var(--ink); text-decoration: none; flex: none; letter-spacing: -0.01em; }
.brand:hover { color: var(--ink); }
.mark { width: 24px; height: 24px; border-radius: 7px; background: var(--accent); flex: none;
        background-image: linear-gradient(135deg, transparent 42%, rgba(255, 255, 255, 0.4) 42% 54%, transparent 54%),
                          linear-gradient(315deg, rgba(0, 0, 0, 0.18), transparent 60%); }
.mainnav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.mainnav::-webkit-scrollbar { display: none; }
.mainnav a { flex: none; padding: 7px 13px; border-radius: 999px; font-size: var(--fs-sm); font-weight: 500; color: var(--muted); text-decoration: none; }
.mainnav a:hover { color: var(--ink); background: var(--panel-2); }
.mainnav a.on { color: var(--ink); font-weight: 600; background: var(--panel-3); box-shadow: inset 0 0 0 1px var(--line-2); }
.actions { display: flex; align-items: center; gap: 6px; margin-left: auto; flex: none; }
.actions .cta.on { outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.themebtn, .gh { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 999px; color: var(--muted);
                 background: none; border: 0; padding: 0; cursor: pointer; }
.themebtn:hover, .gh:hover { color: var(--ink); background: var(--panel-2); }
.themebtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.gh svg { width: 18px; height: 18px; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 20; padding: 8px 12px; border-radius: var(--r-sm); background: var(--accent); color: var(--on-accent); font-weight: 600; text-decoration: none; }
.skip:focus { top: calc(8px + env(safe-area-inset-top, 0px)); }

/* layout */
.wrap { max-width: 1200px; margin: 0 auto; padding-block: var(--s6) var(--s8); padding-left: var(--gutter-l); padding-right: var(--gutter-r);
        display: flex; flex-direction: column; gap: var(--s7); }
.wrap > *, section { min-width: 0; }
section { display: flex; flex-direction: column; gap: var(--s4); }
.pagehead { display: flex; flex-direction: column; gap: var(--s3); }
.sechead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s2) var(--s4); }
.sechead > div { display: flex; flex-direction: column; gap: 6px; }
.subnav { display: flex; gap: var(--s2); overflow-x: auto; scrollbar-width: none; margin-bottom: calc(-1 * var(--s5)); }
.subnav::-webkit-scrollbar { display: none; }
.subnav a { flex: none; font-size: var(--fs-sm); padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line);
            background: var(--panel); color: var(--muted); text-decoration: none; }
.subnav a:hover { color: var(--ink); border-color: var(--line-2); }
.subnav a.on { color: var(--accent-ink); border-color: var(--accent); background: var(--accent-soft); }
.crumbs { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); font-size: var(--fs-sm); margin-bottom: calc(-1 * var(--s5)); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent-ink); }
.genstep { display: flex; gap: var(--s2); }
.genstep a { font: 500 var(--fs-xs) var(--mono); padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); }
.twocol { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: var(--s5); align-items: start; }
.panelbox { display: flex; flex-direction: column; gap: var(--s3); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg);
            padding: var(--s5); min-width: 0; }

/* Arena: page head, champion hero, stat strip */
.arenahead { gap: var(--s2); margin-bottom: calc(-1 * var(--s4)); }
.arenahead h1 { font-size: var(--fs-xl); }
.arenahead .lead { font-size: var(--fs-base); }
.headrow { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s4) var(--s6); }
.headtext { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; flex: 1 1 520px; }
.ladmeta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.ladmeta .pill:not(.closed) { color: var(--win); border-color: color-mix(in srgb, var(--win) 45%, var(--line)); background: var(--win-soft); }
.primarycard { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: linear-gradient(180deg, var(--accent-soft), var(--panel) 80%); }
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s6); align-items: center;
        padding: clamp(20px, 3.5vw, 40px); border-radius: 22px; border: 1px solid var(--line); overflow: hidden; isolation: isolate;
        background: radial-gradient(900px 420px at 12% -20%, var(--hero-glow), transparent 65%),
                    radial-gradient(700px 360px at 110% 120%, color-mix(in srgb, var(--cool) 14%, transparent), transparent 60%),
                    var(--panel); box-shadow: var(--shadow); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.5;
                background: repeating-linear-gradient(115deg, transparent 0 22px, color-mix(in srgb, var(--ink) 3%, transparent) 22px 23px);
                -webkit-mask-image: linear-gradient(90deg, #000, transparent 55%); mask-image: linear-gradient(90deg, #000, transparent 55%); }
.hero.novid { grid-template-columns: minmax(0, 1fr); }
.herotext { display: flex; flex-direction: column; gap: var(--s4); min-width: 0; }
.kicker { display: inline-flex; align-items: center; gap: 8px; font: 600 var(--fs-xs)/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-ink); }
.crown { width: 16px; height: 16px; fill: currentColor; flex: none; }
.champname { font: 700 var(--fs-hero)/0.95 var(--display); letter-spacing: -0.03em; }
.champname a { color: var(--ink); text-decoration: none; }
.champname span { color: var(--accent); }
.hero .lead { font-size: var(--fs-base); }
.tiles.hero-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hero-tiles .tile { background: color-mix(in srgb, var(--panel-2) 80%, transparent); padding: 12px 14px; }
.hero-tiles .tval { font-size: var(--fs-lg); }
.btns { display: flex; flex-wrap: wrap; gap: var(--s2); }
.herovid { margin: 0; display: flex; flex-direction: column; gap: var(--s3); min-width: 0; }
.screen { position: relative; border-radius: var(--r); overflow: hidden; background: #000; box-shadow: 0 0 0 1px var(--line-2), 0 20px 50px -20px rgba(0, 0, 0, 0.6); }
.screen video { width: 100%; aspect-ratio: 16 / 9; display: block; background: #000; }
.herovid figcaption { display: flex; flex-direction: column; gap: 6px; }
.vsline { display: flex; align-items: baseline; gap: 10px; font: 700 var(--fs-lg)/1.1 var(--display); }
.vsline small { font: 500 var(--fs-sm) var(--body); color: var(--muted); }
.vsline .p1, .fight .p1 { color: var(--p1); }  /* each side in its seat's fighter colour, P1 (left) first */
.vsline .p2, .fight .p2 { color: var(--p2); }
.vsline .vs, .fight .vs { font: 600 var(--fs-xs) var(--mono); color: var(--muted); text-transform: uppercase; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: var(--fs-xs); padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink-2); }
.strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); overflow: hidden; }
.strip > div { display: flex; flex-direction: column; gap: 2px; padding: var(--s4) var(--s5); border-left: 1px solid var(--line); min-width: 0; }
.strip > div:first-child { border-left: 0; }
.strip b { font: 700 var(--fs-xl)/1.1 var(--display); letter-spacing: -0.02em; }
.strip span { font-size: var(--fs-xs); color: var(--muted); }

/* tiles and cards */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--s3); }
.tile { display: flex; flex-direction: column; gap: 2px; padding: var(--s4); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); min-width: 0; }
.tile.big { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: linear-gradient(180deg, var(--accent-soft), var(--panel) 80%); }
.tval { font: 700 var(--fs-xl)/1.15 var(--display); color: var(--ink); }
.tile.big .tval { color: var(--accent-ink); }
.tsub { font-size: var(--fs-xs); color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s3); flex-direction: unset; }
.cards.three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.card { display: flex; flex-direction: column; gap: 4px; padding: var(--s5); background: var(--panel); border: 1px solid var(--line);
        border-radius: var(--r-lg); text-decoration: none; color: var(--ink); transition: border-color 0.15s, transform 0.15s; min-width: 0; }
.card:hover { border-color: var(--accent); color: var(--ink); transform: translateY(-2px); }
.card b { font: 600 var(--fs-md) var(--display); }
.card span { color: var(--muted); font-size: var(--fs-sm); }
.ico { width: 26px; height: 26px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: var(--s2); }
.ico .fill { fill: var(--accent); stroke: none; }

/* generation badges */
.gb { flex: none; display: inline-grid; place-items: center; min-width: 38px; height: 30px; padding: 0 6px; border-radius: 8px;
      font: 700 0.8rem/1 var(--display); letter-spacing: 0.01em; color: var(--ink-2); background: var(--panel-3); border: 1px solid var(--line-2); }
.gb.cur { color: var(--accent-ink); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.gb.champ { color: var(--on-accent); background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.gb.ent { color: var(--cool-ink); background: var(--cool-soft); border-color: color-mix(in srgb, var(--cool) 40%, var(--line)); }
.gb.ghost { background: none; border-style: dashed; color: var(--muted); font-size: 1.1rem; }
.tag { display: inline-flex; align-items: center; gap: 5px; font: 500 var(--fs-xs) var(--mono); padding: 3px 9px; border-radius: 999px;
       border: 1px solid var(--line); background: var(--panel-2); color: var(--ink-2); }
.tag.champ { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.tag .crown { width: 12px; height: 12px; }
.tagrow { display: flex; flex-wrap: wrap; gap: 6px; }
.bothead { flex-direction: row; align-items: flex-start; gap: var(--s4); }
.bothead > .gb { min-width: 64px; height: 56px; font-size: 1.35rem; border-radius: 14px; margin-top: 4px; }
.bothead > div { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }

/* tables */
.tablewrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); }
.tablewrap.flat { border-radius: var(--r); }
table { border-collapse: collapse; width: 100%; font-size: var(--fs-sm); }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child > * { border-bottom: 0; }
thead th { font: 500 var(--fs-xs) var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); background: var(--panel-2); white-space: nowrap; }
tbody th { font-weight: 600; }
tbody tr:hover > * { background: var(--panel-2); }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ci { display: block; font: 500 0.7rem var(--mono); color: var(--muted); }
.rating b { font: 700 var(--fs-md) var(--display); }
tr.erarow td { font: 500 var(--fs-xs) var(--mono); color: var(--muted); background: var(--panel-2); letter-spacing: 0.06em; text-transform: uppercase; padding-block: 8px; }
.board .rank { width: 3em; text-align: center; font: 600 var(--fs-sm) var(--mono); color: var(--muted); }
.board tr.top1 .rank { color: var(--accent); }
.board tr.champ > * { background: color-mix(in srgb, var(--accent) 7%, var(--panel)); }
.board tr.champ > .rank { box-shadow: inset 3px 0 0 var(--accent); }
.board .botname { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.board .bn { display: flex; flex-direction: column; min-width: 0; }
.board .bn .full, .board .bn .shortn { font: 600 var(--fs-base) var(--display); }
.board .botname:hover .bn > span:not(.era) { color: var(--accent); }
.board .era { display: block; font-weight: 400; font-size: var(--fs-xs); color: var(--muted); }
.board.compact th, .board.compact td { padding: 8px 12px; }
.board.compact .botname { display: inline; font: 600 var(--fs-sm) var(--display); }
.delta { font: 600 var(--fs-sm) var(--mono); color: var(--win); }
.cicol { width: 28%; min-width: 120px; }
.cibar { position: relative; display: block; height: 18px; }
.cibar::before { content: ""; position: absolute; left: 0; right: 0; top: 8px; height: 2px; background: var(--line); border-radius: 2px; }
.cibar i { position: absolute; top: 5px; height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--accent) 30%, transparent); }
.cibar b { position: absolute; top: 3px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--accent); border: 2px solid var(--panel); }
.metercol { width: 34%; min-width: 90px; }
.meter { display: block; height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; min-width: 60px; }
.meter i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }

/* the ladder: "This era" hides the earlier eras' rows */
.sechead > .seg, .seg { display: inline-flex; flex-direction: row; padding: 3px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { cursor: pointer; font-size: var(--fs-sm); font-weight: 500; padding: 5px 14px; border-radius: 999px; color: var(--muted); }
.seg input:checked + label { background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); }
.seg input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 1px; }
.ladder:has(#lad-now:checked) tr.old { display: none; }
.openseat { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s4); padding: var(--s4) var(--s5);
            border: 1px dashed var(--line-2); border-radius: var(--r-lg); text-decoration: none; color: var(--ink); background: var(--bg-2); transition: border-color 0.15s; }
.openseat:hover { border-color: var(--accent); color: var(--ink); }
.openseat .gb { min-width: 38px; }
.openseat > span:nth-child(2) { display: flex; flex-direction: column; gap: 2px; }
.openseat b { font: 600 var(--fs-base) var(--display); }
.openseat .go { font-weight: 600; font-size: var(--fs-sm); color: var(--accent-ink); white-space: nowrap; }
.baselines { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; font-size: var(--fs-sm); color: var(--ink-2); }
.baselines b { font-weight: 600; }
details.explain { border-top: 1px solid var(--line); padding-top: var(--s3); }
details.explain > summary { cursor: pointer; font-size: var(--fs-sm); font-weight: 600; color: var(--accent-ink); width: max-content; }
details.explain > div { display: flex; flex-direction: column; gap: var(--s3); margin-top: var(--s3); font-size: var(--fs-sm); color: var(--ink-2); max-width: 90ch; }
.specline { display: flex; flex-wrap: wrap; gap: 4px 14px; font: 500 var(--fs-xs) var(--mono); color: var(--muted); }
.specline span + span::before { content: "·"; margin-right: 14px; color: var(--line-2); }
.specline code { color: var(--ink-2); }

/* the matchup heatmap: diverging around 50%, the winner's colour; hatched when a cell has few games */
.hm-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s3); overflow-x: auto; max-width: 100%; }
.hm { border-collapse: separate; border-spacing: 3px; width: auto; font-size: var(--fs-xs); }
.hm th, .hm td { border: 0; padding: 0; background: none; }
.hm thead th { font: 500 var(--fs-xs) var(--mono); text-transform: none; letter-spacing: 0; color: var(--muted); padding: 0 0 4px; text-align: center; background: none; }
.hm tbody th { font: 500 var(--fs-xs) var(--mono); color: var(--muted); padding-right: 8px; text-align: right; white-space: nowrap; }
.hm tbody tr:hover > * { background: none; }
.hm .axes { font: 500 0.65rem var(--mono); color: var(--muted); white-space: nowrap; }
.hm td.hmc { width: 62px; height: 50px; border-radius: 6px; text-align: center; color: var(--ink); cursor: default; position: relative;
       background: color-mix(in oklab, var(--hm-pos) var(--k), var(--hm-mid)); transition: transform 0.1s; }
.hm td.hmc.neg { background: color-mix(in oklab, var(--hm-neg) var(--k), var(--hm-mid)); }
.hmc.strong { color: #fff; }
.hm td.hmc.thin { background-image: repeating-linear-gradient(135deg, transparent 0 5px, color-mix(in srgb, var(--panel) 45%, transparent) 5px 7px); }
.hm td.hmc.none { background: none; outline: 1px dashed var(--line); outline-offset: -1px; }
.hmc b { display: block; font: 700 var(--fs-base)/1 var(--display); }
.hmc small { display: block; font: 500 0.62rem/1.3 var(--mono); opacity: 0.75; }
.hmc:hover, .hmc:focus-visible { transform: scale(1.06); z-index: 1; box-shadow: 0 0 0 2px var(--ink); outline: none; }
.hmlegend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: var(--fs-xs); color: var(--muted); }
.hmlegend .ramp { width: 120px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--hm-neg), var(--hm-mid), var(--hm-pos)); }
.hmlegend .thinkey { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; }
.hmlegend .thinkey i { width: 14px; height: 14px; border-radius: 3px; background: var(--hm-mid)
  repeating-linear-gradient(135deg, transparent 0 3px, color-mix(in srgb, var(--ink) 25%, transparent) 3px 4px); }

/* tabs (rating by character): CSS-only, so they work on Pages and in the one-file preview */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tabs > input { position: absolute; opacity: 0; pointer-events: none; }
.tabs > label { cursor: pointer; font-size: var(--fs-sm); padding: 5px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); }
.tabs > label:hover { color: var(--ink); border-color: var(--line-2); }
.tabs > input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.tabs > input:checked + label { color: var(--accent-ink); border-color: var(--accent); background: var(--accent-soft); }
.tabpanels { flex-basis: 100%; margin-top: var(--s2); min-width: 0; }
.tp { display: none; }
#ct-Cowboy:checked ~ .tabpanels .tp-Cowboy, #ct-Ninja:checked ~ .tabpanels .tp-Ninja, #ct-Wizard:checked ~ .tabpanels .tp-Wizard,
#ct-Mutant:checked ~ .tabpanels .tp-Mutant, #ct-Robot:checked ~ .tabpanels .tp-Robot { display: block; }
.empty { padding: var(--s4); background: var(--panel-2); border: 1px dashed var(--line-2); border-radius: var(--r); }

/* recent results */
.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.feed li { display: grid; grid-template-columns: 4.2em 7.5em minmax(0, 1fr) 70px 6.5em; align-items: center; gap: var(--s3);
           padding: 10px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.feed li:last-child { border-bottom: 0; }
.feed .when { font: 500 var(--fs-xs) var(--mono); color: var(--muted); }
.feed .kind { font: 500 0.68rem var(--mono); text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.feed .kind.arena { color: var(--cool-ink); }
.feed .pair { display: flex; align-items: baseline; gap: 8px; font-family: var(--display); font-weight: 600; }
.feed .pair a { color: var(--ink-2); text-decoration: none; }
.feed .pair a.w { color: var(--ink); }
.feed .pair a:hover { color: var(--accent); }
.feed .score { font: 500 var(--fs-xs) var(--mono); color: var(--muted); }
.feed .score b { color: var(--ink); font-weight: 600; }
.split { display: block; height: 6px; border-radius: 3px; background: var(--cool); overflow: hidden; }
.split i { display: block; height: 100%; background: var(--accent); border-right: 2px solid var(--panel); }
.feed .n { font: 500 var(--fs-xs) var(--mono); color: var(--muted); text-align: right; }

/* replay cards */
.rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: var(--s4); }
details .rgrid { margin-top: var(--s3); }
.rcard { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; min-width: 0;
         transition: border-color 0.15s, transform 0.15s; }
.rcard:hover { border-color: var(--line-2); }
.lite, .liveplayer { position: relative; display: block; aspect-ratio: 16 / 9; background: #000; overflow: hidden; width: 100%; }
.lite img, .lite .noposter { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s, opacity 0.2s; }
.lite .noposter { background: linear-gradient(135deg, #15171d, #262a33); }
.lite:hover img { transform: scale(1.03); opacity: 0.9; }
.playbtn { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; display: grid; place-items: center;
           background: rgba(10, 11, 15, 0.62); border: 1px solid rgba(255, 255, 255, 0.35); backdrop-filter: blur(4px); transition: transform 0.15s, background 0.15s; }
.playbtn svg { width: 20px; height: 20px; fill: #fff; margin-left: 3px; }
.lite:hover .playbtn, .lite:focus-visible .playbtn { transform: scale(1.08); background: var(--accent); border-color: transparent; }
.dur { position: absolute; right: 8px; bottom: 8px; font: 500 0.7rem var(--mono); color: #fff; background: rgba(0, 0, 0, 0.7); padding: 2px 6px; border-radius: 4px; }
.liveplayer { height: auto; }
.rbody { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; }
.rtop { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.slot { font: 500 0.68rem var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.moment { font: 700 var(--fs-md)/1.2 var(--display); }
.fight { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; font-size: var(--fs-sm); }
.fight b { font-family: var(--display); }
.meta { font-size: var(--fs-xs); color: var(--muted); }
.meta a { color: var(--muted); }
.res { flex: none; font: 600 0.66rem var(--mono); text-transform: uppercase; letter-spacing: 0.05em; padding: 3px 8px; border-radius: 999px; }
.res.win { color: var(--win); background: var(--win-soft); }
.res.loss { color: var(--loss); background: var(--loss-soft); }
.rgrid:has(.feat) { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
details.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s3) var(--s5); }
details.panel > summary { cursor: pointer; font: 600 var(--fs-base) var(--display); padding: 6px 0; }
details.panel[open] > summary { margin-bottom: var(--s2); }
details.panel .tablewrap { margin: var(--s2) 0 var(--s2); }

/* Replays filters */
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s3) var(--s5); padding: var(--s4) var(--s5); background: var(--panel);
           border: 1px solid var(--line); border-radius: var(--r-lg); position: sticky; top: 62px; z-index: 3; box-shadow: var(--shadow); margin-bottom: calc(-1 * var(--s4)); }
.filters > label { display: flex; flex-direction: column; gap: 4px; }
.filters > label > span, .chipset legend { font: 500 0.68rem var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); padding: 0; }
.filters select { font: 500 var(--fs-sm) var(--body); color: var(--ink); background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 7px 10px; min-width: 9em; }
.chipset { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.chipset legend { margin-bottom: 4px; width: 100%; float: left; }
.chipset label { position: relative; }
.chipset input { position: absolute; opacity: 0; pointer-events: none; }
.chipset span { display: inline-block; cursor: pointer; font-size: var(--fs-xs); font-weight: 500; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); background: var(--panel-2); }
.chipset input:checked + span { color: var(--accent-ink); border-color: var(--accent); background: var(--accent-soft); }
.chipset input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.filters .count { margin-left: auto; font: 600 var(--fs-sm) var(--mono); color: var(--ink-2); align-self: center; }

/* charts */
.chartwrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s3) var(--s2) var(--s2); }
.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart .band0 { fill: var(--band-a); } .chart .band1 { fill: var(--band-b); } .chart .now { fill: var(--band-now); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .zero { stroke: var(--line-2); stroke-width: 1; }
.chart .ciband { fill: color-mix(in srgb, var(--accent) 16%, transparent); }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--accent); stroke: var(--panel); stroke-width: 2; }
.chart .dot.champ { stroke-width: 3; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent) 60%, transparent)); }
.chart .bar { fill: color-mix(in srgb, var(--accent) 70%, var(--panel)); }
.chart .bar.last { fill: var(--accent); }
.chart .whisk { stroke: var(--ink-2); stroke-width: 1.5; stroke-linecap: round; opacity: 0.55; }
.chart .hit { fill: transparent; cursor: pointer; }
.chart a:hover .hit, .chart a:focus .hit { fill: color-mix(in srgb, var(--ink) 5%, transparent); }
.chart a:focus { outline: none; }
.chart a:focus-visible .hit { stroke: var(--accent); stroke-width: 2; }
.chart text { fill: var(--muted); font: 500 11px var(--mono); }
.chart .xl { text-anchor: middle; }
.chart .xl.on { fill: var(--accent-ink); font-weight: 700; }
.chart .yl { text-anchor: end; }
.chart .xt { text-anchor: end; }
.chart .eralbl { fill: var(--ink-2); font-size: 10.5px; letter-spacing: 0.03em; }
.chart .endlbl { fill: var(--ink); font: 700 13px var(--display); }
.chart-small { display: none; }
.tip { position: fixed; z-index: 50; pointer-events: none; display: flex; flex-direction: column; gap: 1px; max-width: 280px; padding: 8px 11px;
       border-radius: 8px; background: var(--ink); color: var(--bg); font-size: var(--fs-xs); line-height: 1.45; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); }
.tip b { font: 700 var(--fs-sm) var(--display); }

/* History timeline */
.tl { list-style: none; margin: 0; padding: 0 0 0 28px; display: flex; flex-direction: column; gap: var(--s3); position: relative; }
.tl::before { content: ""; position: absolute; left: 9px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--accent), var(--line) 30%); border-radius: 2px; }
.tl-era { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: var(--s4) 0 var(--s1); font-size: var(--fs-sm); }
.tl-era::before { content: ""; position: absolute; left: -26px; top: calc(var(--s4) + 3px); width: 14px; height: 14px; border-radius: 4px; background: var(--panel-3); border: 2px solid var(--line-2); transform: rotate(45deg); }
.tl-era span:first-child { font: 500 var(--fs-xs) var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent-ink); }
.tl-era b { font: 600 var(--fs-md) var(--display); }
.tl-item { position: relative; }
.tl-item::before { content: ""; position: absolute; left: -24px; top: 24px; width: 10px; height: 10px; border-radius: 50%; background: var(--panel); border: 2px solid var(--accent); }
.tl-item.champ::before { background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); }
.tl-card { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: var(--s4); align-items: center; padding: 10px; background: var(--panel);
           border: 1px solid var(--line); border-radius: var(--r-lg); text-decoration: none; color: var(--ink); transition: border-color 0.15s, transform 0.15s; }
.tl-card:hover { border-color: var(--accent); color: var(--ink); transform: translateX(2px); }
.tl-card img, .tl-card .noposter { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; display: block; background: #000; }
.tl-card .noposter { background: linear-gradient(135deg, #15171d, #262a33); }
.tl-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tl-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.tl-top b { font: 600 var(--fs-md) var(--display); }
.tl-top .when { margin-left: auto; font: 500 var(--fs-xs) var(--mono); color: var(--muted); }
.tl-res { font-size: var(--fs-sm); color: var(--ink-2); }
.tl-res b { font-family: var(--display); color: var(--win); }
.tl-card .changed { font-size: var(--fs-xs); color: var(--muted); }

/* the record book */
.recs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s3); }
.recs.big { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.rec { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; min-width: 0; }
.recbody { display: flex; flex-direction: column; gap: 4px; padding: var(--s4) var(--s5) var(--s5); }
.recval { font: 700 clamp(1.8rem, 3.6vw, 2.5rem)/1.05 var(--display); letter-spacing: -0.02em; color: var(--ink); }
.rec.withvid .recval { color: var(--accent-ink); }
.recwho a { font: 600 var(--fs-sm) var(--display); text-decoration: none; }

/* Enter a bot: the format card and the steps from a copy of the game to the ladder */
.format { gap: var(--s4); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: var(--s3); }
.fact { display: flex; flex-direction: column; gap: 4px; padding: var(--s4) var(--s5); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); min-width: 0; }
.fact b { font: 700 var(--fs-lg)/1.15 var(--display); color: var(--ink); }
.fact:first-child { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: linear-gradient(180deg, var(--accent-soft), var(--panel) 85%); }
.fact:first-child b { color: var(--accent-ink); }
.fact p { color: var(--ink-2); font-size: var(--fs-sm); }
/* the steps run top to bottom: what to do on the left, the commands beside it */
.funnel { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s3); }
.funnel > li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: var(--s4) var(--s6); align-items: start;
               background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s5); min-width: 0; }
.funnel > li.last { align-items: center; border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: linear-gradient(90deg, var(--accent-soft), var(--panel) 70%); }
.ftext { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
.fgo { display: flex; justify-content: flex-start; }
.funnel p { color: var(--ink-2); font-size: var(--fs-sm); }
.funnel .cmd { white-space: pre; overflow-wrap: normal; }
.fhead { display: flex; align-items: center; gap: var(--s3); }
.fnum { flex: none; width: 30px; height: 30px; border-radius: 999px; display: inline-grid; place-items: center; font: 700 var(--fs-sm) var(--display);
        color: var(--on-accent); background: var(--accent); }
@media (max-width: 860px) { .funnel > li { grid-template-columns: minmax(0, 1fr); } }
.faqs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: var(--s2); align-items: start; }
details.faq > summary { font-size: var(--fs-sm); }
details.faq p { color: var(--ink-2); font-size: var(--fs-sm); padding-bottom: var(--s2); }
.erastrip { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); padding: var(--s3) var(--s4); background: var(--panel);
            border: 1px solid var(--line); border-radius: var(--r-lg); }
.erastrip .more { margin-left: auto; }
.chip i { font-style: normal; color: var(--muted); }
.cmd { margin: 0; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; overflow-x: auto;
       font-size: 0.8rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }

/* copy button: an icon (two overlapping squares) that turns into a check once copied, with a hover label */
.iconbtn { flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border-radius: var(--r-sm);
           border: 1px solid var(--line-2); background: var(--panel); color: var(--ink-2); cursor: pointer; position: relative; }
.iconbtn:hover { color: var(--accent-ink); border-color: var(--accent); }
.iconbtn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.iconbtn .ok { display: none; }
.iconbtn.done { color: var(--win); border-color: var(--win); }
.iconbtn.done .cp { display: none; }
.iconbtn.done .ok { display: block; }
.iconbtn.fail { color: var(--loss); border-color: var(--loss); }
.iconbtn::after { content: attr(data-tip-css); position: absolute; bottom: calc(100% + 6px); right: 0; white-space: nowrap; font: 500 var(--fs-xs) var(--body);
                  padding: 3px 8px; border-radius: 4px; background: var(--ink); color: var(--bg); opacity: 0; pointer-events: none; transition: opacity 0.12s; }
.iconbtn:hover::after, .iconbtn:focus-visible::after, .iconbtn.done::after, .iconbtn.fail::after { opacity: 1; }
.iconbtn.sm { width: 28px; height: 28px; }
.iconbtn.sm svg { width: 14px; height: 14px; }
.funnel .cmd .iconbtn { float: right; margin: -4px -6px 4px 10px; }  /* beside the first line only; the lines below keep the full width */
.cmd .iconbtn::after { display: none; }  /* the command box clips overflow, so its label would show as a thin sliver; the button has a native title instead */

/* agent prompt: one slim bar, closed by default; the copy button works without opening it */
.agent { position: relative; }
.agent details { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); }
.agent details[open] { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.agent summary { list-style: none; display: grid; grid-template-columns: minmax(max-content, 1fr) minmax(0, auto) minmax(max-content, 1fr);
                 align-items: center; gap: var(--s3); padding: 10px var(--s4); min-height: 52px; cursor: pointer; }
.agent summary::-webkit-details-marker { display: none; }
.agent > .iconbtn { position: absolute; top: 10px; right: 10px; }
.boticon { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.agentt { display: flex; align-items: center; gap: var(--s3); font-weight: 600; }
.agentd { color: var(--muted); font-size: var(--fs-sm); text-align: center; }
.tog { justify-self: end; margin-right: 38px; font-size: var(--fs-sm); font-weight: 600; color: var(--accent-ink); white-space: nowrap; }
.tog::after { content: " ▾"; }
details[open] .tog::after { content: " ▴"; }
.tog .h, details[open] .tog .s { display: none; }
details[open] .tog .h { display: inline; }
.agentbody { padding: 0 var(--s4) var(--s4); }
.prompt { max-height: 18em; overflow-y: auto; }

/* docs */
.doc { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s5) clamp(16px, 4vw, 44px) var(--s6); }
.doc > * { max-width: 72ch; }
.doc h1 { font-size: var(--fs-xl); margin-bottom: var(--s4); }
.doc h2 { margin: var(--s6) 0 var(--s3); padding-top: var(--s4); border-top: 1px solid var(--line); }
.doc h3 { margin: var(--s5) 0 var(--s2); }
.doc p, .doc ul, .doc ol { margin: 0 0 var(--s3); color: var(--ink-2); }
.doc li { margin: 4px 0; }
.doc pre { max-width: 100%; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; overflow-x: auto; font-size: 0.82rem; }
.codebox { position: relative; margin: var(--s3) 0 var(--s4); }
.doc > .codebox { max-width: 100%; }
.codebox > pre { margin: 0; padding-right: 48px; }
.codebox > .iconbtn { position: absolute; top: 7px; right: 7px; }
.doc :not(pre) > code { background: var(--panel-2); border: 1px solid var(--line); border-radius: 4px; padding: 0.05em 0.35em; font-size: 0.86em; overflow-wrap: anywhere; }
.doc .tablewrap { margin: var(--s3) 0 var(--s4); border-radius: var(--r-sm); }
.doc table { margin: 0; }
.doc table th { background: var(--panel-2); }

/* matchups (Arena records on a bot page) */
.mus { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--s2); }
.mu { display: grid; grid-template-columns: minmax(0, 1fr) 70px auto auto; align-items: center; gap: var(--s2); padding: 10px 12px;
      background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-sm); font-size: var(--fs-sm); }
.mu b { font-family: var(--display); }
.mu .dim { font-size: var(--fs-xs); font-family: var(--mono); }

/* callout, credits, footer */
.callout { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3) var(--s5); padding: var(--s4) var(--s5);
           background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); border-radius: var(--r); }
.callout div { display: flex; flex-direction: column; gap: 2px; max-width: 62ch; }
.callout span { color: var(--ink-2); font-size: var(--fs-sm); }
.credits { border-top: 1px solid var(--line); padding-top: var(--s5); display: flex; flex-direction: column; gap: 6px; }
.credits h2 { font: 500 var(--fs-xs) var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.credits p { font-size: var(--fs-sm); color: var(--muted); max-width: 80ch; }
.credits b { color: var(--ink-2); font-weight: 600; }
.foot { border-top: 1px solid var(--line); background: var(--panel); }
.footin { max-width: 1200px; margin: 0 auto; padding-block: var(--s6) calc(var(--s6) + env(safe-area-inset-bottom, 0px));
          padding-left: var(--gutter-l); padding-right: var(--gutter-r); display: flex; flex-direction: column; gap: var(--s5); font-size: var(--fs-sm); color: var(--ink-2); }
.footgrid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: var(--s5); }
.footabout { display: flex; flex-direction: column; gap: var(--s3); max-width: 60ch; }
.foot nav { display: flex; flex-direction: column; gap: 6px; }
.foot nav b { font: 500 var(--fs-xs) var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 2px; }
.foot nav a { color: var(--ink-2); text-decoration: none; width: max-content; }
.foot nav a:hover { color: var(--accent-ink); }
.foot .dim { font-size: var(--fs-xs); border-top: 1px solid var(--line); padding-top: var(--s4); }

/* narrow screens */
.shortn { display: none; }
@media (max-width: 980px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .herovid { order: -1; }
  .twocol { grid-template-columns: minmax(0, 1fr); }
  .strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .strip > div:nth-child(4) { border-left: 0; }
  .strip > div:nth-child(n + 4) { border-top: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .bar { flex-wrap: wrap; gap: 6px var(--s3); padding-block: 8px 0; }
  .mainnav { order: 3; flex-basis: 100%; margin: 0 calc(-1 * var(--gutter-l)); padding: 0 var(--gutter-l) 6px; }
  .actions { margin-left: auto; }
  .filters { position: static; }
  .footgrid { grid-template-columns: 1fr 1fr; }
  .footabout { grid-column: 1 / -1; }
  .feed li { grid-template-columns: 3.6em minmax(0, 1fr) 60px; }
  .feed .kind, .feed .n { display: none; }
}
@media (max-width: 560px) {
  .wrap { gap: var(--s6); padding-block: var(--s5) var(--s7); }
  .brand { font-size: 1rem; }
  .mainnav a { padding: 6px 10px; }
  th, td { padding: 10px; }
  .hide-s { display: none; }
  .full { display: none; }
  .shortn { display: inline; }
  .board .cicol { display: none; }
  .board .botname { gap: 8px; }
  .gb { min-width: 34px; height: 28px; font-size: 0.74rem; }
  .tval { font-size: var(--fs-lg); }
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip > div { padding: var(--s3) var(--s4); }
  .strip > div:nth-child(odd) { border-left: 0; }
  .strip > div:nth-child(4) { border-left: 1px solid var(--line); }
  .strip > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .strip > div:last-child { grid-column: 1 / -1; }
  .strip b { font-size: var(--fs-lg); }
  .hero { padding: var(--s4); border-radius: var(--r-lg); }
  .openseat { grid-template-columns: auto minmax(0, 1fr); padding: var(--s4); }
  .openseat .go { display: none; }
  .tl { padding-left: 22px; }
  .tl::before { left: 5px; }
  .tl-item::before { left: -21px; }
  .tl-era::before { left: -23px; width: 12px; height: 12px; }
  .tl-card { grid-template-columns: 96px minmax(0, 1fr); gap: var(--s3); }
  .tl-card .changed { display: none; }
  .tl-top .when { margin-left: 0; flex-basis: 100%; }
  .hm td.hmc { width: 46px; height: 42px; }
  .hmc b { font-size: var(--fs-sm); }
  .chart-wide { display: none; } .chart-small { display: block; } .chart-small text { font-size: 12px; }
  .bothead > .gb { min-width: 52px; height: 46px; font-size: 1.1rem; }
  .subnav { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); padding-right: 24px; }
  .agent summary { grid-template-columns: 1fr auto; } .agentd { display: none; } .tog .wide { display: none; }
}
@media (max-width: 400px) {
  .brandtext { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .actions .cta { padding: 6px 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .card:hover, .tl-card:hover { transform: none; }
}
.stack { display: flex; flex-direction: column; gap: var(--s5); min-width: 0; }
.status { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { font: 500 var(--fs-xs) var(--mono); padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); background: var(--panel); }
.pill.closed { color: var(--loss); border-color: color-mix(in srgb, var(--loss) 45%, var(--line)); background: var(--loss-soft); }

/* Submit: sign in with Hugging Face, add your value net, name the bot */
.submitform { display: flex; flex-direction: column; gap: var(--s5); }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s3); }
.step { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s4) var(--s5); display: flex; flex-direction: column; gap: var(--s3); }
.stephead { display: flex; align-items: center; gap: var(--s3); }
.stephead h2 { font-size: var(--fs-md); }
.step .num { width: 26px; height: 26px; flex: none; border-radius: 999px; display: inline-grid; place-items: center; font: 600 var(--fs-sm) var(--mono); color: var(--accent-ink); background: var(--accent-soft); }
.stepbody { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s3); padding-left: calc(26px + var(--s3)); }
.stepbody .btn[disabled] { opacity: 0.45; cursor: not-allowed; filter: none; }
.hint { margin: 0; color: var(--muted); font-size: var(--fs-sm); max-width: 62ch; }
.hint.err, .status.err { color: var(--loss); }
.status { margin: 0; color: var(--ink-2); font-size: var(--fs-sm); }
.status.okmsg { color: var(--win); }
.who { margin: 0; display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.who img { border-radius: 999px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent-ink); font: inherit; font-size: var(--fs-sm); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.drop { align-self: stretch; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: var(--s5) var(--s4); text-align: center; border: 1.5px dashed var(--line-2); border-radius: var(--r); background: var(--panel-2); cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over, .drop:focus-within { border-color: var(--accent); background: var(--accent-soft); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop span { color: var(--muted); font-size: var(--fs-sm); }
.slots { list-style: none; margin: 0; padding: 0; align-self: stretch; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s2); }
.slots li { display: flex; flex-direction: column; gap: 2px; padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: var(--r); min-width: 0; }
.slots li span { color: var(--muted); font-size: var(--fs-xs); }
.slots li em { font: 500 var(--fs-xs) var(--mono); font-style: normal; color: var(--muted); overflow-wrap: anywhere; }
.slots li.ok { border-color: color-mix(in srgb, var(--win) 45%, var(--line)); background: var(--win-soft); }
.slots li.ok em { color: var(--win); }
.slots li.bad { border-color: color-mix(in srgb, var(--loss) 45%, var(--line)); background: var(--loss-soft); }
.slots li.bad em { color: var(--loss); }
.field { align-self: stretch; display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-sm); font-weight: 600; max-width: 520px; }
.field i { font-weight: 400; }
.field input, .field textarea { font: 400 var(--fs-base) var(--body); color: var(--ink); background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 9px 12px; width: 100%; }
.field input { font-family: var(--mono); }
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.entries { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s4) var(--s5); display: flex; flex-direction: column; gap: var(--s3); }
.entries h2 { font-size: var(--fs-md); }
.entries ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s2); }
.entries li { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s3) 0; border-top: 1px solid var(--line); }
.entries li:first-child { border-top: 0; padding-top: 0; }
.entries li > div { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
.entries a { font: 500 var(--fs-sm) var(--mono); }
.entries pre { margin: 0; white-space: pre-wrap; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; font: 400 var(--fs-xs)/1.5 var(--mono); color: var(--ink-2); }
.tag.win { color: var(--win); background: var(--win-soft); border-color: transparent; }
.tag.loss { color: var(--loss); background: var(--loss-soft); border-color: transparent; }
.tag.wait { color: var(--cool-ink); background: var(--cool-soft); border-color: transparent; }
.submitrules { margin-top: var(--s2); }
.submitrules h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
@media (max-width: 560px) { .stepbody { padding-left: 0; } .step { padding: var(--s4); } }

/* scan-first pass: one key line under the rules, folded extras */
.keynote { font-size: var(--fs-sm); color: var(--ink-2); padding-left: var(--s3); border-left: 3px solid var(--accent); }
.keynote b { color: var(--ink); }
.headtext .pill { display: inline-block; align-self: flex-start; width: max-content; margin-top: var(--s3); }
.pill.open, .headtext .pill:not(.closed) { color: var(--win, #1a7f37); border-color: color-mix(in srgb, var(--win, #1a7f37) 40%, var(--line)); }
details.explain ul { display: flex; flex-direction: column; gap: var(--s2); padding-left: 1.1em; }
details.submitmore { margin-top: var(--s5); }
details.submitmore > summary { font-size: var(--fs-base); }
details.tlmore { margin-top: var(--s4); }
details.tlmore > div, details.tlmore > ol { margin-top: var(--s4); }
.funnel + .agentprompt, .funnel + details { margin-top: var(--s4); }
