* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  max-width: 100%;
}

/* Dark mode (default) — comp logo */
body.theme-dark,
body.theme-comp {
  --bg: #0c0c0c;
  --surface: #141414;
  --text: #fafafa;
  --text-muted: #737373;
  --accent: #c41e3a;
  --border: rgba(255,255,255,0.06);
  --radius: 0;
}

/* Light mode — casual logo */
body.theme-light,
body.theme-casual {
  --bg: #f5f5f5;
  --surface: #ffffff;
  --text: #0c0c0c;
  --text-muted: #525252;
  --accent: #8b1528;
  --border: rgba(0,0,0,0.08);
  --radius: 4px;
}

body {
  font-family: 'Oswald', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-weight: 400;
  line-height: 1.5;
  transition: background 0.3s ease;
}

/* Fluid animation timing */
body {
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: 40px;
  text-decoration: none;
  color: var(--text);
}

.logo-link img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

/* Header logo: dark = comp, light = casual */
.logo-link .logo-comp { display: block; }
.logo-link .logo-casual { display: none; }
body.theme-light .logo-link .logo-comp { display: none; }
body.theme-light .logo-link .logo-casual { display: block; }
body.theme-casual .logo-link .logo-comp { display: none; }
body.theme-casual .logo-link .logo-casual { display: block; }

.logo-wordmark {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav a {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.28s var(--ease-out);
}

.nav a:hover,
.nav a.active {
  color: var(--text);
}

.nav a.active {
  color: var(--accent);
}

.theme-switch {
  display: flex;
  align-items: center;
  gap: 4px;
}

.theme-switch button {
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.2s;
}

.theme-switch button.active {
  color: var(--accent);
}

.theme-switch button:not(.active):hover {
  color: var(--text);
}

.theme-switch span {
  color: var(--border);
  font-weight: 300;
}

/* Dark/Light theme toggle — top right, never follows system */
.header .theme-switch {
  display: flex;
  margin-left: auto;
}
.header .theme-switch .theme-btn {
  min-width: 4rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: none;
  color: var(--text);
  cursor: pointer;
  margin-left: auto;
  margin-right: 8px;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.header.open .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.header.open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.header.open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }

  .header-inner {
    flex-wrap: nowrap;
  }

  .nav-wrap {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    z-index: 40;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  }

  .header.open .nav-wrap {
    max-height: 80vh;
  }

  .nav-wrap .nav {
    flex-direction: column;
    gap: 0;
    padding: 0;
    align-items: stretch;
  }

  .nav-wrap .nav a {
    padding: 14px 24px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9375rem;
  }

  .nav-wrap .nav a:last-child {
    border-bottom: none;
  }

  .header .theme-switch {
    margin-left: 0;
  }
}

/* Hero — home page */
.hero {
  padding: 80px 24px 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 65%);
  opacity: 0.06;
  pointer-events: none;
}

.hero-logo {
  width: 100px;
  height: 100px;
  margin: 0 auto 32px;
  object-fit: contain;
  display: block;
  position: relative;
  z-index: 1;
}

.hero .logo-comp { display: block; margin: 0 auto; }
.hero .logo-casual { display: none; margin: 0 auto; }
body.theme-light .hero .logo-comp { display: none; }
body.theme-light .hero .logo-casual { display: block; }
body.theme-casual .hero .logo-comp { display: none; }
body.theme-casual .hero .logo-casual { display: block; }

.hero .hero-brand {
  position: relative;
  z-index: 1;
  margin-top: 48px;
  margin-bottom: 12px;
  line-height: 1.05;
}

.hero .team-word {
  font-size: 2.75rem;
  font-weight: 600;
  letter-spacing: 0.35em;
  color: var(--accent);
  display: block;
  margin-bottom: 8px;
}

.hero .hero-title {
  font-size: clamp(2.75rem, 6vw, 4.25rem);
  font-weight: 700;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--text);
  margin: -2px 0 0;
  line-height: 1;
}

.hero .tagline {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
  max-width: 420px;
  margin: 0 auto;
  line-height: 1.5;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
  position: relative;
  z-index: 1;
}

/* Home statement block */
.home-statement {
  padding: 48px 24px;
  text-align: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.home-statement .statement-line {
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.7;
}

.home-statement .statement-line strong {
  color: var(--text);
}

/* Live banner — full width on PC */
.live-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 24px;
  background: linear-gradient(90deg, transparent, rgba(196, 30, 58, 0.15), transparent);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

@media (min-width: 900px) {
  .live-banner {
    padding: 14px 48px;
  }
}

.live-banner a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s, transform 0.2s;
}

