/* ================================================================
   ASL DESIGN SYSTEM  |  americanskileague.com
   Shared nav, footer, badges, and canonical design tokens
   ================================================================ */

/* ── Canonical design tokens ────────────────────────────────────── */
:root {
  /* Brand palette */
  --asl-navy:         #1b2a4a;
  --asl-navy-deep:    #0f1a30;
  --asl-navy-light:   #243b6a;
  --asl-red:          #bf1b30;
  --asl-blue:         #1e3a6d;
  --asl-ice:          #c8ddf0;

  /* Surfaces */
  --asl-bg:           #f0f2f5;
  --asl-surface:      #ffffff;
  --asl-surface-2:    #edf0f4;
  --asl-border:       #dce1e8;
  --asl-border-light: #e8ecf1;

  /* Text */
  --asl-text:   #1a2035;
  --asl-text-2: #2d3348;
  --asl-text-3: #4d5670;
  --asl-text-4: #7d879e;

  /* Canonical discipline colors */
  --asl-sl: #546e7a;  /* blue-grey slate */
  --asl-gs: #0097a7;  /* teal */
  --asl-sg: #b47d10;  /* gold */
  --asl-dh: #0f7b3f;  /* forest green */
  --asl-ac: #7c3aed;  /* purple */

  /* Sanctions */
  --asl-fis-color:     #0f7b3f;  --asl-fis-bg:     #e5f5ec;
  --asl-ussa-color:    #1a56db;  --asl-ussa-bg:    #e8eefb;
  --asl-masters-color: #7c3aed;  --asl-masters-bg: #f0e8fd;
  --asl-nastar-color:  #c97a12;  --asl-nastar-bg:  #fef3dc;
  --asl-protour-color: #bf1b30;  --asl-protour-bg: #fce8e8;

  /* Gender — M and W only */
  --asl-m: #2563eb;
  --asl-w: #db2777;

  /* Typography */
  --asl-font-display: 'Bebas Neue', sans-serif;
  --asl-font-body:    'Barlow', -apple-system, sans-serif;
  --asl-font-mono:    'DM Mono', 'SF Mono', 'Consolas', monospace;

  /* Layout */
  --asl-nav-h:     52px;
  --asl-radius:    8px;
  --asl-radius-sm: 4px;
  --asl-radius-lg: 12px;
  --asl-shadow:    0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --asl-shadow-md: 0 4px 12px rgba(0,0,0,0.08);
}

/* ── Topbar: tricolor stripe ─────────────────────────────────────── */
.asl-topbar {
  height: 3px;
  background: linear-gradient(90deg,
    var(--asl-red)  33.33%,
    #ffffff         33.33%, #ffffff 66.66%,
    var(--asl-blue) 66.66%
  );
  flex-shrink: 0;
  width: 100%;
}

/* ── Global navigation ───────────────────────────────────────────── */
.asl-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--asl-nav-h);
  background: var(--asl-navy);
  display: flex;
  align-items: center;
  padding: 0 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.22);
  flex-shrink: 0;
  width: 100%;
  align-self: stretch;
}

.asl-nav-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.asl-nav-brand img {
  height: 30px;
  width: auto;
  display: block;
  opacity: 0.92;
}

.asl-nav-divider {
  width: 1px;
  height: 22px;
  background: rgba(255,255,255,0.18);
  margin: 0 12px;
  flex-shrink: 0;
}

.asl-nav-links {
  display: flex;
  align-items: center;
  gap: 1px;
  flex: 1;
}

.asl-nav-link {
  font-family: var(--asl-font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  padding: 5px 10px;
  border-radius: var(--asl-radius-sm);
  white-space: nowrap;
  transition: color 0.12s, background 0.12s;
}

.asl-nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

.asl-nav-link.active {
  color: #fff;
  background: rgba(255,255,255,0.14);
  font-weight: 600;
}

.asl-nav-link.soon {
  opacity: 0.35;
  pointer-events: none;
  cursor: default;
}

/* Mobile hamburger */
.asl-nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.asl-nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: rgba(255,255,255,0.7);
  border-radius: 2px;
  transition: all 0.2s;
}

