/* FingerWPM v34 — final dark-mode contrast safety layer.
   Loaded LAST so legacy light-theme declarations cannot cover dark text/surfaces. */

html.theme-dark,
html.theme-dark body,
body.theme-dark{
  color-scheme:dark;
  --bg:#111827;
  --text:#f3f7fc;
  --muted:#b4c0d0;
  --line:#41516a;
  --accent:#8eabff;
  --accent-soft:#263b64;
  --good:#4ade80;
  --bad:#ff7b83;
  --paper:#182235;
}
html.theme-dark body,body.theme-dark{background:#111827;color:var(--text)}
html.theme-dark ::selection{background:#3858a8;color:#fff}
html.theme-dark :focus-visible{outline-color:#8eabff}

/* Shared controls / menus. */
html.theme-dark button,
html.theme-dark input,
html.theme-dark textarea,
html.theme-dark select{color-scheme:dark}
html.theme-dark input::placeholder,
html.theme-dark textarea::placeholder{color:#8797ad;opacity:1}
html.theme-dark option{background:#182235;color:#f3f7fc}
html.theme-dark .simple-select,
html.theme-dark .history-filters select,
html.theme-dark .leaderboard-filters select,
html.theme-dark .profile-form input,
html.theme-dark .profile-form textarea,
html.theme-dark .profile-form select,
html.theme-dark .profile-chart-controls select,
html.theme-dark .public-chart-controls select,
html.theme-dark .standalone-language select{
  background-color:#182235!important;
  border-color:#4a5b73!important;
  color:#f3f7fc!important;
}
html.theme-dark .simple-select:hover,
html.theme-dark .history-filters select:hover,
html.theme-dark .profile-chart-controls select:hover,
html.theme-dark .public-chart-controls select:hover{background-color:#1e2b40!important}

/* Main typing page: results, analytics, auth, FAQ and subpage overlays. */
html.theme-dark .toolbar,
html.theme-dark .select-label,
html.theme-dark .stat-label,
html.theme-dark .results-sub,
html.theme-dark .section-title span,
html.theme-dark .metric-label,
html.theme-dark .chart-detail-label,
html.theme-dark .chart-detail-item small,
html.theme-dark .legend,
html.theme-dark .mini-label,
html.theme-dark .empty-errors,
html.theme-dark .cert-copy p,
html.theme-dark .cert-form label,
html.theme-dark .history-head p,
html.theme-dark .history-status,
html.theme-dark .history-note,
html.theme-dark .leaderboard-head p,
html.theme-dark .leaderboard-status,
html.theme-dark .leaderboard-note,
html.theme-dark .leaderboard-columns,
html.theme-dark .leaderboard-identity small{color:#b4c0d0!important}
html.theme-dark .summary,
html.theme-dark .summary strong,
html.theme-dark .results h2,
html.theme-dark .metric-value,
html.theme-dark .section-title h3,
html.theme-dark .chart-detail-item strong,
html.theme-dark .history-head h2,
html.theme-dark .history-guest strong,
html.theme-dark .history-summary strong,
html.theme-dark .leaderboard-head h2,
html.theme-dark .leaderboard-rank,
html.theme-dark .leaderboard-value{color:#f3f7fc!important}
html.theme-dark .chart-wrap,
html.theme-dark .error-summary,
html.theme-dark .history-guest,
html.theme-dark .history-summary article,
html.theme-dark .history-table-wrap,
html.theme-dark .certificate-mode-result{
  background:#172235!important;
  border-color:#41516a!important;
  color:#eef4fb!important;
}
html.theme-dark .retry-btn,
html.theme-dark .history-refresh,
html.theme-dark .history-pagination button,
html.theme-dark .leaderboard-refresh{
  background:#182235!important;
  border-color:#4a5b73!important;
  color:#eef4fb!important;
}
html.theme-dark .retry-btn:hover,
html.theme-dark .history-refresh:hover,
html.theme-dark .history-pagination button:hover,
html.theme-dark .leaderboard-refresh:hover{background:#22314a!important;color:#b9c9ff!important}
html.theme-dark .error-table th,
html.theme-dark .error-table td{border-color:#3b4a60!important}
html.theme-dark .status-deleted{background:#173b30!important;color:#7ee2b8!important}
html.theme-dark .status-open{background:#482329!important;color:#ffadb2!important}
html.theme-dark .status-missed{background:#44371d!important;color:#f3cf72!important}
html.theme-dark .name-input{background:#182235!important;border-color:#4a5b73!important;color:#f3f7fc!important}

/* Privacy/tap veil: dark in dark mode, readable, never a bright slab. */
html.theme-dark #words-container.typing-privacy-locked::after{
  background:rgba(17,24,39,.94)!important;
  color:#c3cede!important;
}
html.theme-dark #typing-board-canvas{background:var(--bg)!important}

/* Auth surfaces. */
html.theme-dark .auth-card,
html.theme-dark .auth-user-menu{background:#182235!important;border-color:#4a5b73!important;color:#f3f7fc!important}
html.theme-dark .auth-field>span,
html.theme-dark .auth-form h2,
html.theme-dark .auth-user-name{color:#f3f7fc!important}
html.theme-dark .auth-intro,
html.theme-dark .auth-field small,
html.theme-dark .auth-user-email,
html.theme-dark .auth-switch,
html.theme-dark .auth-password-toggle,
html.theme-dark .auth-user-chevron{color:#b4c0d0!important}
html.theme-dark .auth-field input{background:#111b2a!important;border-color:#4a5b73!important;color:#f3f7fc!important}
html.theme-dark .auth-tabs{background:#111b2a!important}
html.theme-dark .auth-tab{color:#b4c0d0!important}
html.theme-dark .auth-tab.is-active{background:#2a3e66!important;color:#c5d2ff!important}

/* FAQ/about/help surfaces that still contain hard-coded light colors. */
html.theme-dark .faq-item{background:#182235!important;border-color:#41516a!important}
html.theme-dark .faq-item h3{color:#f3f7fc!important}
html.theme-dark .faq-item p{color:#b8c5d5!important}
html.theme-dark .subpage-overlay,
html.theme-dark .subpage-panel,
html.theme-dark .subpage-content{background:#111827!important;color:#f3f7fc!important}
html.theme-dark .subpage-header{border-color:#41516a!important}
html.theme-dark .subpage-back,
html.theme-dark .subpage-content h1,.subpage-content h2{color:#f3f7fc!important}
html.theme-dark .subpage-content>p{color:#bcc8d8!important}
html.theme-dark .subpage-divider{background:#41516a!important}
html.theme-dark .info-copy,
html.theme-dark .info-copy p{color:#bcc8d8!important}

/* Private profile: force every light-only surface to a dark equivalent. */
html.theme-dark .profile-page-body{
  --pf-ink:#f3f7fc;
  --pf-muted:#b4c0d0;
  --pf-line:#41516a;
  --pf-bg:#111827;
  --pf-soft:#182235;
  color:#f3f7fc!important;
}
html.theme-dark .profile-identity h1,
html.theme-dark .profile-level-copy>strong,
html.theme-dark .profile-metrics strong,
html.theme-dark .profile-section-heading h2,
html.theme-dark .profile-history-heading h2,
html.theme-dark .profile-insight-head h3,
html.theme-dark .skill-row strong,
html.theme-dark .achievement-copy strong,
html.theme-dark .certificate-copy h3,
html.theme-dark .profile-form label>span{color:#f3f7fc!important}
html.theme-dark .profile-handle,
html.theme-dark .profile-kicker,
html.theme-dark .profile-history-heading>span,
html.theme-dark .profile-section-count strong,
html.theme-dark .profile-level-ring strong,
html.theme-dark .profile-level-xp{color:#9db5ff!important}
html.theme-dark .profile-level-ring span,
html.theme-dark .profile-level-copy>span,
html.theme-dark .profile-level-copy small,
html.theme-dark .profile-metrics span,
html.theme-dark .profile-metrics small,
html.theme-dark .profile-section-heading p,
html.theme-dark .profile-history-heading p,
html.theme-dark .profile-section-count span,
html.theme-dark .profile-chart-summary span,
html.theme-dark .profile-journey-strip small,
html.theme-dark .profile-record-breakdown span,
html.theme-dark .profile-formula-note,
html.theme-dark .profile-photo-help,
html.theme-dark .profile-toggle-row small{color:#b4c0d0!important}
html.theme-dark .profile-analytics-section .profile-section-heading,
html.theme-dark .profile-chart-summary,
html.theme-dark .profile-chart-summary>div:not(:last-child),
html.theme-dark .profile-chart-details,
html.theme-dark .profile-journey-strip,
html.theme-dark .profile-record-breakdown>div,
html.theme-dark .profile-insight-grid,
html.theme-dark .profile-toggle-row,
html.theme-dark .profile-section,
html.theme-dark .profile-metrics{border-color:#41516a!important}
html.theme-dark .profile-chart-wrap{
  background:linear-gradient(180deg,#18243a,#141f30)!important;
  border-color:#41516a!important;
}
html.theme-dark .profile-chart-details{background:#141f30!important}
html.theme-dark .profile-chart-switch{background:#111b2a!important}
html.theme-dark .profile-chart-switch button{color:#b4c0d0!important}
html.theme-dark .profile-chart-switch button.is-active{background:#2a3e66!important;color:#c5d2ff!important}
html.theme-dark .profile-sidebar-overview{background:linear-gradient(145deg,#18243a,#171d2d)!important;border-color:#41516a!important;color:#f3f7fc!important}
html.theme-dark .profile-secondary-action,
html.theme-dark .profile-icon-action,
html.theme-dark .profile-photo-button{background:#182235!important;border-color:#4a5b73!important;color:#e7eef8!important}
html.theme-dark .profile-member-pill{background:#202c3e!important;color:#c2ccda!important}
html.theme-dark .profile-online-pill{background:#153a31!important;color:#8ce7c1!important}
html.theme-dark .profile-next-achievement{background:linear-gradient(90deg,#251f3b,#171d2d)!important;color:#f3f7fc!important}
html.theme-dark .profile-pending-certificates{background:#3b311c!important;border-color:#80672e!important;color:#f4d98b!important}
html.theme-dark .profile-privacy-controls legend{border-color:#41516a!important;color:#9db5ff!important}
html.theme-dark .profile-history .history-filters{background:linear-gradient(90deg,#172235,#151f30)!important;border-color:#41516a!important}

/* Journey icon chips had !important light gradients; override them after profile CSS. */
html.theme-dark .profile-journey-strip .journey-icon-streak,
html.theme-dark .public-journey-strip .journey-icon-streak{background:#3a281d!important;border-color:#6c4327!important;color:#ff9b57!important}
html.theme-dark .profile-journey-strip .journey-icon-days,
html.theme-dark .public-journey-strip .journey-icon-days{background:#163247!important;border-color:#285f7c!important;color:#64c7f5!important}
html.theme-dark .profile-journey-strip .journey-icon-time,
html.theme-dark .public-journey-strip .journey-icon-time,
html.theme-dark .public-journey-strip .journey-icon-speed{background:#292240!important;border-color:#56468a!important;color:#b79aff!important}
html.theme-dark .profile-journey-strip .journey-icon-award{background:#3a321b!important;border-color:#6f5a27!important;color:#f3cc58!important}
html.theme-dark .public-journey-strip .journey-icon-accuracy{background:#15392f!important;border-color:#2c6d58!important;color:#70dfb6!important}

/* Public profile. */
html.theme-dark .public-profile-body{
  --pp-ink:#f3f7fc;
  --pp-muted:#b4c0d0;
  --pp-line:#41516a;
  --pp-bg:#111827;
  color:#f3f7fc!important;
}
html.theme-dark .public-identity h1,
html.theme-dark .public-level-title,
html.theme-dark .public-metrics strong,
html.theme-dark .public-section-head h2,
html.theme-dark .public-insight-head h3,
html.theme-dark .public-skill-breakdown .skill-row strong,
html.theme-dark .public-profile-body .achievement-copy strong,
html.theme-dark .public-profile-body .certificate-copy h3{color:#f3f7fc!important}
html.theme-dark .public-kicker,
html.theme-dark .public-level-xp,
html.theme-dark .public-section-head>div>span,
html.theme-dark .public-section-total{color:#9db5ff!important}
html.theme-dark .public-identity>p,
html.theme-dark .public-bio,
html.theme-dark .public-level-copy>span,
html.theme-dark .public-level-copy small,
html.theme-dark .public-metrics span,
html.theme-dark .public-metrics small,
html.theme-dark .public-section-head p,
html.theme-dark .public-chart-summary span,
html.theme-dark .public-journey-strip small,
html.theme-dark .public-formula-note,
html.theme-dark .public-profile-body .achievement-copy p,
html.theme-dark .public-profile-body .achievement-copy small{color:#b4c0d0!important}
html.theme-dark .public-analytics-section .public-section-head,
html.theme-dark .public-chart-summary,
html.theme-dark .public-chart-summary>div:not(:last-child),
html.theme-dark .public-chart-details,
html.theme-dark .public-journey-strip,
html.theme-dark .record-breakdown>div,
html.theme-dark .public-insight-grid,
html.theme-dark .public-section,
html.theme-dark .public-metrics{border-color:#41516a!important}
html.theme-dark .public-chart-wrap{
  background:linear-gradient(180deg,#18243a,#141f30)!important;
  border-color:#41516a!important;
}
html.theme-dark .public-chart-details{background:#141f30!important;border-color:#41516a!important}
html.theme-dark .public-profile-body .chart-detail-row{border-color:#41516a!important}
html.theme-dark .public-chart-switch{background:#111b2a!important}
html.theme-dark .public-chart-switch button{color:#b4c0d0!important}
html.theme-dark .public-chart-switch button.is-active{background:#2a3e66!important;color:#c5d2ff!important}
html.theme-dark .public-level-number{background:linear-gradient(145deg,#18263e,#29213e)!important;border-color:#4a5b73!important;color:#f3f7fc!important}
html.theme-dark .public-share{background:#182235!important;border-color:#4a5b73!important;color:#eef4fb!important}
html.theme-dark .public-table-wrap{background:#141f30!important;border-color:#41516a!important}
html.theme-dark .public-table-wrap th{background:#1c293c!important;color:#c1ccda!important}
html.theme-dark .public-table-wrap td{color:#edf3fb!important}
html.theme-dark .public-history-pagination button{background:#182235!important;border-color:#4a5b73!important;color:#eef4fb!important}

/* SVG/chart contrast. */
html.theme-dark .chart-grid,
html.theme-dark .profile-profile-chart .chart-grid,
html.theme-dark .public-performance-chart .chart-grid{stroke:#41516a!important}
html.theme-dark .chart-axis-label,
html.theme-dark .chart-x-label{fill:#aebbd0!important}
html.theme-dark .chart-dot{fill:#111827!important}
html.theme-dark .chart-last-dot{stroke:#111827!important}

/* Resource/guide pages: no inherited light-only text or panels. */
html.theme-dark body[data-resource-page]{--bg:#111827;--surface:#182235;--text:#f3f7fc;--muted:#b4c0d0;--line:#41516a;--accent:#8eabff}
html.theme-dark body[data-resource-page] .site-head{background:rgba(17,24,39,.96)!important;border-color:#41516a!important}
html.theme-dark body[data-resource-page] .nav a,
html.theme-dark body[data-resource-page] .breadcrumbs,
html.theme-dark body[data-resource-page] .lead,
html.theme-dark body[data-resource-page] .article p,
html.theme-dark body[data-resource-page] .article li,
html.theme-dark body[data-resource-page] .side a,
html.theme-dark body[data-resource-page] .site-foot-inner{color:#bcc8d8!important}
html.theme-dark body[data-resource-page] h1,
html.theme-dark body[data-resource-page] .article h2,
html.theme-dark body[data-resource-page] .article h3,
html.theme-dark body[data-resource-page] .side h2{color:#f3f7fc!important}
html.theme-dark body[data-resource-page] .note,
html.theme-dark body[data-resource-page] .side{background:#182235!important;border-color:#41516a!important;color:#edf3fb!important}
html.theme-dark body[data-resource-page] .cta.secondary{background:#182235!important;border-color:#4a5b73!important;color:#eef4fb!important}

/* Certificate screen only. The printed certificate stays light below. */
html.theme-dark .certificate-page-body{background:#0f1724!important;color:#f3f7fc!important}
html.theme-dark .certificate-page-body #cert-status{color:#b9c6d8!important}
html.theme-dark .certificate-page-body .cert-card{background:#152033!important}
html.theme-dark .certificate-page-body .cert-frame{background:radial-gradient(circle at 50% 45%,#1c2a3e 0,#172235 56%,#111b2a 100%)!important;color:#f3f7fc!important}
html.theme-dark .certificate-page-body .cert-recipient p,
html.theme-dark .certificate-page-body .cert-motto,
html.theme-dark .certificate-page-body .cert-details small,
html.theme-dark .certificate-page-body .verify-copy small,
html.theme-dark .certificate-page-body .verify-copy p{color:#b9c6d8!important}
html.theme-dark .certificate-page-body .cert-performance,
html.theme-dark .certificate-page-body .cert-details>div{background:#172235!important;border-color:#4a5b73!important;color:#eef4fb!important}
html.theme-dark .certificate-page-body .cert-actions a,
html.theme-dark .certificate-page-body .standalone-language{background:#182235!important;color:#b9c9ff!important;border-color:#4a5b73!important}

/* Social/footer controls. */
html.theme-dark .global-social-follow{border-color:#41516a!important}
html.theme-dark .global-social-label{color:#b4c0d0!important}
html.theme-dark .global-social-follow .social-icon,
html.theme-dark .resource-social .social-icon{background:#182235!important;border-color:#4a5b73!important;color:#edf3fb!important}

/* Disabled elements remain visible instead of disappearing into dark surfaces. */
html.theme-dark button:disabled,
html.theme-dark select:disabled,
html.theme-dark input:disabled{opacity:.62}

@media print{
  /* Never let screen dark-mode overrides contaminate the printable certificate. */
  html.theme-dark .certificate-page-body{background:#fff!important;color:#071b3d!important}
  html.theme-dark .certificate-page-body .cert-card{background:#fff!important}
  html.theme-dark .certificate-page-body .cert-frame{background:radial-gradient(circle at 50% 45%,#fff 0,#fff 55%,#f8fbff 100%)!important;color:#071b3d!important}
  html.theme-dark .certificate-page-body .cert-recipient p{color:#293241!important}
  html.theme-dark .certificate-page-body .cert-motto{color:#7d8492!important}
  html.theme-dark .certificate-page-body .cert-performance{background:rgba(255,255,255,.8)!important;border-color:#dce3ee!important;color:#071b3d!important}
  html.theme-dark .certificate-page-body .cert-details>div{background:#fff!important;border-color:#dce3ee!important;color:#071b3d!important}
  html.theme-dark .certificate-page-body .cert-details small,
  html.theme-dark .certificate-page-body .verify-copy small,
  html.theme-dark .certificate-page-body .verify-copy p{color:#657087!important}
}

/* Final legacy route fixes: About / FAQ live inside the main document. */
html.theme-dark .single-page-view{background:#111827!important;color:#f3f7fc!important}
html.theme-dark .info-section-head h2{color:#f3f7fc!important}
html.theme-dark .info-page-section p{color:#bcc8d8!important}
html.theme-dark .header-nav-link{color:#c7d1df!important}
html.theme-dark .header-nav-link:hover{background:rgba(142,171,255,.12)!important;color:#a9bdff!important}
html.theme-dark .header-nav-active,
html.theme-dark .header-nav-active:hover{background:#6f8ff4!important;color:#fff!important}
html.theme-dark .header-contact{background:#182235!important;border-color:#4a5b73!important;color:#a9bdff!important}

/* Certificate/profile labels: preserve level colors but keep text legible. */
html.theme-dark .certificate-copy>span,
html.theme-dark .certificate-copy small,
html.theme-dark .certificate-empty,
html.theme-dark .certificate-empty p{color:#b9c6d8!important}
html.theme-dark .certificate-empty strong{color:#f3f7fc!important}
html.theme-dark .certificate-stats b{background:#3b311c!important;color:#f3d77b!important}
html.theme-dark .certificate-medal.cert-level-bronze{color:#fff!important}
html.theme-dark .certificate-medal.cert-level-silver{color:#101827!important}
html.theme-dark .certificate-medal.cert-level-gold{color:#2c2105!important}
html.theme-dark .certificate-medal.cert-level-platinum{color:#0e2630!important}
html.theme-dark .certificate-medal.cert-level-elite{color:#fff!important}
html.theme-dark .certificate-mode-status.is-warn{color:#f3cf72!important}
html.theme-dark .public-meta span{background:#202c3e!important;border-color:#41516a!important;color:#c4cfdd!important}
html.theme-dark .public-table-wrap tbody tr:hover{background:#1b2940!important}

/* ========================================================================== 
   FingerWPM v35 — PROFILE/PUBLIC PROFILE DARK CONTRAST COMPLETION
   Fixes child selectors that still carried hard-coded light-theme colors.
   This block intentionally comes last and uses explicit selectors because
   profile-page.css/public-profile.css contain later high-specificity rules.
   ========================================================================== */

html.theme-dark .profile-page-body,
html.theme-dark .public-profile-body{
  --fw-dark-text:#f7faff;
  --fw-dark-text-2:#d5dfec;
  --fw-dark-text-3:#afbed2;
  --fw-dark-text-4:#91a4bd;
  --fw-dark-line:#3f5068;
  --fw-dark-panel:#182235;
  --fw-dark-panel-2:#141f30;
  --fw-dark-blue:#8eabff;
}

/* Private profile — recent-result detail cards / chart detail. */
html.theme-dark .profile-page-body .chart-detail-head strong,
html.theme-dark .profile-page-body .chart-detail-row b,
html.theme-dark .profile-page-body .profile-record-breakdown strong,
html.theme-dark .profile-page-body .profile-journey-strip strong{
  color:var(--fw-dark-text)!important;
}
html.theme-dark .profile-page-body .chart-detail-head span,
html.theme-dark .profile-page-body .chart-detail-row small,
html.theme-dark .profile-page-body .profile-record-breakdown span,
html.theme-dark .profile-page-body .profile-journey-strip small{
  color:var(--fw-dark-text-2)!important;
  opacity:1!important;
}
html.theme-dark .profile-page-body .chart-detail-index{color:#78a2ff!important}
html.theme-dark .profile-page-body .chart-detail-row,
html.theme-dark .profile-page-body .profile-record-breakdown>div{
  border-color:var(--fw-dark-line)!important;
}
html.theme-dark .profile-page-body .chart-value-label{
  fill:#a9c0ff!important;
  stroke:#111827!important;
}
html.theme-dark .profile-page-body .chart-value-label.is-outlier{fill:#ffd37a!important}

/* Private profile — account overview. These were still #273247/#536076. */
html.theme-dark .profile-page-body .profile-sidebar-overview .profile-sidebar-title,
html.theme-dark .profile-page-body .profile-sidebar-overview .profile-sidebar-meta,
html.theme-dark .profile-page-body .profile-sidebar-overview .profile-completion-inline{
  color:var(--fw-dark-text)!important;
}
html.theme-dark .profile-page-body .profile-sidebar-meta span,
html.theme-dark .profile-page-body .profile-completion-inline>div:first-child,
html.theme-dark .profile-page-body .profile-completion-inline p,
html.theme-dark .profile-page-body .profile-session-line span,
html.theme-dark .profile-page-body .profile-session-help{
  color:var(--fw-dark-text-3)!important;
  opacity:1!important;
}
html.theme-dark .profile-page-body .profile-sidebar-meta strong,
html.theme-dark .profile-page-body .profile-session-line strong{
  color:var(--fw-dark-text)!important;
}
html.theme-dark .profile-page-body .profile-sidebar-meta .status-good{color:#42dfa2!important}
html.theme-dark .profile-page-body .profile-completion-inline .completion-bar{background:#2b3950!important}
html.theme-dark .profile-page-body .profile-completion-inline .completion-bar i{
  background:linear-gradient(90deg,#5f86ff,#8f57f5)!important;
}

/* Private profile — achievements. */
html.theme-dark .profile-page-body .achievement-item{
  border-color:var(--fw-dark-line)!important;
  opacity:1!important;
}
html.theme-dark .profile-page-body .achievement-top strong,
html.theme-dark .profile-page-body .achievement-copy strong,
html.theme-dark .profile-page-body .profile-next-achievement strong{
  color:var(--fw-dark-text)!important;
}
html.theme-dark .profile-page-body .achievement-top span,
html.theme-dark .profile-page-body .profile-next-achievement>span{
  color:#8eabff!important;
}
html.theme-dark .profile-page-body .achievement-copy p,
html.theme-dark .profile-page-body .achievement-copy small,
html.theme-dark .profile-page-body .profile-next-achievement small{
  color:var(--fw-dark-text-2)!important;
  opacity:1!important;
}
html.theme-dark .profile-page-body .achievement-icon{
  background:#20304a!important;
  color:#8eb4ff!important;
  border:1px solid #405679!important;
  box-shadow:none!important;
}
html.theme-dark .profile-page-body .achievement-item:nth-child(4n+2) .achievement-icon{background:#183a35!important;color:#67dfb7!important;border-color:#2f675b!important}
html.theme-dark .profile-page-body .achievement-item:nth-child(4n+3) .achievement-icon{background:#30284a!important;color:#c3a5ff!important;border-color:#5b4c7c!important}
html.theme-dark .profile-page-body .achievement-item:nth-child(4n+4) .achievement-icon{background:#3b311d!important;color:#f4cf67!important;border-color:#705d2d!important}
html.theme-dark .profile-page-body .achievement-item.is-locked{opacity:.72!important}
html.theme-dark .profile-page-body .achievement-item.is-locked .achievement-icon{filter:none!important}
html.theme-dark .profile-page-body .achievement-progress,
html.theme-dark .profile-page-body .next-achievement-progress{background:#2b3950!important}

/* Private profile — edit form and privacy controls. */
html.theme-dark .profile-page-body .profile-form label>span,
html.theme-dark .profile-page-body .profile-toggle-row>span b,
html.theme-dark .profile-page-body .profile-privacy-controls legend{
  color:var(--fw-dark-text)!important;
}
html.theme-dark .profile-page-body .profile-form label>small,
html.theme-dark .profile-page-body .profile-toggle-row>span small,
html.theme-dark .profile-page-body .profile-photo-help{
  color:var(--fw-dark-text-3)!important;
  opacity:1!important;
}
html.theme-dark .profile-page-body .profile-form input,
html.theme-dark .profile-page-body .profile-form textarea,
html.theme-dark .profile-page-body .profile-form select{
  background:#182235!important;
  color:var(--fw-dark-text)!important;
  border-color:#50627d!important;
}
html.theme-dark .profile-page-body .profile-form input[readonly]{
  background:#141f30!important;
  color:#c2cede!important;
}
html.theme-dark .profile-page-body .profile-toggle-row>i{background:#42516a!important}
html.theme-dark .profile-page-body .profile-toggle-row input:checked+i{background:#6489ff!important}

/* Private profile — embedded history. */
html.theme-dark .profile-page-body .history-table-wrap{background:#141f30!important;border-color:var(--fw-dark-line)!important}
html.theme-dark .profile-page-body .history-table th{background:#1c293c!important;color:#c9d5e4!important}
html.theme-dark .profile-page-body .history-table td{color:#e9f0f8!important;border-color:#34455e!important}
html.theme-dark .profile-page-body .history-table .history-net{color:#8eabff!important}
html.theme-dark .profile-page-body .history-status,
html.theme-dark .profile-page-body .history-note,
html.theme-dark .profile-page-body .history-pagination span,
html.theme-dark .profile-page-body .history-filters label>span{color:var(--fw-dark-text-3)!important}
html.theme-dark .profile-page-body .history-table tbody tr:hover{background:#1b2940!important}

/* Private profile — certificate text. */
html.theme-dark .profile-page-body .certificate-item{border-color:var(--fw-dark-line)!important}
html.theme-dark .profile-page-body .certificate-copy h3{color:var(--fw-dark-text)!important}
html.theme-dark .profile-page-body .certificate-copy>span{color:#f1c75d!important}
html.theme-dark .profile-page-body .certificate-copy small{color:var(--fw-dark-text-2)!important}
html.theme-dark .profile-page-body .certificate-copy a{color:#9bb6ff!important}

/* Public profile — chart details / records. */
html.theme-dark .public-profile-body .chart-detail-head strong,
html.theme-dark .public-profile-body .chart-detail-row b,
html.theme-dark .public-profile-body .record-breakdown strong,
html.theme-dark .public-profile-body .public-journey-strip strong{
  color:var(--fw-dark-text)!important;
}
html.theme-dark .public-profile-body .chart-detail-head span,
html.theme-dark .public-profile-body .chart-detail-row small,
html.theme-dark .public-profile-body .record-breakdown span,
html.theme-dark .public-profile-body .public-journey-strip small,
html.theme-dark .public-profile-body .public-history-page-info{
  color:var(--fw-dark-text-2)!important;
  opacity:1!important;
}
html.theme-dark .public-profile-body .chart-detail-index{color:#78a2ff!important}
html.theme-dark .public-profile-body .chart-detail-row,
html.theme-dark .public-profile-body .record-breakdown>div{border-color:var(--fw-dark-line)!important}
html.theme-dark .public-profile-body .public-level-number span,
html.theme-dark .public-profile-body .public-level-copy>span,
html.theme-dark .public-profile-body .public-level-copy small{color:var(--fw-dark-text-2)!important}
html.theme-dark .public-profile-body .public-level-title{color:var(--fw-dark-text)!important}
html.theme-dark .public-profile-body .public-level-progress{background:#2b3950!important}

/* Public profile — achievements / certificates. */
html.theme-dark .public-profile-body .achievement-item,
html.theme-dark .public-profile-body .certificate-item{border-color:var(--fw-dark-line)!important}
html.theme-dark .public-profile-body .achievement-top strong,
html.theme-dark .public-profile-body .achievement-copy strong,
html.theme-dark .public-profile-body .certificate-copy h3{color:var(--fw-dark-text)!important}
html.theme-dark .public-profile-body .achievement-top span{color:#8eabff!important}
html.theme-dark .public-profile-body .achievement-copy p,
html.theme-dark .public-profile-body .achievement-copy small,
html.theme-dark .public-profile-body .certificate-copy small{color:var(--fw-dark-text-2)!important;opacity:1!important}
html.theme-dark .public-profile-body .achievement-icon{background:#20304a!important;color:#8eb4ff!important;border:1px solid #405679!important;box-shadow:none!important}
html.theme-dark .public-profile-body .achievement-item:nth-child(4n+2) .achievement-icon{background:#183a35!important;color:#67dfb7!important;border-color:#2f675b!important}
html.theme-dark .public-profile-body .achievement-item:nth-child(4n+3) .achievement-icon{background:#30284a!important;color:#c3a5ff!important;border-color:#5b4c7c!important}
html.theme-dark .public-profile-body .achievement-item:nth-child(4n+4) .achievement-icon{background:#3b311d!important;color:#f4cf67!important;border-color:#705d2d!important}
html.theme-dark .public-profile-body .achievement-item.is-locked{opacity:.72!important}
html.theme-dark .public-profile-body .achievement-item.is-locked .achievement-icon{filter:none!important}

/* Public history. */
html.theme-dark .public-profile-body .public-table-wrap{background:#141f30!important;border-color:var(--fw-dark-line)!important}
html.theme-dark .public-profile-body .public-table-wrap th{background:#1c293c!important;color:#c9d5e4!important;border-color:#34455e!important}
html.theme-dark .public-profile-body .public-table-wrap td{color:#e9f0f8!important;border-color:#34455e!important}
html.theme-dark .public-profile-body .public-table-wrap tbody tr:hover{background:#1b2940!important}

/* Prevent decorative opacity from making real text unreadable in dark profile views. */
html.theme-dark .profile-page-body .profile-sidebar-overview [class*="meta"] span,
html.theme-dark .profile-page-body .profile-completion-inline p,
html.theme-dark .profile-page-body .achievement-copy p,
html.theme-dark .profile-page-body .achievement-copy small,
html.theme-dark .public-profile-body .achievement-copy p,
html.theme-dark .public-profile-body .achievement-copy small{opacity:1!important}
