:root {
  --bg: #13100d;
  --bg-2: #1a1612;
  --surface: #1f1a15;
  --surface-2: #28211b;
  --border: #3a3027;
  --border-2: #4a3d31;
  --text: #efe6d8;
  --muted: #a8998a;
  --gold: #d9a441;
  --gold-2: #f0c46a;
  --win: #7cc47f;
  --lose: #e0705a;
  --radius: 10px;
  --display: "Cormorant Garamond", Georgia, serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 500px at 50% -200px, rgba(217, 164, 65, .10), transparent 70%),
    var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; padding-bottom: 48px; }
a { color: var(--gold-2); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: .92em; }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 5px; }
pre { background: var(--bg-2); border: 1px solid var(--border); padding: 14px 16px; border-radius: var(--radius); overflow-x: auto; }
pre code { background: none; padding: 0; }
h1, h2, h3, .stat b { font-variant-numeric: lining-nums; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: .01em; margin: 0; line-height: 1.15; }
h1 { font-size: clamp(32px, 5vw, 46px); }
h2 { font-size: 24px; }
h3 { font-size: 19px; margin-bottom: 8px; }
.muted { color: var(--muted); }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* top bar */
.topbar { border-bottom: 1px solid var(--border); background: rgba(19, 16, 13, .85); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 10; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--gold); font-family: var(--display); font-size: 26px; font-weight: 700; }
.brand:hover { text-decoration: none; color: var(--gold-2); }
.nav { display: flex; gap: 4px; align-items: center; overflow-x: auto; }
.nav a { color: var(--muted); padding: 7px 12px; border-radius: 8px; font-weight: 500; white-space: nowrap; }
.nav a:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.nav a.active { color: var(--text); background: var(--surface-2); }
.nav a.nav-cta { color: var(--gold-2); border: 1px solid var(--border-2); }

/* buttons */
.btn { display: inline-block; padding: 10px 18px; border-radius: 8px; border: 1px solid var(--border-2); color: var(--text); background: var(--surface); font-weight: 600; }
.btn:hover { text-decoration: none; border-color: var(--gold); }
.btn.primary { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #1b1307; border-color: transparent; }
.btn.primary:hover { filter: brightness(1.06); }

/* hero */
.hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center; padding: 48px 0 32px; }
.eyebrow { color: var(--gold); text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 600; margin: 0 0 10px; }
.lead { color: #d6cabb; font-size: 17px; max-width: 58ch; margin: 14px 0 0; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero-stats, .profile-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.stat b { display: block; font-family: var(--display); font-size: 34px; color: var(--gold-2); line-height: 1.1; font-variant-numeric: lining-nums tabular-nums; }
.stat > span { color: var(--muted); font-size: 13px; }

/* panels */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin-top: 20px; }
.panel.flush { padding: 0; overflow: hidden; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.panel-head a { font-size: 14px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; align-items: start; }
.empty { color: var(--muted); margin: 8px 0; }
.page-head { padding: 36px 0 4px; }
.page-head.row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head .muted { margin: 8px 0 0; }

/* lobby */
.live { display: inline-flex; align-items: center; gap: 8px; color: var(--win); font-size: 14px; font-weight: 500; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(124, 196, 127, .18); }
.live.off { color: var(--lose); }
.live.off i { box-shadow: 0 0 0 4px rgba(224, 112, 90, .18); }
.lobby-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; }
.lobby h3 { font-family: var(--body); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.room { padding: 10px 0; border-top: 1px solid var(--border); }
.room:first-of-type { border-top: 0; }
.room-name { font-weight: 600; }
.room-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13px; margin-top: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: var(--surface-2); border: 1px solid var(--border); padding: 3px 10px; border-radius: 999px; font-size: 13px; }

