:root {
    color-scheme: light;
}

.theme-toggle {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    padding: 0;
    color: var(--navy-800);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid var(--slate-300);
    border-radius: 12px;
    transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
    place-items: center;
}

.theme-toggle[hidden] {
    display: none;
}

.theme-toggle:hover {
    color: var(--blue-600);
    background: #edf5ff;
    border-color: var(--blue-500);
}

.theme-toggle:focus-visible {
    outline: 3px solid #4a90e2;
    outline-offset: 3px;
}

.theme-toggle svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.theme-toggle .theme-icon-sun,
html[data-theme="dark"] .theme-toggle .theme-icon-moon {
    display: none;
}

html[data-theme="dark"] .theme-toggle .theme-icon-sun {
    display: block;
}

@media (max-width: 900px) {
    .site-header-with-search .header-inner {
        flex-wrap: wrap;
        padding-block: 12px;
        row-gap: 12px;
    }

    .site-header-with-search .header-search {
        order: 3;
        width: 100%;
        max-width: none;
        margin-left: 0;
        flex-basis: 100%;
    }
}

@media (max-width: 760px) {
    .header-actions .account-identity {
        width: 44px;
        max-width: 44px;
        padding: 5px;
        flex-shrink: 0;
    }

    .header-actions .account-name,
    .header-actions .account-menu-chevron {
        display: none;
    }
}

