/* rollout — Material Design 3. See docs/DESIGN.md; this file is its implementation.
 *
 * Order: tokens, base, layout (shell), components, page specifics, utilities.
 * Every colour is a role token. Nothing below the token block names a colour directly.
 */

/* ============================================================== tokens ==== */

:root {
  /* Generated from seed #F99E1A (fidelity), neutrals at chroma 3 / variant 7. */
  --md-primary: #ffc27f;
  --md-on-primary: #482900;
  --md-primary-container: #f99e1a;
  --md-on-primary-container: #4a2800;
  --md-secondary-container: #3d3021;
  --md-on-secondary-container: #f1d9bf;
  --md-tertiary: #8fd6ff;
  --md-tertiary-container: #004a65;
  --md-on-tertiary-container: #c5e7ff;
  --md-surface: #161310;
  --md-surface-container-lowest: #110e0b;
  --md-surface-container-low: #1f1b18;
  --md-surface-container: #231f1c;
  --md-surface-container-high: #2d2926;
  --md-surface-container-highest: #383430;
  --md-on-surface: #eae1db;
  --md-on-surface-variant: #d3c4b7;
  --md-outline: #9b8e83;
  --md-outline-variant: #4f453b;
  --md-inverse-surface: #eae1db;
  --md-inverse-on-surface: #34302c;
  --md-scrim: #000;

  /* Semantic — deliberately not harmonised toward the seed. */
  --live: #ff5449;
  --live-container: #93000d;
  --on-live-container: #ffdad6;
  --win: #71dc92;
  --win-container: #005229;
  --on-win-container: #8df9ac;

  /* Categorical: HCT hue steps at tone 80, chroma 40. */
  --cat-na: #86cffa;
  --cat-emea: #cbbeff;
  --cat-kr: #7cd7bb;
  --cat-jp: #ffb1c8;
  --cat-cn: #e1c562;
  --cat-pac: #a3d48d;
  --cat-asia: #73d5df;
  --cat-amer: #acc7ff;
  --cat-owwc: #ecb3f4;
  --cat-intl: var(--md-primary-container);
  --cat-none: var(--md-outline);
  --on-cat: #1f1b18;

  --shadow-1: none;
  --shadow-2: none;

  /* Type: Roboto Flex throughout. */
  --font: "Roboto Flex", Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
  --wdth-condensed: 80;

  /* Shape */
  --shape-xs: 4px;
  --shape-sm: 8px;
  --shape-md: 12px;
  --shape-lg: 16px;
  --shape-xl: 28px;
  --shape-full: 999px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --dur: 200ms;

  /* Layout */
  --rail: 88px;
  --bar: 80px;
  --appbar: 64px;
  --gutter: 16px;
  --maxw: 1280px;

  color-scheme: dark;
}

/* Light scheme. theme.js resolves the reader's choice (or, without one, the OS setting)
   into data-theme before first paint; without JavaScript the site stays dark. */
:root[data-theme="light"] {
  color-scheme: light;
  --md-primary: #875200;
  --md-on-primary: #ffffff;
  --md-primary-container: #f99e1a;
  --md-on-primary-container: #3b2000;
  --md-secondary-container: #fdddbd;
  --md-on-secondary-container: #58432c;
  --md-tertiary: #00668a;
  --md-tertiary-container: #d1ecff;
  --md-on-tertiary-container: #004059;
  --md-surface: #fff8f4;
  --md-surface-container-lowest: #ffffff;
  --md-surface-container-low: #fbf2ec;
  --md-surface-container: #f5ece6;
  --md-surface-container-high: #efe7e1;
  --md-surface-container-highest: #eae1db;
  --md-on-surface: #1f1b18;
  --md-on-surface-variant: #4f453b;
  --md-outline: #81756a;
  --md-outline-variant: #d3c4b7;
  --md-inverse-surface: #34302c;
  --md-inverse-on-surface: #f8efe9;
  --live: #bb171c;
  --live-container: #ffdad6;
  --on-live-container: #410002;
  --win: #006d38;
  --win-container: #8df9ac;
  --on-win-container: #00210d;
  --cat-na: #00668a;
  --cat-emea: #615597;
  --cat-kr: #006b56;
  --cat-jp: #904760;
  --cat-cn: #715c00;
  --cat-pac: #3e692e;
  --cat-asia: #006970;
  --cat-amer: #3d5e98;
  --cat-owwc: #7c4c86;
  --on-cat: #ffffff;
  --shadow-1: 0 1px 2px rgb(0 0 0 / 0.18), 0 1px 3px 1px rgb(0 0 0 / 0.10);
  --shadow-2: 0 1px 2px rgb(0 0 0 / 0.20), 0 2px 6px 2px rgb(0 0 0 / 0.12);
}

/* ================================================================ base ==== */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--appbar) + 16px); }

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--md-surface);
  color: var(--md-on-surface);
  font-family: var(--font);
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0.25px;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select { font: inherit; color: inherit; letter-spacing: inherit; }
table { border-collapse: collapse; width: 100%; }

