/* Echo Master League
   Condensed, hard-edged, with dark and light themes. Orange from the EML logo is the brand accent.
   Theme: follows the system setting unless the visitor picks one (stored as data-theme on <html>). */

:root {
  /* The league mark is drawn in deep blue and red; on the dark theme it is lifted so it reads. */
  --mark-filter: none;
  --bg: #161616;
  --bg-deep: #0f0f0f;
  --surface: #1f1f1f;
  --surface-2: #262626;
  --surface-th: #1b1b1b;
  --line: #303030;
  --line-soft: #272727;
  --line-strong: #474747;
  --text: #f2f2f2;
  --text-2: #cfcfcf;
  /* Muted text a step stronger than --faint (placeholders), at least 5.5:1 on every surface of both sites. */
  --muted: #a3a3a3;
  --faint: #8f8f8f;
  --hover: #252525;
  --nav: #bdbdbd;
  --code-bg: #2a2a2a;
  --target: #2b2219;
  --mark-bg: #6b3b1c;
  --mark-fg: #fff;

  --orange: #e2753b;
  --orange-text: #f39a65;
  --link: #f39a65;
  --link-hover: #ffb98f;
  --win: #7fdc7f;
  --loss: #f06565;
  --tag-ff: #8a4a2a;
  --tag-ch: #3f6a8a;

  --t-master: #e2753b;
  --t-master-star: #f2c230;
  --focus: #e2753b;
  --t-diamond: #6ab8e6;
  --t-platinum: #67c2b0;
  --t-gold: #d9ab45;
  --t-none: #777;

  color-scheme: dark;

  --radius: 0;
  --cut: 14px;
  --maxw: 1200px;
  --maxw-wide: 1600px;
  --gutter: clamp(16px, 4vw, 40px);

  --f-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  --f-body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
}

/* Light theme tokens, applied when chosen or when the system prefers light. */
:root[data-theme="light"] {
  --mark-filter: none;
  --bg: #f1f1ef;
  --bg-deep: #ffffff;
  --surface: #ffffff;
  --surface-2: #f6f6f4;
  --surface-th: #f8f8f6;
  --line: #dcdcd8;
  --line-soft: #e9e9e6;
  --line-strong: #b9b9b4;
  --text: #141414;
  --text-2: #3a3a3a;
  --muted: #5c5c5c;
  --faint: #6b6b6b;
  --hover: #f4f4f1;
  --nav: #4a4a4a;
  --code-bg: #efefec;
  --target: #fff1e6;
  --mark-bg: #ffd9bd;
  --mark-fg: #141414;
  --orange-text: #b04c17;
  --link: #b04c17;
  --link-hover: #8a3a10;
  --win: #187530;
  --loss: #c62828;
  --tag-ff: #e3b79c;
  --tag-ch: #9cc2dd;
  --t-diamond: #1f6f99;
  --t-platinum: #2f9785;
  --t-gold: #b8861c;
  --t-master-star: #a87908;
  --focus: #b04c17;
  --t-none: #999;
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --mark-filter: none;
    --bg: #f1f1ef;
    --bg-deep: #ffffff;
    --surface: #ffffff;
    --surface-2: #f6f6f4;
    --surface-th: #f8f8f6;
    --line: #dcdcd8;
    --line-soft: #e9e9e6;
    --line-strong: #b9b9b4;
    --text: #141414;
    --text-2: #3a3a3a;
    --muted: #5c5c5c;
    --faint: #6b6b6b;
    --hover: #f4f4f1;
    --nav: #4a4a4a;
    --code-bg: #efefec;
    --target: #fff1e6;
    --mark-bg: #ffd9bd;
    --mark-fg: #141414;
    --orange-text: #b04c17;
    --link: #b04c17;
    --link-hover: #8a3a10;
    --win: #187530;
    --loss: #c62828;
    --tag-ff: #e3b79c;
    --tag-ch: #9cc2dd;
    --t-diamond: #1f6f99;
    --t-platinum: #2f9785;
    --t-gold: #b8861c;
    --t-master-star: #a87908;
    --focus: #b04c17;
    --t-none: #999;
    color-scheme: light;
  }
}

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

/* The hidden attribute always wins over a component's own display (cards, rules, panels). */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--link-hover); }

:focus-visible { outline: 2px solid var(--focus, var(--orange)); outline-offset: 2px; }

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 700;
  line-height: 1.05;
  margin: 0;
}

p { margin: 0 0 1em; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
}
.wrap.wide { max-width: var(--maxw-wide); }

.skip-link {
  position: absolute;
  left: 8px;
  top: -48px;
  background: var(--text);
  color: var(--bg);
  padding: 8px 12px;
  z-index: 100;
}
.skip-link:focus { top: 8px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }

.label {
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  --hdr-gap: 24px;
  display: flex;
  align-items: center;
  gap: var(--hdr-gap);
  min-height: 64px;
}
/* The icon buttons at the end of the header (search, My EML, log in, theme) sit 8px apart, not a full gap. */
.header-inner > .search-toggle ~ .me-link,
.header-inner > .search-toggle ~ .account-slot,
.header-inner > .search-toggle ~ .theme-toggle { margin-left: calc(8px - var(--hdr-gap)); }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}
.brand:hover { color: var(--text); }
.brand img { width: 36px; height: 36px; }
.brand img, .hero-mark, .footer-brand img { filter: var(--mark-filter); }
.brand-name {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  line-height: 1;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

/* The menu's groups (_build/nav.mjs): a button each, opening a list of its pages with a line about each. */
.site-nav > a, .nav-group-btn {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--nav);
  text-decoration: none;
  padding: 21px 11px 18px;
  border-bottom: 3px solid transparent;
}
.site-nav > a:hover, .nav-group-btn:hover, .nav-group.is-open > .nav-group-btn { color: var(--text); }
.site-nav > a[aria-current="page"], .nav-group.is-current > .nav-group-btn { color: var(--text); border-bottom-color: var(--orange); }
.nav-group { position: relative; }
.nav-group-btn { display: inline-flex; align-items: center; gap: 7px; background: none; border-top: 0; border-left: 0; border-right: 0; cursor: pointer; }
.nav-caret { width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .15s; }
.nav-group.is-open .nav-caret { transform: translateY(1px) rotate(-135deg); }
.nav-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 60;
  width: 320px;
  padding: 6px;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .35);
}
.nav-group:last-of-type .nav-menu { left: auto; right: 0; }
.nav-group.is-open > .nav-menu { display: block; }
.nav-menu a, .account-menu a {
  display: block;
  padding: 9px 12px;
  color: var(--text);
  text-decoration: none;
  border-left: 3px solid transparent;
}
.nav-menu a:hover, .nav-menu a:focus-visible, .account-menu a:hover, .account-menu a:focus-visible { background: var(--hover); }
.nav-menu a[aria-current="page"] { border-left-color: var(--orange); }
.nav-item { display: block; font: 700 15px/1.2 var(--f-display); letter-spacing: 0.04em; text-transform: uppercase; }
.nav-desc { display: block; margin-top: 3px; font: 400 13px/1.35 var(--f-body); color: var(--muted); }