@media (max-width: 420px) {
    .header-inner,
    .site-header-with-search .header-inner {
        gap: 8px;
    }

    .header-actions {
        gap: 6px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .theme-toggle {
        transition: none;
    }
}

@media (forced-colors: active) {
    .theme-toggle {
        color: ButtonText;
        background: ButtonFace;
        border-color: ButtonText;
    }

    .theme-toggle:hover {
        color: HighlightText;
        background: Highlight;
    }

    .theme-toggle:focus-visible {
        outline-color: Highlight;
    }
}

@media print {
    .theme-toggle {
        display: none;
    }
}

@media screen and (forced-colors: none) {
    html[data-theme="dark"] {
        color-scheme: dark;
        --theme-surface: #282d35;
        --theme-raised: #303640;
        --theme-inset: #242830;
        --theme-border: #424b58;
        --theme-input-border: #68788d;
        --theme-divider: #3a424e;
        --theme-text: #edf2f8;
        --theme-muted: #adb9c9;
        --theme-subtle: #a3afbf;
        --theme-blue: #82b4ff;
        --theme-blue-soft: #263b55;
        --theme-action: #2467c7;
        --theme-action-hover: #2973d8;
        --theme-success: #78dfb0;
        --theme-success-soft: #253d35;
        --theme-success-border: #3b6653;
        --theme-warning: #f2cb7e;
        --theme-warning-soft: #3b3428;
        --theme-warning-border: #6f5b37;
        --theme-danger: #ffabb5;
        --theme-danger-soft: #412d35;
        --theme-danger-border: #774653;
        --theme-gold: #e9cd85;
        --theme-gold-soft: #39362c;
        --theme-gold-border: #726243;
        --theme-shadow: 0 16px 40px rgb(9 13 20 / 20%);
        --navy-950: #f2f5fa;
        --navy-900: var(--theme-text);
        --navy-800: #d2dce8;
        --slate-700: #bdc8d6;
        --slate-600: var(--theme-muted);
        --slate-300: var(--theme-border);
        --blue-700: #9ac3ff;
        --blue-600: var(--theme-blue);
        --blue-500: #6fa7f5;
        --teal-500: #65d4d1;
        --green-600: var(--theme-success);
        --card-border: var(--theme-border);
        --page: #20242b;
        background: var(--page);
        scrollbar-color: #657286 var(--page);
    }

    html[data-theme="dark"] ::selection {
        color: #ffffff;
        background: #335f97;
    }

    html[data-theme="dark"] :focus-visible {
        outline-color: var(--theme-blue);
    }

    html[data-theme="dark"] main,
    html[data-theme="dark"] .result-main,
    html[data-theme="dark"] .lookup-main,
    html[data-theme="dark"] .dashboard-main,
    html[data-theme="dark"] .legal-main,
    html[data-theme="dark"] .structure-page .score-poster {
        background:
            radial-gradient(ellipse 900px 540px at 78% 0, rgb(64 115 174 / 9%), transparent 75%),
            linear-gradient(180deg, #242a33, #20242b 640px);
    }

    html[data-theme="dark"] main::before,
    html[data-theme="dark"] .structure-page .score-poster::before {
        border-color: rgb(101 212 209 / 4%);
    }

    html[data-theme="dark"] main::after,
    html[data-theme="dark"] .structure-page .score-poster::after {
        background: rgb(101 212 209 / 3%);
    }

    html[data-theme="dark"] .hero-art .owl-halo {
        display: none;
    }

    html[data-theme="dark"] .hero-art img {
        filter: none;
    }

    html[data-theme="dark"] .site-header {
        background: rgb(36 41 49 / 94%);
        border-color: var(--theme-divider);
    }

    html[data-theme="dark"] .site-footer {
        background: #23272e;
        border-color: var(--theme-divider);
    }

    html[data-theme="dark"] .skip-link {
        background: #2467c7;
    }

    html[data-theme="dark"] .theme-toggle,
    html[data-theme="dark"] .notification-toggle,
    html[data-theme="dark"] .account-identity {
        background: var(--theme-surface);
        border-color: var(--theme-border);
        box-shadow: inset 0 1px 0 rgb(255 255 255 / 3%);
    }

    html[data-theme="dark"] .theme-toggle {
        color: var(--theme-gold);
    }

    html[data-theme="dark"] .theme-toggle:hover,
    html[data-theme="dark"] .notification-toggle:hover,
    html[data-theme="dark"] .notification-center[open] .notification-toggle,
    html[data-theme="dark"] .account-identity:hover,
    html[data-theme="dark"] .account-menu[open] .account-identity {
        background: var(--theme-raised);
        border-color: #6389b9;
    }

    html[data-theme="dark"] .account-menu-item:hover,
    html[data-theme="dark"] .account-menu-item:focus-visible,
    html[data-theme="dark"] .account-menu-item[aria-current="page"] {
        color: var(--theme-blue);
        background: var(--theme-blue-soft);
    }

    html[data-theme="dark"] .account-menu-panel .logout-form {
        border-color: var(--theme-divider);
    }

    html[data-theme="dark"] .account-menu-logout {
        color: var(--theme-danger);
    }

    html[data-theme="dark"] .account-menu-logout:hover,
    html[data-theme="dark"] .account-menu-logout:focus-visible {
        color: var(--theme-danger);
        background: var(--theme-danger-soft);
    }

    html[data-theme="dark"] .header-search,
    html[data-theme="dark"] .community-search {
        background: var(--theme-surface);
        border-color: var(--theme-input-border);
        box-shadow: 0 12px 28px rgb(9 13 20 / 18%);
    }

    html[data-theme="dark"] .header-search:focus-within,
    html[data-theme="dark"] .community-search:focus-within {
        border-color: var(--theme-blue);
        box-shadow: 0 0 0 3px rgb(130 180 255 / 16%), 0 12px 28px rgb(9 13 20 / 18%);
    }

    @media (max-width: 640px) {
        html[data-theme="dark"] .community-search,
        html[data-theme="dark"] .community-search:focus-within {
            background: transparent;
            border-color: transparent;
            box-shadow: none;
        }

        html[data-theme="dark"] .search-field {
            background: var(--theme-surface);
            border-color: var(--theme-input-border);
            box-shadow: 0 12px 28px rgb(9 13 20 / 18%);
        }

        html[data-theme="dark"] .search-field:focus-within {
            border-color: var(--theme-blue);
            box-shadow: 0 0 0 3px rgb(130 180 255 / 16%);
        }

        html[data-theme="dark"] .community-search.is-search-locked .search-field,
        html[data-theme="dark"] .community-search.is-search-locked .search-field:focus-within {
            background: var(--theme-inset);
            border-color: var(--theme-border);
            box-shadow: none;
        }
    }

    html[data-theme="dark"] input::placeholder,
    html[data-theme="dark"] textarea::placeholder {
        color: var(--theme-subtle);
        opacity: 1;
    }

    html[data-theme="dark"] .community-search button:disabled {
        color: #d1dceb;
        background: #3e5067;
    }

    html[data-theme="dark"] .surface,
    html[data-theme="dark"] .content-setting-moderator,
    html[data-theme="dark"] .server-diagnostics-report,
    html[data-theme="dark"] .notification-panel,
    html[data-theme="dark"] .account-menu-panel,
    html[data-theme="dark"] .age-verification-dialog,
    html[data-theme="dark"] .report-listing-dialog,
    html[data-theme="dark"] .not-found-card,
    html[data-theme="dark"] .legal-index-card,
    html[data-theme="dark"] .legal-section,
    html[data-theme="dark"] .guidelines-list,
    html[data-theme="dark"] .structure-page .breakdown-card {
        background: var(--theme-surface);
        border-color: var(--theme-border);
        box-shadow: var(--theme-shadow);
    }

    html[data-theme="dark"] .report-listing-dialog-inner {
        background: var(--theme-surface);
    }

    html[data-theme="dark"] .age-verification-overlay,
    html[data-theme="dark"] .has-explicit-verification .age-verification-overlay {
        background: rgb(14 18 25 / 80%);
    }

    html[data-theme="dark"] .report-listing-dialog::backdrop {
        background: rgb(14 18 25 / 78%);
        backdrop-filter: blur(4px);
    }

    html[data-theme="dark"] .choice-card,
    html[data-theme="dark"] .capability-list li,
    html[data-theme="dark"] .trust-score-note,
    html[data-theme="dark"] .activity-chart-empty,
    html[data-theme="dark"] .server-diagnostics-metrics > div,
    html[data-theme="dark"] .dashboard-server-analysis,
    html[data-theme="dark"] .dashboard-page-moderator-list li,
    html[data-theme="dark"] .dashboard-invite-import-job,
    html[data-theme="dark"] .legal-section address,
    html[data-theme="dark"] .structure-page .score-component,
    html[data-theme="dark"] .structure-page .score-section,
    html[data-theme="dark"] .structure-page .breakdown-footer {
        background: var(--theme-inset);
        border-color: var(--theme-divider);
    }

    html[data-theme="dark"] .notification-panel-heading,
    html[data-theme="dark"] .notification-list li + li,
    html[data-theme="dark"] .notification-report-facts,
    html[data-theme="dark"] .content-setting-moderator-summary,
    html[data-theme="dark"] .server-diagnostics-report-header,
    html[data-theme="dark"] .server-diagnostics-history-table-wrap,
    html[data-theme="dark"] .server-diagnostics-history-table th,
    html[data-theme="dark"] .server-diagnostics-history-table td,
    html[data-theme="dark"] .result-toolbar.has-moderator-divider,
    html[data-theme="dark"] .report-listing-reason,
    html[data-theme="dark"] .report-listing-reason:last-child,
    html[data-theme="dark"] .server-profile-topics,
    html[data-theme="dark"] .fact-row,
    html[data-theme="dark"] .score-summary,
    html[data-theme="dark"] .score-breakdown li,
    html[data-theme="dark"] .score-breakdown li.score-model-summary,
    html[data-theme="dark"] .evidence-list li,
    html[data-theme="dark"] .invite-note,
    html[data-theme="dark"] .card-timestamp,
    html[data-theme="dark"] .footer-bottom,
    html[data-theme="dark"] .dashboard-section-heading,
    html[data-theme="dark"] .dashboard-server-metrics,
    html[data-theme="dark"] .dashboard-server-metric + .dashboard-server-metric,
    html[data-theme="dark"] .dashboard-page-moderator-list,
    html[data-theme="dark"] .dashboard-invite-import-history,
    html[data-theme="dark"] .legal-section h2,
    html[data-theme="dark"] .guideline-item,
    html[data-theme="dark"] .structure-page .signal-row,
    html[data-theme="dark"] .structure-page .verification-list .signal-row:first-child,
    html[data-theme="dark"] .structure-page .bot-signal-card {
        border-color: var(--theme-divider);
    }

    html[data-theme="dark"] .server-avatar-shell,
    html[data-theme="dark"] .dashboard-server-avatar-shell,
    html[data-theme="dark"] .claim-server-avatar {
        background: var(--theme-raised);
        border-color: var(--theme-border);
        box-shadow: 0 8px 24px rgb(9 13 20 / 24%);
    }

    html[data-theme="dark"] .server-avatar-fallback,
    html[data-theme="dark"] .dashboard-server-avatar-fallback,
    html[data-theme="dark"] .age-verification-mark {
        background: linear-gradient(135deg, #2467c7, #167e89);
    }

    html[data-theme="dark"] .notification-item:hover,
    html[data-theme="dark"] .notification-item:focus-visible,
    html[data-theme="dark"] .report-listing-close:hover,
    html[data-theme="dark"] .report-listing-cancel:hover {
        background: var(--theme-raised);
    }

    html[data-theme="dark"] .notification-badge {
        background: #c62f43;
        border-color: var(--theme-surface);
    }

    html[data-theme="dark"] .notification-server-icon,
    html[data-theme="dark"] .dashboard-page-moderator-list li > img {
        background: var(--theme-raised);
        border-color: var(--theme-border);
    }

    html[data-theme="dark"] .content-setting-moderator-form select,
    html[data-theme="dark"] .dashboard-sort-form select,
    html[data-theme="dark"] .lookup-form input,
    html[data-theme="dark"] .dashboard-page-moderator-add input,
    html[data-theme="dark"] .dashboard-invite-import-fields input[type="file"],
    html[data-theme="dark"] .report-listing-details textarea {
        color: var(--theme-text);
        background: var(--theme-inset);
        border-color: var(--theme-input-border);
    }

    html[data-theme="dark"] .report-listing-details textarea:focus {
        background: var(--theme-inset);
        border-color: var(--theme-blue);
    }

    html[data-theme="dark"] .lookup-form input:focus {
        border-color: var(--theme-blue);
        box-shadow: 0 0 0 3px rgb(130 180 255 / 16%);
    }

    html[data-theme="dark"] .age-verification-accept,
    html[data-theme="dark"] .age-verification-home,
    html[data-theme="dark"] .content-setting-moderator-form button,
    html[data-theme="dark"] .server-diagnostics-form button,
    html[data-theme="dark"] .lookup-form button,
    html[data-theme="dark"] .dashboard-server-action,
    html[data-theme="dark"] .dashboard-page-moderator-add button,
    html[data-theme="dark"] .dashboard-invite-import-submit {
        color: #ffffff;
        background: var(--theme-action);
        border-color: #548de0;
        box-shadow: 0 6px 18px rgb(9 28 61 / 24%);
    }

    html[data-theme="dark"] .age-verification-accept:hover,
    html[data-theme="dark"] .age-verification-home:hover,
    html[data-theme="dark"] .content-setting-moderator-form button:hover:not(:disabled),
    html[data-theme="dark"] .server-diagnostics-form button:hover:not(:disabled),
    html[data-theme="dark"] .lookup-form button:hover,
    html[data-theme="dark"] .dashboard-server-action:hover:not(:disabled),
    html[data-theme="dark"] .dashboard-page-moderator-add button:hover:not(:disabled),
    html[data-theme="dark"] .dashboard-invite-import-submit:hover:not(:disabled) {
        background: var(--theme-action-hover);
        border-color: var(--theme-blue);
    }

    html[data-theme="dark"] .claim-server-button:not(:disabled) {
        background: linear-gradient(135deg, #2467c7, #1856ac);
        border-color: #548de0;
    }

    html[data-theme="dark"] .age-verification-decline {
        background: var(--theme-raised);
        border-color: var(--theme-border);
    }

    html[data-theme="dark"] .notification-panel-heading > span,
    html[data-theme="dark"] .notification-server-icon-fallback,
    html[data-theme="dark"] .source-chip,
    html[data-theme="dark"] .dashboard-page-moderator-list-heading span,
    html[data-theme="dark"] .dashboard-invite-import-job-status,
    html[data-theme="dark"] .dashboard-page-moderator-identity code,
    html[data-theme="dark"] .legal-section code,
    html[data-theme="dark"] .structure-page .scale-label,
    html[data-theme="dark"] .structure-page .section-points,
    html[data-theme="dark"] .structure-page .signal-points,
    html[data-theme="dark"] .structure-page .signal-row code {
        color: var(--theme-blue);
        background: var(--theme-blue-soft);
        border-color: #405e82;
    }

    html[data-theme="dark"] .dashboard-invite-import-fields input[type="file"]::file-selector-button {
        color: var(--theme-blue);
        background: var(--theme-blue-soft);
    }

    html[data-theme="dark"] .server-diagnostics-diagnosis,
    html[data-theme="dark"] .dashboard-page-moderator-notice,
    html[data-theme="dark"] .dashboard-invite-import-status,
    html[data-theme="dark"] .legal-callout,
    html[data-theme="dark"] .guidelines-enforcement {
        color: var(--theme-text);
        background: var(--theme-blue-soft);
        border-color: #405e82;
        box-shadow: none;
    }

    html[data-theme="dark"] .server-diagnostics-diagnosis,
    html[data-theme="dark"] .legal-callout {
        border-left-color: var(--theme-blue);
    }

    html[data-theme="dark"] .notification-empty-icon,
    html[data-theme="dark"] .result-notice.is-success,
    html[data-theme="dark"] .server-diagnostics-diagnosis[data-severity="healthy"],
    html[data-theme="dark"] .report-listing-success-icon,
    html[data-theme="dark"] .status-chip.is-live,
    html[data-theme="dark"] .source-chip.is-verified,
    html[data-theme="dark"] .evidence-check,
    html[data-theme="dark"] .dashboard-admin-notice,
    html[data-theme="dark"] .dashboard-maintenance-switch.is-enabled,
    html[data-theme="dark"] .dashboard-page-moderator-notice[data-state="success"],
    html[data-theme="dark"] .dashboard-invite-import-status[data-state="success"],
    html[data-theme="dark"] .dashboard-invite-import-job[data-job-status="completed"] .dashboard-invite-import-job-status,
    html[data-theme="dark"] .structure-page .section-points-green {
        color: var(--theme-success);
        background: var(--theme-success-soft);
        border-color: var(--theme-success-border);
    }

    html[data-theme="dark"] .server-diagnostics-diagnosis[data-severity="healthy"] {
        border-left-color: var(--theme-success);
    }

    html[data-theme="dark"] .result-warning,
    html[data-theme="dark"] .server-diagnostics-diagnosis[data-severity="warning"],
    html[data-theme="dark"] .status-chip.is-limited,
    html[data-theme="dark"] .trust-score-outage-note,
    html[data-theme="dark"] .dashboard-server-analysis.is-service-interruption,
    html[data-theme="dark"] .dashboard-invite-import-job[data-job-status="completed_with_errors"] .dashboard-invite-import-job-status {
        color: var(--theme-warning);
        background: var(--theme-warning-soft);
        border-color: var(--theme-warning-border);
    }

    html[data-theme="dark"] .server-diagnostics-diagnosis[data-severity="warning"] {
        border-left-color: var(--theme-warning);
    }

    html[data-theme="dark"] .result-notice.is-error,
    html[data-theme="dark"] .lookup-error,
    html[data-theme="dark"] .report-listing-error,
    html[data-theme="dark"] .notification-report-icon,
    html[data-theme="dark"] .server-diagnostics-diagnosis[data-severity="critical"],
    html[data-theme="dark"] .listing-ban-notice,
    html[data-theme="dark"] .dashboard-page-moderator-notice[data-state="error"],
    html[data-theme="dark"] .dashboard-invite-import-status[data-state="error"],
    html[data-theme="dark"] .dashboard-invite-import-unavailable,
    html[data-theme="dark"] .dashboard-page-moderator-list button {
        color: var(--theme-danger);
        background: var(--theme-danger-soft);
        border-color: var(--theme-danger-border);
    }

    html[data-theme="dark"] .server-diagnostics-diagnosis[data-severity="critical"] {
        border-left-color: var(--theme-danger);
    }

    html[data-theme="dark"] .content-setting-moderator-status.is-success,
    html[data-theme="dark"] .server-diagnostics-status[data-state="success"],
    html[data-theme="dark"] .server-diagnostics-history-table td[data-points="positive"],
    html[data-theme="dark"] .evidence-state.is-ready,
    html[data-theme="dark"] .score-confidence-panel--high,
    html[data-theme="dark"] .score-verification-banner--high {
        color: var(--theme-success);
    }

    html[data-theme="dark"] .content-setting-moderator-status.is-error,
    html[data-theme="dark"] .server-diagnostics-status[data-state="error"],
    html[data-theme="dark"] .server-diagnostics-history-table td[data-points="negative"],
    html[data-theme="dark"] .notification-report-heading small,
    html[data-theme="dark"] .age-verification-dialog .age-verification-error,
    html[data-theme="dark"] .banned-score-summary .score-label,
    html[data-theme="dark"] .dashboard-server-analysis.is-banned {
        color: var(--theme-danger);
    }

    html[data-theme="dark"] .score-label,
    html[data-theme="dark"] .score-confidence-panel--low,
    html[data-theme="dark"] .score-verification-banner--low,
    html[data-theme="dark"] .dashboard-admin-unavailable,
    html[data-theme="dark"] .trust-score-outage-note > span:first-child {
        color: var(--theme-warning);
        border-color: var(--theme-warning-border);
    }

    html[data-theme="dark"] .score-confidence-panel--medium,
    html[data-theme="dark"] .score-verification-banner--medium,
    html[data-theme="dark"] .trust-score-visual .score-label {
        color: var(--theme-blue);
    }

    html[data-theme="dark"] .listing-ban-stamp {
        color: var(--theme-danger);
        background: rgb(65 45 53 / 95%);
    }

    html[data-theme="dark"] .dashboard-server-card.is-banned,
    html[data-theme="dark"] .trust-score-card.is-banned {
        border-color: var(--theme-danger-border);
    }

    html[data-theme="dark"] .dashboard-page-moderator-list button:hover:not(:disabled) {
        color: #ffffff;
        background: #a82c3d;
        border-color: #e18290;
    }

    html[data-theme="dark"] .tag-list li {
        color: #cfb7ff;
        background: #383047;
    }

    html[data-theme="dark"] .server-diagnostics-history-table th {
        color: #c8d4e4;
        background: var(--theme-raised);
    }

    html[data-theme="dark"] .server-diagnostics-history-table tbody tr:hover {
        background: rgb(130 180 255 / 4%);
    }

    html[data-theme="dark"] .trust-score-card.trust-score-card--verified {
        background: linear-gradient(125deg, #302f2b, #36332a 65%, #2c2e31);
        border-color: var(--theme-gold-border);
        box-shadow: 0 0 0 1px rgb(233 205 133 / 6%), var(--theme-shadow);
    }

    html[data-theme="dark"] .trust-score-verified-mark,
    html[data-theme="dark"] .trust-score-card--verified .score-verification-banner,
    html[data-theme="dark"] .structure-page .bot-points {
        color: var(--theme-gold);
    }

    html[data-theme="dark"] .trust-score-verified-mark svg path + path {
        stroke: var(--theme-gold-soft);
    }

    html[data-theme="dark"] .trust-score-card--verified .score-summary {
        border-color: #514a39;
    }

    html[data-theme="dark"] .trust-score-card--verified .score-verification-banner-icon,
    html[data-theme="dark"] .structure-page .section-points-bot {
        color: var(--theme-gold);
        background: var(--theme-gold-soft);
        border-color: var(--theme-gold-border);
    }

    html[data-theme="dark"] .trust-score-card--verified .trust-score-note:not(.trust-score-outage-note) {
        background: #2e2d28;
        border-color: #514a39;
    }

    html[data-theme="dark"] .trust-score-note:not(.trust-score-outage-note) > span:first-child {
        border-color: #628ab8;
    }

    html[data-theme="dark"] .score-ring-track {
        stroke: #424b59;
    }

    html[data-theme="dark"] .score-ring-zero-marker,
    html[data-theme="dark"] .score-ring-cap-halo {
        stroke: var(--theme-surface);
    }

    html[data-theme="dark"] .activity-grid-line {
        stroke: var(--theme-divider);
    }

    html[data-theme="dark"] .activity-raw-line {
        stroke: rgb(130 180 255 / 40%);
    }

    html[data-theme="dark"] .activity-inspection-guide {
        stroke: #8ba7c9;
    }

    html[data-theme="dark"] .activity-inspection-point {
        fill: var(--theme-surface);
    }

    html[data-theme="dark"] #peeksi-activity-fill stop {
        stop-color: var(--theme-blue);
    }

    html[data-theme="dark"] .activity-tooltip {
        background: #353e4c;
        border-color: #60718a;
        box-shadow: 0 8px 24px rgb(9 13 20 / 32%);
    }

    html[data-theme="dark"] .activity-tooltip span {
        color: #d2dfef;
    }

    html[data-theme="dark"] .activity-legend-swatch.is-detail {
        opacity: 0.6;
    }

    html[data-theme="dark"] .dashboard-server-metric svg,
    html[data-theme="dark"] .dashboard-page-moderator-identity small,
    html[data-theme="dark"] .not-found-card > .coming-soon-note {
        color: var(--theme-subtle);
    }

    html[data-theme="dark"] .dashboard-maintenance-switch {
        color: var(--theme-text);
        background: var(--theme-raised);
        border-color: var(--theme-border);
    }

    html[data-theme="dark"] .dashboard-invite-import-job progress,
    html[data-theme="dark"] .structure-page .bot-progress {
        background: #414b59;
        border-color: #576273;
    }

    html[data-theme="dark"] .dashboard-invite-import-job progress::-webkit-progress-bar {
        background: #414b59;
    }

    html[data-theme="dark"] .dashboard-invite-import-job[aria-busy="true"] {
        border-color: #6389b9;
    }

    html[data-theme="dark"] .legal-section p,
    html[data-theme="dark"] .legal-section li,
    html[data-theme="dark"] .guideline-item p,
    html[data-theme="dark"] .guidelines-enforcement p {
        color: #c5d0de;
    }

    html[data-theme="dark"] .legal-index a:hover,
    html[data-theme="dark"] .legal-index a:focus-visible {
        color: #bdd8ff;
        background: var(--theme-blue-soft);
    }

    html[data-theme="dark"] .legal-section a:hover,
    html[data-theme="dark"] .guidelines-document a:hover {
        color: #bdd8ff;
    }

    html[data-theme="dark"] .structure-page .bot-section {
        background: linear-gradient(145deg, #343128, #282d35);
    }

    html[data-theme="dark"] .structure-page .score-component-public {
        --component-color: #91bcff;
    }

    html[data-theme="dark"] .structure-page .score-component-verified {
        --component-color: var(--theme-success);
    }

    html[data-theme="dark"] .structure-page .score-component-bot {
        --component-color: var(--theme-gold);
    }

    html[data-theme="dark"] .report-listing-dialog::-webkit-scrollbar-thumb {
        background: #657286;
        border-color: var(--theme-surface);
    }

    html[data-theme="dark"] .report-listing-dialog::-webkit-scrollbar-corner {
        background: var(--theme-surface);
    }
    /* Verified communities */

    html[data-theme="dark"] .communities-main {
        background: radial-gradient(ellipse at 85% 0, rgb(184 145 64 / 9%), transparent 45%), linear-gradient(180deg, #282a2d, var(--page) 700px);
    }

    html[data-theme="dark"] .communities-eyebrow,
    html[data-theme="dark"] .communities-intro h1 span,
    html[data-theme="dark"] .communities-learn,
    html[data-theme="dark"] .community-score {
        color: var(--theme-gold);
    }

    html[data-theme="dark"] .communities-eyebrow svg,
    html[data-theme="dark"] .community-verified-label svg {
        fill: var(--theme-gold);
    }

    html[data-theme="dark"] .communities-eyebrow svg path + path,
    html[data-theme="dark"] .community-verified-label svg path + path {
        stroke: var(--theme-gold-soft);
    }

    html[data-theme="dark"] .communities-standard {
        color: var(--theme-gold);
        background: linear-gradient(145deg, #454034, #322f28);
        border-color: var(--theme-gold-border);
        box-shadow: 0 0 0 8px #2b2b29, 0 0 0 9px #4b4536, 0 0 40px rgb(9 13 20 / 20%);
    }

    html[data-theme="dark"] .communities-list-heading {
        border-color: var(--theme-divider);
    }

    html[data-theme="dark"] .communities-list-heading h2 span,
    html[data-theme="dark"] .community-verified-label {
        color: var(--theme-gold);
        background: var(--theme-gold-soft);
        border-color: var(--theme-gold-border);
    }

    html[data-theme="dark"] .community-card,
    html[data-theme="dark"] .communities-empty {
        background: var(--theme-surface);
        border-color: #514c40;
        box-shadow: var(--theme-shadow);
    }

    html[data-theme="dark"] .community-card:has(.community-card-link:hover),
    html[data-theme="dark"] .community-card:has(.community-card-link:focus-visible) {
        border-color: var(--theme-gold-border);
        box-shadow: 0 12px 30px rgb(10 14 20 / 28%);
    }

    html[data-theme="dark"] .communities-shuffle {
        background: var(--theme-raised);
        border-color: var(--theme-border);
    }

    html[data-theme="dark"] .communities-shuffle:hover {
        background: var(--theme-gold-soft);
        border-color: var(--theme-gold-border);
    }

    html[data-theme="dark"] .community-avatar {
        border-color: var(--theme-surface);
    }

    html[data-theme="dark"] .community-score-row {
        background: var(--theme-gold-soft);
        border-color: #514c40;
    }

    html[data-theme="dark"] .community-score small {
        color: var(--theme-muted);
    }

    /* Community reviews */

    html[data-theme="dark"] .community-review {
        background: var(--theme-raised);
        border-color: var(--theme-border);
    }

    html[data-theme="dark"] .community-review.is-not-public,
    html[data-theme="dark"] .review-empty,
    html[data-theme="dark"] .review-dispute-record-body {
        background: var(--theme-inset);
        border-color: var(--theme-border);
    }

    html[data-theme="dark"] .community-review:target {
        border-color: var(--theme-blue);
        box-shadow: 0 0 0 3px rgb(130 180 255 / 16%);
    }

    html[data-theme="dark"] .review-avatar {
        background: var(--theme-inset);
        border-color: var(--theme-border);
    }

    html[data-theme="dark"] .review-you {
        color: var(--theme-blue);
        background: var(--theme-blue-soft);
    }

    html[data-theme="dark"] .review-rating svg {
        fill: var(--theme-inset);
        stroke: var(--theme-subtle);
    }

    html[data-theme="dark"] .community-reviews-average svg,
    html[data-theme="dark"] .review-rating svg.is-filled {
        fill: var(--theme-gold);
        stroke: var(--theme-gold);
    }

    html[data-theme="dark"] .review-feedback.is-success {
        color: var(--theme-success);
        background: var(--theme-success-soft);
        border-color: var(--theme-success-border);
    }

    html[data-theme="dark"] .review-feedback.is-error,
    html[data-theme="dark"] .review-client-error {
        color: var(--theme-danger);
        background: var(--theme-danger-soft);
        border-color: var(--theme-danger-border);
    }

    html[data-theme="dark"] .review-text-action.is-danger {
        color: var(--theme-danger);
    }

    html[data-theme="dark"] .review-dispute-form-panel,
    html[data-theme="dark"] .review-dispute-record,
    html[data-theme="dark"] .review-dispute-snapshot {
        border-color: var(--theme-divider);
    }

    html[data-theme="dark"] .review-private-notice,
    html[data-theme="dark"] .review-blocked-notice {
        background: var(--theme-blue-soft);
        border-color: #405670;
    }

    html[data-theme="dark"] .review-moderation {
        background: var(--theme-danger-soft);
        border-color: var(--theme-danger-border);
    }

    html[data-theme="dark"] .review-moderation > p {
        color: var(--theme-danger);
    }

    html[data-theme="dark"] .review-secondary-button {
        background: var(--theme-raised);
        border-color: var(--theme-border);
    }

    html[data-theme="dark"] .review-secondary-button:hover {
        background: var(--theme-blue-soft);
        border-color: var(--theme-blue);
    }

    html[data-theme="dark"] .review-danger-button {
        color: var(--theme-danger);
        background: var(--theme-raised);
        border-color: var(--theme-danger-border);
    }

    html[data-theme="dark"] .review-danger-button:hover {
        background: var(--theme-danger-soft);
        border-color: var(--theme-danger);
    }

    html[data-theme="dark"] .review-star-option {
        color: var(--theme-subtle);
        background: var(--theme-inset);
        border-color: var(--theme-border);
    }

    html[data-theme="dark"] .review-star-option:has(input:checked),
    html[data-theme="dark"] .review-star-option:has(~ .review-star-option input:checked) {
        color: var(--theme-gold);
        background: var(--theme-gold-soft);
        border-color: var(--theme-gold-border);
    }

    html[data-theme="dark"] .review-star-option:has(input:checked) > svg,
    html[data-theme="dark"] .review-star-option:has(~ .review-star-option input:checked) > svg {
        fill: var(--theme-gold);
    }

    html[data-theme="dark"] .review-star-option:hover {
        border-color: var(--theme-blue);
    }

    html[data-theme="dark"] .community-reviews textarea {
        background: var(--theme-inset);
        border-color: var(--theme-input-border);
    }

    html[data-theme="dark"] .community-reviews textarea::placeholder {
        color: var(--theme-subtle);
    }

    html[data-theme="dark"] .community-reviews textarea:focus {
        background: var(--theme-surface);
        border-color: var(--theme-blue);
    }

    html[data-theme="dark"] .community-reviews textarea[aria-invalid="true"],
    html[data-theme="dark"] .review-star-option:has(input[aria-invalid="true"]) {
        border-color: var(--theme-danger);
    }

    /* Moderator badges */

    html[data-theme="dark"] .server-badge--official {
        --badge-ink: var(--theme-blue);
        --badge-background: var(--theme-blue-soft);
        --badge-border: #476385;
    }

    html[data-theme="dark"] .server-badge--community {
        --badge-ink: #c8acff;
        --badge-background: #383149;
        --badge-border: #65517f;
    }

    html[data-theme="dark"] .server-badge--notice {
        --badge-ink: #80d8e2;
        --badge-background: #263b40;
        --badge-border: #426a72;
    }

    html[data-theme="dark"] .server-badge--caution {
        --badge-ink: var(--theme-warning);
        --badge-background: var(--theme-warning-soft);
        --badge-border: var(--theme-warning-border);
    }

    html[data-theme="dark"] .server-badge-icon {
        --badge-icon-detail: var(--theme-inset);
    }

    html[data-theme="dark"] .server-badge-tools {
        background: var(--theme-surface);
        box-shadow: var(--theme-shadow);
    }

    html[data-theme="dark"] .server-badge-tools-count {
        color: var(--theme-blue);
        background: var(--theme-blue-soft);
        border-color: #476385;
    }

    html[data-theme="dark"] .server-badge-tools-unavailable {
        color: var(--theme-warning);
    }

    html[data-theme="dark"] .server-badge-form input:not([type="hidden"]),
    html[data-theme="dark"] .server-badge-form select,
    html[data-theme="dark"] .server-badge-form textarea {
        background: var(--theme-inset);
        border-color: var(--theme-input-border);
    }

    html[data-theme="dark"] .server-badge-form input:not([type="hidden"]):focus,
    html[data-theme="dark"] .server-badge-form select:focus,
    html[data-theme="dark"] .server-badge-form textarea:focus {
        border-color: var(--theme-blue);
    }

    html[data-theme="dark"] .server-badge-form button,
    html[data-theme="dark"] .server-badge-save {
        color: #ffffff;
        background: var(--theme-action);
        border-color: var(--theme-action);
    }

    html[data-theme="dark"] .server-badge-form button:hover,
    html[data-theme="dark"] .server-badge-save:hover {
        background: var(--theme-action-hover);
        border-color: var(--theme-action-hover);
    }

    html[data-theme="dark"] .server-badge-remove-form button {
        color: var(--theme-danger);
        background: var(--theme-danger-soft);
        border-color: var(--theme-danger-border);
    }

    html[data-theme="dark"] .server-badge-remove-form button:hover {
        background: #50323b;
        border-color: var(--theme-danger);
    }

    /* Search suggestions */

    html[data-theme="dark"] .search-suggestions {
        background: var(--theme-raised);
        border-color: var(--theme-border);
        box-shadow: 0 18px 42px rgb(9 13 20 / 35%);
    }

    html[data-theme="dark"] .search-suggestions-option:hover,
    html[data-theme="dark"] .search-suggestions-option[aria-selected="true"] {
        background: var(--theme-blue-soft);
    }

    html[data-theme="dark"] .search-suggestions-icon {
        color: var(--theme-blue);
        background: #354254;
    }
}