/* badges */
.badge { display: inline-block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.badge.playing { color: var(--gold-2); border-color: rgba(217, 164, 65, .4); }
.badge.open { color: var(--win); border-color: rgba(124, 196, 127, .4); }

/* tables */
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; padding: 12px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: rgba(255, 255, 255, .02); }
.table.compact td, .table.compact th { padding: 8px 6px; }
.table .num { text-align: right; white-space: nowrap; }
.table .pos { width: 44px; color: var(--muted); font-weight: 600; }
.table .sub { font-size: 12px; color: var(--muted); }
.table tr.top1 .pos { color: #f4c95d; }
.table tr.top2 .pos { color: #cfd6de; }
.table tr.top3 .pos { color: #d69a6a; }
.table tr.calib { opacity: .7; }
.rating { font-weight: 700; color: var(--gold-2); }
.plink { color: var(--text); font-weight: 600; }
.plink:hover { color: var(--gold-2); }

/* match rows */
.match-row { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 10px; margin: 0 -10px; border-radius: 8px; color: var(--text); border-top: 1px solid var(--border); }
.panel-head + .match-row { border-top: 0; }
.match-row:hover { background: var(--surface-2); }
.row-link { position: absolute; inset: 0; border-radius: 8px; }
.row-link:focus-visible { outline: 2px solid var(--gold); }
.match-row .plink { position: relative; z-index: 1; }
.match-row.unrated { opacity: .75; }
.match-sides { display: grid; gap: 4px; min-width: 0; }
.side { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.tag { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; font-size: 11px; font-weight: 700; background: var(--surface-2); color: var(--muted); flex: none; }
.tag.win { background: rgba(124, 196, 127, .15); color: var(--win); }
.tag.lose { background: rgba(224, 112, 90, .15); color: var(--lose); }
.mp { display: inline-flex; align-items: baseline; gap: 6px; }
.mp .plink { font-weight: 600; }
.nation { color: var(--muted); font-size: 13px; }
.amp { color: var(--muted); }
.delta { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--win); }
.delta.down { color: var(--lose); }
.match-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 0; color: var(--muted); font-size: 13px; text-align: right; flex: none; }

/* profile */
.profile { display: grid; grid-template-columns: 1fr 1.2fr; gap: 24px; align-items: end; padding: 36px 0 4px; }
.profile h1 { word-break: break-word; }

/* match page */
.facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 16px; }
.facts span { display: flex; flex-direction: column; font-size: 15px; }
.facts b { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.roster.win { border-top: 3px solid var(--win); }
.roster.lose { border-top: 3px solid var(--lose); }

/* tabs, search, pager */
.tabs { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 3px; }
.tabs a { padding: 6px 12px; border-radius: 7px; color: var(--muted); font-weight: 500; }
.tabs a.active { background: var(--surface-2); color: var(--text); }
.tabs a:hover { text-decoration: none; color: var(--text); }
.search input { background: var(--surface); border: 1px solid var(--border-2); color: var(--text); border-radius: 8px; padding: 9px 12px; font: inherit; width: min(280px, 100%); }
.search input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.pager { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 20px; }

/* connect */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.steps li { counter-increment: step; position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px 18px 68px; }
.steps li::before { content: counter(step); position: absolute; left: 20px; top: 16px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 20px; color: #1b1307; background: linear-gradient(180deg, var(--gold-2), var(--gold)); }
.steps p { margin: 6px 0; }
.rules { margin: 0; padding-left: 20px; }
.rules li { margin: 6px 0; }

/* footer */
.footer { border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.footer-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 18px; }

@media (max-width: 820px) {
  .hero, .profile, .two-col, .lobby-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 32px; }
  .hide-sm { display: none; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); }
  .stat { padding: 12px; }
  .stat b { font-size: 28px; }
  .topbar-inner { height: auto; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
  .nav { width: 100%; }
  .match-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .match-meta { flex-direction: row; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
  .steps li { padding-left: 20px; padding-top: 60px; }
}

/* account */
.nav-user { display: inline-flex; align-items: center; gap: 8px; }
.nav-user img, .owner img, .avatar { border-radius: 6px; border: 1px solid var(--border-2); }
.nav-user span { max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.me-head { display: flex; gap: 16px; align-items: center; }
.logout { justify-self: end; }
.owner { display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; }
.owner .about { margin: 6px 0 0; color: #d6cabb; white-space: pre-line; max-width: 60ch; }
.alts { margin: 10px 0 0; font-size: 14px; }
.flag { font-family: "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", sans-serif; }
.notice { background: rgba(124, 196, 127, .12); border: 1px solid rgba(124, 196, 127, .35); color: var(--win); padding: 10px 14px; border-radius: 8px; margin: 20px 0 0; }
.small { font-size: 13px; }
.empty-box ol { margin: 8px 0; padding-left: 20px; }
.empty-box li { margin: 4px 0; }
.form { display: grid; gap: 14px; max-width: 560px; }
.form label { display: grid; gap: 6px; font-weight: 500; font-size: 14px; }
.form label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.form input[type=text], .form input[type=email], .form select, .form textarea { background: var(--bg-2); border: 1px solid var(--border-2); color: var(--text); border-radius: 8px; padding: 9px 12px; font: inherit; width: 100%; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.form input[type=checkbox] { accent-color: var(--gold); width: 18px; height: 18px; margin-top: 2px; }
button.btn { font: inherit; font-weight: 600; cursor: pointer; }
@media (max-width: 820px) { .logout { justify-self: start; } }
.notice.error { background: rgba(224, 112, 90, .12); border-color: rgba(224, 112, 90, .4); color: var(--lose); }
.hint { font-weight: 400; font-size: 12px; color: var(--muted); }
.mono { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }
.btn.small-btn { padding: 5px 10px; font-size: 13px; }
.creds { display: grid; gap: 14px; max-width: 640px; }
.cred { display: grid; grid-template-columns: 140px 1fr auto; gap: 12px; align-items: center; }
.cred span { color: var(--muted); font-size: 13px; }
.cred b { word-break: break-all; }
.cred b.big { font-size: 22px; color: var(--gold-2); letter-spacing: .02em; }
@media (max-width: 820px) { .cred { grid-template-columns: 1fr auto; } .cred span { grid-column: 1 / -1; } }
.link-btn { background: none; border: 0; padding: 0 0 0 8px; color: var(--gold-2); font: inherit; font-size: 13px; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.secret { white-space: nowrap; }
.demo-bar { background: repeating-linear-gradient(135deg, #3a2a10, #3a2a10 12px, #33250e 12px, #33250e 24px); color: var(--gold-2); text-align: center; font-size: 13px; font-weight: 500; padding: 7px 16px; }

/* flags */
.fi { display: inline-block; width: 20px; height: 15px; border-radius: 2px; margin-right: 7px; vertical-align: -2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .35); object-fit: cover; }
h1.with-flag { display: flex; align-items: center; gap: 4px; }
h1 .fi { width: 36px; height: 27px; border-radius: 3px; margin-right: 10px; vertical-align: 0; }
a.chip { color: var(--text); }
a.chip:hover { border-color: var(--gold); text-decoration: none; }
.chip .fi { width: 16px; height: 12px; margin-right: 5px; vertical-align: -1px; }

/* wins / losses */
.wl { white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; }
.wl .w { color: var(--win); font-weight: 600; }
.wl .l { color: var(--lose); font-weight: 600; }
.wl .sep { color: var(--muted); margin: 0 2px; }
.stat .wl .w, .stat .wl .l { font-weight: 700; }
.wr { font-variant-numeric: lining-nums tabular-nums; }
.wr.hi { color: var(--win); font-weight: 600; }
.wr.lo { color: var(--lose); font-weight: 600; }
.stat .wr { color: inherit; }
.stat .wr.hi { color: var(--win); }
.stat .wr.lo { color: var(--lose); }
.form { display: inline-flex; gap: 3px; vertical-align: middle; }
.form i { font-style: normal; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 4px; font-size: 10px; font-weight: 700; }
.form .fw { background: rgba(124, 196, 127, .18); color: var(--win); }
.form .fl { background: rgba(224, 112, 90, .18); color: var(--lose); }

/* match details */
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.timeline { list-style: none; margin: 0; padding: 0; max-height: 520px; overflow-y: auto; }
.timeline li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 6px 0; border-top: 1px solid var(--border); font-size: 14px; }
.timeline li:first-child { border-top: 0; }
.timeline time { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.timeline li.lock span, .timeline li.results span { color: var(--gold-2); font-weight: 600; }
.timeline li.surrender span, .timeline li.sync_request span, .timeline li.server_leave span { color: var(--lose); }
.timeline li.chat span { color: #d6cabb; word-break: break-word; }
details.tech summary { cursor: pointer; color: var(--muted); font-weight: 500; }
details.tech[open] summary { margin-bottom: 10px; }

/* statistics */
.filters { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 18px; }
.pills { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.pills-label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-right: 6px; }
.pills a { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.pills a:hover { color: var(--text); text-decoration: none; border-color: var(--border-2); }
.pills a.active { color: #1b1307; background: var(--gold); border-color: var(--gold); font-weight: 600; }
.barcell { white-space: nowrap; }
.bar { display: inline-block; width: 90px; height: 6px; border-radius: 3px; background: var(--surface-2); margin-right: 10px; vertical-align: middle; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--gold); border-radius: 3px; }
.bar.win i { background: var(--win); }
.bar.lose i { background: var(--lose); }
.pad { padding: 18px 20px; }
.spaced { margin-top: 20px; }
.compact-stats .stat { padding: 10px 14px; }
.compact-stats .stat b { font-size: 26px; }
.eyebrow a { color: inherit; }
.win-text { color: var(--win); font-weight: 600; }
.lose-text { color: var(--lose); font-weight: 600; }

.matrix { border-collapse: separate; border-spacing: 2px; font-size: 12px; font-variant-numeric: tabular-nums; }
.matrix th { font-weight: 600; color: var(--muted); padding: 4px 6px; white-space: nowrap; }
.matrix thead th { height: 34px; vertical-align: bottom; }
.matrix tbody th { text-align: right; }
.matrix tbody th a { color: var(--text); }
.matrix td { width: 38px; min-width: 38px; height: 30px; text-align: center; border-radius: 4px; background: var(--surface-2); color: var(--text); }
.matrix td.self { background: repeating-linear-gradient(135deg, var(--surface-2), var(--surface-2) 4px, var(--surface) 4px, var(--surface) 8px); }
.matrix td.few { color: var(--muted); }
.matrix td.empty-cell { color: var(--border-2); }

.records { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-top: 20px; }
.record { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; display: grid; gap: 4px; }
.record-title { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.record b { font-family: var(--display); font-size: 30px; color: var(--gold-2); font-variant-numeric: lining-nums; line-height: 1.15; }
.record-sub { font-size: 14px; color: var(--muted); }
.chip.hot b { color: var(--win); margin-left: 4px; }

.heat { border-collapse: separate; border-spacing: 3px; font-size: 11px; }
.heat th { color: var(--muted); font-weight: 500; padding: 0 4px; text-align: right; }
.heat thead th { text-align: left; }
.heat td { width: 22px; min-width: 22px; height: 20px; border-radius: 4px; background: rgba(217, 164, 65, calc(0.06 + var(--a) * 0.9)); }

/* match statistics */
.scoreboard th.group { text-align: center; border-bottom: 1px solid var(--border); }
.scoreboard td.w { color: var(--win); }
.scoreboard td.l { color: var(--lose); }
.scoreboard tr.row-win td:first-child { box-shadow: inset 3px 0 0 var(--win); }
.scoreboard tr.row-lose td:first-child { box-shadow: inset 3px 0 0 var(--lose); }
.res-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.res-cell { min-width: 84px; }
.res-bar { display: block; height: 3px; background: var(--surface-2); border-radius: 2px; margin-top: 4px; overflow: hidden; }
.res-bar i { display: block; height: 100%; opacity: .85; }
.timings td.best { color: var(--win); font-weight: 700; }
.timings th .plink { font-size: 13px; }
.timeline li.timing span { color: #8fb4d6; }
.timings th { text-transform: none; letter-spacing: 0; }
.timings td:first-child { white-space: nowrap; }

/* icons (game-icons.net, CC BY 3.0) */
.ico { display: inline-block; width: 1.2em; height: 1.2em; vertical-align: -0.25em; flex: none;
  background: currentColor; -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
.ico.lg { width: 28px; height: 28px; }
th .ico { width: 16px; height: 16px; margin-right: 4px; vertical-align: -3px; }
.facts .ico { color: var(--gold); margin-right: 4px; }
.panel-head h2 .ico { color: var(--gold); width: 22px; height: 22px; margin-right: 8px; vertical-align: -3px; }
.timings td:first-child .ico { color: var(--gold); margin-right: 8px; }
.timeline li.timing .ico { margin-right: 6px; }
.record .ico { color: var(--gold); width: 22px; height: 22px; }
.record-title { display: flex; align-items: center; gap: 8px; }

/* interactive charts */
.ichart { margin: 16px 0 0; }
.ichart svg { width: 100%; height: auto; display: block; touch-action: pan-y; }
.ichart .axis { stroke: var(--border-2); }
.ichart .base { stroke: var(--border-2); stroke-dasharray: 4 4; }
.ichart .tick { fill: var(--muted); font-size: 11px; font-family: var(--body); }
.ichart .area { fill: rgba(217, 164, 65, .10); }
.ichart .cursor { stroke: var(--text); stroke-opacity: .45; stroke-width: 1; stroke-dasharray: 3 3; }
.ichart .dots circle { stroke: var(--surface); stroke-width: 2; }
.ichart-ctl { display: grid; gap: 8px; margin-top: 10px; }
.ichart-ctl input[type=range] { width: 100%; accent-color: var(--gold); cursor: pointer; }
.ichart-out { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; font-size: 14px; min-height: 22px; }
.ichart-out .when { color: var(--gold-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.ichart-out .val { color: var(--muted); white-space: nowrap; }
.ichart-out .val b { color: var(--text); font-variant-numeric: tabular-nums; }
.ichart-out .val i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* army mix & upgrades */
.army-mix .mix-col { width: 34%; min-width: 160px; }
.mix { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--surface-2); }
.mix i { display: block; height: 100%; }
.upgrades td { vertical-align: middle; }
.tiles { display: flex; flex-wrap: wrap; gap: 4px; }
.up { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 6px; border: 1px solid var(--border); }
.up .ico { width: 20px; height: 20px; }
.up.on { background: rgba(217, 164, 65, .16); border-color: rgba(240, 196, 106, .55); color: var(--gold-2); box-shadow: 0 0 8px rgba(240, 196, 106, .15); }
.up.off { background: var(--bg-2); color: #5a5047; }
.up:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }

/* ping & server facts */
.ping { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; margin-left: 6px; }
.ping.good { color: var(--win); }
.ping.ok { color: var(--gold-2); }
.ping.bad { color: var(--lose); }
b.ping { font-size: inherit; margin-left: 0; }
.server-facts { display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--muted); font-size: 14px; margin: -4px 0 12px; }
.page-head .server-facts { margin: 14px 0 0; }
.server-facts b { color: var(--text); }
.my-ping .ico { color: var(--gold); margin-right: 6px; }
.top-ping { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-left: auto; margin-right: 4px; white-space: nowrap; }
.top-ping i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.top-ping.good i { background: var(--win); box-shadow: 0 0 0 3px rgba(124, 196, 127, .18); }
.top-ping.ok i { background: var(--gold-2); box-shadow: 0 0 0 3px rgba(240, 196, 106, .18); }
.top-ping.bad i { background: var(--lose); box-shadow: 0 0 0 3px rgba(224, 112, 90, .18); }
.top-ping b.ping { margin: 0; }

/* units */
.subhead { font-family: var(--body); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; margin: 22px 0 10px; }
.unit-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 14px; }
.unit-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.unit-card.win { border-top: 3px solid var(--win); }
.unit-card.lose { border-top: 3px solid var(--lose); }
.unit-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.units .unit-name { white-space: nowrap; }
.units .unit-name .ico { color: var(--gold); margin-right: 8px; }
.units td.w { color: var(--win); }
.units td.l { color: var(--lose); }
.century { font-size: 10px; font-weight: 700; letter-spacing: .04em; margin-left: 8px; padding: 1px 5px; border-radius: 4px; vertical-align: 1px; }
.century.c17 { color: var(--muted); border: 1px solid var(--border-2); }
.century.c18 { color: #8fb4d6; border: 1px solid rgba(143, 180, 214, .45); }
.lvl { white-space: nowrap; }
.pips { display: inline-flex; align-items: center; gap: 2px; margin-right: 10px; }
.pips .ico { width: 14px; height: 14px; margin-right: 3px; color: var(--muted); }
.pips i { width: 6px; height: 10px; border-radius: 2px; background: var(--surface-2); }
.pips.atk i.on { background: var(--lose); }
.pips.def i.on { background: #8fb4d6; }
@media (max-width: 820px) { .unit-cards { grid-template-columns: 1fr; } }

/* upgrades by building */
.upg-rows { display: grid; gap: 8px; margin-top: 6px; }
.upg-row { display: grid; grid-template-columns: 170px 1fr; gap: 10px; align-items: center; }
.upg-name { font-size: 13px; color: var(--muted); white-space: nowrap; }
.upg-name .ico { color: var(--gold); margin-right: 6px; }
.up { width: 26px; height: 26px; }
.up .ico { width: 17px; height: 17px; }
.levels { display: inline-flex; align-items: center; gap: 3px; }
.levels i { width: 16px; height: 10px; border-radius: 2px; background: var(--surface-2); border: 1px solid var(--border); }
.levels i.on { background: var(--gold); border-color: var(--gold-2); }
.levels b { font-size: 12px; margin-left: 6px; color: var(--muted); font-weight: 600; }
@media (max-width: 820px) { .upg-row { grid-template-columns: 1fr; gap: 4px; } }

/* steam in the profile */
.steam-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.steam-line .ico { width: 18px; height: 18px; color: #c7d5e0; }
.steam-nick { font-weight: 600; color: var(--text); }
.steam-id { font-size: 13px; }
.owner .muted .ico { margin-right: 6px; }
