/* ============================================================
   Traffic Championship 2026 — Mobile Enhancements
   375px (iPhone SE) → 430px (iPhone 15 Pro Max)
   ============================================================ */

/* ---- Base tokens on small screens ---- */
@media (max-width: 500px) {
  :root {
    --gutter: 20px;
    --header-h: 60px;
    --radius: 14px;
    --radius-lg: 20px;
  }
  .btn { font-size: 15px; padding: 13px 20px; }
  .btn--lg { font-size: 16px; padding: 15px 22px; }
  .pill { font-size: 13px; padding: 6px 13px 7px; }
}

/* ---- Header ---- */
@media (max-width: 500px) {
  .logo-img { height: 24px; }
  .hdr-inner { gap: 8px; }
  .hdr-cta { margin-left: auto; }
  .burger { width: 36px; height: 36px; }
}

/* ---- Hero ---- */
@media (max-width: 500px) {
  .hero {
    padding-top: calc(var(--header-h) + 18px);
    padding-bottom: 44px;
    min-height: unset;
  }
  .hero-grid { gap: 8px !important; }

  .hero-badge {
    padding: 6px 12px;
    margin-bottom: 14px;
  }
  .hero-badge .eyebrow { font-size: 11px; }

  .hero-title {
    font-size: clamp(44px, 11.5vw, 58px) !important;
    margin-bottom: 16px;
  }

  .hero-sub {
    font-size: 15px !important;
    margin-bottom: 22px;
    line-height: 1.55;
  }
  .hero-list { font-size: 14px !important; gap: 10px; margin-bottom: 24px; }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 0;
  }
  .hero-actions .btn { justify-content: center; }

  .hero-orb-wrap { max-width: 230px !important; margin-bottom: 0 !important; }
}
@media (max-width: 380px) {
  .hero-title { font-size: 40px !important; }
  .hero-orb-wrap { max-width: 200px !important; }
}

/* ---- MatchDay ---- */
@media (max-width: 500px) {
  .md { padding: 52px 0; }
  .md-intro { margin-bottom: 28px; }
  .md-title { font-size: clamp(24px, 7vw, 32px) !important; margin-bottom: 12px; }
  .md-lead { font-size: 15px !important; line-height: 1.5; }

  /* Scoring panel */
  .md-scoring { padding: 18px 16px; }
  .md-scoring-lead { font-size: 14px !important; margin: 12px 0 18px; }
  .md-metric { padding: 12px 13px; gap: 12px; border-radius: 12px; }
  .md-metric-ico { width: 38px; height: 38px; border-radius: 10px; flex: none; }
  .md-metric-name { font-size: 15px; }
  .md-metric-desc { font-size: 12.5px; line-height: 1.4; }

  /* Widget */
  .md-widget { border-radius: var(--radius-lg); }

  .mdw-bar { padding: 11px 16px; gap: 10px; }
  /* Long date string — hide on mobile, keep logo */
  .mdw-live { display: none; }

  .mdw-body { padding: 16px 14px; }
  .mdw-nav { margin-bottom: 16px; }
  .mdw-nav-btn { width: 32px; height: 32px; font-size: 15px; }
  .mdw-tag { font-size: 11px; letter-spacing: .03em; }

  .mdw-q {
    font-size: 14px !important;
    margin-bottom: 14px;
    text-align: left;
    padding-left: 2px;
  }

  /* Vote cards — horizontal layout */
  .mdw-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .mdw-vs-mid {
    font-size: 18px;
    padding: 0;
    text-align: center;
    line-height: 1;
    opacity: .6;
  }
  .vc {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding: 14px 16px;
    gap: 14px;
    text-align: left;
  }
  .vc .flag { flex: none; }
  .vc-name { font-size: 17px; font-weight: 800; flex: 1; }
  .vc-hint { margin-left: auto; flex: none; }

  /* Poll bars */
  .mdw-poll-name { font-size: 14px; }
  .mdw-poll-pct { font-size: 14px; }
  .mdw-poll-total { font-size: 11px; }

  .mdw-footer-nav { gap: 8px; margin-top: 14px; padding-top: 14px; }
  .mdw-nav-full { font-size: 13px; padding: 11px; border-radius: 10px; }
}

