@layer overrides {
/* ===== RESPONSIVE ===== */

@media (max-width: 1420px) {
  html {
    scroll-padding-top: 132px;
  }

  .top-nav-inner {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-areas:
      "brand socials actions"
      "menu menu menu";
    align-items: center;
    gap: 7px 10px;
    padding: 8px 16px 10px;
  }

  .top-nav-socials {
    grid-area: socials;
    display: flex;
    justify-content: center;
  }

  .top-nav-brand {
    grid-area: brand;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .top-nav-actions {
    grid-area: actions;
    justify-content: flex-end;
  }

  .top-nav-center {
    grid-area: menu;
    display: block;
    width: 100%;
    min-width: 0;
  }

  .top-nav-menu {
    display: flex;
    width: 100%;
    gap: 6px;
    flex-wrap: nowrap;
    justify-content: center;
    overflow: visible;
    padding: 2px 0 0;
  }

  .top-nav-center::after {
    display: none;
  }

  .top-nav-link-primary,
  .top-nav-link-secondary {
    flex: 0 0 auto;
    padding: 7px 11px;
    font-size: 0.72rem;
  }

  .nav-social {
    min-width: 34px;
    min-height: 34px;
    padding: 7px;
    font-size: 0.74rem;
  }
}

@media (max-width: 1420px) and (min-width: 721px) {
  .top-nav-inner {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-areas:
      "brand socials actions"
      "menu menu menu";
    align-items: center;
    padding: 8px 16px 10px;
  }

  .top-nav-brand {
    grid-area: brand;
  }

  .top-nav-socials {
    grid-area: socials;
    display: flex;
  }

  .top-nav-center {
    grid-area: menu;
    display: flex;
    justify-content: center;
    width: 100%;
    overflow: visible;
  }

  .top-nav-menu {
    width: 100%;
    overflow: visible;
    justify-content: center;
    padding: 2px 0 0;
  }

  .top-nav-center::after {
    display: none;
  }

  .top-nav-actions {
    grid-area: actions;
  }

  .top-nav-more-menu {
    z-index: 30;
  }
}

@media (max-width: 980px) {
  html {
    scroll-padding-top: 132px;
  }

  .hero-grid,
  .cards-top3 {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .hero-main-column,
  .hero-hourly-promo,
  .support-hourly-widget,
  .hero-hourly-card,
  .hero-actions-row,
  .hero-side {
    grid-column: auto;
    grid-row: auto;
  }

  .hero-side {
    max-width: none;
    margin-left: 0;
  }

  .hero-card {
    padding: 24px;
  }

  .section-title {
    font-size: 24px;
  }

  .section-header {
    flex-direction: column;
    align-items: stretch;
  }

  body.experiment-combined-stats .combined-stats-tabs {
    gap: 8px;
  }

  body.experiment-combined-stats .combined-stats-shell-header,
  body.experiment-combined-stats .combined-stats-shell-controls {
    flex-direction: column;
    align-items: stretch;
  }

  body.experiment-combined-stats .combined-stats-shell-header {
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 10px;
  }

  body.experiment-combined-stats .combined-stats-shell-title {
    flex: none;
  }

  body.experiment-combined-stats .combined-stats-shell-controls {
    flex: none;
    justify-content: flex-start;
    gap: 10px;
  }

  .combined-stats-active-tools {
    width: 100%;
    flex: none;
  }

  .combined-stats-active-tools .table-tools {
    justify-content: stretch;
  }

  .combined-stats-tab {
    flex: 1 1 220px;
  }

  body.experiment-combined-stats .combined-stats-panel .table-card {
    min-height: 0;
  }

  .table-tools {
    width: 100%;
  }

  .filter-meta {
    align-items: stretch;
  }

  .search-input,
  .filter-select,
  .track-filter-select {
    width: 100%;
  }

  .top-nav-inner {
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "brand socials actions"
      "menu menu menu";
    align-items: center;
    gap: 7px 9px;
    padding: 8px 12px 10px;
  }

  .top-nav-brand {
    grid-area: brand;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .top-nav-socials {
    grid-area: socials;
    display: flex;
    justify-content: center;
    min-width: 0;
  }

  .top-nav-actions {
    grid-area: actions;
    justify-content: flex-end;
  }

  .top-nav-center {
    grid-area: menu;
    display: block;
    width: 100%;
    min-width: 0;
  }

  .top-nav-menu {
    display: flex;
    width: 100%;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-start;
    overflow: visible;
    padding-bottom: 0;
  }

  .top-nav-group-menu {
    min-width: 210px;
    max-width: min(280px, calc(100vw - 32px));
  }

  .top-nav-center::after {
    display: none;
  }

  .top-nav-link-primary,
  .top-nav-link-secondary {
    flex: 0 0 auto;
    padding: 7px 11px;
    font-size: 0.72rem;
  }

  .nav-social {
    min-width: 34px;
    min-height: 34px;
    padding: 7px;
    font-size: 0.74rem;
  }

  .hero {
    padding-top: 20px;
  }

  .hero-actions.hero-actions-stacked-mobile {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
    grid-template-areas:
      "today races"
      "driver driver"
      "stats stats"
      "online online";
    gap: 10px;
    align-items: stretch;
  }

  .hero-side {
    grid-area: stats;
  }

  .hero-side-compact {
    grid-template-columns: minmax(0, 1fr) minmax(110px, 0.82fr);
  }

  .hero-actions-stacked-mobile .btn,
  .btn-today-stats,
  .btn-last-races,
  .btn-driver-day {
    width: 100%;
    min-width: 0;
    max-width: none;
    align-self: stretch;
    padding: 13px 14px;
    font-size: 0.95rem;
    line-height: 1.2;
  }

  .support-hourly-widget .support-widget-card {
    grid-template-columns: minmax(0, 1fr) 96px;
    grid-template-rows: auto auto;
  }

  .support-hourly-widget .support-widget-qr-shell {
    grid-column: 2;
    grid-row: 1 / 3;
    width: 96px;
  }

  .support-hourly-widget .support-widget-copy {
    -webkit-line-clamp: 2;
  }

  .support-center-widget .support-widget-card {
    grid-template-columns: minmax(0, 1fr) auto 90px;
  }

  .hero-actions-row {
    grid-template-columns: 1fr;
  }

  .hero-hourly-card {
    margin-bottom: 6px;
    margin-inline: 0;
  }

  .hero-hourly-winner-card {
    min-height: 82px;
  }

  .hero-online-card {
    min-height: 104px;
    max-height: none;
  }

  .cards-top3.cards-top3-hero {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-card-page {
    grid-template-columns: 1fr;
  }

  .driver-stats-grid,
  .driver-highlights-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .driver-penalties-grid {
    grid-template-columns: 1fr;
  }

  .today-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .today-stats-details {
    grid-template-columns: 1fr;
  }

  .activity-controls,
  .activity-month-overview,
  .activity-summary-grid {
    grid-template-columns: 1fr;
  }

  .driver-day-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .race-modal-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .driver-day-card-wide {
    grid-column: span 2;
  }

  .modal-overlay {
    --modal-offset-bottom: 12px;
    align-items: flex-start;
    padding: 12px;
  }

  .modal-card,
  .modal-card.modal-card-driver {
    width: 100%;
    max-width: 100%;
    max-height: calc(100dvh - var(--top-nav-modal-offset, 140px) - var(--modal-offset-bottom, 12px));
    margin: 0;
    padding: 20px 14px 14px;
    border-radius: 18px;
  }

  .modal-card.modal-card-activity {
    max-height: calc(100dvh - var(--top-nav-modal-offset, 140px) - var(--modal-offset-bottom, 12px));
  }

  .modal-header {
    margin-bottom: 16px;
    padding-right: 44px;
  }

  .hourly-modal-subtitle-grid,
  .hourly-modal-grid {
    grid-template-columns: 1fr;
  }

  .hourly-modal-panel-grid-three {
    grid-template-columns: 1fr;
  }

  .hourly-modal-panel-item {
    min-height: 0;
  }

  .hourly-modal-details-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .hourly-modal-cta-btn {
    width: 100%;
  }

  .modal-header-driver-preview {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-driver-preview-link {
    width: 100%;
    justify-content: center;
  }

  .today-stat-card,
  .today-detail-card,
  .driver-day-card {
    min-width: 0;
    padding: 14px;
  }

  .today-stat-value,
  .today-detail-main {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .today-detail-sub,
  .today-stat-label,
  .modal-subtitle {
    overflow-wrap: anywhere;
  }

  .activity-panel-head {
    flex-direction: column;
    align-items: stretch;
  }

  .activity-panel-note {
    text-align: left;
  }
}

@media (max-width: 900px) {
  .hero-stats-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  html {
    scroll-padding-top: 140px;
  }

  .container {
    width: min(100% - 20px, 1200px);
  }

  .hero {
    padding-top: 18px;
  }

  .hero-card {
    padding: 18px;
    border-radius: 22px;
  }

  h1 {
    font-size: 34px;
  }

  .pilot-name {
    font-size: 20px;
  }

  .mini-value {
    font-size: 24px;
  }

  .pagination-wrap {
    align-items: stretch;
  }

  .pagination {
    width: 100%;
  }

  .page-btn {
    flex: 1 1 auto;
  }

  .lang-switch-floating {
    top: 14px;
    right: 14px;
  }

  .top-nav {
    --top-nav-band-width: min(1200px, calc(100% - 20px));
  }

  .lang-btn {
    min-width: 40px;
    min-height: 32px;
    padding: 0 6px;
  }

  .lang-flag {
    width: 22px;
    height: 16px;
  }

  .lang-switch {
    gap: 4px;
    padding: 4px;
    border-radius: 12px;
  }

  .top-nav-inner {
    padding-left: 10px;
    padding-right: 10px;
    gap: 6px 7px;
  }

  .top-nav-brand {
    gap: 6px;
  }

  .top-nav-brand-text {
    display: none;
  }

  .top-nav-brand-logo {
    width: 34px;
    height: 34px;
  }

  .top-nav-link-primary,
  .top-nav-link-secondary {
    padding: 7px 10px;
    font-size: 0.7rem;
  }

  .nav-social {
    min-width: 31px;
    min-height: 31px;
    padding: 6px;
    font-size: 0.68rem;
  }

  .social-icon {
    width: 15px;
    height: 15px;
  }

  .hero-actions.hero-actions-stacked-mobile {
    grid-template-columns: 1fr;
    grid-template-areas:
      "support"
      "today"
      "races"
      "driver"
      "stats"
      "online";
  }

  .support-inline-widget.support-hourly-widget .support-widget-card,
  .support-inline-widget.support-center-widget .support-widget-card {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto;
    align-items: center;
  }

  .support-inline-widget.support-hourly-widget .support-widget-qr-shell,
  .support-inline-widget.support-center-widget .support-widget-qr-shell {
    display: none;
  }

  .support-inline-widget.support-hourly-widget .support-widget-copy,
  .support-inline-widget.support-center-widget .support-widget-copy {
    -webkit-line-clamp: 2;
  }

  .support-center-widget {
    grid-area: support;
    order: -1;
  }

  .support-inline-widget.support-center-widget .support-widget-btn {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    min-width: 150px;
    width: fit-content;
  }

  .support-inline-widget.support-center-widget .support-widget-copy-block {
    grid-column: 1;
    min-width: 0;
  }

  .hero-side-compact,
  .cards-top3.cards-top3-hero {
    grid-template-columns: 1fr;
  }

  .hero-actions-stacked-mobile .btn,
  .btn-driver-day,
  .btn-today-stats,
  .btn-last-races {
    width: 100%;
    min-width: 0;
  }

  .hero-side .mini-value {
    font-size: 16px;
  }

  .cards-top3-hero .pilot-name {
    font-size: 14px;
  }

  .hero-hourly-meta-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .hero-hourly-meta-line {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .hero-hourly-winner-card {
    min-height: 96px;
  }

  .hero-hourly-winner-media {
    min-height: 0;
  }

  .hero-hourly-winner-card::before {
    width: 150px;
    height: 150px;
    opacity: 0.18;
  }

  .hero-hourly-winner-car {
    width: min(160px, 62%);
  }

  .btn-today-stats,
  .btn-last-races,
  .btn-driver-day {
    font-size: 0.92rem;
  }

  .hero-primary-actions {
    grid-template-columns: 1fr;
  }

  .hero-stats-row {
    grid-template-columns: 1fr;
  }

  .page-hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .page-hero-stats .mini-stat {
    min-height: 0;
  }

  .page-hero-stats .mini-value,
  .page-hero-stats .mini-note,
  .page-hero-stats .driver-link {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .page-hero-stats .mini-value {
    font-size: clamp(0.8rem, 4.1vw, 1.7rem);
    line-height: 1.05;
  }

  .page-hero-stats .mini-note {
    line-height: 1.25;
  }

  .page-hero-copy .hero-subtitle.page-hero-subtitle {
    font-size: 16px;
  }

  .modal-overlay {
    --modal-offset-bottom: 8px;
    padding: 8px;
  }

  .modal-overlay.is-open {
    padding-top: var(--top-nav-modal-offset, 84px);
  }

  .modal-card,
  .modal-card.modal-card-driver {
    max-height: calc(100dvh - var(--top-nav-modal-offset, 84px) - var(--modal-offset-bottom, 8px));
    padding: 18px 12px 12px;
  }

  .modal-card.modal-card-slot {
    overflow: auto;
    max-height: calc(100dvh - var(--top-nav-modal-offset, 84px) - var(--modal-offset-bottom, 8px));
  }

  .modal-card.modal-card-activity {
    max-height: calc(100dvh - var(--top-nav-modal-offset, 84px) - var(--modal-offset-bottom, 8px));
  }

  .modal-card-driver-preview {
    height: calc(100dvh - var(--top-nav-modal-offset, 84px) - 8px);
    padding-bottom: 12px;
  }

  .driver-preview-scroll {
    padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  }

  .modal-close {
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
  }

  .hourly-modal-panel,
  .hourly-modal-weather,
  .hourly-modal-subtitle-card {
    padding-left: 12px;
    padding-right: 12px;
  }

  .hourly-modal-left-cluster,
  .hourly-modal-side-card,
  .hourly-modal-side-section {
    padding-left: 12px;
    padding-right: 12px;
  }

  .driver-name-meta {
    gap: 6px;
  }

  .today-stats-grid,
  .driver-day-grid {
    grid-template-columns: 1fr;
  }

  .hero-funnel-actions {
    flex-direction: column;
  }

  .hero-cta-primary,
  .hero-cta-secondary {
    width: 100%;
  }

  .driver-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .driver-highlights-grid {
    grid-template-columns: 1fr;
  }

  .modal-card-driver-preview .driver-preview-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-meta-left,
  .filter-chip-row {
    width: 100%;
  }

  .race-modal-summary {
    grid-template-columns: 1fr;
  }

  .driver-day-card-wide {
    grid-column: span 1;
  }

  .today-stat-value {
    font-size: 1.2rem;
  }

  .today-stat-value-sm,
  .today-detail-main,
  .today-detail-sub {
    font-size: 0.95rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .twitch-widget {
    right: 16px;
    bottom: 16px;
    width: min(320px, calc(100vw - 32px));
  }

  .twitch-widget.is-expanded {
    width: min(50vw, calc(100vw - 32px));
  }

  .community-grid {
    grid-template-columns: 1fr;
  }

  .footer-links {
    width: 100%;
  }

  .footer-links a {
    flex: 1 1 auto;
  }

  .hero-online-chart {
    gap: 6px;
    height: 90px;
  }

  .hero-online-scale {
    height: 90px;
  }

  .hero-online-bar {
    max-width: 22px;
  }

  .hero-online-range {
    font-size: 11px;
  }
}

@media (max-width: 420px) {
  .top-nav-inner {
    padding: 7px 8px 9px;
    gap: 6px 5px;
  }

  .news-notifications-panel {
    left: var(--news-popover-inset, 6px);
    right: var(--news-popover-inset, 6px);
    width: auto;
    max-width: none;
    padding: 14px;
    border-radius: 20px;
  }

  .news-notifications-panel::before {
    display: none;
  }

  .top-nav-group {
    width: auto;
    min-width: 0;
  }

  .top-nav-group-link {
    font-size: 0.8rem;
  }

  .top-nav-brand-logo {
    width: 28px;
    height: 28px;
  }

  .top-nav-socials {
    gap: 3px;
  }

  .top-nav-link-primary,
  .top-nav-link-secondary {
    padding: 6px 9px;
    font-size: 0.68rem;
  }

  .nav-social {
    min-width: 24px;
    min-height: 24px;
    padding: 4px;
  }

  .social-icon {
    width: 13px;
    height: 13px;
  }

  .lang-switch {
    gap: 3px;
    padding: 3px;
    border-radius: 10px;
  }

  .lang-btn {
    min-width: 31px;
    min-height: 28px;
    padding: 0 3px;
  }

  .lang-flag {
    width: 18px;
    height: 14px;
  }

  .top-nav-more-toggle {
    gap: 6px;
  }

  .top-nav-more-icon {
    font-size: 0.9rem;
  }
}

@media (max-width: 360px) {
  .top-nav-brand {
    gap: 0;
  }

  .top-nav-brand-text {
    display: none;
  }
}

+}
