/* carreras.hipix.cl: misma línea gráfica que hipix.cl y mesa.hipix.cl (Sora, navy, naranja, crema). */
:root {
  --navy: #152846;
  --navy-dark: #0f2342;
  --orange: #dc5b1d;
  --orange-text: #b74b1d;
  --bright: #f3a14a;
  --teal: #2f6f73;
  --slate: #556a82;
  --text: #152846;
  --text-soft: #2c4361;
  --muted: #556a82;
  --bg: #f8f2e9;
  --surface: #fffdf9;
  --soft: #fffaf4;
  --border: #ecd8c4;
  --line: #f1e3d4;
  --radius: 18px;
  --shadow: 0 14px 28px rgba(21, 40, 69, 0.08);
  --gradient: linear-gradient(135deg, #dc5b1d, #f3a14a);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: Sora, 'Segoe UI', Tahoma, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--orange-text); }
a:hover { color: var(--orange); }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
p, ol, ul, dl, dd { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button { font: inherit; }
[hidden] { display: none !important; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }

.container { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.stack { display: flex; flex-direction: column; gap: 28px; }
.center { text-align: center; align-items: center; }
.left { text-align: left; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.fine { font-size: 13px; color: var(--muted); text-align: center; }
.lead { font-size: 16px; color: var(--text-soft); max-width: 70ch; }
.state { text-align: center; color: var(--muted); padding: 32px 0; }
.loader { display: flex; justify-content: center; padding: 40px 0; }
.spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid rgba(220, 91, 29, 0.18); border-top-color: var(--orange);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---------- botones y etiquetas ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 24px; border-radius: 999px;
  font-weight: 600; text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--gradient); color: #fff; box-shadow: 0 10px 22px rgba(220, 91, 29, 0.28); }
.btn-primary:hover { color: #fff; }
.btn-ghost { background: rgba(255, 250, 241, 0.86); border-color: rgba(21, 40, 69, 0.3); color: var(--navy); }
.btn-ghost:hover { color: var(--navy); }
.btn-outline-light { border-color: rgba(255, 255, 255, 0.45); color: #fff; }
.btn-outline-light:hover { color: #fff; }
.btn-sm { min-height: 44px; padding: 10px 20px; }
.label-short { display: none; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.actions-center { justify-content: center; }

.tag { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; letter-spacing: 0.02em; }
.tag-highlight { background: var(--gradient); color: #fff; }
.tag-scratched { background: rgba(21, 40, 69, 0.1); color: var(--muted); }
.tag-grade { background: rgba(21, 40, 69, 0.08); color: var(--navy); }
.tag-upcoming { background: rgba(220, 91, 29, 0.12); color: var(--orange-text); }
.tag-finished { background: rgba(21, 40, 69, 0.08); color: var(--navy); }

.chip { flex-shrink: 0; font-size: 12px; font-weight: 700; color: #fff; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.chip-1 { background: var(--orange-text); }
.chip-2 { background: var(--navy); }
.chip-3 { background: var(--teal); }
.chip-rest { background: rgba(21, 40, 69, 0.07); color: var(--muted); font-weight: 600; }

.num {
  width: 32px; height: 32px; flex-shrink: 0; border-radius: 9px; background-color: var(--navy); color: #fff;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(0, 0, 0, 0.12) 100%);
  font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
}
.num-sm { width: 24px; height: 24px; font-size: 12px; border-radius: 7px; }
.video-modal-number { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 14px; font-weight: 700; color: var(--orange-text); }
.num-empty { background: rgba(21, 40, 69, 0.08); color: var(--muted); background-image: none; }
.kicker { font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--orange-text); }
.eyebrow { letter-spacing: 0.3em; text-transform: uppercase; font-size: 12px; color: rgba(21, 40, 69, 0.75); }
.eyebrow-light { color: var(--bright); letter-spacing: 0.16em; }
.muted-light { color: #c9d3e0; max-width: 56ch; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 249, 241, 0.94); backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(21, 40, 69, 0.1); box-shadow: 0 8px 20px rgba(21, 40, 69, 0.08);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.brand img { height: 38px; width: auto; }
.brand-tag { font-size: 13px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--orange-text); border-left: 1px solid var(--border); padding-left: 12px; white-space: nowrap; }
.nav-links { display: flex; align-items: center; gap: 8px 22px; font-size: 15px; flex-shrink: 0; }
.nav-links a:not(.btn) { color: var(--navy); text-decoration: none; }
.nav-links a:not(.btn):hover { color: var(--orange); }

/* ---------- hero: navy con líneas de pista, sin fotos de terceros ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(243, 161, 74, 0.28) 0%, rgba(243, 161, 74, 0) 55%),
    radial-gradient(90% 80% at 0% 100%, rgba(220, 91, 29, 0.22) 0%, rgba(220, 91, 29, 0) 60%),
    var(--navy);
}
.hero::before {
  content: ''; position: absolute; right: -18%; top: -40%; width: 90%; aspect-ratio: 1; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 46px rgba(255, 255, 255, 0.025), 0 0 0 48px rgba(255, 255, 255, 0.07), 0 0 0 96px rgba(255, 255, 255, 0.02), 0 0 0 98px rgba(255, 255, 255, 0.05);
  pointer-events: none;
}
.hero-content { position: relative; padding-top: 72px; padding-bottom: 80px; display: flex; flex-direction: column; gap: 16px; }
.hero-content > * { max-width: 760px; }
.hero h1 { font-size: clamp(38px, 5.4vw, 64px); font-weight: 700; letter-spacing: -0.015em; }
.hero-subtitle { font-size: clamp(18px, 2vw, 24px); color: #f6d7bd; font-weight: 600; }
.when { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.when-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; font-size: clamp(17px, 1.8vw, 21px); }
.when-main strong { color: #fff; }
.when-main span { color: var(--bright); font-weight: 700; }
.when-hint { color: #c9d3e0; font-size: 15px; }
.countdown { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.countdown-label { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: #c9d3e0; margin-right: 4px; }
.countdown-unit {
  display: inline-flex; align-items: baseline; gap: 4px; padding: 8px 12px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14);
}
.countdown-unit strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.countdown-unit span { font-size: 12px; color: #c9d3e0; }
.countdown-live { font-weight: 700; color: var(--bright); }
.hero .actions { margin-top: 14px; }
.hero-static { color: #c9d3e0; }

/* Con ilustración (assets/covers/{slug}.webp): diseño de la mesa, crema con la imagen a la derecha. */
.hero-cover { background: #f8ecdb; color: var(--text); min-height: 620px; display: flex; align-items: center; }
.hero-cover::before { display: none; }
.hero-media { position: absolute; top: 0; right: 0; width: 74%; height: 100%; object-fit: cover; object-position: 70% 50%; }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(248, 236, 219, 1) 0%, rgba(248, 236, 219, 1) 30%, rgba(248, 236, 219, 0.9) 37%, rgba(248, 236, 219, 0.55) 44%, rgba(248, 236, 219, 0) 54%);
}
.hero-cover .hero-content { width: 100%; }
.hero-cover .hero-content > * { max-width: 470px; }
.hero-cover .eyebrow-light { color: var(--orange-text); }
.hero-cover h1 { color: var(--navy); }
.hero-cover .hero-subtitle { color: var(--orange-text); }
.hero-cover .when-main strong { color: var(--navy); }
.hero-cover .when-main span { color: var(--orange-text); }
.hero-cover .when-hint, .hero-cover .hero-static, .hero-cover .countdown-label { color: #526a84; }
.hero-cover .countdown-unit { background: rgba(255, 253, 249, 0.85); border-color: var(--border); }
.hero-cover .countdown-unit strong { color: var(--navy); }
.hero-cover .countdown-unit span { color: var(--muted); }
.hero-cover .countdown-live { color: var(--orange-text); }
.hero-cover .btn-outline-light { background: rgba(255, 250, 241, 0.86); border-color: rgba(21, 40, 69, 0.3); color: var(--navy); }

/* ---------- secciones ---------- */
.section { padding: 72px 0; }
.section-soft { background: var(--soft); }
.section-warm { background: linear-gradient(180deg, #fff7ec 0%, #f6ece2 100%); }
.section-navy { background: var(--navy); color: #fff; }
.section-navy h2 { color: #fff; }
.section-head { display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center; }
.section-head p { max-width: 62ch; color: var(--muted); }
h2 { font-size: clamp(26px, 2.4vw, 36px); }

/* destacado (el chileno) */
.feature {
  background: var(--surface); border: 1px solid var(--border); border-radius: 24px; box-shadow: 0 18px 34px rgba(21, 40, 69, 0.1);
  padding: 28px; display: flex; flex-direction: column; gap: 20px; position: relative; overflow: hidden;
}
.feature::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--gradient); }
.feature-head { display: flex; align-items: center; gap: 16px; }
.feature-head > .feature-title { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.silks { width: 40px; height: 40px; flex-shrink: 0; object-fit: contain; }
@media (min-width: 768px) { .silks { width: 56px; height: 56px; } .silks.silks-sm { width: 32px; height: 32px; } .silks.silks-lg { width: 96px; height: 96px; } }
.silks-lg { width: 88px; height: 88px; }
.silks-sm { width: 32px; height: 32px; }
.runner-head > .silks { margin-top: -2px; margin-right: -4px; }
.feature-name { font-size: clamp(30px, 3.6vw, 42px); display: flex; align-items: center; gap: 10px; }
.feature-number { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.feature-number .num { width: 52px; height: 52px; font-size: 24px; border-radius: 14px; }
.feature-result { font-weight: 700; color: var(--orange-text); font-size: 18px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat {
  background: var(--soft); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.stat-label { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.stat strong { font-size: 18px; color: var(--navy); overflow-wrap: anywhere; }
.stat-sub { font-size: 13px; color: var(--muted); }

/* últimas carreras */
.recent-heading { font-size: 15px; color: var(--navy); }
.recent { display: flex; flex-direction: column; gap: 8px; }
.recent-item {
  display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: start;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
}
.recent-item.is-win { background: rgba(220, 91, 29, 0.06); border-color: rgba(220, 91, 29, 0.25); }
.recent-pos { display: flex; flex-direction: column; align-items: center; line-height: 1.1; padding-top: 2px; }
.recent-pos strong { font-size: 22px; color: var(--navy); }
.recent-item.is-win .recent-pos strong { color: var(--orange-text); }
.recent-pos span { font-size: 11px; color: var(--muted); }
.recent-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.recent-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.recent-race { font-weight: 700; font-size: 15px; }
.recent-meta { font-size: 13px; color: var(--muted); }
.recent-margin { font-size: 13px; color: var(--text-soft); }

.video-toggle {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 14px;
  border-radius: 999px; border: 1px solid rgba(220, 91, 29, 0.45); background: rgba(220, 91, 29, 0.08);
  color: var(--orange-text); font-size: 13px; font-weight: 700; cursor: pointer; text-decoration: none; margin-top: 6px;
}
.video-toggle:hover { background: rgba(220, 91, 29, 0.14); color: var(--orange-text); }
.video-modal {
  width: min(960px, calc(100vw - 24px)); max-width: none; padding: 0; border: 0; border-radius: 20px;
  background: var(--surface); color: var(--text); box-shadow: 0 30px 60px rgba(15, 35, 66, 0.35);
}
.video-modal::backdrop { background: rgba(15, 35, 66, 0.72); backdrop-filter: blur(3px); }
.video-modal-box { padding: 18px 20px 16px; display: flex; flex-direction: column; gap: 12px; }
.video-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.video-modal-head h3 { font-size: 18px; }
.video-modal-close {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--soft); color: var(--navy); font-size: 18px; cursor: pointer;
}
.video-modal-close:hover { background: var(--line); }
.video-modal .video { border-radius: 12px; }
.video-modal .video-caption { margin-top: 0; text-align: left; }

/* campaña en tabla */
.record { margin-top: 8px; width: 100%; max-width: 440px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.record-counts { width: 100%; border-collapse: collapse; table-layout: fixed; }
.record-counts th { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 600; text-align: center; padding: 6px 4px; background: var(--soft); border-bottom: 1px solid var(--line); }
.record-counts th:first-child { width: 31%; }
.record-counts td { font-size: 17px; font-weight: 700; color: var(--navy); text-align: center; padding: 6px 4px; font-variant-numeric: tabular-nums; }
.record-counts .record-win { color: var(--orange-text); }
.record-prize { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 7px 12px; border-top: 1px solid var(--line); background: var(--soft); }
.record-prize-label { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 600; white-space: nowrap; }
.record-prize strong { font-size: 15px; color: var(--navy); font-variant-numeric: tabular-nums; white-space: nowrap; }
.record-lg { max-width: 560px; border-radius: 14px; }
.record-lg .record-counts th { font-size: 11px; padding: 8px 4px; }
.record-lg .record-counts td { font-size: 24px; padding: 10px 4px; }
.record-lg .record-prize { padding: 10px 16px; }
.record-lg .record-prize-label { font-size: 11px; }
.record-lg .record-prize strong { font-size: 19px; }
.feature-record { display: flex; flex-direction: column; gap: 4px; }

/* en vivo */
.video { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: #000; box-shadow: var(--shadow); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-caption { font-size: 14px; color: var(--muted); text-align: center; margin-top: 12px; }
.empty {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px 24px;
  text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center;
}
.empty-title { font-weight: 700; font-size: 18px; }

/* resultado */
.podium { display: flex; flex-direction: column; gap: 10px; max-width: 560px; margin: 0 auto; width: 100%; }
.podium-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border); font-weight: 600;
}
.podium-item:first-child { border: 2px solid rgba(220, 91, 29, 0.55); }

/* nómina */
.runners { display: flex; flex-direction: column; gap: 10px; }
.runner { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 8px 18px rgba(21, 40, 69, 0.05); }
.runner.is-highlighted { border: 2px solid rgba(220, 91, 29, 0.55); background: #fffaf3; }
.runner.is-scratched .runner-head { opacity: 0.55; }
.runner-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px 14px; padding: 14px 16px; cursor: pointer; list-style: none; }
.runner-head > .record { flex-basis: 100%; max-width: none; margin-top: 10px; }
.runner-head > .num, .runner-head > .chip { margin-top: 2px; }
/* Escritorio: todo en una fila, la campaña a la derecha del nombre y el "+" al final. En el celular la campaña baja a
   su propia fila a todo el ancho (flex-wrap) y el "+" queda arriba, junto al nombre. */
@media (min-width: 768px) {
  .runner-head { flex-wrap: nowrap; align-items: center; }
  .runner-head > .num, .runner-head > .chip { margin-top: 0; }
  .runner-head > .record { flex: 0 0 320px; margin-top: 0; order: 1; }
  .runner-head > .runner-toggle { order: 2; }
}
.runner-head::-webkit-details-marker { display: none; }
.runner-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.runner-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-weight: 700; font-size: 16px; }
.runner-country { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0.06em; }
.flag { width: 21px; height: 14px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(21, 40, 69, 0.15); flex-shrink: 0; }
.feature-name .flag { width: 27px; height: 18px; }
.feature-name .runner-country { font-size: 15px; }
.runner-sub { font-size: 13px; color: var(--text-soft); overflow-wrap: anywhere; }
.runner-sub.muted { color: var(--muted); }
.runner-toggle { width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%; border: 1px solid var(--border); position: relative; }
.runner-toggle::before, .runner-toggle::after { content: ''; position: absolute; left: 50%; top: 50%; width: 10px; height: 2px; background: var(--navy); transform: translate(-50%, -50%); transition: transform .2s ease; }
.runner-toggle::after { transform: translate(-50%, -50%) rotate(90deg); }
.runner[open] .runner-toggle::after { transform: translate(-50%, -50%) rotate(0deg); }
.runner-body { padding: 4px 16px 18px; display: flex; flex-direction: column; gap: 14px; border-top: 1px solid var(--line); padding-top: 16px; }
/* Ficha: cada dato en un recuadro suave, con una barrita naranja bajo el título; dos columnas también en el celular. */
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.fact { background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.fact dt { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.fact dt::after { content: ''; display: block; width: 18px; height: 3px; margin: 5px 0 6px; border-radius: 2px; background: var(--gradient); }
.fact dd { font-size: 14px; font-weight: 600; color: var(--navy); line-height: 1.35; overflow-wrap: anywhere; }
/* El último dato, si queda solo en su fila (con dos columnas), ocupa todo el ancho. */
@media (max-width: 767px) { .facts .fact:last-child:nth-child(odd) { grid-column: 1 / -1; } .feature .silks-lg { width: 64px; height: 64px; } .feature-head { gap: 12px; } }
.facts-race { background: transparent; }
.facts-race .fact { background: var(--surface); border-color: var(--border); }
.note { font-size: 14px; color: var(--text-soft); background: rgba(220, 91, 29, 0.06); border-radius: 12px; padding: 10px 14px; }
.link-out { font-size: 14px; font-weight: 600; width: fit-content; }
.seo-list { columns: 2; column-gap: 24px; font-size: 15px; color: var(--text-soft); }

/* portada */
.race-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.race-card {
  display: flex; flex-direction: column; gap: 8px; align-items: flex-start; padding: 24px; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.race-card:hover { transform: translateY(-2px); color: var(--text); box-shadow: 0 18px 34px rgba(21, 40, 69, 0.12); }
.race-card h3 { font-size: 22px; }
.race-card-sub { font-weight: 600; color: var(--orange-text); }
.race-card-when { font-weight: 600; font-size: 14px; }
.race-card-highlight { font-size: 14px; color: var(--text-soft); }
.notice { background: rgba(220, 91, 29, 0.08); border: 1px solid rgba(220, 91, 29, 0.25); border-radius: 14px; padding: 14px 18px; text-align: center; }

.site-footer { background: var(--navy-dark); color: #c9d3e0; font-size: 13px; }
.site-footer a { color: #c9d3e0; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: center; text-align: center; gap: 14px; padding-top: 28px; padding-bottom: 28px; }

/* ---------- celular ---------- */
@media (max-width: 767px) {
  .container { padding: 0 16px; }
  .site-header { background: #fff9f1; backdrop-filter: none; box-shadow: 0 4px 12px rgba(21, 40, 69, 0.08); }
  .nav { padding-top: 14px; padding-bottom: 14px; }
  .nav-links a:not(.btn) { display: none; }
  .brand { gap: 10px; }
  .brand img { height: 32px; }
  .brand-tag { font-size: 11px; letter-spacing: 0.14em; padding-left: 10px; }
  .site-header .btn-sm { white-space: nowrap; padding: 10px 16px; font-size: 14px; min-height: 42px; }
  .hero-content { padding-top: 44px; padding-bottom: 52px; }
  .hero .actions { flex-direction: column; }
  .hero .actions .btn { width: 100%; }
  /* Con ilustración, como la mesa en el celular: la imagen arriba con desvanecido y el texto en una tarjeta que la monta. */
  .hero-cover { display: block; min-height: 0; background: #fff8ef; }
  .hero-cover .hero-media { position: relative; inset: auto; width: 150%; max-width: none; margin-left: -42%; height: clamp(240px, 66vw, 330px); object-position: 62% 6%; }
  .hero-cover .hero-overlay { inset: auto 0 auto 0; top: calc(clamp(240px, 66vw, 330px) - 90px); height: 90px; background: linear-gradient(180deg, rgba(255, 248, 239, 0) 0%, #fff8ef 100%); }
  .hero-cover .hero-content { margin-top: -2.5rem; padding: 24px 36px 48px; gap: 12px; isolation: isolate; }
  .hero-cover .hero-content > * { max-width: none; }
  .hero-cover .hero-content::before {
    content: ''; position: absolute; inset: 0 16px 24px; border-radius: 20px; z-index: -1;
    background: #fffaf3; border: 1px solid rgba(236, 216, 196, 0.82); box-shadow: 0 14px 34px rgba(19, 39, 70, 0.12);
  }
  /* "Faltan" arriba y las unidades en una sola línea. */
  .countdown { gap: 6px; }
  .countdown-label { flex-basis: 100%; }
  .countdown-unit { padding: 6px 10px; }
  .countdown-unit strong { font-size: 19px; }
  .section { padding: 52px 0; }
  .feature { padding: 22px 16px; border-radius: 20px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 12px; }
  .stat strong { font-size: 16px; }
  .runner-head { gap: 12px; padding: 12px 14px; }
  .runner-body { padding-left: 14px; padding-right: 14px; }
  .recent-item { grid-template-columns: 44px 1fr; gap: 10px; padding: 10px 12px; }
  .seo-list { columns: 1; }
}

@media (max-width: 400px) {
  .brand img { height: 28px; }
  .brand-tag { display: none; }
  .site-header .btn-sm { padding: 9px 14px; }
  .label-long { display: none; }
  .label-short { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .spinner { animation-duration: 2.4s; }
  .btn, .race-card { transition: none; }
}

/* Favoritos de la prensa: una tarjeta por medio. */
.press-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.press-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.press-head h3 { font-size: 16px; color: var(--navy); }
.press-head h3::after { content: ''; display: block; width: 18px; height: 3px; margin-top: 6px; border-radius: 2px; background: var(--gradient); }
.press-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.press-pick { display: grid; grid-template-columns: 28px 32px 1fr auto; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; }
.press-pick.is-highlighted { background: rgba(220, 91, 29, 0.08); box-shadow: inset 0 0 0 1px rgba(220, 91, 29, 0.25); }
.press-rank { font-weight: 800; color: var(--orange-text); font-variant-numeric: tabular-nums; }
.press-name { font-weight: 600; color: var(--navy); min-width: 0; overflow-wrap: anywhere; }
.press-odds { font-size: 13px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.press-gap { text-align: center; color: var(--muted); line-height: 1; letter-spacing: 0.2em; }

/* Sentido de carrera: el equivalente chileno en una segunda línea. */
.fact-note { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-top: 2px; }

/* Video de la edición anterior. */
.prev-edition { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px; }
.prev-edition h3 { font-size: 17px; color: var(--navy); margin: 2px 0 4px; }
@media (max-width: 600px) { .prev-edition { flex-direction: column; align-items: stretch; } .prev-edition .btn { text-align: center; } }

/* "Sitio oficial de la carrera" al centro, como el texto de las fuentes. */
#ficha-data > .link-out { align-self: center; margin-inline: auto; }

/* Número que llevó en una carrera anterior: etiqueta con borde, distinta del lugar de llegada. */
.saddle-tag { display: inline-block; margin-right: 8px; padding: 1px 7px; border: 1px solid var(--navy); border-radius: 6px; font-size: 12px; font-weight: 700; color: var(--navy); background: #fff; font-variant-numeric: tabular-nums; vertical-align: 1px; }
.feature-rest { font-size: 14px; margin-top: -4px; }
.rest-days { font-weight: 700; color: var(--orange-text); }
