:root {
  --bg: #080808;
  --panel: #101010;
  --panel-2: #161616;
  --line: #222;
  --line-2: #2c2c2c;
  --text: #f5f5f5;
  --muted: #9a9a9a;
  --dim: #6b6b6b;
  --accent: #c8ff1a;
  --accent-ink: #0b0b0b;
  --f1: #ff3b3b;
  --f2f3: #38d6ff;
  --argentina: #74c3ff;
  --historias: #ffb547;
  --radius: 6px;
  --sidebar: 236px;
  --rail: 300px;
  --top: 56px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: Montserrat, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px; line-height: 1.5; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.sec-f1 { color: var(--f1); }
.sec-f2f3 { color: var(--f2f3); }
.sec-argentina { color: var(--argentina); }
.sec-historias { color: var(--historias); }

.ico { width: 18px; height: 18px; flex: none; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--top);
  display: flex; align-items: center; gap: 16px; padding: 0 20px;
  background: rgba(8, 8, 8, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.logo { font-weight: 900; font-size: 20px; letter-spacing: -0.02em; display: inline-flex; align-items: center; white-space: nowrap; }
.logo .dot { color: var(--accent); margin: 0 2px; }
.logo .flag {
  width: 14px; height: 14px; margin-left: 6px; border-radius: 2px;
  background: conic-gradient(var(--text) 25%, #000 0 50%, var(--text) 0 75%, #000 0) 0 0 / 7px 7px;
}
.top-links { margin-left: auto; display: flex; gap: 4px; }
.top-links a {
  font-size: 12px; font-weight: 800; letter-spacing: .06em; padding: 7px 12px;
  border: 1px solid var(--line-2); border-radius: 999px; color: var(--muted);
}
.top-links a:hover, .top-links a.is-active { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.menu-btn {
  display: none; width: 40px; height: 40px; border: 1px solid var(--line-2); background: var(--panel);
  border-radius: var(--radius); padding: 11px 10px; cursor: pointer; flex-direction: column; justify-content: space-between;
}
.menu-btn span { display: block; height: 2px; background: var(--text); border-radius: 2px; }
.mobile-tabs { display: none; }

/* ---------- Shell ---------- */
.shell {
  display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr) var(--rail);
  gap: 24px; max-width: 1440px; margin: 0 auto; padding: 0 20px;
}
.sidebar {
  position: sticky; top: var(--top); align-self: start; height: calc(100vh - var(--top));
  overflow-y: auto; padding: 18px 0; border-right: 1px solid var(--line);
}
.nav, .nav-sub { list-style: none; margin: 0; padding: 0; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; margin-right: 14px;
  font-weight: 800; font-size: 13px; letter-spacing: .07em; text-transform: uppercase;
  border-left: 3px solid transparent; color: #d6d6d6; border-radius: 0 var(--radius) var(--radius) 0;
}
.nav a:hover { background: var(--panel-2); color: var(--text); }
.nav a.is-active { border-left-color: var(--accent); background: var(--panel-2); color: var(--accent); }
.nav-group { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); margin-right: 14px; }
.nav-title {
  display: flex; align-items: center; gap: 10px; padding: 0 14px 8px;
  font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent);
}
.nav-sub a { display: block; padding: 7px 14px 7px 42px; font-size: 13px; font-weight: 600; color: var(--muted); }
.nav-sub a:hover { color: var(--text); }
.nav-foot { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }

.main { padding: 20px 0 40px; min-width: 0; }
.rail { padding: 20px 0 40px; position: sticky; top: var(--top); align-self: start; }

/* ---------- Tabs ---------- */
.tabs {
  display: flex; gap: 0; margin-bottom: 18px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  flex: none; background: none; border: 0; border-right: 1px solid var(--line); padding: 11px 16px;
  font-size: 12px; font-weight: 800; letter-spacing: .07em; color: var(--muted); cursor: pointer;
}
.tabs button:hover { color: var(--text); }
.tabs button.is-active { color: var(--accent); background: var(--panel-2); box-shadow: inset 0 -2px 0 var(--accent); }

/* ---------- Placas gráficas ---------- */
.plate {
  position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: var(--radius);
  background: var(--panel-2); --c: var(--accent);
  background-image:
    radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--c) 38%, transparent), transparent 60%),
    repeating-linear-gradient(135deg, transparent 0 22px, rgba(255,255,255,.025) 22px 23px),
    linear-gradient(160deg, #1b1b1b, #0c0c0c);
}
.plate-f1 { --c: var(--f1); }
.plate-f2f3 { --c: var(--f2f3); }
.plate-argentina { --c: var(--argentina); }
.plate-historias { --c: var(--historias); }
.plate-label {
  position: absolute; left: 14px; bottom: 10px; font-weight: 900; font-size: clamp(22px, 4vw, 34px);
  letter-spacing: -0.03em; color: var(--c); text-transform: uppercase; line-height: 1;
}
.plate-num {
  position: absolute; right: 12px; top: 2px; font-weight: 900; font-style: italic; font-size: 64px; line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px color-mix(in srgb, var(--c) 70%, transparent);
}
.plate-stripes {
  position: absolute; left: 0; right: 0; top: 46%; height: 18px; transform: skewY(-8deg);
  background: linear-gradient(90deg, var(--c) 0 34%, transparent 34% 38%, var(--c) 38% 48%, transparent 48%);
  opacity: .85;
}
.plate-big .plate-label { font-size: clamp(30px, 6vw, 56px); left: 20px; bottom: 16px; }
.plate-big .plate-num { font-size: 120px; }
.plate-big .plate-stripes { height: 28px; }

