/* ======================================================
   MOTOETKINLIK USER COLOR MODE
   Light is default; dark is selected by the visitor.
====================================================== */

:root[data-me-theme="dark"]{
  color-scheme:dark;
  --color-bg:#0b0d10;
  --color-surface:#14171b;
  --color-surface-2:#1b1f24;
  --color-text:#f3f4f6;
  --color-text-soft:#b8bec7;
  --color-text-muted:#8b929d;
  --color-border:#30353d;
  --color-border-soft:#242930;
  --shadow-sm:0 2px 8px rgba(0,0,0,.28);
  --shadow-md:0 8px 24px rgba(0,0,0,.34);
  --shadow-lg:0 20px 44px rgba(0,0,0,.42);
}

html[data-me-theme="dark"] body{
  background-color:var(--color-bg);
  color:var(--color-text);
}

/* Visitor toggle lives inside the active V1/V2/V3/V4 header. */
.me-theme-toggle{
  position:relative;
  z-index:3;
  flex:0 0 auto;
  width:36px;
  height:36px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(255,255,255,.20);
  border-radius:999px;
  background:rgba(255,255,255,.08);
  color:#fff;
  box-shadow:none;
  cursor:pointer;
  line-height:1;
  transition:background-color .18s ease,color .18s ease,border-color .18s ease,transform .18s ease;
}
.me-theme-toggle:hover{transform:translateY(-1px);background:rgba(255,255,255,.14);}
.me-theme-toggle:focus-visible{outline:3px solid rgba(225,6,0,.32);outline-offset:2px;}
.me-theme-toggle__icon{display:block;font-size:17px;line-height:1;}

