/* School Esports — design system. See DESIGN.md for the rules behind these values. */

@font-face {
  font-family: 'Geist';
  src: url('/fonts/geist.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('/fonts/geist-mono.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --canvas: #09090b;
  --canvas-2: #0c0c0f;
  --surface: #131316;
  --surface-2: #18181b;
  --surface-3: #1f1f23;
  --shell: rgb(255 255 255 / 2.5%);
  --line: rgb(255 255 255 / 7%);
  --line-2: rgb(255 255 255 / 11%);
  --line-3: rgb(255 255 255 / 16%);
  --text: #f4f4f5;
  --text-2: #a1a1aa;
  --text-3: #71717a;
  --accent: #e4572e;
  --accent-rgb: 228 87 46;
  --on-accent: #ffffff;
  --success: #5bc98c;
  --success-rgb: 91 201 140;
  --warning: #e5b454;
  --warning-rgb: 229 180 84;
  --danger: #ef6461;
  --danger-rgb: 239 100 97;
  --info: #7aa7f5;
  --info-rgb: 122 167 245;

  --font: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, monospace;

  --r-shell: 22px;
  --r-core: 16px;
  --r-control: 12px;
  --r-sm: 8px;
  --bezel: 6px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

  --shadow-soft: 0 24px 60px -32px rgb(0 0 0 / 70%), 0 2px 8px -4px rgb(0 0 0 / 40%);
  --highlight: inset 0 1px 0 rgb(255 255 255 / 6%);
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
.icon { display: inline-block; flex: none; vertical-align: -0.2em; }
a { color: inherit; text-decoration: none; }
p a, .prose a, .link { color: var(--text); text-decoration: underline; text-decoration-color: rgb(var(--accent-rgb) / 60%); text-underline-offset: 3px; text-decoration-thickness: 1px; transition: text-decoration-color 180ms var(--ease-out); }
p a:hover, .prose a:hover, .link:hover { text-decoration-color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgb(var(--accent-rgb) / 35%); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.1; letter-spacing: -0.02em; font-weight: 600; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
code, kbd { font-family: var(--mono); font-size: 0.88em; }
kbd { border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 6px; background: var(--surface-2); }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 999px; font-weight: 600; transition: transform 180ms var(--ease-out); }
.skip-link:focus { top: 16px; }

/* Ambient layers: fixed, non-interactive, public pages only. */
body.public::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60vw 50vh at 78% -8%, rgb(var(--accent-rgb) / 13%), transparent 70%),
    radial-gradient(50vw 50vh at -10% 30%, rgb(90 110 160 / 9%), transparent 70%),
    linear-gradient(180deg, var(--canvas) 0%, var(--canvas-2) 100%);
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }
.stack > * + * { margin-top: var(--stack, 16px); }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.mono { font-family: var(--mono); font-feature-settings: 'zero'; letter-spacing: -0.01em; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.small { font-size: 0.875rem; }
.tiny { font-size: 0.78rem; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mt-48 { margin-top: 48px; }
.hidden, [hidden] { display: none !important; }
.link-button { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; }

/* ---------- Eyebrows, pills, badges ---------- */
.label-mono { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); font-weight: 500; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 10px; border-radius: 999px;
  font-size: 0.75rem; font-weight: 500; line-height: 1; white-space: nowrap;
  background: rgb(255 255 255 / 5%); color: var(--text-2); border: 1px solid var(--line);
}
.badge .icon { width: 13px; height: 13px; }
.badge-success { background: rgb(var(--success-rgb) / 12%); color: var(--success); border-color: rgb(var(--success-rgb) / 22%); }
.badge-warning { background: rgb(var(--warning-rgb) / 12%); color: var(--warning); border-color: rgb(var(--warning-rgb) / 22%); }
.badge-danger { background: rgb(var(--danger-rgb) / 12%); color: var(--danger); border-color: rgb(var(--danger-rgb) / 22%); }
.badge-info { background: rgb(var(--info-rgb) / 12%); color: var(--info); border-color: rgb(var(--info-rgb) / 22%); }
.badge-accent { background: rgb(var(--accent-rgb) / 14%); color: color-mix(in srgb, var(--accent) 70%, white); border-color: rgb(var(--accent-rgb) / 28%); }

.game-pill {
  --g: 139 149 167;
  display: inline-flex; align-items: center; gap: 7px;
  height: 26px; padding: 0 11px 0 5px; border-radius: 999px;
  background: rgb(var(--g) / 12%); border: 1px solid rgb(var(--g) / 26%);
  color: rgb(var(--g)); font-size: 0.78rem; font-weight: 600; white-space: nowrap;
}
.game-pill .gp-mark { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: rgb(var(--g)); color: #0b0b0d; }
.game-pill .gp-mark .icon { width: 12px; height: 12px; }
.game-mark {
  --g: 139 149 167;
  display: grid; place-items: center; flex: none;
  width: 44px; height: 44px; border-radius: 14px;
  background: linear-gradient(160deg, rgb(var(--g) / 26%), rgb(var(--g) / 8%));
  border: 1px solid rgb(var(--g) / 30%);
  color: rgb(var(--g));
  box-shadow: var(--highlight);
}
.game-mark .icon { width: 22px; height: 22px; }
.game-mark.lg { width: 56px; height: 56px; border-radius: 18px; }
.game-mark.lg .icon { width: 28px; height: 28px; }

.live-dot { position: relative; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.live-dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--accent); animation: pulse 1.6s var(--ease-out) infinite; }
@keyframes pulse { from { transform: scale(1); opacity: 0.7; } to { transform: scale(3); opacity: 0; } }
.live-tag { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.14em; font-weight: 600; color: color-mix(in srgb, var(--accent) 75%, white); text-transform: uppercase; }

/* ---------- Buttons ---------- */
.btn {
  --bh: 44px;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--bh); padding: 0 20px; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgb(255 255 255 / 4%); color: var(--text);
  font-size: 0.94rem; font-weight: 550; line-height: 1; white-space: nowrap; cursor: pointer;
  transition: transform 140ms var(--ease-out), background-color 180ms var(--ease-out), border-color 180ms var(--ease-out), color 180ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn:active { transform: scale(0.97); }
.btn[disabled], .btn.disabled { opacity: 0.45; pointer-events: none; }
.btn-primary { background: var(--accent); border-color: transparent; color: var(--on-accent); box-shadow: 0 10px 30px -12px rgb(var(--accent-rgb) / 55%), inset 0 1px 0 rgb(255 255 255 / 18%); }
.btn-light { background: var(--text); color: #0b0b0d; border-color: transparent; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-danger { background: rgb(var(--danger-rgb) / 12%); border-color: rgb(var(--danger-rgb) / 28%); color: var(--danger); }
.btn-success { background: rgb(var(--success-rgb) / 12%); border-color: rgb(var(--success-rgb) / 28%); color: var(--success); }
.btn-sm { --bh: 34px; padding: 0 14px; font-size: 0.84rem; gap: 6px; }
.btn-xs { --bh: 28px; padding: 0 10px; font-size: 0.78rem; gap: 5px; }
.btn-lg { --bh: 54px; padding: 0 26px; font-size: 1rem; }
.btn-icon { width: var(--bh); padding: 0; }
.btn-block { width: 100%; }
/* Button-in-button: trailing icon sits in its own circle */
.btn-cta { padding-right: 6px; gap: 14px; }
.btn-cta.btn-lg { padding-left: 26px; padding-right: 7px; }
.btn-cta .cta-icon {
  display: grid; place-items: center;
  width: calc(var(--bh) - 12px); height: calc(var(--bh) - 12px); border-radius: 50%;
  background: rgb(0 0 0 / 16%);
  transition: transform 320ms var(--ease-out);
}
.btn-light.btn-cta .cta-icon, .btn:not(.btn-primary).btn-cta .cta-icon { background: rgb(255 255 255 / 8%); }
.btn-light.btn-cta .cta-icon { background: rgb(0 0 0 / 8%); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: rgb(255 255 255 / 8%); border-color: var(--line-3); }
  .btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, white); border-color: transparent; }
  .btn-light:hover { background: #ffffff; }
  .btn-ghost:hover { background: rgb(255 255 255 / 5%); color: var(--text); border-color: transparent; }
  .btn-danger:hover { background: rgb(var(--danger-rgb) / 20%); border-color: rgb(var(--danger-rgb) / 40%); }
  .btn-success:hover { background: rgb(var(--success-rgb) / 20%); border-color: rgb(var(--success-rgb) / 40%); }
  .btn-cta:hover .cta-icon { transform: translate(2px, -1px) scale(1.05); }
}

