@charset "UTF-8";
/* ARS 2.0 — tulokset, kisahistoria, kuljettajat, kuljettajaprofiili ja Hall of Fame.
   Ladataan ars2.css:n ja ars2-series.css:n jälkeen. Kisan sijoituskaavion
   kuljettajakohtaiset värit (race-results.css) säilyvät ennallaan. */

/* --- Yhteiset: sivuotsikot, paneelit, taulukot, lomakkeet --- */
.results-page, .race-history-page, .race-detail-page, .archive-page { padding-top: clamp(32px, 4.5vw, 60px); padding-bottom: clamp(48px, 7vw, 96px); }
.results-page h1, .race-history-page h1, .race-detail-page h1, .archive-page h1, .hall-hero h1 {
  font-size: clamp(2.3rem, 5vw, 3.75rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-variation-settings: 'wdth' 118, 'wght' 800;
}
.results-page-heading p, .race-history-page > p, .race-detail-heading p, .archive-heading p, .hall-hero p { margin-top: 12px; max-width: 56ch; color: var(--frost); }
#main .panel { background: var(--board); border: 1px solid var(--rule); border-radius: 4px; box-shadow: none; }
#main th {
  color: var(--frost-dim);
  font-size: 11.5px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  border-bottom: 1px solid var(--rule-strong);
  background: transparent;
}
#main td { border-bottom-color: var(--rule); font-variant-numeric: tabular-nums; }
#main select, #main input[type=search], #main input[type=text] {
  background: var(--night);
  border: 1px solid var(--rule-strong);
  border-radius: 3px;
  color: var(--snow);
}
#main select:focus, #main input:focus { outline: 2px solid var(--ars); outline-offset: 1px; border-color: var(--ars-deep); }
#main label { color: var(--frost); }
.archive-source, .results-footnote { color: var(--frost-dim); font-size: 12px; }

/* --- Tulokset ja sarjapisteet --- */
.results-page-heading { align-items: flex-end; padding-bottom: 22px; border-bottom: 1px solid var(--rule-strong); }
.results-controls {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  padding: 20px 0;
  box-shadow: none;
}
.results-sheet { background: transparent; border: 0; box-shadow: none; padding: 26px 0 0; border-radius: 0; }
.results-sheet-heading { padding-bottom: 16px; border-bottom: 1px solid var(--rule-strong); }
.results-sheet-heading h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.results-sheet-heading p { color: var(--frost); font-size: 13px; }
#main .score-table th[scope=row] { color: var(--snow); font-size: 13.5px; font-variation-settings: 'wdth' 106, 'wght' 650; border-bottom: 1px solid var(--rule); }
.score-table td { color: var(--frost); }
.score-place {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 26px;
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  background: transparent;
  color: var(--frost);
  font-size: 12px;
  font-variation-settings: 'wdth' 100, 'wght' 650;
}
.score-points { color: var(--snow); font-size: 15px; font-variation-settings: 'wdth' 110, 'wght' 750; }
.score-leader { background: color-mix(in srgb, var(--ars) 7%, transparent); }
.score-leader .score-place { background: var(--ars); border-color: var(--ars); color: var(--ars-ink); }
.score-leader .score-points { color: var(--ars); }

/* --- Kisahistoria --- */
.race-history-controls { display: flex; flex-wrap: wrap; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--rule); margin-top: 22px; }
.race-history-controls label { flex: 1 1 320px; max-width: 520px; }
.race-history-controls label:first-child { flex: 0 1 240px; }
.race-history-controls input, .race-history-controls select { width: 100%; }
/* Kilpailut ajanottoriveinä: sarja, kilpailu ja päivä | kuljettajat | sarjapisteet | tulokset. */
.race-history-grid { display: block; margin-top: 0; }
#main .race-history-grid > section.panel {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto auto;
  grid-template-areas: "series info pts btn" "title info pts btn" "date info pts btn";
  align-items: center;
  column-gap: 28px;
  padding: 16px 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
}
.race-history-series { grid-area: series; color: var(--frost-dim); font-size: 12px; letter-spacing: 0; text-transform: none; }
.race-history-grid h3 { grid-area: title; font-size: 1.125rem; margin: 2px 0; }
.race-history-grid .help { grid-area: date; margin: 0; font-variant-numeric: tabular-nums; }
.race-history-grid .race-result-link { display: contents; }
.race-history-grid .race-result-link > div { grid-area: info; }
.race-history-grid .race-result-link > a { grid-area: btn; }
.race-history-grid > section > .text-link { grid-area: pts; }
.race-result-link { border-top: 1px solid var(--rule); }
.race-result-link strong { color: var(--snow); }
.race-result-link span, .race-result-link small { color: var(--frost); }

