@import url('/css/public-dark.css?v=20260916-1');

/* Web Blocker global Light/Dark theme layer. Light values preserve the current release. */
:root {
    --page-start: #9f2b2c;
    --page-end: #8b1e1f;
    --page-glow: rgba(255, 255, 255, 0.055);
    --circle-color: 255, 255, 255;
    --circle-opacity-1: 0.03;
    --circle-opacity-2: 0.02;
    --circle-opacity-3: 0.01;
    --page-bg: #9f2b2c;
    --shell-bg: #6b1c1d;
    --sidebar-bg: #9f2b2c;
    --surface-1: #c54d4e;
    --surface-2: #f86466;
    --surface-3: #e85b5d;
    --surface-hover: #fa7678;
    --surface-active: #ff7e80;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.9);
    --text-muted: rgba(255, 255, 255, 0.72);
    --text-inverse: #2b2020;
    --border-primary: rgba(255, 255, 255, 0.24);
    --border-subtle: rgba(255, 255, 255, 0.12);
    --divider: rgba(255, 255, 255, 0.14);
    --input-bg: rgba(0, 0, 0, 0.16);
    --input-border: rgba(255, 255, 255, 0.28);
    --input-placeholder: rgba(255, 255, 255, 0.62);
    --brand-primary: #f86466;
    --brand-hover: #ff7e80;
    --brand-active: #d94d50;
    --success: #76d18b;
    --warning: #ffb347;
    --danger: #ff6b6d;
    --info: #69c7f0;
    --overlay: rgba(28, 8, 9, 0.74);
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
    --icon-fg: #ffffff;
    --icon-surface: #f86466;
    --icon-surface-hover: #ff7e80;
    --icon-surface-active: #d94d50;
    --theme-transition: 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* Dashboard interaction safety shared by light and dark themes. */
body.wb-dashboard-app .background-circles,
body.wb-dashboard-app .password-modal .background-circles {
    pointer-events: none !important;
}

body.wb-dashboard-app #blocklist .sites-container {
    max-width: 100% !important;
    overflow: visible !important;
}

body.wb-dashboard-app #blocklist .sites-list {
    max-width: 100% !important;
    overflow-x: hidden !important;
}

body.wb-dashboard-app #blocklist .sites-list :where(.site-item, .extension-notice) {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-right: 0 !important;
}

body.wb-dashboard-app #blocklist .sites-list::-webkit-scrollbar:horizontal {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
}

/* Shared content legibility: keep numbered badges visible and links free of editorial underlines. */
body.wb-guide-page :where(.step-num-badge, .wb-app-counter),
body.wb-instruction-page .step-number,
body.wb-url-guide-page :where(.wb-counter-badge, .step::before) {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    opacity: 1 !important;
    visibility: visible !important;
}