/* ---- Groups / KO Stage ---- */
@media (max-width: 500px) {
  .kos { padding: 52px 0; }
  .kos-title { font-size: clamp(26px, 7.5vw, 34px) !important; }
  .kos-title--sm { font-size: clamp(22px, 6.5vw, 28px) !important; }
  .kos-desc { font-size: 14px !important; gap: 10px; margin-bottom: 24px; }
  .kos-note { font-size: 14px; max-width: 100%; }

  /* Group tables */
  .kg-grid { gap: 10px; }
  .kg-head { padding: 10px 12px; }
  .kg-grp { font-size: 13px; }
  .kg-grp b { font-size: 16px; }
  .kg-lbl { font-size: 9px; }
  .kg-col-labels { grid-template-columns: 14px 1fr 1fr 1fr; }
  .kg-row {
    grid-template-columns: 14px 1fr 1fr 1fr;
    gap: 7px;
    padding: 9px 12px;
  }
  .kg-name { font-size: 13px; }
  .kg-nv { font-size: 13px; }
  .kg-fmt { font-size: 9px; padding: 2px 5px; }

  /* Accordion bracket */
  .ko-section { margin-top: 40px; }
  .ko-rounds { gap: 14px; }
  .ko-round--accordion { border-radius: 14px; }
  .ko-round-toggle { padding: 13px 14px; gap: 8px; }
  .ko-round-eyebrow { font-size: 11px; }
  .ko-round-date { display: none; }
  .ko-round-head { margin-bottom: 0; }
  .ko-round-chevron { width: 28px; height: 28px; }

  .ko-round-body { padding: 10px 10px 14px; }
  .ko-match { --kocols: 1fr 1fr 48px; border-radius: 11px; }
  .ko-cardhead { padding: 6px 10px; gap: 8px; }
  .ko-cardhead span { font-size: 7px; }
  .ko-team { padding: 9px 10px; gap: 8px; }
  .ko-name { font-size: 12px; }
  .ko-nv { font-size: 12px; }
  .ko-fmt { font-size: 8px; padding: 2px 5px; }

  /* Champion card */
  .ko-champ { padding: 30px 20px; gap: 12px; }
  .ko-champ-name { font-size: clamp(36px, 10vw, 48px) !important; }
  .ko-champ-nv { font-size: 13px; text-align: center; line-height: 1.5; }
}

/* ---- Banner ---- */
@media (max-width: 500px) {
  .banner { padding: 18px 0; }
  .banner-text { font-size: 15px !important; }
  .banner-bang { font-size: 1em; }
  .banner-right .btn { width: 100%; justify-content: center; }
}

/* ---- CTA ---- */
@media (max-width: 500px) {
  .cta { padding: 64px 0; }
  .cta-badge { margin-bottom: 14px; }
  .cta-title { font-size: clamp(30px, 9vw, 40px) !important; margin-bottom: 14px; }
  .cta-sub { font-size: 15px !important; margin-bottom: 28px; }
  .cta-actions { flex-direction: column; align-items: stretch; }
  .cta-actions .btn { justify-content: center; }
}

/* ---- Footer ---- */
@media (max-width: 500px) {
  .ftr { padding: 44px 0 28px; }
  .ftr-top { gap: 28px; padding-bottom: 28px; }
  .ftr-tag { font-size: 14px; margin: 12px 0 16px; }
  .ftr-col h4 { margin-bottom: 12px; }
  .ftr-col ul { gap: 8px; }
  .ftr-col a { font-size: 14px; }
  .ftr-bottom { padding-top: 20px; gap: 6px; flex-direction: column; }
  .ftr-disclaim { font-size: 11px; }
  .ftr-copy { font-size: 11px; }
  .soc { width: 36px; height: 36px; font-size: 12px; }
  .ftr-social { gap: 8px; }
}

/* ---- iOS safe area (notch / home bar) ---- */
@supports (padding: env(safe-area-inset-bottom)) {
  .hdr {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  .ftr {
    padding-bottom: calc(28px + env(safe-area-inset-bottom));
  }
}