/* V3 is the light header: give its control a matching light treatment. */
.header-v3 .me-theme-toggle{
  background:#fff;
  color:#171717;
  border-color:rgba(17,17,17,.14);
}
.header-v3 .me-theme-toggle:hover{background:#f2f2f3;}

:root[data-me-theme="dark"] .me-theme-toggle{
  background:#242930;
  color:#fff;
  border-color:#3a414b;
}
:root[data-me-theme="dark"] .me-theme-toggle:hover{background:#2d333b;}

/* Keep header geometry intact at tablet/mobile sizes. */
@media (max-width:1024px){
  .me-theme-toggle{width:34px;height:34px;}
}
@media (max-width:420px){
  .me-theme-toggle{width:32px;height:32px;}
  .me-theme-toggle__icon{font-size:15px;}
}

/* Main site surfaces */
:root[data-me-theme="dark"] :is(
  .content-surface,
  .single-content,
  .archive-content,
  .archive-item,
  .me-white-page-surface,
  .sidebar-widget,
  .widget,
  .card,
  .news-card,
  .upcoming-race-card,
  .home-upcoming-races,
  .home-sponsors,
  .category-section,
  .race-weekend-box,
  .race-weekend-next,
  .race-weekend-strip,
  .motocol-results-hub,
  .results-hub-filter-bar,
  .results-podium__card,
  .race-nonfinish,
  .race-results-card,
  .motocal-card,
  .bbp-forum-info,
  .bbp-topic-info
){
  background-color:var(--color-surface) !important;
  color:var(--color-text) !important;
  border-color:var(--color-border) !important;
}

:root[data-me-theme="dark"] :is(
  .single-title,
  .single-text,
  .single-text p,
  .single-text li,
  .archive-page-title,
  .archive-title,
  .section-title,
  .news-card h2,
  .news-card h3,
  .race-title,
  .race-weekend-race-name,
  .race-weekend-next-session-name,
  .race-weekend-strip-session,
  .motocol-results-hub h1,
  .motocol-results-hub h2,
  .motocol-results-hub h3,
  .me-white-page-title,
  .me-white-page-text
){color:var(--color-text) !important;}

:root[data-me-theme="dark"] :is(
  .single-meta,
  .single-caption,
  .archive-meta,
  .news-date,
  .race-dates,
  .race-track,
  .race-weekend-meta,
  .race-weekend-next-label,
  .race-weekend-next-day,
  .race-weekend-strip-day-label,
  .me-white-page-text figcaption
){color:var(--color-text-soft) !important;}

:root[data-me-theme="dark"] :is(
  input,
  textarea,
  select,
  .search-field,
  .results-hub-dropdown__menu,
  .results-hub-dropdown__option
){
  background-color:#171b20 !important;
  color:var(--color-text) !important;
  border-color:var(--color-border) !important;
}

/* Editorial separators and tables */
:root[data-me-theme="dark"] :is(table,th,td,.post-nav,.single-share,.single-tags,.archive-item){
  border-color:var(--color-border) !important;
}
:root[data-me-theme="dark"] thead,
:root[data-me-theme="dark"] th{background-color:#1b1f24 !important;color:var(--color-text) !important;}
:root[data-me-theme="dark"] tbody tr{background-color:var(--color-surface) !important;color:var(--color-text) !important;}
:root[data-me-theme="dark"] tbody tr:nth-child(even){background-color:#171b20 !important;}

/* Header skins: only colors change; layout/menus/dropdowns remain untouched. */
:root[data-me-theme="dark"] .header-v3{
  --v3-text:#f3f4f6;
  --v3-muted:#b8bec7;
  --v3-surface:#14171b;
  --v3-soft:#1b1f24;
  --v3-border:rgba(255,255,255,.12);
}
:root[data-me-theme="dark"] .header-v3 .breaking-bar,
:root[data-me-theme="dark"] .header-v3 .header-nav{
  background:#111419 !important;
  color:#f5f5f5 !important;
  border-color:#2a3038 !important;
  box-shadow:none;
}
:root[data-me-theme="dark"] .header-v3 .custom-logo{filter:brightness(0) invert(1) contrast(1.05);}
:root[data-me-theme="dark"] :is(.header-v1,.header-v2,.header-v3,.header-v4) :is(.main-navigation a,.site-title){color:#f5f5f5 !important;}
:root[data-me-theme="dark"] :is(.header-v1,.header-v2,.header-v3,.header-v4) .menu-toggle span{background:#f5f5f5 !important;}
:root[data-me-theme="dark"] :is(.header-v1,.header-v2,.header-v3,.header-v4) :is(.mobile-menu-box,.sub-menu,.header-auth-menu){
  background:#15191e !important;
  color:#f5f5f5 !important;
  border-color:#30353d !important;
}
:root[data-me-theme="dark"] :is(.header-v1,.header-v2,.header-v3,.header-v4) :is(.mobile-menu-box a,.sub-menu a,.header-auth-menu a){color:#f5f5f5 !important;}

/* Footer */
:root[data-me-theme="dark"] .site-footer{background:#101318 !important;color:#e9edf2 !important;border-color:#2d333b !important;}
:root[data-me-theme="dark"] .site-footer :is(h3,h4,a,p){color:inherit;}

@media (prefers-reduced-motion:reduce){
  .me-theme-toggle{transition:none;}
}

/* ======================================================
   DARK MODE COVERAGE — FRONTEND SURFACES
   Color-only overrides. No layout, spacing or overflow.
====================================================== */
:root[data-me-theme="dark"] .content-page{
  background:transparent !important;
}

/* Standard single + sidebar */
:root[data-me-theme="dark"] :is(
  .single-sidebar,
  .single-sidebar .latest-item,
  .single-sidebar .sponsors-grid a,
  .single-sidebar .sponsor-widget,
  .post-nav-item,
  .moto-comment-form,
  .moto-comment,
  .comment-body
){
  background-color:var(--color-surface) !important;
  color:var(--color-text) !important;
  border-color:var(--color-border) !important;
}

:root[data-me-theme="dark"] .single-sidebar{
  background-color:var(--color-surface-2) !important;
  box-shadow:0 10px 32px rgba(0,0,0,.22) !important;
}

:root[data-me-theme="dark"] :is(
  .single-sidebar h3,
  .single-sidebar .latest-title,
  .post-nav-item h4,
  .post-nav-label,
  .author-name,
  .single-text h2,
  .single-text h3,
  .single-text h4,
  .single-text .me-inline-quote,
  .single-text q,
  .single-text .me-quote-paragraph,
  .single-text .me-end-recommended-link,
  .single .entry-content > p:first-of-type
){
  color:var(--color-text) !important;
}

:root[data-me-theme="dark"] :is(
  .author-role,
  .single-meta-line,
  .meta-category-label,
  .single-caption,
  .single-text figure.wp-caption figcaption,
  .single .entry-content figure figcaption,
  .share-title
){
  color:var(--color-text-soft) !important;
}

:root[data-me-theme="dark"] :is(
  .single-meta,
  .single-share,
  .single-tags,
  .single-text .me-end-recommended-link,
  .single-sidebar .latest-box > h3,
  .page-sidebar
){
  border-color:var(--color-border) !important;
}

:root[data-me-theme="dark"] .single-meta-avatar,
:root[data-me-theme="dark"] .single-thumb img{
  background-color:var(--color-surface-2) !important;
}

:root[data-me-theme="dark"] .single-text a:not(.share-btn):not(.meta-category-badge):not(.single-tags a){
  color:#6ea8ff;
}
:root[data-me-theme="dark"] .single-text a:not(.share-btn):not(.meta-category-badge):not(.single-tags a):visited{
  color:#8bb8ff;
}
:root[data-me-theme="dark"] .single-text a:not(.share-btn):not(.meta-category-badge):not(.single-tags a):hover{
  color:#a9ccff;
}

/* Common WordPress/editor blocks inside posts/pages */
:root[data-me-theme="dark"] :is(
  .entry-content,
  .entry-content p,
  .entry-content li,
  .entry-content strong,
  .entry-content em,
  .entry-content blockquote,
  .wp-block-quote,
  .wp-block-pullquote,
  .wp-block-group,
  .wp-block-columns,
  .wp-block-column
){
  color:var(--color-text);
  border-color:var(--color-border);
}

:root[data-me-theme="dark"] :is(
  .wp-block-table table,
  .wp-block-table th,
  .wp-block-table td,
  .wp-block-code,
  pre,
  code
){
  border-color:var(--color-border) !important;
}
:root[data-me-theme="dark"] :is(.wp-block-code,pre){
  background-color:#101318 !important;
  color:#e8edf3 !important;
}

/* Archives, search, tags and generic frontend cards */
:root[data-me-theme="dark"] :is(
  .archive-layout,
  .author-layout,
  .search-layout,
  .tag-layout,
  .archive-card,
  .search-result,
  .category-card,
  .pagination,
  .page-numbers,
  .widget-area .widget,
  .page-sidebar .widget,
  .sidebar-box
){
  border-color:var(--color-border) !important;
}

/* Front page white modules */
:root[data-me-theme="dark"] :is(
  .home-otoetkinlik,
  .otoetkinlik-section,
  .mix-section,
  .home-mix,
  .upcoming-section,
  .home-upcoming,
  .sponsors-section,
  .homepage-sponsors
){
  background-color:var(--color-surface) !important;
  color:var(--color-text) !important;
  border-color:var(--color-border) !important;
}

/* Motocal / race / driver screens — surface-level normalization */
:root[data-me-theme="dark"] :is(
  .motocal-wrap,
  .motocal-page,
  .motocal-section,
  .motocal-table-wrap,
  .motocal-driver-card,
  .driver-card,
  .driver-profile,
  .driver-profile-card,
  .race-single-page,
  .race-single-card,
  .race-results-wrap,
  .standings-table-wrap,
  .results-table-wrap
){
  background-color:var(--color-surface) !important;
  color:var(--color-text) !important;
  border-color:var(--color-border) !important;
}

/* Forms / native controls */
:root[data-me-theme="dark"] :is(
  input:not([type="submit"]):not([type="button"]):not([type="reset"]),
  textarea,
  select
){
  background-color:#15191e !important;
  color:var(--color-text) !important;
  border-color:var(--color-border) !important;
}
:root[data-me-theme="dark"] :is(input,textarea,select)::placeholder{
  color:var(--color-text-muted) !important;
  opacity:1;
}

/* Preserve brand/action colors while removing accidental light text. */
:root[data-me-theme="dark"] a:not(.share-btn):not(.meta-category-badge):not(.single-tags a):not(.latest-category){
  text-decoration-color:currentColor;
}

/* Homepage modules using explicit light surfaces in component CSS. */
:root[data-me-theme="dark"] :is(
  .home-columns > .container,
  .front-page-after-sponsor__inner,
  body.home .home-sponsors,
  .home-mix-boxed .mix-box,
  .home-mix-boxed .news-card,
  .otoetkinlik-section,
  .otoetkinlik-section > .container,
  .otoetkinlik-section .news-card,
  .home-upcoming-races .container,
  .home-upcoming-races .upcoming-race-card,
  .upcoming-race-card.standings,
  .youtube-section > .container
){
  background-color:var(--color-surface) !important;
  color:var(--color-text) !important;
  border-color:var(--color-border) !important;
}
:root[data-me-theme="dark"] :is(
  .standings-tabs .tab-btn,
  .upcoming-race-card .race-badge,
  .upcoming-race-card .race-meta
){
  border-color:var(--color-border) !important;
}

/* Race Weekend nested light surfaces; geometry stays untouched. */
:root[data-me-theme="dark"] :is(
  .front-race-weekend .race-weekend-box,
  .race-weekend-session-card,
  .race-weekend-day,
  .race-weekend-tab,
  .race-weekend-button,
  .race-weekend-button-primary
){
  background-color:var(--color-surface) !important;
  color:var(--color-text) !important;
  border-color:var(--color-border) !important;
}

/* MotoCal page shells, filters, cards, standings, results and driver profile. */
:root[data-me-theme="dark"] :is(
  .motocal-container,
  .motocal-content,
  .motocal-card,
  .motogp-standings,
  .motocal-filter,
  .motocal-filter button,
  .standings-table-shell,
  .standings-row--matrix,
  .results-hub-filter-panel,
  .results-hub-race-card,
  .results-hub-race-head,
  .race-results-table-wrap,
  .race-results-table,
  .results-hub-empty,
  .results-hub-select,
  .results-hub-dropdown__menu,
  .me-driver-profile__section--results,
  .single-driver-page .me-driver-profile__section--timeline,
  .single-driver-page .me-driver-timeline--compact .me-driver-timeline__item,
  .me-driver-mini-results__card,
  .me-driver-mini-results__flag
){
  background-color:var(--color-surface) !important;
  color:var(--color-text) !important;
  border-color:var(--color-border) !important;
}
:root[data-me-theme="dark"] :is(
  .race-results-table thead th,
  .motocal-data-state,
  .me-driver-profile__empty,
  .me-driver-profile__placeholder
){
  background-color:var(--color-surface-2) !important;
  color:var(--color-text-soft) !important;
  border-color:var(--color-border) !important;
}
:root[data-me-theme="dark"] :is(
  .me-driver-profile__section--results .me-driver-profile__section-head h2,
  .single-driver-page .me-driver-profile__section--timeline .me-driver-profile__section-head h2
){
  color:var(--color-text) !important;
}

/* OtoEtkinlik archive page. */
:root[data-me-theme="dark"] body.page-template-page-otoetkinlik :is(
  .archive-content,
  .archive-item,
  .hero-v1 .container,
  .home-sponsors
){
  background-color:var(--color-surface) !important;
  color:var(--color-text) !important;
  border-color:var(--color-border) !important;
}
:root[data-me-theme="dark"] body.page-template-page-otoetkinlik{
  background-color:var(--color-bg) !important;
}

/* bbPress/forum frontend. */
:root[data-me-theme="dark"] body.bbpress :is(
  #bbpress-forums,
  .bbp-breadcrumb,
  .bbp-template-notice,
  .bbp-search-form,
  .bbp-reply-form,
  .bbp-topic-form,
  .bbp-forum-form,
  li.bbp-body ul.forum,
  li.bbp-body ul.topic,
  .bbp-pagination
){
  background-color:var(--color-surface) !important;
  color:var(--color-text) !important;
  border-color:var(--color-border) !important;
}
:root[data-me-theme="dark"] body.bbpress #bbpress-forums :is(a,p,li,span,label,legend){
  border-color:var(--color-border);
}

/* Generic textual hierarchy: prevent dark text surviving on dark surfaces. */
:root[data-me-theme="dark"] :is(
  .content-surface,
  .single-sidebar,
  .archive-content,
  .motocal-page,
  .motocal-container,
  .results-hub-race-card,
  .me-driver-profile__section,
  #bbpress-forums
) :is(h1,h2,h3,h4,h5,h6){
  color:var(--color-text) !important;
}
:root[data-me-theme="dark"] :is(
  .content-surface,
  .single-sidebar,
  .archive-content,
  .motocal-page,
  .motocal-container,
  .results-hub-race-card,
  .me-driver-profile__section,
  #bbpress-forums
) :is(p,li,dd,dt,small,figcaption){
  border-color:var(--color-border);
}

/* ======================================================
   DARK MODE POLISH PASS — TEXT CONTRAST + SURFACE DEPTH
   Color-only normalization. No geometry/layout changes.
====================================================== */
:root[data-me-theme="dark"]{
  --color-bg:#090b0e;
  --color-surface:#12161b;
  --color-surface-2:#191e24;
  --color-text:#f4f6f8;
  --color-text-soft:#c0c6cf;
  --color-text-muted:#929aa5;
  --color-border:#303740;
  --color-border-soft:#252b32;
}

/* Give the dark theme a consistent premium depth without touching sizing. */
:root[data-me-theme="dark"] :is(
  .single-content,
  .single-sidebar,
  .archive-content,
  .archive-item,
  .sidebar-box,
  .widget,
  .upcoming-race-card,
  .home-mix-boxed .mix-box,
  .home-mix-boxed .news-card,
  .otoetkinlik-section .news-card,
  .motocal-card,
  .motogp-driver-card,
  .standings-row--matrix,
  .race-results-card,
  .results-podium__card,
  .race-nonfinish,
  .me-driver-mini-results__card,
  .moto-topic-card,
  body.bbpress #bbpress-forums li.bbp-body ul.forum,
  body.bbpress #bbpress-forums li.bbp-body ul.topic
){
  background-color:var(--color-surface) !important;
  border-color:var(--color-border) !important;
  box-shadow:0 8px 24px rgba(0,0,0,.18);
}

/* Global editorial hierarchy inside real frontend content areas. */
:root[data-me-theme="dark"] :is(
  .single-content,
  .single-text,
  .entry-content,
  .archive-content,
  .single-sidebar,
  .page-content,
  .motocal-page,
  .motocal-container,
  .single-driver-page,
  .race-single-page,
  .motocol-results-hub,
  #bbpress-forums
) :is(h1,h2,h3,h4,h5,h6,p,li,dt,dd,strong,b,em,cite,label,legend){
  color:var(--color-text) !important;
}

:root[data-me-theme="dark"] :is(
  .single-content,
  .single-text,
  .entry-content,
  .archive-content,
  .single-sidebar,
  .page-content,
  .motocal-page,
  .motocal-container,
  .single-driver-page,
  .race-single-page,
  .motocol-results-hub,
  #bbpress-forums
) :is(small,figcaption,.muted,.meta,.description){
  color:var(--color-text-soft) !important;
}

/* Repair legacy inline black text commonly produced by editor/content blocks. */
:root[data-me-theme="dark"] :is(.single-text,.entry-content,.page-content) :is(
  [style*="color: #000"],
  [style*="color:#000"],
  [style*="color: black"],
  [style*="color:black"],
  [style*="color: #111"],
  [style*="color:#111"],
  [style*="color: #171717"],
  [style*="color:#171717"]
){
  color:var(--color-text) !important;
}

/* Homepage / hero secondary cards: these contain hard-coded #111 text. */
:root[data-me-theme="dark"] :is(
  .home-hero.hero-v1 .hero-v1-panel,
  .home-hero.hero-v1 .hero-v1-bottom-card,
  .home-hero.hero-v2 .hero-v2-bottom-card,
  .hero-v3 .hero-v3-card,
  .hero-v4 .hero-v45-card,
  .hero-v45 .hero-v45-bottom-card
){
  background-color:var(--color-surface) !important;
  border-color:var(--color-border) !important;
}
:root[data-me-theme="dark"] :is(
  .home-hero.hero-v1 .hero-v1-bottom-body h4,
  .home-hero.hero-v2 .hero-v2-bottom-body h4,
  .hero-v3 .hero-list-text h4,
  .hero-v3 .hero-v3-card-body h4,
  .hero-v4 .hero-list-text h4,
  .hero-v45 .hero-v45-bottom-head h3,
  .hero-v45 .hero-v45-card-body h4,
  .otoetkinlik-section .section-title,
  .otoetkinlik-section .see-all,
  .otoetkinlik-section .news-card h3,
  .youtube-section .section-title,
  .youtube-section .see-all,
  .youtube-section .news-card h3
){
  color:var(--color-text) !important;
}

/* Upcoming / standings module. */
:root[data-me-theme="dark"] :is(
  .upcoming-race-card .race-title,
  .upcoming-race-card .motocal-times span,
  .standings-tabs .tab-btn
){
  color:var(--color-text) !important;
}
:root[data-me-theme="dark"] .standings-tabs .tab-btn:not(.active){
  background-color:var(--color-surface-2) !important;
  border-color:var(--color-border) !important;
}

/* Race Weekend has several explicit #111 labels/times. */
:root[data-me-theme="dark"] :is(
  .race-weekend-race-name,
  .race-weekend-next-main,
  .race-weekend-next-session-name,
  .race-weekend-countdown-value,
  .race-weekend-strip-day-label,
  .race-weekend-strip-session-time,
  .front-race-weekend .race-weekend-status,
  .front-race-weekend .race-weekend-status-text,
  .front-race-weekend .race-weekend-program-calendar,
  .front-race-weekend .race-weekend-strip-action .race-weekend-button
){
  color:var(--color-text) !important;
}

/* Results / standings / driver profile hard-coded dark labels. */
:root[data-me-theme="dark"] :is(
  .results-hub-race-title,
  .race-pos-number,
  .race-driver-name,
  .results-podium__name,
  .race-nonfinish__name,
  .motocol-results-hub .race-results-section--hub > .section-head h2,
  .race-results-card-head h3,
  .race-results-table td,
  .section-head h2,
  .race-tab-btn,
  .race-subtab-btn,
  .standings-tab-btn,
  .standings-table-headline h2,
  .standings-row--matrix .col-rank,
  .standings-hub .driver-line strong,
  .standings-row--matrix .points,
  .round-points,
  .motogp-driver-card .gp-name,
  .riders-group-title,
  .me-driver-mini-results__title a,
  .me-driver-mini-results__value,
  .single-driver-page .me-driver-timeline--compact .me-driver-timeline__topline,
  .single-driver-page .me-driver-timeline--compact .me-driver-timeline__topline strong
){
  color:var(--color-text) !important;
}
:root[data-me-theme="dark"] :is(
  .results-hub-select,
  .results-hub-dropdown__trigger,
  .me-driver-profile__season-form select
){
  background-color:var(--color-surface-2) !important;
  color:var(--color-text) !important;
  border-color:var(--color-border) !important;
}

/* Archives / pagination / 404 / auth. */
:root[data-me-theme="dark"] :is(
  .archive-page-title,
  .archive-title,
  .archive-title a,
  .latest-card h3,
  .me-auth-header h2
){
  color:var(--color-text) !important;
}
:root[data-me-theme="dark"] :is(
  .archive-pagination .page-numbers,
  body.page-template-page-otoetkinlik .archive-pagination .page-numbers,
  body.page-template-page-otoetkinlik-php .archive-pagination .page-numbers
){
  background-color:var(--color-surface-2) !important;
  color:var(--color-text) !important;
  border-color:var(--color-border) !important;
}

/* bbPress text was still inheriting black from plugin rules. */
:root[data-me-theme="dark"] body.bbpress :is(
  .bbp-forum-title,
  .bbp-topic-title a,
  .moto-last-topic,
  .moto-active-topics a,
  .moto-forum-hero .moto-hero-content h1,
  .moto-topic-card h3
){
  color:var(--color-text) !important;
}

/* Neutral links on dark surfaces. Brand/action buttons retain their own CSS. */
:root[data-me-theme="dark"] :is(
  .single-sidebar,
  .archive-content,
  .motocal-page,
  .motocal-container,
  .single-driver-page,
  #bbpress-forums
) a:not(.button):not(.btn):not(.share-btn):not(.meta-category-badge):not(.latest-category):not(.race-status):not(.me-driver-profile__season-pill){
  color:#dfe5ec;
}
:root[data-me-theme="dark"] :is(
  .single-sidebar,
  .archive-content,
  .motocal-page,
  .motocal-container,
  .single-driver-page,
  #bbpress-forums
) a:not(.button):not(.btn):not(.share-btn):hover{
  color:#ffffff;
}

/* Soft secondary panels for visual hierarchy instead of flat black blocks. */
:root[data-me-theme="dark"] :is(
  .single-sidebar .latest-item,
  .results-hub-filter-bar,
  .results-hub-race-head,
  .race-results-table thead th,
  .me-driver-profile__empty,
  .me-driver-profile__placeholder,
  .motocal-data-state,
  .bbp-template-notice
){
  background-color:var(--color-surface-2) !important;
  border-color:var(--color-border) !important;
}

/* ======================================================
   DARK MODE DEEP PASS — RESULTS / STANDINGS / RACE WEEKEND
   Color-only overrides. No layout, spacing or overflow changes.
====================================================== */

/* Race Weekend: every remaining light inner surface. */
:root[data-me-theme="dark"] .front-race-weekend :is(
  .race-weekend-box,
  .race-weekend-next,
  .race-weekend-strip,
  .race-weekend-strip-day,
  .race-weekend-strip-action,
  .race-weekend-tabs,
  .race-weekend-tab:not(.is-active),
  .race-weekend-button,
  .race-weekend-button-primary
){
  background-color:var(--color-surface) !important;
  border-color:var(--color-border) !important;
}
:root[data-me-theme="dark"] .front-race-weekend :is(
  .race-weekend-next,
  .race-weekend-strip-day,
  .race-weekend-tab:not(.is-active)
){
  background-color:var(--color-surface-2) !important;
}
:root[data-me-theme="dark"] .front-race-weekend :is(
  .race-weekend-strip-day-label,
  .race-weekend-strip-session,
  .race-weekend-strip-session-time,
  .race-weekend-next-main,
  .race-weekend-next-session-name,
  .race-weekend-countdown-value
){color:var(--color-text) !important;}
:root[data-me-theme="dark"] .front-race-weekend :is(
  .race-weekend-next-label,
  .race-weekend-next-day,
  .race-weekend-next-clock,
  .race-weekend-next-main-sep,
  .race-weekend-next-inline-sep,
  .race-weekend-next-count-label,
  .race-weekend-meta-item,
  .race-weekend-meta-sep
){color:var(--color-text-soft) !important;}
:root[data-me-theme="dark"] .front-race-weekend .race-weekend-next-label::after,
:root[data-me-theme="dark"] .front-race-weekend .race-weekend-strip-day:not(:last-child),
:root[data-me-theme="dark"] .front-race-weekend .race-weekend-strip-action,
:root[data-me-theme="dark"] .front-race-weekend .race-weekend-button{
  border-color:var(--color-border) !important;
}
:root[data-me-theme="dark"] .front-race-weekend .race-weekend-tab:not(.is-active):hover{
  background-color:#222830 !important;
  color:#fff !important;
}
:root[data-me-theme="dark"] .front-race-weekend .race-weekend-button:hover{
  background-color:rgba(227,6,19,.14) !important;
}

/* Results Hub: filters, podium, table rows and non-finish block. */
:root[data-me-theme="dark"] .motocol-results-hub :is(
  .results-hub-filter-bar,
  .results-hub-filter-panel,
  .results-hub-dropdown__menu,
  .results-podium,
  .results-podium__card,
  .race-results-card--premium,
  .race-nonfinish
){
  background-color:var(--color-surface) !important;
  border-color:var(--color-border) !important;
}
:root[data-me-theme="dark"] .motocol-results-hub :is(
  .results-hub-dropdown__trigger,
  .results-hub-dropdown__option,
  .race-results-card--premium .race-results-table thead th,
  .race-nonfinish__head,
  .race-pos-number,
  .race-driver-number,
  .race-driver-thumb
){
  background-color:var(--color-surface-2) !important;
  border-color:var(--color-border) !important;
}
:root[data-me-theme="dark"] .motocol-results-hub .race-results-card--premium .race-results-table tbody tr,
:root[data-me-theme="dark"] .motocol-results-hub .race-results-card--premium .race-results-table tbody tr.is-first,
:root[data-me-theme="dark"] .motocol-results-hub .race-results-card--premium .race-results-table tbody tr.is-second,
:root[data-me-theme="dark"] .motocol-results-hub .race-results-card--premium .race-results-table tbody tr.is-third{
  background-color:var(--color-surface) !important;
}
:root[data-me-theme="dark"] .motocol-results-hub .race-results-card--premium .race-results-table tbody tr:hover{
  background-color:#171c22 !important;
}
:root[data-me-theme="dark"] .motocol-results-hub .race-results-card--premium .race-results-table tbody td,
:root[data-me-theme="dark"] .motocol-results-hub .race-nonfinish__row{
  border-color:var(--color-border-soft) !important;
}
:root[data-me-theme="dark"] .motocol-results-hub :is(
  .results-hub-dropdown__trigger,
  .results-hub-dropdown__option,
  .results-podium__name,
  .race-results-card--premium .race-driver-name,
  .race-results-card--premium .race-pos-number,
  .race-nonfinish__head span,
  .race-nonfinish__name
){color:var(--color-text) !important;}
:root[data-me-theme="dark"] .motocol-results-hub :is(
  .results-podium__identity,
  .results-podium__team,
  .race-results-card--premium .race-team-cell,
  .race-results-card--premium .race-driver-number,
  .race-nonfinish__head small,
  .race-nonfinish__number,
  .race-nonfinish__team
){color:var(--color-text-soft) !important;}

/* Dedicated race result pages (single race). */
:root[data-me-theme="dark"] .race-single-page{
  background-color:var(--color-bg) !important;
  color:var(--color-text) !important;
}
:root[data-me-theme="dark"] .race-single-page :is(
  .race-results-section,
  .race-content-section,
  .race-results-card,
  .race-tab-btn:not(.is-active),
  .race-subtab-btn:not(.is-active),
  .race-empty
){
  background-color:var(--color-surface) !important;
  border-color:var(--color-border) !important;
  color:var(--color-text) !important;
}
:root[data-me-theme="dark"] .race-single-page :is(
  .race-results-card,
  .race-subtab-btn:not(.is-active),
  .race-empty,
  .race-driver-status
){background-color:var(--color-surface-2) !important;}
:root[data-me-theme="dark"] .race-single-page :is(
  .section-head h2,
  .race-tab-btn:not(.is-active),
  .race-subtab-btn:not(.is-active),
  .race-results-card-head h3,
  .race-driver-name,
  .race-content-entry
){color:var(--color-text) !important;}
:root[data-me-theme="dark"] .race-single-page :is(
  .race-driver-team,
  .race-driver-status,
  .race-empty
){color:var(--color-text-soft) !important;}

/* Standings: remove all light shells while retaining series accent tabs. */
:root[data-me-theme="dark"] .standings-hub :is(
  .standings-tabs-nav,
  .standings-table-shell,
  .standings-table-headline,
  .standings-row--matrix
){
  background:var(--color-surface) !important;
  border-color:var(--color-border) !important;
}
:root[data-me-theme="dark"] .standings-hub .standings-tabs-nav,
:root[data-me-theme="dark"] .standings-hub .standings-table-headline{
  background:var(--color-surface-2) !important;
}
:root[data-me-theme="dark"] .standings-hub .standings-tab-btn:not(.is-active){
  background:transparent !important;
  color:var(--color-text) !important;
}
:root[data-me-theme="dark"] .standings-hub .standings-tab-btn:not(.is-active):hover{
  background:rgba(177,18,23,.16) !important;
}
:root[data-me-theme="dark"] .standings-hub .standings-row--matrix:hover{
  background:#171c22 !important;
}
:root[data-me-theme="dark"] .standings-hub .standings-row--matrix.rank-1{
  background:linear-gradient(90deg,rgba(177,18,23,.16) 0%,var(--color-surface) 34%) !important;
}
:root[data-me-theme="dark"] .standings-hub .standings-row--matrix > span,
:root[data-me-theme="dark"] .standings-hub .standings-row--matrix .col-total{
  border-color:var(--color-border-soft) !important;
}
:root[data-me-theme="dark"] .standings-hub :is(
  .standings-table-headline h2,
  .standings-row--matrix .col-rank,
  .driver-line strong,
  .round-points
){color:var(--color-text) !important;}
:root[data-me-theme="dark"] .standings-hub :is(
  .driver-line em,
  .driver-team,
  .standings-row--matrix .col-gap,
  .standings-empty
){color:var(--color-text-soft) !important;}
:root[data-me-theme="dark"] .standings-hub .standings-row--matrix .points{
  background:#2a3139 !important;
  color:var(--color-text) !important;
}
:root[data-me-theme="dark"] .standings-hub .standings-row--matrix.rank-1 .points{
  background:#b11217 !important;
  color:#fff !important;
}
:root[data-me-theme="dark"] .standings-hub .standings-row--matrix.rank-2 .points,
:root[data-me-theme="dark"] .standings-hub .standings-row--matrix.rank-3 .points{
  background:#343c46 !important;
  color:#fff !important;
}
:root[data-me-theme="dark"] .standings-hero .standings-season-filter .results-hub-select{
  background-color:#171c22 !important;
  color:var(--color-text) !important;
  border-color:rgba(255,255,255,.16) !important;
}

/* ======================================================
   RACE WEEKEND — FINAL DARK BACKGROUND FIX
   The editorial Race Weekend stylesheet uses background shorthand
   late in the cascade. Override the shorthand itself, not only
   background-color. Color-only changes; no layout/overflow changes.
====================================================== */
:root[data-me-theme="dark"] .front-race-weekend .race-weekend-box{
  background:var(--color-surface) !important;
  border-color:var(--color-border) !important;
}
:root[data-me-theme="dark"] .front-race-weekend .race-weekend-next{
  background:var(--color-surface-2) !important;
  border-color:var(--color-border) !important;
}
:root[data-me-theme="dark"] .front-race-weekend .race-weekend-strip{
  background:var(--color-surface) !important;
  border-color:var(--color-border) !important;
}
:root[data-me-theme="dark"] .front-race-weekend .race-weekend-strip-day,
:root[data-me-theme="dark"] .front-race-weekend .race-weekend-strip-action{
  background:transparent !important;
}
:root[data-me-theme="dark"] .front-race-weekend .race-weekend-button,
:root[data-me-theme="dark"] .front-race-weekend .race-weekend-button-primary{
  background:transparent !important;
}
:root[data-me-theme="dark"] .front-race-weekend .race-weekend-button:hover,
:root[data-me-theme="dark"] .front-race-weekend .race-weekend-button-primary:hover{
  background:rgba(227,6,19,.12) !important;
}

/* ======================================================
   UPCOMING RACES — DARK MODE SESSION TIME VISIBILITY
   Keep the existing grid/layout untouched; only correct the
   session-chip background/text contrast in dark mode.
====================================================== */
:root[data-me-theme="dark"] .home-upcoming-races .upcoming-race-card.motogp .motocal-times span{
  background:linear-gradient(135deg,#c5161d 0%,#991116 100%) !important;
  color:#ffffff !important;
  box-shadow:none !important;
}
:root[data-me-theme="dark"] .home-upcoming-races .upcoming-race-card.worldsbk .motocal-times span{
  background:#17243a !important;
  color:#9fc5ff !important;
  box-shadow:inset 0 0 0 1px rgba(116,167,255,.22) !important;
}

/* ======================================================
   DARK MODE TARGETED CLEANUP — RESULTS / RIDERS / STANDINGS / COMMENTS
   Color-only overrides. No layout, spacing, responsive or overflow changes.
====================================================== */

/* Results Hub — legacy/current wrappers that still carry light backgrounds. */
:root[data-me-theme="dark"] .motocol-results-hub :is(
  .results-hub-filters,
  .results-hub-empty,
  .results-hub-result-card,
  .results-hub-result-head,
  .results-hub-filter-bar,
  .results-hub-filter-panel,
  .results-podium,
  .results-podium__card,
  .race-results-card--premium,
  .race-nonfinish
){
  background:var(--color-surface) !important;
  border-color:var(--color-border) !important;
}
:root[data-me-theme="dark"] .motocol-results-hub :is(
  .results-hub-select,
  .results-hub-dropdown__trigger,
  .results-hub-dropdown__menu,
  .results-hub-dropdown__option,
  .race-results-card--premium .race-results-table thead th,
  .race-nonfinish__head,
  .race-pos-number,
  .race-driver-number,
  .race-driver-thumb
){
  background:var(--color-surface-2) !important;
  border-color:var(--color-border) !important;
  color:var(--color-text) !important;
}
:root[data-me-theme="dark"] .motocol-results-hub :is(
  .results-hub-field label,
  .results-hub-result-title,
  .results-hub-empty p,
  .results-podium__name,
  .race-driver-name,
  .race-nonfinish__name
){color:var(--color-text) !important;}
:root[data-me-theme="dark"] .motocol-results-hub :is(
  .results-hub-result-subtitle,
  .results-hub-result-date,
  .results-podium__identity,
  .results-podium__team,
  .race-team-cell,
  .race-driver-number,
  .race-nonfinish__number,
  .race-nonfinish__team,
  .race-nonfinish__head small
){color:var(--color-text-soft) !important;}
:root[data-me-theme="dark"] .motocol-results-hub .results-hub-dropdown__option:hover,
:root[data-me-theme="dark"] .motocol-results-hub .results-hub-dropdown__option:focus-visible,
:root[data-me-theme="dark"] .motocol-results-hub .race-subtab-btn:not(.is-active):hover{
  background:#20262d !important;
  color:var(--color-text) !important;
}

/* Riders listing pages — tabs, panels and driver cards. */
:root[data-me-theme="dark"] :is(
  .riders-hub--motogp,
  .riders-hub--moto2,
  .riders-hub--moto3,
  .riders-hub--worldsbk,
  .riders-hub--worldssp
) :is(
  .riders-tabs-nav,
  .riders-tab-panel,
  .motogp-driver-card,
  .riders-empty
){
  background:var(--color-surface) !important;
  border-color:var(--color-border) !important;
}
:root[data-me-theme="dark"] :is(
  .riders-hub--motogp,
  .riders-hub--moto2,
  .riders-hub--moto3,
  .riders-hub--worldsbk,
  .riders-hub--worldssp
) .riders-tabs-nav{
  background:var(--color-surface-2) !important;
}
:root[data-me-theme="dark"] :is(
  .riders-hub--motogp,
  .riders-hub--moto2,
  .riders-hub--moto3,
  .riders-hub--worldsbk,
  .riders-hub--worldssp
) :is(
  .riders-tab-btn:not(.is-active),
  .gp-name,
  .motocal-track
){color:var(--color-text) !important;}
:root[data-me-theme="dark"] :is(
  .riders-hub--motogp,
  .riders-hub--moto2,
  .riders-hub--moto3,
  .riders-hub--worldsbk,
  .riders-hub--worldssp
) :is(.riders-empty,.motocal-meta,.motocal-team){color:var(--color-text-soft) !important;}
:root[data-me-theme="dark"] :is(
  .riders-hub--motogp,
  .riders-hub--moto2,
  .riders-hub--moto3,
  .riders-hub--worldsbk,
  .riders-hub--worldssp
) .motogp-driver-card:hover .motocal-track{color:var(--color-text) !important;}

/* Driver profile — remaining light editorial result/career surfaces. */
:root[data-me-theme="dark"] .single-driver-page :is(
  .me-driver-profile__section--results,
  .me-driver-profile__section--timeline,
  .me-driver-mini-results__card,
  .me-driver-mini-results__flag,
  .me-driver-timeline--compact .me-driver-timeline__item
){
  background:var(--color-surface) !important;
  border-color:var(--color-border) !important;
}
:root[data-me-theme="dark"] .single-driver-page .me-driver-mini-results__flag{
  background:var(--color-surface-2) !important;
}
:root[data-me-theme="dark"] .single-driver-page :is(
  .me-driver-profile__section--results .me-driver-profile__section-head h2,
  .me-driver-profile__section--timeline .me-driver-profile__section-head h2,
  .me-driver-mini-results__title,
  .me-driver-mini-results__title a,
  .me-driver-timeline--compact .me-driver-timeline__topline,
  .me-driver-timeline--compact .me-driver-timeline__topline strong
){color:var(--color-text) !important;}
:root[data-me-theme="dark"] .single-driver-page :is(
  .me-driver-mini-results__sub,
  .me-driver-mini-results__separator
){color:var(--color-text-soft) !important;}
:root[data-me-theme="dark"] .single-driver-page .me-driver-profile__season-form select{
  background:var(--color-surface-2) !important;
  color:var(--color-text) !important;
  border-color:var(--color-border) !important;
}

/* Standings — force every light table layer, not just the matrix rows. */
:root[data-me-theme="dark"] .standings-hub :is(
  .standings-tabs-nav,
  .standings-tab-panel,
  .standings-table-shell,
  .standings-table-headline,
  .standings-row--matrix
){
  background:var(--color-surface) !important;
  border-color:var(--color-border) !important;
}
:root[data-me-theme="dark"] .standings-hub :is(.standings-tabs-nav,.standings-table-headline){
  background:var(--color-surface-2) !important;
}
:root[data-me-theme="dark"] .standings-hub .standings-table-headline{
  background-image:none !important;
}
:root[data-me-theme="dark"] .standings-hub .standings-row--matrix:hover{
  background:#171c22 !important;
}
:root[data-me-theme="dark"] .standings-hub .standings-row--matrix > span{
  border-color:var(--color-border-soft) !important;
}
:root[data-me-theme="dark"] .standings-hub :is(
  .standings-table-headline h2,
  .standings-tab-btn:not(.is-active),
  .driver-line strong,
  .standings-row--matrix .col-rank,
  .round-points
){color:var(--color-text) !important;}

/* Single comments — outer box, comment cards, reply form and textarea. */
:root[data-me-theme="dark"] .moto-comments{
  background:var(--color-surface) !important;
  color:var(--color-text) !important;
}
:root[data-me-theme="dark"] .moto-comments-header{
  border-color:var(--color-border) !important;
}
:root[data-me-theme="dark"] .moto-comments :is(
  .moto-comment-inner,
  .moto-comment-form,
  .comment-form textarea,
  .comment-form input[type="text"],
  .comment-form input[type="email"],
  .comment-form input[type="url"]
){
  background:var(--color-surface-2) !important;
  border-color:var(--color-border) !important;
  color:var(--color-text) !important;
}
:root[data-me-theme="dark"] .moto-comments :is(
  .moto-comments-title,
  .moto-comment-author,
  .moto-comment-text,
  .comment-form label
){color:var(--color-text) !important;}
:root[data-me-theme="dark"] .moto-comments :is(
  .moto-comment-count,
  .moto-comment-date,
  .moto-comment-like,
  .like-count,
  .like-heart
){color:var(--color-text-soft) !important;}
:root[data-me-theme="dark"] .moto-comments .moto-comment-actions,
:root[data-me-theme="dark"] .moto-comments .comment-list .children{
  border-color:var(--color-border) !important;
}
:root[data-me-theme="dark"] .moto-comments .moto-collapse-toggle{
  background:#20262d !important;
  color:var(--color-text-soft) !important;
}
:root[data-me-theme="dark"] .moto-comments .moto-collapse-toggle:hover{
  background:#272e36 !important;
  color:#ef4a50 !important;
}
:root[data-me-theme="dark"] .moto-comments .comment-reply-link{color:#79a9ff !important;}

/* ======================================================
   DARK MODE DEEP CLEANUP — RESULTS / RIDERS / STANDINGS / CONTACT
   Final color-layer pass. No layout/spacing/responsive changes.
====================================================== */

/* RESULTS: cover every light editorial layer, including row/cell backgrounds. */
:root[data-me-theme="dark"] .motocol-results-hub :is(
  .results-hub-filters,
  .results-hub-empty,
  .results-hub-result-card,
  .results-hub-result-head,
  .results-hub-filter-bar,
  .results-hub-filter-panel,
  .results-podium,
  .results-podium__card,
  .race-results-card--premium,
  .race-nonfinish,
  .race-nonfinish__list,
  .race-nonfinish__row
){
  background:var(--color-surface) !important;
  border-color:var(--color-border) !important;
}
:root[data-me-theme="dark"] .motocol-results-hub .race-results-card--premium .race-results-table,
:root[data-me-theme="dark"] .motocol-results-hub .race-results-card--premium .race-results-table tbody,
:root[data-me-theme="dark"] .motocol-results-hub .race-results-card--premium .race-results-table tbody tr,
:root[data-me-theme="dark"] .motocol-results-hub .race-results-card--premium .race-results-table tbody tr.is-first,
:root[data-me-theme="dark"] .motocol-results-hub .race-results-card--premium .race-results-table tbody tr.is-second,
:root[data-me-theme="dark"] .motocol-results-hub .race-results-card--premium .race-results-table tbody tr.is-third,
:root[data-me-theme="dark"] .motocol-results-hub .race-results-card--premium .race-results-table tbody td{
  background:var(--color-surface) !important;
  border-color:var(--color-border-soft) !important;
  color:var(--color-text) !important;
}
:root[data-me-theme="dark"] .motocol-results-hub .race-results-card--premium .race-results-table tbody tr:hover{
  background:#1a1f25 !important;
}
:root[data-me-theme="dark"] .motocol-results-hub :is(
  .results-hub-dropdown__trigger,
  .results-hub-dropdown__menu,
  .results-hub-dropdown__option,
  .race-results-card--premium .race-results-table thead th,
  .race-nonfinish__head,
  .race-pos-number,
  .race-driver-number,
  .race-driver-thumb,
  .race-driver-thumb--fallback
){
  background:var(--color-surface-2) !important;
  border-color:var(--color-border) !important;
  color:var(--color-text) !important;
}
:root[data-me-theme="dark"] .motocol-results-hub :is(
  .results-podium__name,
  .race-driver-name,
  .race-nonfinish__name,
  .race-nonfinish__head span
){color:var(--color-text) !important;}
:root[data-me-theme="dark"] .motocol-results-hub :is(
  .results-podium__identity,
  .results-podium__team,
  .race-team-cell,
  .race-nonfinish__number,
  .race-nonfinish__team,
  .race-nonfinish__head small
){color:var(--color-text-soft) !important;}

/* RIDERS: use the real .riders-hub wrapper and force all card/content layers dark. */
:root[data-me-theme="dark"] .riders-hub :is(
  .riders-tabs-nav,
  .riders-tab-panel,
  .motogp-driver-card,
  .motogp-driver-card .motocal-content,
  .riders-empty
){
  background:var(--color-surface) !important;
  border-color:var(--color-border) !important;
}
:root[data-me-theme="dark"] .riders-hub .riders-tabs-nav{
  background:var(--color-surface-2) !important;
}
:root[data-me-theme="dark"] .riders-hub :is(
  .riders-tab-btn:not(.is-active),
  .riders-group-title,
  .riders-group--guests .riders-group-title,
  .gp-name,
  .motogp-driver-card .gp-name,
  .motogp-driver-card .motocal-title
){color:var(--color-text) !important;}
:root[data-me-theme="dark"] .riders-hub :is(
  .motocal-track,
  .motocal-team,
  .motocal-meta,
  .riders-empty
){color:var(--color-text-soft) !important;}
:root[data-me-theme="dark"] .riders-hub .riders-group--guests{
  border-color:var(--color-border) !important;
}

/* STANDINGS: previous generic selector missed real wrappers in some cascade paths. */
:root[data-me-theme="dark"] :is(.standings-hub--motogp,.standings-hub--wsbk) :is(
  .standings-tabs-nav,
  .standings-tab-panel,
  .standings-table-shell,
  .standings-table-headline,
  .standings-table-scroll,
  .standings-table--matrix,
  .standings-row--matrix
){
  background:var(--color-surface) !important;
  border-color:var(--color-border) !important;
}
:root[data-me-theme="dark"] :is(.standings-hub--motogp,.standings-hub--wsbk) :is(
  .standings-tabs-nav,
  .standings-table-headline,
  .standings-hero .standings-season-filter .results-hub-select
){
  background:var(--color-surface-2) !important;
  background-image:none !important;
  border-color:var(--color-border) !important;
  color:var(--color-text) !important;
}
:root[data-me-theme="dark"] :is(.standings-hub--motogp,.standings-hub--wsbk) .standings-row--matrix,
:root[data-me-theme="dark"] :is(.standings-hub--motogp,.standings-hub--wsbk) .standings-row--matrix.rank-1{
  background:var(--color-surface) !important;
  background-image:none !important;
  border-color:var(--color-border-soft) !important;
}
:root[data-me-theme="dark"] :is(.standings-hub--motogp,.standings-hub--wsbk) .standings-row--matrix:hover{
  background:#1a1f25 !important;
}
:root[data-me-theme="dark"] :is(.standings-hub--motogp,.standings-hub--wsbk) .standings-row--matrix > span{
  border-color:var(--color-border-soft) !important;
}
:root[data-me-theme="dark"] :is(.standings-hub--motogp,.standings-hub--wsbk) :is(
  .standings-tab-btn:not(.is-active),
  .standings-table-headline h2,
  .standings-row--matrix .col-rank,
  .standings-row--matrix .driver-line strong,
  .standings-row--matrix .driver strong,
  .round-points
){color:var(--color-text) !important;}
:root[data-me-theme="dark"] :is(.standings-hub--motogp,.standings-hub--wsbk) :is(
  .standings-table-headline p,
  .driver-line small,
  .standings-row--matrix .col-gap
){color:var(--color-text-soft) !important;}

/* CONTACT: retain the existing layout, but make the whole page feel intentionally dark. */
:root[data-me-theme="dark"] .iletisim-page :is(
  .iletisim-hero-surface,
  .iletisim-surface,
  .iletisim-card
){
  background:linear-gradient(180deg,#161a1f 0%,#12161a 100%) !important;
  border-color:var(--color-border) !important;
  color:var(--color-text) !important;
  box-shadow:0 16px 38px rgba(0,0,0,.28) !important;
}
:root[data-me-theme="dark"] .iletisim-page .iletisim-card{
  background:#171b20 !important;
}
:root[data-me-theme="dark"] .iletisim-page :is(
  .iletisim-hero-surface h1,
  .iletisim-card-title,
  .iletisim-card p,
  .iletisim-card strong,
  .iletisim-card a,
  .sosyal-list a,
  .iban-row span
){color:var(--color-text) !important;}
:root[data-me-theme="dark"] .iletisim-page :is(
  .iletisim-hero-surface p,
  .iletisim-card small,
  .iban-box h4
){color:var(--color-text-soft) !important;}
:root[data-me-theme="dark"] .iletisim-page .iletisim-card-title{
  border-color:var(--color-border) !important;
}
:root[data-me-theme="dark"] .iletisim-page :is(.sosyal-list a:hover,.iban-box,.copy-icon){
  background:#20252b !important;
  border-color:var(--color-border) !important;
  color:var(--color-text) !important;
  box-shadow:none !important;
}
:root[data-me-theme="dark"] .iletisim-page .iban-box{
  border-color:#3b424b !important;
}
:root[data-me-theme="dark"] .iletisim-page :is(.iban-box:hover,.copy-icon:hover){
  background:#272d34 !important;
  border-color:#b11217 !important;
}
:root[data-me-theme="dark"] .iletisim-page .sosyal-list i{
  color:#ef4a50 !important;
}

/* ======================================================
   DARK MODE — MOTOCAL OUTER SHELL FIX
   Calendar / Riders / Results / Standings shared outer panel.
   Color layer only; no layout/responsive changes.
====================================================== */
:root[data-me-theme="dark"] .motocal-wrapper{
  background:var(--color-surface) !important;
  border-color:var(--color-border) !important;
  color:var(--color-text) !important;
}

:root[data-me-theme="dark"] .motocal-wrapper > .motocal-inner{
  background:transparent !important;
}

/* Legacy calendar fallback panels that otherwise remain white. */
:root[data-me-theme="dark"] :is(.page-id-2463,.page-id-6921) .motocal-grid{
  background:var(--color-surface) !important;
  border-color:var(--color-border) !important;
}

/* Defensive coverage for all current MotoCal page families. */
:root[data-me-theme="dark"] :is(
  .riders-hub,
  .standings-hub--motogp,
  .standings-hub--wsbk,
  .motocol-results-hub--motogp .motocal-wrapper,
  .motocol-results-hub--worldsbk .motocal-wrapper
){
  background:var(--color-surface) !important;
  border-color:var(--color-border) !important;
}


/* Results Hub outer shell: preserve the site background in dark mode.
   Inner result cards remain on the dark surface palette. */
:root[data-me-theme="dark"] .motocol-results-hub > .motocal-wrapper{
  background:transparent !important;
  border-color:transparent !important;
}

/* Results Hub final shell repair: keep the site's own page/background visible. */
:root[data-me-theme="dark"] .motocol-results-hub{
  background:transparent !important;
  background-color:transparent !important;
  border-color:transparent !important;
}
:root[data-me-theme="dark"] .motocol-results-hub > .motocal-wrapper{
  background:transparent !important;
  background-color:transparent !important;
  border-color:transparent !important;
  box-shadow:none !important;
}

/* Results Hub Sprint / Race segmented control. */
:root[data-me-theme="dark"] .motocol-results-hub .race-subtabs-nav{
  background:var(--color-surface-2) !important;
  border-color:var(--color-border) !important;
}
:root[data-me-theme="dark"] .motocol-results-hub .race-subtab-btn:not(.is-active){
  background:transparent !important;
  color:var(--color-text-soft) !important;
}
:root[data-me-theme="dark"] .motocol-results-hub .race-subtab-btn:not(.is-active):hover{
  background:#242930 !important;
  color:#f05a60 !important;
}
:root[data-me-theme="dark"] .motocol-results-hub .race-subtab-btn.is-active{
  background:#0f1114 !important;
  color:#fff !important;
}

/* Results Hub 1200px content panel: keep site background outside, dark panel inside. */
:root[data-me-theme="dark"] .motocol-results-hub > .motocal-wrapper{
  background:var(--color-surface) !important;
  background-color:var(--color-surface) !important;
  border-color:var(--color-border) !important;
}