a { color: var(--md-primary); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
.prose a, .link { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

:focus-visible { outline: 2px solid var(--md-primary); outline-offset: 2px; border-radius: var(--shape-xs); }

.num, .tnum { font-variant-numeric: tabular-nums; }

.skip {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  padding: 10px 16px; border-radius: var(--shape-full);
  background: var(--md-primary-container); color: var(--md-on-primary-container);
  font-weight: 500;
}
.skip:focus { top: 12px; }

/* Material Symbols */
.icon {
  font-family: "Material Symbols Rounded";
  font-weight: normal; font-style: normal;
  font-size: 24px; line-height: 1; letter-spacing: normal;
  display: inline-block; white-space: nowrap; direction: ltr;
  -webkit-font-feature-settings: "liga"; font-feature-settings: "liga";
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  user-select: none; flex: none;
}
.icon.sm { font-size: 20px; font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 20; }
.icon.xs { font-size: 18px; font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 20; }
.icon.filled { font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24; }

/* ============================================================ type scale == */

.display-small  { font-size: 36px; line-height: 44px; font-weight: 600; letter-spacing: 0; font-variation-settings: "wdth" 90; }
.headline-small { font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: 0; }
.title-large    { font-size: 22px; line-height: 28px; font-weight: 500; letter-spacing: 0; }
.title-medium   { font-size: 16px; line-height: 24px; font-weight: 500; letter-spacing: 0.15px; }
.title-small    { font-size: 14px; line-height: 20px; font-weight: 500; letter-spacing: 0.1px; }
.body-large     { font-size: 16px; line-height: 24px; letter-spacing: 0.5px; }
.body-medium    { font-size: 14px; line-height: 20px; letter-spacing: 0.25px; }
.body-small     { font-size: 12px; line-height: 16px; letter-spacing: 0.4px; }
.label-large    { font-size: 14px; line-height: 20px; font-weight: 500; letter-spacing: 0.1px; }
.label-medium   { font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.5px; }
.muted  { color: var(--md-on-surface-variant); }
.condensed { font-variation-settings: "wdth" var(--wdth-condensed); }

/* =============================================================== shell ==== */

.appbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--appbar);
  display: flex; align-items: center; gap: 8px;
  padding: 0 8px 0 16px;
  background: var(--md-surface);
  transition: background var(--dur) var(--ease);
}
.appbar.scrolled { background: var(--md-surface-container); }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--md-on-surface); font-size: 22px; line-height: 28px; font-weight: 700;
  letter-spacing: -0.2px; font-variation-settings: "wdth" 90;
  flex: none;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 9px;
  background: var(--md-primary-container);
  display: grid; place-items: center; color: var(--md-on-primary-container);
}
.brand-mark .icon { font-size: 20px; font-variation-settings: "FILL" 1, "wght" 600, "opsz" 20; }

.appbar-spacer { flex: 1; }

/* Search bar (M3: 56px, full-rounded, surface-container-high) */
.search {
  position: relative; flex: 1; max-width: 560px; margin: 0 auto;
}
.search-field {
  display: flex; align-items: center; gap: 12px;
  height: 48px; padding: 0 16px;
  border-radius: var(--shape-xl);
  background: var(--md-surface-container-high);
  color: var(--md-on-surface-variant);
}
.search-field:focus-within { background: var(--md-surface-container-highest); }
.search-field input {
  flex: 1; min-width: 0; height: 100%;
  border: 0; outline: 0; background: transparent;
  font-size: 16px; color: var(--md-on-surface);
}
.search-field input::placeholder { color: var(--md-on-surface-variant); }
.search-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px);
  background: var(--md-surface-container-high);
  border-radius: var(--shape-lg);
  box-shadow: var(--shadow-2);
  padding: 8px 0; max-height: 70vh; overflow: auto;
  display: none;
}
.search.open .search-results { display: block; }
.search-results .list-subhead { padding: 8px 16px 4px; }
.search .search-toggle { display: none; }

/* Icon buttons (M3: 40px target inside 48px) */
.icon-btn {
  position: relative;
  width: 40px; height: 40px; margin: 4px;
  display: inline-grid; place-items: center;
  border: 0; border-radius: var(--shape-full);
  background: transparent; color: var(--md-on-surface-variant);
  cursor: pointer; flex: none;
}
.icon-btn:hover { text-decoration: none; }
.icon-btn[aria-pressed="true"] { color: var(--md-primary); }

/* State layer, shared by every interactive surface. */
.state { position: relative; isolation: isolate; }
.state::after, .icon-btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  border-radius: inherit; background: currentColor; opacity: 0;
  transition: opacity var(--dur) var(--ease); pointer-events: none;
}
.state:hover::after, .icon-btn:hover::after { opacity: 0.08; }
.state:active::after, .icon-btn:active::after,
.state:focus-visible::after, .icon-btn:focus-visible::after { opacity: 0.10; }
a.state:hover { text-decoration: none; }

/* Overflow menu */
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-list {
  position: absolute; right: 4px; top: calc(100% + 4px); z-index: 50;
  min-width: 200px; padding: 8px 0;
  border-radius: var(--shape-xs);
  background: var(--md-surface-container);
  box-shadow: var(--shadow-2);
}
.menu-list a {
  display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 16px;
  color: var(--md-on-surface);
}
.menu-list a .icon { color: var(--md-on-surface-variant); }

/* Frame: rail + content */
.frame { flex: 1; display: flex; }

.rail {
  position: sticky; top: var(--appbar); align-self: flex-start;
  width: var(--rail); height: calc(100dvh - var(--appbar));
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding-top: 4px; flex: none;
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  width: 64px; color: var(--md-on-surface-variant);
  font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.5px;
}
.nav-item:hover { text-decoration: none; color: var(--md-on-surface); }
.nav-pill {
  width: 56px; height: 32px; border-radius: var(--shape-full);
  display: grid; place-items: center;
}
.nav-item:hover .nav-pill { background: color-mix(in srgb, var(--md-on-surface) 8%, transparent); }
.nav-item[aria-current="page"] { color: var(--md-on-surface); font-weight: 700; }
.nav-item[aria-current="page"] .nav-pill {
  background: var(--md-secondary-container); color: var(--md-on-secondary-container);
}
.nav-item[aria-current="page"] .icon { font-variation-settings: "FILL" 1, "wght" 400, "opsz" 24; }

.navbar { display: none; }

.content {
  flex: 1; min-width: 0;
  padding: 8px 24px 48px 0;
}
.page { max-width: var(--maxw); margin: 0 auto; }

