/* The Rangers R2 v1.2.0 — scoped dark palette; Light Mode code untouched. */
/* Header controls: desktop icon adjacent to search, mobile choices IN menu. */
.r2-v120-theme-item { display: none; list-style: none; margin: 0; padding: 0; position: relative; }
html[data-r2-choice] .r2-v120-theme-item { display: list-item; }
.r2-v120-theme-desktop { position: relative; }
.r2-v120-theme-trigger { display: flex; align-items: center; justify-content: center; width: 42px; min-height: 44px; cursor: pointer; border-radius: 8px; color: #192838; list-style: none; }
.r2-v120-theme-trigger::-webkit-details-marker { display: none; }
/* Self-contained visually-hidden label, independent of WordPress core styles. */
.r2-v120-theme-trigger .screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.r2-v120-theme-trigger:hover, .r2-v120-theme-desktop[open] .r2-v120-theme-trigger { color: #c81022; background: #fff0f1; }
.r2-v120-theme-trigger:focus-visible { outline: 3px solid #ffd000; outline-offset: 2px; }
.r2-v120-icon { display: none; width: 20px; height: 20px; }
html[data-r2-choice="auto"] .r2-v120-icon--auto,
html[data-r2-choice="light"] .r2-v120-icon--light,
html[data-r2-choice="dark"] .r2-v120-icon--dark { display: block; }
.r2-v120-theme-choices { box-sizing: border-box; margin: 0; min-width: 185px; padding: 12px; border: 1px solid #dae4ee; border-radius: 10px; background: #fff; color: #192838; box-shadow: 0 8px 26px rgb(13 32 52 / 17%); }
.r2-v120-theme-choices legend { padding: 0 5px; font-weight: 800; font-size: 13px; }
.r2-v120-theme-choices label { display: flex; align-items: center; gap: 8px; padding: 7px 4px; font-weight: 600; font-size: 14px; cursor: pointer; }
.r2-v120-theme-choices input { margin: 0; width: 18px; height: 18px; accent-color: #c81022; }
.r2-v120-theme-choices input:focus-visible { outline: 3px solid #ffd000; outline-offset: 2px; }
.r2-v120-theme-desktop > .r2-v120-theme-choices { position: absolute; z-index: 92; top: calc(100% + 12px); right: 0; }
.r2-v120-theme-mobile { display: none; }
@media (min-width: 1281px) {
  /* The homepage hero has z-index 35, header 30: raise only when expanded. */
  .r2-v043-header:has(.r2-v120-theme-desktop[open]) { z-index: 90; }
}
@media (min-width: 1281px) and (max-width: 1450px) {
  .r2-v043-nav ul { gap: clamp(5px, .7vw, 10px); }
}
@media (max-width: 1280px) {
  .r2-v120-theme-desktop { display: none; }
  .r2-v120-theme-mobile { display: block; margin-top: 9px; }
  .r2-v120-theme-mobile .r2-v120-theme-choices { min-width: 0; width: 100%; box-shadow: none; background: #f8fbff; }
}

/* Theme variables are limited to a dark-root attribute set from a validated enum. */
html[data-r2-theme="dark"] {
  color-scheme: dark;
  --r2-blue: #86c3ff;
  --r2-ink: #eef4fa;
  --r2-muted: #b7c7d8;
  --r2-light: #202e3d;
  --r2-dark-bg: #111923;
  --r2-dark-panel: #1b2735;
  --r2-dark-raised: #243345;
  --r2-dark-border: #384b5f;
  --r2-dark-text: #eef4fa;
  --r2-dark-muted: #bfcbda;
  --r2-dark-link: #8fcaff;
}
html[data-r2-theme="dark"] body { background: var(--r2-dark-bg); color: var(--r2-dark-text); }
html[data-r2-theme="dark"] .wp-site-blocks { background: var(--r2-dark-bg); box-shadow: 0 5px 18px rgb(0 0 0 / 24%); }
html[data-r2-theme="dark"] :is(.r2-article, .r2-article .wp-block-post-content, .r2-section, .r2-team-detail, .r2-team-card__body) { color: var(--r2-dark-text); }
html[data-r2-theme="dark"] :is(h1,h2,h3,h4,h5,h6) { color: inherit; }
html[data-r2-theme="dark"] :is(a, .r2-news-card__more, .r2-team-knbsb a) { color: var(--r2-dark-link); }
html[data-r2-theme="dark"] :is(a,button,input,textarea,select,summary):focus-visible { outline: 3px solid #ffd000; outline-offset: 3px; }
/* Heroes retain original photos, dark gradient and white foreground. */
html[data-r2-theme="dark"] .r2-hero, html[data-r2-theme="dark"] .r2-hero :is(h1,p) { color: #fff; }
html[data-r2-theme="dark"] .r2-hero a.r2-button--red,
html[data-r2-theme="dark"] .r2-article :is(.wp-block-button__link,.r2-button--red) { color: #fff; }
html[data-r2-theme="dark"] .r2-button--light { background: #edf4ff; color: #17406b; }

/* Header, both search surfaces, mobile drawer and theme popup. */
html[data-r2-theme="dark"] .r2-v043-header,
html[data-r2-theme="dark"] .r2-v043-nav,
html[data-r2-theme="dark"] .r2-v110-search-popup,
html[data-r2-theme="dark"] .r2-v120-theme-choices { background: var(--r2-dark-panel); color: var(--r2-dark-text); border-color: var(--r2-dark-border); }
html[data-r2-theme="dark"] .r2-v043-nav a,
html[data-r2-theme="dark"] .r2-v110-search-trigger,
html[data-r2-theme="dark"] .r2-v120-theme-trigger { color: var(--r2-dark-text); }
html[data-r2-theme="dark"] .r2-v043-nav a:hover,
html[data-r2-theme="dark"] .r2-v043-nav a:focus-visible,
html[data-r2-theme="dark"] .r2-v043-nav a.is-current,
html[data-r2-theme="dark"] .r2-v043-nav a[aria-current="page"] { color: #ff858a; }
html[data-r2-theme="dark"] .r2-v110-search-trigger:hover,
html[data-r2-theme="dark"] .r2-v120-theme-trigger:hover,
html[data-r2-theme="dark"] .r2-v110-search-desktop[open] .r2-v110-search-trigger,
html[data-r2-theme="dark"] .r2-v120-theme-desktop[open] .r2-v120-theme-trigger { background: var(--r2-dark-raised); color: #ff9ba0; }
html[data-r2-theme="dark"] .r2-v043-socials { border-left-color: var(--r2-dark-border); }
html[data-r2-theme="dark"] .r2-v043-nav a { border-bottom-color: transparent; }
@media (max-width: 1280px) {
  html[data-r2-theme="dark"] .r2-v043-nav a { border-bottom-color: var(--r2-dark-border); }
}
html[data-r2-theme="dark"] .r2-v043-nav a.is-current { border-bottom-color: #ff858a; }
html[data-r2-theme="dark"] .r2-v120-theme-mobile .r2-v120-theme-choices { background: var(--r2-dark-raised); }
html[data-r2-theme="dark"] .r2-v110-search-popup input,
html[data-r2-theme="dark"] .r2-v110-search-mobile input,
html[data-r2-theme="dark"] .r2-v110-search-page-form .wp-block-search__input { background: #142130; color: var(--r2-dark-text); border-color: #7890a7; }
html[data-r2-theme="dark"] input::placeholder,
html[data-r2-theme="dark"] textarea::placeholder { color: #c3d0e0; opacity: 1; }

/* Editorial cards and their familiar news-page layout. */
html[data-r2-theme="dark"] :is(.r2-news-card,.r2-team-card,.r2-practice-card,.r2-team-detail__fact,
  .r2-vereniging-tile,.r2-vereniging-role,.r2-v110-search-results .wp-block-post-template > li,
  .r2-clinics-cards .wp-block-post-template > li) {
  background: var(--r2-dark-panel); border-color: var(--r2-dark-border); color: var(--r2-dark-text);
  box-shadow: 0 4px 16px rgb(0 0 0 / 22%);
}
html[data-r2-theme="dark"] :is(.r2-news-card h3 a,.r2-team-card__body h2 a,.r2-v110-search-results .wp-block-post-title a,
  .r2-clinics-cards .wp-block-post-title a,.r2-vereniging .wp-block-heading) { color: var(--r2-dark-text); }
html[data-r2-theme="dark"] .r2-practice-card__tag { color: #ff939a; }
html[data-r2-theme="dark"] :is(.r2-news-card time,.r2-practice-card small,.r2-team-detail__label,
  .r2-vereniging-role p,.r2-clinics-cards .wp-block-post-date,.r2-recaptcha-disclosure,
  .r2-v110-search-results .wp-block-post-excerpt,.r2-clinics-cards .wp-block-post-excerpt) { color: var(--r2-dark-muted); }
html[data-r2-theme="dark"] :is(.r2-news-card__bottom,.r2-team-detail__more,.r2-clinics-cards .wp-block-read-more) { border-top-color: var(--r2-dark-border); }
html[data-r2-theme="dark"] :is(.r2-news-card__cover,.r2-news-card__thumb,.r2-team-card__photo) { background: var(--r2-dark-raised); }
html[data-r2-theme="dark"] :is(.r2-news-pagination .page-numbers,.r2-team-detail__more-links a) {
  background: var(--r2-dark-panel); color: var(--r2-dark-link); border-color: var(--r2-dark-border);
}
html[data-r2-theme="dark"] .r2-news-pagination .current { background: #2364a4; color: #fff; }
html[data-r2-theme="dark"] .r2-team-detail__bottom,
html[data-r2-theme="dark"] .r2-foys-guide .r2-foys-lead { background: var(--r2-dark-raised); }
html[data-r2-theme="dark"] :is(.r2-team-detail__fact p,.r2-team-detail__intro,.r2-practice-winter,
 .r2-team-detail__more-title,.r2-vereniging-role,.r2-vereniging-lead) { color: var(--r2-dark-text); }

/* Intros, stat and recruitment boxes, notices and volunteer panels. */
html[data-r2-theme="dark"] :is(.r2-values,.r2-notice,.r2-membership-teaser,.r2-membership-fees-callout,
 .r2-v060-stats__content,.r2-v070-sponsor-cta,.r2-promo,.r2-vereniging-lead,
 .r2-article .is-style-rangers-intro,.r2-article .r2-news-intro-fallback,
 .r2-knbsb-card,.wp-block-group.r2-knbsb-card,
 .r2-v110-search-empty,body.single-post .r2-article .wp-block-post-content blockquote) {
  background: var(--r2-dark-raised); color: var(--r2-dark-text); border-color: var(--r2-dark-border);
}
html[data-r2-theme="dark"] .r2-article :is(.is-style-rangers-intro,.r2-auto-intro,.r2-vereniging-lead) :is(h2,h3),
html[data-r2-theme="dark"] .r2-article .r2-auto-intro > .r2-auto-intro__title,
html[data-r2-theme="dark"] .r2-vereniging :where(.wp-block-heading) { color: var(--r2-dark-text); }
html[data-r2-theme="dark"] :is(.r2-v060-fees__note,.r2-v060-fees__age,.r2-recaptcha-disclosure) { color: var(--r2-dark-muted); }
/* Preserve the club's red/blue accent strokes over dark surfaces. */
html[data-r2-theme="dark"] :is(.r2-article .is-style-rangers-intro,.r2-article .r2-news-intro-fallback,
 .r2-vereniging-lead,.r2-v110-search-empty,.r2-foys-guide .r2-foys-lead,
 body.single-post .r2-article .wp-block-post-content blockquote,
 .r2-v060-stats__content,.r2-knbsb-card,.wp-block-group.r2-knbsb-card) { border-left-color: #e21c23; }
html[data-r2-theme="dark"] .r2-membership-fees-callout { border-left-color: #72b5ff; }
/* R2 v1.3.5: two real-world contrast issues reported in the Teams overview and Lid worden. */
html[data-r2-theme="dark"] .r2-foys-teaser {
  background: var(--r2-dark-raised);
  color: var(--r2-dark-text);
  border-left-color: #72b5ff;
}
html[data-r2-theme="dark"] .r2-foys-teaser :is(h2,p) { color: var(--r2-dark-text); }
html[data-r2-theme="dark"] .r2-membership-fees-callout :is(h2,h3,p,strong) {
  color: var(--r2-dark-text);
}
html[data-r2-theme="dark"] .r2-membership-fees-callout a {
  color: var(--r2-dark-link);
}
html[data-r2-theme="dark"] .r2-team-detail__fact { border-top-color: #e21c23; }
html[data-r2-theme="dark"] .r2-practice-card { border-top-color: #6eaeea; }
html[data-r2-theme="dark"] .r2-practice-card:nth-child(2) { border-top-color: #e21c23; }
html[data-r2-theme="dark"] .r2-practice-card:nth-child(3) { border-top-color: #f1b500; }
/* Agreed production Extra CSS fix: training days/times must remain readable in Dark Mode. */
html[data-r2-theme="dark"] .r2-practice-card strong { color: #eef4fa; }
html[data-r2-theme="dark"] .r2-v060-stats__content { background: linear-gradient(110deg, #213449, #182636 85%); }
html[data-r2-theme="dark"] .r2-promo { background: linear-gradient(100deg, #202f40, #182636); }
html[data-r2-theme="dark"] .r2-article .r2-auto-intro > :is(p,.wp-block-group) { color: inherit !important; }
/* Do not recolour sponsor logos or their transparent PNG/WebP pixels. */
html[data-r2-theme="dark"] :is(.r2-sponsor-card,.r2-v043-sponsor-tile) { background: #f8fbff; color: #202b35; border-color: #bfc9d6; }
html[data-r2-theme="dark"] :is(.r2-sponsor-card__name,.r2-v043-sponsor-link span,.r2-v043-sponsor-nolink span,
  .r2-v043-sponsor-link,.r2-v043-sponsor-nolink) { color: #202b35; }
html[data-r2-theme="dark"] .r2-v043-sponsor-link:hover { background: #eaf1f8; }

/* Gutenberg tables, historic Clinics, fees; keep responsive overflow rules. */
html[data-r2-theme="dark"] :is(.wp-block-table table, .wp-block-table td,.wp-block-table th,
  .r2-fees-block-table th,.r2-fees-block-table td,.r2-v060-fees__table th,.r2-v060-fees__table td) {
  color: var(--r2-dark-text); border-color: var(--r2-dark-border);
}
html[data-r2-theme="dark"] .wp-block-table,
html[data-r2-theme="dark"] :is(.r2-fees-block-table,.r2-v060-fees__table) { background: var(--r2-dark-panel); }
html[data-r2-theme="dark"] :is(.r2-fees-block-table thead th,.r2-v060-fees__table thead th,
 .page-id-1185 .r2-article .wp-block-table tbody tr:first-child,body.single-post .r2-article .wp-block-post-content .wp-block-table thead) {
  background: #30445a; color: #f0f5fa;
}
html[data-r2-theme="dark"] :is(.r2-fees-block-table tbody tr:nth-child(even),.r2-v060-fees__table tbody tr:nth-child(even),
  .page-id-1185 .r2-article .wp-block-table tbody tr:nth-child(even)) { background: #202e3d; }
html[data-r2-theme="dark"] :is(.wp-block-table tbody tr,.wp-block-table tbody tr td) { border-color: var(--r2-dark-border); }

/* Forms, including WPForms Lite and the native WP search field, stay legible. */
html[data-r2-theme="dark"] .r2-article :is(input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),textarea,select),
html[data-r2-theme="dark"] .r2-article .wpcf7 input:not([type="submit"]),
html[data-r2-theme="dark"] .r2-article .wpforms-container input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
html[data-r2-theme="dark"] .r2-article .wpforms-container textarea,
html[data-r2-theme="dark"] .r2-article .wpforms-container select {
  background: #152232 !important; color: var(--r2-dark-text) !important; border: 1px solid #73889c !important;
}
html[data-r2-theme="dark"] .r2-article :is(label,legend),
html[data-r2-theme="dark"] .r2-article .wpforms-container :is(.wpforms-field-label,.wpforms-field-sublabel,.wpforms-field-description) { color: var(--r2-dark-text) !important; }
html[data-r2-theme="dark"] :is(input,select,textarea) { accent-color: #e21c23; }
html[data-r2-theme="dark"] .wpforms-container :is(.wpforms-required-label,.wpforms-error),
html[data-r2-theme="dark"] .r2-article .wpforms-container label.wpforms-error { color: #ff979d !important; }
html[data-r2-theme="dark"] .r2-article .wpforms-container button.wpforms-submit { color: #fff !important; background: #e21c23 !important; }
html[data-r2-theme="dark"] :is(.r2-article pre,.r2-article code) { background: #253549; color: #f0f5fa; }
html[data-r2-theme="dark"] :is(.r2-article figcaption, .r2-article .wp-element-caption) { color: var(--r2-dark-muted); }

/* Search page and synthetic placeholders must use the same palette. */
html[data-r2-theme="dark"] .r2-v110-search-heading { color: var(--r2-dark-text); }
html[data-r2-theme="dark"] .r2-v110-search-results .r2-v112-search-placeholder,
html[data-r2-theme="dark"] .r2-v110-search-results .r2-v112-search-placeholder--1,
html[data-r2-theme="dark"] .r2-v110-search-results .r2-v112-search-placeholder--2 {
  background: linear-gradient(125deg, #263d55, #1a293a); color: var(--r2-dark-text);
}
html[data-r2-theme="dark"] .r2-v110-search-results .r2-v112-search-placeholder__monogram { color: #eff6ff; }
html[data-r2-theme="dark"] .r2-v110-search-results .r2-v112-search-placeholder__label { color: #c6d6e7; }
html[data-r2-theme="dark"] .r2-v110-search-results .wp-block-post-excerpt__more-link,
html[data-r2-theme="dark"] .r2-v110-search-results .wp-block-query-pagination a { color: var(--r2-dark-link); }

/* Keep deliberate white-on-red and white-on-blue calls to action readable. */
html[data-r2-theme="dark"] .r2-footer { background: #144f88; }
html[data-r2-theme="dark"] :is(.r2-footer,.r2-footer a,.r2-footer strong,.r2-footer__pending) { color: #fff; }
html[data-r2-theme="dark"] :is(.r2-button--red,.wp-block-button__link,.r2-v110-search-popup button,
 .r2-v110-search-mobile button,.r2-v110-search-page-form .wp-block-search__button) { color: #fff; }
@media (prefers-reduced-motion: reduce) { .r2-v120-theme-trigger { scroll-behavior: auto; } }