body.wb-guide-page :where(.section-lead a, code),
body.wb-instruction-page :where(.step-link, .methods-link, .solution-link),
body.wb-url-guide-page :where(.wb-notice-link, .wb-banner-cta) {
    text-decoration: none !important;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --page-start: #17191d;
    --page-end: #08090b;
    --page-glow: rgba(255, 255, 255, 0.065);
    --circle-opacity-1: 0.045;
    --circle-opacity-2: 0.026;
    --circle-opacity-3: 0.014;
    --page-bg: #17191d;
    --shell-bg: #24272c;
    --sidebar-bg: #17191d;
    --surface-1: #2c3036;
    --surface-2: #1b1e23;
    --surface-3: #343941;
    --surface-hover: #343941;
    --surface-active: #3e434b;
    --text-primary: #f4f5f6;
    --text-secondary: #cfd2d6;
    --text-muted: #a7abb2;
    --text-inverse: #111418;
    --border-primary: #48515c;
    --border-subtle: #303740;
    --divider: #2b323a;
    --input-bg: #15171b;
    --input-border: rgba(255, 255, 255, 0.12);
    --input-placeholder: #7f8995;
    --brand-primary: #d8dee7;
    --brand-hover: #ffffff;
    --brand-active: #aeb7c2;
    --success: #76d18b;
    --warning: #f3b75f;
    --danger: #f0c674;
    --info: #69c7f0;
    --overlay: rgba(2, 4, 6, 0.78);
    --shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
    --icon-fg: #ffffff;
    --icon-surface: #343b44;
    --icon-surface-hover: #444d58;
    --icon-surface-active: #5d6875;

    /* Existing page-level design tokens */
    --bg-color: var(--page-bg);
    --accent-color: var(--surface-2);
    --card-bg: var(--surface-1);
    --card-border: var(--border-subtle);
    --bg-primary: var(--page-bg);
    --bg-main-card: var(--surface-1);
    --bg-feature-card: var(--surface-2);
    --bg-card-hover: var(--surface-hover);
    --border-card: var(--border-primary);
    --accent: var(--text-primary);
    --wb-bg-main: var(--page-bg);
    --wb-bg-dark: var(--shell-bg);
    --wb-bg-card: var(--surface-1);
    --wb-bg-card-hover: var(--surface-hover);
    --wb-bg-card-solid: var(--surface-2);
    --wb-border: var(--border-subtle);
    --wb-border-light: var(--border-primary);
    --wb-text-main: var(--text-primary);
    --wb-text-muted: var(--text-secondary);
    --wb-text-subtle: var(--text-muted);
    --wb-bg-deep: var(--page-bg);
    --wb-container-bg: var(--surface-1);
    --wb-card-bg: var(--surface-2);
    --wb-card-hover: var(--surface-hover);
    --wb-card-read-bg: var(--surface-1);
    --wb-text-white: var(--text-primary);
    --wb-text-trans-high: var(--text-primary);
    --wb-text-trans-mid: var(--text-secondary);
    --wb-text-trans-low: var(--text-muted);
    --wb-pill-bg: var(--surface-3);
    --wb-pill-border: var(--border-primary);
    --wb-pill-hover: var(--surface-hover);
    --wb-input-bg: var(--input-bg);
    --wb-input-border: var(--input-border);
    --wb-input-focus-border: var(--brand-primary);
    --header-bg: rgba(20, 24, 29, 0.94);
    --header-bg-scrolled: rgba(12, 15, 18, 0.98);
    --header-dropdown-bg: var(--surface-1);
    --header-dropdown-border: var(--border-primary);
    --header-text: var(--text-primary);
    --header-text-muted: var(--text-secondary);
}

html {
    background: var(--page-end);
}

/* Homepage mockups use the same product icons and radio proportions as APP. */
.discipline-panel-mock .level-icon-mock .wb-product-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    background: var(--icon-surface);
    border: 1px solid var(--border-primary);
    color: var(--icon-fg);
}

.discipline-panel-mock .level-icon-mock .wb-product-icon svg {
    width: 23px;
    height: 23px;
}

.discipline-panel-mock .custom-radio-mock {
    position: relative;
    width: 20px;
    height: 20px;
    min-width: 20px;
    box-sizing: border-box;
    padding: 1px;
    border-width: 2px;
}

.discipline-panel-mock .radio-dot-mock {
    width: 100%;
    height: 100%;
    flex: 0 0 auto;
    transform-origin: center;
}

html body {
    position: relative;
    background-color: var(--page-end);
    background-image: radial-gradient(circle at 7% 4%, var(--page-glow), transparent 34%), linear-gradient(135deg, var(--page-start) 0%, var(--page-end) 100%);
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: cover;
}

.background-circles {
    z-index: 0 !important;
}

html[data-theme="dark"],
html[data-theme="dark"] body {
    background: radial-gradient(circle at 7% 4%, var(--page-glow), transparent 34%), linear-gradient(135deg, var(--page-start) 0%, var(--page-end) 100%) fixed !important;
    color: var(--text-primary);
}

