/**
 * Palco das páginas delegadas do portal da liga — DEM-174 (Calendário, Recordes, Histórico, Melhores tempos).
 * Usa as cores do tema da organização quando existem (--v7-*, --color-*), com reserva escura.
 * Ouro/prata/bronze do guia de estilo: #ffc400 / #c9d1db / #e09155. Números de palco em Exo 2 itálico 900.
 * v1.0 (2026-11-09)
 */
.dst-wrap {
  --dst-accent: var(--v7-accent, var(--color-accent, #d4ff00));
  --dst-surface: var(--v7-surface, var(--color-surface, #17181e));
  --dst-line: var(--v7-line, var(--color-border, rgba(132, 132, 154, .18)));
  --dst-text: var(--v7-text, var(--color-text-primary, #f1f1f1));
  --dst-muted: var(--v7-muted, var(--color-text-secondary, #9aa0b2));
  --dst-gold: #ffc400; --dst-silver: #c9d1db; --dst-bronze: #e09155;
  --dst-display: 'Exo 2', system-ui, sans-serif;
  --dst-mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  color: var(--dst-text);
  font-family: var(--dst-display);
  margin: 0 0 22px;
}
.dst-wrap *, .dst-wrap *::before, .dst-wrap *::after { box-sizing: border-box; }
.dst-wrap a { color: inherit; text-decoration: none; }
.dst-eyebrow { display: block; font-size: .7rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--dst-muted); }
.dst-title { margin: 4px 0 0; font: italic 900 clamp(1.7rem, 3.6vw, 2.6rem)/1 var(--dst-display); color: var(--dst-text); text-wrap: balance; }
.dst-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.dst-big { font: italic 900 clamp(1.8rem, 3.4vw, 2.6rem)/1 var(--dst-display); color: var(--dst-gold); font-variant-numeric: tabular-nums; }

/* avatar: capacete > foto > monograma */
.dst-av { width: 76px; height: 76px; flex: none; object-fit: contain; }
.dst-av.is-helmet { filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .55)); }
.dst-av.is-photo { object-fit: cover; border-radius: 50%; border: 3px solid var(--dst-gold); }
.dst-av.is-mono { display: grid; place-items: center; border-radius: 50%; border: 3px solid var(--dst-gold); background: #0e0f14; font: italic 900 1.6rem var(--dst-display); color: var(--dst-text); }

/* placas de recorde */
.dst-plaques { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.dst-plaque { position: relative; overflow: hidden; border-radius: 18px; padding: 18px; border: 1px solid var(--dst-line);
  background: radial-gradient(ellipse at 0% 0%, rgba(255, 196, 0, .10), transparent 55%), var(--dst-surface); }
.dst-plaque.is-legend { border-color: transparent; background: radial-gradient(ellipse at 0% 0%, rgba(255, 196, 0, .10), transparent 55%) padding-box, linear-gradient(var(--dst-surface), var(--dst-surface)) padding-box, linear-gradient(135deg, #ff4ecd, #ffc400, #38f9d7) border-box; } /* DEM-188: cor só vale na última camada; antes a regra era descartada e a moldura «Lenda» sumia */
.dst-plaque h3 { margin: 4px 0 12px; font: italic 900 1.12rem var(--dst-display); color: var(--dst-text); }
.dst-lead { display: flex; gap: 14px; align-items: center; }
.dst-lead > div { min-width: 0; display: flex; flex-direction: column; }
.dst-lead strong { font-weight: 800; font-size: 1.05rem; line-height: 1.15; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.dst-lead small { color: var(--dst-muted); font-size: .76rem; }
.dst-rest { list-style: none; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--dst-line); display: grid; gap: 8px; }
.dst-rest li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; }
.dst-rest li i { font-style: italic; font-weight: 900; }
.dst-rest li.p2 i { color: var(--dst-silver); } .dst-rest li.p3 i { color: var(--dst-bronze); }
.dst-rest li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.dst-rest li b { font: italic 900 1.1rem var(--dst-display); font-variant-numeric: tabular-nums; }

/* cartões de temporada (Histórico) */
.dst-seasons { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.dst-season { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 16px; border: 1px solid var(--dst-line); background: var(--dst-surface); transition: border-color .15s, transform .15s; min-width: 0; }
.dst-season:hover { border-color: var(--dst-accent); transform: translateY(-2px); }
.dst-season .dst-av { width: 56px; height: 56px; }
.dst-season .dst-av.is-mono { font-size: 1.2rem; }
.dst-season > div { min-width: 0; }
.dst-season h4 { margin: 0 0 4px; font-size: .95rem; font-weight: 800; color: var(--dst-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dst-season p { margin: 0; font-size: .82rem; color: var(--dst-muted); }
.dst-season p strong { color: var(--dst-gold); }
.dst-chip { display: inline-block; font-size: .66rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--dst-line); color: var(--dst-muted); margin-bottom: 4px; }
.dst-chip.is-live { color: #7be3a8; border-color: #2fbf71; }

/* anos */
.dst-years { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px; margin: 0 0 16px; scrollbar-width: thin; }
.dst-years a { flex: none; font: italic 900 1rem var(--dst-display); padding: 8px 14px; border-radius: 12px; border: 1px solid var(--dst-line); background: var(--dst-surface); color: var(--dst-muted) !important; }
.dst-years a:hover { color: var(--dst-text) !important; border-color: var(--dst-accent); }
.dst-years a.is-now { background: var(--dst-text); color: #111 !important; }
.dst-section { margin: 18px 0; }
.dst-section > h3 { margin: 0 0 12px; font: italic 900 1.3rem var(--dst-display); color: var(--dst-text); }
.dst-empty { padding: 16px; border-radius: 14px; border: 1px dashed var(--dst-line); color: var(--dst-muted); }

/* links do arquivo como cartões */
.dst-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 16px 0; }
.dst-links a { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 14px; border: 1px solid var(--dst-line); background: var(--dst-surface); font-weight: 800; color: var(--dst-text) !important; }
.dst-links a:hover { border-color: var(--dst-accent); }
.dst-links a i { color: var(--dst-accent); width: 20px; text-align: center; }

/* Melhores tempos: dono da volta por etapa */
.dst-lap-stage { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 16px; margin: 0 0 12px; border-radius: 16px; border: 1px solid var(--dst-line);
  background: radial-gradient(ellipse at 100% 50%, rgba(255, 196, 0, .12), transparent 60%), var(--dst-surface); }
.dst-lap-stage .dst-av { width: 64px; height: 64px; }
.dst-lap-stage > div { min-width: 0; flex: 1 1 180px; }
.dst-lap-stage strong { display: block; font-weight: 800; font-size: 1.05rem; }
.dst-lap-time { font: italic 900 clamp(1.8rem, 4vw, 2.6rem)/1 var(--dst-display); color: var(--dst-gold); font-variant-numeric: tabular-nums; }
.dst-lap-gap { font-family: var(--dst-mono); font-size: .8rem; color: var(--dst-muted); }

/* Calendário: palco da próxima etapa */
.dst-wrap.dst-cal-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 18px; align-items: stretch; margin: 0 0 18px; }
.dst-cal-hero .dst-cal-copy { display: flex; flex-direction: column; justify-content: center; }
.dst-badge-today { display: inline-block; margin-top: 10px; font: italic 900 .85rem var(--dst-display); padding: 4px 12px; border-radius: 999px; background: var(--dst-gold); color: #111; letter-spacing: .06em; }
.dst-cal-legend { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.dst-cal-legend span { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 800; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--dst-line); }
.dst-cal-legend span::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--dst-season, var(--dst-accent)); }
.dst-s0 { --dst-season: #1fa3ff; } .dst-s1 { --dst-season: #8b6cff; } .dst-s2 { --dst-season: #2fbf71; } .dst-s3 { --dst-season: #ff8a3d; }

@media (max-width: 760px) {
  .dst-wrap.dst-cal-hero { grid-template-columns: minmax(0, 1fr); }
  .dst-av { width: 64px; height: 64px; }
}
@media (prefers-reduced-motion: reduce) { .dst-season, .dst-links a { transition: none; } }

/* Melhores tempos: chamada «Quero correr» (DEM-183). Só existe com inscrição aberta. */
.dst-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px 18px; margin-top: 18px; border-radius: 16px;
  border: 1px solid var(--dst-line); border-left: 4px solid var(--dst-accent); background: var(--dst-surface); }
.dst-cta > div { min-width: 0; flex: 1 1 240px; }
.dst-cta strong { display: block; font: italic 900 clamp(1.15rem, 2.4vw, 1.5rem)/1.15 var(--dst-display); margin: 2px 0 4px; }
.dst-cta small { display: block; color: var(--dst-muted); font-size: .8rem; }
.dst-cta-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: 12px; font-weight: 900;
  background: var(--dst-accent); color: #101014 !important; text-decoration: none; transition: transform .3s ease, box-shadow .3s ease; }
.dst-cta-btn:hover, .dst-cta-btn:focus-visible { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(212, 255, 0, .25); }
@media (max-width: 480px) { .dst-cta-btn { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .dst-cta-btn { transition: none; } .dst-cta-btn:hover { transform: none; } }