/* ---------- Double-bezel cards ---------- */
.bezel {
  padding: var(--bezel);
  border-radius: var(--r-shell);
  background: var(--shell);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}
.bezel > .core {
  border-radius: calc(var(--r-shell) - var(--bezel));
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  box-shadow: var(--highlight), 0 0 0 1px rgb(255 255 255 / 3%);
  padding: clamp(18px, 3vw, 28px);
  height: 100%;
}
.card {
  border-radius: var(--r-core);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--highlight);
  padding: 20px;
}
.card-flush { padding: 0; overflow: hidden; }
.card-title { font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-body { padding: 20px; }
.divider-list > * + * { border-top: 1px solid var(--line); }

/* ---------- Public navigation: floating glass pill ---------- */
.site-nav {
  position: fixed; top: 16px; left: 50%; z-index: 40;
  transform: translateX(-50%);
  width: min(calc(100% - 24px), 980px);
  display: flex; align-items: center; gap: 8px;
  padding: 7px 7px 7px 16px;
  border-radius: 999px;
  background: rgb(18 18 21 / 72%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid var(--line-2);
  box-shadow: 0 16px 40px -20px rgb(0 0 0 / 80%), inset 0 1px 0 rgb(255 255 255 / 6%);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; letter-spacing: -0.02em; white-space: nowrap; min-width: 0; }
.brand-mark {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; flex: none;
  background: var(--accent); color: var(--on-accent);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 25%), 0 6px 18px -8px rgb(var(--accent-rgb) / 70%);
}
.brand-mark svg { width: 18px; height: 18px; }
.brand-logo { width: 30px; height: 30px; object-fit: contain; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-text small { font-size: 0.68rem; color: var(--text-3); font-weight: 500; letter-spacing: 0.02em; font-family: var(--mono); text-transform: uppercase; }
.brand-text span { overflow: hidden; text-overflow: ellipsis; }
.nav-links { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav-links a {
  position: relative; padding: 8px 14px; border-radius: 999px; color: var(--text-2); font-size: 0.9rem; font-weight: 500;
  transition: color 180ms var(--ease-out), background-color 180ms var(--ease-out);
}
.nav-links a[aria-current='page'] { color: var(--text); background: rgb(255 255 255 / 7%); }
@media (hover: hover) and (pointer: fine) { .nav-links a:hover { color: var(--text); } }
.nav-actions { display: flex; align-items: center; gap: 6px; margin-left: 8px; }
.avatar {
  display: grid; place-items: center; flex: none;
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(160deg, var(--surface-3), var(--surface));
  border: 1px solid var(--line-2); font-size: 0.78rem; font-weight: 600; color: var(--text);
}
.nav-user { display: inline-flex; align-items: center; gap: 8px; padding: 3px 12px 3px 3px; border-radius: 999px; border: 1px solid var(--line-2); background: rgb(255 255 255 / 4%); font-size: 0.86rem; font-weight: 500; transition: background-color 180ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .nav-user:hover { background: rgb(255 255 255 / 8%); } }

.menu-toggle { display: none; position: relative; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-2); background: rgb(255 255 255 / 5%); cursor: pointer; margin-left: auto; }
.menu-toggle span { position: absolute; left: 13px; right: 13px; height: 1.5px; background: var(--text); border-radius: 2px; transition: transform 380ms var(--ease-drawer); }
.menu-toggle span:nth-child(1) { transform: translateY(-4px); }
.menu-toggle span:nth-child(2) { transform: translateY(4px); }
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(0) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { transform: translateY(0) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 35;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 96px var(--gutter) calc(32px + env(safe-area-inset-bottom));
  background: rgb(9 9 11 / 86%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  backdrop-filter: blur(28px) saturate(140%);
  opacity: 0; visibility: hidden;
  transition: opacity 320ms var(--ease-out), visibility 0s linear 320ms;
}
.menu-open .mobile-menu { opacity: 1; visibility: visible; transition: opacity 320ms var(--ease-out), visibility 0s; }
.mobile-menu nav { display: flex; flex-direction: column; gap: 4px; }
.mobile-menu nav a {
  font-size: clamp(2rem, 9vw, 2.6rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1.15; padding: 6px 0;
  opacity: 0; transform: translateY(28px);
  transition: opacity 420ms var(--ease-out), transform 520ms var(--ease-drawer);
}
.mobile-menu nav a[aria-current='page'] { color: var(--accent); }
.menu-open .mobile-menu nav a { opacity: 1; transform: none; }
.mobile-menu nav a:nth-child(2) { transition-delay: 50ms; }
.mobile-menu nav a:nth-child(3) { transition-delay: 100ms; }
.mobile-menu nav a:nth-child(4) { transition-delay: 150ms; }
.mobile-menu nav a:nth-child(5) { transition-delay: 200ms; }
.mobile-menu nav a:nth-child(6) { transition-delay: 250ms; }
.mobile-menu .mobile-menu-foot { margin-top: 32px; display: flex; flex-direction: column; gap: 10px; opacity: 0; transition: opacity 420ms var(--ease-out) 200ms; }
.menu-open .mobile-menu .mobile-menu-foot { opacity: 1; }
body.menu-open { overflow: hidden; }


main.public-main { padding-top: 112px; }

/* ---------- Sections & type scale ---------- */
.section { padding: clamp(56px, 9vw, 120px) 0; }
.section-tight { padding: clamp(36px, 6vw, 72px) 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(24px, 4vw, 40px); }
.section-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); letter-spacing: -0.035em; max-width: 22ch; }
.section-head p { color: var(--text-2); max-width: 52ch; margin-top: 10px; }
.display { font-size: clamp(2.6rem, 6.2vw, 5.4rem); line-height: 1.02; letter-spacing: -0.045em; font-weight: 620; }
.h1 { font-size: clamp(2rem, 4.4vw, 3.4rem); line-height: 1.05; letter-spacing: -0.04em; font-weight: 620; }
.h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); letter-spacing: -0.03em; }
.h3 { font-size: 1.15rem; letter-spacing: -0.015em; }
.lede { font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--text-2); max-width: 56ch; line-height: 1.55; }