/* ---------- Destacada ---------- */
.feature {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; margin-bottom: 26px;
  border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--panel); overflow: hidden;
  box-shadow: inset 3px 0 0 var(--accent);
}
.feature .plate { border-radius: 0; aspect-ratio: auto; min-height: 260px; }
.feature-body { padding: 26px 26px 24px; display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.feature h1 { font-size: clamp(22px, 2.2vw, 28px); font-weight: 900; text-transform: uppercase; }
.feature p { margin: 0; color: #cfcfcf; }
.feature:hover h1 { color: var(--accent); }

.kicker { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.btn {
  align-self: flex-start; display: inline-block; background: var(--accent); color: var(--accent-ink);
  font-weight: 900; font-size: 12px; letter-spacing: .08em; padding: 10px 16px; border-radius: 4px;
}

/* ---------- Bloques ---------- */
.block { margin-bottom: 26px; }
.block-head {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--panel);
  border: 1px solid var(--line); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0;
}
.block-head h2 { font-size: 13px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.block-head .more { font-size: 11px; font-weight: 800; letter-spacing: .08em; color: var(--accent); }
.block-head .count { margin-left: auto; font-size: 12px; font-weight: 800; color: var(--dim); }
.block-head .more + .count { margin-left: 0; }
.block-head .more { margin-left: auto; order: 2; }

.list, .cards, .mini, .block > .cal-row:first-of-type { border: 1px solid var(--line); }
.list { border-radius: 0 0 var(--radius) var(--radius); }
.row {
  display: grid; grid-template-columns: 52px 62px minmax(0, 1fr) 18px; align-items: center; gap: 10px;
  padding: 12px 14px; border-bottom: 1px solid var(--line); background: #0c0c0c;
}
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--panel-2); }
.row:hover .row-title { color: var(--accent); }
.row-date { font-size: 12px; font-weight: 700; color: var(--dim); }
.row-sec { font-size: 11px; font-weight: 900; letter-spacing: .05em; }
.row-main { min-width: 0; }
.row-title { display: block; font-weight: 700; font-size: 14px; }
.row-sub { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-go { color: var(--dim); font-size: 20px; }

.cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1px;
  background: var(--line); border-radius: 0 0 var(--radius) var(--radius); overflow: hidden;
}
.card { background: #0c0c0c; display: flex; flex-direction: column; }
.card .plate { border-radius: 0; }
.card-body { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chip {
  font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  border: 1px solid var(--line-2); border-radius: 999px; padding: 2px 8px;
}
.card h3 { font-size: 16px; font-weight: 800; }
.card p { margin: 0; color: var(--muted); font-size: 13.5px; }
.card-foot { margin-top: auto; padding-top: 4px; font-size: 12px; color: var(--dim); font-weight: 600; }
.card:hover { background: var(--panel-2); }
.card:hover h3 { color: var(--accent); }
.card[hidden], .row[hidden] { display: none; }

/* ---------- Calendario y tablas ---------- */
.cal-row {
  display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  padding: 11px 14px; background: #0c0c0c; border: 1px solid var(--line); border-top: 0;
}
.block-head + .cal-row { border-top: 1px solid var(--line); }
.cal-cat { font-size: 11px; font-weight: 900; color: var(--accent); letter-spacing: .05em; }
.cal-name { font-weight: 700; font-size: 13.5px; min-width: 0; }
.cal-name small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.cal-state { font-size: 12px; font-weight: 800; }
.cal-state .live { color: #ff4d4d; }
.cal-state .done { color: var(--dim); }
.cal-state .next { color: var(--text); }
.cal-row.is-done { opacity: .55; }
.data-note { font-size: 12px; color: var(--dim); margin: 8px 2px 0; }
.empty {
  padding: 18px 14px; background: #0c0c0c; border: 1px solid var(--line); color: var(--muted); font-size: 13.5px;
  border-radius: 0 0 var(--radius) var(--radius); margin: 0;
}
.standings { width: 100%; border-collapse: collapse; background: #0c0c0c; border: 1px solid var(--line); font-size: 13.5px; }
.standings th, .standings td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.standings th { font-size: 11px; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.standings td:last-child, .standings th:last-child { text-align: right; font-weight: 800; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.mini { border-radius: 0 0 var(--radius) var(--radius); background: #0c0c0c; }
.mini a { display: block; padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: 13.5px; font-weight: 700; }
.mini a:last-child { border-bottom: 0; }
.mini a span { display: block; font-size: 10.5px; font-weight: 900; letter-spacing: .08em; margin-bottom: 2px; }
.mini a:hover { color: var(--accent); }

/* ---------- Encabezado de sección ---------- */
.hero-sec {
  padding: 26px 24px; margin-bottom: 18px; border: 1px solid var(--line-2); border-radius: var(--radius);
  background: linear-gradient(120deg, var(--panel-2), var(--panel)); position: relative; overflow: hidden;
  box-shadow: inset 3px 0 0 var(--accent);
}
.hero-sec h1 { font-size: clamp(28px, 4vw, 44px); font-weight: 900; text-transform: uppercase; margin: 6px 0 8px; }
.hero-sec p { margin: 0 0 4px; color: #cfcfcf; max-width: 60ch; }
.hero-sec .btn { margin-top: 14px; }
.sec-bg-f1 { box-shadow: inset 3px 0 0 var(--f1); }
.sec-bg-f2f3 { box-shadow: inset 3px 0 0 var(--f2f3); }
.sec-bg-argentina { box-shadow: inset 3px 0 0 var(--argentina); }
.sec-bg-historias { box-shadow: inset 3px 0 0 var(--historias); }

/* ---------- Nota ---------- */
.note { max-width: 760px; margin-bottom: 30px; }
.crumbs { font-size: 12px; font-weight: 700; color: var(--dim); margin-bottom: 14px; letter-spacing: .03em; }
.crumbs a:hover { color: var(--accent); }
.note-head { margin-bottom: 18px; }
.note-head h1 { font-size: clamp(26px, 3.6vw, 40px); font-weight: 900; margin: 10px 0 12px; }
.lead { font-size: 17px; color: #d8d8d8; margin: 0 0 12px; font-weight: 500; }
.byline { font-size: 12.5px; color: var(--dim); font-weight: 700; }
.note > .plate { margin-bottom: 24px; }
.prose { font-size: 16.5px; line-height: 1.75; color: #e6e6e6; }
.prose p { margin: 0 0 1.1em; }
.prose h2 { font-size: 21px; font-weight: 900; margin: 1.7em 0 .6em; text-transform: uppercase; letter-spacing: .01em; }
.prose h2::before { content: ""; display: inline-block; width: 10px; height: 10px; background: var(--accent); margin-right: 10px; vertical-align: 2px; }
.prose h3 { font-size: 18px; font-weight: 800; margin: 1.4em 0 .5em; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .4em; }
.prose li::marker { color: var(--accent); }
.prose strong { color: var(--text); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose blockquote {
  margin: 1.5em 0; padding: 14px 18px; border-left: 3px solid var(--accent); background: var(--panel);
  font-weight: 600; font-size: 17px; border-radius: 0 var(--radius) var(--radius) 0;
}
.prose blockquote p { margin: 0; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line); margin-top: 20px; padding: 28px 20px 36px;
  display: grid; grid-template-columns: 1fr auto; gap: 16px 30px; max-width: 1440px; margin-inline: auto;
}
.footer p { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.foot-links a:hover { color: var(--accent); }
.footer .legal { grid-column: 1 / -1; font-size: 11.5px; color: var(--dim); }

.cal-mobile { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .shell { grid-template-columns: var(--sidebar) minmax(0, 1fr); }
  .rail { display: none; }
  .cal-mobile { display: block; }
}
@media (max-width: 900px) {
  :root { --top: 54px; }
  .topbar { padding: 0 16px; gap: 12px; }
  .menu-btn { display: flex; }
  .top-links { display: none; }
  .logo { font-size: 18px; }
  .mobile-tabs {
    display: flex; position: sticky; top: var(--top); z-index: 25; background: var(--bg);
    border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; padding: 8px 16px; gap: 6px;
  }
  .mobile-tabs::-webkit-scrollbar { display: none; }
  .mobile-tabs a {
    flex: none; font-size: 12px; font-weight: 800; letter-spacing: .06em; padding: 6px 12px;
    border: 1px solid var(--line-2); border-radius: 999px; color: var(--muted);
  }
  .mobile-tabs a.is-active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
  .shell { display: block; padding: 0 16px; }
  .sidebar {
    position: fixed; z-index: 40; top: var(--top); left: 0; bottom: 0; height: auto; width: min(84vw, 300px);
    background: var(--bg); transform: translateX(-102%); transition: transform .22s ease; border-right: 1px solid var(--line-2);
  }
  body.menu-open .sidebar { transform: none; }
  body.menu-open::after {
    content: ""; position: fixed; inset: var(--top) 0 0 0; background: rgba(0,0,0,.6); z-index: 35;
  }
  .main { padding-top: 16px; }
  .tabs-home { display: none; }
  .feature { grid-template-columns: 1fr; }
  .feature .plate { min-height: 0; aspect-ratio: 16 / 8; }
  .feature-body { padding: 18px 16px 20px; }
  .two { grid-template-columns: 1fr; gap: 0; }
  .footer { grid-template-columns: 1fr; padding: 24px 16px 32px; }
}
@media (max-width: 560px) {
  body { font-size: 14.5px; }
  .row { grid-template-columns: 44px minmax(0, 1fr) 14px; gap: 8px 10px; }
  .row-sec { display: none; }
  .cards { grid-template-columns: 1fr; }
  .card { display: grid; grid-template-columns: 112px minmax(0, 1fr); }
  .card .plate { aspect-ratio: auto; height: 100%; min-height: 112px; }
  .card .plate-num { font-size: 40px; }
  .card .plate-label { font-size: 18px; left: 8px; bottom: 8px; }
  .card .plate-stripes { height: 10px; }
  .card-body { padding: 12px; gap: 6px; }
  .card h3 { font-size: 15px; }
  .card p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .hero-sec { padding: 20px 16px; }
  .prose { font-size: 16px; }
  .cal-row { grid-template-columns: 56px minmax(0, 1fr) auto; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Posiciones ---------- */
.standings td { vertical-align: middle; }
.standings td small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 600; }
.standings .pos { width: 34px; font-weight: 900; color: var(--muted); }
.standings tbody tr:nth-child(-n+3) .pos { color: var(--accent); }
.standings .num, .standings th.num { text-align: center; color: var(--muted); width: 44px; }
.standings .pts { position: relative; width: 78px; font-variant-numeric: tabular-nums; }
.standings .bar {
  position: absolute; right: 12px; bottom: 5px; height: 3px; max-width: 54px; border-radius: 2px;
  background: color-mix(in srgb, var(--accent) 55%, transparent);
}
.standings .bar { width: 0; }
.standings tr.is-arg { background: color-mix(in srgb, var(--argentina) 12%, #0c0c0c); }
.standings tr.is-arg td:first-child { box-shadow: inset 3px 0 0 var(--argentina); }
.arg-tag {
  font-size: 9.5px; font-weight: 900; letter-spacing: .08em; color: var(--accent-ink); background: var(--argentina);
  border-radius: 3px; padding: 1px 5px; margin-left: 6px; vertical-align: 2px;
}
.rail .standings, .cal-mobile .standings { font-size: 13px; }

/* ---------- En vivo ---------- */
.shell.no-rail { grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.shell.no-rail .rail { display: none; }
.top-links a.live-link, .mobile-tabs a.live-link { color: #ff5a5a; border-color: #4a1d1d; }
.top-links a.live-link::before, .mobile-tabs a.live-link::before {
  content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #ff3b3b;
  margin-right: 6px; vertical-align: 1px; animation: blink 1.4s infinite;
}
.top-links a.live-link.is-active, .mobile-tabs a.live-link.is-active { background: #ff3b3b; color: #fff; border-color: #ff3b3b; }
.top-links a.live-link.is-active::before, .mobile-tabs a.live-link.is-active::before { background: #fff; }
.hero-live { box-shadow: inset 3px 0 0 #ff3b3b; }
.hero-live .kicker { color: #ff5a5a; }
.pulse { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ff3b3b; animation: blink 1.4s infinite; vertical-align: 1px; }
@keyframes blink { 50% { opacity: .25; } }
.live-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); overflow: hidden;
}
.live-card {
  display: grid; grid-template-columns: 78px minmax(0, 1fr); grid-template-rows: auto auto; gap: 4px 12px;
  padding: 14px; background: #0c0c0c; align-items: center;
}
.live-card:hover { background: var(--panel-2); }
.live-card:hover .live-go { color: var(--accent); }
.live-short { grid-row: 1 / 3; font-weight: 900; font-size: 17px; letter-spacing: -0.01em; line-height: 1.05; }
.live-body strong { display: block; font-size: 14.5px; font-weight: 800; }
.live-body small { display: block; color: var(--muted); font-size: 12.5px; }
.live-go { font-size: 11.5px; font-weight: 800; letter-spacing: .04em; color: var(--dim); }
@media (prefers-reduced-motion: reduce) { .pulse, .live-link::before { animation: none !important; } }
.carnum {
  display: inline-block; min-width: 30px; margin-right: 8px; padding: 1px 5px; border-radius: 3px; text-align: center;
  font-size: 11px; font-weight: 900; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--muted);
}
.more-rows { border: 1px solid var(--line); border-top: 0; background: #0c0c0c; }
.more-rows summary {
  cursor: pointer; padding: 10px 14px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent); list-style: none;
}
.more-rows summary::-webkit-details-marker { display: none; }
.more-rows summary::after { content: " ›"; }
.more-rows[open] summary::after { content: " ‹"; }
.more-rows .standings { border: 0; border-top: 1px solid var(--line); }
.data-note a { color: var(--muted); text-decoration: underline; }