/* --- Yksittäinen kilpailu --- */
.race-detail-heading { padding-bottom: 20px; border-bottom: 1px solid var(--rule-strong); margin-bottom: 22px; }
.race-session-links { gap: 8px; }
.race-classification h2, .race-progress-panel h2, .race-laps-panel h2 { font-size: 1.25rem; }
.result-driver-button { background: none; border: 0; padding: 0; color: var(--snow); font-variation-settings: 'wdth' 106, 'wght' 650; }
.result-driver-button:hover { background: none; color: var(--ars); border: 0; }
#main .race-classification td b {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 26px;
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  background: transparent;
  color: var(--frost);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
#main .race-classification tbody tr:first-child td b { background: var(--ars); border-color: var(--ars); color: var(--ars-ink); }
.race-classification td small { color: var(--frost-dim); }
.result-selected { background: color-mix(in srgb, var(--ars) 9%, transparent); }
.race-stat-strip { gap: 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: transparent; }
.race-stat-strip { display: flex; flex-wrap: wrap; }
#main .race-stat-strip span { padding: 12px 22px 12px 0; margin: 0; border: 0; border-radius: 0; background: transparent; color: var(--frost); }
.race-stat-strip b { color: var(--snow); font-variant-numeric: tabular-nums; font-variation-settings: 'wdth' 110, 'wght' 750; }
.position-chart .chart-grid line { stroke: var(--rule); }
.position-chart text { fill: var(--frost-dim); }

/* --- Kuljettajat: ajanottotaulun rivit korttiruudukon tilalla --- */
.archive-heading { align-items: flex-end; padding-bottom: 22px; border-bottom: 1px solid var(--rule-strong); }
.archive-heading h1 em { font-style: normal; color: inherit; }
#main .archive-count { text-align: right; background: none; border: 0; box-shadow: none; padding: 0; min-width: 0; }
#main .archive-count strong { color: var(--snow); font-size: clamp(1.5rem, 2.5vw, 2rem); font-variant-numeric: tabular-nums; font-variation-settings: 'wdth' 112, 'wght' 750; text-shadow: none; }
#main .archive-count span { color: var(--frost-dim); font-size: 12px; }
.driver-toolbar { padding: 18px 0; border-bottom: 1px solid var(--rule); }
#main .archive-search { display: flex; align-items: center; gap: 8px; padding: 0 12px; background: var(--night); border: 1px solid var(--rule-strong); border-radius: 3px; }
#main .archive-search svg { width: 17px; height: 17px; color: var(--frost-dim); }
#main .archive-search input { border: 0; background: transparent; margin: 0; outline-offset: 0; }
#main .archive-search:focus-within { border-color: var(--ars-deep); outline: 2px solid var(--ars); outline-offset: 1px; }
#main .archive-search input:focus { outline: none; }
.driver-directory { display: block; margin-top: 4px; }
.driver-directory .driver-card {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
  transition: background-color 0.15s;
}
.driver-directory .driver-card:hover { background: #09131c; transform: none; }
.driver-card-top { display: flex; align-items: center; gap: 14px; margin: 0; }
.driver-card-top h2 { font-size: 1rem; margin: 0; font-variation-settings: 'wdth' 110, 'wght' 700; }
.driver-card-top span { color: var(--frost-dim); font-size: 12px; }
.driver-card-top > svg { display: none; }
.driver-card-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; border: 0; }
.driver-card-stats strong { font-size: 15px; font-variant-numeric: tabular-nums; font-variation-settings: 'wdth' 110, 'wght' 700; color: var(--snow); }
.driver-card-stats span { color: var(--frost-dim); font-size: 11.5px; }
.driver-avatar, .avatar {
  border-radius: 3px;
  background: var(--board-lift);
  border: 1px solid var(--rule-strong);
  color: var(--snow);
  font-variation-settings: 'wdth' 110, 'wght' 750;
}
#current-roster { margin-top: 32px; }