/* Page header */
.page-head { padding: 16px 0 24px; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; }
.page-head > div:first-child { flex: 1; min-width: 0; }
.page-title { font-size: 36px; line-height: 44px; font-weight: 600; font-variation-settings: "wdth" 90; }
.page-sub { margin-top: 4px; color: var(--md-on-surface-variant); font-size: 16px; line-height: 24px; }
.eyebrow {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px;
  margin-bottom: 8px; color: var(--md-on-surface-variant);
  font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.5px;
}

/* Two-column page grid */
.grid { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.stack { display: grid; gap: 24px; align-content: start; min-width: 0; }
.stack-sm { display: grid; gap: 12px; }

/* Footer */
.footer {
  margin-left: var(--rail);
  padding: 32px 24px 40px 0;
  color: var(--md-on-surface-variant);
  font-size: 12px; line-height: 16px; letter-spacing: 0.4px;
}
.footer-inner {
  max-width: var(--maxw); margin: 0 auto;
  border-top: 1px solid var(--md-outline-variant); padding-top: 24px;
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer a { color: var(--md-on-surface-variant); text-decoration: underline; text-underline-offset: 3px; }
.footer a:hover { color: var(--md-on-surface); }

/* ========================================================== components === */

/* Cards */
.card {
  background: var(--md-surface-container-low);
  border-radius: var(--shape-lg);
  box-shadow: var(--shadow-1);
  min-width: 0;
}
.card.outlined { background: var(--md-surface); border: 1px solid var(--md-outline-variant); box-shadow: none; }
.card.high { background: var(--md-surface-container); }
.card-head {
  display: flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 12px 16px 8px 20px;
}
.card-title { flex: 1; min-width: 0; font-size: 16px; line-height: 24px; font-weight: 500; letter-spacing: 0.15px; }
.card-meta { color: var(--md-on-surface-variant); font-size: 12px; line-height: 16px; }
.card-body { padding: 0 20px 20px; }
.card-body.flush { padding: 0 8px 8px; }
.card-foot { padding: 4px 8px 8px; display: flex; justify-content: flex-end; gap: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 24px;
  border: 0; border-radius: var(--shape-full);
  font-size: 14px; line-height: 20px; font-weight: 500; letter-spacing: 0.1px;
  cursor: pointer; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn .icon { font-size: 18px; margin-left: -8px; }
.btn.filled { background: var(--md-primary-container); color: var(--md-on-primary-container); }
.btn.filled:hover { box-shadow: var(--shadow-1); }
.btn.tonal { background: var(--md-secondary-container); color: var(--md-on-secondary-container); }
.btn.outlined { background: transparent; color: var(--md-primary); border: 1px solid var(--md-outline); }
.btn.text { background: transparent; color: var(--md-primary); padding: 0 12px; }
.btn.text .icon { margin-left: -4px; }
.btn.sm { height: 32px; padding: 0 16px; font-size: 13px; }
.btn.text.sm { padding: 0 8px; }

/* Chips */
.chips {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding: 2px 0; margin: 0 0 16px;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  height: 32px; padding: 0 16px;
  border-radius: var(--shape-sm);
  border: 1px solid var(--md-outline-variant);
  color: var(--md-on-surface-variant);
  font-size: 14px; line-height: 20px; font-weight: 500; letter-spacing: 0.1px;
  white-space: nowrap;
}
.chip:hover { text-decoration: none; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cat, var(--md-outline)); }
.chip[aria-current="true"], .chip.selected {
  border-color: transparent;
  background: var(--md-secondary-container); color: var(--md-on-secondary-container);
  padding-left: 8px;
}
.chip[aria-current="true"]::before, .chip.selected::before {
  content: "check"; font-family: "Material Symbols Rounded"; font-size: 18px; line-height: 1;
  font-weight: normal; -webkit-font-feature-settings: "liga"; font-feature-settings: "liga";
}
.chip.select { padding-right: 8px; }

/* Segmented button */
.segmented {
  display: inline-flex; height: 40px;
  border: 1px solid var(--md-outline); border-radius: var(--shape-full);
  overflow: hidden; flex: none;
}
.segmented a {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 96px; padding: 0 16px;
  color: var(--md-on-surface);
  font-size: 14px; line-height: 20px; font-weight: 500; letter-spacing: 0.1px;
}
.segmented a + a { border-left: 1px solid var(--md-outline); }
.segmented a:hover { text-decoration: none; }
.segmented a[aria-current="true"] { background: var(--md-secondary-container); color: var(--md-on-secondary-container); }
.segmented a[aria-current="true"]::before {
  content: "check"; font-family: "Material Symbols Rounded"; font-size: 18px; line-height: 1;
  -webkit-font-feature-settings: "liga"; font-feature-settings: "liga";
}
.segmented .count { color: var(--md-on-surface-variant); font-weight: 400; }

/* Primary tabs */
.tabs {
  display: flex; overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid var(--md-outline-variant);
  margin-bottom: 16px;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative; flex: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 90px; height: 48px; padding: 0 16px;
  color: var(--md-on-surface-variant);
  font-size: 14px; line-height: 20px; font-weight: 500; letter-spacing: 0.1px;
}
.tab:hover { text-decoration: none; color: var(--md-on-surface); }
.tab small { font-size: 11px; line-height: 14px; font-weight: 400; color: var(--md-on-surface-variant); }
.tab[aria-current="true"] { color: var(--md-primary); }
.tab[aria-current="true"]::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 0;
  height: 3px; border-radius: 3px 3px 0 0; background: var(--md-primary);
}

/* Toolbar: segmented + chips on one line where they fit */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 16px; }
.toolbar .chips { margin: 0; flex: 1; min-width: 0; }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 20px; padding: 0 8px; border-radius: var(--shape-full);
  font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: 0.5px;
  text-transform: uppercase; white-space: nowrap;
  background: var(--md-surface-container-highest); color: var(--md-on-surface-variant);
}
.badge.live { background: var(--live-container); color: var(--on-live-container); }
.badge.live::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--live);
  animation: pulse 1.6s var(--ease) infinite;
}
.badge.primary { background: var(--md-primary-container); color: var(--md-on-primary-container); }
.badge.tertiary { background: var(--md-tertiary-container); color: var(--md-on-tertiary-container); }
.badge.win { background: var(--win-container); color: var(--on-win-container); }
@keyframes pulse { 50% { opacity: 0.35; } }

