select, input, .filters button { min-height: 34px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); background: var(--surface-raised); font: 13px Verdana, sans-serif; }
:root {
  --ink: #eef4f1;
  --muted: #b5c7c1;
  --surface: #17221f;
  --surface-raised: #1e2d29;
  --line: #385149;
  --ground: #091110;
  --red: #f17b70;
  --green: #5ce0ad;
  --yellow: #efc15b;
  --table-heading: #13201d;
  --row-hover: #243732;
  --notice-bg: #3a2421;
  --notice-ink: #ffd0c8;
  --shadow: 0 18px 45px rgba(0, 0, 0, .3);
  --focus: #f3c95f;
  --radius: 12px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --ink: #17231f;
  --muted: #52645d;
  --surface: #ffffff;
  --surface-raised: #f2f7f4;
  --line: #d4e0db;
  --ground: #eaf1ee;
  --red: #bd3f36;
  --green: #1c7b57;
  --yellow: #d8a636;
  --table-heading: #f6f8f8;
  --row-hover: #f2f7f5;
  --notice-bg: #fdecea;
  --notice-ink: #782c27;
  --shadow: 0 16px 36px rgba(24, 39, 37, .09);
  --focus: #8a5a00;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--ground);
  background-image: radial-gradient(circle at 15% -10%, rgba(92, 224, 173, .11), transparent 34%), linear-gradient(rgba(92, 224, 173, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(92, 224, 173, .035) 1px, transparent 1px);
  background-size: auto, 42px 42px, 42px 42px;
  font-family: "DM Sans", "Segoe UI", sans-serif;
  min-height: 100vh;
  font-size: 15px;
  transition: background .2s ease, color .2s ease;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px max(24px, calc((100vw - 1440px) / 2));
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .04), 0 10px 35px rgba(0, 0, 0, .08);
}

.brand { display: flex; align-items: center; gap: 16px; }
.brand img { width: 45px; height: 45px; object-fit: contain; }
.brand img.brand-logo { width: 52px; height: 52px; object-fit: cover; border: 1px solid var(--line); border-radius: 8px; }
.eyebrow { margin: 0 0 6px; color: var(--muted); font: 700 11px/1.2 "DM Sans", sans-serif; letter-spacing: 1.4px; }
.topbar .eyebrow { color: var(--muted); }
h1, h2, h3 { margin: 0; font-family: "Space Grotesk", "Segoe UI", sans-serif; font-weight: 700; letter-spacing: 0; }
h1 { font-size: 30px; line-height: 1.05; }
h2 { font-size: 22px; line-height: 1.15; }