.live-banner a:hover {
  color: var(--text);
  transform: scale(1.02);
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--accent);
  color: var(--text);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  border-radius: 2px;
  animation: pulse-live 2s ease-in-out infinite;
}

@keyframes pulse-live {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

/* Ticker */
.ticker-wrap {
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}

.ticker {
  display: flex;
  gap: 48px;
  width: max-content;
  animation: ticker 30s linear infinite;
}

.ticker span {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Stats strip */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 24px;
  padding: 48px 24px;
  border-bottom: 1px solid var(--border);
}

.stat {
  text-align: center;
}

.stat-num {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--accent);
  display: block;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Feature cards (home) */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.feature-card {
  display: block;
  padding: 32px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.28s var(--ease-out), transform 0.28s var(--ease-out), box-shadow 0.28s var(--ease-out);
}

.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.feature-card .card-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.feature-card .card-title {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.feature-card .card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Links page — stacked cards, not inline */
.page-content-links {
  padding-top: 48px;
  padding-bottom: 80px;
}

.page-content-links .wrap-links {
  max-width: 420px;
}

.page-content-links .links-intro {
  font-size: 0.875rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: -4px;
  margin-bottom: 28px;
  line-height: 1.5;
}

.page-content-links .links-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px;
}

.page-content-links .links-grid > .link-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start;
  gap: 4px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.25s var(--ease-out), background 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
  width: 100%;
  min-height: 72px;
  box-sizing: border-box;
}

.page-content-links .link-card:hover {
  border-color: var(--accent);
  background: rgba(196, 30, 58, 0.06);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.page-content-links .link-card-label {
  display: block !important;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
}

.page-content-links .link-card-desc {
  display: block !important;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.page-content-links .link-card-arrow {
  display: block !important;
  margin-top: 2px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}

.page-content-links .link-card:hover .link-card-arrow {
  opacity: 1;
  transform: translateX(0);
}

@media (min-width: 640px) {
  .page-content-links .wrap-links {
    max-width: 520px;
  }
  .page-content-links .links-grid {
    gap: 14px;
  }
  .page-content-links .links-grid > .link-card {
    padding: 24px 28px;
    min-height: 80px;
  }
}

/* Shop coming soon */
.shop-coming {
  text-align: center;
  padding: 80px 24px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  margin-top: 24px;
}

.shop-coming .coming-title {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 12px;
}

.shop-coming p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  max-width: 360px;
  margin: 0 auto 24px;
  line-height: 1.6;
}

/* Social footer */
.footer-socials {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.footer-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: border-color 0.2s, color 0.2s;
}

.footer-socials a[aria-label="Twitch"],
.footer-socials a[aria-label="Discord"],
.footer-socials a[aria-label="X"],
.footer-socials a[aria-label="Bluesky"] {
  padding: 0;
  min-width: 40px;
}

.footer-socials a[aria-label="Twitch"] {
  font-size: 1.1rem;
}

.footer-socials a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Twitch CTA block */
.watch-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 60px 24px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 40px;
}

.watch-cta .watch-title {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.watch-cta p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  max-width: 400px;
}

/* Page content */
.page-content {
  padding: 80px 0 100px;
}

.section {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.section-head {
  margin-bottom: 40px;
}

.section-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
}

.about-text {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 560px;
  line-height: 1.7;
}

/* Leadership (About page) */
.leadership-list {
  list-style: none;
  margin-top: 32px;
}