::view-transition-old(root) { animation: wb-theme-fade-out 140ms ease-out both; }
::view-transition-new(root) { animation: wb-theme-fade-in 220ms cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes wb-theme-fade-out { to { opacity: 0.94; } }
@keyframes wb-theme-fade-in { from { opacity: 0.9; } to { opacity: 1; } }

html[data-theme="dark"] body,
html[data-theme="dark"] .site-header,
html[data-theme="dark"] .site-footer,
html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .main-content,
html[data-theme="dark"] .notification-center-container,
html[data-theme="dark"] .dashboard-roadmap-card,
html[data-theme="dark"] .guide-page-wrapper {
    transition: background-color var(--theme-transition), color var(--theme-transition), border-color var(--theme-transition), box-shadow var(--theme-transition);
}

html[data-theme="dark"] .site-footer,
html[data-theme="dark"] .footer-bottom {
    background-color: var(--shell-bg) !important;
    border-color: var(--border-subtle) !important;
}

html[data-theme="dark"] :where(.tag-card, .feature-card, .info-card, .step-card, .tip-card, .faq-card, .details-card, .content-card, .analytics-card, .pulse-card, .audit-card, .password-card, .blocklist-card, .import-export-card, .modal-card, .modal-box, .snackbar, .toast, .dropdown-menu, .site-header-dropdown, .site-header-mobile-drawer) {
    background-color: var(--surface-1) !important;
    border-color: var(--border-subtle) !important;
    color: var(--text-primary) !important;
    box-shadow: var(--shadow);
}

html[data-theme="dark"] :where(.nc-card, .roadmap-feature-card, .feature-card, .leaderboard-item, .current-vote-meta-container) {
    background-color: var(--surface-2) !important;
    border-color: var(--border-subtle) !important;
}

.badge-product-update {
    background: rgba(105, 199, 240, 0.18) !important;
    border-color: rgba(105, 199, 240, 0.44) !important;
    color: #dff5ff !important;
}

html[data-theme="dark"] .nc-card-product-update {
    box-shadow: inset 3px 0 0 var(--info), 0 12px 30px rgba(0, 0, 0, 0.24);
}

html[data-theme="dark"] :where(h1, h2, h3, h4, h5, h6, .title, .page-title, .section-title, .card-title, .modal-title, .nc-card-title, .roadmap-title) {
    color: var(--text-primary) !important;
}

html[data-theme="dark"] :where(p, li, td, th, label, summary, .subtitle, .description, .page-description, .section-subtitle, .card-description, .modal-subtitle, .nc-card-desc) {
    border-color: var(--border-subtle);
}

html[data-theme="dark"] :where(input, textarea, select) {
    background: var(--input-bg) !important;
    border-color: var(--input-border) !important;
    color: var(--text-primary) !important;
    caret-color: var(--brand-primary);
}

html[data-theme="dark"] :where(input, textarea)::placeholder {
    color: var(--input-placeholder) !important;
    opacity: 1;
}

html[data-theme="dark"] :where(input, textarea, select):focus {
    border-color: var(--brand-primary) !important;
    outline-color: var(--brand-primary);
}

/* Password controls remain light across every page and modal in dark mode. */
html[data-theme="dark"] input[type="password"] {
    background: #ffffff !important;
    border-color: #d9dee5 !important;
    color: #20252b !important;
    -webkit-text-fill-color: #20252b !important;
    caret-color: #20252b !important;
}

html[data-theme="dark"] input[type="password"]::placeholder {
    color: #8a939e !important;
    -webkit-text-fill-color: #8a939e !important;
    opacity: 1 !important;
}

html[data-theme="dark"] input[type="password"]:-webkit-autofill,
html[data-theme="dark"] input[type="password"]:-webkit-autofill:hover,
html[data-theme="dark"] input[type="password"]:-webkit-autofill:focus {
    -webkit-text-fill-color: #20252b !important;
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
    caret-color: #20252b !important;
}

html[data-theme="dark"] input:-webkit-autofill,
html[data-theme="dark"] textarea:-webkit-autofill,
html[data-theme="dark"] select:-webkit-autofill {
    -webkit-text-fill-color: var(--text-primary);
    -webkit-box-shadow: 0 0 0 1000px var(--input-bg) inset;
}

html[data-theme="dark"] :where(table, thead, tbody, tr, th, td) {
    border-color: var(--border-subtle) !important;
}

html[data-theme="dark"] :where(code, pre, .code-block, .example-block) {
    background: #0b0e11 !important;
    border-color: var(--border-subtle) !important;
    color: #e7ebef !important;
}

.background-circles .circle,
.background-circles > span {
    background-color: rgb(var(--circle-color)) !important;
    transition: background-color var(--theme-transition), opacity var(--theme-transition), transform 100ms ease-out;
}
.background-circles .circle-1,
.background-circles > span:nth-child(1) { opacity: var(--circle-opacity-1) !important; }
.background-circles .circle-2,
.background-circles > span:nth-child(2) { opacity: var(--circle-opacity-2) !important; }
.background-circles .circle-3,
.background-circles > span:nth-child(3) { opacity: var(--circle-opacity-3) !important; }

html[data-theme="dark"] :where(.browser-mockup, .notepad-mockup, .extension-mockup, .blocked-page-mockup, .real-ui-demo) {
    background-color: var(--surface-1) !important;
    border-color: var(--border-primary) !important;
    color: var(--text-primary) !important;
}

html[data-theme="dark"] :where(.browser-header, .notepad-header, .notepad-menu) {
    background-color: var(--surface-3) !important;
    border-color: var(--border-subtle) !important;
    color: var(--text-secondary) !important;
}

html[data-theme="dark"] .roadmap-header-nav,
html[data-theme="dark"] .nc-header {
    border-color: var(--border-subtle) !important;
}

html[data-theme="dark"] .sidebar {
    background: var(--sidebar-bg);
}

html[data-theme="dark"] .main-content {
    background: var(--page-bg);
}

html[data-theme="dark"] :where(.main-card, .empty-state, .feedback-window, .wb-rating-widget) {
    background: var(--surface-1) !important;
    border-color: var(--border-subtle) !important;
    color: var(--text-primary) !important;
    box-shadow: var(--shadow);
}

html[data-theme="dark"] .empty-state {
    background: var(--surface-2) !important;
}

html[data-theme="dark"] .nav-item:hover,
html[data-theme="dark"] .nav-item.active,
html[data-theme="dark"] .filter-chip:hover,
html[data-theme="dark"] .filter-chip.active,
html[data-theme="dark"] .nc-filter-chip:hover,
html[data-theme="dark"] .nc-filter-chip.active {
    background: var(--surface-hover) !important;
    color: var(--text-primary) !important;
}

html[data-theme="dark"] .modal-overlay,
html[data-theme="dark"] .wb-release-modal-overlay {
    background: var(--overlay) !important;
}

/* Theme controls */
.wb-theme-toggle {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    padding: 0;
    cursor: pointer;
    transition: background-color var(--theme-transition), border-color var(--theme-transition), transform 150ms ease;
}

.wb-theme-toggle:hover { background: rgba(255, 255, 255, 0.28); }
.wb-theme-toggle:active { transform: scale(0.94); }
.wb-theme-toggle:focus-visible,
.wb-theme-row:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

html[data-theme="dark"] .wb-theme-toggle {
    background: var(--icon-surface);
    border-color: var(--border-primary);
}
html[data-theme="dark"] .wb-theme-toggle:hover { background: var(--icon-surface-hover); }

.wb-theme-toggle { position: relative; overflow: hidden; }
.wb-theme-toggle .wb-theme-icon {
    position: absolute;
    width: 20px;
    height: 20px;
    transition: transform 500ms cubic-bezier(0.34, 1.56, 0.64, 1), opacity 400ms ease;
}
html[data-theme="light"] .wb-theme-toggle .wb-theme-icon--moon,
html:not([data-theme="dark"]) .wb-theme-toggle .wb-theme-icon--moon { opacity: 1; transform: scale(1) rotate(0deg); }
html[data-theme="light"] .wb-theme-toggle .wb-theme-icon--sun,
html:not([data-theme="dark"]) .wb-theme-toggle .wb-theme-icon--sun { opacity: 0; transform: scale(0.5) rotate(90deg); }
html[data-theme="dark"] .wb-theme-toggle .wb-theme-icon--moon { opacity: 0; transform: scale(0.5) rotate(-90deg); }
html[data-theme="dark"] .wb-theme-toggle .wb-theme-icon--sun { opacity: 1; transform: scale(1) rotate(0deg); }

.wb-theme-row .wb-theme-icon--sun { display: none; }
html[data-theme="dark"] .wb-theme-row .wb-theme-icon--moon { display: none; }
html[data-theme="dark"] .wb-theme-row .wb-theme-icon--sun { display: block; }

.wb-theme-row {
    width: 100%;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 12px;
    color: inherit;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 12px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.wb-theme-row:hover { background: rgba(255, 255, 255, 0.08); }
.wb-theme-row-copy { display: flex; align-items: center; gap: 12px; min-width: 0; }
.wb-theme-row-copy .wb-theme-icon { width: 19px; height: 19px; flex: 0 0 auto; }
.wb-theme-switch {
    width: 44px;
    height: 24px;
    flex: 0 0 44px;
    padding: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: background-color var(--theme-transition), border-color var(--theme-transition);
}
.wb-theme-switch-thumb {
    display: block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.28);
    transition: transform var(--theme-transition);
}
html[data-theme="dark"] .wb-theme-switch { background: var(--brand-primary); border-color: var(--brand-primary); }
html[data-theme="dark"] .wb-theme-switch-thumb { transform: translateX(20px); }

.wb-theme-mobile-only { display: none; }
.wb-theme-desktop-only { display: inline-flex; }

/* One-time release modal */
.wb-release-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: grid;
    place-items: center;
    padding: 20px;
    background: var(--overlay);
}
.wb-release-modal {
    position: relative;
    width: min(100%, 480px);
    padding: 32px;
    border-radius: 24px;
    background: var(--surface-1);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
    box-shadow: var(--shadow);
    text-align: center;
}
.wb-release-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.wb-release-modal-close svg {
    width: 20px;
    height: 20px;
    pointer-events: none;
}
.wb-release-modal-close:hover {
    background: #ffffff;
    border-color: #ffffff;
    color: #8b1e1f;
    box-shadow: 0 8px 20px rgba(80, 8, 10, 0.24);
    transform: translateY(-1px);
}
.wb-release-modal-close:active { transform: scale(0.94); }
.wb-release-modal-close:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 3px;
}
html[data-theme="dark"] .wb-release-modal-close {
    background: rgba(255, 255, 255, 0.94);
    border-color: #ffffff;
    color: #171a1f;
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.16);
}
html[data-theme="dark"] .wb-release-modal-close:hover {
    background: #ffffff;
    color: #08090b;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.28);
}
html[data-theme="dark"] .wb-release-modal-close:focus-visible {
    outline-color: #ffffff;
}
.wb-release-modal-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--brand-primary);
    color: #fff;
}
.wb-release-modal-icon .wb-theme-icon { width: 26px; height: 26px; }
.wb-release-modal h2 { margin: 0 0 12px; font-size: 26px; line-height: 1.2; }
.wb-release-modal p { margin: 0; color: var(--text-secondary); line-height: 1.6; }
.wb-release-modal-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.wb-release-modal-actions button {
    min-height: 46px;
    padding: 10px 18px;
    border-radius: 12px;
    border: 1px solid transparent;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}
