/* Base, shell and shared components */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg) var(--tex-grain) repeat; background-size: var(--tex-size); color: var(--text); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; }
p { margin: 0; }
.i { flex: none; display: block; }
.muted { color: var(--muted); }
.sm { font-size: 12px; }
.center { text-align: center; }
.num { font-variant-numeric: tabular-nums; font-weight: 600; }
.grow { flex: 1; }
::selection { background: var(--red); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Desktop shell ---------- */
.shell { display: grid; grid-template-columns: var(--side-w) 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 20px 14px 16px; background: var(--bg-2); border-right: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: 10px; padding: 2px 8px 22px; font: 700 22px/1 var(--font-display); letter-spacing: .14em; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav__item { position: relative; display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: var(--r); color: var(--text-2); font-weight: 500; transition: background .15s, color .15s; }
.nav__item:hover { background: var(--surface); color: var(--text); }
.nav__item.is-active { background: var(--surface-2); color: var(--text); }
.nav__item.is-active::before { content: ''; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--red); }
.nav__item em { margin-left: auto; font: 600 10px/1 var(--font); letter-spacing: .06em; text-transform: uppercase; font-style: normal; color: var(--red); background: var(--red-dim); padding: 4px 6px; border-radius: var(--r-sm); }
.nav__item--live .i { color: var(--red); }
.side__foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.side__me { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.side__name { font-weight: 600; }
.side__name span { color: var(--muted); font-weight: 500; margin-left: 2px; }
.side__note { display: flex; gap: 6px; font-size: 11px; color: var(--muted); padding: 0 6px; line-height: 1.4; }
.side__note .i { margin-top: 1px; }

.main { min-width: 0; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 20px; padding: 16px 32px; background: rgba(11, 12, 14, .88); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top__title { flex: 1; min-width: 0; }
.top__title h1 { font: 600 28px/1.1 var(--font-display); letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.top__actions { display: flex; align-items: center; gap: 10px; }
.pill-demo { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; font-size: 12px; color: var(--text-2); border: 1px dashed var(--line-2); border-radius: 999px; }
.page { padding: 24px 32px 48px; display: flex; flex-direction: column; gap: 28px; max-width: 1560px; }

/* ---------- Primitives ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.kicker { font: 600 11px/1.2 var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sec-head h2 { font: 600 20px/1.15 var(--font-display); letter-spacing: .02em; display: flex; align-items: center; gap: 10px; }
.sec-head .kicker { margin-bottom: 4px; }
.sec-head__r { display: flex; align-items: center; gap: 12px; }
.card > .sec-head:first-child { margin-top: -2px; }
.link-btn { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 500; color: var(--text-2); white-space: nowrap; }
.link-btn:hover { color: var(--text); }

.sample { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; font: 600 10px/1 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--r-sm); white-space: nowrap; }
.status { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; font: 600 10.5px/1 var(--font); letter-spacing: .06em; text-transform: uppercase; border-radius: var(--r-sm); white-space: nowrap; }
.status--demo { color: var(--yellow); background: rgba(232, 197, 71, .1); border: 1px solid rgba(232, 197, 71, .25); }
.status--provisional { color: #9dbcff; background: rgba(157, 188, 255, .08); border: 1px dashed rgba(157, 188, 255, .4); }
.status--verified { color: var(--win); background: var(--win-dim); border: 1px solid rgba(63, 207, 142, .25); }
.tagline { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; font-size: 12px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); white-space: nowrap; }
.kbd { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text-2); background: var(--surface-3); border-radius: var(--r-sm); }
.dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); display: inline-block; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--r); font-weight: 600; font-size: 14px; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: #ff5a67; }
.btn--ghost { background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text); }
.btn--ghost:hover { border-color: #454a52; }
.btn--saved { background: var(--orange-dim); border: 1px solid rgba(255, 143, 74, .45); color: var(--orange); }
.btn--saved .i { fill: currentColor; }
.btn--sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn--block { width: 100%; }
.btn.is-disabled { opacity: .45; pointer-events: none; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: var(--r); color: var(--text-2); border: 1px solid var(--line); background: var(--surface); }
.icon-btn:hover { color: var(--text); border-color: var(--line-2); }
.icon-btn--sm { width: 30px; height: 30px; }
.icon-btn.is-on { color: var(--orange); border-color: rgba(255, 143, 74, .45); background: var(--orange-dim); }
.icon-btn.is-on .i { fill: currentColor; }
.icon-btn__dot { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); border: 2px solid var(--surface); }

.search { display: flex; align-items: center; gap: 10px; height: 40px; width: 340px; padding: 0 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); color: var(--muted); }
.search:focus-within { border-color: var(--line-2); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); }
.search input::placeholder { color: var(--muted); }
.search kbd { font: 600 10.5px var(--font); color: var(--muted); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 3px 6px; }
.search--inline { width: 260px; height: 36px; }
.search--xl { width: 100%; height: 52px; font-size: 15px; background: var(--bg-2); }
.search__x { color: var(--muted); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-3); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; font-size: 13px; font-weight: 500; color: var(--text-2); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; white-space: nowrap; transition: .15s; }
.chip:hover { color: var(--text); border-color: var(--line-2); }
.chip em { font-style: normal; font-size: 11px; font-weight: 600; color: var(--muted); background: var(--surface-3); padding: 2px 6px; border-radius: 999px; }
.chip.is-active { color: var(--text); background: var(--surface-3); border-color: #4a4f57; }
.chip.is-active em { color: var(--text); background: rgba(255, 255, 255, .08); }

.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); }
.seg > * { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 6px; font-size: 13px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.seg > *:hover { color: var(--text); }
.seg > .is-active { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset; }
.seg--sm > * { height: 28px; padding: 0 10px; font-size: 12.5px; }
.seg--icon > * { padding: 0 8px; }
.seg--block { display: flex; width: 100%; }
.seg--block > * { flex: 1; }

.switch { position: relative; width: 40px; height: 24px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line-2); flex: none; transition: .2s; }
.switch i { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--text-2); transition: .2s; }
.switch.is-on { background: var(--red); border-color: var(--red); }
.switch.is-on i { left: 18px; background: #fff; }

.bar { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 999px; }
.bar--red { background: var(--red); } .bar--orange { background: var(--orange); } .bar--win { background: var(--win); } .bar--loss { background: var(--loss); }

.av { display: inline-grid; place-items: center; flex: none; border-radius: 50%; font: 700 12px/1 var(--font-display); letter-spacing: .04em; text-transform: uppercase; color: var(--ac); background: color-mix(in srgb, var(--ac) 16%, var(--surface-2)); border: 1px solid color-mix(in srgb, var(--ac) 40%, transparent); }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }

.ab { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 7px; font-size: 11.5px; font-weight: 600; border-radius: var(--r-sm); white-space: nowrap; }
.ab--incendiary { color: var(--orange); background: var(--orange-dim); }
.ab--smoke { color: #a9bed3; background: rgba(159, 182, 204, .1); }
.ab--stim { color: var(--yellow); background: rgba(232, 197, 71, .1); }
.ab--orbital { color: var(--red); background: var(--red-dim); }
.ab--generic { color: var(--text-2); background: var(--surface-3); }
.ab--utility { color: #91b6dd; background: rgba(91, 134, 229, .12); }

.sbadge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; font-size: 11.5px; font-weight: 600; border-radius: var(--r-sm); color: var(--text-2); background: var(--surface-3); }
.sbadge--attack .i { color: var(--red); } .sbadge--defense .i { color: #7fb2e5; }
.res { display: inline-flex; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.res--W { color: var(--win); } .res--L { color: var(--loss); } .res--D { color: var(--muted); }
.rr { font-weight: 600; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--muted); }
.rr.up { color: var(--win); } .rr.down { color: var(--loss); }
.up { color: var(--win); } .down { color: var(--loss); }

.notice { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--yellow); border-radius: var(--r); font-size: 13px; color: var(--text-2); }
.notice > .i { color: var(--yellow); }
.notice > div { flex: 1; }
.notice b { color: var(--text); font-weight: 600; }
.notice--sm { padding: 10px 12px; font-size: 12.5px; }
.review { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; background: repeating-linear-gradient(135deg, var(--bg-2) 0 8px, var(--surface) 8px 16px); border: 1px dashed var(--line-2); border-radius: var(--r); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.review .seg { margin-left: auto; text-transform: none; letter-spacing: 0; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.toolbar__r { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--text-2); margin-top: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; }
.legend i.ring { background: transparent; border: 2px solid var(--text-2); }
.legend i.dash { width: 18px; height: 0; border-radius: 0; border-top: 2px dashed var(--text-2); }

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 36px 20px; }
.empty__icon, .empty__art { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); margin-bottom: 6px; }
.empty__t { font: 600 18px/1.2 var(--font-display); letter-spacing: .02em; }
.chips--c { justify-content: center; margin-top: 8px; }
.empty-sm { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 12px; color: var(--text-2); text-align: center; font-size: 13px; border: 1px dashed var(--line-2); border-radius: var(--r); }
.empty-sm .i { color: var(--muted); }
.skel { position: absolute; inset: 0; background: linear-gradient(100deg, var(--surface-2) 30%, var(--surface-3) 50%, var(--surface-2) 70%); background-size: 300% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -200% 0; } }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .12); border-top-color: var(--red); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); border: 1px solid rgba(255, 143, 74, .35); box-shadow: var(--shadow); }
.toast > .i { color: var(--orange); }
.toast div { flex: 1; display: flex; flex-direction: column; font-size: 13px; }
.toast span { color: var(--muted); font-size: 12px; }

.tag-live { display: inline-flex; align-items: center; gap: 7px; font: 700 11px/1 var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--red); }
.tag-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(255, 70, 85, .6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 70, 85, .55); } 70% { box-shadow: 0 0 0 8px rgba(255, 70, 85, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 70, 85, 0); } }

/* ---------- Art ---------- */
.map-art { position: relative; overflow: hidden; background: radial-gradient(120% 90% at 70% 10%, color-mix(in srgb, var(--mc) 22%, var(--mt)) 0%, var(--mt) 55%, #0c0d0f 100%); width: 100%; height: 100%; }
.map-art__svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .95; }
.map-art__name { position: absolute; left: 16px; bottom: 12px; font: 700 28px/1 var(--font-display); letter-spacing: .08em; text-transform: uppercase; }
.svg-site { font: 700 64px var(--font-display); }
.svg-call { font: 600 17px var(--font); letter-spacing: .12em; }
.svg-num { font: 700 15px var(--font); }
.svg-tiny { font: 600 9px var(--font); letter-spacing: .12em; }
.map-art--sm .svg-site { font-size: 90px; }

.agent-art { position: relative; overflow: hidden; width: 100%; height: 100%; background:
  radial-gradient(80% 70% at 50% 35%, color-mix(in srgb, var(--ac) 30%, transparent), transparent 70%),
  linear-gradient(180deg, color-mix(in srgb, var(--ac) 12%, #16181c), #101114); }
.agent-art__word { position: absolute; left: 50%; top: 4%; transform: translateX(-50%); font: 700 64px/0.9 var(--font-display); letter-spacing: .02em; text-transform: uppercase; color: transparent; -webkit-text-stroke: 1px color-mix(in srgb, var(--ac) 45%, transparent); white-space: nowrap; }
.agent-art__fig { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); height: 88%; width: auto; }
.agent-art--xs .agent-art__word, .agent-art--sm .agent-art__word { display: none; }
.agent-art--lg .agent-art__word { font-size: 84px; }
.agent-art--xl .agent-art__word { font-size: 120px; }
.art-tag { position: absolute; left: 10px; bottom: 10px; font: 600 9.5px/1 var(--font); letter-spacing: .1em; text-transform: uppercase; color: rgba(236, 232, 225, .55); background: rgba(0, 0, 0, .45); padding: 5px 7px; border-radius: var(--r-sm); }

/* Lineup thumbnail */
.lthumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: radial-gradient(100% 100% at 50% 0%, color-mix(in srgb, var(--mc) 16%, #111316), #0e0f12); }
.lthumb > svg, .lthumb > .map-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.lthumb__dur { position: absolute; right: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; font-size: 11px; font-weight: 600; background: rgba(0, 0, 0, .65); border-radius: var(--r-sm); }
.lthumb__agent { position: absolute; left: 8px; top: 8px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; font: 700 13px var(--font-display); color: var(--ac); background: rgba(0, 0, 0, .6); border: 1px solid color-mix(in srgb, var(--ac) 50%, transparent); }
.lthumb--mini { width: 72px; flex: none; border-radius: 6px; }

/* Lineup card */
.lcard { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; transition: border-color .15s, transform .15s; }
.lcard:hover { border-color: var(--line-2); transform: translateY(-2px); }
.lcard.is-saved { border-color: rgba(255, 143, 74, .35); }
.lcard__save { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-sm); background: var(--orange); color: #1a0d05; }
.lcard__save .i { fill: currentColor; }
.lcard__body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; flex: 1; }
.lcard__meta { display: flex; gap: 6px; flex-wrap: wrap; }
.lcard__title { font-weight: 600; font-size: 14.5px; line-height: 1.3; }
.lcard__sub { font-size: 12px; color: var(--muted); }
.lcard__foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 6px; font-size: 12px; }
.lcard__foot .muted { display: inline-flex; align-items: center; gap: 4px; }

/* Lineup row */
.lrow { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r); border: 1px solid transparent; transition: background .15s, border-color .15s; }
.lrow:hover { background: var(--surface-2); }
.lrow.is-active { background: var(--surface-2); border-color: var(--line-2); box-shadow: inset 3px 0 0 var(--orange); }
.lrow__n { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 50%; font-size: 11px; font-weight: 700; color: var(--col); border: 1.5px solid var(--col); }
.lrow__body { flex: 1; min-width: 0; }
.lrow__title { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrow__sub { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; }
.lrow__sub .ab { height: 20px; padding: 0 5px; }
.lrow__saved { color: var(--orange); }
.lrow__saved .i { fill: currentColor; }
.stack-rows { display: flex; flex-direction: column; gap: 2px; }

/* Agent chip */
.agent-chip { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 5px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 500; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.agent-chip__av { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; font: 700 12px var(--font-display); text-transform: uppercase; color: var(--ac); background: color-mix(in srgb, var(--ac) 15%, var(--surface-2)); }
.agent-chip.is-active { color: var(--text); border-color: var(--ac); background: color-mix(in srgb, var(--ac) 10%, var(--surface)); }

/* Match row */
.mlist { display: flex; flex-direction: column; }
.mrow { display: grid; grid-template-columns: 64px minmax(150px, 2fr) repeat(2, minmax(84px, 1fr)) repeat(2, minmax(52px, .7fr)) 80px; align-items: center; gap: 12px; padding: 10px 8px 10px 0; border-bottom: 1px solid var(--line); position: relative; }
.mrow:last-child { border-bottom: 0; }
.mrow::before { content: ''; position: absolute; left: -20px; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; }
.mrow--W::before { background: var(--win); } .mrow--L::before { background: var(--loss); } .mrow--D::before { background: var(--muted); }
.mrow__map { position: relative; width: 64px; height: 40px; border-radius: 6px; overflow: hidden; }
.mrow__who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mrow__title { font-weight: 600; }
.mrow__score .num { font-size: 15px; }
.mrow__rr { text-align: right; }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; }
.kpi { padding: 4px 16px; border-left: 1px solid var(--line); }
.kpi:first-child { border-left: 0; padding-left: 0; }
.kpi__label { font-size: 12px; color: var(--muted); }
.kpi__value { font: 600 28px/1.15 var(--font-display); letter-spacing: .01em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.kpi__delta { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; }
.kpi__sub { font-size: 12px; color: var(--muted); }

/* Charts */
.chart { position: relative; }
.chart__svg { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font: 500 11px var(--font); }
.chart .axis--ref { fill: var(--text-2); }
.chart .refline { stroke: var(--text-2); stroke-opacity: .5; stroke-dasharray: 4 5; }
.chart__guide { stroke: var(--text-2); stroke-opacity: .5; }
.chart__hit { cursor: crosshair; }
.chart__tip { position: absolute; transform: translate(-50%, calc(-100% - 14px)); display: flex; gap: 8px; align-items: baseline; padding: 6px 10px; background: var(--surface-3); border: 1px solid var(--line-2); border-radius: 6px; font-size: 12px; white-space: nowrap; pointer-events: none; box-shadow: var(--shadow); }
.chart__tip b { color: var(--muted); font-weight: 500; }
.chart__tip span { font-weight: 600; }
.chart__tip em { font-style: normal; font-weight: 600; }

/* Selectors */
.sel { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r); color: var(--muted); }
.sel__k { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.sel__v { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; }
.sel__v .av { width: 22px; height: 22px; font-size: 9px; }


/* Agent art placeholder (monogram card) — reads as intentional placeholder art */
.agent-mono { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: var(--r); border: 1px solid color-mix(in srgb, var(--ac) 45%, var(--line)); background:
  radial-gradient(90% 80% at 70% 15%, color-mix(in srgb, var(--ac) 38%, transparent), transparent 70%),
  linear-gradient(160deg, color-mix(in srgb, var(--ac) 22%, #17191d), #0f1013); }
.agent-mono::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--ac); }
.agent-mono__glyph { position: absolute; left: 10px; top: 6px; font: 700 54px/1 var(--font-display); text-transform: uppercase; letter-spacing: .02em; color: color-mix(in srgb, var(--ac) 80%, #fff); }
.agent-mono__role { position: absolute; left: 10px; bottom: 26px; display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(236, 232, 225, .75); }
.agent-mono__tag { position: absolute; left: 10px; bottom: 9px; font: 600 8.5px/1 var(--font); letter-spacing: .12em; text-transform: uppercase; color: rgba(236, 232, 225, .45); }

/* Lineup token: replaces the unreadable 60px map crops in list rows */
.ltoken { position: relative; flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r); }
.ltoken b { position: absolute; right: -4px; bottom: -4px; min-width: 17px; height: 17px; padding: 0 3px; display: grid; place-items: center; border-radius: 5px; font: 700 10px/1 var(--font); color: var(--text); background: var(--surface-3); border: 1px solid var(--line-2); }
.ltoken--incendiary { color: var(--orange); background: var(--orange-dim); }
.ltoken--smoke { color: #a9bed3; background: rgba(159, 182, 204, .1); }
.ltoken--stim { color: var(--yellow); background: rgba(232, 197, 71, .1); }
.ltoken--orbital { color: var(--red); background: var(--red-dim); }
.ltoken--utility { color: #91b6dd; background: rgba(91, 134, 229, .12); }

/* ---------- Real map + agent images (remote, credited) ---------- */
.map-layer .map-failtext { display: none; font-family: var(--font); font-weight: 600; fill: rgba(236, 232, 225, .6); }
.map-layer.is-failed .map-failtext { display: inline; }
.map-layer.is-failed image { display: none; }
.tac-map--img { background: #1a1c20; }
/* Muted tactical-map treatment (filters defined in art.js): charcoal field, medium-grey floors (never white),
   olive sites, pale-grey outlines, near-white labels. Tactical surfaces only: decorative tiles that carry
   text keep the original image. */
.map-src { filter: url(#vt-map-base); }
.map-sites { filter: url(#vt-map-site); }
.map-art .map-src { filter: none; }
.map-art .map-sites { display: none; }
.mapstage__svg, .map-big { background: #1a1c20; }
/* A dark halo keeps every ability colour legible on the grey floors */
.tac-map--img .mk, .lthumb svg > circle { filter: drop-shadow(0 0 1.5px rgba(8, 9, 11, .95)) drop-shadow(0 0 4px rgba(8, 9, 11, .55)); }
.map-pending rect { fill: rgba(10, 11, 13, .82); stroke: rgba(236, 232, 225, .25); }
.map-pending text { font: 600 18px/1 var(--font); fill: #ece8e1; letter-spacing: .02em; }
/* Agent images: shimmer until loaded; the initials fallback never looks like a finished portrait */
.agent-art--img, .agent-mono--img { background: linear-gradient(180deg, color-mix(in srgb, var(--ac) 22%, #14161a), #0e1013); }
.agent-art__img { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); height: 92%; max-height: 256px; width: auto; max-width: 100%; object-fit: contain; }
.agent-art--xs .agent-art__img, .agent-art--sm .agent-art__img { height: 100%; }
.agent-art__fallback { display: none; position: absolute; inset: 0; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.agent-art__fallback b { font: 700 42px/1 var(--font-display); text-transform: uppercase; color: color-mix(in srgb, var(--ac) 70%, #fff); }
.agent-art__fallback em { font: 600 9.5px/1 var(--font); font-style: normal; letter-spacing: .1em; text-transform: uppercase; color: rgba(236, 232, 225, .55); }
.agent-art.is-failed .agent-art__fallback { display: flex; }
.agent-art--xs .agent-art__fallback b, .agent-art--sm .agent-art__fallback b { font-size: 18px; }
.agent-art--xs .agent-art__fallback em, .agent-art--sm .agent-art__fallback em { display: none; }
.agent-mono__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.agent-mono__fb, .agent-mono__fbtag { display: none; }
.agent-mono.is-failed .agent-mono__fb { display: block; }
.agent-mono.is-failed .agent-mono__fbtag { display: block; position: absolute; left: 10px; bottom: 9px; font: 600 8.5px/1 var(--font); letter-spacing: .12em; text-transform: uppercase; color: rgba(236, 232, 225, .5); }
.av.has-img, .agent-chip__av.has-img { position: relative; overflow: hidden; }
.av__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; background: color-mix(in srgb, var(--ac) 18%, #15171b); }
.vmapcard__credit { margin: 6px 0 0; font-size: 11.5px; color: var(--text-2); }
/* A real map whose image failed never shows its overlays (they are only meaningful on that image) */
svg:has(> .map-layer.is-failed) > :not(.map-layer):not(.map-pending) { display: none; }
.mapstage .map-failtext { display: none !important; }
.mapview__imgfail { display: none; }
.mapview:has(.map-layer.is-failed) .maplayer, .mapview:has(.map-layer.is-failed) .sitehit { display: none; }
.mapview:has(.map-layer.is-failed) .mapview__imgfail { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 5; display: flex; align-items: center; gap: 8px; width: min(360px, calc(100% - 32px)); margin: 0; padding: 14px 16px; font-size: 13.5px; color: var(--text-2); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.mhead__art .agent-mono__fbtag, .m-mhead__art .agent-mono__fbtag { display: none !important; }
.mhead__art .agent-mono__glyph, .m-mhead__art .agent-mono__glyph { font-size: 30px; }
.live-card__bg .map-failtext { display: none !important; } /* decorative background: no overlapping failure text */