.prose { color: var(--text-2); max-width: 68ch; }
.prose > * + * { margin-top: 14px; }
.prose h2, .prose h3, .prose h4 { color: var(--text); margin-top: 28px; }
.prose h2 { font-size: 1.35rem; } .prose h3 { font-size: 1.1rem; } .prose h4 { font-size: 1rem; }
.prose ul, .prose ol { padding-left: 20px; }
.prose li + li { margin-top: 6px; }
.prose li::marker { color: var(--text-3); }
.prose strong { color: var(--text); font-weight: 600; }
.prose code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(24px, 6vw, 72px) 0 clamp(40px, 7vw, 88px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.85fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 5.2vw, 4.6rem); }
.hero .lede { margin-top: 24px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 36px; }
.inline-pill {
  --g: 139 149 167;
  display: inline-flex; align-items: center; gap: 0.18em; vertical-align: 0.08em;
  height: 0.86em; padding: 0 0.26em 0 0.1em; margin: 0 0.04em;
  border-radius: 999px;
  background: linear-gradient(160deg, rgb(var(--g) / 28%), rgb(var(--g) / 10%));
  border: 1px solid rgb(var(--g) / 38%);
  color: rgb(var(--g));
  font-size: 0.78em; letter-spacing: -0.03em; font-weight: 640; line-height: 1;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 10%);
}
.inline-pill .ip-mark { display: grid; place-items: center; width: 0.66em; height: 0.66em; border-radius: 50%; background: rgb(var(--g)); color: #0b0b0d; }
.inline-pill .ip-mark .icon { width: 0.44em; height: 0.44em; }
.hero-card .core { padding: 0; overflow: hidden; }
.feature-top { position: relative; padding: 24px 24px 20px; overflow: hidden; }
.feature-top::before {
  content: ''; position: absolute; inset: -40% -20% auto auto; width: 70%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgb(var(--g, var(--accent-rgb)) / 30%), transparent 65%);
  pointer-events: none;
}
.feature-top > * { position: relative; }
.feature-body { padding: 0 24px 24px; }
.meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.meta-grid > div { background: var(--surface); padding: 14px 24px; }
.meta-grid dt { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
.meta-grid dd { margin: 4px 0 0; font-size: 0.94rem; font-weight: 500; }
.progress { height: 6px; border-radius: 999px; background: rgb(255 255 255 / 7%); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); transform-origin: left; }