/* Center nav links on desktop */
@media (min-width: 769px) {
  .asl-nav-links {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    flex: none;
  }
}

@media (max-width: 768px) {
  .asl-nav-links {
    display: none;
    position: absolute;
    top: var(--asl-nav-h);
    left: 0;
    right: 0;
    background: var(--asl-navy-deep);
    flex-direction: column;
    align-items: stretch;
    padding: 8px 12px 14px;
    gap: 2px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.35);
    z-index: 999;
  }

  .asl-nav-links.open {
    display: flex;
  }

  .asl-nav-link {
    font-size: 15px;
    padding: 10px 12px;
  }

  .asl-nav-toggle {
    display: flex;
  }

  .asl-nav-divider {
    display: none;
  }
}

/* ── Shared footer ───────────────────────────────────────────────── */
.asl-footer {
  padding: 28px 20px;
  text-align: center;
  font-family: var(--asl-font-body);
  font-size: 12px;
  color: var(--asl-text-4);
}

.asl-footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.asl-footer a {
  color: var(--asl-text-3);
  text-decoration: none;
  transition: color 0.12s;
}

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

/* ── Shared badge system ─────────────────────────────────────────── */
.asl-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--asl-font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
  white-space: nowrap;
  line-height: 1.5;
}

/* Sanction badges */
.asl-badge-fis     { color: var(--asl-fis-color);     background: var(--asl-fis-bg); }
.asl-badge-ussa    { color: var(--asl-ussa-color);    background: var(--asl-ussa-bg); }
.asl-badge-masters { color: var(--asl-masters-color); background: var(--asl-masters-bg); }
.asl-badge-nastar  { color: var(--asl-nastar-color);  background: var(--asl-nastar-bg); }
.asl-badge-protour { color: var(--asl-protour-color); background: var(--asl-protour-bg); }

