/* ==========================================================
   LA28 TRACKER
   Uses the same base variables and editorial language as TCN.
   This file deliberately styles only the tracker-specific UI.
   ========================================================== */

:root{
  --red:#9b0202;
  --text:#111;
  --muted:#4b5563;
  --border:#e5e7eb;
  --soft:#f7f7f7;
  --bg:#fff;
  --container:1200px;
  --gutter:32px;
  --tcn-header-h:175px;
  --serif:ui-serif, Georgia, "Times New Roman", Times, serif;
  --sans:system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Fall back to the same TCN base behaviour if this page is previewed
   without the site-wide stylesheets. On trackcycling.org the existing
   site CSS remains authoritative. */
*,*::before,*::after{box-sizing:border-box;}
html{-webkit-text-size-adjust:100%;}
body{
  margin:0;
  padding-top:var(--tcn-header-h);
  font-family:var(--sans);
  line-height:1.55;
  color:var(--text);
  background:var(--bg);
}
img{display:block;max-width:100%;height:auto;}
a{color:inherit;}
.container{width:min(var(--container),calc(100% - var(--gutter)));margin-inline:auto;}
.page{padding:34px 0 48px;}

.la28-intro{padding-top:8px;}
.la28-intro .lead-title{
  max-width:980px;
  margin:0 0 12px;
  font-family:var(--serif);
  font-size:clamp(36px,5vw,58px);
  line-height:1.02;
  letter-spacing:-.04em;
}
.la28-intro .lead-dek{
  max-width:960px;
  margin:0 0 14px;
  color:#222;
  font-size:16px;
  line-height:1.45;
}

.la28-kicker-row{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:8px;
}
.kicker{
  display:inline-block;
  color:var(--red);
  font-size:12px;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.la28-data-state{
  display:inline-block;
  padding:2px 7px;
  border:1px solid var(--border);
  color:var(--muted);
  font-size:11px;
  font-weight:700;
  letter-spacing:.06em;
  text-transform:uppercase;
}
.la28-data-state.is-live{
  border-color:var(--red);
  color:var(--red);
}
.la28-page-meta{
  display:flex;
  align-items:center;
  gap:5px 9px;
  flex-wrap:wrap;
  margin:16px 0 0;
  color:var(--muted);
  font-size:13px;
}
.la28-page-meta a{color:var(--red);text-decoration:underline;}

.la28-demo-note{
  margin:24px 0 0;
  padding:13px 15px;
  border-left:4px solid var(--red);
  background:var(--soft);
  color:#222;
  font-size:14px;
}

.la28-section-divider{
  position:relative;
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:18px;
  margin:34px 0 18px;
  padding-top:14px;
  border-top:4px solid #111;
}
.la28-section-divider::before{
  content:"";
  position:absolute;
  top:-2px;
  left:0;
  width:64px;
  height:2px;
  background:var(--red);
}
.la28-section-divider h2{
  margin:0;
  font-family:var(--serif);
  font-size:24px;
  line-height:1.1;
}
.la28-section-divider p{
  flex:1;
  margin:0;
  color:var(--muted);
  font-size:14px;
}

.la28-status{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  border-top:1px solid var(--border);
  border-bottom:1px solid var(--border);
}
.la28-status>div{
  min-width:0;
  padding:14px 18px 14px 0;
  margin-right:18px;
  border-right:1px solid var(--border);
}
.la28-status>div:last-child{margin-right:0;border-right:0;}
.la28-status .kicker{margin-bottom:4px;}
.la28-status p{margin:0;font-size:14px;line-height:1.4;}

.la28-controls{
  position:sticky;
  top:0;
  z-index:30;
  margin:24px 0 0;
  padding:12px 0;
  border-bottom:1px solid var(--border);
  background:#fff;
}
.la28-control-group{
  display:flex;
  align-items:flex-start;
  gap:18px;
}
.la28-control-group+.la28-control-group{margin-top:14px;}
.la28-control-label{
  flex:0 0 82px;
  padding-top:8px;
  color:var(--muted);
  font-size:12px;
  letter-spacing:.06em;
  text-transform:uppercase;
}
.gender-switch,.event-tabs{display:flex;gap:6px;flex-wrap:wrap;}
.switch-btn,.event-tab{
  appearance:none;
  border:1px solid var(--border);
  border-radius:0;
  background:#fff;
  color:#111;
  padding:7px 12px;
  font:inherit;
  font-size:14px;
  cursor:pointer;
}
.switch-btn:hover,.event-tab:hover{border-color:#999;}
.switch-btn.is-active,.event-tab.is-active{
  border-color:#111;
  background:#111;
  color:#fff;
}
.switch-btn:focus-visible,.event-tab:focus-visible,#rankingSearch:focus-visible,.table-wrap:focus-visible{
  outline:3px solid #000;
  outline-offset:2px;
}

.la28-current{
  padding:28px 0 4px;
}
.la28-heading-row{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:24px;
}
.la28-heading-row h2{
  margin:2px 0 0;
  font-family:var(--serif);
  font-size:clamp(28px,3.5vw,40px);
  line-height:1.08;
}
.la28-route{
  margin:0;
  text-align:right;
  color:var(--muted);
  font-size:12px;
}
.la28-route span,.la28-route strong{display:block;}
.la28-route strong{margin-top:2px;color:#111;font-size:14px;font-weight:650;}
.summary-content{
  margin-top:18px;
}
.summary-group+ .summary-group{margin-top:16px;}
.summary-group h3{
  margin:0 0 8px;
  color:var(--muted);
  font-size:12px;
  font-weight:650;
  letter-spacing:.04em;
  text-transform:uppercase;
}
.chip-list{display:flex;gap:8px;flex-wrap:wrap;}
.qual-chip{
  display:inline-flex;
  align-items:baseline;
  gap:6px;
  padding:6px 9px;
  border:1px solid var(--border);
  border-bottom:2px solid #111;
  background:#fff;
  font-size:13px;
}
.qual-chip small{color:var(--muted);font-size:11px;}
.la28-table-divider{margin-bottom:12px;}
.ranking-section{width:100%;}
.la28-table-tools{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:10px;
  margin:0 0 10px;
}
.la28-table-tools label{color:var(--muted);font-size:13px;}
#rankingSearch{
  width:min(280px,100%);
  padding:7px 9px;
  border:1px solid var(--border);
  border-radius:0;
  background:#fff;
  color:#111;
  font:inherit;
  font-size:14px;
}
.table-wrap{
  width:100%;
  overflow-x:auto;
  border-top:2px solid #111;
  border-bottom:1px solid #111;
}
.ranking-table{
  width:100%;
  min-width:760px;
  border-collapse:collapse;
  font-size:14px;
}
.ranking-table th{
  padding:9px 10px;
  border-bottom:1px solid #111;
  color:var(--muted);
  font-size:11px;
  font-weight:650;
  letter-spacing:.05em;
  text-align:left;
  text-transform:uppercase;
}
.ranking-table td{
  padding:10px;
  border-bottom:1px solid var(--border);
  vertical-align:middle;
}
.ranking-table tbody tr:last-child td{border-bottom:0;}
.ranking-table tbody tr:hover{background:var(--soft);}
.ranking-table .rank-cell{width:64px;color:var(--muted);font-variant-numeric:tabular-nums;}
.ranking-table .points{font-variant-numeric:tabular-nums;white-space:nowrap;}
.ranking-table td:nth-child(3){font-weight:700;white-space:nowrap;}
.ranking-table td:last-child{min-width:210px;}
.status-pill{
  display:inline;
  padding:0;
  border:0;
  background:transparent;
  color:var(--muted);
  font-size:13px;
}
.status-pill.status-direct{color:#111;font-weight:650;}
.status-pill.status-via{color:#111;font-weight:650;}
.status-pill.status-continental{color:var(--red);font-weight:650;}
.qualified-row{background:#fafafa;}
.continental-row td:first-child{box-shadow:inset 3px 0 0 var(--red);}
.cutoff-row td{border-bottom:2px solid #111;}
.change-up{color:#176137;white-space:nowrap;}
.change-down{color:#8a1f1f;white-space:nowrap;}
.change-flat{color:var(--muted);white-space:nowrap;}

.legend{
  display:flex;
  flex-wrap:wrap;
  gap:8px 20px;
  margin:12px 0 0;
  color:var(--muted);
  font-size:12px;
}
.legend span{display:inline-flex;align-items:center;gap:7px;}
.legend-mark{
  width:18px;
  height:2px;
  display:inline-block;
  background:#111;
}
.legend-mark.via{background:#707070;}
.legend-mark.continental{background:var(--red);}

.la28-explainer{
  max-width:860px;
}
.la28-explainer h3{
  margin:0 0 10px;
  font-family:var(--serif);
  font-size:26px;
  line-height:1.15;
}
.la28-explainer p{margin:0 0 14px;font-size:15px;line-height:1.6;}
.special-rule{
  padding-left:14px;
  border-left:3px solid var(--red);
}
.source-note{
  margin-top:22px!important;
  padding-top:16px;
  border-top:1px solid var(--border);
  color:var(--muted);
  font-size:13px!important;
}

.site-footer{
  margin-top:40px;
  padding:22px 0;
  background:#fff;
  border-top:1px solid var(--border);
}
.footer-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}
.footer-small{margin:0;color:var(--muted);font-size:14px;}
.footer-nav{display:flex;gap:10px;align-items:center;flex-wrap:wrap;}

@media(max-width:820px){
  .la28-status{grid-template-columns:1fr;}
  .la28-status>div{margin:0;padding:12px 0;border-right:0;border-bottom:1px solid var(--border);}
  .la28-status>div:last-child{border-bottom:0;}
  .la28-heading-row{display:block;}
  .la28-route{margin-top:10px;text-align:left;}
}

@media(max-width:720px){
  :root{--gutter:24px;}
  .page{padding-top:22px;}
  .la28-section-divider{display:block;}
  .la28-section-divider p{margin-top:6px;}
  .la28-control-group{display:block;}
  .la28-control-label{display:block;padding:0;margin-bottom:6px;}
  .la28-table-tools{justify-content:flex-start;align-items:flex-start;flex-direction:column;gap:5px;}
  #rankingSearch{width:100%;}
  .ranking-table{font-size:13px;}
  .ranking-table th,.ranking-table td{padding:9px 8px;}
}

@media(max-width:480px){
  :root{--gutter:20px;}
  .la28-intro .lead-title{font-size:38px;}
  .la28-intro .lead-dek{font-size:16px;}
  .switch-btn,.event-tab{padding:7px 9px;font-size:13px;}
}