.site-nav .btn { margin-left: 12px; padding: 9px 14px; border-bottom: 0; }
/* The nav link color would otherwise win over the button text color. */
.site-nav .btn-primary, .site-nav .btn-primary:hover { color: #111; }

.nav-toggle {
  display: none;
  margin-left: auto;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  font: 700 15px/1 var(--f-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 9px 12px;
  cursor: pointer;
}
.nav-toggle .bars,
.nav-toggle .bars::before,
.nav-toggle .bars::after {
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
  position: relative;
}
.nav-toggle .bars::before,
.nav-toggle .bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle .bars::before { top: -5px; }
.nav-toggle .bars::after { top: 5px; }

@media (max-width: 1240px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg-deep);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 16px;
  }
  .site-nav.is-open { display: flex; }
  .site-nav > a, .nav-group-btn {
    padding: 12px 4px 12px 12px;
    border-bottom: 1px solid var(--line-soft);
    border-left: 3px solid transparent;
  }
  .site-nav > a[aria-current="page"], .nav-group.is-current > .nav-group-btn { border-bottom-color: var(--line-soft); border-left-color: var(--orange); }
  /* In the Menu panel each group opens in place, under its name. */
  .nav-group-btn { width: 100%; justify-content: space-between; }
  .nav-menu, .nav-group:last-of-type .nav-menu { position: static; width: auto; padding: 4px 0 8px 12px; border: 0; box-shadow: none; }
  .site-nav .btn { margin: 14px 0 0; justify-content: center; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  text-decoration: none;
  padding: 13px 18px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; flex-shrink: 0; }

.btn-primary { background: var(--orange); color: #111; }
.btn-primary:hover { background: #f08a50; color: #111; }

.btn-ghost, .btn-line { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover, .btn-line:hover { border-color: var(--text); color: var(--text); }

.btn-dark { background: var(--text); color: var(--bg); }
.btn-dark:hover { background: var(--text-2); color: var(--bg); }

/* ---------- Hero and page heads ---------- */

.hero { background: var(--bg-deep); border-bottom: 1px solid var(--line); }

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
  padding-block: 72px 80px;
}

.eyebrow {
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-2);
  margin: 0 0 14px;
}

.hero h1 {
  font-size: clamp(56px, 8.6vw, 124px);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.86;
  letter-spacing: -0.005em;
}

.hero-lead {
  font-size: 19px;
  color: var(--text-2);
  max-width: 34em;
  margin: 26px 0 32px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-side { display: grid; gap: 18px; }

/* The league mark heads the hero, above the season line. */
.hero-mark { display: block; width: 88px; height: 88px; margin-bottom: 22px; }

.panel-dark {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 20px 22px;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}
.panel-dark h2 {
  font-family: var(--f-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.cal-list { list-style: none; margin: 0; padding: 0; }
.cal-list li {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}
.cal-list li:first-child { border-top: 0; padding-top: 0; }
.cal-date {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 22px;
  text-transform: uppercase;
  line-height: 1.1;
}
.cal-name { color: var(--muted); line-height: 1.35; font-size: 15px; }
.cal-name strong { color: var(--text); font-weight: 600; display: block; font-size: 16px; }
.cal-time { display: block; margin-top: 2px; font-size: 14px; color: var(--text-2); }
.cal-note { font-size: 13px; color: var(--muted); margin: 14px 0 0; }

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; gap: 36px; padding-block: 48px 56px; }
  .hero-mark { width: 64px; height: 64px; margin-bottom: 16px; }
}

.page-head .wrap { padding-block: 52px 0; }
.page-head-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-strong);
}
.page-head h1 {
  font-size: clamp(48px, 7.4vw, 96px);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.86;
  overflow-wrap: anywhere;
}
.page-head-meta { text-align: right; padding-bottom: 6px; }
.page-head-meta .eyebrow { margin: 0; }
.page-head-meta .meta-line { font-size: 14px; color: var(--muted); margin: 4px 0 0; }
.page-head-meta a { color: inherit; }
.page-intro { color: var(--muted); margin: 14px 0 0; max-width: 52em; font-size: 16px; }
.page-intro a { color: var(--text-2); }
@media (max-width: 700px) {
  .page-head-meta { text-align: left; }
}

/* ---------- Sections ---------- */

main { display: block; }

.section { padding-block: 40px; }
.section + .section { padding-top: 8px; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 10px;
  margin-bottom: 18px;
}
.section-head h2 {
  font-size: 34px;
  font-weight: 800;
  text-transform: uppercase;
}
.section-head a {
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  color: var(--text-2);
}
.section-head a:hover { color: var(--orange-text); }

.sub-head {
  font-size: 26px;
  font-weight: 800;
  text-transform: uppercase;
  margin: 28px 0 12px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.sub-head:first-child { margin-top: 0; }
.sub-head .count {
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
.grid-2 > * { min-width: 0; }
/* Side by side only when both columns have room for full team names. */
@media (max-width: 1100px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
}
.card-pad { padding: 20px 22px; }

.note { font-size: 15px; color: var(--muted); margin: 12px 0 0; }

/* ---------- Tables ---------- */

.table-scroll {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}
table.data th {
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  padding: 11px 14px;
  background: var(--surface-th);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.data td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover td { background: var(--hover); }
table.data .r { text-align: right; }
table.data .c { text-align: center; }
table.data td.pos {
  width: 52px;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 20px;
  color: var(--muted);
}
table.data .team-cell {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.15;
}
table.data .team-cell a { color: var(--text); text-decoration: none; }
table.data .team-cell a:hover { color: var(--orange-text); }
table.data td.muted .team-cell a, table.data td.team-cell.muted a { color: var(--muted); }
table.data td.nowrap, table.data th.nowrap { white-space: nowrap; }
table.data td.big {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 19px;
}

/* Same column widths for the Master and Ladder tables so they line up. */
table.standings.full th:nth-child(3) { width: 150px; }
table.standings.full th:nth-child(4),
table.standings.full th:nth-child(5),
table.standings.full th:nth-child(6),
table.standings.full th:nth-child(7),
table.standings.full th:nth-child(9) { width: 84px; }
table.standings.full th:nth-child(8) { width: 150px; }

tr.group-row td {
  background: var(--surface-th);
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding-block: 8px;
}
tr.group-row:hover td { background: var(--surface-th); }

.delta-up { color: var(--win); font-weight: 700; }
.delta-down { color: var(--loss); font-weight: 700; }
.delta-flat { color: var(--muted); }

/* Records, ratings and scores never split over two lines ("12-11" stays whole). */
table.data td.num, table.data .score-cell b { white-space: nowrap; }

@media (max-width: 640px) {
  .hide-sm { display: none; }
  /* Phones keep the earlier table size, so wide tables still fit the screen. */
  table.data { font-size: 15px; }
  table.data th, table.data td { padding: 10px 10px; }
  /* The full standings keep W-L on phones and drop the rating change to fit the screen. */
  table.standings.full .chg { display: none; }
}
@media (max-width: 900px) {
  .hide-md { display: none; }
}

.state {
  padding: 28px 20px;
  text-align: center;
  color: var(--muted);
  background: var(--surface);
}
.state.error { color: var(--loss); }
.state a { font-weight: 600; }

/* ---------- Tier marker ---------- */

.tier {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 500;
}
.tier::before {
  content: "";
  width: 9px;
  height: 9px;
  background: var(--t-none);
  flex-shrink: 0;
}
/* Every Master tier team gets the same flat gold star, unlike champion stars, which carry the color of the
   season they were won and shine. */
.tier[data-tier="master"]::before {
  width: 13px;
  height: 13px;
  background: var(--t-master-star);
  clip-path: polygon(50% 0%, 61.8% 35.4%, 98% 35.4%, 68.9% 57.3%, 79.4% 91.6%, 50% 70.5%, 20.6% 91.6%, 31.1% 57.3%, 2% 35.4%, 38.2% 35.4%);
}
.tier[data-tier="diamond"]::before { background: var(--t-diamond); }
.tier[data-tier="platinum"]::before { background: var(--t-platinum); }
.tier[data-tier="gold"]::before { background: var(--t-gold); }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--muted);
}
.legend-star { display: inline-flex; align-items: center; gap: 7px; }
.legend-star .master-star { width: 13px; height: 13px; margin: 0; }
.legend-star .star { width: 16px; height: 16px; }

/* ---------- Form boxes and streaks ---------- */

.form { display: inline-flex; gap: 4px; vertical-align: middle; }
.form span {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
  border: 1px solid var(--line-strong);
  color: var(--text-2);
}
.form span.w { background: var(--text); border-color: var(--text); color: var(--bg); }
.form span.empty { border-style: dashed; border-color: var(--line); }

.streak {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 18px;
  white-space: nowrap;
}
.streak.w { color: var(--win); }
.streak.l { color: var(--loss); }

/* ---------- Tags ---------- */

.tag {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 6px;
  border: 1px solid var(--line-strong);
  color: var(--text-2);
  white-space: nowrap;
  line-height: 1.5;
}
.tag-ff { border-color: var(--tag-ff); color: var(--orange-text); }
.tag-ch { border-color: var(--tag-ch); color: var(--t-diamond); }
.tag-late { border-style: dashed; border-color: var(--loss); color: var(--loss); margin-left: 6px; }
.tag-late:first-child { margin-left: 0; }
/* Pick-the-winner controls under an upcoming match (app.js wirePredictions). */
tr.predict-row td { padding-top: 0; border-top: 0; }
.predict { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 2px 0 10px; }
.predict-head { font-size: 13px; color: var(--muted); font-weight: 600; }
.predict-btns { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.predict-btn { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); border-left: 3px solid var(--team, var(--line-strong)); font: 600 13px/1.2 var(--f-body); cursor: pointer; }
.predict-btn:hover { border-color: var(--team, var(--text)); }
.predict-btn.picked { background: var(--team, var(--text)); color: #fff; border-color: var(--team, var(--text)); }
.predict-btn[disabled] { opacity: .55; cursor: default; }
.predict-n { font-variant-numeric: tabular-nums; opacity: .8; }
.predict-total { font-size: 13px; }
.late { color: var(--loss); }
.faint { color: var(--faint); }
table.data td.assigned-status { font-size: 14px; }

.badge {
  display: inline-grid;
  place-items: center;
  font-family: var(--f-mono);
  font-size: 9px;
  font-weight: 500;
  line-height: 1;
  height: 15px;
  min-width: 15px;
  padding: 0 3px;
  vertical-align: 2px;
  margin-left: 6px;
}
.badge.c { background: var(--text); color: var(--bg); }
.badge.cc { border: 1px solid var(--text-2); color: var(--text-2); }

/* ---------- Match rows ---------- */

.match-list { list-style: none; margin: 0; padding: 0; }
.match {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
}
.match:last-child { border-bottom: 0; }
.match-meta {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: -4px;
}
.match-team {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 19px;
  line-height: 1.1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.match-team a { color: var(--text); text-decoration: none; }
.match-team a:hover { color: var(--orange-text); }
.match-team.b { text-align: right; }
.match-team.lost a { color: var(--muted); }
.match-score {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 26px;
  min-width: 70px;
  text-align: center;
  line-height: 1;
}
.match-score small {
  display: block;
  font-family: var(--f-mono);
  font-weight: 400;
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
  white-space: nowrap;
}

.result {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 12px;
}
.result.w { background: var(--text); color: var(--bg); }
.result.l { border: 1px solid var(--line-strong); color: var(--text-2); }

.score-cell { white-space: nowrap; font-variant-numeric: tabular-nums; }
.score-cell b { font-family: var(--f-display); font-weight: 800; font-size: 21px; margin-right: 8px; }
.rounds { color: var(--muted); font-family: var(--f-mono); font-size: 12px; }
/* Results lists: on phones the round scores go on a line under the score instead of beside it. */
@media (max-width: 640px) { .score-cell .rounds-line { display: block; max-width: 7em; margin-top: 3px; white-space: normal; font-size: 11px; line-height: 1.3; } }
.tag-up { border-color: var(--win); color: var(--win); }
/* Matches: the line under "No matches are scheduled" that points to a postseason bracket. */
.state .state-bracket { margin: 10px 0 0; color: var(--text-2); }

/* ---------- Controls ---------- */

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: end;
  margin-bottom: 18px;
}
.field { display: grid; gap: 6px; }
.field label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input[type="search"],
.field input[type="text"],
.field input[type="number"],
.field input[type="url"],
.field input[type="email"],
.field input[type="password"],
.field input[type="datetime-local"],
.field textarea,
.field select,
.rules-search input {
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 9px 11px;
  min-width: 0;
}
.field input::placeholder, .field textarea::placeholder, .rules-search input::placeholder { color: var(--faint); }
/* The border brightens and the site's focus ring (:focus-visible above) shows too, so the field in use is
   plain to keyboard users. */
.field input:focus, .field select:focus, .field textarea:focus, .rules-search input:focus { border-color: var(--text-2); }
.field input[type="search"] { width: min(300px, 100%); }
.field.grow { flex: 1 1 220px; }
.field.grow input { width: 100%; }

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  padding-bottom: 9px;
  cursor: pointer;
}
.check input { width: 16px; height: 16px; accent-color: var(--orange); }

.result-count {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}

/* ---------- Sub navigation ---------- */

/* The line under the links is an inset shadow, so the active underline can sit on it without the
   negative margin that made the scrolling strip show a vertical scrollbar. On phones the strip
   scrolls sideways with its scrollbar hidden; the cut-off last link shows there is more. */
.subnav {
  display: flex;
  gap: 4px;
  box-shadow: inset 0 -1px 0 var(--line);
  margin-bottom: 28px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.subnav::-webkit-scrollbar { display: none; }
.subnav a {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding: 10px 12px;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}
.subnav a:hover { color: var(--text); border-bottom-color: var(--line-strong); }

/* ---------- Home: league basics ---------- */

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.fact {
  padding: 20px 22px 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.fact h3 {
  font-size: 24px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.fact p { color: var(--text-2); font-size: 16px; margin-bottom: 12px; }
.fact .ref {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--orange-text);
}
.fact .ref:hover { text-decoration: underline; }

.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.steps li {
  counter-increment: step;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 18px 20px 16px;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 40px;
  line-height: 1;
  color: var(--orange);
  margin-bottom: 8px;
}
.steps h3 { font-size: 22px; font-weight: 800; text-transform: uppercase; margin-bottom: 6px; }
.steps p { font-size: 16px; color: var(--text-2); margin: 0 0 8px; }
.steps p:last-child { margin-bottom: 0; }
.steps .ref { font-family: var(--f-mono); font-size: 11px; text-decoration: none; }

code {
  font-family: var(--f-mono);
  font-size: 0.82em;
  background: var(--code-bg);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 1px 5px;
  white-space: nowrap;
}

.cta-band {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--orange);
  padding: 28px 30px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 28px;
}
.cta-band h2 { font-size: 34px; font-weight: 800; text-transform: uppercase; }
.cta-band p { color: var(--text-2); margin: 6px 0 0; max-width: 40em; }

/* ---------- Team cards ---------- */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  align-items: start;
}

.tcard {
  background: var(--surface);
  display: flex;
  flex-direction: column;
  min-width: 0;
  container-type: inline-size;
}
.tcard.inactive { opacity: 0.72; }

.tcard-head {
  position: relative;
  background: var(--team-bg, #444);
  color: var(--team-fg, #fff);
  padding: 14px 16px 12px;
  min-height: 104px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
  overflow: hidden;
}
.tcard-head.split::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 46%;
  background: var(--team-bg2);
  clip-path: polygon(38% 0, 100% 0, 100% 100%, 0 100%);
}
.tcard-head > * { position: relative; z-index: 1; }
.tcard-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.tcard-rank {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 30px;
  line-height: 0.9;
}
.tcard-tag {
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1.5px solid currentColor;
  padding: 1px 6px;
  line-height: 1.5;
  white-space: nowrap;
}
.tcard-name {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 34px;
  line-height: 0.95;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.tcard-name a { color: inherit; text-decoration: none; }
.tcard-name a:hover { text-decoration: underline; text-decoration-thickness: 2px; }

.tcard-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--surface-2);
}
.tcard-stats > div { padding: 9px 10px 10px; border-right: 1px solid var(--line); min-width: 0; }
.tcard-stats > div:last-child { border-right: 0; }
.tcard-stats .label { font-size: 9.5px; display: block; }
.tcard-stats .v {
  display: block;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 26px;
  line-height: 1.05;
  margin-top: 2px;
  white-space: nowrap;
}
.tcard-stats .v.small { font-family: var(--f-mono); font-weight: 500; font-size: 11px; letter-spacing: 0.08em; color: var(--muted); padding-top: 9px; }

.tcard-form {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  background: var(--surface-2);
  border-top: 1px solid var(--line);
}
.tcard-form .label { margin-right: 8px; font-size: 9.5px; }
.tcard-form .form span.w { background: var(--team-box, var(--team-bg, var(--text))); border-color: var(--team-box, var(--team-bg, var(--text))); color: var(--team-box-fg, var(--team-fg, var(--bg))); box-shadow: inset 0 0 0 1px rgba(128, 128, 128, 0.35); }
.tcard-form .streak-wrap { display: inline-flex; align-items: baseline; gap: 6px; }

.tcard-section {
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 12px 6px;
  background: var(--surface);
}

.trow {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: stretch;
  min-height: 46px;
  border-top: 1px solid var(--bg);
  background: var(--surface-2);
}
.trow-role {
  background: var(--role-bg, #3a3a3a);
  color: var(--role-fg, #fff);
  clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
  padding: 6px 14px 5px 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.trow-role b {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 22px;
  line-height: 0.9;
}
.trow-role small {
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.85;
}
.trow-names {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 0;
  padding: 6px 12px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.15;
}
.trow-names .nm { overflow-wrap: anywhere; }
.trow-names.empty { font-family: var(--f-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

.role-captain { --role-bg: #2f4c78; }
.role-co { --role-bg: #3c6b45; }
.role-player { --role-bg: #6b6324; }

.tcard-foot {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  background: var(--surface-2);
  border-top: 1px solid var(--bg);
}
.tcard-foot .k {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.tcard-foot .v { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }
.tcard-foot a { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; color: var(--text-2); }
.tcard-foot a:hover { color: var(--orange-text); }

.tier-block { margin-bottom: 36px; }
/* Teams page: how many more players an inactive team needs to go active. */
.tcard-need { margin: 0; padding: 8px 12px; background: var(--surface-2); border-top: 1px solid var(--bg); font-size: 13px; color: var(--text-2); }

/* ---------- Team page ---------- */

.team-layout {
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.team-layout > * { min-width: 0; }
/* On tall desktop screens the team or player card stays in view beside a long match history. */
@media (min-width: 1101px) and (min-height: 960px) {
  .team-layout > :first-child { position: sticky; top: 92px; }
}
@media (max-width: 1100px) { .team-layout { grid-template-columns: minmax(0, 290px) minmax(0, 1fr); gap: 24px; } }
/* Beside the card there is no room for the round by round scores; the match page has them. */
@media (min-width: 901px) and (max-width: 1100px) { .team-layout table.results .rounds { display: none; } }
@media (max-width: 900px) { .team-layout { grid-template-columns: minmax(0, 1fr); } }

.stat-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 16px 0 0;
  background: var(--surface);
  border: 1px solid var(--line);
}
.stat-list > div { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); }
.stat-list > div:nth-child(odd) { border-right: 1px solid var(--line-soft); }
.stat-list dt { font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.stat-list dd { margin: 3px 0 0; font-family: var(--f-display); font-weight: 800; font-size: 26px; line-height: 1.05; }
.stat-list dd small { display: block; font-family: var(--f-body); font-weight: 500; font-size: 12px; color: var(--muted); }

/* ---------- Rules ---------- */

.rules-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
.rules-toc {
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  font-size: 15px;
}
.rules-toc h2 {
  font-family: var(--f-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}
.rules-toc ol { list-style: none; margin: 0; padding: 0; }
.rules-toc a {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 4px;
  padding: 5px 8px;
  color: var(--text-2);
  text-decoration: none;
  border-left: 2px solid transparent;
  line-height: 1.3;
}
.rules-toc a:hover { background: var(--surface); color: var(--text); }
.rules-toc a.is-active { border-left-color: var(--orange); background: var(--surface); color: var(--text); font-weight: 600; }
.rules-toc .n { color: var(--muted); font-variant-numeric: tabular-nums; }

.rules-search {
  position: sticky;
  top: 64px;
  z-index: 5;
  background: var(--bg);
  padding: 14px 0 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.rules-search input { width: min(420px, 100%); }
.rules-search .result-count { margin: 0; }

.rule-section {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 6px 24px 14px;
  margin-bottom: 18px;
}
.rule-section > h2 {
  font-size: 30px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 16px 0 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
  display: flex;
  gap: 12px;
}
.rule-section > h2 .n { color: var(--orange); }
.rule-section > h2 a { color: inherit; text-decoration: none; }

.rule {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 8px;
  padding: 7px 0;
  line-height: 1.6;
  color: var(--text-2);
}
.rule .rn {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  padding-top: 3px;
}
.rule .rn:hover { color: var(--orange-text); text-decoration: underline; }
.rule .rn { position: relative; }
.rule .rn[data-copied]::after {
  content: attr(data-copied);
  position: absolute;
  left: 0;
  top: -24px;
  padding: 3px 7px;
  white-space: nowrap;
  font: 500 11px/1.2 var(--f-mono);
  color: var(--bg);
  background: var(--text);
  pointer-events: none;
}
.rule[data-depth="3"] { padding-left: 22px; }
.rule[data-depth="4"] { padding-left: 44px; }
.rule.is-target { background: var(--target); box-shadow: -10px 0 0 var(--target), 10px 0 0 var(--target); color: var(--text); }
.rule-text { min-width: 0; }

mark { background: var(--mark-bg); color: var(--mark-fg); padding: 0 1px; }

.prose { max-width: 46em; color: var(--text-2); }
.prose h3 { font-size: 24px; font-weight: 800; text-transform: uppercase; margin: 26px 0 10px; color: var(--text); }
.prose h3:first-child { margin-top: 4px; }
.prose ul { margin: 0 0 1em; padding-left: 1.25em; }
.prose li { margin-bottom: 4px; }

@media (max-width: 900px) {
  .rules-layout { grid-template-columns: 1fr; }
  .rules-toc { position: static; max-height: none; }
  .rules-toc ol { columns: 2; column-gap: 16px; }
  .rule { grid-template-columns: 64px minmax(0, 1fr); }
  .rule[data-depth="3"] { padding-left: 12px; }
  .rule[data-depth="4"] { padding-left: 24px; }
  .rule-section { padding-inline: 16px; }
}
@media (max-width: 520px) {
  .rules-toc ol { columns: 1; }
}

/* ---------- Resources ---------- */

.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { border-top: 1px solid var(--line-soft); }
.link-list li:first-child { border-top: 0; }
.link-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  color: var(--text);
  text-decoration: none;
}
.link-list a:hover { background: var(--hover); }
.link-list a strong { display: block; font-family: var(--f-display); font-weight: 700; font-size: 19px; line-height: 1.15; }
.link-list a span.desc { display: block; font-size: 14px; color: var(--muted); }
.link-list .go {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange-text);
  white-space: nowrap;
}

.calendar-figure { margin: 0; }
.calendar-figure img { border: 1px solid var(--line); }
.calendar-figure figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }

/* ---------- Archive ---------- */

.season {
  background: var(--surface);
  border: 1px solid var(--line);
  margin-bottom: 20px;
}
.season-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 20px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--line);
}
.season-head h2 { font-size: 34px; font-weight: 800; text-transform: uppercase; }
.season-head p { margin: 0; font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.season-body {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
}
.season-body > div { padding: 18px 22px 20px; min-width: 0; }
.season-body > div + div { border-left: 1px solid var(--line); }
@media (max-width: 860px) {
  .season-body { grid-template-columns: minmax(0, 1fr); }
  .season-body > div + div { border-left: 0; border-top: 1px solid var(--line); }
}
.season h3 {
  font-family: var(--f-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}
.season .card, .season .table-scroll { background: var(--surface-2); }
.season .link-list a { padding: 9px 14px; }
.season .link-list a strong { display: inline; font-size: 17px; }
.season .link-list a span.desc { display: inline; margin-left: 8px; font-size: 13px; }
.podium { list-style: none; margin: 0 0 18px; padding: 0; }
.podium li { display: flex; gap: 12px; align-items: baseline; padding: 4px 0; }
.podium .place {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange-text);
  min-width: 56px;
}
.podium strong { font-family: var(--f-display); font-weight: 800; font-size: 24px; text-transform: uppercase; }

details.more { margin-top: 10px; }
details.more summary {
  cursor: pointer;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--orange-text);
  padding: 6px 0;
}
details.more[open] summary { margin-bottom: 8px; }

table.data.compact th, table.data.compact td { padding: 8px 12px; font-size: 14px; }
table.data.compact .team-cell { font-size: 17px; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--bg-deep);
  color: var(--muted);
  margin-top: 72px;
  font-size: 15px;
  border-top: 1px solid var(--line);
}
.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding-block: 44px 28px;
}
.footer-brand { display: flex; gap: 12px; align-items: start; }
.footer-brand img { width: 44px; height: 44px; }
.footer-brand strong {
  display: block;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 22px;
  text-transform: uppercase;
  color: var(--text);
}
.footer-brand p { margin: 4px 0 0; }
.site-footer h2 {
  font-family: var(--f-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 10px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: var(--text-2); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }
.footer-base {
  border-top: 1px solid var(--line);
  padding-block: 16px 22px;
  font-size: 13px;
  color: var(--faint);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}
@media (max-width: 860px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media print {
  .site-header, .site-footer, .rules-toc, .rules-search, .nav-toggle { display: none !important; }
  body { background: #fff; color: #000; }
  .rules-layout { display: block; }
  .rule-section { border: 0; padding: 0; background: none; }
  .rule { color: #000; }
}

/* ---------- Theme toggle ---------- */

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-left: 8px;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--text); }
.theme-toggle svg { width: 18px; height: 18px; }

/* ---------- Champion tags ---------- */

:root { --gold: #e3b341; }
:root[data-theme="light"] { --gold: #8f6508; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --gold: #8f6508; } }

.champ {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.4;
  padding: 1px 5px;
  border: 1px solid var(--gold);
  color: var(--gold);
  white-space: nowrap;
  vertical-align: 3px;
  cursor: help;
}
.trow-names .champ { margin-left: 7px; }
td .champ { margin-right: 4px; vertical-align: 1px; }

.cal-link {
  display: block;
  width: max-content;
  margin-top: 3px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- Archive: champions ---------- */

.champ-list { display: grid; gap: 14px; }
.champ-row {
  display: grid;
  grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
  background: var(--surface);
  border: 1px solid var(--line);
}
.champ-row .champ-banner { min-height: 150px; justify-content: flex-end; gap: 8px; padding: 18px 20px 16px; }
.champ-row .tcard-name { font-size: 46px; }
.champ-tag { font-size: 11px; padding: 3px 8px; display: inline-flex; align-items: center; }
.champ-tag .star { width: 15px; height: 15px; margin-right: 6px; }
.champ-banner > .champ-star { position: absolute; z-index: 2; right: 22px; top: 20px; width: 104px; height: 104px; pointer-events: none; }
.champ-banner > .champ-star .star { width: 100%; height: 100%; filter: drop-shadow(0 0 10px color-mix(in srgb, currentColor 55%, transparent)); }
@media (max-width: 640px) { .champ-banner > .champ-star { width: 72px; height: 72px; right: 14px; top: 14px; } }
.champ-body { padding: 18px 22px; display: grid; gap: 16px; align-content: center; min-width: 0; }
.champ-facts { display: grid; gap: 10px; margin: 0; }
.champ-facts > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.champ-facts dt { font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.champ-facts dd { margin: 0; font-family: var(--f-display); font-weight: 700; font-size: 20px; line-height: 1.25; }
.champ-facts .nm { white-space: nowrap; }
.champ-links { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 760px) {
  .champ-row { grid-template-columns: minmax(0, 1fr); }
  .champ-facts > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
.trow-names .person { display: inline-flex; align-items: center; flex-wrap: nowrap; max-width: 100%; }
/* Several players: one per line so names and champion tags never split awkwardly. */
.role-player .trow-names { flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; }

/* ---------- Small fixes ---------- */

.brand-name .short { display: none; }
@media (max-width: 420px) {
  .header-inner { gap: 10px; }
  .brand-name .full { display: none; }
  .brand-name .short { display: inline; }
  .theme-toggle { margin-left: 0; }
}

.rules-toc .note a { display: inline; padding: 0; border: 0; background: none; color: var(--link); text-decoration: underline; }
.rules-toc .note a:hover { background: none; }


table.data.compact th { font-size: 11px; }

td .streak { margin-left: 6px; }

/* ---------- Team banners with logos ----------
   The banner is built from the logo: an enlarged, blurred copy fills the background in the logo's
   own colors, a dark tint keeps the white text readable, and the crisp logo sits on the right. */

.tcard-head.has-logo { color: #fff; }
.tcard-head.has-logo > .tcard-backdrop {
  position: absolute;
  z-index: 0;
  inset: -30%;
  background-position: 70% center;
  background-repeat: no-repeat;
  background-size: cover;
  filter: blur(16px) saturate(2.1) brightness(0.85);
  opacity: 0.95;
  pointer-events: none;
}
.tcard-head.has-logo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(14, 8, 24, 0.5);
}
.tcard-head.has-logo > .tcard-logo {
  position: absolute;
  z-index: 2;
  right: 4%;
  top: 7%;
  width: 42%;
  height: 66%;
  background-position: center right;
  background-repeat: no-repeat;
  background-size: contain;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.22));
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 50%);
  mask-image: linear-gradient(to right, transparent 0%, #000 50%);
  pointer-events: none;
}
.tcard-head.has-logo > .tcard-top,
.tcard-head.has-logo > .tcard-name {
  z-index: 3;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* ---------- Stars ----------
   Champion stars in the style of VRML's season honours badges (SVG from data.js): one per EML title, in
   the color of the season it was won. */

.star {
  display: inline-block;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  vertical-align: -2px;
}
.title-stars {
  display: inline-flex;
  gap: 1px;
  margin-left: 8px;
  vertical-align: -1px;
  cursor: help;
}
.title-stars .star { width: 20px; height: 20px; }
/* The trophy case on a team page (app.js trophyCase): a tile per Finals podium finish, gold/silver/bronze. */
.trophy-case.empty { display: none; }
.trophy-case .trophies { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.trophy { flex: 0 0 auto; }
.trophy-inner { display: flex; align-items: center; gap: 9px; padding: 8px 13px 8px 11px; background: var(--bg-deep); border: 1px solid var(--line); border-left: 3px solid var(--trophy, #cdd3dd); color: var(--text); text-decoration: none; }
.trophy.gold .trophy-inner { --trophy: #f2c230; }
.trophy.bronze .trophy-inner { --trophy: #cd7f32; }
a.trophy-inner:hover, a.trophy-inner:focus-visible { background: var(--hover); }
.trophy-icon { width: 27px; height: 27px; flex-shrink: 0; }
.trophy-label { display: flex; flex-direction: column; line-height: 1.2; }
.trophy-place { font-size: 12px; color: var(--muted); }
.tcard-tag .star { width: 11px; height: 11px; margin-right: 4px; vertical-align: -1.5px; }
.tcard-top .title-stars { margin-left: 2px; vertical-align: 0; }
.tcard-top .title-stars .star { width: 20px; height: 20px; }

/* A band of light sweeps across each star every few seconds, staggered per star, and the sparkle flares
   as it passes. */
.star .shine {
  animation: star-shine 5s ease-in-out infinite;
  animation-delay: var(--shine-delay, 0s);
}
@keyframes star-shine {
  0%, 72% { transform: translateX(0); }
  100% { transform: translateX(44px); }
}
.star .glint {
  transform-box: fill-box;
  transform-origin: center;
  animation: star-twinkle 5s ease-in-out infinite;
  animation-delay: var(--shine-delay, 0s);
}
.star .glint + .glint { animation-delay: calc(var(--shine-delay, 0s) + 0.4s); }
@keyframes star-twinkle {
  0%, 74%, 100% { transform: scale(0.75); opacity: 0.8; }
  86% { transform: scale(1.3) rotate(45deg); opacity: 1; }
}
/* With reduce motion on, the band stays still and gently brightens and fades instead of moving. */
@media (prefers-reduced-motion: reduce) {
  .star .shine {
    transform: translateX(20px);
    animation: star-glow 5s ease-in-out infinite;
    animation-delay: var(--shine-delay, 0s);
  }
  .star .glint { animation: none; transform: none; }
}
@keyframes star-glow {
  0%, 70%, 100% { opacity: 0; }
  85% { opacity: 0.4; }
}

/* Narrow cards: smaller stat numbers and name so nothing runs together. */
@container (max-width: 300px) {
  .tcard-stats .v { font-size: 22px; }
  .tcard-stats > div { padding-inline: 8px; }
  .tcard-name { font-size: 30px; }
  .tcard-form { padding-inline: 8px; }
  .tcard-form .form { gap: 3px; }
  .tcard-form .form span { width: 16px; height: 16px; }
  .tcard-form .label { margin-right: 5px; }
  .trow { grid-template-columns: 80px minmax(0, 1fr); }
}

/* Labels inside the Assigned matches block sit below its section title. */
#assigned-list h3.sub-head { font-size: 19px; color: var(--text-2); letter-spacing: 0.04em; margin: 4px 0 10px; }

/* Stars glow softly in their own season color, and Master stars are larger in tables. */
.star { filter: drop-shadow(0 0 2.5px color-mix(in srgb, currentColor 55%, transparent)); overflow: visible; }
/* Large stars (player banners, champion tags on cards) glow a little wider. */
.pcard-star .star { filter: drop-shadow(0 0 7px color-mix(in srgb, currentColor 50%, transparent)); }
.tcard-tag .star { width: 14px; height: 14px; margin-right: 5px; vertical-align: -3px; }


/* ---------- Banner style (after the Ren banner): swirl texture, vignette and neon corner frames ---------- */

:root { --swirl: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2296%22%20height%3D%2296%22%20viewBox%3D%220%200%2096%2096%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M48%2048c0-6%205-10%2010-10s9%204%209%209-4%208-8%208-6-3-6-6%202-5%205-5%22%2F%3E%3Cpath%20d%3D%22M48%2048c-8%200-15-7-15-16s7-16%2016-16%22%2F%3E%3Cpath%20d%3D%22M48%2048c0%209-7%2017-17%2017S14%2058%2014%2048s6-15%2014-15%22%2F%3E%3Cpath%20d%3D%22M67%2047c9%200%2016%206%2016%2015s-7%2016-16%2016-15-7-15-15%22%2F%3E%3Cpath%20d%3D%22M49%2016c0-8%207-14%2015-14%22%2F%3E%3Cpath%20d%3D%22M83%2062c7%200%2013%206%2013%2013%22%2F%3E%3Cpath%20d%3D%22M0%2075c8%200%2014%206%2014%2013s-5%208-9%208%22%2F%3E%3Cpath%20d%3D%22M28%2033c-6-3-8-10-5-16%22%2F%3E%3Cpath%20d%3D%22M90%2020c-5%200-9-4-9-9s4-8%208-8%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); }

.tcard-head.has-logo::before { box-shadow: inset 0 0 46px rgba(0, 0, 0, 0.6); }
.tcard-head.has-logo > .tcard-pattern {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: var(--swirl);
  background-size: 104px 104px;
  opacity: 0.09;
  pointer-events: none;
}
.tcard-head.has-logo > .tcard-frame {
  position: absolute;
  inset: 9px;
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(0 0 3px var(--frame-a));
}
.tcard-frame::before,
.tcard-frame::after {
  content: "";
  position: absolute;
  top: 0;
  width: 30%;
  height: 68%;
}
.tcard-frame::before { left: 0; border-top: 2px solid var(--frame-b); border-left: 2px solid var(--frame-a); }
.tcard-frame::after { right: 0; border-top: 2px solid var(--frame-a); border-right: 2px solid var(--frame-b); }

/* Wide team banner on team pages: logo centered, like a Discord server banner. */
.team-hero { min-height: 230px; margin-bottom: 28px; }
.team-hero.has-logo > .tcard-logo {
  left: 50%;
  right: auto;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 62%;
  height: 80%;
  background-position: center;
  -webkit-mask-image: none;
  mask-image: none;
  filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.25));
}
.team-hero .tcard-frame::before,
.team-hero .tcard-frame::after { width: 24%; height: 78%; }
@media (max-width: 640px) { .team-hero { min-height: 150px; } }

/* Teams without a logo: the team color, the same swirl texture in the text color, a soft vignette, and the
   team's initials (from data.js) as a large watermark on the right. */
.tcard-head.has-mono { box-shadow: inset 0 0 46px rgba(0, 0, 0, 0.22); }
.tcard-head.has-mono > .tcard-pattern {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: currentColor;
  -webkit-mask-image: var(--swirl);
  mask-image: var(--swirl);
  -webkit-mask-size: 104px 104px;
  mask-size: 104px 104px;
  opacity: 0.07;
  pointer-events: none;
}
.tcard-head.has-mono > .tcard-mono {
  position: absolute;
  z-index: 1;
  right: -0.04em;
  bottom: -0.16em;
  font: 800 118px/1 var(--f-display);
  letter-spacing: -0.01em;
  color: currentColor;
  opacity: 0.16;
  white-space: nowrap;
  pointer-events: none;
}
.champ-row .tcard-head.has-mono > .tcard-mono { font-size: 170px; }
.pcard-banner.has-mono > .tcard-mono { font-size: 150px; }

/* Smaller corner frames on the compact team cards, so they stay clear of the rank. */
.tcard .tcard-head.has-logo > .tcard-frame::before,
.tcard .tcard-head.has-logo > .tcard-frame::after { width: 18%; height: 42%; }

/* ---------- Player cards ---------- */

.trow-names a.nm, .champ-facts a.plink { color: inherit; text-decoration: none; }
.trow-names a.nm:hover, .champ-facts a.plink:hover { text-decoration: underline; text-decoration-thickness: 2px; }

.pcard { background: var(--surface); border: 1px solid var(--line); }
.pcard-banner { min-height: 220px; padding: 18px 20px 18px; gap: 6px; }
.pcard-name { font-size: 54px; }
.pcard-team {
  position: relative;
  z-index: 3;
  margin: 0;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 20px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.pcard-team a { color: inherit; text-decoration: none; border-bottom: 2px solid var(--frame-a, currentColor); }
.pcard-team a:hover { border-bottom-color: currentColor; }

/* Titles float behind the player's name; the team logo steps aside when there are stars. */
.pcard-banner > .pcard-stars { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.pcard-banner:has(.pcard-stars) > .tcard-logo { display: none; }
.pcard-star {
  position: absolute;
  width: 86px;
  height: 86px;
  animation: star-float 7s ease-in-out infinite;
  animation-delay: calc(var(--i) * -2.3s);
}
.pcard-star .star { width: 100%; height: 100%; }
.pcard-star:nth-child(1) { right: 7%; top: 12%; }
.pcard-star:nth-child(2) { right: 30%; top: 6%; width: 66px; height: 66px; }
.pcard-star:nth-child(3) { right: 18%; top: 48%; width: 58px; height: 58px; }
.pcard-star:nth-child(4) { right: 44%; top: 30%; width: 52px; height: 52px; }
.pcard-star:nth-child(5) { right: 3%; top: 56%; width: 48px; height: 48px; }
.pcard-star:nth-child(n + 6) { right: 56%; top: 8%; width: 44px; height: 44px; }
@keyframes star-float {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  50% { transform: translateY(-9px) rotate(5deg); }
}
@media (prefers-reduced-motion: reduce) { .pcard-star { animation: none; } }

.pcard-stats { border-top: 1px solid var(--line); }
.pcard-small { display: block; font-size: 12px; color: var(--muted); }

.title-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.title-list li {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 10px 14px;
}
.title-list .star { width: 28px; height: 28px; }
.title-list strong { font-family: var(--f-display); font-size: 19px; margin-right: 4px; }
td .star { width: 17px; height: 17px; vertical-align: -3px; }
@media (max-width: 640px) { .pcard-name { font-size: 40px; } .pcard-star { width: 60px; height: 60px; } }

/* Champion tag on players: one star per title, then the word. */
.champ { display: inline-flex; align-items: center; gap: 1px; }
.champ .star { width: 13px; height: 13px; vertical-align: 0; }
.champ .star:last-of-type { margin-right: 4px; }
td .title-stars { margin-left: 6px; }
.champ.compact { border: 0; padding: 0 0 0 2px; gap: 0; }
.champ.compact .star { width: 15px; height: 15px; }
.champ.compact .star:last-of-type { margin-right: 0; }

/* ---------- My EML ---------- */

.me-link {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-left: 8px;
  border: 1px solid var(--line-strong);
  color: var(--orange-text);
  flex-shrink: 0;
}
.me-link:hover { border-color: var(--orange); color: var(--orange-text); }
.me-link svg { width: 18px; height: 18px; }
.me-link[hidden] { display: none; }
.me-link[aria-current="page"] { border-color: var(--orange); }

/* Your team and your own row, wherever they appear. */
tr.is-mine td { background: color-mix(in srgb, var(--orange) 9%, var(--surface)); }
tr.is-mine td:first-child { box-shadow: inset 3px 0 0 var(--orange); }
tr.is-me td { background: color-mix(in srgb, var(--orange) 15%, var(--surface)); }
.tcard.is-mine { outline: 2px solid var(--orange); outline-offset: 3px; }

.me-box { margin-top: 14px; }
.me-box .note { margin-top: 8px; }
.me-btn[aria-pressed="true"] { border-color: var(--orange); color: var(--orange-text); }

.me-intro { max-width: 680px; }
.me-intro > p { color: var(--text-2); }
.me-pick { margin: 18px 0 0; }
.me-status .stat dd { font-size: 24px; }
.me-status .stat dd a { color: inherit; text-decoration: none; border-bottom: 2px solid var(--orange); }
.me-sub { font-size: 19px; color: var(--text-2); letter-spacing: 0.04em; margin: 24px 0 10px; }
.me-deadline {
  border-left: 3px solid var(--orange);
  background: var(--surface);
  padding: 10px 14px;
  margin: 0 0 12px;
  font-size: 15px;
  color: var(--text-2);
}
.me-deadline.passed { border-left-color: var(--loss); }
.me-tag.me-played { border-color: var(--win); color: var(--win); }
.me-tag.me-scheduled { border-color: var(--t-diamond); color: var(--t-diamond); }
.me-tag.me-open { border-color: var(--orange); color: var(--orange-text); }
.me-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

.me-status {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
}
.me-status .stat { padding: 14px 18px; border-right: 1px solid var(--line-soft); min-width: 0; }
.me-status .stat:last-child { border-right: 0; }
.me-status dt { font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.me-status dd { margin: 4px 0 0; font-family: var(--f-display); font-weight: 800; font-size: 26px; line-height: 1.1; overflow-wrap: anywhere; }
.me-status dd small { display: block; font-family: var(--f-body); font-weight: 500; font-size: 13px; color: var(--muted); margin-top: 3px; }
@media (max-width: 760px) {
  .me-status { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .me-status .stat { border-bottom: 1px solid var(--line-soft); }
  .me-status .stat:nth-child(2n) { border-right: 0; }
}

/* ---------- Header search ---------- */

.search-toggle {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-left: 8px;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
}
.search-toggle:hover, .search-toggle[aria-expanded="true"] { border-color: var(--text); }
.search-toggle svg { width: 18px; height: 18px; }
@media (min-width: 1241px) { .search-toggle { margin-left: 16px; } }

.site-search {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  padding: 14px 0 18px;
}
.search-form {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 2px solid var(--orange);
  padding-bottom: 6px;
}
.search-form > svg { width: 20px; height: 20px; color: var(--muted); flex-shrink: 0; }
.search-form input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  color: var(--text);
  font: 700 26px/1.2 var(--f-display);
  letter-spacing: 0.01em;
  padding: 6px 0;
}
.search-form input::placeholder { color: var(--faint); }
.search-form input::-webkit-search-cancel-button { display: none; }
.search-close {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--text-2);
  font: 500 12px/1 var(--f-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 10px;
  cursor: pointer;
}
.search-close:hover { border-color: var(--text); color: var(--text); }
.search-results { list-style: none; margin: 8px 0 0; padding: 0; max-height: min(60vh, 520px); overflow-y: auto; }
.search-results a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 8px;
  color: var(--text);
  text-decoration: none;
  border-left: 3px solid transparent;
}
.search-results a:hover, .search-results li.is-active a { background: var(--hover); border-left-color: var(--orange); }
.search-results strong { display: block; font: 700 19px/1.15 var(--f-display); letter-spacing: 0.01em; }
.search-results small { display: block; font-size: 13px; color: var(--muted); }
.search-kind {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border: 1px solid var(--line-strong);
  font: 500 11px/1 var(--f-mono);
  color: var(--text-2);
}
.search-empty { padding: 12px 8px; color: var(--muted); }

/* ---------- Watch links ---------- */

.watch-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 28px;
  margin-top: 36px;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--orange);
}
.watch-box h2 { margin: 0; font: 800 24px/1.1 var(--f-display); text-transform: uppercase; letter-spacing: 0.02em; }
.watch-box p { margin: 4px 0 0; color: var(--text-2); }
.watch-links { display: flex; flex-wrap: wrap; gap: 10px; }
.watch-links .btn { flex-wrap: wrap; row-gap: 4px; }
.btn-sub { flex-basis: 100%; padding-left: 25px; font-size: 11px; letter-spacing: 0.02em; text-transform: none; color: var(--muted); }

.vod-cell { width: 1%; white-space: nowrap; text-align: right; }
.vod-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 28px;
  min-width: 28px;
  padding: 0 7px;
  margin-left: 4px;
  border: 1px solid var(--line-strong);
  color: var(--text);
  text-decoration: none;
  font: 500 11px/1 var(--f-mono);
}
.vod-link svg { width: 12px; height: 12px; color: var(--orange); }
.vod-link:hover { border-color: var(--orange); color: var(--text); }
.vod-inline { display: none; }
@media (max-width: 640px) {
  .data.results .vod-cell { display: none; }
  table.data.results th, table.data.results td { padding-left: 6px; padding-right: 6px; }
  .vod-inline { display: flex; justify-content: center; margin-top: 6px; }
  .vod-inline .vod-link { margin: 0 2px; }
}

/* ---------- Postseason brackets ---------- */

.rule-quotes { list-style: none; margin: 0; padding: 0; }
.rule-quotes li { border-left: 3px solid var(--line-strong); padding: 4px 0 4px 14px; margin-bottom: 14px; }
.rule-quotes p { margin: 0 0 4px; color: var(--text-2); }

.bracket-block + .bracket-block { margin-top: 56px; }
.bracket-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 24px;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.bracket-head h2 { margin: 2px 0 0; font: 800 clamp(34px, 5vw, 52px)/1 var(--f-display); text-transform: uppercase; letter-spacing: 0.01em; }
.bracket-head .eyebrow { margin: 0; }
.bracket-facts { margin: 8px 0 0; color: var(--text-2); }
.bracket-note { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.bracket-actions { display: flex; align-items: center; gap: 12px; }
.bracket-status { font-size: 11px; padding: 5px 8px; }
.bracket-status.underway, .bracket-status.awaiting_review { border-color: var(--loss); color: var(--loss); }
.bracket-status.complete { border-color: var(--win); color: var(--win); }

.bracket-side + .bracket-side { margin-top: 26px; }
.bracket-side-title { margin: 0 0 10px; font: 700 15px/1 var(--f-display); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.bracket-scroll { overflow-x: auto; padding-bottom: 6px; }
.bracket-cols { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 22px; min-width: min-content; }
.bracket-col { display: flex; flex-direction: column; }
.bracket-round {
  font: 500 11px/1 var(--f-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
}
.bracket-matches { flex: 1; display: flex; flex-direction: column; justify-content: space-around; gap: 14px; }
.bm { background: var(--surface); border: 1px solid var(--line); }
.bm-n {
  display: block;
  font: 500 10px/1 var(--f-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 7px 10px 5px;
}
.bm-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-top: 1px solid var(--line-soft);
}
.bm-seed { font: 500 11px/1 var(--f-mono); color: var(--faint); text-align: right; }
.bm-name { font: 700 17px/1.15 var(--f-display); letter-spacing: 0.01em; color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.bm-name:hover { color: var(--orange-text); }
/* A Finals team with no team page (it never played in the league database) is not a link. */
a.bm-name:not([href]):hover { color: var(--text); }
.bm-name.tbd { font: italic 500 13px/1.2 var(--f-body); color: var(--faint); letter-spacing: 0; }
.bm-score { font: 800 20px/1 var(--f-display); min-width: 14px; text-align: right; }
.bm-row.won { box-shadow: inset 3px 0 0 var(--orange); }
.bm-row.won .bm-score { color: var(--orange-text); }
.bm-row.lost .bm-name, .bm-row.lost .bm-score { color: var(--muted); }
.bm-games { padding: 5px 10px 6px; border-top: 1px solid var(--line-soft); font: 500 11px/1.2 var(--f-mono); color: var(--muted); }
.bm-maybe { border-style: dashed; background: transparent; }
.bm-maybe p { margin: 0; padding: 0 10px 10px; font-size: 13px; color: var(--muted); }
.bracket-extra { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 260px)); gap: 22px; margin-top: 26px; }
.bracket-embed { border: 1px solid var(--line); background: #fff; }
.bracket-embed iframe { display: block; border: 0; }

.placings { list-style: none; margin: 0 0 8px; padding: 0; columns: 2 260px; column-gap: 28px; }
.placings li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); break-inside: avoid; }
.placings .place { font: 800 22px/1 var(--f-display); width: 26px; color: var(--muted); }
.placings a { font: 700 19px/1.1 var(--f-display); color: var(--text); text-decoration: none; }
.tag-q { border-color: var(--win); color: var(--win); }
.bm-row.is-mine, .placings li.is-mine { background: color-mix(in srgb, var(--orange) 9%, var(--surface)); }
.placings li.is-mine { box-shadow: inset 3px 0 0 var(--orange); padding-left: 10px; }
/* Postseason: the matches up next and the latest results, above a bracket that is under way. */
.bracket-stats { margin-top: 30px; }
.bracket-now { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px 32px; margin: 0 0 26px; }
.bracket-now ul { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); background: var(--surface); }
.bracket-now li { display: grid; grid-template-columns: 66px minmax(0, 1fr) 40px minmax(0, 1fr); align-items: center; gap: 8px; padding: 9px 12px; border-top: 1px solid var(--line-soft); font: 700 17px/1.15 var(--f-display); }
.bracket-now li:first-child { border-top: 0; }
.bracket-now a { color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bracket-now a:hover { color: var(--orange-text); }
.bracket-now .bn-n { font: 500 10px/1 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.bracket-now .bn-mid { text-align: center; }
.bracket-now .bn-vs { font: 500 11px/1 var(--f-mono); text-transform: uppercase; color: var(--muted); }
.bracket-now .bn-lost { color: var(--muted); }
@media (max-width: 560px) {
  .bracket-now li { grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr); row-gap: 4px; }
  .bracket-now .bn-n { grid-column: 1 / -1; }
}
/* The status, Copy for Discord and Challonge buttons wrap on phones. */
.bracket-actions { flex-wrap: wrap; }
.bracket-stale { margin: 0 0 18px; padding: 10px 14px; border-left: 3px solid var(--loss); background: var(--surface); color: var(--text-2); }
.finals-teams { margin-top: 12px; }
.finals-teams-title { margin: 0 0 6px; font: 500 11px/1 var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.finals-teams .placings { margin: 0; }

/* ---------- Recruiting ---------- */

/* Long single-word names (some team names are 30 letters) may break so the tables fit phones. */
#fa-list td, #spots-list td { overflow-wrap: break-word; }
.how-join p { margin: 0; color: var(--text-2); }
.how-join .sub-head { margin-top: 0; }
.how-join .join-lock { margin-bottom: 8px; color: var(--text); }

/* ---------- All-time records ---------- */

.alltime-line { margin: 0 0 12px; color: var(--text-2); }
.alltime-line strong { font: 800 22px/1 var(--f-display); color: var(--text); margin-right: 2px; }
/* Match pages: the next scheduled meeting under the head to head count, and what a tag means. */
.next-meet { margin: -4px 0 14px; color: var(--text-2); }
.mscore-why { margin-top: 10px; }

.h2h-form { margin-bottom: 18px; }
.h2h-score {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px 20px;
  padding: 20px 22px;
  margin-bottom: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.h2h-team { font: 800 clamp(22px, 3.4vw, 34px)/1.05 var(--f-display); text-transform: uppercase; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.h2h-team.r { text-align: right; }
.h2h-team:hover { color: var(--orange-text); }
.h2h-num { display: flex; align-items: center; gap: 10px; font: 800 clamp(38px, 6vw, 60px)/1 var(--f-display); }
.h2h-num span { color: var(--faint); }
.h2h-sub { grid-column: 1 / -1; margin: 0; text-align: center; color: var(--muted); font-size: 14px; }

.leaders td { vertical-align: top; }
.lead-v { display: block; font: 800 20px/1.1 var(--f-display); }
.lead-who { display: block; font-size: 15px; }

.records-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 26px; }
.record-title { margin: 0 0 10px; font: 700 18px/1.1 var(--f-display); text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-2); }
.record-block .note { margin-top: 6px; }

/* ---------- Card images ---------- */

.card-save { margin: 12px 10px 0 0; }
.me-box .card-save { margin: 0 0 0 10px; }
.card-share { margin: 12px 0 0; }

/* ---------- Team logo chips ----------
   A small square before team names in tables: the logo on a dark tile (the same ground the banners use),
   or the team's first letter on its card color. */

.tname { display: inline-flex; align-items: center; gap: 9px; max-width: 100%; vertical-align: middle; }
.tchip {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  font: 800 13px/1 var(--f-display);
  text-transform: uppercase;
}
/* A thin edge keeps near-white team colors visible on light rows. */
.tchip { box-shadow: inset 0 0 0 1px rgba(128, 128, 128, 0.35); }
.tchip.logo { background: #1d1a24; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); }
.tchip.logo.light { background: #ecebf0; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); }
.tchip img { display: block; width: 18px; height: 18px; object-fit: contain; }
/* A mark like "11.5" in place of a single letter. */
.tchip.wide { font-size: 9px; letter-spacing: -0.02em; }
.mscore-side .tchip.wide { font-size: 17px; }
.search-kind.search-team .tchip.wide { font-size: 10px; }
.muted .tchip, .match-team.lost .tchip { opacity: 0.55; }
.match-team.b .tname { flex-direction: row-reverse; }
.bm-team { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bm-team .tchip { width: 20px; height: 20px; }
.bm-team .tchip img { width: 16px; height: 16px; }
.bm-row.lost .tchip { opacity: 0.55; }
/* Phones: tables keep their width for the names and scores. */
@media (max-width: 640px) {
  table.data .tchip { display: none; }
  table.data .tname { gap: 0; }
  /* Long team names wrap between words; the tables scroll sideways if a single word is too long. */
  table.data .team-cell { overflow-wrap: break-word; }
}

/* ---------- Home: postseason strip and latest casts ---------- */

.event-section { padding-bottom: 28px; }
.event {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 24px 40px;
  align-items: center;
  padding: 24px 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--orange);
}
.event .eyebrow { margin: 0; }
.event h2 { margin: 4px 0 0; font: 800 clamp(34px, 5vw, 50px)/1 var(--f-display); text-transform: uppercase; letter-spacing: 0.01em; }
.event-sub { margin: 6px 0 0; color: var(--text-2); }
.event-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.event-list h3 { margin: 0 0 8px; font: 500 11px/1 var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.event-list ul { list-style: none; margin: 0; padding: 0; }
.event-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--line-soft);
  font: 700 18px/1.15 var(--f-display);
  letter-spacing: 0.01em;
}
.event-list li:first-child { border-top: 0; }
.event-list a { color: var(--text); text-decoration: none; }
.event-list a:hover { color: var(--orange-text); }
.event-match > .muted { font: 500 11px/1 var(--f-mono); text-transform: uppercase; }
.event-list .place { width: 18px; color: var(--muted); }
.event-list ul + h3 { margin-top: 18px; }
.event-list li.event-match.event-result { grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr); }
.event-score { text-align: center; }
.event-list .event-lost a { color: var(--muted); }
@media (max-width: 760px) { .event { grid-template-columns: minmax(0, 1fr); } }

.casts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 900px) { .casts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cast { display: block; color: var(--text); text-decoration: none; }
.cast-thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.cast-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cast-play {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: rgba(10, 10, 10, 0.78);
  color: #fff;
}
.cast-play svg { width: 14px; height: 14px; }
.cast:hover .cast-thumb { border-color: var(--orange); }
.cast:hover .cast-play { background: var(--orange); color: #111; }
.cast-meta { display: block; margin-top: 10px; font: 500 11px/1 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.cast-title { display: block; margin-top: 5px; font: 700 19px/1.15 var(--f-display); letter-spacing: 0.01em; }
.cast:hover .cast-title { color: var(--orange-text); }

/* Postseason matches on team pages and My EML; Challenger Cup tags in the standings. */
.bracket-mine-wrap { margin-bottom: 36px; }
.bracket-mine + .bracket-mine { margin-top: 24px; }
.tag-cc { margin-left: 8px; border-color: var(--orange); color: var(--orange-text); text-decoration: none; vertical-align: 2px; }
.tag-cc:hover { background: var(--orange); color: #111; }

/* Records: players by number of titles. */
.title-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 0 28px; }
.title-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  grid-template-areas: "n name stars" "n teams stars";
  align-items: center;
  column-gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text);
  text-decoration: none;
}
.title-row:hover { background: var(--hover); }
.title-row:hover strong { color: var(--orange-text); }
.title-count { grid-area: n; font: 800 26px/1 var(--f-display); color: var(--muted); }
.title-row strong { grid-area: name; font: 700 20px/1.1 var(--f-display); letter-spacing: 0.01em; overflow-wrap: anywhere; }
.title-row-teams { grid-area: teams; font-size: 13px; color: var(--muted); }
.title-row-stars { grid-area: stars; display: flex; gap: 4px; }
.title-row-stars .star { width: 24px; height: 24px; }

/* ---------- League history: road to the title ---------- */

.road { margin-top: 16px; }
.road h4 { margin: 0 0 8px; font: 500 11px/1 var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.road-list { list-style: none; margin: 0; padding: 0; }
.road-list li {
  display: grid;
  grid-template-columns: minmax(96px, 9em) minmax(0, 1fr) auto auto;
  align-items: center;
  column-gap: 12px;
  padding: 7px 0;
  border-top: 1px solid var(--line-soft);
}
.road-list li:first-child { border-top: 0; }
.road-round { font: 500 11px/1.2 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.road-opp { color: var(--text-2); overflow-wrap: anywhere; }
.road-opp strong { color: var(--text); font: 700 17px/1.1 var(--f-display); letter-spacing: 0.01em; }
.road-score { font: 800 18px/1 var(--f-display); color: var(--orange-text); }
.road-score.lost { color: var(--muted); }
.road-list .vod-link { margin-left: 0; }
.road .note { margin-top: 6px; }
@media (max-width: 520px) { .road-list li { grid-template-columns: minmax(0, 1fr) auto auto; } .road-round { grid-column: 1 / -1; margin-bottom: 2px; } }

/* ---------- Season pages ---------- */

.section-head h2 .count { margin-left: 10px; font: 500 12px/1 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); vertical-align: middle; }
.subnav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--orange); }
.season-top { padding-bottom: 16px; }
.season-top .subnav { margin-bottom: 0; }
.season-champ { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); margin-bottom: 28px; background: var(--surface); border: 1px solid var(--line); }
.season-champ-banner { min-height: 200px; justify-content: flex-end; gap: 8px; padding: 18px 20px 16px; }
.season-champ-banner .tcard-name { font-size: 46px; }
.season-champ-banner .tcard-name a { color: inherit; text-decoration: none; }
.season-champ-banner .tcard-name a:hover { text-decoration: underline; }
.season-champ-body { display: grid; align-content: center; gap: 10px; padding: 20px 24px; min-width: 0; }
.season-champ-roster { margin: 0; color: var(--text-2); font: 700 19px/1.35 var(--f-display); }
.season-champ-roster a { color: var(--text); }
.season-champ-k { display: block; margin-bottom: 2px; font: 600 11px/1 var(--f-body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.season-champ-vods { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 0; }
.season-champ-vods svg { width: 12px; height: 12px; }
@media (max-width: 760px) { .season-champ { grid-template-columns: minmax(0, 1fr); } .season-champ-banner .tcard-name { font-size: 38px; } }
.week-block { margin-top: 10px; background: var(--surface); border: 1px solid var(--line); }
.week-block summary { display: flex; align-items: baseline; gap: 12px; padding: 12px 16px; cursor: pointer; list-style: none; font: 700 20px/1.1 var(--f-display); text-transform: uppercase; }
.week-block summary::-webkit-details-marker { display: none; }
.week-block summary::before { content: ""; align-self: center; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); }
.week-block[open] summary::before { transform: rotate(45deg); }
.week-block summary .count { margin-left: auto; font: 500 12px/1 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.week-block summary:hover .count { color: var(--text-2); }
.week-block[open] summary { border-bottom: 1px solid var(--line); }
.week-block .table-scroll { border: 0; margin: 0; }

/* ---------- Match pages ---------- */

.score-link { color: inherit; text-decoration: none; }
.score-link:hover b, .score-link:focus-visible b { color: var(--orange-text); text-decoration: underline; text-underline-offset: 3px; }
.mscore {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  padding: 26px 26px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.mscore-side { display: flex; align-items: center; gap: 14px; min-width: 0; }
.mscore-side.right { flex-direction: row-reverse; text-align: right; }
.mscore-side .tchip { width: 52px; height: 52px; flex-shrink: 0; font-size: 24px; }
.mscore-side .tchip img { width: 44px; height: 44px; }
.mscore-team { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mscore-team a { font: 800 clamp(24px, 3.4vw, 38px)/1 var(--f-display); text-transform: uppercase; color: var(--text-2); text-decoration: none; overflow-wrap: anywhere; }
.mscore-side.won .mscore-team a { color: var(--text); }
.mscore-team a:hover { color: var(--orange-text); }
.mscore-won { font: 500 11px/1 var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--orange-text); }
.mscore-num { display: flex; align-items: center; gap: 12px; font: 800 clamp(44px, 7vw, 72px)/1 var(--f-display); }
.mscore-num span { color: var(--muted); font-size: 0.6em; }
.mscore-num.ff { font-size: 22px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.mscore-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 14px 0 0; color: var(--text-2); }
.mrounds { max-width: 560px; margin-top: 22px; }
.mrounds th.r { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.total-row td { border-top: 1px solid var(--line-strong); font-weight: 600; color: var(--text-2); }
tr.is-current td { background: var(--target); }
.video-box { position: relative; aspect-ratio: 16 / 9; max-width: 960px; background: #000; border: 1px solid var(--line); }
.video-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-lite { position: absolute; inset: 0; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: #000; cursor: pointer; }
.video-lite img { display: block; width: 100%; height: 100%; object-fit: cover; }
.video-lite .cast-play { left: 50%; top: 50%; bottom: auto; width: 68px; height: 68px; transform: translate(-50%, -50%); }
.video-lite .cast-play svg { width: 26px; height: 26px; }
.video-lite:hover .cast-play, .video-lite:focus-visible .cast-play { background: var(--orange); color: #111; }
/* Review controls under a playing video (app.js videoControls). */
.video-wrap { max-width: 960px; }
.video-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.video-controls .btn-small { min-width: 44px; }
.video-speed { height: 32px; padding: 0 8px; font: inherit; font-size: 13px; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); }
.video-volume { width: 96px; accent-color: var(--orange); }
.video-time { margin-left: auto; font: 500 13px/1 var(--f-mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.plain-links { margin: 14px 0 0; padding-left: 18px; }
@media (max-width: 640px) {
  .mscore { grid-template-columns: minmax(0, 1fr) auto; gap: 14px 16px; padding: 18px; }
  .mscore-side.right { flex-direction: row; text-align: left; }
  .mscore-num { grid-column: 2; grid-row: 1 / span 2; flex-direction: column; gap: 0; }
  .mscore-num span { display: none; }
  .mscore-side .tchip { width: 36px; height: 36px; font-size: 17px; }
  .mscore-side .tchip img { width: 30px; height: 30px; }
}

/* ---------- Rivalries ---------- */

.rv-pair { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.rv-vs { font: 500 11px/1 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* ---------- League history: timeline ----------
   Oldest season on the left. Each completed season is marked by its champion star; the season under way
   by an open ring. Phones get the same list running down the page. */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 0 14px;
  position: relative;
}
.timeline::before { content: ""; position: absolute; left: 24px; right: 0; top: 24px; height: 2px; background: var(--line-strong); }
.tl-item { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.tl-mark { position: relative; z-index: 1; display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 10px; background: var(--bg); }
.tl-mark .star { width: 44px; height: 44px; filter: drop-shadow(0 0 6px color-mix(in srgb, currentColor 50%, transparent)); }
.tl-ring { width: 22px; height: 22px; border: 3px solid var(--orange); border-radius: 50%; box-sizing: border-box; background: var(--bg); }
.tl-season { font: 800 24px/1 var(--f-display); text-transform: uppercase; color: var(--text); text-decoration: none; }
.tl-season:hover { color: var(--orange-text); }
.tl-when { font: 500 11px/1.3 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.tl-label { margin-top: 8px; font: 600 11px/1 var(--f-body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.tl-champ { font: 700 19px/1.15 var(--f-display); color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
a.tl-champ:hover { color: var(--orange-text); }
.tl-next { color: var(--orange-text); }
@media (max-width: 860px) {
  .timeline { grid-auto-flow: row; grid-auto-columns: auto; gap: 18px; }
  .timeline::before { left: 23px; right: auto; top: 24px; bottom: 24px; width: 2px; height: auto; }
  .tl-item { display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 16px; row-gap: 2px; align-items: baseline; }
  .tl-mark { grid-row: 1 / span 4; margin: 0; align-self: start; }
  .tl-item > :not(.tl-mark) { grid-column: 2; }
  .tl-label { margin-top: 4px; }
}

/* ---------- Team page: next matches ---------- */

.next-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); }
.next-list li { display: grid; grid-template-columns: minmax(0, 180px) minmax(0, 1fr) auto auto; align-items: center; gap: 8px 16px; padding: 12px 16px; border-top: 1px solid var(--line-soft); }
.next-list li:first-child { border-top: 0; }
.next-when { font: 700 17px/1.2 var(--f-display); }
.next-opp { font: 700 19px/1.2 var(--f-display); display: flex; align-items: center; gap: 8px; min-width: 0; }
.next-opp .tname a { color: var(--text); text-decoration: none; }
.next-h2h { font: 500 12px/1 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
@media (max-width: 640px) { .next-list li { grid-template-columns: minmax(0, 1fr) auto; } .next-when { grid-column: 1 / -1; } }

/* Season pages: the season in numbers, under the season tabs. */
.season-facts { display: flex; flex-wrap: wrap; gap: 6px 26px; margin: 18px 0 0; color: var(--text-2); }
.season-facts:empty { display: none; }
.season-facts b { font: 800 24px/1 var(--f-display); color: var(--text); margin-right: 2px; }
.week-block summary .week-dates { font: 500 12px/1 var(--f-mono); letter-spacing: 0.04em; color: var(--muted); text-transform: none; }

/* ---------- Print ----------
   Pages, the rulebook above all, print as plain black text on white without the menu, search or footer. */

@media print {
  :root, :root[data-theme] { --bg: #fff; --bg-deep: #fff; --surface: #fff; --surface-2: #fff; --text: #000; --text-2: #222; --muted: #444; --faint: #555; --line: #ccc; --line-soft: #ddd; --line-strong: #999; }
  body { background: #fff; color: #000; }
  .site-header, .site-footer, .skip-link, .subnav, .site-search, .rules-search, .controls, .btn, .card-save, .card-share, .me-box, .video-box, .video-controls, .cast-play { display: none !important; }
  .section, .page-head .wrap { padding-block: 12px; }
  a { color: #000; text-decoration: none; }
  .rule, .rule-section h2, tr { break-inside: avoid; }
  .rule-section { break-before: auto; }
  .table-scroll { overflow: visible; }
}


/* ---------- Loading boxes ----------
   While a list loads, a few still placeholder rows stand in for it (no animation). */

.state.is-loading { padding: 18px 20px 20px; text-align: left; color: var(--muted); }
.state.is-loading::before {
  content: "";
  display: block;
  height: 86px;
  margin-bottom: 14px;
  background: repeating-linear-gradient(to bottom, var(--surface-2) 0 14px, transparent 14px 36px);
  -webkit-mask-image: linear-gradient(to right, #000 0 72%, transparent 72%);
  mask-image: linear-gradient(to right, #000 0 72%, transparent 72%);
}

/* Cut corners: the diagonal edge gets the same thin line as the rest of the border. */
.panel-dark { position: relative; }
.panel-dark::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: var(--cut);
  height: var(--cut);
  background: linear-gradient(to top right, transparent calc(50% - 1px), var(--line) calc(50% - 1px), var(--line) calc(50% + 1px), transparent calc(50% + 1px));
  pointer-events: none;
}
.match-score .score-link:hover, .match-score .score-link:focus-visible { color: var(--orange-text); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Touch screens ----------
   Links that sit in table cells and lists are short; on touch screens they get extra hit area above and
   below (padding on an inline link does not move anything around it). */

@media (pointer: coarse) {
  table.data .team-cell a, .tname a, .spot-list .tname a, .match-team a, .trow-names a, .rv-pair a { padding-block: 9px; }
  .cal-link { padding-block: 8px; margin-block: -5px; }
  .check { min-height: 40px; }
  .check input { width: 20px; height: 20px; }
  .site-footer li a { display: inline-block; padding-block: 5px; }
}

/* ---------- Team pages: finish by season ---------- */

.rank-chart svg { display: block; width: 100%; height: auto; max-width: 640px; overflow: visible; }
.rank-chart .rc-top { stroke: var(--line-strong); stroke-dasharray: 3 4; }
.rank-chart .rc-line { fill: none; stroke: var(--orange); stroke-width: 2.5; stroke-linejoin: round; }
.rank-chart .rc-dot { fill: var(--orange); stroke: var(--bg); stroke-width: 2; }
.rank-chart .rc-dot.live { fill: var(--bg); stroke: var(--orange); stroke-width: 2.5; }
.rank-chart .rc-val { fill: var(--text); font: 700 15px var(--f-display); text-anchor: middle; }
.rank-chart .rc-axis { fill: var(--muted); font: 500 11px var(--f-mono); letter-spacing: 0.06em; text-anchor: middle; }
.rank-chart .rc-axis:first-of-type { text-anchor: start; }

/* The viewer's own time under an Eastern time (only shown when it differs). */
.your-time { display: block; margin-top: 2px; font: 500 11px/1.3 var(--f-mono); letter-spacing: 0.04em; text-transform: none; color: var(--orange-text); }
.eyebrow .your-time { letter-spacing: 0.06em; }
.next-when .your-time { display: inline; margin: 0 0 0 6px; }
.season-recap { max-width: 760px; margin: 14px 0 0; font-size: 17px; line-height: 1.55; color: var(--text-2); }
.season-recap:empty { display: none; }
.season-recap a { color: var(--text); font-weight: 600; }
.search-kind.search-team { border: 0; }
.search-kind.search-team .tchip { width: 26px; height: 26px; font-size: 14px; }
.search-kind.search-team .tchip img { width: 21px; height: 21px; }
.season-steps { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.to-top { margin: 10px 0 0; text-align: right; font: 500 11px/1 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.to-top a { color: var(--muted); text-decoration: none; display: inline-block; padding: 6px 0; }
.to-top a:hover { color: var(--orange-text); }
.rule-section.is-hidden .to-top { display: none; }
@media print { .to-top { display: none; } }

/* Rules: a rule or section named in the revision list. */
.rule-changed { display: inline-block; margin-left: 8px; padding: 2px 6px; vertical-align: 2px; font: 500 10px/1.2 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--orange-text); border: 1px solid currentColor; cursor: help; }
.rule-section h2 .rule-changed { vertical-align: 6px; }
/* The tag links to its row in the revision list. */
a.rule-changed, .rule-section > h2 a.rule-changed { color: var(--orange-text); text-decoration: none; cursor: pointer; }
a.rule-changed:hover { background: var(--hover); }
#revision-list tr:target td { background: var(--hover); }

/* Sortable table headings: the heading text is the button; a small caret shows the active order. */
.sort-btn { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; }
.sort-btn:hover { color: var(--text); }
.sort-btn:focus-visible { outline: 2px solid var(--focus, var(--orange)); outline-offset: 3px; }
th[aria-sort] .sort-btn { color: var(--text); }
th[aria-sort] .sort-btn::after { content: ''; border: 4px solid transparent; border-top-color: currentColor; margin-top: 4px; }
th[aria-sort="ascending"] .sort-btn::after { border-top-color: transparent; border-bottom-color: currentColor; margin-top: -4px; }
table.data th.r .sort-btn { flex-direction: row-reverse; }

/* Standings: biggest rating moves on the latest update. */
.moves { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 28px; margin: 0 0 28px; padding: 14px 18px; border: 1px solid var(--line); background: var(--surface); }
.moves-title { margin: 0; font: 600 11px/1.4 var(--f-body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); flex-basis: 100%; }
.moves-group { display: flex; align-items: baseline; gap: 12px; }
.moves-label { font: 500 11px/1 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); min-width: 36px; }
.moves ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.moves li { font-family: var(--f-display); font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 6px; }
.moves li a { color: var(--text); text-decoration: none; }
.moves li a:hover { color: var(--orange-text); }
.mscore-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 0; }

/* ---------- Visual review fixes ---------- */

/* Short pages: the footer sits at the bottom of the window, with no band of page color under it. */
body { min-height: 100vh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; }

/* Player card: the status column gets the room its word needs ("Registered", "League sub"). */
.pcard-stats { grid-template-columns: repeat(3, minmax(0, 0.8fr)) minmax(0, 1.45fr); }
.pcard-stats .v { overflow: hidden; text-overflow: ellipsis; }

/* Team cards in one row end at the same height, with the footer at the bottom. */
.team-grid { align-items: stretch; }
.tcard-foot { margin-top: auto; }

/* Brackets: short lines join each match to the next round. */
.bracket-col:not(:last-child) .bm, .bracket-col:not(:first-child) .bm { position: relative; }
.bracket-col:not(:last-child) .bm::after,
.bracket-col:not(:first-child) .bm::before { content: ""; position: absolute; top: 50%; width: 11px; border-top: 1px solid var(--line-strong); }
.bracket-col:not(:last-child) .bm::after { left: 100%; }
.bracket-col:not(:first-child) .bm::before { right: 100%; }

/* Match page: the loser's side keeps an empty "Winner" line so both names sit level. */
.mscore-won.is-blank { visibility: hidden; }

/* Results: the series score keeps one position whatever the round scores after it. */
table.data td.score-cell { text-align: left; }
.score-cell b { display: inline-block; min-width: 2.3em; text-align: right; }

/* Home latest results: long names end with an ellipsis instead of wrapping. */
.match-team .tname { min-width: 0; }
.match-team .tname a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Sideways tab strips on phones fade at the right edge, so a cut word reads as "scroll for more". */
@media (max-width: 760px) {
  .subnav { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent); }
}

/* Recruiting and Find a team: the tier sits under the team name in a quieter style. */
.team-cell > .tier { display: flex; width: max-content; margin-top: 4px; font-family: var(--f-body); font-weight: 500; font-size: 12px; color: var(--text-2); }
.tag-off { border-style: dashed; color: var(--muted); }
.status-need { margin-left: 2px; font-size: 13px; }

/* League history: the champion's road keeps a fixed slot for the VOD button so scores line up. */
.road-list li { grid-template-columns: minmax(96px, 9em) minmax(0, 1fr) auto 28px; }
@media (max-width: 520px) { .road-list li { grid-template-columns: minmax(0, 1fr) auto 28px; } }
.tl-when { min-height: 2.6em; }
@media (max-width: 760px) { .tl-when { min-height: 0; } }

/* Cards with rule links: the links line up at the bottom of each card. */
.fact { display: flex; flex-direction: column; }
.fact > p:not(.refs) { margin-bottom: 12px; }
.fact .refs { margin: auto 0 0; padding-top: 4px; }
.steps li { display: flex; flex-direction: column; }
.steps li > p:last-child:has(.ref) { margin-top: auto; margin-bottom: 0; padding-top: 6px; }

/* Rivalries: the two names either side of a fixed "vs", and quieter links in the table. */
.rv-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 4px 10px; }
.rv-pair > :last-child { justify-self: start; }
#rivalries-list table.data td a { text-decoration: none; }
#rivalries-list table.data td a:hover { text-decoration: underline; }

/* Champion stars next to a name keep a little space from it. */
.champ.compact { margin-left: 6px; padding-left: 0; }

/* Postseason: the status tag matches the button beside it, and the watch buttons share one width. */
.bracket-actions .bracket-status { padding: 11px 12px; font-size: 11px; line-height: 1; }
.watch-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); flex: 1 1 720px; }
.watch-links .btn { min-width: 0; }

/* Resources: the calendar picture is a smaller linked copy under the dates. */
.calendar-figure img { max-width: 420px; width: 100%; }

/* Season page: Finals still to come. */
.finals-wait { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; padding: 22px 24px; border: 1px dashed var(--line-strong); background: var(--surface); }
.finals-wait .eyebrow { margin: 0 0 6px; }
.finals-wait-title { margin: 0 0 4px; font: 800 26px/1.05 var(--f-display); text-transform: uppercase; }
.finals-wait .muted { margin: 0; }

/* Standings: the Master tier and Ladder tables share column positions on wide screens. */
@media (min-width: 1101px) {
  table.standings.full { table-layout: fixed; }
  table.standings.full th:nth-child(1) { width: 64px; }
  table.standings.full th:nth-child(3) { width: 140px; }
  table.standings.full th:nth-child(4), table.standings.full th:nth-child(5), table.standings.full th:nth-child(9) { width: 100px; }
  table.standings.full th:nth-child(6), table.standings.full th:nth-child(7) { width: 88px; }
  table.standings.full th:nth-child(8) { width: 190px; }
}
.group-row .week-sum { margin-left: 14px; font-family: var(--f-body); font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--muted); }
@media (max-width: 640px) { .group-row .week-sum { display: block; margin: 3px 0 0; } }
/* Long video titles with no spaces wrap inside their card instead of widening the page. */
.cast-title, .cast-meta { overflow-wrap: anywhere; }

/* The EML mark: the lighter copy on the dark theme, the original on the light theme. */
.mark-light { display: none !important; }
:root[data-theme="light"] .mark-light { display: block !important; }
:root[data-theme="light"] .mark-dark { display: none !important; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .mark-light { display: block !important; }
  :root:not([data-theme="dark"]) .mark-dark { display: none !important; }
}

/* Team page: the match calendar menu beside the card buttons. */
.cal-menu { position: relative; display: inline-block; margin: 12px 0 0 10px; vertical-align: top; }
.cal-menu > summary { list-style: none; cursor: pointer; }
.cal-menu > summary::-webkit-details-marker { display: none; }
.cal-menu[open] > summary { border-color: var(--orange); }
.cal-menu-body { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; width: min(280px, 80vw); display: flex; flex-direction: column; gap: 9px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); }
.cal-menu-body p { margin: 0 0 2px; font-size: 13px; color: var(--muted); }
.cal-menu-body a { font-weight: 600; }
/* On phones the menu opens below the buttons, in the page, so it always fits the screen. */
@media (max-width: 520px) {
  .cal-menu { display: block; margin-left: 0; }
  .cal-menu > summary { display: inline-flex; }
  .cal-menu-body { position: static; width: auto; margin-top: 8px; box-shadow: none; }
}
@media print { .cal-menu { display: none !important; } }

/* Match previews: both teams side by side. */
.preview-when { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin: 0; font-size: 17px; }
.preview-when strong { font: 800 26px/1.1 var(--f-display); text-transform: uppercase; }
.preview-sides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.preview-side { min-width: 0; }
.preview-side .stat-list { margin-top: 14px; }
@media (max-width: 800px) { .preview-sides { grid-template-columns: minmax(0, 1fr); } }
.preview-notes { margin: 0; padding-left: 1.2em; }
.preview-notes li { margin-bottom: 6px; color: var(--text-2); }

/* Find a team / Recruiting: whether players can join a team right now. */
.join-now { display: flex; flex-direction: column; gap: 4px; margin: 0 0 24px; padding: 14px 18px; border-left: 3px solid var(--orange); background: var(--surface); }
.join-now strong { font: 800 18px/1.1 var(--f-display); text-transform: uppercase; letter-spacing: 0.02em; }
.join-now span { color: var(--text-2); font-size: 15px; }
.grid-2 .join-now { margin-bottom: 14px; }

/* Team card heads: the Master tag carries the gold Master star (an outline keeps it clear on light team colors). */
.master-star { display: inline-block; width: 12px; height: 12px; margin-right: 5px; vertical-align: -1.5px; }
.tcard-head .master-star { width: 13px; height: 13px; }
.bm-n { display: flex; justify-content: space-between; gap: 8px; }
.bm-preview { font: 500 10px/1 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--orange-text); text-decoration: none; }
.bm-preview:hover { text-decoration: underline; }

/* Standings: the Challenger Cup places (Rule 12.2). */
table.data tr.cup-line td { border-bottom: 1px dashed var(--orange); }
table.data.is-sorted tr.cup-line td { border-bottom: 1px solid var(--line-soft); }

/* A count with a small action beside it. */
.count-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.count-row .result-count { margin: 0; }
.btn-small { padding: 7px 12px; font-size: 12px; }

/* My EML: the captain's reminders under the scheduling deadline. */
.me-checks { list-style: none; margin: -6px 0 18px; padding: 0; display: grid; gap: 8px; }
.me-checks li { padding: 10px 14px; background: var(--surface); border-left: 3px solid var(--line-strong); font-size: 15px; color: var(--text-2); }
/* My EML: short lists (open spots for free agents, past seasons). */
.me-list { list-style: none; margin: 0 0 12px; padding: 0; }
.me-list li { padding: 7px 0; border-top: 1px solid var(--line-soft); font-size: 15px; }
.me-list li:first-child { border-top: 0; }
.me-free .record-title { margin-top: 14px; }

/* Resources: glossary of league terms. */
.glossary { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 0; margin: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.glossary > div { padding: 14px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.glossary dt { font: 800 18px/1.1 var(--f-display); text-transform: uppercase; margin-bottom: 6px; }
.glossary dd { margin: 0; color: var(--text-2); font-size: 15px; }
.glossary .refs { white-space: nowrap; }
.glossary dt a { color: inherit; text-decoration: none; }
.glossary dt a:hover { color: var(--orange-text); }
.glossary > div:target { box-shadow: inset 3px 0 0 var(--orange); scroll-margin-top: 90px; }

/* Echo Hub tools: the Ready for EML check and the team name check. */
.tool-form { margin-bottom: 12px; }
.ready-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.ready-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 10px 14px; background: var(--surface); border-left: 3px solid var(--line-strong); color: var(--text-2); }
.ready-list li.is-ok { border-left-color: var(--win); }
.ready-list li.is-ok .tag { border-color: var(--win); color: var(--win); }
.ready-list li.is-todo { border-left-color: var(--orange); }
.ready-list li.is-todo .tag { border-color: var(--orange); color: var(--orange-text); }
.ready-list .tag { margin-right: 4px; }
.name-free { margin: 0 0 12px; padding: 10px 14px; background: var(--surface); border-left: 3px solid var(--win); color: var(--text-2); }
.dir-usual { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
@media print {
  .mark-dark { display: none !important; }
  .mark-light { display: block !important; }
}

/* Less movement while pages load: the head's meta line keeps its height before its text arrives, and the
   main area fills most of the window so the footer does not jump off the screen once the data is in. */
.page-head-meta .meta-line { min-height: 1.55em; }
body > main { min-height: 82vh; }
/* The card name is a heading in lists of cards and plain text on a team or player's own page (the page
   title already names them). */
p.tcard-name { margin: 0; }

/* Sortable headings: a faint caret shows they sort before one is picked, and the button is a fair tap size. */
.sort-btn { padding-block: 4px; min-height: 24px; }
th:not([aria-sort]) .sort-btn::after { content: ''; border: 4px solid transparent; border-top-color: currentColor; margin-top: 4px; opacity: 0.35; }

/* ---------- Visual review fixes, second round ---------- */

/* Standings: the Challenger Cup tag sits under the name in the tag's own color; phones get its short form. */
table.data .team-cell a.tag-cc { display: table; margin: 4px 0 0 31px; padding-block: 2px; color: var(--orange-text); }
table.data .team-cell a.tag-cc:hover { color: #111; }
@media (max-width: 640px) { table.data .team-cell a.tag-cc { margin: 3px 0 0; padding: 1px 5px; } }

/* The gold Master star beside a name, on phones only (the Tier column is hidden there). */
.show-sm { display: none; }
.master-mark { margin-left: 6px; vertical-align: 1px; }
.master-mark .master-star { width: 13px; height: 13px; margin: 0; }
@media (max-width: 640px) { .show-sm { display: inline-block; } }

/* Assigned matches: both team columns get the same width, and the status may wrap on phones. */
#assigned-list table { table-layout: fixed; }
#assigned-list th:nth-child(2) { width: 44px; }
#assigned-list th:nth-child(4) { width: 112px; }
#assigned-list th:nth-child(5) { width: 70px; }
@media (max-width: 640px) {
  #assigned-list table { table-layout: auto; }
  table.data td.assigned-status { white-space: normal; width: 1%; font-size: 12px; line-height: 1.2; }
}

/* Team card footer: a small label and a large value, like the stat row above it. */
.tcard-foot .k { font: 600 9.5px/1.2 var(--f-body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.tcard-foot .v { font: 800 20px/1 var(--f-display); letter-spacing: 0; text-transform: none; color: var(--text); }

/* Finish-by-season chart: space above its heading, and readable labels when the chart shrinks on phones. */
.rank-chart-box .sub-head { margin-top: 28px; }
@media (max-width: 640px) {
  .rank-chart .rc-axis { font-size: 18px; }
  .rank-chart .rc-val { font-size: 24px; }
}

/* Phones: the VOD button sits beside the score instead of under it. */
@media (max-width: 640px) { .vod-inline { display: inline-flex; vertical-align: middle; margin: 0 0 0 8px; } }

/* League history: Finals places line up whatever the longest label ("Runner-up"). */
.podium .place { flex: 0 0 84px; }

/* Text boxes and selects share one height, so the labels above them line up. */
.field input[type="search"], .field input[type="text"], .field select { height: 42px; box-sizing: border-box; }

/* A long dropdown with a box to type in (app.js searchSelects): the box takes the dropdown's place, with a
   chevron so it still reads as a choice, and the narrowed list opens under it. */
.select-search-native { display: none !important; }
.select-search { position: relative; display: inline-block; width: 17em; max-width: 100%; vertical-align: middle; }
.select-search::after { content: ""; position: absolute; right: 13px; top: 50%; width: 6px; height: 6px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-75%) rotate(45deg); pointer-events: none; }
/* Plain looks first, so a form's own text box rules (.field, .profile-form) win; the chevron's room always. */
.select-search-box { box-sizing: border-box; width: 100%; font: inherit; font-size: 15px; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 0; padding: 6px 8px; text-overflow: ellipsis; }
.select-search input.select-search-box { width: 100%; padding-right: 32px; }
.select-search input.select-search-box:disabled { opacity: .55; }
.select-search-list { position: absolute; left: 0; top: 100%; z-index: 60; box-sizing: border-box; min-width: 100%; width: max-content; max-width: min(30em, calc(100vw - 32px)); max-height: 18em; overflow-y: auto; margin: 2px 0 0; padding: 4px 0; list-style: none; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: 0 10px 28px rgba(0, 0, 0, .35); }
.select-search-option { padding: 7px 12px; font-size: 15px; line-height: 1.35; color: var(--text); cursor: pointer; }
.select-search-option:hover, .select-search-option.is-active { background: var(--hover); }
.select-search-option[aria-selected="true"] { font-weight: 600; }
.select-search-group { padding: 9px 12px 3px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.select-search-none { padding: 7px 12px; font-size: 15px; color: var(--muted); }
.profile-form .select-search, .tpl-fields .select-search, .calc-table .select-search, .bd-insp .select-search { width: 100%; }
.profile-cast .select-search { width: min(34em, 100%); }

/* Counts beside headings never split from their word. */
.sub-head .count, .section-head h2 .count { white-space: nowrap; }

/* Challenger Cup first-round lists: "vs" and the second team line up from row to row. */
.event-list li.event-match { display: grid; grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr); }
.event-list li.event-match > .muted { text-align: center; }

/* Team page card buttons share a row with even spacing. */
.card-share { margin: 12px 10px 0 0; }
.cal-menu { margin-left: 0; }

/* A stat list with an odd number of items: the last one takes the full width. */
.stat-list > div:last-child:nth-child(odd) { grid-column: 1 / -1; border-right: 0; }

/* Records: the detail line under a record, in body type. */
.rec-detail { font: 500 12px/1.3 var(--f-body); color: var(--muted); margin-top: 2px; text-transform: none; }
/* A record's score links to its match page, quietly until hovered (as score links do). */
table.data .rec-detail a { color: inherit; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 2px; }
table.data .rec-detail a:hover, table.data .rec-detail a:focus-visible { color: var(--orange-text); text-decoration-color: currentColor; }

/* Rules on phones: the rule number goes above its text, so nested rules keep their width. */
@media (max-width: 520px) {
  .rule { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .rule .rn { padding-top: 0; }
}

/* Phones: stacked buttons in a group share one width. */
@media (max-width: 480px) {
  .hero-actions .btn, .champ-links .btn { flex: 1 1 100%; justify-content: center; }
}
.nowrap { white-space: nowrap; }

/* Conduct: the stacked AP tier tables and the two infraction tables keep their columns in line. */
@media (min-width: 641px) {
  table.ap-table { table-layout: fixed; }
  table.ap-table th:nth-child(2) { width: 120px; }
  table.ap-table th:nth-child(3) { width: 80px; }
  table.ap-table th:nth-child(4) { width: 260px; }
}
table.infraction-table th:first-child { width: 45%; }

/* ---------- Calendar page ---------- */

.cal-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px 40px; margin-bottom: 28px; }
@media (max-width: 900px) { .cal-top { grid-template-columns: minmax(0, 1fr); } }
.cal-next { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); background: var(--surface); }
.cal-next li { display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr) auto; align-items: start; gap: 4px 14px; padding: 12px 16px; border-top: 1px solid var(--line-soft); }
.cal-next li:first-child { border-top: 0; }
.cal-next .cal-when strong { font: 800 17px/1.15 var(--f-display); text-transform: uppercase; }
.cal-next .cal-when .your-time { display: block; }
.cal-next .cal-what strong { display: block; }
.cal-next .cal-what .muted { font-size: 14px; }
@media (max-width: 520px) {
  .cal-next li { grid-template-columns: minmax(0, 1fr) auto; }
  .cal-next .cal-what { grid-column: 1 / -1; grid-row: 2; }
}
.tag-now { border-color: var(--orange); color: var(--orange-text); margin-left: 8px; }
.cal-rules { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.cal-rules li { padding: 10px 14px; background: var(--surface); border-left: 3px solid var(--line-strong); color: var(--text-2); font-size: 15px; }
.cal-rules li strong { display: block; color: var(--text); font: 800 16px/1.2 var(--f-display); text-transform: uppercase; margin-bottom: 2px; }
.cal-legend { margin: 0 0 8px; }
.cal-key { display: inline-block; width: 14px; height: 14px; margin-right: 7px; vertical-align: -2px; border: 1px solid var(--line-strong); }
.cal-key.play { background: var(--surface-2); }
.cal-key.brk { background: repeating-linear-gradient(135deg, var(--line) 0 2px, transparent 2px 6px); }
.cal-key.lock { border: 0; box-shadow: inset 0 3px 0 var(--t-diamond); }
.cal-key.deadline { background: var(--orange); border-color: var(--orange); }
.cal-key.due { background: var(--loss); border-color: var(--loss); }
.cal-key.keydate { background: var(--t-master-star); border-color: var(--t-master-star); }
.cal-subscribe { margin: 0 0 22px; color: var(--text-2); font-size: 15px; }
#cal-earlier { margin-bottom: 18px; }

.cal-month { margin-bottom: 30px; }
.cal-grid { width: 100%; border-collapse: collapse; table-layout: fixed; min-width: 560px; }
.cal-grid th { font: 600 11px/1 var(--f-body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding: 8px 6px; text-align: left; }
.cal-grid th.cal-wk, .cal-grid thead th:first-child { width: 64px; }
.cal-grid th.cal-wk { font: 500 10px/1.2 var(--f-mono); letter-spacing: 0.06em; color: var(--faint); vertical-align: top; padding-top: 10px; }
.cal-grid td { height: 88px; vertical-align: top; padding: 6px 7px; border: 1px solid var(--line-soft); background: var(--bg); }
.cal-grid td.cal-out { background: transparent; border-color: transparent; }
.cal-grid td.play { background: var(--surface-2); }
.cal-grid td.brk { background: repeating-linear-gradient(135deg, var(--line-soft) 0 2px, transparent 2px 8px); }
.cal-grid td.lock { box-shadow: inset 0 3px 0 var(--t-diamond); }
.cal-grid td.past { opacity: 0.5; }
.cal-grid td.today { outline: 2px solid var(--orange); outline-offset: -2px; opacity: 1; }
.cal-n { display: block; font: 800 16px/1 var(--f-display); color: var(--text-2); margin-bottom: 5px; }
.cal-grid td.today .cal-n { color: var(--orange-text); }
.cal-tag { display: block; margin-top: 3px; padding: 2px 5px; font: 600 11px/1.25 var(--f-body); color: var(--text); border-left: 3px solid var(--line-strong); background: var(--surface); }
.cal-tag.deadline { border-left-color: var(--orange); }
.cal-tag.due { border-left-color: var(--loss); }
.cal-tag.keydate { border-left-color: var(--t-master-star); }
a.cal-tag { text-decoration: none; }
a.cal-tag:hover { text-decoration: underline; }
.cal-grid th.cal-wk a { color: var(--text-2); text-decoration: none; }
.cal-grid th.cal-wk a:hover { color: var(--orange-text); text-decoration: underline; }
/* Phones: day squares keep only a colored mark per item; the key above says what each color is. */
@media (max-width: 640px) {
  .cal-grid { min-width: 0; }
  .cal-grid th.cal-wk, .cal-grid thead th:first-child { width: 34px; }
  .cal-grid th { padding: 6px 2px; font-size: 10px; letter-spacing: 0.04em; }
  .cal-grid th.cal-wk { font-size: 9px; }
  .cal-grid td { height: 52px; padding: 4px; }
  .cal-n { font-size: 14px; margin-bottom: 3px; }
  .cal-tag { display: inline-block; width: 8px; height: 8px; margin: 2px 2px 0 0; padding: 0; font-size: 0; border: 0; background: var(--line-strong); }
  .cal-tag.deadline { background: var(--orange); }
  .cal-tag.due { background: var(--loss); }
  .cal-tag.keydate { background: var(--t-master-star); }
}
.cal-list tr.past td { opacity: 0.55; }
.cal-list tr.now td { background: var(--hover); }

/* Ten menu items (the last links Echo Hub): a little less spacing on mid-size screens keeps them on one line. */
@media (max-width: 1440px) and (min-width: 1241px) {
  .site-nav a { padding-inline: 5px; font-size: 15px; letter-spacing: 0.03em; white-space: nowrap; }
  .site-nav .btn { margin-left: 8px; }
}

/* Team page: the opponent beaten most and the one lost to most. */
.foe-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 18px 0 4px; }
.foe-pair > div { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); font: 700 17px/1.1 var(--f-display); }
.foe-pair .label { flex-basis: 100%; font: 600 10px/1 var(--f-body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.foe-pair a { color: var(--text); text-decoration: none; }
.foe-pair .muted { font-family: var(--f-mono); font-size: 13px; font-weight: 500; }

/* Standings: Master tier head-to-head grid. */
.h2h-grid { margin-top: 4px; width: auto; min-width: 100%; }
.h2h-grid thead th { text-align: center; }
.h2h-grid thead th .tchip { margin: 0 auto; }
.h2h-grid td { font-size: 16px; }
.h2h-grid td.lead { color: var(--win); font-weight: 700; }
.h2h-grid td.trail { color: var(--loss); }
@media (max-width: 640px) { .h2h-grid thead th .tchip { display: inline-grid !important; } }

/* Home: the offseason panel (after Finals, before the next season). */
.offseason { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; padding: 24px 26px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--orange); }
.offseason h2 { font: 800 clamp(26px, 3.4vw, 38px)/1.05 var(--f-display); text-transform: uppercase; margin: 4px 0 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.offseason h2 a { color: var(--text); text-decoration: none; }
.offseason h2 .star { width: 30px; height: 30px; }
.offseason .muted { margin: 0; }
.offseason-links { display: flex; flex-wrap: wrap; gap: 10px; }

/* Rules: the match night summary above the rulebook. */
.match-night { margin: 0 0 28px; border: 1px solid var(--line); border-left: 3px solid var(--orange); background: var(--surface); }
.match-night > summary { list-style: none; cursor: pointer; padding: 14px 18px; }
.match-night > summary::-webkit-details-marker { display: none; }
.match-night > summary h2 { display: inline; font: 800 22px/1.1 var(--f-display); text-transform: uppercase; }
.match-night > summary::after { content: 'Hide'; float: right; font: 500 11px/2 var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.match-night:not([open]) > summary::after { content: 'Show'; }
.match-night ul { list-style: none; margin: 0; padding: 0 18px 14px; display: grid; gap: 10px; }
.match-night li { color: var(--text-2); font-size: 15px; line-height: 1.55; }
.match-night li strong { display: block; color: var(--text); font: 800 15px/1.2 var(--f-display); text-transform: uppercase; letter-spacing: 0.02em; }

/* ---------- Calculators ---------- */
.calc-servers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 800px) { .calc-servers { grid-template-columns: minmax(0, 1fr); } }
.calc-server { margin: 0; padding: 14px 16px 12px; border: 1px solid var(--line); background: var(--surface); min-width: 0; }
.calc-server.is-pick { border-color: var(--win); box-shadow: inset 3px 0 0 var(--win); }
.calc-server legend { padding: 0 6px; }
.calc-name { font: 800 18px/1.2 var(--f-display); text-transform: uppercase; color: var(--text); background: transparent; border: 0; border-bottom: 1px dashed var(--line-strong); padding: 2px 0; width: 12em; max-width: 100%; }
.calc-name:focus { border-bottom-color: var(--focus, var(--orange)); }
.calc-team { display: grid; grid-template-columns: 4.5em minmax(0, 1fr) 5.5em; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-soft); }
.calc-team-name { font: 600 11px/1.2 var(--f-body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.calc-pings { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.calc-pings input, .calc-table input, .calc-table select { width: 100%; min-width: 0; font: inherit; font-size: 15px; color: var(--text); background: var(--bg); border: 1px solid var(--line-strong); border-radius: 0; padding: 6px 6px; height: 38px; box-sizing: border-box; }
@media (max-width: 520px) { .calc-pings { grid-template-columns: repeat(3, minmax(0, 1fr)); } .calc-team { grid-template-columns: minmax(0, 1fr) 5em; } .calc-team-name { grid-column: 1 / -1; } }
.calc-avg { font-size: 13px; color: var(--muted); text-align: right; }
.calc-score { margin: 8px 0 0; font: 600 11px/1.2 var(--f-body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.calc-score b { font: 800 28px/1 var(--f-display); color: var(--text); margin-left: 8px; letter-spacing: 0; }
.calc-result { margin: 16px 0 10px; padding: 12px 16px; background: var(--surface); border-left: 3px solid var(--orange); font-size: 16px; color: var(--text); }
.calc-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.calc-table thead .calc-name { font-size: 15px; width: 100%; }
.calc-table td:nth-child(3), .calc-table td:nth-child(4) { width: 130px; }
.calc-total { font: 800 22px/1 var(--f-display); }
/* Late start clock: the three late start moments, marked in red once they have passed. */
.late-controls { margin-bottom: 14px; }
.late-controls input[type="date"], .late-controls input[type="time"] { font: inherit; font-size: 15px; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 0; padding: 9px 11px; height: 42px; box-sizing: border-box; }
.late-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); background: var(--surface); }
.late-list li { display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr); gap: 4px 16px; padding: 12px 16px; border-top: 1px solid var(--line-soft); color: var(--text-2); font-size: 15px; }
.late-list li:first-child { border-top: 0; }
.late-list li.muted { display: block; }
.late-list li.passed { box-shadow: inset 3px 0 0 var(--loss); }
.late-list .late-when strong { display: block; font: 800 17px/1.15 var(--f-display); text-transform: uppercase; color: var(--text); }
@media (max-width: 520px) { .late-list li { grid-template-columns: minmax(0, 1fr); } }
/* Pause timer: one big countdown. */
.pause-clock { margin: 16px 0 0; font: 800 clamp(56px, 12vw, 96px)/1 var(--f-display); letter-spacing: 0.02em; }
.pause-timer.is-up .pause-clock { color: var(--loss); }
.pause-timer .calc-result { margin-bottom: 12px; }

/* Compare players. */
.cmp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
@media (max-width: 760px) { .cmp-grid { grid-template-columns: minmax(0, 1fr); } }
.cmp-name { font: 800 clamp(26px, 3.4vw, 38px)/1.05 var(--f-display); text-transform: uppercase; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.cmp-name a { color: var(--text); text-decoration: none; }
.cmp-seasons { list-style: none; margin: 14px 0 0; padding: 0; }
.cmp-seasons li { padding: 7px 0; border-top: 1px solid var(--line-soft); }
.cmp-seasons li .muted:first-child { display: inline-block; min-width: 6.5em; font-size: 13px; }
.card-compare { margin-left: 10px; }
/* Screen-reader-only labels inside a scrolling table stay inside it instead of widening the page. */
.table-scroll { position: relative; }

/* Stream graphics: the live preview, scaled to the page; see-through layouts on a checkerboard. */
.stream-controls { margin-bottom: 10px; }
.stream-preview { border: 1px solid var(--line); background: #0b0b0d; }
.stream-preview canvas { display: block; width: 100%; height: auto; }
.stream-preview.see-through { background: repeating-conic-gradient(#2a2a2e 0 25%, #1a1a1d 0 50%) 0 0 / 24px 24px; }

/* Casters: this week's matches. */
.cast-plan { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); background: var(--surface); }
.cast-plan > li { display: grid; grid-template-columns: 11em minmax(0, 1fr); gap: 6px 20px; padding: 14px 18px; border-top: 1px solid var(--line-soft); }
.cast-plan > li:first-child { border-top: 0; }
.cast-plan > li.clash { box-shadow: inset 3px 0 0 var(--loss); }
.cp-when strong { display: block; font: 800 17px/1.15 var(--f-display); text-transform: uppercase; }
.cp-when > span { display: block; color: var(--text-2); font-size: 14px; }
.cp-when .tag { margin-top: 6px; }
.cp-teams { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: start; gap: 10px; }
.cp-team { font: 700 18px/1.15 var(--f-display); }
.cp-team a { color: var(--text); text-decoration: none; }
.cp-facts { display: block; margin-top: 4px; font: 500 13px/1.3 var(--f-body); }
.cp-vs { font: 500 11px/1.8 var(--f-mono); text-transform: uppercase; color: var(--muted); }
.cp-meta { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; font-size: 14px; color: var(--text-2); }
@media (max-width: 640px) {
  .cast-plan > li { grid-template-columns: minmax(0, 1fr); }
  .cp-meta { grid-column: 1; }
  .cp-teams { grid-template-columns: minmax(0, 1fr); }
}

/* Sheet check (staff). */
.staff-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); background: var(--surface); }
.staff-list li { padding: 9px 14px; border-top: 1px solid var(--line-soft); color: var(--text-2); font-size: 15px; }
.staff-list li:first-child { border-top: 0; }
.staff-ok { margin: 0; padding: 10px 14px; border-left: 3px solid var(--win); background: var(--surface); color: var(--text-2); }

/* Rules: notice when the live rulebook has revisions this copy lacks. */
.rulebook-alert { margin: 0 0 24px; padding: 14px 18px; border: 1px solid var(--loss); border-left-width: 3px; background: var(--surface); color: var(--text-2); }
.rulebook-alert strong { display: block; color: var(--text); font: 800 18px/1.2 var(--f-display); text-transform: uppercase; margin-bottom: 6px; }
.rulebook-alert ul { margin: 0 0 8px; padding-left: 1.2em; }
.rulebook-alert p { margin: 0; }

/* Echo Hub, Start here: numbered steps down the page. */
.start-steps { list-style: none; counter-reset: start; margin: 0; padding: 0; display: grid; gap: 14px; max-width: 820px; }
.start-steps > li { counter-increment: start; position: relative; padding: 18px 22px 16px 78px; background: var(--surface); border: 1px solid var(--line); }
.start-steps > li::before { content: counter(start, decimal-leading-zero); position: absolute; left: 20px; top: 16px; font: 800 36px/1 var(--f-display); color: var(--orange); }
.start-steps h2 { font: 800 22px/1.1 var(--f-display); text-transform: uppercase; margin: 0 0 8px; }
.start-steps p { color: var(--text-2); margin: 0 0 8px; }
.start-steps p:last-child { margin-bottom: 0; }
.start-tool { font-size: 14px; padding-top: 6px; border-top: 1px solid var(--line-soft); }
@media (max-width: 520px) { .start-steps > li { padding: 52px 16px 14px; } .start-steps > li::before { left: 16px; top: 14px; font-size: 28px; } }

/* Shown while there is no connection. */
.offline-note { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60; margin: 0; padding: 10px 16px; background: var(--surface); border: 1px solid var(--line-strong); border-left: 3px solid var(--orange); color: var(--text); font-size: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); max-width: calc(100vw - 32px); }
.season-share { margin: 10px 0 0; }
.me-box .btn + .btn { margin-left: 10px; }
/* "How the league works": three cards to a row on wide screens, so nine make full rows. */
@media (min-width: 900px) { .facts.facts-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Standings: the Copy for Discord button, on its own line at the right above the tables. */
.tools-row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-bottom: 12px; }

/* Standings: places moved since a week ago, beside the position. */
.rank-move { display: inline-block; margin-left: 4px; font-size: 11px; vertical-align: 1px; }

/* Player page: Faced most, the player's team's record against each opponent. */
.faced td.lead { color: var(--win); }
.faced td.trail { color: var(--loss); }
.tools-row .card-save { margin: 0; }

/* Head to head over time: one square per meeting in the winner's color, a row per season. */
.meet-strip { margin: 14px 0 18px; }
.meet-key { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.meet-key .meet-dot:not(:first-child) { margin-left: 10px; }
.meet-dot { display: inline-block; width: 12px; height: 12px; border-radius: 2px; }
.meet-dot.meet-ff { border: 2px solid var(--muted); background: transparent; width: 8px; height: 8px; }
.meet-rows { display: grid; gap: 6px; }
.meet-row { display: flex; align-items: center; gap: 10px; }
.meet-season { flex: 0 0 26px; font: 500 12px/1 var(--f-mono, monospace); color: var(--muted); }
.meet-boxes { display: flex; flex-wrap: wrap; gap: 4px; }
.meet-box { display: block; width: 18px; height: 18px; border-radius: 3px; }
.meet-box.meet-ff { border: 2px solid; background: transparent; width: 14px; height: 14px; }
a.meet-box:hover { outline: 2px solid var(--text); outline-offset: 1px; }

/* Season awards: one card per award. */
.awards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.award { padding: 16px 18px; border: 1px solid var(--line); background: var(--surface); }
.award p { margin: 0; }
.award-title { font: 700 13px/1.2 var(--f-display); letter-spacing: 0.06em; text-transform: uppercase; color: var(--orange-text); }
.award-teams { margin-top: 10px !important; font-weight: 600; }
.award-value { margin-top: 6px !important; font: 800 22px/1.15 var(--f-display); }
.award-detail { margin-top: 4px !important; font-size: 13px; color: var(--muted); }

/* Matches: a picked week in short, above its results. */
.week-recap { margin: 0 0 18px; }
.week-recap .sub-head { margin-top: 0; }
.week-recap-sum { margin: -4px 0 12px; font-size: 14px; }
.week-recap > .week-recap-sum:first-child { margin-top: 0; }
/* Home: the line above the last regular season results that points to the bracket. */
.home-results-note { margin: 0; padding: 10px 16px; border-bottom: 1px solid var(--line-soft); font-size: 14px; color: var(--muted); }
.week-recap dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; }
.week-recap dt { font-weight: 700; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; padding-top: 2px; }
.week-recap dd { margin: 0; }
@media (max-width: 560px) { .week-recap dl { grid-template-columns: 1fr; gap: 2px; } .week-recap dd { margin-bottom: 8px; } }
/* Season pages: the same summary at the top of each opened week. */
.week-block .week-recap { margin: 14px 14px 12px; }

/* Rules: what changed in the live rulebook, word by word. */
.rule-diffs { margin: 10px 0; }
.rule-diffs summary { cursor: pointer; font-weight: 600; }
.rule-diffs ul { margin: 10px 0 0; padding-left: 18px; }
.rule-diff { margin-bottom: 10px; line-height: 1.55; }
.rule-diff del { background: rgba(229, 72, 77, 0.16); text-decoration: line-through; }
.rule-diff ins { background: rgba(70, 167, 88, 0.22); text-decoration: none; }
.rule-diff strong { display: inline; margin: 0; font: inherit; font-weight: 700; text-transform: none; }

/* A match on today's date in the scheduled list. */
.tag-today { margin-left: 6px; border-color: var(--orange); color: var(--orange-text); }
.week-recap-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 4px; }
.count-tools { display: flex; flex-wrap: wrap; gap: 8px; }

/* Match page: the other matches that night. */
.night-list { margin: 0; padding: 0; list-style: none; columns: 2 280px; column-gap: 32px; }
.night-list li { padding: 4px 0; break-inside: avoid; }

/* Team page: what its captains wrote (app.js teamAbout), and their editor. */
.team-about { margin-top: 24px; }
.team-about .team-tagline { margin: 0 0 8px; font-weight: 700; font-size: 17px; color: var(--text); }
.team-about .team-bio { margin: 0 0 8px; white-space: pre-line; overflow-wrap: anywhere; }
.team-about .team-links { margin: 10px 0 0; }
.team-about-actions { margin: 12px 0 0; }
.team-edit input[type="color"] { width: 64px; height: 36px; padding: 2px; }
.team-edit input[type="color"]:disabled { opacity: .4; }
/* My Teams (app.js initMyTeams) and the team page's Recruit me. */
.myteams { display: flex; flex-direction: column; gap: 16px; }
.myteams-card .sub-head { margin-top: 0; }
.myteams-card ul { margin: 10px 0; padding: 0; list-style: none; }
.myteams-card li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.myteams-card li > .profile-actions, .myteams-card li > div { flex-basis: 100%; margin: 4px 0 0; }
.myteams-msg { flex-basis: 100%; margin: 2px 0 0; overflow-wrap: anywhere; white-space: pre-line; }
.myteams-team { margin: 0 0 6px; font-size: 18px; font-weight: 700; }
.me-warn { color: var(--orange-text); }
.bot-cmd { margin-top: 10px; }
.bot-cmd .note { margin-top: 6px; }
.myteams-leave > summary { display: inline-block; list-style: none; cursor: pointer; }
.myteams-leave > summary::-webkit-details-marker { display: none; }
.team-recruit-me .profile-form { margin-top: 8px; }
/* The captain's roster tools (app.js rosterTools): each player's buttons on a row under their name. */
.roster-tools { margin: 10px 0; padding: 0; list-style: none; }
.roster-tools li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.roster-tool-btns { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; }
.roster-tool-btns .btn[aria-expanded="true"] { border-color: var(--orange); color: var(--orange-text); }
.roster-tool-out { flex-basis: 100%; }
.roster-tool-out:empty { display: none; }
.captain-tools-sub { margin-top: 20px; }
/* Team page: roster moves under the card. */
.team-moves { margin-top: 24px; }
.team-moves ul { margin: 0; padding: 0; list-style: none; }
.team-moves li { padding: 4px 0; border-bottom: 1px solid var(--line-soft); }
/* Team and player pages: casts three across in the narrower column. */
.team-layout .casts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .team-layout .casts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cal-google { display: block; margin-top: 2px; font-size: 13px; }
.rule-changed-check { margin: 8px 0 0; font-size: 14px; }

/* Echo Hub "Start here": steps ticked off on this device. */
.start-check { margin-top: 10px; font-size: 14px; }
.start-steps > li.is-done { opacity: 0.7; }
.start-steps > li.is-done h2 { text-decoration: line-through; text-decoration-thickness: 2px; }
.start-progress { margin: 0 0 12px; font-weight: 600; color: var(--orange-text); }
.start-progress:empty { display: none; }

/* Log in with Discord (assets/js/account.js): the header button or picture, and player profiles. */
/* Room for the login button in the header: a little less space between menu links on laptop screens, and
   between the header buttons on phones. */
@media (max-width: 1440px) and (min-width: 1241px) { .site-nav > a, .nav-group-btn { padding-inline: 8px; } }

/* Same square as the search and theme buttons beside it; the words are for screen readers and the tooltip. */
.account-slot { position: relative; display: flex; align-items: center; flex-shrink: 0; margin-left: 8px; }
button.account-link { padding: 0; cursor: pointer; background: none; color: var(--text); font: 700 15px/1 var(--f-display); }
.account-menu { position: absolute; top: calc(100% + 12px); right: 0; z-index: 60; width: 280px; padding: 6px; background: var(--bg-deep); border: 1px solid var(--line); box-shadow: 0 14px 34px rgba(0, 0, 0, .35); }
.account-menu-name { margin: 0 12px 8px; font-weight: 700; overflow-wrap: anywhere; }
/* Which site's account this is ("EML account", "Echo Hub account"), over the name. */
.account-menu-site { margin: 8px 12px 2px; color: var(--muted); font: 700 12px/1.3 var(--f-display); letter-spacing: .08em; text-transform: uppercase; }
.account-logout { display: block; width: calc(100% - 24px); margin: 8px 12px 6px; }
.account-login {
  display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0;
  background: transparent; border: 1px solid var(--line-strong); color: var(--text); cursor: pointer;
}
.account-login:hover { border-color: var(--text); }
.account-login svg { width: 18px; height: 18px; }
.account-link {
  display: grid; place-items: center; width: 38px; height: 38px; overflow: hidden; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font-weight: 700; text-decoration: none;
}
.account-link img { display: block; width: 100%; height: 100%; object-fit: cover; }
.account-link:hover { border-color: var(--text); }
.profile-card { display: flex; gap: 20px; align-items: flex-start; padding: 22px; background: var(--surface); border: 1px solid var(--line); }
.profile-card.compact { gap: 14px; padding: 14px; }
.profile-avatar { flex: none; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.profile-avatar-blank { width: 88px; height: 88px; display: grid; place-items: center; font: 700 32px/1 var(--f-display); color: var(--muted); }
.profile-card.compact .profile-avatar-blank { width: 48px; height: 48px; font-size: 18px; }
.profile-main { flex: 1; min-width: 0; }
.profile-name { margin: 0 0 4px; font: 700 24px/1.15 var(--f-display); overflow-wrap: anywhere; }
.profile-card.compact .profile-name { font-size: 17px; }
.profile-name a { color: inherit; text-decoration: none; }
.profile-name a:hover { text-decoration: underline; }
.profile-eml { margin: 0 0 8px; }
.profile-verified {
  display: inline-block; padding: 1px 6px; border: 1px solid currentColor; color: var(--win);
  font: 700 11px/1.5 var(--f-display); letter-spacing: .06em; text-transform: uppercase;
}
.profile-facts { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.profile-facts .k { margin-right: 6px; color: var(--muted); }
.profile-lft { margin: 0 0 8px; }
.profile-lft strong { color: var(--orange-text); }
.profile-bio { margin: 0 0 8px; white-space: pre-line; overflow-wrap: anywhere; }
.profile-links { display: flex; gap: 14px; margin: 0; }
.profile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
/* minmax(0, 1fr): a long word or link in a note wraps instead of widening the column past a phone screen. */
.profile-own { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; max-width: 720px; margin-top: 20px; }
.profile-own .note, .profile-panel p { overflow-wrap: anywhere; }
.profile-form { display: flex; flex-direction: column; gap: 8px; }
.profile-form label { font-size: 14px; color: var(--muted); }
.profile-form .check { color: var(--text); }
.profile-form input[type="text"], .profile-form select, .profile-form textarea { width: 100%; padding: 8px 10px; font: inherit; }
.profile-roles { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 4px 0; padding: 0; border: 0; }
.profile-roles legend { margin-bottom: 6px; padding: 0; font-size: 14px; color: var(--muted); }
/* Log in box (account.js): Discord, or an email and a password. */
.login-dialog { width: min(420px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); }
.login-dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
.login-box { position: relative; display: grid; gap: 14px; padding: 24px; }
.login-box h2 { margin: 0; padding-right: 70px; font: 700 26px/1.1 var(--f-display); }
/* The site's mark and name over the title, copied from the header, so each site's Log in box looks like it. */
.login-brand { display: flex; align-items: center; gap: 10px; margin: 0; padding-right: 70px; font: 700 15px/1.2 var(--f-display); letter-spacing: .06em; text-transform: uppercase; }
.login-brand img, .login-brand svg { flex: none; width: 30px; height: 30px; }
.login-brand img { filter: var(--mark-filter); }
.login-close { position: absolute; top: 20px; right: 20px; }
.login-discord { display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.login-discord svg { width: 20px; height: 20px; }
.login-or { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--muted); font-size: 13px; }
.login-or::before, .login-or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.login-form { display: grid; gap: 12px; }
.login-status:empty { display: none; }
.login-status, .login-box > .note { margin: 0; }
.login-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; font-size: 14px; }
.link-btn { padding: 0; border: 0; background: none; font: inherit; color: var(--link); text-decoration: underline; cursor: pointer; }
.link-btn:hover { color: var(--link-hover); }
/* Player stats: the EML Stats app card and the captains' form (app.js initStats). */
.stats-app { margin-top: 36px; }
.stats-app ol { margin: 12px 0; padding-left: 22px; }
#stats-entry { margin-top: 40px; }
.stats-form .controls { margin-bottom: 14px; }
.stats-grid { display: grid; gap: 6px; margin-bottom: 14px; max-width: 640px; }
.stats-row { display: grid; grid-template-columns: minmax(0, 1fr) repeat(4, minmax(52px, 72px)); gap: 6px; align-items: center; }
.stats-row input { width: 100%; min-width: 0; padding: 8px; font: inherit; font-size: 15px; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); }
.stats-head span { font: 700 11px/1 var(--f-display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.profile-code { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.profile-code code { padding: 6px 8px; font: 500 13px/1.3 var(--f-mono); background: var(--surface-2); border: 1px solid var(--line); overflow-wrap: anywhere; }
/* Your profile: how you log in. */
.profile-logins { display: grid; gap: 8px; justify-items: start; margin: 0 0 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line-soft); }
.profile-sub-head { margin: 0; font: 700 12px/1 var(--f-display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.profile-password { display: flex; flex-wrap: wrap; align-items: end; gap: 8px 10px; }
.profile-password .field { min-width: min(100%, 240px); }
.profile-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }
.profile-login { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; max-width: 640px; }
.me-account { display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 560px) {
  .profile-card { flex-direction: column; }
}
.profile-name .profile-star { width: 16px; height: 16px; margin-left: 6px; vertical-align: -1px; }
.profile-record { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.profile-record-head { margin: 0 0 6px; font: 700 12px/1 var(--f-display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.profile-record-head + ul { margin-bottom: 14px; }
.profile-honors, .profile-career { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.profile-honors li { display: flex; align-items: center; gap: 8px; }
.profile-honors .profile-star { flex: none; width: 20px; height: 20px; }
.profile-second {
  flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; border: 1px solid var(--line-strong);
  color: var(--muted); font: 700 11px/1 var(--f-display);
}
.profile-headline { margin: 0 0 6px; color: var(--muted); font-size: 16px; overflow-wrap: anywhere; }
/* The small cards carry the player's color as a strip along the top. */
.profile-card.compact, .profile-card.summary { border-top: 3px solid var(--accent, var(--line)); }

/* The full profile: the banner (the team's, or the player's color with the swirl texture), the picture over
   its lower edge in a ring of the player's color, the record in numbers, then two columns. */
.profile-full { display: block; padding: 0; overflow: hidden; }
.profile-hero { min-height: 200px; padding: 0; }
.profile-hero.has-mono > .tcard-mono { font-size: 170px; }
.profile-hero-color {
  position: relative; overflow: hidden; background: var(--accent); color: var(--accent-ink);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
  box-shadow: inset 0 0 70px rgba(0, 0, 0, 0.3);
}
.profile-hero-color > .tcard-pattern {
  position: absolute; inset: 0; background: currentColor; opacity: 0.1; pointer-events: none;
  -webkit-mask-image: var(--swirl); mask-image: var(--swirl); -webkit-mask-size: 104px 104px; mask-size: 104px 104px;
}
.profile-id { position: relative; z-index: 4; display: flex; align-items: flex-start; gap: 22px; margin-top: -60px; padding: 0 26px; }
.profile-full .profile-avatar { width: 136px; height: 136px; box-shadow: 0 0 0 5px var(--surface), 0 0 0 8px var(--accent), 0 0 0 9px rgba(128, 128, 128, 0.35); }
.profile-idtext { flex: 1; min-width: 0; padding-top: 72px; }
.profile-full .profile-name { margin: 0 0 4px; font: 800 44px/0.95 var(--f-display); text-transform: uppercase; }
.profile-full .profile-name .profile-star { width: 26px; height: 26px; margin-left: 8px; vertical-align: 2px; }
.profile-full .profile-headline { font-size: 18px; color: var(--text); }
.profile-full .profile-eml { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 8px 0 0; }
.profile-team { display: inline-flex; align-items: center; gap: 8px; }
.profile-stats { margin: 22px 26px 0; border: 1px solid var(--line); }
.profile-body { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 28px 36px; padding: 26px; }
.profile-body > :only-child { grid-column: 1 / -1; }
.profile-col, .profile-side { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.profile-sec > p { margin: 0; }
.profile-full .profile-record-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.profile-full .profile-record-head::before { content: ""; width: 12px; height: 3px; background: var(--accent); }
.profile-full .profile-record-head + ul, .profile-full .profile-record-head + ol { margin-bottom: 0; }
.profile-full .profile-bio { margin: 0; font-size: 16px; }
.profile-clip { max-width: none; }
.profile-full .profile-lft { margin: 0; padding: 12px 14px; background: var(--surface-2); border-left: 3px solid var(--orange); }
.profile-full .profile-lft p { margin: 4px 0 0; }
.profile-roletags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.profile-roletags li {
  padding: 4px 10px 3px; border: 1px solid var(--line-strong); border-left: 3px solid var(--accent);
  font: 700 15px/1.2 var(--f-display); letter-spacing: 0.04em; text-transform: uppercase;
}
.profile-region { font: 700 22px/1 var(--f-display); }
.profile-full .profile-links { flex-wrap: wrap; gap: 8px; }
.profile-full .profile-honors { gap: 10px; }
.profile-full .profile-honors li { align-items: flex-start; gap: 10px; }
.profile-full .profile-honors li > :first-child { margin-top: 1px; }
.profile-honor { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; min-width: 0; }
.profile-honor strong { margin-right: 2px; }
.profile-stats .label { white-space: nowrap; }
/* The career as a timeline, newest first; this season's square is filled in the player's color. */
.profile-career { list-style: none; margin: 0; padding: 0 0 0 20px; display: flex; flex-direction: column; gap: 14px; border-left: 2px solid var(--line); }
.profile-career li { position: relative; display: flex; flex-direction: column; gap: 3px; }
.profile-career li::before {
  content: ""; position: absolute; left: -27px; top: 3px; width: 12px; height: 12px;
  background: var(--surface); border: 2px solid var(--line-strong);
}
.profile-career li.is-now::before { background: var(--accent); border-color: var(--accent); }
.profile-season { font: 700 12px/1.2 var(--f-display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.profile-season-team { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
/* One column on narrow screens, with the short facts (looking for a team, roles, region) first. */
@media (max-width: 860px) {
  .profile-body { grid-template-columns: minmax(0, 1fr); }
  .profile-side { order: -1; }
}
@media (max-width: 560px) {
  .profile-hero { min-height: 130px; }
  .profile-hero.has-mono > .tcard-mono { font-size: 110px; }
  .profile-id { flex-direction: column; gap: 12px; margin-top: -50px; padding: 0 16px; }
  .profile-full .profile-avatar { width: 100px; height: 100px; }
  .profile-idtext { padding-top: 0; }
  .profile-full .profile-name { font-size: 34px; }
  .profile-stats { margin: 18px 16px 0; }
  .profile-stats > div { padding-inline: 8px; }
  .profile-stats .label { letter-spacing: 0.04em; }
  .profile-body { padding: 20px 16px; }
}

/* The editor: grouped fields, and the color picker with the team's own colors beside it. */
.profile-group { display: flex; flex-direction: column; gap: 8px; min-width: 0; margin: 6px 0 0; padding: 14px 0 0; border: 0; border-top: 1px solid var(--line-soft); }
/* A fieldset grows to its widest field by default; long cast names in a select must not push the editor
   past a phone screen. */
.profile-form select { max-width: 100%; }
.profile-group > legend { padding: 0 0 4px; font: 700 13px/1 var(--f-display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text); }
.profile-colors { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.profile-colors input[type="color"] { width: 44px; height: 34px; padding: 2px; border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; }
.profile-swatch { width: 34px; height: 34px; padding: 0; border: 1px solid var(--line-strong); cursor: pointer; }
.profile-swatch:hover { outline: 2px solid var(--text); outline-offset: 1px; }
/* Notes in the editor: under a switch (when it lapses, "Still looking?"), the empty-field hint, the day
   and time picker, and a field the save refused. */
.profile-sub { margin: 0; font-size: 14px; color: var(--muted); }
.profile-ask { color: var(--orange-text); }
.profile-hint { margin: 0; padding: 10px 14px; background: var(--surface-2); border-left: 3px solid var(--orange); }
.profile-subfields { display: flex; flex-direction: column; gap: 8px; padding-left: 26px; }
.profile-subfields select, .profile-cast select { width: auto; max-width: 100%; }
.profile-cast { display: flex; flex-direction: column; gap: 8px; }
.profile-picker { padding: 8px 12px; border: 1px solid var(--line); }
.profile-picker > summary { cursor: pointer; font-size: 14px; color: var(--text-2); }
.profile-picker[open] > summary { margin-bottom: 8px; }
.profile-hours { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; margin: 8px 0; }
.profile-hours > div { display: flex; flex-direction: column; gap: 4px; }
.profile-form [aria-invalid="true"] { border-color: var(--loss); }
/* The card's EML line in words, the owner's way into EML, the Discord link, league status. */
.profile-verified.is-past { color: var(--muted); }
.profile-verified-note { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.profile-join { margin: 8px 0 0; font-size: 15px; }
.profile-dm { display: inline-block; margin-top: 6px; font-size: 14px; }
.profile-status { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.profile-recruit { border-left-color: var(--win); }
.profile-recruit p { margin: 4px 0 0; }
/* Under the full card: Copy link, how to report it; the own-profile panels; teammates and teams. */
.profile-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 12px; }
.profile-report { margin: 0; }
.profile-panels { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.profile-panels:empty { display: none; }
.profile-panel > p { margin: 8px 0 0; }
.profile-mates, .profile-nextteams { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.profile-nextteams { flex-direction: column; }
td .profile-mates { margin: 0; }
.profile-missing { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.profile-missing p { margin: 0; }
.profile-examples { margin-top: 32px; }
/* A note under the header after a cancelled, failed or ended login. */
.account-notice { background: var(--surface-2); border-bottom: 1px solid var(--line); }
.account-notice > .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-block: 10px; }
.account-notice p { margin: 0; }

/* Windows contrast themes (forced colors) paint every background and border in the theme's own colors and
   drop box shadows. Marks drawn only by a fill or a shadow (team chips, letter pictures, calendar dots, the
   subnav's line) get a real border; the current page and season keep a mark in the theme's highlight
   color; color swatches keep their colors, since the color is what they show. Late in the file so these
   win over the rules they adjust. */
@media (forced-colors: active) {
  .tchip, .fa-pic, .profile-avatar-blank, .cal-tag { border: 1px solid CanvasText; }
  .subnav { border-bottom: 1px solid CanvasText; }
  .site-nav a[aria-current="page"], .subnav a[aria-current="page"], .me-link[aria-current="page"] { border-color: Highlight; }
  .rules-toc a.is-active, .search-results li.is-active a { border-left-color: Highlight; }
  .profile-career li.is-now::before { background: Highlight; }
  .profile-swatch, .profile-colors input[type="color"] { forced-color-adjust: none; }
}

/* Free agent lists: the Discord picture of a player with an Echo Hub profile, and the tag when that profile
   says they are looking for a team. Tags in one cell sit a little apart. */
.fa-pic {
  display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; margin-right: 8px; overflow: hidden;
  border-radius: 50%; background: var(--surface-2); color: var(--muted); font: 700 11px/1 var(--f-display);
  text-decoration: none; vertical-align: middle;
}
.fa-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fa-pic:hover, .fa-pic:focus-visible { box-shadow: 0 0 0 2px var(--orange); }
.tag-lft { border-color: var(--win); color: var(--win); text-decoration: none; }
.tag-lft:hover { background: var(--win); color: var(--bg); }
td > .tag + .tag { margin-left: 6px; }
/* A line under the player's name: the roles on their profile, and on phones (where the Seasons column is
   hidden) how many seasons they have played. */
table.data .team-cell .fa-sub { display: block; margin-top: 3px; font: 400 13px/1.3 var(--f-body); color: var(--muted); }
table.data .team-cell .fa-sub-sm { display: none; }
@media (max-width: 640px) { table.data .team-cell .fa-sub-sm { display: block; } }
/* Free agents with no activity for 6 months, when shown. */
table.data tr.fa-inactive td { opacity: 0.6; }
/* The narrowest phones (375 px): slightly smaller header buttons so all four fit beside the menu. */
@media (max-width: 400px) {
  .search-toggle, .theme-toggle, .account-login, .account-link { width: 34px; height: 34px; }
}

/* ---------- Visual upgrades: section texture, team strips, champion banner, arena drawings ---------- */

/* Section texture: the banners' swirl, very faint and still, behind page heads and section headings, so long
   pages have a rhythm. Drawn in the text color through the swirl as a mask, behind the words, on a layer of
   its own (the contrast check reads the real background under the text). */
.page-head-row, .section-head, .sub-head { position: relative; isolation: isolate; }
.page-head-row::before, .section-head::before, .sub-head::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -22px 0 0;
  background: var(--text);
  -webkit-mask-image: var(--swirl);
  mask-image: var(--swirl);
  -webkit-mask-size: 104px 104px;
  mask-size: 104px 104px;
  opacity: 0.04;
  pointer-events: none;
}
.page-head-row::before { top: -40px; }

/* Team strips: a thin bar in the team color at the start of each row or card that lists a team (app.js
   teamStrip sets --tc). Table rows draw it inside their first cell, so no column moves. */
tr.tc-strip > :first-child { box-shadow: inset 4px 0 0 var(--tc); }
.spot-list li.tc-strip { box-shadow: inset 4px 0 0 var(--tc); }
.dir-item.tc-strip, .tcard.tc-strip { border-left: 4px solid var(--tc); }

/* Home hero: the reigning champion on its team banner, above the calendar (build.mjs heroChamp). */
.hero-champ { min-height: 150px; justify-content: flex-end; gap: 8px; padding: 18px 20px 16px; }
.hero-champ .tcard-name { margin: 0; font-size: 50px; }
.hero-champ .tcard-name a { color: inherit; text-decoration: none; }
.hero-champ .tcard-name a:hover { text-decoration: underline; }
@media (max-width: 640px) { .hero-champ { min-height: 128px; } .hero-champ .tcard-name { font-size: 42px; } }

/* Arena drawings (_build/arena-svg.mjs): thin lines in the text color that stay thin at any size. */
.arena-art { display: block; width: 100%; height: 100%; }
.arena-art * { vector-effect: non-scaling-stroke; stroke-width: 1px; }
.arena-art .arena-shell { stroke-width: 1.5px; }

/* Home steps: the step's picture sits at the foot of its card (teams with open spots, the arena). */
.steps li { display: flex; flex-direction: column; }
.step-art { margin-top: auto; padding-top: 14px; }
.step-arena { height: 78px; color: var(--muted); }

/* Logo chips of teams with open spots (app.js openSpotChips), larger than the table chips. */
.spot-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.spot-chip { display: block; line-height: 0; }
.spot-chip .tchip { width: 32px; height: 32px; font-size: 17px; }
.spot-chip .tchip img { width: 26px; height: 26px; }
.spot-chip .tchip.wide { font-size: 11px; }
.spot-chip:hover .tchip, .spot-chip:focus-visible .tchip { box-shadow: inset 0 0 0 2px var(--orange); }
p.spot-chips-note { margin: 10px 0 0; font: 500 12px/1.3 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; }
.spot-chips-note a { color: var(--text-2); text-decoration: none; }
.spot-chips-note a:hover { color: var(--orange-text); text-decoration: underline; }

/* MVP leaderboard (mvp.html, app.js initMvp): the event picker, the table with its heat-shaded columns, the MVP tag
   and the Overall bar. */
.mvp-events { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.mvp-tab { padding: 7px 14px; background: transparent; color: var(--text); border: 1px solid var(--line-strong); font: 600 14px/1.2 var(--f-body); cursor: pointer; }
.mvp-tab:hover { border-color: var(--text); }
.mvp-tab[aria-pressed="true"] { background: var(--text); color: var(--surface); border-color: var(--text); }
.mvp-tag { display: inline-block; margin-left: 8px; padding: 1px 6px; font: 700 11px/1.4 var(--f-body); letter-spacing: .06em; color: #1b1405; background: #e8b84a; vertical-align: 1px; }
.mvp-top td { font-weight: 600; }
.mvp-unranked td { color: var(--text-2); }
.mvp-fill { margin-left: 8px; padding: 0 5px; font: 600 11px/1.4 var(--f-body); letter-spacing: .04em; color: var(--text-2); border: 1px solid var(--line-strong); vertical-align: 1px; cursor: help; }
#mvp-board .team-cell { white-space: nowrap; }
.mvp-ovr { position: relative; min-width: 96px; }
.mvp-ovr b { position: relative; }
.mvp-bar { position: absolute; left: 6px; top: 50%; height: 6px; margin-top: 7px; max-width: calc(100% - 12px); background: var(--text-2); opacity: .55; }
.mvp-how { margin-top: 16px; }
.mvp-how summary { cursor: pointer; font-weight: 600; }
.mvp-how ul { margin: 10px 0 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 4px; }
