/* Semantic dark surfaces. Purple training cards retain their own light ink. */
:root { color-scheme:light; --rugym-surface-raised:#f0edf7; --rugym-control:#fff; }
html[data-bs-theme=dark] {
  color-scheme:dark;
  --rugym-bg:#14111e;
  --rugym-surface:#201b2c;
  --rugym-surface-raised:#2a2339;
  --rugym-control:#191522;
  --rugym-ink:#f1edf9;
  --rugym-muted:#b2a9c4;
  --rugym-primary:#b5a2ff;
  --rugym-primary-dark:#cebeff;
  --rugym-primary-soft:#34284f;
  --rugym-border:#3b324c;
  --rugym-green:#76d6ac;
  --rugym-green-soft:#193b32;
  --rugym-red:#ff9ba9;
  --rugym-red-soft:#45242f;
  --rugym-orange:#f6c481;
  --rugym-orange-soft:#453421;
  --rugym-shadow:0 18px 50px #0003;
  --bs-body-color:var(--rugym-ink);
  --bs-body-bg:var(--rugym-bg);
  --bs-emphasis-color:var(--rugym-ink);
  --bs-secondary-color:var(--rugym-muted);
  --bs-secondary-bg:var(--rugym-surface-raised);
  --bs-tertiary-bg:var(--rugym-surface-raised);
  --bs-border-color:var(--rugym-border);
  --bs-primary:#b5a2ff;
  --bs-primary-rgb:181,162,255;
  --bs-link-color:var(--rugym-primary);
  --bs-link-hover-color:var(--rugym-primary-dark);
  --bs-heading-color:var(--rugym-ink);
}
/* Filled purple controls need white text, not the lighter purple link token. */
[data-bs-theme=dark] .btn-primary {
  --bs-btn-bg:#7457dd; --bs-btn-border-color:#7457dd;
  --bs-btn-hover-bg:#674acb; --bs-btn-hover-border-color:#674acb;
  --bs-btn-active-bg:#6042c4; --bs-btn-active-border-color:#6042c4;
  --bs-btn-disabled-bg:#7457dd; --bs-btn-disabled-border-color:#7457dd;
  --bs-btn-focus-shadow-rgb:181,162,255;
}
[data-bs-theme=dark] .btn-outline-primary { --bs-btn-hover-color:#1b142a; --bs-btn-active-color:#1b142a; --bs-btn-border-color:#8571b1; }
[data-bs-theme=dark] .btn-light { --bs-btn-bg:#3a2e51; --bs-btn-color:#f1edf9; --bs-btn-border-color:#514265; --bs-btn-hover-bg:#4b3a69; --bs-btn-hover-color:#fff; --bs-btn-hover-border-color:#72608a; }
[data-bs-theme=dark] .btn-soft { background:var(--rugym-primary-soft); color:var(--rugym-primary); }
[data-bs-theme=dark] .btn-soft:hover { background:#45335f; color:var(--rugym-primary-dark); }
[data-bs-theme=dark] .form-control,[data-bs-theme=dark] .form-select { background-color:var(--rugym-control); color:var(--rugym-ink); border-color:var(--rugym-border); }
[data-bs-theme=dark] .form-control::placeholder { color:#9b90ad; opacity:1; }
[data-bs-theme=dark] .form-control:disabled,[data-bs-theme=dark] .form-control[readonly] { background-color:var(--rugym-surface-raised); color:var(--rugym-muted); }
[data-bs-theme=dark] .form-check-input { background-color:var(--rugym-control); border-color:#857594; }
[data-bs-theme=dark] .form-check-input:checked { background-color:#7457dd; border-color:#a28adf; }
[data-bs-theme=dark] .invalid-feedback { color:var(--rugym-red); }
[data-bs-theme=dark] .form-label { color:var(--rugym-ink); }
[data-bs-theme=dark] :is(.registration-agreement > label,.registration-agreement-error,.form-text) { color:var(--rugym-muted); }
[data-bs-theme=dark] .registration-agreement-error { color:var(--rugym-red); }
[data-bs-theme=dark] .modal-content,[data-bs-theme=dark] .offcanvas { background-color:var(--rugym-surface); color:var(--rugym-ink); }
[data-bs-theme=dark] .bg-white,[data-bs-theme=dark] .bg-light { background-color:var(--rugym-surface)!important; }
[data-bs-theme=dark] .text-bg-primary,[data-bs-theme=dark] .bg-primary { background-color:#7457dd!important; color:#fff!important; }
[data-bs-theme=dark] .text-dark { color:var(--rugym-ink)!important; }
[data-bs-theme=dark] .table { --bs-table-bg:var(--rugym-surface); --bs-table-color:var(--rugym-ink); --bs-table-border-color:var(--rugym-border); --bs-table-striped-bg:var(--rugym-surface-raised); --bs-table-striped-color:var(--rugym-ink); --bs-table-hover-bg:var(--rugym-primary-soft); --bs-table-hover-color:var(--rugym-ink); }
[data-bs-theme=dark] .brand-mark { background:linear-gradient(145deg,#826cf0,#6852d6 54%,#4d37b4); }
[data-bs-theme=dark] .skip-link { background:var(--rugym-surface); }
[data-bs-theme=dark] .mobile-nav.mobile-nav-soft { background:#201b2cf5; border-color:var(--rugym-border); box-shadow:0 8px 32px #0005; }
[data-bs-theme=dark] .mobile-nav.mobile-nav-soft a { color:var(--rugym-muted); }
[data-bs-theme=dark] .mobile-nav.mobile-nav-soft a.active { color:var(--rugym-primary); }
[data-bs-theme=dark] .mobile-nav.mobile-nav-soft .mobile-train.active { color:#fff; background:#7457dd; }
/* Avatar palettes keep the chosen hue, with purpose-built dark colour pairs. */
[data-bs-theme=dark] .user-avatar,[data-bs-theme=dark] .avatar-swatch { --avatar-fg:#cebaff; --avatar-bg:#3a2b56; }
[data-bs-theme=dark] .avatar-lavender { --avatar-fg:#dbc4ff; --avatar-bg:#40304f; }
[data-bs-theme=dark] .avatar-indigo { --avatar-fg:#c0c3ff; --avatar-bg:#2b2d52; }
[data-bs-theme=dark] .avatar-blue { --avatar-fg:#a9d0ff; --avatar-bg:#203750; }
[data-bs-theme=dark] .avatar-cyan { --avatar-fg:#98dfdf; --avatar-bg:#203f43; }
[data-bs-theme=dark] .avatar-green { --avatar-fg:#a8e3ba; --avatar-bg:#24432f; }
[data-bs-theme=dark] .avatar-lime { --avatar-fg:#d2df9f; --avatar-bg:#39432a; }
[data-bs-theme=dark] .avatar-amber { --avatar-fg:#f3d598; --avatar-bg:#493d25; }
[data-bs-theme=dark] .avatar-orange { --avatar-fg:#ffc19b; --avatar-bg:#4c3024; }
[data-bs-theme=dark] .avatar-rose { --avatar-fg:#ffb4d3; --avatar-bg:#4b293c; }
[data-bs-theme=dark] .avatar-berry { --avatar-fg:#e8b6e2; --avatar-bg:#482d46; }
[data-bs-theme=dark] .avatar-slate { --avatar-fg:#c1ccde; --avatar-bg:#30384a; }
/* Home */
[data-bs-theme=dark] .home-history-link { background:var(--rugym-surface); }
[data-bs-theme=dark] .home-week-card { border-color:#514168; background:linear-gradient(145deg,#30263f,#292136); }
[data-bs-theme=dark] :is(.home-week-streak,.home-week small,.home-goal-help summary,.home-goal-help p,.home-pending,.home-chart-value) { color:var(--rugym-muted); }
[data-bs-theme=dark] .home-week li > span { background:#40344f; color:#c2b5d4; }
[data-bs-theme=dark] .home-week .done > span,[data-bs-theme=dark] .home-week .is-today.done > span { background:#7457dd; color:#fff; }
[data-bs-theme=dark] .home-week .is-today > span { background:#201a30; color:var(--rugym-primary); }
[data-bs-theme=dark] .home-week-progress { background:#493a5d; }
[data-bs-theme=dark] .home-primary-action { --bs-btn-color:#463259; --bs-btn-bg:#f4eefb; --bs-btn-border-color:#f4eefb; --bs-btn-hover-color:#352653; --bs-btn-hover-bg:#fff; --bs-btn-active-color:#352653; --bs-btn-active-bg:#e5daf6; }
[data-bs-theme=dark] .home-route-link > i:first-child { background:var(--rugym-primary-soft); }
[data-bs-theme=dark] .home-mini-chart i { background:#6b50a0; }
[data-bs-theme=dark] :is(.home-team-card,.achievement-preview-item,.achievement-next,.home-activity-summary,.home-team-empty,.home-summary-link,.recent-history a) { background:var(--rugym-surface-raised); border-color:var(--rugym-border); }
[data-bs-theme=dark] .home-team { background:var(--rugym-surface); border-color:var(--rugym-border); }
[data-bs-theme=dark] :is(.home-team-card h2,.home-team-card strong,.achievement-next-copy > strong) { color:var(--rugym-ink); }
[data-bs-theme=dark] :is(.achievement-preview-item small,.achievement-next-copy > span) { color:var(--rugym-muted); }
/* Profile, achievements and rankings */
[data-bs-theme=dark] :is(.profile-page .profile-hero,.leaderboard-card,.leader-row,.account-footer-card,.profile-help-card,.achievement-card,.achievement-page .achievement-card) { background:var(--rugym-surface); border-color:var(--rugym-border); }
[data-bs-theme=dark] :is(.account-readonly,.setting-row,.achievement-filters,.leaderboard-tabs,.achievement-group,.consent-card,.secret-achievements,.weekly-award-card) { background:var(--rugym-surface-raised); border-color:var(--rugym-border); }
[data-bs-theme=dark] :is(.leader-row.is-me,.achievement-card.locked,.achievement-filter.active,.leaderboard-tabs a.active) { background:var(--rugym-primary-soft); }
[data-bs-theme=dark] :is(.achievement-card h3,.profile-help-card strong,.account-footer-card strong,.leader-copy strong) { color:var(--rugym-ink); }
[data-bs-theme=dark] :is(.achievement-card p,.achievement-card small,.profile-help-card p,.account-footer-card p,.consent-card p) { color:var(--rugym-muted); }
[data-bs-theme=dark] :is(.achievement-page .achievement-card.secret,.weekly-achievement-section) { background:var(--rugym-surface); border-color:var(--rugym-border); }
/* Theory and rich content */
[data-bs-theme=dark] :is(.theory-library .theory-search,.theory-chapter,.theory-library .theory-chapter-head,.theory-library .theory-rule-list,.rule-reading-card,.theory-reader,.theory-reader-main,.theory-sidebar,.rule-article,.theory-article,.theory-toc,.theory-reader-nav,.theory-example,.theory-interactive,.theory-block-example,.theory-block-practice) { background:var(--rugym-surface); border-color:var(--rugym-border); }
[data-bs-theme=dark] :is(.theory-reader .rule-summary,.theory-example,.theory-block-example,.theory-note,.theory-callout,.rule-note,.theory-toc summary) { background:var(--rugym-primary-soft); color:var(--rugym-ink); border-color:var(--rugym-border); }
[data-bs-theme=dark] :is(.theory-rule-copy > strong,.theory-reader h1,.theory-reader h2,.theory-reader h3,.markdown-body,.theory-copy) { color:var(--rugym-ink); }
[data-bs-theme=dark] :is(.theory-rule-copy > span,.theory-chapter-head p,.theory-reader-meta,.theory-reader .lead,.theory-reader p,.theory-toc a) { color:var(--rugym-muted); }
[data-bs-theme=dark] :is(.markdown-body blockquote,.markdown-body pre,.theory-reader pre,.theory-example-text,.theory-interactive-question) { background:var(--rugym-surface-raised); border-color:var(--rugym-border); color:var(--rugym-ink); }
[data-bs-theme=dark] :is(.markdown-body th,.markdown-body td) { border-color:var(--rugym-border); }
[data-bs-theme=dark] .markdown-body th { background:var(--rugym-surface-raised); }
[data-bs-theme=dark] :is(.theory-mobile-topic-nav,.theory-practice-cta,.theory-toc-card,.theory-block-editor,.theory-format-toolbar button,.theory-block-actions button) { background:var(--rugym-surface); border-color:var(--rugym-border); }
[data-bs-theme=dark] :is(.theory-summary,.theory-add-blocks button,.theory-image a) { background:var(--rugym-primary-soft); color:var(--rugym-primary); border-color:var(--rugym-border); }
[data-bs-theme=dark] :is(.theory-summary p,.theory-image figcaption,.theory-example-note,.theory-editor-help,.theory-toc-card a,.theory-practice-cta span) { color:var(--rugym-muted); }
[data-bs-theme=dark] .theory-example-feedback { background:var(--rugym-surface-raised); }
[data-bs-theme=dark] .theory-example-feedback.is-correct { background:var(--rugym-green-soft); color:var(--rugym-green); }
[data-bs-theme=dark] .theory-example-feedback.is-wrong { background:var(--rugym-red-soft); color:var(--rugym-red); }
/* Sessions and error review */
[data-bs-theme=dark] :is(.player-shell,.player-header,.question-card,.feedback-panel,.feedback-card,.feedback-detail-row,.result-list,.result-summary,.result-item,.exit-session-modal .modal-content) { background:var(--rugym-surface); color:var(--rugym-ink); border-color:var(--rugym-border); }
[data-bs-theme=dark] :is(.answer-box,.gap-option,.gap-choice,.punctuation-slot,.punct-slot,.text-gap-input,.gap-select,.question-timer,.player-progress,.feedback-report-form,.feedback-rule-card,.exit-session-note) { background:var(--rugym-control); color:var(--rugym-ink); border-color:var(--rugym-border); }
[data-bs-theme=dark] :is(.answer-box.selected,.gap-option.selected,.gap-choice.selected,.punctuation-slot.selected,.punct-slot.selected) { background:var(--rugym-primary-soft); border-color:var(--rugym-primary); color:var(--rugym-primary); }
[data-bs-theme=dark] :is(.answer-box.correct,.feedback-panel.correct,.feedback-card.correct,.feedback-panel.is-correct,.feedback-detail-row.correct) { background:var(--rugym-green-soft); border-color:#46856b; color:var(--rugym-green); }
[data-bs-theme=dark] :is(.answer-box.wrong,.feedback-panel.wrong,.feedback-card.wrong,.feedback-panel.is-wrong,.feedback-detail-row.wrong) { background:var(--rugym-red-soft); border-color:#9f5968; color:var(--rugym-red); }
[data-bs-theme=dark] :is(.feedback-heading strong,.feedback-heading p,.feedback-detail-row b,.result-item strong,.feedback-rule-card h3) { color:inherit; }
[data-bs-theme=dark] :is(.question-meta,.feedback-detail-row small,.feedback-report-heading span,.feedback-bounty-link,.result-item small) { color:var(--rugym-muted); }
[data-bs-theme=dark] .player-shell .theory-panel { background:var(--rugym-surface); }
[data-bs-theme=dark] :is(.player-actions,.player-actions-surface,.icon-button) { background:var(--rugym-surface); border-color:var(--rugym-border); color:var(--rugym-ink); }
[data-bs-theme=dark] .player-body { background:var(--rugym-bg); }
[data-bs-theme=dark] .player-actions.has-feedback { background:rgba(9,7,16,.65); }
[data-bs-theme=dark] .player-actions.has-feedback .player-actions-surface { background:var(--rugym-surface); }
[data-bs-theme=dark] .answer-option input:checked + .answer-box { background:var(--rugym-primary-soft); color:var(--rugym-primary); }
/* Training setup and trajectories */
[data-bs-theme=dark] :is(.setup-mode-card,.mode-card,.topic-choice,.size-choice,.training-size,.training-summary,.setup-card,.training-settings,.training-section,.learning-choice,.path-catalog-card,.path-overview,.path-node-card,.path-explainer,.path-training-link,.path-discovery-link) { background:var(--rugym-surface); border-color:var(--rugym-border); color:var(--rugym-ink); }
[data-bs-theme=dark] :is(.mode-card.active,.mode-card:has(input:checked),.topic-choice:has(input:checked),.size-choice:has(input:checked),.learning-choice a.active,.path-theory,.path-session-outcome,.path-stage-phases span.active) { background:var(--rugym-primary-soft); color:var(--rugym-primary); border-color:var(--rugym-primary); }
[data-bs-theme=dark] :is(.path-catalog-card p,.path-card-stages,.path-progress-label,.path-next-label,.path-lock-note,.path-check-condition,.path-node-result,.path-explainer > div,.path-discovery-link small,.learning-choice a) { color:var(--rugym-muted); }
[data-bs-theme=dark] :is(.path-training-link b,.path-discovery-link b,.path-next-label strong,.path-overview-top strong) { color:var(--rugym-ink); }
[data-bs-theme=dark] :is(.path-node.locked .path-node-card,.path-stage-phases span,.personalization-breakdown > div) { background:var(--rugym-surface-raised); color:var(--rugym-muted); }
[data-bs-theme=dark] :is(.path-track,.path-node-circle) { background:var(--rugym-surface-raised); border-color:var(--rugym-bg); }
[data-bs-theme=dark] .path-node:before { background:var(--rugym-border); }
[data-bs-theme=dark] :is(.training-setup-v2 .mode-toggle label > span,.training-setup-v2 .size-options label > span,.topic-select-card > span,.start-session-dock,.path-dashboard-card) { background:var(--rugym-surface); color:var(--rugym-ink); border-color:var(--rugym-border); }
[data-bs-theme=dark] :is(.training-setup-v2 .mode-toggle input:checked + span,.training-setup-v2 .size-options input:checked + span,.topic-select-card input:checked + span) { background:var(--rugym-primary-soft); color:var(--rugym-primary); }
[data-bs-theme=dark] .training-setup-v2 .size-options input:disabled + span { background:var(--rugym-surface-raised); color:var(--rugym-muted); }
/* Analytics: grid, labels, selection and calendar levels remain distinguishable. */
[data-bs-theme=dark] :is(.analytics-surface,.analytics-workspace .overview-kpis article,.next-step-card,.history-session,.history-session-card,.history-session-row,.mistake-entry,.mistake-card,.history-toolbar,.journal-filter-bar) { background:var(--rugym-surface); border-color:var(--rugym-border); }
[data-bs-theme=dark] :is(.analytics-period,.chart-metric-switch,.chart-selection,.chart-day-detail,.metric-definition-grid article,.history-filter-tabs,.history-status-tabs,.history-attempt-row,.mistake-entry-content,.history-session-content,.bank-coverage,.topic-mastery-row) { background:var(--rugym-surface-raised); border-color:var(--rugym-border); }
[data-bs-theme=dark] :is(.analytics-period button,.chart-metric-switch button,.chart-selection,.history-session-meta,.history-filter-tabs a,.history-status-tabs a) { color:var(--rugym-muted); }
[data-bs-theme=dark] :is(.analytics-period button.active,.chart-metric-switch button.active,.history-filter-tabs a.active,.history-status-tabs a.active) { background:var(--rugym-primary-soft); color:var(--rugym-primary); }
[data-bs-theme=dark] .analytics-workspace .chart-grid { stroke:var(--rugym-border); }
[data-bs-theme=dark] .analytics-workspace :is(.chart-label,.chart-axis-label) { fill:var(--rugym-muted); }
[data-bs-theme=dark] .analytics-accuracy-dot { fill:var(--rugym-surface); }
[data-bs-theme=dark] .heatmap-day { background:var(--rugym-surface-raised); color:var(--rugym-muted); border-color:var(--rugym-border); }
[data-bs-theme=dark] .heatmap-day.level-1 { background:#453259; color:#ecddff; }
[data-bs-theme=dark] .heatmap-day.level-2 { background:#60467d; color:#fff; }
[data-bs-theme=dark] .heatmap-day.level-3 { background:#8060a8; color:#fff; }
[data-bs-theme=dark] .heatmap-day.level-4 { background:#ac84e2; color:#1e152e; }
[data-bs-theme=dark] :is(.heatmap-hint,.heatmap-footer,.metric-definition-grid p,.metric-definitions summary small,.bank-coverage p,.chart-day-detail p) { color:var(--rugym-muted); }
[data-bs-theme=dark] :is(.learning-nav,.history-items-disclosure) { background:var(--rugym-surface); border-color:var(--rugym-border); }
/* Teams */
[data-bs-theme=dark] .team-hub { --team-line:var(--rugym-border); --team-soft:var(--rugym-surface-raised); }
[data-bs-theme=dark] :is(.team-panel,.team-top-link,.team-about p,.team-hub .team-metric-grid article,.team-hub .team-member-card,.team-goal-card,.member-accuracy-ring > span,.team-invite-card,.team-empty-card,.team-create-card,.team-form-card,.team-join-card) { background:var(--rugym-surface); border-color:var(--rugym-border); }
[data-bs-theme=dark] :is(.team-hub .member-insights[open] > .member-head,.team-hub .team-member-card.is-disabled,.member-stat-grid > div,.member-week-bars,.team-goal-contributors > div,.invite-share-box,.team-goal-progress) { background:var(--rugym-surface-raised); border-color:var(--rugym-border); }
[data-bs-theme=dark] :is(.member-day-status.is-done,.member-answer-results > span.is-correct > i,.team-today.is-complete > strong) { color:var(--rugym-green); }
[data-bs-theme=dark] :is(.team-today.is-complete,.team-today.is-complete .team-today-icon) { background:var(--rugym-green-soft); }
[data-bs-theme=dark] :is(.member-stat-grid dt,.team-roster-hint,.member-answer-results > small,.team-goal-card p) { color:var(--rugym-muted); }
[data-bs-theme=dark] .member-accuracy-ring { background:conic-gradient(#76d6ac var(--accuracy),var(--rugym-border) 0); }
[data-bs-theme=dark] :is(.team-today,.member-detail-panel,.team-awards article,.team-danger-action) { background:var(--rugym-surface-raised); border-color:var(--rugym-border); }
[data-bs-theme=dark] .team-danger-action { color:var(--rugym-red); }
/* Public pages and legal reading */
[data-bs-theme=dark] :is(.auth-card,.legal-article,.public-card,.public-form-card,.public-team-card,.project-team-card,.content-review-card,.public-contact-card,.public-affiliation,.public-receipt,.public-values article,.public-feature-card,.interactive-demo,.landing-main .choice-demo,.landing-feature-card,.landing-route-card,.landing-results-card,.landing-step-card) { background:var(--rugym-surface); border-color:var(--rugym-border); }
[data-bs-theme=dark] .landing-main .landing-hero-v2 { background:var(--rugym-bg); }
[data-bs-theme=dark] .landing-main .bento-large { background:var(--rugym-primary-soft); }
[data-bs-theme=dark] .landing-main .bento-card:not(.bento-large):not(.bento-purple) { background:none; }
[data-bs-theme=dark] .landing-main .bento-purple { background:#3d2d62; }
[data-bs-theme=dark] .landing-main .bento-purple h3 { color:#fff; }
[data-bs-theme=dark] .landing-main .bento-purple p { color:#f4eefb; }
[data-bs-theme=dark] .landing-main .landing-route li { background:none; }
[data-bs-theme=dark] :is(.landing-demo-feedback,.landing-step,.public-form-note,.legal-related,.public-feedback-help,.legal-toc,.project-affiliation) { background:var(--rugym-surface-raised); border-color:var(--rugym-border); }
[data-bs-theme=dark] :is(.legal-meta,.legal-toc nav a,.public-card p,.public-team-card p,.public-form-card p,.content-review-card p,.content-review-card li,.landing-demo-feedback,.landing-feature-card p) { color:var(--rugym-muted); }
[data-bs-theme=dark] :is(.landing-main .choice-demo.selected,.landing-demo-feedback.correct) { background:var(--rugym-green-soft); color:var(--rugym-green); }
[data-bs-theme=dark] :is(.landing-main .choice-demo.wrong,.landing-demo-feedback.wrong) { background:var(--rugym-red-soft); color:var(--rugym-red); }
[data-bs-theme=dark] [data-demo-state=correct] .landing-demo-feedback { background:var(--rugym-green-soft); border-color:var(--rugym-green); color:var(--rugym-green); }
[data-bs-theme=dark] [data-demo-state=wrong] .landing-demo-feedback { background:var(--rugym-red-soft); border-color:var(--rugym-red); color:var(--rugym-red); }
[data-bs-theme=dark] [data-demo-state=correct] :is(.landing-demo-feedback strong,.demo-gap) { color:var(--rugym-green); }
[data-bs-theme=dark] [data-demo-state=wrong] :is(.landing-demo-feedback strong,.demo-gap) { color:var(--rugym-red); }
[data-bs-theme=dark] :is(.project-footer,.app-project-footer,.public-footer) { background:var(--rugym-bg); border-color:var(--rugym-border); }
[data-bs-theme=dark] :is(.public-story,.project-team-list,.bento-card,.landing-community,.content-review-guide,.learning-path-section) { background:var(--rugym-surface); border-color:var(--rugym-border); }
[data-bs-theme=dark] :is(.landing-how-list li,.team-craft > span) { background:var(--rugym-surface-raised); border-color:var(--rugym-border); }
[data-bs-theme=dark] :is(.public-story p,.public-prose ul,.project-team-member > p,.project-affiliation p,.public-agreement span,.public-faq > p,.app-project-footer span,.app-project-footer a,.content-review-guide p,.content-review-guide li,.legal-main .legal-article > section p) { color:var(--rugym-muted); }
/* Administration */
[data-bs-theme=dark] :is(.admin-nav,.admin-mobile-menu,.admin-surface,.admin-panel,.admin-stat-card,.admin-metric-card,.admin-quick-stats,.admin-user-card,.admin-list,.admin-list-row,.admin-exercise-row,.admin-report-row,.admin-filter-disclosure,.admin-filter-panel,.admin-bulk-toolbar,.admin-bank-status,.admin-bank-card,.admin-chart-card,.admin-form-card,.admin-form-section,.admin-detail-card,.admin-user-summary,.admin-user-hero,.admin-kpi,.admin-table-wrap,.admin-form-section .card) { background:var(--rugym-surface); border-color:var(--rugym-border); }
[data-bs-theme=dark] :is(.admin-quick-stats a,.admin-user-metrics,.admin-stat-grid,.admin-quality-metrics,.admin-bank-totals,.admin-status-tabs,.admin-metric-grid,.admin-activity-row,.admin-user-overview,.admin-audit-row,.admin-code-preview,.admin-import-example,.payload-editor,.admin-sidebar,.admin-empty-state) { background:var(--rugym-surface-raised); border-color:var(--rugym-border); }
[data-bs-theme=dark] :is(.admin-nav a,.admin-filter-disclosure summary,.admin-status-tabs a,.admin-quick-stats a,.admin-user-metrics small,.admin-exercise-meta,.admin-list-row p,.admin-activity-row small,.admin-bank-status small) { color:var(--rugym-muted); }
[data-bs-theme=dark] :is(.admin-nav a.active,.admin-quick-stats a.active,.admin-status-tabs a.active) { background:var(--rugym-primary-soft); color:var(--rugym-primary); }
[data-bs-theme=dark] :is(.admin-list-row strong,.admin-user-summary strong,.admin-user-metrics b,.admin-metric-card strong,.admin-quick-stats strong,.admin-filter-disclosure summary strong) { color:var(--rugym-ink); }
[data-bs-theme=dark] :is(.admin-row-actions a,.admin-row-actions button,.admin-pagination a,.page-link) { background:var(--rugym-surface-raised); border-color:var(--rugym-border); color:var(--rugym-primary); }
[data-bs-theme=dark] .page-item.active .page-link { background:#7457dd; color:#fff; }
[data-bs-theme=dark] .admin-page { --admin-muted:var(--rugym-muted); --admin-line:var(--rugym-border); }
[data-bs-theme=dark] :is(.admin-desktop-nav.admin-nav a,.admin-period,.admin-overview-kpis,.admin-bank-counts a,.admin-retention-grid article,.admin-status-strip,.admin-user-list,.admin-exercise-list,.admin-report-list,.admin-inbox-tabs,.admin-record-meta) { background:var(--rugym-surface); border-color:var(--rugym-border); color:var(--rugym-muted); }
[data-bs-theme=dark] :is(.admin-desktop-nav.admin-nav a.active,.admin-period a.active,.admin-status-strip a.active,.admin-inbox-tabs a.active) { background:var(--rugym-primary-soft); color:var(--rugym-primary); }
[data-bs-theme=dark] .admin-menu-links a { background:var(--rugym-surface-raised); color:var(--rugym-ink); }
[data-bs-theme=dark] .admin-menu-links a.active { background:#7457dd; color:#fff; }
[data-bs-theme=dark] :is(.admin-mobile-bar b,.admin-inbox-tabs a) { color:var(--rugym-muted); border-color:var(--rugym-border); }
[data-bs-theme=dark] .admin-menu-trigger { background:var(--rugym-surface); border-color:var(--rugym-border); }
[data-bs-theme=dark] .team-hub .team-week { background:linear-gradient(145deg,#30263f,#292136); border-color:#514168; }
[data-bs-theme=dark] :is(.team-today-icon,.team-goal-icon,.team-weekly-award-icon,.team-award-icon) { background:var(--rugym-primary-soft); color:var(--rugym-primary); }
[data-bs-theme=dark] .team-award-date { color:var(--rugym-green); }
[data-bs-theme=dark] :is(.team-track,.team-goal-track) { background:var(--rugym-surface-raised); }
[data-bs-theme=dark] :is(.chart-day-detail > button,.achievement-filters button) { background:var(--rugym-surface); color:var(--rugym-primary); }
[data-bs-theme=dark] .chart-day-detail > button:disabled { background:var(--rugym-surface-raised); color:var(--rugym-muted); }
[data-bs-theme=dark] .achievement-filters button.active { background:#7457dd; border-color:#7457dd; color:#fff; }
[data-bs-theme=dark] :is(.achievement-next-link,.achievement-collection-link) { background:var(--rugym-primary-soft); color:var(--rugym-primary); border-color:var(--rugym-border); }
[data-bs-theme=dark] :is(.landing-demo-meta,.public-loop small) { color:var(--rugym-muted); }
[data-bs-theme=dark] :is(.achievement-next-card,.achievement-next-arrow,.landing-route li,.personalization-breakdown > span) { background:var(--rugym-surface-raised); border-color:var(--rugym-border); color:var(--rugym-ink); }
[data-bs-theme=dark] :is(.achievement-preview-item.is-locked strong,.personalization-breakdown,.path-node-caption,.path-node.locked h2,.path-node-caption span,.admin-bank-alert) { color:var(--rugym-muted); }
[data-bs-theme=dark] :is(.history-row-status.completed,.history-status.completed) { background:var(--rugym-green-soft); color:var(--rugym-green); }
[data-bs-theme=dark] :is(.heatmap-scale i:first-of-type) { background:var(--rugym-surface-raised); }
[data-bs-theme=dark] .heatmap-scale i:nth-of-type(2) { background:#453259; }
[data-bs-theme=dark] .heatmap-scale i:nth-of-type(3) { background:#60467d; }
[data-bs-theme=dark] .heatmap-scale i:nth-of-type(4) { background:#8060a8; }
[data-bs-theme=dark] .heatmap-scale i:nth-of-type(5) { background:#ac84e2; }
[data-bs-theme=dark] :is(.landing-route li span,.landing-community p,.personalization-breakdown small,.history-explanation p,.history-explanation small,.mistake-explanation p,.mistake-explanation small,.path-dashboard-card p,.path-overview-top span:not(.path-card-icon)) { color:var(--rugym-muted); }
[data-bs-theme=dark] :is(.public-contact-link,.public-faq,.result-card,.invite-join-card,.invite-team-meta,.admin-access-panel,.invitation-row,.path-admin-row,.path-editor-step,.path-rule-option) { background:var(--rugym-surface); border-color:var(--rugym-border); }
[data-bs-theme=dark] :is(.admin-event-details dl,.admin-fingerprint-details dl,.admin-page pre) { background:var(--rugym-surface-raised); border-color:var(--rugym-border); }
[data-bs-theme=dark] :is(.admin-fingerprint-id small,.admin-fingerprint-confidence,.report-explanation p,.path-editor-note,.invite-join-card p,.invite-team-meta span) { color:var(--rugym-muted); }
[data-bs-theme=dark] .public-form-privacy { color:var(--rugym-muted)!important; }
[data-bs-theme=dark] :is(.admin-fingerprint-components summary span,.path-admin-row small,.public-contact-link small) { color:var(--rugym-muted); }
[data-bs-theme=dark] .admin-page dl { background-color:var(--rugym-surface-raised); border-color:var(--rugym-border); }
[data-bs-theme=dark] pre,[data-bs-theme=dark] code { color:#d9baff; }
[data-bs-theme=dark] .onboarding-card { background:var(--rugym-surface); color:var(--rugym-ink); border-color:var(--rugym-border); }
[data-bs-theme=dark] :is(.tour-section-grid > div,.tour-tip-list li) { background:var(--rugym-surface-raised); color:var(--rugym-ink); }
@media(prefers-reduced-motion:reduce) { [data-bs-theme=dark] * { scroll-behavior:auto; } }