/* --- Kuljettajaprofiili --- */
.profile-back { margin-bottom: 22px; }
.profile-heading { gap: 22px; padding-bottom: 24px; border-bottom: 1px solid var(--rule-strong); }
.driver-aliases span { border: 1px solid var(--rule-strong); border-radius: 999px; background: transparent; color: var(--frost); }
.profile-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 24px;
  border-bottom: 1px solid var(--rule);
}
.profile-metrics article {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 4px;
  padding: 18px 20px;
  border: 0;
  border-left: 1px solid var(--rule);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.profile-metrics article:first-child { border-left: 0; padding-left: 0; }
.profile-metrics article svg, .profile-metrics article i { display: none; }
.profile-metrics strong { font-size: clamp(1.25rem, 2vw, 1.6rem); font-variant-numeric: tabular-nums; font-variation-settings: 'wdth' 112, 'wght' 750; color: var(--snow); }
.profile-metrics span { color: var(--frost-dim); font-size: 12px; }
.finish-row progress { accent-color: var(--ars); }
.driver-titles > div { border-color: var(--rule); }
.driver-titles svg { color: var(--frost-dim); }
.session-pill { border: 1px solid var(--rule-strong); background: transparent; color: var(--frost); border-radius: 999px; }
.position-pill { border-radius: 2px; font-variant-numeric: tabular-nums; }
.history-pagination { border-top: 1px solid var(--rule); padding-top: 14px; }

/* --- Hall of Fame --- */
.hall-premium .hall-hero {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule-strong);
  border-radius: 0;
  padding: 0 0 26px;
  box-shadow: none;
}
.hall-premium .hall-hero:before, .hall-premium .hall-hero:after { content: none; }
.hall-hero h1 em { font-style: normal; color: inherit; }
.hall-hero-emblem { display: none; }
.hall-metrics { gap: 24px; margin-top: 18px; }
.hall-metrics span { border: 0; background: transparent; padding: 0; color: var(--frost); font-size: 13px; }
.hall-metrics strong { color: var(--snow); font-variant-numeric: tabular-nums; font-variation-settings: 'wdth' 112, 'wght' 750; font-size: 1.25rem; margin-right: 6px; }
.hall-archive { margin-top: 30px; }
.hall-honours { display: block; margin-top: 10px; }
.hall-honours .championship-honour {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.honour-icon { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--rule-strong); border-radius: 2px; background: transparent; color: var(--frost); }
.honour-icon svg { width: 15px; height: 15px; }
.championship-honour > div { display: grid; grid-template-columns: minmax(0, 1.3fr) auto minmax(0, 1fr); align-items: baseline; gap: 4px 18px; }
.championship-honour h3 { font-size: 1rem; margin: 0; font-variation-settings: 'wdth' 110, 'wght' 700; }
.championship-honour h3 a { color: var(--snow); }
.honour-kind { color: var(--frost-dim); font-size: 12px; white-space: nowrap; }
.honour-driver { display: flex; justify-content: flex-end; gap: 12px; }
.honour-driver strong a { color: var(--ars); }
.honour-driver span { color: var(--frost-dim); font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
  .profile-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .profile-metrics article:nth-child(4) { border-left: 0; padding-left: 0; }
  .profile-metrics article:nth-child(n+4) { border-top: 1px solid var(--rule); }
}
@media (max-width: 760px) {
  #main .race-history-grid > section.panel {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "series series" "title title" "date date" "info btn" "pts pts";
    row-gap: 6px;
  }
  .driver-directory .driver-card { grid-template-columns: 1fr; gap: 10px; }
  .championship-honour > div { grid-template-columns: 1fr; }
  .honour-driver { justify-content: flex-start; }
  .profile-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-metrics article:nth-child(odd) { border-left: 0; padding-left: 0; }
  .profile-metrics article:nth-child(4) { border-left: 1px solid var(--rule); padding-left: 20px; }
  .profile-metrics article:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .results-page-heading, .archive-heading { align-items: flex-start; }
  .archive-heading { flex-direction: column; gap: 14px; }
  #main .archive-count { text-align: left; }
}

/* AI-botti kilpailun tulosluettelossa. Botti näkyy oikealla sijallaan, mutta se ei saa
   sarjapisteitä, joten merkintä kertoo lukijalle eron. */
.race-classification .bot-tag{display:inline-block;margin-left:.45rem;padding:.05rem .4rem;border-radius:999px;
 font-size:.7rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase;
 background:color-mix(in srgb, var(--ars-accent, #d7263d) 18%, transparent);color:var(--ars-ink-soft, #c9ced6);
 border:1px solid color-mix(in srgb, var(--ars-accent, #d7263d) 45%, transparent);vertical-align:middle}