.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); flex: none; animation: pulse 1.6s var(--ease) infinite; }

/* Avatar: a team's monogram on its region colour. */
.avatar {
  --size: 32px;
  width: var(--size); height: var(--size); flex: none;
  border-radius: var(--shape-full);
  display: grid; place-items: center;
  background: var(--cat, var(--cat-none)); color: var(--on-cat);
  font-size: calc(var(--size) * 0.36); line-height: 1; font-weight: 700;
  letter-spacing: -0.2px; font-variation-settings: "wdth" 80;
  text-transform: uppercase; user-select: none;
}
.avatar.sm { --size: 24px; font-size: 10px; }
.avatar.lg { --size: 56px; }
.avatar.xl { --size: 88px; }
.avatar.tbd { background: var(--md-surface-container-highest); color: var(--md-on-surface-variant); }

.flag {
  width: 20px; height: 15px; flex: none;
  border-radius: 2px; object-fit: cover;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--md-on-surface) 12%, transparent);
}
.flag.lg { width: 28px; height: 21px; }

.team-label { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: var(--md-on-surface); }
.team-label .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variation-settings: "wdth" var(--wdth-condensed); font-weight: 500; }
a.team-label:hover { text-decoration: none; }
a.team-label:hover .name { text-decoration: underline; text-underline-offset: 3px; }

/* Region/event colour bar */
.cat-na { --cat: var(--cat-na); } .cat-emea { --cat: var(--cat-emea); }
.cat-kr { --cat: var(--cat-kr); } .cat-jp { --cat: var(--cat-jp); }
.cat-cn { --cat: var(--cat-cn); } .cat-pac { --cat: var(--cat-pac); }
.cat-asia { --cat: var(--cat-asia); } .cat-amer { --cat: var(--cat-amer); }
.cat-owwc { --cat: var(--cat-owwc); } .cat-intl { --cat: var(--cat-intl); }
.cat-none { --cat: var(--cat-none); }

.event-tag {
  display: inline-flex; align-items: center; gap: 6px; min-width: 0;
  color: var(--md-on-surface-variant); font-size: 12px; line-height: 16px;
}
.event-tag::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--cat, var(--md-outline)); flex: none; }
.event-tag span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Lists */
.list { display: grid; }
.list-item {
  display: flex; align-items: center; gap: 16px;
  min-height: 56px; padding: 8px 16px;
  border-radius: var(--shape-md);
  color: var(--md-on-surface);
}
.list-item:hover { text-decoration: none; }
.list-item .lead { flex: none; }
.list-item .main { flex: 1; min-width: 0; }
.list-item .main > * { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .main > .team-label { display: flex; }
.list-item .trail { flex: none; color: var(--md-on-surface-variant); font-size: 12px; line-height: 16px; text-align: right; }
.list-item .headline { font-size: 14px; line-height: 20px; font-weight: 500; }
.list-item .support { color: var(--md-on-surface-variant); font-size: 12px; line-height: 16px; letter-spacing: 0.4px; }
.list-item.wrap .main > * { white-space: normal; }
.list-subhead {
  padding: 12px 16px 4px; color: var(--md-on-surface-variant);
  font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.5px;
}
.source-note { padding: 8px 16px 8px; }
.divider { height: 1px; background: var(--md-outline-variant); margin: 4px 16px; }

/* ---------------------------------------------------------- match row --- */

.day-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 20px 4px 8px; color: var(--md-on-surface-variant);
  font-size: 14px; line-height: 20px; font-weight: 500; letter-spacing: 0.1px;
}
.day-head:first-child { padding-top: 4px; }
.day-head .count { font-size: 12px; font-weight: 400; }

.matches { display: grid; gap: 4px; }

.match {
  position: relative;
  display: grid; align-items: center;
  grid-template-columns: 120px minmax(0, 1fr) minmax(0, 220px) 24px;
  gap: 16px;
  min-height: 72px; padding: 8px 8px 8px 20px;
  border-radius: var(--shape-md);
  background: var(--md-surface-container-low);
  color: var(--md-on-surface);
}
.match:hover { text-decoration: none; }
.match::before {
  content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px;
  border-radius: 0 4px 4px 0; background: var(--cat, var(--md-outline-variant));
}
.card .match { background: transparent; }
.match.is-live { background: color-mix(in srgb, var(--live-container) 22%, var(--md-surface-container-low)); }