/* ---------- Results ticker ---------- */
.ticker { position: relative; overflow: hidden; border-block: 1px solid var(--line); background: rgb(255 255 255 / 1.5%); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ticker-track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-group { display: flex; align-items: center; }
.ticker-item { display: inline-flex; align-items: center; gap: 10px; padding: 14px 28px; white-space: nowrap; font-size: 0.9rem; color: var(--text-2); border-right: 1px solid var(--line); }
.ticker-item strong { color: var(--text); font-weight: 600; }
.ticker-item .score { font-family: var(--mono); color: var(--text); background: rgb(255 255 255 / 6%); padding: 2px 8px; border-radius: 6px; font-size: 0.84rem; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Tournament rows ---------- */
.t-list { display: flex; flex-direction: column; gap: 10px; }
.t-row {
  --g: 139 149 167;
  position: relative;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 20px;
  padding: 16px 16px 16px 16px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--highlight);
  transition: border-color 180ms var(--ease-out), background-color 180ms var(--ease-out);
}
.t-row::before { content: ''; position: absolute; left: -1px; top: 18px; bottom: 18px; width: 2px; border-radius: 2px; background: rgb(var(--g)); opacity: 0.8; }
@media (hover: hover) and (pointer: fine) { .t-row:hover { border-color: var(--line-3); background: var(--surface-2); } }
.t-row-main { min-width: 0; }
.t-row-title { font-size: 1.08rem; font-weight: 600; letter-spacing: -0.015em; }
.t-row-title a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.t-row-meta { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; margin-top: 8px; color: var(--text-2); font-size: 0.86rem; }
.t-row-meta span { display: inline-flex; align-items: center; gap: 6px; }
.t-row-meta .icon { color: var(--text-3); }
.t-row-spots { width: 120px; }
.t-row-spots .num { font-size: 0.76rem; color: var(--text-2); display: flex; justify-content: space-between; gap: 8px; margin-bottom: 7px; white-space: nowrap; }
.t-row-spots .num span:last-child { color: var(--text-3); }
.t-row-action { position: relative; z-index: 1; }
.t-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.t-card { --g: 139 149 167; position: relative; display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--highlight); transition: border-color 180ms var(--ease-out), background-color 180ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .t-card:hover { border-color: var(--line-3); background: var(--surface-2); } }
.t-card h3 { font-size: 1.02rem; letter-spacing: -0.015em; }
.t-card h3 a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.t-card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--text-2); font-size: 0.84rem; }