.leadership-list li {
  font-size: 0.9375rem;
  color: var(--text-muted);
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.leadership-list .role {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  min-width: 120px;
}

.leadership-list .person {
  color: var(--accent);
  font-weight: 500;
}
.leadership-list .person.person-owner {
  color: #c9a227;
  font-weight: 600;
}

/* Org chart (About page) */
.org-chart {
  margin-top: 24px;
}

.org-tier {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.org-tier-owner {
  margin-bottom: 0;
}

.org-connector {
  width: 1px;
  height: 24px;
  margin: 0 auto;
  background: var(--border);
}

.org-card {
  min-width: 180px;
  max-width: 240px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.org-card-owner {
  min-width: 200px;
  border-color: rgba(201, 162, 39, 0.35);
  background: rgba(201, 162, 39, 0.06);
}

.org-role {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.org-name {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text);
}

.org-name-owner {
  font-size: 1.25rem;
  color: #c9a227;
  font-weight: 700;
}

.org-reports {
  font-size: 0.6875rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  margin-top: 2px;
}

.org-tier-assistants .org-card-assistants {
  max-width: 360px;
}

.org-tier-lead {
  margin-top: 0;
}

.org-tier-assistants {
  margin-top: 0;
}

@media (min-width: 640px) {
  .org-tier-lead {
    flex-direction: row;
    justify-content: center;
  }
  .org-connector {
    height: 28px;
  }
}

/* Events */
.events-year-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 32px;
}

.events-year-tab {
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  padding: 10px 20px;
  cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.events-year-tab:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.events-year-tab.active {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(196, 30, 58, 0.08);
}

.events-year-panels {
  position: relative;
}

.events-year-panel {
  display: none;
  animation: eventsPanelIn 0.35s ease forwards;
}

.events-year-panel.active {
  display: block;
}

@keyframes eventsPanelIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.events-list {
  list-style: none;
}

.event-block {
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}

.event-block.event-empty {
  padding-bottom: 24px;
}

.event-block.animate-in {
  animation: eventBlockIn 0.4s ease forwards;
}

.event-block.animate-in:nth-child(1) { animation-delay: 0s; }
.event-block.animate-in:nth-child(2) { animation-delay: 0.06s; }
.event-block.animate-in:nth-child(3) { animation-delay: 0.12s; }
.event-block.animate-in:nth-child(4) { animation-delay: 0.18s; }
.event-block.animate-in:nth-child(5) { animation-delay: 0.24s; }

@keyframes eventBlockIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.event-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.event-title {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 8px;
}

.event-meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.event-meta a {
  color: var(--accent);
  text-decoration: none;
}

.event-meta a:hover {
  text-decoration: underline;
}

.events-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.events-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.events-table th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.events-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.events-table tbody tr:last-child td {
  border-bottom: none;
}

.events-table tbody tr:hover {
  background: rgba(255,255,255,0.02);
}

.events-table .col-rank {
  width: 56px;
  font-weight: 600;
  color: var(--text-muted);
}

.events-table .col-team {
  font-weight: 500;
}

/* Our team (Team Trackiest / Casual / Comp) as focal point */
.events-table tbody tr.our-team-row {
  background: rgba(196, 30, 58, 0.04);
}

.events-table tbody tr.our-team-row:hover {
  background: rgba(196, 30, 58, 0.08);
}

.events-table .col-team.our-team {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.06em;
}

.events-table .col-team .team-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 8px;
}

.events-table .col-positive {
  color: #22c55e;
}

.events-table .col-negative {
  color: #ef4444;
}

/* TFH 24h event block */
.event-block-tfh .event-tfh-teams {
  display: grid;
  gap: 32px;
  margin-top: 8px;
}

.event-tfh-team {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.event-tfh-team-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}

.event-tfh-team-name {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin: 0 0 12px 0;
}

.event-tfh-team-name a {
  color: var(--accent);
  text-decoration: none;
}

.event-tfh-team-name a:hover {
  text-decoration: underline;
}

.event-tfh-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.event-tfh-stat {
  display: inline-flex;
  align-items: baseline;
}

.event-tfh-stat + .event-tfh-stat::before {
  content: '·';
  margin-right: 12px;
  color: var(--text-muted);
  opacity: 0.7;
  font-weight: 700;
}

.event-tfh-stat strong {
  color: var(--text);
  font-weight: 600;
  margin-right: 6px;
}

.event-tfh-team .events-table-wrap {
  margin: 0;
  border: none;
  border-radius: 0;
  padding: 0 20px;
}

.event-tfh-team .events-table-wrap:last-of-type {
  border-bottom: none;
}

.event-tfh-team .events-table-tfh {
  margin-bottom: 4px;
}

.events-table-tfh th {
  font-size: 0.75rem;
}

.events-table-tfh td:nth-child(1) {
  font-weight: 500;
}

.events-table-tfh td:nth-child(2),
.events-table-tfh td:nth-child(3),
.events-table-tfh td:nth-child(4) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.events-table-tfh th:nth-child(2),
.events-table-tfh th:nth-child(3),
.events-table-tfh th:nth-child(4) {
  text-align: right;
}

.event-tfh-cpm-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 8px 20px 16px;
  padding: 0;
}

@media (min-width: 640px) {
  .event-block-tfh .event-tfh-teams {
    grid-template-columns: 1fr 1fr;
  }
}

/* Twitch */
.twitch-box {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  background: var(--surface);
  border-radius: var(--radius);
}

.twitch-box iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.twitch-page .twitch-box {
  max-width: 900px;
  margin: 0 auto;
}

/* Roster */
.roster-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 32px;
}