.match-when { display: grid; gap: 2px; min-width: 0; }
.match-when .primary-line { font-size: 14px; line-height: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.match-when .secondary-line { color: var(--md-on-surface-variant); font-size: 12px; line-height: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match-when .soon { color: var(--md-primary); }

.match-teams { display: grid; gap: 4px; min-width: 0; }
.side { display: flex; align-items: center; gap: 10px; min-width: 0; }
.side .team-label { flex: 1; }
.side .name { font-size: 15px; line-height: 20px; }
.side .score {
  flex: none; min-width: 20px; text-align: right;
  font-size: 16px; line-height: 20px; font-weight: 600; font-variant-numeric: tabular-nums;
  color: var(--md-on-surface-variant);
}
.side.won .name { font-weight: 700; }
.side.won .score { color: var(--md-on-surface); }
.side.lost .name { color: var(--md-on-surface-variant); }
.match.done .side.won .score::after {
  content: ""; display: inline-block; width: 0; height: 0; margin-left: 6px; vertical-align: 2px;
  border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-right: 6px solid var(--md-primary);
}

.match-meta { display: grid; gap: 2px; min-width: 0; justify-items: start; }
.match-meta .stage { color: var(--md-on-surface-variant); font-size: 12px; line-height: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.match-meta .fmt { color: var(--md-on-surface-variant); font-size: 12px; line-height: 16px; }

.match .chev { color: var(--md-on-surface-variant); }

/* Compact: carousels and narrow columns */
.match.compact {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "when" "teams" "meta";
  gap: 8px; min-height: 0; padding: 12px 16px 12px 20px;
}
.match.compact .match-when { grid-area: when; display: flex; gap: 8px; align-items: baseline; }
.match.compact .match-teams { grid-area: teams; }
.match.compact .match-meta { grid-area: meta; }
.match.compact .chev { display: none; }

/* Spoiler mode hides every result until revealed. */
[data-spoilers="hide"] .match.done:not(.revealed) .score { color: transparent; position: relative; }
[data-spoilers="hide"] .match.done:not(.revealed) .score::before {
  content: "–"; position: absolute; right: 0; color: var(--md-on-surface-variant);
}
[data-spoilers="hide"] .match.done:not(.revealed) .score::after { display: none !important; }
[data-spoilers="hide"] .match.done:not(.revealed) .side .name { font-weight: 500; color: var(--md-on-surface); }
[data-spoilers="hide"] .spoiler:not(.revealed) { filter: blur(8px); user-select: none; cursor: pointer; }
[data-spoilers="hide"] .spoiler-hide:not(.revealed) { display: none; }
.spoiler-note { display: none; }
[data-spoilers="hide"] .spoiler-note { display: flex; }

/* Carousel */
.carousel {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr);
  gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding-bottom: 2px;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel > * { scroll-snap-align: start; }

/* Data tables */
.table-wrap { overflow-x: auto; }
.table { font-variant-numeric: tabular-nums; }
.table th {
  height: 40px; padding: 0 12px; text-align: left; white-space: nowrap;
  color: var(--md-on-surface-variant);
  font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.5px;
  border-bottom: 1px solid var(--md-outline-variant);
}
.table td { height: 52px; padding: 4px 12px; border-bottom: 1px solid color-mix(in srgb, var(--md-outline-variant) 60%, transparent); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background var(--dur) var(--ease); }
.table tbody tr:hover { background: color-mix(in srgb, var(--md-on-surface) 5%, transparent); }
.table .r { text-align: right; }
.table .c { text-align: center; }
.table .rank { width: 44px; color: var(--md-on-surface-variant); font-weight: 600; }
.table .rank.top { color: var(--md-primary); }
.table .strong { font-weight: 600; }
.table tr.cut td { border-bottom: 2px dashed var(--md-outline-variant); }

/* Form: last five results */
.form { display: inline-flex; gap: 3px; }
.form i {
  width: 18px; height: 18px; border-radius: 4px; display: grid; place-items: center;
  font-style: normal; font-size: 10px; line-height: 1; font-weight: 700;
  background: var(--md-surface-container-highest); color: var(--md-on-surface-variant);
}
.form i.w { background: var(--win-container); color: var(--on-win-container); }
[data-spoilers="hide"] .form { filter: blur(5px); }

/* Tier badge */
.tier {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.3px;
  color: var(--tier-c, var(--md-on-surface-variant));
}
.tier::before { content: ""; width: 10px; height: 10px; transform: rotate(45deg); border-radius: 2px; background: currentColor; }
.tier-bronze { --tier-c: #d19a6a; } .tier-silver { --tier-c: #b9c2cc; } .tier-gold { --tier-c: #e7c24f; }
.tier-platinum { --tier-c: #7fd3d8; } .tier-emerald { --tier-c: #6fd39a; } .tier-diamond { --tier-c: #8fb8ff; }
.tier-master { --tier-c: #c3a2ff; } .tier-grandmaster { --tier-c: #ff9ad0; } .tier-champion { --tier-c: #ffb36b; }
:root[data-theme="light"] .tier-bronze { --tier-c: #8a5a2b; }
:root[data-theme="light"] .tier-silver { --tier-c: #5d6873; }
:root[data-theme="light"] .tier-gold { --tier-c: #876500; }
:root[data-theme="light"] .tier-platinum { --tier-c: #006a70; }
:root[data-theme="light"] .tier-emerald { --tier-c: #006d3b; }
:root[data-theme="light"] .tier-diamond { --tier-c: #2f5fb3; }
:root[data-theme="light"] .tier-master { --tier-c: #6b3fb8; }
:root[data-theme="light"] .tier-grandmaster { --tier-c: #a3316f; }
:root[data-theme="light"] .tier-champion { --tier-c: #9a4a00; }

/* Key/value facts */
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 16px; }
.facts dt { color: var(--md-on-surface-variant); font-size: 12px; line-height: 20px; }
.facts dd { font-size: 14px; line-height: 20px; min-width: 0; overflow-wrap: anywhere; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 16px; }
.stat .v { font-size: 28px; line-height: 36px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat .k { color: var(--md-on-surface-variant); font-size: 12px; line-height: 16px; }

/* Empty state */
.empty {
  display: grid; justify-items: center; gap: 8px; text-align: center;
  padding: 32px 16px; color: var(--md-on-surface-variant);
}
.empty .icon { font-size: 36px; color: var(--md-outline); }

/* Callout (M3: tonal surface with icon) */
.callout {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 16px; border-radius: var(--shape-md);
  background: var(--md-surface-container-high); color: var(--md-on-surface-variant);
  font-size: 12px; line-height: 18px;
}
.callout .icon { font-size: 20px; color: var(--md-tertiary); }

/* Details/disclosure */
details.more > summary {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  height: 40px; margin: 4px 8px 0; border-radius: var(--shape-full);
  color: var(--md-primary); font-weight: 500; cursor: pointer; list-style: none;
}
details.more > summary::-webkit-details-marker { display: none; }
details.more[open] > summary .open-label, details.more:not([open]) > summary .close-label { display: none; }
details.more[open] > summary { order: 2; }

/* Pager */
.pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px; margin-top: 24px; }
.pager a, .pager span {
  min-width: 40px; height: 40px; padding: 0 12px; border-radius: var(--shape-full);
  display: inline-grid; place-items: center; color: var(--md-on-surface-variant); font-weight: 500;
}
.pager a:hover { text-decoration: none; background: color-mix(in srgb, var(--md-on-surface) 8%, transparent); }
.pager [aria-current="page"] { background: var(--md-secondary-container); color: var(--md-on-secondary-container); }

/* ------------------------------------------------------------- streams -- */

.streams-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.stream-card { display: grid; gap: 10px; color: var(--md-on-surface); min-width: 0; }
.stream-card:hover { text-decoration: none; }
.thumb {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: var(--shape-md); background: var(--md-surface-container-high);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 300ms var(--ease); }
.stream-card:hover .thumb img { transform: scale(1.03); }
.thumb .badge { position: absolute; left: 8px; top: 8px; }
.thumb .viewers {
  position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; border-radius: var(--shape-xs);
  background: rgb(0 0 0 / 0.72); color: #fff; font-size: 12px; line-height: 16px; font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.stream-meta { display: flex; gap: 12px; min-width: 0; }
.stream-meta .main { min-width: 0; flex: 1; }
.stream-meta .who { display: flex; align-items: center; gap: 6px; font-weight: 600; min-width: 0; }
.stream-meta .title { color: var(--md-on-surface-variant); font-size: 13px; line-height: 18px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.stream-meta .sub { color: var(--md-on-surface-variant); font-size: 12px; line-height: 16px; }

.stream-row { display: flex; gap: 12px; align-items: center; padding: 8px 12px; border-radius: var(--shape-md); color: var(--md-on-surface); min-width: 0; }
.stream-row:hover { text-decoration: none; }
.stream-row .thumb { width: 112px; flex: none; border-radius: var(--shape-sm); }
.stream-row .main { flex: 1; min-width: 0; }
.stream-row .main > * { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Role / tag chips (small, non-interactive) */
.tag {
  display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 6px;
  border-radius: var(--shape-xs); flex: none;
  background: var(--md-surface-container-highest); color: var(--md-on-surface-variant);
  font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: 0.3px;
}
.tag .icon { font-size: 14px; }
.tag.pro { background: var(--md-tertiary-container); color: var(--md-on-tertiary-container); }
.tag.drops { background: var(--md-primary-container); color: var(--md-on-primary-container); }

/* ------------------------------------------------------------- match page */

.scoreboard { padding: 24px 24px 20px; text-align: center; }
.scoreboard .eyebrow { justify-content: center; }
.sb-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; margin: 16px 0 8px; }
.sb-team { display: grid; justify-items: center; gap: 12px; min-width: 0; color: var(--md-on-surface); }
.sb-team:hover { text-decoration: none; }
.sb-team .name {
  font-size: 24px; line-height: 32px; font-weight: 700; font-variation-settings: "wdth" 85;
  max-width: 100%; overflow-wrap: anywhere;
}
.sb-team .sub { display: flex; align-items: center; gap: 6px; color: var(--md-on-surface-variant); font-size: 12px; }
.sb-score { display: grid; justify-items: center; gap: 4px; }
.sb-score .digits { font-size: 48px; line-height: 56px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -1px; }
.sb-score .digits .lost { color: var(--md-on-surface-variant); }
.sb-score .digits .sep { color: var(--md-outline); margin: 0 8px; font-weight: 400; }
.sb-score .vs { font-size: 20px; line-height: 56px; color: var(--md-on-surface-variant); font-weight: 600; }
.sb-when { color: var(--md-on-surface-variant); font-size: 14px; }
.sb-delta { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.delta { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: var(--shape-sm); background: var(--md-surface-container-high); font-size: 12px; font-variant-numeric: tabular-nums; }
.delta .up { color: var(--win); font-weight: 600; }
.delta .down { color: var(--md-on-surface-variant); font-weight: 600; }

.maps { display: grid; gap: 4px; }
.map-row {
  display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 12px 16px;
  padding: 12px 16px; border-radius: var(--shape-md); background: var(--md-surface-container);
}
.map-row .ord { color: var(--md-on-surface-variant); font-weight: 600; font-variant-numeric: tabular-nums; }
.map-row .map-name { font-weight: 600; }
.map-row .map-mode { color: var(--md-on-surface-variant); font-size: 12px; }
.map-row .map-score { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.map-row .map-score .lost { color: var(--md-on-surface-variant); font-weight: 500; }
.map-row .bans { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--md-on-surface-variant); }
.map-row .bans b { color: var(--md-on-surface); font-weight: 500; }
.map-row .winner { display: inline-flex; align-items: center; gap: 6px; color: var(--md-on-surface-variant); font-size: 12px; }

.roster { display: flex; flex-wrap: wrap; gap: 8px; }
.person {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 8px;
  border-radius: var(--shape-sm); background: var(--md-surface-container); color: var(--md-on-surface);
  font-weight: 500; min-width: 0;
}
a.person:hover { text-decoration: none; background: var(--md-surface-container-high); }
.person .role { color: var(--md-on-surface-variant); }
.person .role .icon { font-size: 16px; }

/* ------------------------------------------------------------ team page -- */

.hero-card { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; padding: 24px; }
.hero-card .who { flex: 1; min-width: 220px; }
.hero-card .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.rating-now { display: flex; align-items: baseline; gap: 6px; }
.rating-now .v { font-size: 45px; line-height: 52px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rating-now .u { color: var(--md-on-surface-variant); font-weight: 500; }

/* Rating chart */
.chart { width: 100%; height: auto; overflow: visible; }
.rc-band { opacity: 0.07; }
.rc-bandline { stroke: var(--md-outline-variant); stroke-width: 1; }
.rc-bandlabel { font: 500 10px var(--font); letter-spacing: 0.5px; fill: var(--md-on-surface-variant); text-transform: uppercase; }
.rc-tick { font: 11px var(--font); fill: var(--md-on-surface-variant); font-variant-numeric: tabular-nums; }
.rc-area { fill: color-mix(in srgb, var(--md-primary) 14%, transparent); }
.rc-line { fill: none; stroke: var(--md-primary); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.rc-peak { fill: var(--md-surface); stroke: var(--md-primary); stroke-width: 2; }
.rc-end { fill: var(--md-primary); }
.rc-hit { fill: transparent; cursor: pointer; }
.rc-rule { stroke: var(--md-outline); stroke-width: 1; opacity: 0; }
.rc-dot { fill: var(--md-surface); stroke: var(--md-primary); stroke-width: 2; opacity: 0; }
.rc-dot.won { fill: var(--md-primary); }
.rc-tip { opacity: 0; pointer-events: none; }
.rc-tip rect { fill: var(--md-inverse-surface); }
.rc-tip text { font: 12px var(--font); fill: var(--md-inverse-on-surface); }
.rc-tip .rc-tip-head { font-weight: 600; }
.rc-node:hover .rc-rule, .rc-node:focus .rc-rule, .rc-node:hover .rc-dot, .rc-node:focus .rc-dot,
.rc-node:hover .rc-tip, .rc-node:focus .rc-tip { opacity: 1; }
.rc-node:focus { outline: none; }
.rc-bronze { fill: #d19a6a; } .rc-silver { fill: #b9c2cc; } .rc-gold { fill: #e7c24f; }
.rc-platinum { fill: #7fd3d8; } .rc-emerald { fill: #6fd39a; } .rc-diamond { fill: #8fb8ff; }
.rc-master { fill: #c3a2ff; } .rc-grandmaster { fill: #ff9ad0; } .rc-champion { fill: #ffb36b; }

/* Tier distribution bar (teams page) */
.tierbar { display: flex; height: 8px; border-radius: var(--shape-full); overflow: hidden; gap: 2px; }
.tierbar span { background: var(--tier-c); }

/* ------------------------------------------------------------ news list -- */

.news-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px 16px; align-items: center; }
.news-item .kind { width: 40px; height: 40px; border-radius: var(--shape-md); display: grid; place-items: center; background: var(--md-surface-container-high); color: var(--md-on-surface-variant); }
.news-item .kind.patch { background: var(--md-tertiary-container); color: var(--md-on-tertiary-container); }
.news-item .kind.drops { background: var(--md-primary-container); color: var(--md-on-primary-container); }

/* =========================================================== responsive == */

@media (max-width: 1199px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .aside-first { order: -1; }
}

@media (max-width: 839px) {
  .match:not(.compact) { grid-template-columns: 88px minmax(0, 1fr) 24px; }
  .match .match-meta { grid-column: 2 / 3; grid-row: 2; }
  .match .chev { grid-row: 1 / 3; grid-column: 3; }
  .match .match-when { grid-row: 1 / 3; align-self: start; padding-top: 2px; }
}

@media (max-width: 599px) {
  :root { --appbar: 56px; }
  .rail { display: none; }
  .content { padding: 0 var(--gutter) calc(var(--bar) + 24px); }
  .footer { margin-left: 0; padding: 24px var(--gutter) calc(var(--bar) + 24px); }
  .appbar { padding: 0 4px 0 16px; }
  .search { position: static; max-width: none; margin: 0; flex: 0; }
  .search-field { display: none; }
  .search .search-toggle { display: inline-grid; }
  .search.open { position: fixed; inset: 0 0 auto 0; z-index: 60; padding: 4px 8px; background: var(--md-surface-container-high); height: 64px; }
  .search.open .search-field { display: flex; background: transparent; height: 56px; }
  .search.open .search .search-toggle { display: none; }
  .search.open .search-results { position: fixed; top: 64px; bottom: 0; left: 0; right: 0; max-height: none; border-radius: 0; box-shadow: none; }
  .brand { font-size: 20px; }

  .navbar {
    display: flex; justify-content: space-around; align-items: center;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    height: calc(var(--bar) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--md-surface-container);
  }
  .navbar .nav-item { width: auto; flex: 1; }

  .page-head { padding: 8px 0 16px; }
  .page-title { font-size: 28px; line-height: 36px; }
  .card-head { padding: 8px 12px 4px 16px; }
  .card-body { padding: 0 16px 16px; }
  .match { padding: 10px 8px 10px 16px; gap: 12px; }
  .match:not(.compact) { grid-template-columns: 72px minmax(0, 1fr) 20px; }
  .match-when .primary-line { font-size: 13px; }
  .sb-team .name { font-size: 18px; line-height: 24px; }
  .sb-score .digits { font-size: 36px; line-height: 44px; }
  .avatar.lg { --size: 44px; }
  .scoreboard { padding: 16px 12px; }
  .hero-card { padding: 16px; }
  .table td, .table th { padding-left: 8px; padding-right: 8px; }
  .hide-compact { display: none !important; }
  .streams-grid { grid-template-columns: 1fr; }
  .carousel { grid-auto-columns: 82%; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); scroll-padding: 0 var(--gutter); }
}

@media (min-width: 600px) {
  .only-compact { display: none !important; }
}
@media (max-width: 839px) {
  .hide-medium { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .appbar, .rail, .navbar, .footer { display: none; }
  .content { padding: 0; }
}

/* --------------------------------------------------------- page parts -- */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.section-title { display: flex; align-items: center; gap: 10px; margin: 8px 4px 12px; font-size: 16px; line-height: 24px; font-weight: 600; }
.live-strip { margin-bottom: 24px; }
.live-strip .carousel { grid-auto-columns: minmax(280px, 340px); }
.live-dot.inline { display: inline-block; width: 6px; height: 6px; margin: 0 6px 1px 0; vertical-align: middle; }
.event-row .event-bar { width: 4px; align-self: stretch; border-radius: 4px; background: var(--cat, var(--md-outline)); }
.event-row .trail { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.event-row .trail .icon { color: var(--md-primary); }
.news-item .kind { flex: none; }
.news-item.list-item { gap: 16px; }
.mt { margin-top: 24px; }
.roster-head { margin-bottom: 8px; }
.spoiler-reveal { display: none; margin-top: 12px; }
[data-spoilers="hide"] .spoiler-reveal { display: inline-flex; }
.sb-score .soon, .match-when .soon { color: var(--md-primary); }
.sb-when { display: flex; align-items: center; justify-content: center; gap: 6px; }
.event-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.event-card { position: relative; display: grid; gap: 8px; align-content: start; padding: 16px 16px 16px 20px; color: var(--md-on-surface); overflow: hidden; }
.event-card:hover { text-decoration: none; }
.event-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--cat, var(--md-outline)); }
.event-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.event-card-name { overflow-wrap: anywhere; }
.event-card-facts { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--md-on-surface-variant); font-size: 12px; line-height: 16px; }
.event-card-facts > span { display: inline-flex; align-items: center; gap: 4px; }
.event-card-champ { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; }
.event-card-champ .icon { color: var(--md-primary); }
@media (max-width: 599px) { .event-grid { grid-template-columns: 1fr; } }
.event-hero { position: relative; overflow: hidden; }
.event-hero::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--cat, var(--md-outline)); }
.event-facts { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 8px; color: var(--md-on-surface-variant); }
.event-facts > span { display: inline-flex; align-items: center; gap: 6px; }
.card-title .icon { vertical-align: -4px; color: var(--md-on-surface-variant); }
.standings .team-label .name { font-size: 14px; }
.placement .place { width: 28px; height: 28px; border-radius: var(--shape-full); display: grid; place-items: center; background: var(--md-surface-container-highest); font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.placement .place.first { background: var(--md-primary-container); color: var(--md-on-primary-container); }
.placement { min-height: 48px; }
details.participant > summary { list-style: none; cursor: pointer; min-height: 48px; }
details.participant > summary::-webkit-details-marker { display: none; }
details.participant[open] > summary .trail { transform: rotate(180deg); }
.participant-roster { padding: 4px 16px 16px; }
[data-spoilers="hide"] .spoiler-hide-wrap .form { filter: blur(5px); }
details.more-card > summary { list-style: none; cursor: pointer; border-radius: var(--shape-lg); }
details.more-card > summary::-webkit-details-marker { display: none; }
details.more-card[open] > summary .icon { transform: rotate(180deg); }
details.more-card > summary .card-meta { margin-left: auto; }
.rankings .team-label .name { font-size: 15px; }
.rankings td.strong { font-size: 15px; }
details.more-card > summary { list-style: none; cursor: pointer; border-radius: var(--shape-lg); }
details.more-card > summary::-webkit-details-marker { display: none; }
details.more-card[open] > summary .icon { transform: rotate(180deg); }
details.more-card > summary .card-meta { margin-left: auto; }
.rankings .team-label .name { font-size: 15px; }
.rankings td.strong { font-size: 15px; }
.rating-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.chart-wrap { margin-top: 16px; }
.chart-axis { display: flex; justify-content: space-between; padding: 4px 12px 0 46px; color: var(--md-on-surface-variant); font-size: 12px; }
.role-icon { width: 36px; height: 36px; border-radius: var(--shape-full); display: grid; place-items: center; background: var(--md-surface-container-high); color: var(--md-on-surface-variant); }
.history-roster { padding: 0 12px 12px; }
.hero-card .who .page-title { overflow-wrap: anywhere; }
.hero-card .event-facts .flag { margin-right: 2px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px; }
.field { display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 12px; border-radius: var(--shape-md); background: var(--md-surface-container-high); color: var(--md-on-surface-variant); }
.field.grow { flex: 1 1 240px; }
.field input, .field select { border: 0; outline: 0; background: transparent; color: var(--md-on-surface); height: 100%; min-width: 0; }
.field input { flex: 1; font-size: 16px; }
.field select { font-size: 14px; padding-right: 4px; cursor: pointer; }
.field select option { background: var(--md-surface-container-high); color: var(--md-on-surface); }
.field:focus-within { outline: 2px solid var(--md-primary); outline-offset: -2px; }
.person-card { display: grid; gap: 2px; padding: 12px 16px; color: var(--md-on-surface); }
.person-card:hover { text-decoration: none; }
.person-card .title-small { display: flex; align-items: center; gap: 6px; }
.people-carousel { grid-auto-columns: minmax(160px, 200px); }
.person-avatar .icon { font-size: 40px; }
.stream-feature { display: grid; gap: 12px; padding: 12px; color: var(--md-on-surface); }
.stream-feature:hover { text-decoration: none; }
.player-list .list-item .headline { display: flex; align-items: center; gap: 8px; }
@media (max-width: 599px) { .filters .field:not(.grow) { flex: 1 1 45%; } .filters .btn { flex: 1 1 100%; } }
.prose { display: grid; gap: 12px; font-size: 15px; line-height: 24px; max-width: 72ch; }
.prose ul { display: grid; gap: 6px; padding-left: 20px; list-style: disc; }
.prose address { font-style: normal; }
.prose h3 { margin-top: 12px; font-size: 16px; line-height: 24px; font-weight: 600; }
.list-item .main.wrap > * { white-space: normal; }
.stream-meta .who a { color: var(--md-on-surface); }
.stream-meta .who .flag { margin-right: 2px; }
.notfound { padding: 48px 16px; }
.actions-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 8px; }
.search-page { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
.toolbar .chips { margin-bottom: 0; }

.map-row .bans b { text-transform: capitalize; }
.card .carousel .match.compact { background: var(--md-surface-container-high); }
.card .carousel { margin: 0; padding: 0 12px 4px; scroll-padding: 0 12px; }