.health { display: flex; align-items: center; gap: 9px; color: var(--muted); font: 13px Verdana, sans-serif; }
.health span { width: 9px; height: 9px; border-radius: 50%; background: var(--yellow); }
.health.healthy span { background: #6fcf97; }
.health.unhealthy span { background: #f06c63; }

main { max-width: 1440px; margin: 0 auto; padding: 34px 28px 60px; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.theme-toggle { min-height: 36px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: var(--surface-raised); font: 700 11px "DM Sans", sans-serif; cursor: pointer; }
.theme-toggle:hover { color: var(--ink); border-color: var(--green); }
.view-tabs { display: flex; gap: 4px; max-width: 100%; margin-bottom: 26px; padding: 5px; overflow-x: auto; border: 1px solid var(--line); border-radius: 9px; background: color-mix(in srgb, var(--surface) 92%, transparent); box-shadow: 0 8px 24px rgba(0, 0, 0, .12); scrollbar-width: thin; }
.view-tabs a { padding: 10px 15px; border-radius: 6px; color: var(--muted); font: 700 13px "DM Sans", sans-serif; transition: color .18s ease, background .18s ease; }
.view-tabs a:hover { color: var(--ink); }
.view-tabs a.active { color: #082019; background: var(--green); box-shadow: 0 4px 16px rgba(92, 224, 173, .24); }
.scoreboard { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.scoreboard > div { position: relative; min-height: 116px; padding: 22px; border-right: 1px solid var(--line); }
.scoreboard > div::before { position: absolute; top: 0; right: 22px; left: 22px; height: 2px; background: var(--green); content: ""; opacity: .65; }
.scoreboard > div:last-child { border-right: 0; }
.scoreboard span { display: block; color: var(--muted); font: 700 10px/1.3 "DM Sans", sans-serif; text-transform: uppercase; letter-spacing: 1px; }
.scoreboard strong { display: block; margin-top: 14px; font: 700 32px/1 "Space Grotesk", sans-serif; letter-spacing: -.5px; }

.notice { display: flex; justify-content: space-between; gap: 16px; margin-top: 20px; padding: 14px 16px; color: var(--notice-ink); background: var(--notice-bg); border-left: 4px solid var(--red); font: 13px Verdana, sans-serif; }
.notice strong, .notice span { display: block; }
.notice span { margin-top: 3px; }
.notice code { display: block; max-width: 620px; margin-top: 8px; overflow-wrap: anywhere; white-space: normal; }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 14px; margin-top: 22px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); font: 12px "DM Sans", sans-serif; }
.filters label { display: grid; gap: 5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
select, .filters button { min-height: 38px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: var(--surface-raised); font: 13px "DM Sans", sans-serif; }
.filters button { border-color: var(--green); color: #082019; background: var(--green); font-weight: 700; cursor: pointer; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.85fr); gap: 20px; min-width: 0; margin-top: 20px; }
.content-grid > * { min-width: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.section-heading { padding: 22px 22px 18px; border-bottom: 1px solid var(--line); }
.section-heading .eyebrow { color: var(--green); }
.table-wrap { min-width: 0; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font: 15px "DM Sans", sans-serif; }
th { color: var(--muted); background: var(--table-heading); font-size: 11px; text-align: left; text-transform: uppercase; letter-spacing: 0.6px; }
th, td { padding: 13px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .16s ease; }
tbody tr:hover { background: var(--row-hover); }
a { color: var(--green); font-weight: 700; text-decoration: none; }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.player-name { display: flex; align-items: center; gap: 9px; }
.avatar { width: 28px; height: 28px; flex: 0 0 28px; border: 1px solid var(--line); border-radius: 50%; object-fit: cover; }
.impact { font-weight: 700; }
.badge { display: inline-block; margin: 3px 0 0 6px; padding: 2px 5px; border: 1px solid color-mix(in srgb, var(--green) 55%, var(--line)); color: var(--green); background: color-mix(in srgb, var(--green) 12%, transparent); font: 700 9px Verdana, sans-serif; text-transform: uppercase; letter-spacing: .4px; }
.positive, .win { color: var(--green); }
.negative, .loss { color: var(--red); }
.empty { padding: 36px 20px; margin: 0; color: var(--muted); font: 14px Verdana, sans-serif; }

.lane-list { padding: 4px 20px 12px; }
.lane-player { border-bottom: 1px solid var(--line); }
.lane-player:last-child { border-bottom: 0; }
.lane-player summary { padding: 13px 0; cursor: pointer; }
.lane-player summary small { margin-left: auto; color: var(--muted); font: 11px Verdana, sans-serif; }
.lane-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 10px 0 10px 37px; border-top: 1px solid var(--line); font: 13px Verdana, sans-serif; }
.lane-row span, .lane-row small { color: var(--muted); }
.lane-row.overall { background: var(--surface-raised); color: var(--ink); font-weight: 700; }
.record { font-weight: 700; }
.recent { margin-top: 20px; }
.graph-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.graph-panel { min-height: 360px; }
.chart-wrap { position: relative; height: 290px; padding: 16px 20px 20px; }
.rival-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; padding: 16px 20px; font: 13px Verdana, sans-serif; }
.rival-grid h3 { margin: 0 0 8px; font: 700 15px Georgia, serif; }
.rival-grid ol { margin: 0; padding-left: 20px; }
.rival-grid li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.secretshop-team { margin-top: 20px; }
.secretshop-wards { margin-top: 20px; }
.team-ward-map { position: relative; width: min(calc(100% - 40px), 640px); aspect-ratio: 1; margin: 20px auto; overflow: hidden; border: 1px solid var(--line); background: center / contain no-repeat url("https://www.opendota.com/assets/images/dota2/map/detailed_740.webp"); }
.ward-mode { display: flex; gap: 1px; padding: 12px 20px; border-bottom: 1px solid var(--line); background: var(--surface-raised); }
.ward-mode button { min-height: 30px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); background: var(--surface); font: 700 11px Verdana, sans-serif; cursor: pointer; }
.ward-mode button.active { color: var(--ink); border-color: var(--yellow); background: color-mix(in srgb, var(--yellow) 16%, var(--surface)); }
.secretshop-directory { margin-top: 20px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.team-directory { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.team-card { display: grid; gap: 7px; min-height: 126px; padding: 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--ink); font-family: "DM Sans", sans-serif; }
.team-card:nth-child(4n) { border-right: 0; }
.team-card:nth-last-child(-n + 4) { border-bottom: 0; }
.team-card { transition: background .16s ease, transform .16s ease; }
.team-card:hover, .team-card.active { color: var(--ink); background: var(--row-hover); }
.team-card:hover { transform: translateY(-2px); }
.team-card.active { box-shadow: inset 0 -3px var(--green); }
.team-card strong { font: 700 16px "Space Grotesk", sans-serif; }
.team-card span { color: var(--green); font-size: 12px; }
.team-card small { color: var(--muted); font-size: 11px; }
.kobold-directory { margin-top: 20px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.kobold-team-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kobold-team-card { display: grid; gap: 7px; min-height: 126px; padding: 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--ink); font-family: "DM Sans", sans-serif; }
.kobold-team-card:nth-child(4n) { border-right: 0; }
.kobold-team-card:nth-last-child(-n + 4) { border-bottom: 0; }
.kobold-team-card { transition: background .16s ease, transform .16s ease; }
.kobold-team-card:hover, .kobold-team-card.active { color: var(--ink); background: var(--row-hover); }
.kobold-team-card:hover { transform: translateY(-2px); }
.kobold-team-card.active { box-shadow: inset 0 -3px var(--green); }
.kobold-team-card strong { font: 700 16px "Space Grotesk", sans-serif; }
.kobold-team-card span { color: var(--green); font-size: 12px; }
.kobold-team-card small { color: var(--muted); font-size: 11px; }
.kobold-selected { margin-top: 20px; }
.kobold-roster { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kobold-player { display: grid; gap: 7px; min-width: 0; padding: 16px; border-right: 1px solid var(--line); font: 12px Verdana, sans-serif; }
.kobold-player:last-child { border-right: 0; }
.kobold-player strong { overflow-wrap: anywhere; }
.kobold-player > span { color: var(--muted); font-size: 11px; }
.kobold-player div { display: flex; flex-wrap: wrap; gap: 8px; }
.kobold-player a { color: var(--green); font-size: 11px; }
.kobold-captain { color: var(--red); font: 700 9px Verdana, sans-serif; letter-spacing: .5px; }
.manual-scout { margin-top: 20px; }
.secretshop-note { margin: 0; padding: 16px 20px; color: var(--muted); font: 13px Verdana, sans-serif; }
.secretshop-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 20px; margin-top: 20px; }
.scout-player { min-width: 0; }
.scout-player-meta { display: grid; gap: 4px; align-content: center; min-height: 74px; padding: 12px 16px; border: 1px solid var(--line); border-bottom: 0; background: var(--surface-raised); font: 12px Verdana, sans-serif; }
.scout-player-meta span { color: var(--muted); font-size: 11px; }
.scout-player-meta a { color: var(--green); font-size: 11px; }
.scout-pools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.scout-pools > div { min-width: 0; padding: 16px 20px; }
.scout-pools > div + div { border-left: 1px solid var(--line); }
.scout-pools > div:nth-child(odd) { border-left: 0; }
.scout-pools > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
.scout-pools h3 { margin: 0 0 10px; color: var(--muted); font: 700 11px/1.2 Verdana, sans-serif; letter-spacing: .6px; overflow-wrap: anywhere; text-transform: uppercase; }
.scout-pools ol { margin: 0; padding: 0; list-style: none; font: 14px Verdana, sans-serif; }
.scout-pools li { display: grid; gap: 3px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.scout-pools li:last-child { border-bottom: 0; }
.hero-pick { display: flex; align-items: center; gap: 8px; min-width: 0; overflow-wrap: anywhere; }
.hero-icon { width: 30px; height: 17px; flex: 0 0 30px; border: 1px solid var(--line); object-fit: cover; }
.scout-pools span { color: var(--muted); font-size: 11px; }
.team-heroes { margin-top: 20px; }
.team-heroes ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; margin: 0; padding: 0 20px 12px; list-style: none; font: 13px Verdana, sans-serif; }
.team-heroes li { display: grid; gap: 3px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.team-heroes li:nth-last-child(-n + 2) { border-bottom: 0; }
.team-heroes span { color: var(--muted); font-size: 11px; }
.aegis-hero { margin-top: 20px; }
.aegis-scale { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 0 20px 20px; overflow: hidden; border: 1px solid var(--line); background: var(--line); }
.aegis-scale span { display: grid; gap: 6px; padding: 16px; color: var(--muted); background: var(--surface-raised); font: 12px Verdana, sans-serif; }
.aegis-scale span:nth-child(2) { color: var(--ink); text-align: center; }
.aegis-scale span:last-child { text-align: right; }
.aegis-scale strong { color: var(--green); font: 700 25px "Space Grotesk", sans-serif; }
.aegis-content { align-items: start; }
.aegis-steps { display: grid; gap: 0; margin: 0; padding: 4px 22px 18px 48px; font: 14px/1.5 Verdana, sans-serif; }
.aegis-steps li { padding: 13px 0 13px 8px; border-bottom: 1px solid var(--line); }
.aegis-steps li:last-child { border-bottom: 0; }
.aegis-steps strong, .aegis-steps span { display: block; }
.aegis-steps strong { color: var(--ink); font-family: "DM Sans", sans-serif; }
.aegis-steps span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.aegis-component-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.aegis-component-list div { display: grid; gap: 4px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.aegis-component-list div:nth-child(even) { border-left: 1px solid var(--line); }
.aegis-component-list strong { font: 700 14px "Space Grotesk", sans-serif; }
.aegis-component-list span, .aegis-callouts span { color: var(--muted); font: 12px/1.45 Verdana, sans-serif; }
.aegis-notes { margin-top: 20px; }
.aegis-callouts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.aegis-callouts div { display: grid; gap: 6px; padding: 18px 20px; border-right: 1px solid var(--line); }
.aegis-callouts div:last-child { border-right: 0; }
.aegis-callouts strong { font: 700 15px "Space Grotesk", sans-serif; }
.match-index-intro { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 20px; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(135deg, var(--surface), color-mix(in srgb, var(--green) 9%, var(--surface))); box-shadow: var(--shadow); }
.match-index-intro h2 { margin-bottom: 8px; }
.match-index-intro p:not(.eyebrow) { max-width: 620px; margin: 0; color: var(--muted); line-height: 1.5; }
.match-search { display: grid; gap: 7px; min-width: min(100%, 300px); color: var(--muted); font: 700 11px "DM Sans", sans-serif; text-transform: uppercase; letter-spacing: .6px; }
.match-search div { display: flex; gap: 7px; }
.match-search input { min-width: 0; min-height: 38px; flex: 1; padding: 8px 11px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: var(--surface-raised); font: 13px "DM Sans", sans-serif; }
.match-search button { min-height: 38px; padding: 8px 14px; border: 1px solid var(--green); border-radius: 7px; color: #082019; background: var(--green); font: 700 13px "DM Sans", sans-serif; cursor: pointer; }
.match-list { display: grid; }
.match-list-row { display: grid; grid-template-columns: minmax(190px, 1.5fr) minmax(130px, .8fr) minmax(115px, .6fr) minmax(115px, .6fr) auto; align-items: center; gap: 18px; padding: 18px 22px; border-bottom: 1px solid var(--line); color: var(--ink); transition: background .16s ease, padding .16s ease; }
.match-list-row:last-child { border-bottom: 0; }
.match-list-row:hover { padding-left: 26px; background: var(--row-hover); }
.match-list-row strong, .match-list-row small { display: block; }
.match-list-row strong { font: 700 16px "Space Grotesk", sans-serif; }
.match-list-row small, .match-list-stat small { margin-top: 5px; color: var(--muted); font: 11px Verdana, sans-serif; }
.match-result span { display: block; font-weight: 700; }
.match-result small { margin-top: 3px; }
.tracked-match { display: block; margin-top: 7px; color: var(--green); font: 700 10px "DM Sans", sans-serif; font-style: normal; letter-spacing: .3px; }
.tracked-match.none { color: var(--muted); }
.player-hero-name { display: flex; align-items: center; gap: 9px; }
.player-hero-icon { width: 42px; height: 28px; flex: 0 0 auto; }
.match-list-stat strong { margin-top: 5px; font: 700 20px "Space Grotesk", sans-serif; }
.match-arrow { color: var(--green); font-size: 22px; }
.match-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 20px; padding: 26px; background: linear-gradient(135deg, var(--surface), color-mix(in srgb, var(--green) 10%, var(--surface))); }
.match-hero h2 { margin-bottom: 8px; }
.match-subtitle { margin: 0; color: var(--muted); font: 13px Verdana, sans-serif; }
.match-hero-stats { display: flex; gap: 28px; }
.match-hero-stats div { min-width: 110px; padding-left: 18px; border-left: 1px solid var(--line); }
.match-hero-stats small, .match-player-row small { display: block; color: var(--muted); font: 700 10px "DM Sans", sans-serif; letter-spacing: .5px; }
.match-hero-stats strong { display: block; margin-top: 8px; font: 700 27px "Space Grotesk", sans-serif; }
.match-team, .match-notes { margin-top: 20px; }
.match-team.radiant { border-top: 3px solid var(--green); }
.match-team.dire { border-top: 3px solid var(--red); }
.match-team-heading { display: flex; align-items: center; justify-content: space-between; }
.team-winner { display: inline-block; margin-left: 8px; padding: 4px 7px; color: #082019; background: var(--green); font: 700 10px "DM Sans", sans-serif; vertical-align: middle; }
.team-score { color: var(--muted); font: 700 12px "DM Sans", sans-serif; }
.match-player-list { display: grid; }
.match-player-row { display: grid; grid-template-columns: 52px minmax(190px, 1.5fr) 100px repeat(4, minmax(82px, .65fr)); align-items: center; gap: 14px; padding: 14px 22px; border-bottom: 1px solid var(--line); }
.match-player-row:last-child { border-bottom: 0; }
.match-player-row.tracked-player { padding-left: 18px; border-left: 4px solid var(--green); background: color-mix(in srgb, var(--green) 8%, transparent); }
.hero-icon { width: 52px; height: 34px; border: 1px solid var(--line); border-radius: 5px; object-fit: cover; background: var(--surface-raised); }
.hero-icon-missing { background: linear-gradient(135deg, var(--surface-raised), var(--line)); }
.match-player-identity a, .match-player-identity strong, .match-player-identity small { display: block; }
.match-player-identity strong { margin-top: 3px; font: 700 14px "Space Grotesk", sans-serif; }
.match-player-identity small { margin-top: 4px; font-weight: 400; }
.tracked-badge { display: inline-block; margin: 4px 0 0 6px; padding: 2px 5px; color: #082019; background: var(--green); font: 700 9px "DM Sans", sans-serif; letter-spacing: .5px; vertical-align: middle; }
.match-player-row > div:not(.match-player-identity) strong { display: block; margin-top: 5px; font: 700 15px "Space Grotesk", sans-serif; }
.match-kda strong { font-variant-numeric: tabular-nums; }
.match-notes-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.match-notes-grid div { display: grid; gap: 6px; padding: 18px 20px; border-right: 1px solid var(--line); }
.match-notes-grid div:last-child { border-right: 0; }
.match-notes-grid strong { font: 700 15px "Space Grotesk", sans-serif; }
.match-notes-grid span { color: var(--muted); font: 12px/1.5 Verdana, sans-serif; }

@media (max-width: 900px) {
  .scoreboard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scoreboard > div { border-bottom: 1px solid var(--line); }
  .scoreboard > div:nth-child(even) { border-right: 0; }
  .content-grid { grid-template-columns: 1fr; }
  .graph-grid { grid-template-columns: 1fr; }
  .secretshop-grid { grid-template-columns: 1fr; }
  .team-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kobold-team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team-card:nth-child(4n) { border-right: 1px solid var(--line); }
  .team-card:nth-child(even) { border-right: 0; }
  .team-card:nth-last-child(-n + 4) { border-bottom: 1px solid var(--line); }
  .team-card:nth-last-child(-n + 2) { border-bottom: 0; }
  .kobold-team-card:nth-child(4n) { border-right: 1px solid var(--line); }
  .kobold-team-card:nth-child(even) { border-right: 0; }
  .kobold-team-card:nth-last-child(-n + 4) { border-bottom: 1px solid var(--line); }
  .kobold-team-card:nth-last-child(-n + 2) { border-bottom: 0; }
  .kobold-roster { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kobold-player:nth-child(even) { border-right: 0; }
  .match-index-intro, .match-hero { align-items: stretch; flex-direction: column; }
  .match-list-row { grid-template-columns: minmax(0, 1fr) auto auto; }
  .match-list-row .match-result { grid-column: 2; grid-row: 1; }
  .match-list-row .match-arrow { grid-column: 3; grid-row: 1; }
  .match-hero-stats { gap: 18px; }
  .match-player-row { grid-template-columns: 44px minmax(0, 1fr) 84px 90px; gap: 10px; padding: 13px 16px; }
  .hero-icon { width: 44px; height: 30px; }
  .match-notes-grid { grid-template-columns: 1fr; }
  .match-notes-grid div { border-right: 0; border-bottom: 1px solid var(--line); }
  .match-notes-grid div:last-child { border-bottom: 0; }
}

@media (max-width: 560px) {
  .topbar { align-items: flex-start; flex-direction: column; padding: 18px; }
  .topbar-actions { width: 100%; justify-content: space-between; }
  main { padding: 14px; }
  .scoreboard { grid-template-columns: 1fr; }
  .scoreboard > div { min-height: 78px; border-right: 0; }
  .scoreboard strong { margin-top: 6px; font-size: 25px; }
  .notice { align-items: flex-start; flex-direction: column; }
  .filters { display: grid; grid-template-columns: 1fr 1fr; }
  .filters button { grid-column: span 2; }
  .mobile-hide { display: none; }
  th, td { padding: 11px 12px; }
  .lane-row { padding-left: 26px; }
  .team-directory { grid-template-columns: 1fr; }
  .team-card, .team-card:nth-child(4n), .team-card:nth-child(even) { border-right: 0; border-bottom: 1px solid var(--line); }
  .team-card:last-child { border-bottom: 0; }
  .kobold-team-grid { grid-template-columns: 1fr; }
  .kobold-team-card, .kobold-team-card:nth-child(4n), .kobold-team-card:nth-child(even) { border-right: 0; border-bottom: 1px solid var(--line); }
  .kobold-team-card:last-child { border-bottom: 0; }
  .kobold-roster { grid-template-columns: 1fr; }
  .kobold-player, .kobold-player:nth-child(even) { border-right: 0; border-bottom: 1px solid var(--line); }
  .kobold-player:last-child { border-bottom: 0; }
  .scout-pools { grid-template-columns: 1fr; }
  .scout-pools > div + div { border-top: 1px solid var(--line); border-left: 0; }
  .team-heroes ol { grid-template-columns: 1fr; }
  .team-heroes li:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .team-heroes li:last-child { border-bottom: 0; }
  .aegis-scale { grid-template-columns: 1fr; }
  .aegis-scale span, .aegis-scale span:last-child { text-align: left; }
  .aegis-component-list, .aegis-callouts { grid-template-columns: 1fr; }
  .aegis-component-list div:nth-child(even) { border-left: 0; }
  .aegis-callouts div { border-right: 0; border-bottom: 1px solid var(--line); }
  .aegis-callouts div:last-child { border-bottom: 0; }
}