/* Discipline badges */
.asl-badge-sl { color: #fff; background: var(--asl-sl); }
.asl-badge-gs { color: #fff; background: var(--asl-gs); }
.asl-badge-sg { color: #fff; background: var(--asl-sg); }
.asl-badge-dh { color: #fff; background: var(--asl-dh); }
.asl-badge-ac { color: #fff; background: var(--asl-ac); }

/* Gender badges */
.asl-badge-m { color: #fff; background: var(--asl-m); }
.asl-badge-w { color: #fff; background: var(--asl-w); }

/* ── Race Display System ───────────────────────────────────────── */

/* View tabs */
.view-tabs {
  display: flex;
  gap: 2px;
  padding: 0 12px;
  background: var(--asl-navy);
  overflow-x: auto;
}
.view-tab {
  font-family: var(--asl-font-body);
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  background: none;
  border: none;
  padding: 8px 14px;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.view-tab:hover { color: rgba(255,255,255,0.8); }
.view-tab.active {
  color: #fff;
  font-weight: 600;
  border-bottom-color: #fff;
}

/* Stats header row */
.stats-header-row {
  background: var(--asl-surface-2);
  border-bottom: 1px solid var(--asl-border);
}
.stats-header-row td {
  padding: 6px 8px;
  font-size: 12px;
  font-family: var(--asl-font-body);
  color: var(--asl-text-3);
}
.stats-left { font-weight: 600; }
.stats-right {
  text-align: right;
  font-family: var(--asl-font-mono);
  font-size: 11px;
}
.stats-badge { text-align: right; white-space: nowrap; }

/* Lifecycle badges */
.lifecycle-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 3px;
}
.badge-live { background: #dc2626; color: #fff; animation: pulse-badge 2s infinite; }
.badge-official { background: var(--asl-fis-bg); color: var(--asl-fis-color); }
.badge-startlist { background: var(--asl-ussa-bg); color: var(--asl-ussa-color); }
.badge-registration { background: var(--asl-surface-2); color: var(--asl-text-3); border: 1px solid var(--asl-border); }

@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Results table (shared) */
.results-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--asl-font-body);
  font-size: 13px;
}
.results-table thead th {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--asl-text-4);
  padding: 6px 6px;
  text-align: left;
  border-bottom: 2px solid var(--asl-border);
  white-space: nowrap;
  background: var(--asl-surface);
}
.results-table tbody td {
  padding: 5px 6px;
  border-bottom: 1px solid var(--asl-border-light);
  vertical-align: middle;
}
.results-table tbody tr:hover { background: rgba(30,58,109,0.03); }

/* Column types */
.results-table .rank-col { text-align: center; width: 32px; font-family: var(--asl-font-mono); font-weight: 600; }
.results-table .bib-col { width: 32px; font-family: var(--asl-font-mono); font-size: 12px; color: var(--asl-text-3); }
.results-table .name { min-width: 120px; }
.results-table .yob { font-family: var(--asl-font-mono); font-size: 12px; color: var(--asl-text-4); width: 40px; }
.results-table .team { font-size: 12px; color: var(--asl-text-3); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.results-table .time-col { text-align: right; font-family: var(--asl-font-mono); font-size: 13px; width: 72px; white-space: nowrap; }
.results-table .num { text-align: right; }
.results-table .pts-col { font-family: var(--asl-font-mono); font-size: 12px; width: 58px; }

/* Name cell elements */
.results-table .full-name { display: inline; }
.results-table .short-name { display: none; }
.results-table .flag-inline { font-size: 12px; margin-left: 4px; }
.results-table .flag-inline img { width: 16px; height: 12px; vertical-align: -1px; margin-right: 2px; }
.results-table .nation-code { font-size: 10px; color: var(--asl-text-4); margin-right: 3px; }
.results-table .age-pill { font-size: 9px; font-weight: 600; background: var(--asl-surface-2); color: var(--asl-text-3); padding: 1px 5px; border-radius: 3px; margin-left: 3px; }
.results-table .age-class-badge { font-size: 10px; font-weight: 700; color: var(--asl-masters-color); background: var(--asl-masters-bg); padding: 1px 6px; border-radius: 3px; }
.results-table .profile-link { font-size: 9px; font-weight: 600; text-decoration: none; padding: 1px 4px; border-radius: 2px; margin-left: 2px; }
.results-table .profile-link.fis { color: var(--asl-fis-color); background: var(--asl-fis-bg); }
.results-table .profile-link.ussa { color: var(--asl-ussa-color); background: var(--asl-ussa-bg); }
.results-table .bibbo-pill { font-size: 9px; font-weight: 700; color: var(--asl-sg); background: rgba(180,125,16,0.12); padding: 1px 5px; border-radius: 3px; margin-left: 4px; }

/* Run rank inside time cell */
.results-table .time-inner { display: inline-flex; align-items: baseline; gap: 3px; }
.results-table .run-rank { font-size: 10px; color: var(--asl-text-4); }

/* Podium highlighting */
.results-table .podium-1 td { background: linear-gradient(90deg, rgba(180,125,16,0.08) 0%, transparent 60%); }
.results-table .podium-2 td { background: linear-gradient(90deg, rgba(107,117,144,0.06) 0%, transparent 60%); }
.results-table .podium-3 td { background: linear-gradient(90deg, rgba(154,99,36,0.06) 0%, transparent 60%); }

/* Owner row: gold glow */
.results-table .owner-row td { background: linear-gradient(90deg, rgba(180,125,16,0.15) 0%, rgba(180,125,16,0.05) 60%); }
.results-table .owner-row .rank-col { color: var(--asl-sg); font-weight: 800; }

/* Non-finishers */
.results-table .result-dnf td { opacity: 0.55; }
.results-table .result-dnf .rank-col { color: var(--asl-red); font-weight: 700; font-size: 10px; }

/* Penalty indicators */
.results-table .penalty-indicator { margin-right: 3px; }
.results-table .pi-s, .results-table .pi-f {
  display: inline-block; font-size: 8px; font-weight: 700; width: 14px; height: 14px;
  line-height: 14px; text-align: center; border-radius: 2px; margin-right: 1px;
}
.results-table .pi-s { background: var(--asl-ussa-bg); color: var(--asl-ussa-color); }
.results-table .pi-f { background: var(--asl-fis-bg); color: var(--asl-fis-color); }

/* Empty row */
.results-table .empty-row { text-align: center; padding: 24px; color: var(--asl-text-4); font-style: italic; }

/* Progressive collapse tiers (legacy p1/p2/p3) */
@media (max-width: 900px) {
  .results-table .hide-p1 { display: none; }
}
@media (max-width: 780px) {
  .results-table .hide-p2 { display: none; }
}
@media (max-width: 640px) {
  .results-table .hide-p3 { display: none; }
  .results-table thead th { padding: 4px 3px; font-size: 9px; }
  .results-table tbody td { padding: 4px 3px; font-size: 12px; }
  .results-table .full-name { display: none; }
  .results-table .short-name { display: inline; }
  .results-table .flag-inline { display: none; }
  .results-table .age-pill { display: none; }
  .results-table .profile-link { display: none; }
}

/* ================================================================
   V4 RACE DISPLAY SYSTEM
   Results table: CSS media query progressive collapse (13-column)
   Registration table: JS ResizeObserver responsive engine
   ================================================================ */

/* ── V4 entry table base ── */
.et { width:100%; border-collapse:collapse; }
.et th {
  padding:4px 5px; font-family:'Inter',-apple-system,sans-serif; font-size:10px;
  font-weight:600; text-transform:uppercase; letter-spacing:0.5px; color:#999;
  background:#f5f5f5; border-bottom:2px solid #dce1e8; white-space:nowrap; text-align:left;
}
.et td {
  padding:5px 5px; border-bottom:1px solid #f0f2f5; vertical-align:middle;
  white-space:nowrap; font-family:'Inter',-apple-system,sans-serif; font-size:13px;
}
.et tr:hover { background:rgba(30,58,109,0.02); }

/* ── Colgroup widths ── */
.cg-rank   { width:30px; }
.cg-bib    { width:34px; }
.cg-name   { width:200px; }
.cg-yob    { width:42px; }
.cg-seed   { width:72px; }
.cg-r1     { width:90px; }
.cg-r2     { width:90px; }
.cg-total  { width:72px; }
.cg-margin { width:58px; }
.cg-race   { width:62px; }
.cg-result { width:66px; }
.cg-2027   { width:58px; }

/* ── Column alignment (th + td) ── */
.et .col-rank   { text-align:center; }
.et .col-bib    { text-align:center; }
.et .col-yob    { text-align:center; }
.et .col-seed   { text-align:right; }
.et .col-r1     { text-align:right; }
.et .col-r2     { text-align:right; }
.et .col-total  { text-align:right; }
.et .col-margin { text-align:right; }
.et .col-race   { text-align:right; }
.et .col-result { text-align:right; }
.et .col-2027   { text-align:right; }
.et .col-pts    { text-align:right; }

/* ── Data cell fonts (td only) ── */
.et td.col-rank   { font-family:'DM Mono',monospace; font-weight:600; color:#bbb; }
.et td.col-bib    { font-family:'DM Mono',monospace; color:#888; }
.et td.col-name   { white-space:nowrap; }
.et td.col-yob    { font-family:'DM Mono',monospace; color:#999; }
.et td.col-team   { color:#666; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.et td.col-seed   { font-family:'DM Mono',monospace; font-weight:500; }
.et td.col-r1     { font-family:'DM Mono',monospace; font-weight:500; }
.et td.col-r2     { font-family:'DM Mono',monospace; font-weight:500; }
.et td.col-total  { font-family:'DM Mono',monospace; font-weight:500; }
.et td.col-margin { font-family:'DM Mono',monospace; color:#999; }
.et td.col-race   { font-family:'DM Mono',monospace; font-weight:500; }
.et td.col-result { font-family:'DM Mono',monospace; font-weight:500; }
.et td.col-2027   { font-family:'DM Mono',monospace; font-weight:500; }
.et td.col-pts    { font-family:'DM Mono',monospace; font-weight:500; }

/* ── Registration table: table-layout:fixed, JS sets pixel widths ── */
.reg-table { table-layout:fixed; }
.reg-table td.col-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.reg-table td.col-team { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.reg-table th.col-team { text-align:left; }
.reg-table-wrap { position:relative; }

/* ── Compact mode (JS adds .compact when team column hides) ── */
.reg-table.compact td  { font-size:12px; padding:4px 3px; }
.reg-table.compact th  { font-size:9px;  padding:3px 3px; }
.reg-table.compact .flag        { height:12px; width:20px; }
.reg-table.compact .age-pill    { font-size:9px; height:14px; line-height:14px; padding:0 5px; }
.reg-table.compact .org-logo    { height:12px; }
.reg-table.compact .team-logo,
.reg-table.compact .meta-team-logo { height:12px; width:12px; }
.reg-table.compact .athlete-meta   { gap:3px; margin-left:3px; }
.reg-table.compact .nation         { font-size:11px; }

/* ── Points divider ── */
.pts-divider { border-left:1px solid #dce1e8; }

/* ── Name cell elements ── */
.fname { color:#666; margin-right:3px; }
.lname { font-weight:700; }
.short-name { display:none; }
.athlete-meta { display:inline-flex; align-items:center; gap:4px; margin-left:4px; }
.flag { height:14px; width:23px; object-fit:cover; border-radius:1px; }
.nation { font-size:12px; color:#888; font-weight:500; }
.age-pill {
  font-family:'DM Mono',monospace; font-size:10px; font-weight:600;
  height:16px; line-height:16px; padding:0 6px; border-radius:3px;
  background:#f0f0f0; color:#555;
}
.org-logo { height:14px; width:auto; }
.org-logo-link { display:inline-flex; align-items:center; }

/* ── Team cell ── */
.team-logo { display:inline-block; height:14px; width:14px; border-radius:2px; margin-left:4px; vertical-align:middle; background:#e9ecef; border:1px solid #dce1e8; }
.meta-team-logo { display:none; height:14px; width:14px; border-radius:2px; vertical-align:middle; background:#e9ecef; border:1px solid #dce1e8; }

/* ── Run rank ── */
.run-rank { font-family:'DM Mono',monospace; font-size:13px; color:#aaa; margin-right:2px; }

/* ── Scored indicator ── */
.scored-indicator { color:#2f9e44; font-size:10px; margin-right:2px; }
.scored { color:#2f9e44; }

/* ── DNF / DSQ labels ── */
.dnf-label { font-family:'DM Mono',monospace; font-size:13px; font-weight:700; color:#e03131; }
.dsq-label { font-family:'DM Mono',monospace; font-size:13px; font-weight:700; color:#e8590c; }

/* ── Seed indicators ── */
.seed-indicators {
  display:inline-flex; flex-direction:column; gap:0; margin-right:2px; vertical-align:middle;
  line-height:1;
}
.pi-s, .pi-f {
  display:block; font-size:8px; font-weight:700; text-align:center; text-transform:uppercase;
  height:9px;
}
.pi-s { color:#1a56db; }
.pi-f { color:#0f7b3f; }

/* ── Podium ── */
.podium-1 td.col-rank { color:#333; font-weight:700; }
.podium-3 td.col-rank { color:#333; }

/* ── Owner row ── */
.owner-row {
  background:linear-gradient(90deg, rgba(180,125,16,0.12), rgba(180,125,16,0.06));
  box-shadow: inset 0 0 0 1.5px #b8860b, 0 0 8px rgba(184,134,11,0.3);
}
.owner-row td { color:#b8860b; font-weight:700; }
.owner-row .col-rank   { color:#b8860b; }
.owner-row .col-bib    { color:#b8860b; }
.owner-row .fname      { color:#b8860b; }
.owner-row .nation     { color:#b8860b; }
.owner-row .col-yob    { color:#b8860b; }
.owner-row .col-team   { color:#b8860b; }
.owner-row .col-seed   { color:#b8860b; }
.owner-row .col-r1     { color:#b8860b; }
.owner-row .col-r2     { color:#b8860b; }
.owner-row .col-total  { color:#b8860b; }
.owner-row .col-margin { color:#b8860b; }
.owner-row .col-race   { color:#b8860b; }
.owner-row .col-result { color:#b8860b; }
.owner-row .col-2027   { color:#b8860b; }
.owner-row .age-pill   { background:rgba(180,125,16,0.15); color:#b8860b; }

/* ── V4 Stats bar ── */
.v4-stats-bar {
  background:#fafbfc; display:flex; align-items:center; justify-content:center;
  padding:6px 0; font-size:11px; border-bottom:1px solid #f0f2f5;
  position:relative; font-family:'Inter',-apple-system,sans-serif;
}
.v4-stats-bar .stats-left   { position:absolute; left:16px; }
.v4-stats-bar .stats-center { text-align:center; }
.v4-stats-bar .stats-right  { position:absolute; right:16px; }

/* ── V4 Badge (within stats bar) ── */
.v4-badge {
  font-family:'Barlow',sans-serif; font-size:9px; font-weight:700;
  letter-spacing:0.5px; padding:2px 8px; border-radius:4px;
}
.v4-badge-results  { background:#e8f5e9; color:#2e7d32; }
.v4-badge-live     { background:#dc2626; color:#fff; animation:v4pulse 2s infinite; }
.v4-badge-start    { background:#e8eefb; color:#1a56db; }
.v4-badge-reg      { background:#edf0f4; color:#4d5670; }
@keyframes v4pulse { 0%,100%{opacity:1;} 50%{opacity:0.7;} }

/* ══════════════════════════════════════════════════
   V4 PROGRESSIVE COLLAPSE - MEDIA QUERIES (results)
   ══════════════════════════════════════════════════ */

/* 1. <=1100px: Team column hides entirely, team logo moves to athlete-meta. */
@media (max-width: 1100px) {
  .hide-team { display:none; }
  .et:not(.reg-table) .meta-team-logo { display:inline-block; }
  .et .hide-ussa { display:none; }
}
/* 2. <=1000px: Seed column hides */
@media (max-width: 1000px) {
  .hide-seed { display:none; }
}
/* 3. <=920px: Race column hides */
@media (max-width: 920px) {
  .hide-race { display:none; }
}
/* 4. <=840px: Result column hides */
@media (max-width: 840px) {
  .hide-result { display:none; }
}
/* 5. <=760px: YOB hides */
@media (max-width: 760px) {
  .hide-yob { display:none; }
}
/* 6. <=680px: R1, R2 hide */
@media (max-width: 680px) {
  .hide-r1 { display:none; }
  .hide-r2 { display:none; }
}
/* 7. <=620px: margin hides */
@media (max-width: 620px) {
  .hide-margin { display:none; }
}
/* 8. <=480px: Bib hides, nation text hides (results only) */
@media (max-width: 480px) {
  .hide-bib { display:none; }
  .et:not(.reg-table) .nation { display:none; }
}
/* 9. <=440px: Full name hides, short name shows (results only) */
@media (max-width: 440px) {
  .et:not(.reg-table) .full-name { display:none; }
  .et:not(.reg-table) .short-name { display:inline; }
}
/* Small screen global table density */
@media (max-width: 600px) {
  .et th { padding:3px 3px; font-size:9px; }
  .et td { padding:4px 3px; }
}

/* ══════════════════════════════════════════════════
   V4 NASTAR / MEISTERS COLUMNS
   ══════════════════════════════════════════════════ */
.course-letter { font-weight:700; font-size:11px; }
.course-r { color:#e03131; }
.course-b { color:#1971c2; }
.course-g { color:#2f9e44; }
.course-y { color:#f59f00; }

.medal-pill {
  font-family:'DM Mono',monospace; font-size:10px; font-weight:600;
  height:16px; line-height:16px; padding:0 6px; border-radius:3px;
  display:inline-block; white-space:nowrap;
}
.medal-platinum { background:#e5e4e2; color:#1a1a2e; }
.medal-gold     { background:#ffd700; color:#5c4813; }
.medal-silver   { background:#c0c0c0; color:#333; }
.medal-bronze   { background:#cd7f32; color:#fff; }

.et .col-first     { text-align:right; }
.et .col-latest    { text-align:right; }
.et .col-best      { text-align:right; }
.et .col-handicap  { text-align:right; }
.et .col-teamscore { text-align:right; }
.et .col-medal     { text-align:center; }
.et .col-agegroup  { text-align:center; }
.et .col-bracket   { text-align:center; }

.et td.col-first     { font-family:'DM Mono',monospace; font-weight:500; }
.et td.col-latest    { font-family:'DM Mono',monospace; font-weight:500; }
.et td.col-best      { font-family:'DM Mono',monospace; font-weight:500; }
.et td.col-handicap  { font-family:'DM Mono',monospace; font-weight:500; }
.et td.col-teamscore { font-family:'DM Mono',monospace; font-weight:500; }
.et td.col-agegroup  { font-family:'DM Mono',monospace; color:#999; font-size:11px; }
.et td.col-bracket   { font-family:'DM Mono',monospace; color:#999; }

.cg-first     { width:90px; }
.cg-latest    { width:90px; }
.cg-best      { width:72px; }
.cg-handicap  { width:66px; }
.cg-teamscore { width:58px; }
.cg-medal     { width:62px; }
.cg-agegroup  { width:50px; }
.cg-bracket   { width:42px; }

.nastar-table .team-logo,
.nastar-table .meta-team-logo,
.meisters-table .team-logo,
.meisters-table .meta-team-logo { display:none !important; }

.v4-badge-nastar   { background:#fff3e0; color:#e65100; }
.v4-badge-meisters { background:#e8f5e9; color:#2e7d32; }

/* NASTAR collapse (nh- prefix) */
@media (max-width: 1100px) {
  .nh-team { display:none; }
  .nastar-table .meta-team-logo { display:inline-block; }
}
@media (max-width: 1000px) { .nh-first   { display:none; } }
@media (max-width: 920px)  { .nh-latest  { display:none; } }
@media (max-width: 840px)  { .nh-teamscore { display:none; } }
@media (max-width: 800px)  { .nh-medal   { display:none; } }
@media (max-width: 760px)  { .nh-agegroup { display:none; } }
@media (max-width: 540px)  { .nastar-table .nation { display:none; } }
@media (max-width: 480px)  { .nh-bib { display:none; } }
@media (max-width: 440px)  {
  .nastar-table .full-name { display:none; }
  .nastar-table .short-name { display:inline; }
}

/* Meisters collapse (mh- prefix) */
@media (max-width: 1100px) {
  .mh-team { display:none; }
  .meisters-table .meta-team-logo { display:inline-block; }
}
@media (max-width: 1000px) { .mh-first   { display:none; } }
@media (max-width: 920px)  { .mh-latest  { display:none; } }
@media (max-width: 840px)  { .mh-handicap { display:none; } }
@media (max-width: 760px)  { .mh-bracket { display:none; } }
@media (max-width: 680px)  { .mh-margin  { display:none; } }
@media (max-width: 540px)  { .meisters-table .nation { display:none; } }
@media (max-width: 480px)  { .mh-bib { display:none; } }
@media (max-width: 440px)  {
  .meisters-table .full-name { display:none; }
  .meisters-table .short-name { display:inline; }
}

/* ── Empty row ── */
.et .empty-row { text-align:center; padding:24px; color:#999; font-style:italic; }