/* ---------- Champions ---------- */
.champ-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.champ { position: relative; overflow: hidden; }
.champ .core { display: flex; flex-direction: column; gap: 14px; }
.champ .trophy { color: #e5c07b; }
.champ-name { font-size: 1.35rem; font-weight: 620; letter-spacing: -0.03em; }

/* ---------- Page header (public) ---------- */
.page-head { padding-top: clamp(16px, 4vw, 40px); padding-bottom: clamp(20px, 4vw, 36px); }
.page-head h1 { margin-top: 16px; }
.page-head .lede { margin-top: 14px; }
.breadcrumb { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 0.86rem; transition: color 180ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .breadcrumb:hover { color: var(--text); } }

.t-hero { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: clamp(20px, 4vw, 48px); align-items: center; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.fact { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 999px; background: rgb(255 255 255 / 4%); border: 1px solid var(--line); font-size: 0.86rem; color: var(--text-2); }
.fact .icon { color: var(--text-3); }
.action-panel .core { display: flex; flex-direction: column; gap: 16px; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 0.9rem; padding: 10px 0; border-top: 1px solid var(--line); }
.kv:first-of-type { border-top: 0; }
.kv dt { color: var(--text-2); } .kv dd { margin: 0; font-weight: 500; text-align: right; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgb(255 255 255 / 3.5%); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; max-width: 100%; width: max-content; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 16px; border-radius: 999px; color: var(--text-2); font-size: 0.88rem; font-weight: 500; white-space: nowrap; transition: color 180ms var(--ease-out), background-color 180ms var(--ease-out); }
.tabs a[aria-current='page'] { background: var(--surface-3); color: var(--text); box-shadow: inset 0 1px 0 rgb(255 255 255 / 7%), 0 0 0 1px var(--line-2); }
@media (hover: hover) and (pointer: fine) { .tabs a:hover { color: var(--text); } }
.tabs .count { font-family: var(--mono); font-size: 0.72rem; color: var(--text-3); }
.tabs .pill-count { font-family: var(--mono); font-size: 0.7rem; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--accent); color: var(--on-accent); font-weight: 600; }
.champion-banner.mb { margin-bottom: 24px; }
.segmented { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgb(255 255 255 / 3.5%); border: 1px solid var(--line); flex-wrap: wrap; }
.segmented a { height: 32px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 999px; font-size: 0.84rem; color: var(--text-2); font-weight: 500; white-space: nowrap; transition: color 180ms var(--ease-out), background-color 180ms var(--ease-out); }
.segmented a[aria-current='true'] { background: var(--surface-3); color: var(--text); box-shadow: 0 0 0 1px var(--line-2); }
@media (hover: hover) and (pointer: fine) { .segmented a:hover { color: var(--text); } }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- Bracket ---------- */
.bracket-wrap { position: relative; }
.bracket-scroll { overflow-x: auto; overscroll-behavior-x: contain; padding: 4px 2px 18px; scrollbar-width: thin; scrollbar-color: var(--line-3) transparent; }
.bracket-stage + .bracket-stage { margin-top: 36px; }
.stage-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.bracket { --col: 236px; --gap: 36px; --row: 92px; display: flex; min-width: max-content; }
.bk-round { display: flex; flex-direction: column; width: var(--col); flex: none; }
.bk-round + .bk-round { margin-left: var(--gap); }
.bk-round-title { height: 26px; margin-bottom: 8px; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-body { display: flex; flex-direction: column; flex: 1; min-height: calc(var(--rows) * var(--row)); }
.bk-slot { position: relative; flex: 1; display: flex; align-items: center; padding: 6px 0; }
/* connectors */
.bk-round.merge .bk-slot::after, .bk-round.straight .bk-slot::after { content: ''; position: absolute; right: calc(var(--gap) / -2); width: calc(var(--gap) / 2); top: 50%; border-top: 1px solid var(--line-3); }
.bk-round.straight .bk-slot::after { right: calc(var(--gap) * -1); width: var(--gap); }
.bk-round.merge .bk-slot::before { content: ''; position: absolute; right: calc(var(--gap) / -2); border-right: 1px solid var(--line-3); }
.bk-round.merge .bk-slot:nth-child(odd)::before { top: 50%; bottom: 0; }
.bk-round.merge .bk-slot:nth-child(even)::before { top: 0; bottom: 50%; }
.bk-round.merge + .bk-round .bk-slot > .match::before { content: ''; position: absolute; left: calc(var(--gap) / -2); width: calc(var(--gap) / 2); top: 50%; border-top: 1px solid var(--line-3); }

.match {
  position: relative; width: 100%;
  border-radius: 12px; background: var(--surface); border: 1px solid var(--line-2);
  box-shadow: var(--highlight), 0 12px 30px -24px rgb(0 0 0 / 80%);
  overflow: visible;
}
a.match { display: block; transition: border-color 180ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { a.match:hover { border-color: rgb(var(--accent-rgb) / 55%); } }
.match-side { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 8px; height: 34px; padding: 0 4px 0 10px; font-size: 0.86rem; }
.match-side + .match-side { border-top: 1px solid var(--line); }
.match-side .seed { font-family: var(--mono); font-size: 0.7rem; color: var(--text-3); text-align: right; }
.match-side .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.match-side .score { min-width: 30px; height: 26px; display: grid; place-items: center; border-radius: 7px; font-family: var(--mono); font-size: 0.84rem; color: var(--text-2); background: rgb(255 255 255 / 3%); }
.match-side.win .name { color: var(--text); font-weight: 600; }
.match-side.win .score { background: rgb(var(--accent-rgb) / 16%); color: color-mix(in srgb, var(--accent) 65%, white); font-weight: 600; }
.match-side.lose .name, .match-side.lose .score { color: var(--text-3); }
.match-side.tbd .name { color: var(--text-3); font-style: normal; font-size: 0.8rem; }
.match-side.bye .name { color: var(--text-3); font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; }
.match-tag { position: absolute; top: -9px; left: 10px; display: inline-flex; align-items: center; gap: 6px; height: 18px; padding: 0 7px; border-radius: 6px; background: var(--canvas); border: 1px solid var(--line-2); font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.06em; color: var(--text-3); }
.match-tag.right { left: auto; right: 10px; }
.match.is-live { border-color: rgb(var(--accent-rgb) / 60%); box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / 12%), var(--highlight); }
.match.is-live .match-tag.right { color: color-mix(in srgb, var(--accent) 70%, white); border-color: rgb(var(--accent-rgb) / 40%); }
.match.is-bye { opacity: 0.42; border-style: dashed; box-shadow: none; background: transparent; }
.match.is-mine { border-color: rgb(var(--info-rgb) / 55%); }
.match.ghost { opacity: 0.18; border-style: dashed; background: transparent; box-shadow: none; }
.match.ghost .match-side { height: 20px; }
.champion-banner { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-radius: 18px; background: linear-gradient(120deg, rgb(229 192 123 / 12%), rgb(229 192 123 / 3%)); border: 1px solid rgb(229 192 123 / 28%); }
.champion-banner .icon { color: #e5c07b; }
.edge-fade { position: absolute; top: 0; bottom: 18px; width: 40px; pointer-events: none; opacity: 0; transition: opacity 180ms var(--ease-out); }
.edge-fade.l { left: 0; background: linear-gradient(90deg, var(--canvas), transparent); }
.edge-fade.r { right: 0; background: linear-gradient(-90deg, var(--canvas), transparent); }
.bracket-wrap.can-left .edge-fade.l, .bracket-wrap.can-right .edge-fade.r { opacity: 1; }

/* ---------- Matches list ---------- */
.fixture { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto minmax(0, 1fr) 140px; align-items: center; gap: 14px; padding: 12px 16px; }
.fixture + .fixture { border-top: 1px solid var(--line); }
.fixture .p { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fixture .p.right { text-align: right; }
.fixture .p.win { color: var(--text); font-weight: 600; }
.fixture .p.lose { color: var(--text-3); }
.fixture .vs { font-family: var(--mono); font-size: 0.86rem; min-width: 64px; text-align: center; padding: 4px 8px; border-radius: 8px; background: rgb(255 255 255 / 4%); color: var(--text-2); }
.fixture .fx-meta { text-align: right; font-size: 0.8rem; color: var(--text-3); }
.fixture .fx-no { font-family: var(--mono); font-size: 0.74rem; color: var(--text-3); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th { text-align: left; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); font-weight: 500; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; }
.table tbody tr { transition: background-color 120ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .table tbody tr:hover { background: rgb(255 255 255 / 2%); } }
.table .pos { font-family: var(--mono); color: var(--text-3); width: 36px; }
.table tr.top td { background: rgb(var(--accent-rgb) / 5%); }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field > label, .field-label { font-size: 0.86rem; font-weight: 550; color: var(--text); }
.field .hint { font-size: 0.8rem; color: var(--text-3); line-height: 1.45; }
.field .error { font-size: 0.8rem; color: var(--danger); display: flex; gap: 6px; align-items: center; }
.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 10px 14px;
  border-radius: var(--r-control); border: 1px solid var(--line-2);
  background: var(--canvas); color: var(--text);
  font-size: 0.95rem; line-height: 1.4;
  transition: border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
  box-shadow: inset 0 1px 2px rgb(0 0 0 / 30%);
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
.textarea.tall { min-height: 220px; font-family: var(--mono); font-size: 0.86rem; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: rgb(var(--accent-rgb) / 70%); box-shadow: 0 0 0 4px rgb(var(--accent-rgb) / 14%); }
.input[aria-invalid='true'], .select[aria-invalid='true'] { border-color: rgb(var(--danger-rgb) / 70%); }
.input-sm { min-height: 34px; padding: 6px 10px; font-size: 0.86rem; border-radius: 9px; }
.select { appearance: none; -webkit-appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%2371717a'><path d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/></svg>"); background-repeat: no-repeat; background-position: right 14px center; background-size: 14px; }
.input[type='color'] { padding: 4px; width: 56px; height: 44px; }
.input.score-input { width: 72px; text-align: center; font-family: var(--mono); font-size: 1.2rem; font-weight: 600; }
.check { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; font-size: 0.92rem; line-height: 1.5; }
.check input { appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 1px 0 0; border-radius: 6px; border: 1px solid var(--line-3); background: var(--canvas); display: grid; place-items: center; cursor: pointer; transition: background-color 140ms var(--ease-out), border-color 140ms var(--ease-out); }
.check input::after { content: ''; width: 10px; height: 6px; border-left: 2px solid var(--on-accent); border-bottom: 2px solid var(--on-accent); transform: translateY(-1px) rotate(-45deg) scale(0.6); opacity: 0; transition: transform 160ms var(--ease-out), opacity 120ms var(--ease-out); }
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { opacity: 1; transform: translateY(-1px) rotate(-45deg) scale(1); }
.check input[type='radio'] { border-radius: 50%; }
.check input[type='radio']::after { width: 8px; height: 8px; border: 0; border-radius: 50%; background: var(--on-accent); transform: scale(0.5); }
.check input[type='radio']:checked::after { transform: scale(1); }
.check .sub { display: block; color: var(--text-3); font-size: 0.82rem; }
.option-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.option-card { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 14px 46px; border-radius: 14px; border: 1px solid var(--line-2); background: rgb(255 255 255 / 2%); cursor: pointer; transition: border-color 160ms var(--ease-out), background-color 160ms var(--ease-out); }
.option-card input { position: absolute; left: 16px; top: 16px; }
.option-card:has(input:checked) { border-color: rgb(var(--accent-rgb) / 60%); background: rgb(var(--accent-rgb) / 6%); }
.option-card strong { font-weight: 600; font-size: 0.92rem; }
.option-card span { font-size: 0.8rem; color: var(--text-3); line-height: 1.4; }
.fieldset { border: 1px solid var(--line); border-radius: var(--r-core); padding: 20px; margin: 0; }
.fieldset legend { padding: 0 8px; font-size: 0.8rem; font-family: var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.member-row { display: grid; grid-template-columns: 32px minmax(0, 1.3fr) minmax(0, 1.5fr) minmax(0, 0.9fr); gap: 10px; align-items: center; }
.member-row + .member-row { margin-top: 10px; }
.member-no { font-family: var(--mono); font-size: 0.78rem; color: var(--text-3); text-align: center; }
.form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.error-summary { padding: 14px 16px; border-radius: 14px; background: rgb(var(--danger-rgb) / 8%); border: 1px solid rgb(var(--danger-rgb) / 25%); color: var(--danger); font-size: 0.9rem; }
.error-summary ul { margin: 6px 0 0; padding-left: 18px; }

/* ---------- Notices, empty states ---------- */
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: rgb(255 255 255 / 3%); border: 1px solid var(--line); font-size: 0.9rem; color: var(--text-2); }
.notice .icon { margin-top: 2px; }
.notice-info { background: rgb(var(--info-rgb) / 7%); border-color: rgb(var(--info-rgb) / 20%); }
.notice-info .icon { color: var(--info); }
.notice-warning { background: rgb(var(--warning-rgb) / 7%); border-color: rgb(var(--warning-rgb) / 22%); }
.notice-warning .icon { color: var(--warning); }
.notice-success { background: rgb(var(--success-rgb) / 7%); border-color: rgb(var(--success-rgb) / 22%); }
.notice-success .icon { color: var(--success); }
.notice-danger { background: rgb(var(--danger-rgb) / 7%); border-color: rgb(var(--danger-rgb) / 22%); }
.notice-danger .icon { color: var(--danger); }
.notice strong { color: var(--text); }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: clamp(32px, 6vw, 56px) 20px; border-radius: var(--r-core); border: 1px dashed var(--line-2); background: rgb(255 255 255 / 1.5%); }
.empty-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text-2); margin-bottom: 6px; box-shadow: var(--highlight); }
.empty-icon .icon { width: 28px; height: 28px; }
.empty h3 { font-size: 1.05rem; }
.empty p { color: var(--text-2); max-width: 44ch; font-size: 0.92rem; }
.empty .btn { margin-top: 8px; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; top: 16px; right: 16px; z-index: 80; display: flex; flex-direction: column; gap: 8px; width: min(400px, calc(100% - 32px)); pointer-events: none; }
.toast {
  pointer-events: auto;
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 14px 14px 16px; border-radius: 16px;
  background: rgb(24 24 27 / 92%); border: 1px solid var(--line-2);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 20px 50px -20px rgb(0 0 0 / 80%), var(--highlight);
  font-size: 0.9rem;
  transition: transform 420ms var(--ease-drawer), opacity 300ms var(--ease-out);
}
@starting-style { .toast { transform: translateY(-12px) scale(0.98); opacity: 0; } }
.toast.leaving { transform: translateY(-12px) scale(0.98); opacity: 0; transition-duration: 200ms; }
.toast .icon { margin-top: 2px; }
.toast-success .icon { color: var(--success); }
.toast-error .icon { color: var(--danger); }
.toast-info .icon { color: var(--info); }
.toast-warning .icon { color: var(--warning); }
.toast p { flex: 1; color: var(--text); }
.toast button { background: none; border: 0; color: var(--text-3); cursor: pointer; padding: 2px; border-radius: 6px; }

/* ---------- Dialog ---------- */
dialog.confirm {
  border: 0; padding: 0; background: transparent; color: var(--text);
  width: min(440px, calc(100% - 32px));
  opacity: 0; transform: scale(0.96);
  transition: opacity 200ms var(--ease-out), transform 240ms var(--ease-out), overlay 240ms allow-discrete, display 240ms allow-discrete;
}
dialog.confirm[open] { opacity: 1; transform: none; }
@starting-style { dialog.confirm[open] { opacity: 0; transform: scale(0.96); } }
dialog.confirm::backdrop { background: rgb(0 0 0 / 0%); -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0); transition: background-color 240ms var(--ease-out), backdrop-filter 240ms var(--ease-out), overlay 240ms allow-discrete, display 240ms allow-discrete; }
dialog.confirm[open]::backdrop { background: rgb(0 0 0 / 55%); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
@starting-style { dialog.confirm[open]::backdrop { background: rgb(0 0 0 / 0%); backdrop-filter: blur(0); } }
dialog.confirm .core { display: flex; flex-direction: column; gap: 14px; }
dialog.confirm h2 { font-size: 1.15rem; }
dialog.confirm p { color: var(--text-2); font-size: 0.92rem; }

/* ---------- Scroll reveal (public only) ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); filter: blur(6px); transition: opacity 700ms var(--ease-out), transform 800ms var(--ease-out), filter 700ms var(--ease-out); transition-delay: calc(var(--i, 0) * 60ms); }
.js .reveal.in { opacity: 1; transform: none; filter: none; }

/* ---------- Footer ---------- */
.site-footer { margin-top: clamp(40px, 8vw, 96px); border-top: 1px solid var(--line); }
.footer-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 24px; padding-bottom: 40px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 0.84rem; }
.footer-base nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-base a { transition: color 180ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .footer-base a:hover { color: var(--text); } }

/* ---------- Dashboard (student) ---------- */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.next-match .core { display: flex; flex-direction: column; gap: 20px; }
.versus { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; }
.versus .side { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.versus .side.right { text-align: right; align-items: flex-end; }
.versus .side strong { font-size: 1.3rem; letter-spacing: -0.03em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.versus .vs-mark { font-family: var(--mono); font-size: 0.8rem; color: var(--text-3); letter-spacing: 0.14em; }
.entry-item { display: flex; align-items: center; gap: 14px; padding: 14px 18px; }
.entry-item + .entry-item { border-top: 1px solid var(--line); }
.report-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.score-field { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 0.72rem; color: var(--text-3); font-family: var(--mono); letter-spacing: 0.04em; }

/* ---------- Auth pages ---------- */
.auth-wrap { min-height: calc(100dvh - 200px); display: grid; place-items: center; padding-top: 24px; padding-bottom: 64px; }
.auth-card { width: min(440px, 100%); }
.auth-card .core { display: flex; flex-direction: column; gap: 20px; padding: clamp(24px, 4vw, 36px); }
.auth-card h1 { font-size: 1.6rem; letter-spacing: -0.035em; }

/* ---------- Coming soon ---------- */
.soon { min-height: 100dvh; display: grid; place-items: center; padding: 48px 16px; text-align: center; }
.soon-inner { display: flex; flex-direction: column; align-items: center; max-width: 640px; }
.soon-logo { height: clamp(104px, 17vh, 150px); width: auto; margin-bottom: 36px; filter: drop-shadow(0 14px 34px rgb(0 0 0 / 50%)); }
.soon-mark { margin-bottom: 36px; }
.soon-mark .brand-mark { width: 64px; height: 64px; border-radius: 20px; }
.soon-mark .brand-mark svg { width: 34px; height: 34px; }
.soon-kicker { font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); margin-bottom: 16px; }
.soon .lede { margin: 22px auto 0; }
.soon .btn { margin-top: 44px; }
.soon-flag {
  position: fixed; left: 16px; bottom: 16px; z-index: 45;
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  font-size: 0.8rem; font-weight: 500; color: var(--warning);
  background: rgb(20 20 23 / 92%); border: 1px solid rgb(var(--warning-rgb) / 30%);
  backdrop-filter: blur(10px); box-shadow: 0 10px 30px -12px rgb(0 0 0 / 70%);
}

/* ---------- Display (projector) mode ---------- */
body.display-mode { background: var(--canvas); }
.display-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 32px; border-bottom: 1px solid var(--line); }
.display-head h1 { font-size: clamp(1.6rem, 2.6vw, 2.6rem); letter-spacing: -0.035em; }
.display-body { display: grid; grid-template-columns: minmax(0, 1fr) 360px; min-height: calc(100dvh - 110px); }
.display-main { padding: 28px 32px; overflow: auto; }
.display-side { border-left: 1px solid var(--line); padding: 28px 24px; display: flex; flex-direction: column; gap: 20px; background: rgb(255 255 255 / 1.5%); }
.display-mode .bracket { --col: 250px; --row: 96px; }
@media (min-width: 1101px) {
  .display-mode .display-main { height: calc(100dvh - 110px); overflow: hidden; }
  .display-mode .display-main .bracket-scroll { overflow: visible; padding-bottom: 0; }
  .display-mode .fit-inner { width: max-content; min-width: 100%; transform-origin: top left; }
  .display-mode .fit-inner:has(.table) { width: 100%; }
  .display-mode .edge-fade { display: none; }
}
.display-mode .match-side { font-size: 0.95rem; height: 38px; }
.now-card { padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid rgb(var(--accent-rgb) / 40%); }
.now-card .row-between { font-size: 1rem; font-weight: 600; }

/* ---------- Admin layout ---------- */
body.admin { background: var(--canvas); }
.admin-shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100dvh; }
.admin-side { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 4px; padding: 18px 12px; border-right: 1px solid var(--line); background: var(--canvas-2); overflow-y: auto; }
.admin-side .brand { padding: 4px 8px 18px; }
.admin-nav { display: flex; flex-direction: column; gap: 2px; }
.admin-nav .group { margin: 16px 10px 6px; }
.admin-nav a { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border-radius: 10px; color: var(--text-2); font-size: 0.9rem; font-weight: 500; transition: background-color 120ms var(--ease-out), color 120ms var(--ease-out); }
.admin-nav a .icon { color: var(--text-3); }
.admin-nav a[aria-current='page'] { background: rgb(255 255 255 / 6%); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.admin-nav a[aria-current='page'] .icon { color: var(--accent); }
@media (hover: hover) and (pointer: fine) { .admin-nav a:hover { background: rgb(255 255 255 / 4%); color: var(--text); } }
.admin-nav .pill-count { margin-left: auto; font-family: var(--mono); font-size: 0.72rem; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-weight: 600; }
.admin-side-foot { margin-top: auto; padding: 12px 8px 4px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.admin-me { display: flex; align-items: center; gap: 10px; font-size: 0.86rem; }
.admin-main { min-width: 0; padding: 28px clamp(16px, 3vw, 40px) 64px; }
.admin-top { display: none; }
.admin-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.admin-head h1 { font-size: clamp(1.4rem, 2.2vw, 1.8rem); letter-spacing: -0.03em; }
.admin-head p { color: var(--text-2); margin-top: 6px; font-size: 0.92rem; }
.admin-head .crumbs { display: flex; gap: 6px; align-items: center; color: var(--text-3); font-size: 0.84rem; margin-bottom: 8px; }
.admin-head .crumbs a:hover { color: var(--text); }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: var(--r-core); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--highlight); }
.stat .stat-value { font-family: var(--mono); font-size: 2rem; font-weight: 600; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat .stat-label { font-size: 0.84rem; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.stat.attn { border-color: rgb(var(--accent-rgb) / 35%); background: linear-gradient(160deg, rgb(var(--accent-rgb) / 8%), var(--surface) 60%); }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.admin-grid-even { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 20px; }
.list-row + .list-row { border-top: 1px solid var(--line); }
.inline-form { display: inline; }
.actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.bulkbar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: rgb(255 255 255 / 2%); flex-wrap: wrap; }
.seed-input { width: 64px; }
.quick-score { display: grid; grid-template-columns: minmax(0, 1fr) 58px 14px 58px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-width: 320px; }
.quick-score .score-input { width: 58px; font-size: 1rem; }
.quick-score .qs-a { text-align: right; font-weight: 550; color: var(--text-2); }
.quick-score .qs-b { font-weight: 550; color: var(--text-2); }
.quick-score .win { color: var(--text); font-weight: 650; }
.match-editor { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 16px; align-items: center; }
.match-editor .side { display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center; padding: 18px; border-radius: 16px; background: rgb(255 255 255 / 2%); border: 1px solid var(--line); }
.match-editor .side strong { font-size: 1.15rem; letter-spacing: -0.02em; }
.log-row { display: grid; grid-template-columns: 150px 140px minmax(0, 1fr); gap: 14px; padding: 10px 20px; font-size: 0.86rem; }
.log-row + .log-row { border-top: 1px solid var(--line); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { position: relative; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; }
.swatch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.swatch:has(input:checked) { border-color: var(--text); box-shadow: 0 0 0 3px var(--canvas) inset; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-grid, .admin-grid-even { grid-template-columns: minmax(0, 1fr); }
  .t-hero { grid-template-columns: minmax(0, 1fr); }
  .display-body { grid-template-columns: minmax(0, 1fr); }
  .display-side { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 900px) {
  .nav-links, .nav-actions { display: none; }
  .menu-toggle { display: block; }
  .site-nav { padding: 6px 6px 6px 14px; }
  .hero-grid, .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-shell { grid-template-columns: minmax(0, 1fr); }
  .admin-side { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 50; transform: translateX(-102%); transition: transform 360ms var(--ease-drawer); box-shadow: 30px 0 60px -30px rgb(0 0 0 / 80%); }
  .admin-open .admin-side { transform: none; }
  .admin-scrim { position: fixed; inset: 0; z-index: 45; background: rgb(0 0 0 / 50%); opacity: 0; visibility: hidden; transition: opacity 300ms var(--ease-out), visibility 0s linear 300ms; }
  .admin-open .admin-scrim { opacity: 1; visibility: visible; transition: opacity 300ms var(--ease-out), visibility 0s; }
  .admin-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: sticky; top: 0; z-index: 30; padding: 10px 16px; background: rgb(12 12 15 / 85%); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
  .admin-main { padding-top: 20px; }
}
@media (max-width: 767px) {
  .t-row { grid-template-columns: auto minmax(0, 1fr); gap: 12px 14px; }
  .t-row-spots { grid-column: 1 / -1; width: auto; }
  .t-row-action { grid-column: 1 / -1; }
  .t-row-action .btn { width: 100%; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .member-row { grid-template-columns: 24px minmax(0, 1fr); }
  .member-row > :nth-child(n+3) { grid-column: 2; }
  .fixture { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px 10px; }
  .fixture .fx-no { grid-column: 1 / -1; order: -1; }
  .fixture .fx-meta { grid-column: 1 / -1; text-align: left; }
  .stat-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .stat-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .stat-grid.three .stat { padding: 14px; }
  .stat-grid.three .stat-value { font-size: 1.5rem; }
  .log-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .match-editor { grid-template-columns: minmax(0, 1fr); }
  .versus .side strong { font-size: 1.1rem; }
  .meta-grid > div { padding: 12px 18px; }
  .table.stack-mobile thead { display: none; }
  .table.stack-mobile tr { display: block; padding: 10px 4px; border-bottom: 1px solid var(--line); }
  .table.stack-mobile td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 4px 10px; text-align: right; }
  .table.stack-mobile td::before { content: attr(data-label); font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); text-align: left; }
  .table.stack-mobile td.num { justify-content: space-between; }
  .brand-text small { display: none; }
  .t-row > .game-mark { align-self: start; }
  .quick-score { grid-template-columns: minmax(0, 1fr) 58px; min-width: 0; row-gap: 6px; }
  .quick-score .qs-a { grid-column: 1; grid-row: 1; text-align: left; }
  .quick-score [name=score1] { grid-column: 2; grid-row: 1; }
  .quick-score > .faint.center { display: none; }
  .quick-score .qs-b { grid-column: 1; grid-row: 2; }
  .quick-score [name=score2] { grid-column: 2; grid-row: 2; }
  .quick-score > .row { grid-column: 1 / -1; grid-row: 3; justify-content: flex-start !important; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
  .js .reveal { transform: none; filter: none; transition: opacity 300ms ease; }
  .ticker-track { animation: none; }
  .ticker { overflow-x: auto; }
  .live-dot::after { animation: none; }
  .mobile-menu nav a { transform: none; transition: opacity 200ms ease; }
  .btn:active { transform: none; }
  .toast, .toast.leaving { transform: none; }
  dialog.confirm, dialog.confirm[open] { transform: none; }
  .admin-side { transition: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .site-nav, .mobile-menu, .toast, .admin-top { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* ---------- Print (brackets, entry lists) ---------- */
@media print {
  :root { --canvas: #fff; --surface: #fff; --surface-2: #fff; --text: #111; --text-2: #333; --text-3: #666; --line: #ddd; --line-2: #ccc; --line-3: #999; }
  body, body.admin { background: #fff; color: #111; }
  body::before, body::after { display: none; }
  .site-nav, .mobile-menu, .site-footer, .admin-side, .admin-top, .tabs, .no-print, .toasts, .btn { display: none !important; }
  .admin-shell { display: block; }
  main.public-main { padding-top: 0; }
  .bracket-scroll { overflow: visible; }
  .match { box-shadow: none; break-inside: avoid; }
  .bezel, .card { box-shadow: none; }
}