.roster-tabs {
  display: flex;
}

.roster-tabs button {
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.28s var(--ease-out), background 0.28s var(--ease-out), border-color 0.28s var(--ease-out);
  padding: 10px 20px;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.roster-tabs button:first-child {
  border-right-width: 0;
  border-radius: var(--radius) 0 0 var(--radius);
}

.roster-tabs button:last-child {
  border-radius: 0 var(--radius) var(--radius) 0;
}

.roster-tabs button.active {
  color: var(--text);
  background: var(--accent);
  border-color: var(--accent);
}

.roster-tabs button:not(.active):hover {
  color: var(--text);
  background: rgba(255,255,255,0.04);
}

.roster-captain-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

.roster-captain-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.roster-leadership-btn {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: color 0.2s, opacity 0.2s;
  text-align: left;
}

.roster-leadership-btn:hover {
  opacity: 0.9;
  text-decoration: underline;
}

.roster-panel {
  display: none;
}

.roster-panel.active {
  display: block;
}

.roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.player-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--surface);
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  text-align: left;
  width: 100%;
  transition: background 0.28s var(--ease-out), color 0.28s var(--ease-out), transform 0.28s var(--ease-out);
}

.player-card:hover {
  background: rgba(255,255,255,0.04);
  color: var(--accent);
}

.player-card.highlight {
  color: #c9a227;
}

.player-card img.flag {
  width: 20px;
  height: 15px;
  object-fit: cover;
  flex-shrink: 0;
}

/* Shop & Sponsors */
.cta-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 480px;
}

.cta-block p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 28px;
  cursor: pointer;
  border: none;
  transition: opacity 0.28s var(--ease-out), background 0.28s var(--ease-out), color 0.28s var(--ease-out), border-color 0.28s var(--ease-out), transform 0.28s var(--ease-out);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: var(--text);
  width: fit-content;
  border-radius: var(--radius);
}

.btn-primary:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  width: fit-content;
  border-radius: var(--radius);
}

.btn-outline:hover {
  background: var(--accent);
  color: var(--text);
  transform: translateY(-1px);
}

/* Footer */
.footer {
  padding: 48px 24px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 28px;
}

.footer-links a {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-copy {
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 28px;
  border-radius: var(--radius);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--text);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.modal-name {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.modal-header img {
  width: 24px;
  height: 18px;
  object-fit: cover;
}

.modal-bio {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.modal-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.modal-meta dt {
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 4px;
}

.modal-meta dd {
  margin: 0 0 12px 0;
}

.modal-meta dd:last-child {
  margin-bottom: 0;
}

.modal-meta .previous-teams-list {
  list-style: none;
}

.modal-meta .previous-teams-list li {
  padding: 2px 0;
}

/* ========== Fluid site animations ========== */
@media (prefers-reduced-motion: no-preference) {
  /* Hero stagger — home */
  .hero .hero-logo {
    animation: heroReveal 0.6s var(--ease-out) forwards;
    opacity: 0;
  }
  .hero .hero-brand {
    animation: heroReveal 0.55s var(--ease-out) 0.1s forwards;
    opacity: 0;
  }
  .hero .tagline {
    animation: heroReveal 0.5s var(--ease-out) 0.2s forwards;
    opacity: 0;
  }
  .hero .hero-ctas {
    animation: heroReveal 0.5s var(--ease-out) 0.32s forwards;
    opacity: 0;
  }
  @keyframes heroReveal {
    from {
      opacity: 0;
      transform: translateY(14px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Scroll reveal */
  .animate-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
  }
  .animate-reveal.in-view {
    opacity: 1;
    transform: translateY(0);
  }
  .animate-reveal-delay-1 { transition-delay: 0.08s; }
  .animate-reveal-delay-2 { transition-delay: 0.16s; }
  .animate-reveal-delay-3 { transition-delay: 0.24s; }
  .animate-reveal-delay-4 { transition-delay: 0.32s; }

  /* Page content fade-in */
  .page-content {
    animation: pageFadeIn 0.4s var(--ease-out) forwards;
  }
  @keyframes pageFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
}

@media (prefers-reduced-motion: reduce) {
  .animate-reveal {
    opacity: 1;
    transform: none;
  }
}