.wb-release-primary { background: var(--brand-primary); color: #fff; }
.wb-release-primary:hover { background: var(--brand-hover); }
.wb-release-secondary { background: transparent; color: var(--text-primary); border-color: var(--border-primary) !important; }
.wb-release-modal-actions button:focus-visible { outline: 3px solid var(--brand-primary); outline-offset: 3px; }

/* Dashboard-specific responsive placement */
.dashboard-theme-desktop {
    position: fixed;
    top: 24px;
    right: 28px;
    z-index: 1100;
}
.dashboard-theme-mobile {
    margin: 16px 24px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
}

@media (max-width: 900px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden !important;
    }
    .background-circles { overflow: clip; contain: paint; }
    :where(.feature-visual-wrapper, .analytics-tabs-container) {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    :where(.animate-left, h1) {
        max-width: 100%;
    }
    .wb-theme-desktop-only { display: none !important; }
    .wb-theme-mobile-only { display: flex; }
    .dashboard-theme-desktop { display: none; }
    .dashboard-theme-mobile { display: block; }
    .sidebar.active {
        overflow-y: auto !important;
        overscroll-behavior: contain;
    }
}

@media (min-width: 901px) {
    .dashboard-theme-mobile { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; }
    .wb-theme-toggle,
    .wb-theme-switch,
    .wb-theme-switch-thumb,
    body,
    .site-header,
    .site-footer,
    .sidebar,
    .main-content { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
    .wb-theme-toggle:active { transform: none; }
    ::view-transition-old(root),
    ::view-transition-new(root) { animation: none !important; }
}
