/* =======================================================
   Global Theme Modes
   Default is light. The header toggle adds body.theme-dark
   only when the user chooses dark mode.
======================================================= */

html[data-theme="light"],
body.theme-light,
body:not(.theme-dark) {
    color-scheme: light;
    background: #eef4fb;
    color: #132238;
}

/* ===== GLOBAL RESTRUCTURE: TWO-SIDED COLLAPSIBLE WORKSPACE ===== */
.toolpage-layout {
    --tool-left-col: 206px;
    --tool-right-col: 292px;
    grid-template-columns: var(--tool-left-col) minmax(0, 1fr) var(--tool-right-col) !important;
    transition: grid-template-columns .2s ease;
}

.toolhome-layout {
    --home-left-col: 206px;
    --home-right-col: 292px;
    grid-template-columns: var(--home-left-col) minmax(0, 1fr) var(--home-right-col) !important;
    transition: grid-template-columns .2s ease;
}

.sitehub-layout {
    --sitehub-left-col: 206px;
    --sitehub-right-col: 292px;
    grid-template-columns: var(--sitehub-left-col) minmax(0, 1fr) var(--sitehub-right-col) !important;
    transition: grid-template-columns .2s ease;
}

.searchpage-layout {
    --search-left-col: 206px;
    --search-right-col: 292px;
    grid-template-columns: var(--search-left-col) minmax(0, 1fr) var(--search-right-col) !important;
    transition: grid-template-columns .2s ease;
}

body.mainroute-left-collapsed .toolpage-layout {
    --tool-left-col: 76px;
}

body.mainroute-right-collapsed .toolpage-layout {
    --tool-right-col: 0px;
}

body.toolhome-left-collapsed .toolhome-layout {
    --home-left-col: 76px;
}

body.toolhome-right-collapsed .toolhome-layout {
    --home-right-col: 0px;
}

body.sitehub-left-collapsed .sitehub-layout {
    --sitehub-left-col: 76px;
}

body.sitehub-right-collapsed .sitehub-layout {
    --sitehub-right-col: 0px;
}

body.searchpage-left-collapsed .searchpage-layout {
    --search-left-col: 76px;
}

body.searchpage-right-collapsed .searchpage-layout {
    --search-right-col: 0px;
}

body.mainroute-right-collapsed .tool-rightbar,
body.toolhome-right-collapsed .toolhome-rightbar,
body.sitehub-right-collapsed .sitehub-rightbar,
body.searchpage-right-collapsed .searchpage-rightbar {
    width: 0 !important;
    padding-inline: 0 !important;
    border-inline-width: 0 !important;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    pointer-events: none;
}

body.mainroute-left-collapsed .tool-sidebar,
body.toolhome-left-collapsed .toolhome-leftbar,
body.sitehub-left-collapsed .sitehub-leftbar,
body.searchpage-left-collapsed .searchpage-leftbar {
    width: 76px !important;
    padding: 18px 0 24px !important;
    opacity: 1;
    visibility: visible;
    overflow: visible;
    pointer-events: auto;
}

body.mainroute-left-collapsed .side-rail-head,
body.toolhome-left-collapsed .side-rail-head,
body.sitehub-left-collapsed .side-rail-head,
body.searchpage-left-collapsed .side-rail-head {
    grid-template-columns: 1fr;
    margin: -18px 0 14px !important;
}

body.mainroute-left-collapsed .side-rail-brand,
body.toolhome-left-collapsed .side-rail-brand,
body.sitehub-left-collapsed .side-rail-brand,
body.searchpage-left-collapsed .side-rail-brand {
    min-height: 62px;
    justify-content: center;
    padding: 0;
}

body.mainroute-left-collapsed .side-rail-logo,
body.toolhome-left-collapsed .side-rail-logo,
body.sitehub-left-collapsed .side-rail-logo,
body.searchpage-left-collapsed .side-rail-logo {
    width: 38px;
    height: 38px;
}

body.mainroute-left-collapsed .side-rail-name,
body.mainroute-left-collapsed .sidebar-title,
body.mainroute-left-collapsed .sidebar-link span,
body.mainroute-left-collapsed .sidebar-link .badge,
body.toolhome-left-collapsed .side-rail-name,
body.toolhome-left-collapsed .toolhome-nav-card h2,
body.toolhome-left-collapsed .toolhome-category-link > span:not(.toolhome-category-icon),
body.toolhome-left-collapsed .toolhome-category-link small,
body.sitehub-left-collapsed .side-rail-name,
body.sitehub-left-collapsed .sidebar-title,
body.sitehub-left-collapsed .sidebar-link span,
body.sitehub-left-collapsed .sidebar-link .badge,
body.searchpage-left-collapsed .side-rail-name,
body.searchpage-left-collapsed .sidebar-title,
body.searchpage-left-collapsed .sidebar-link span,
body.searchpage-left-collapsed .sidebar-link .badge {
    display: none !important;
}

body.mainroute-left-collapsed .sidebar-collapse-toggle,
body.toolhome-left-collapsed .sidebar-collapse-toggle,
body.sitehub-left-collapsed .sidebar-collapse-toggle,
body.searchpage-left-collapsed .sidebar-collapse-toggle {
    display: none;
}

body:not(.theme-dark).mainroute-left-collapsed .tool-sidebar,
body:not(.theme-dark).toolhome-left-collapsed .toolhome-leftbar,
body:not(.theme-dark).sitehub-left-collapsed .sitehub-leftbar,
body:not(.theme-dark).searchpage-left-collapsed .searchpage-leftbar {
    background: linear-gradient(180deg, #f8fbff 0%, #edf6ff 100%) !important;
    border-right-color: rgba(29, 55, 88, 0.12) !important;
}

body:not(.theme-dark).mainroute-left-collapsed .side-rail-head,
body:not(.theme-dark).toolhome-left-collapsed .side-rail-head,
body:not(.theme-dark).sitehub-left-collapsed .side-rail-head,
body:not(.theme-dark).searchpage-left-collapsed .side-rail-head {
    background: #f8fbff;
    border-bottom-color: rgba(29, 55, 88, 0.12);
}

@keyframes sideRailLift {
    0%,
    38%,
    100% {
        transform: translateY(0);
    }

    18% {
        transform: translateY(-4px);
    }
}

body.mainroute-left-collapsed .side-rail-logo,
body.toolhome-left-collapsed .side-rail-logo,
body.sitehub-left-collapsed .side-rail-logo,
body.searchpage-left-collapsed .side-rail-logo {
    animation: sideRailLift 2.8s ease-in-out infinite;
}

body.mainroute-left-collapsed .sidebar-collapse-toggle,
body.toolhome-left-collapsed .sidebar-collapse-toggle,
body.sitehub-left-collapsed .sidebar-collapse-toggle,
body.searchpage-left-collapsed .sidebar-collapse-toggle {
    animation: none;
}

@media (prefers-reduced-motion: reduce) {
    body.mainroute-left-collapsed .side-rail-logo,
    body.toolhome-left-collapsed .side-rail-logo,
    body.sitehub-left-collapsed .side-rail-logo,
    body.searchpage-left-collapsed .side-rail-logo,
    body.mainroute-left-collapsed .sidebar-collapse-toggle,
    body.toolhome-left-collapsed .sidebar-collapse-toggle,
    body.sitehub-left-collapsed .sidebar-collapse-toggle,
    body.searchpage-left-collapsed .sidebar-collapse-toggle {
        animation: none;
    }
}

body.mainroute-left-collapsed .tool-sidebar,
body.toolhome-left-collapsed .toolhome-leftbar,
body.sitehub-left-collapsed .sitehub-leftbar,
body.searchpage-left-collapsed .searchpage-leftbar {
    position: relative;
}

body.mainroute-left-collapsed .sidebar-section,
body.toolhome-left-collapsed .toolhome-nav-card,
body.sitehub-left-collapsed .sidebar-section,
body.searchpage-left-collapsed .sidebar-section {
    margin: 0 !important;
    padding: 0 !important;
}

body.mainroute-left-collapsed .sidebar-section + .sidebar-section,
body.sitehub-left-collapsed .sidebar-section + .sidebar-section,
body.searchpage-left-collapsed .sidebar-section + .sidebar-section {
    margin-top: 12px !important;
    padding-top: 12px !important;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

body.mainroute-left-collapsed .sidebar-nav,
body.toolhome-left-collapsed .toolhome-category-list,
body.sitehub-left-collapsed .sidebar-nav,
body.searchpage-left-collapsed .sidebar-nav {
    gap: 0 !important;
}

body.mainroute-left-collapsed .sidebar-link,
body.sitehub-left-collapsed .sidebar-link,
body.searchpage-left-collapsed .sidebar-link {
    min-height: 52px !important;
    justify-content: center !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

body.mainroute-left-collapsed .sidebar-link i,
body.sitehub-left-collapsed .sidebar-link i,
body.searchpage-left-collapsed .sidebar-link i {
    width: auto !important;
    font-size: 1rem !important;
}

body.toolhome-left-collapsed .toolhome-category-link {
    min-height: 52px !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    justify-items: center !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

body.toolhome-left-collapsed .toolhome-category-icon {
    width: 34px !important;
    height: 34px !important;
}

.tool-sidebar,
.tool-rightbar,
.toolhome-leftbar,
.toolhome-rightbar,
.sitehub-leftbar,
.sitehub-rightbar,
.searchpage-leftbar,
.searchpage-rightbar {
    font-family: var(--dna-font-sidebar);
    transition: opacity .18s ease, transform .22s ease, padding .18s ease;
}

.sidebar-link,
.sidebar-title,
.toolhome-category-link,
.toolhome-nav-card h2,
.related-tools-card,
.related-tool-link,
.why-card,
.new-tools-card {
    font-family: var(--dna-font-sidebar) !important;
}

@media (max-width: 900px) {
    .toolpage-layout,
    .toolhome-layout,
    .sitehub-layout,
    .searchpage-layout {
        display: block !important;
    }

    .tool-sidebar,
    .toolhome-leftbar,
    .tool-rightbar,
    .toolhome-rightbar,
    .sitehub-leftbar,
    .sitehub-rightbar,
    .searchpage-leftbar,
    .searchpage-rightbar {
        position: fixed !important;
        top: 0 !important;
        bottom: 0 !important;
        z-index: 30 !important;
        width: min(86vw, 324px) !important;
        min-height: 100dvh !important;
        display: block !important;
        overflow-y: auto !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transition: transform .22s ease, opacity .22s ease, visibility .22s ease !important;
    }

    .tool-sidebar,
    .toolhome-leftbar,
    .sitehub-leftbar,
    .searchpage-leftbar {
        left: 0 !important;
        right: auto !important;
        transform: translateX(-104%) !important;
    }

    .tool-rightbar,
    .toolhome-rightbar,
    .sitehub-rightbar,
    .searchpage-rightbar {
        left: auto !important;
        right: 0 !important;
        padding: 136px 12px 18px !important;
        border-left: 1px solid var(--tool-line, var(--home-line)) !important;
        transform: translateX(104%) !important;
        background: linear-gradient(180deg, rgba(10, 17, 32, 0.98), rgba(7, 13, 25, 0.98)) !important;
        box-shadow: -24px 0 50px rgba(0, 0, 0, 0.38) !important;
    }

    body.mainroute-sidebar-open .tool-sidebar,
    body.toolhome-sidebar-open .toolhome-leftbar,
    body.mainroute-rightbar-open .tool-rightbar,
    body.toolhome-rightbar-open .toolhome-rightbar,
    body.sitehub-sidebar-open .sitehub-leftbar,
    body.sitehub-rightbar-open .sitehub-rightbar,
    body.searchpage-sidebar-open .searchpage-leftbar,
    body.searchpage-rightbar-open .searchpage-rightbar {
        transform: translateX(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    body.mainroute-rightbar-open,
    body.toolhome-rightbar-open,
    body.sitehub-rightbar-open,
    body.searchpage-rightbar-open {
        overflow: hidden;
    }

    body.mainroute-rightbar-open::before,
    body.toolhome-rightbar-open::before,
    body.sitehub-rightbar-open::before,
    body.searchpage-rightbar-open::before {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 24;
        background: rgba(3, 8, 18, 0.62);
        backdrop-filter: blur(3px);
    }

    body:not(.theme-dark) .tool-rightbar,
    body:not(.theme-dark) .toolhome-rightbar,
    body:not(.theme-dark) .sitehub-rightbar,
    body:not(.theme-dark) .searchpage-rightbar {
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 247, 255, 0.98)) !important;
        box-shadow: -24px 0 50px rgba(31, 53, 83, 0.18) !important;
    }

    body.toolhome-rightbar-open .toolhome-rightbar .why-card,
    body.toolhome-rightbar-open .toolhome-rightbar .new-tools-card {
        display: block !important;
    }

    body.toolhome-rightbar-open .toolhome-rightbar .new-tools-card > div {
        display: grid !important;
    }
}

body.theme-dark {
    color-scheme: dark;
}

body:not(.theme-dark) {
    --light-page: #eef4fb;
    --light-page-soft: #f7fbff;
    --light-surface: rgba(255, 255, 255, 0.88);
    --light-surface-strong: #ffffff;
    --light-surface-blue: #f2f7ff;
    --light-border: rgba(43, 67, 100, 0.14);
    --light-border-strong: rgba(43, 67, 100, 0.22);
    --light-text: #132238;
    --light-muted: #52677f;
    --light-soft: #6b7f96;
    --light-blue: #1769e8;
    --light-cyan: #0891b2;
    --light-green: #0f9f6e;
    --light-shadow: 0 18px 44px rgba(31, 53, 83, 0.10);
    --light-shadow-soft: 0 8px 22px rgba(31, 53, 83, 0.07);

    --tool-bg: var(--light-page);
    --tool-bg-soft: #f6faff;
    --tool-panel: var(--light-surface);
    --tool-panel-strong: var(--light-surface-strong);
    --tool-panel-soft: rgba(248, 251, 255, 0.86);
    --tool-line: var(--light-border);
    --tool-line-strong: var(--light-border-strong);
    --tool-text: var(--light-text);
    --tool-muted: var(--light-muted);
    --tool-soft: #334b65;
    --tool-blue: #1769e8;
    --tool-cyan: #0891b2;
    --tool-green: #0f9f6e;
    --tool-violet: #6052d9;
    --tool-shadow: var(--light-shadow);

    --home-bg: var(--light-page);
    --home-panel: var(--light-surface);
    --home-panel-strong: var(--light-surface-strong);
    --home-line: var(--light-border);
    --home-line-strong: var(--light-border-strong);
    --home-text: var(--light-text);
    --home-muted: var(--light-muted);
    --home-soft: #334b65;
    --home-shadow: var(--light-shadow);
    --dashboard-shine-edge: rgba(37, 99, 235, 0.10);
    --dashboard-shine-core: rgba(70, 92, 255, 0.46);
    --dashboard-shine-blend: multiply;

    --search-bg: var(--light-page);
    --search-panel: var(--light-surface);
    --search-panel-strong: var(--light-surface-strong);
    --search-line: var(--light-border);
    --search-line-strong: var(--light-border-strong);
    --search-text: var(--light-text);
    --search-muted: var(--light-muted);
    --search-blue: #1769e8;
    --search-green: #10b981;
    --search-shadow: var(--light-shadow);

    --sitehub-bg: var(--light-page);
    --sitehub-panel: var(--light-surface);
    --sitehub-panel-strong: var(--light-surface-strong);
    --sitehub-line: var(--light-border);
    --sitehub-line-strong: var(--light-border-strong);
    --sitehub-text: var(--light-text);
    --sitehub-muted: var(--light-muted);
    --sitehub-blue: #1769e8;
    --sitehub-green: #10b981;
    --sitehub-shadow: var(--light-shadow);
}

/* Header */
body:not(.theme-dark) .dna-header,
body:not(.theme-dark) .dna-header-container {
    background: rgba(255, 255, 255, 0.92);
    border-bottom-color: var(--light-border);
    box-shadow: 0 12px 32px rgba(31, 53, 83, 0.12);
}

body:not(.theme-dark) .dna-logo-main,
body:not(.theme-dark) .dna-nav a,
body:not(.theme-dark) .dna-dropdown button {
    color: #132238;
}

body:not(.theme-dark) .dna-logo-sub {
    color: #64758a;
}

body:not(.theme-dark) .dna-blue,
body:not(.theme-dark) .dna-nav a.active,
body:not(.theme-dark) .dna-dropdown button.active {
    color: var(--light-blue);
}

body:not(.theme-dark) .dna-logo-icon,
body:not(.theme-dark) .icon-btn,
body:not(.theme-dark) .mobile-menu-btn {
    color: var(--light-blue);
    background: linear-gradient(180deg, #f8fbff, #eef5ff);
    border-color: rgba(23, 105, 232, 0.18);
    box-shadow: 0 8px 18px rgba(23, 105, 232, 0.08);
}

body:not(.theme-dark) .icon-btn:hover,
body:not(.theme-dark) .mobile-menu-btn:hover {
    background: #eaf3ff;
    border-color: rgba(23, 105, 232, 0.28);
}

body:not(.theme-dark) .dna-dropdown-menu {
    background: #ffffff;
    border-color: var(--light-border);
    box-shadow: 0 20px 40px rgba(31, 53, 83, 0.14);
}

body:not(.theme-dark) .dna-dropdown-menu a {
    color: #24354d;
}

body:not(.theme-dark) .dna-dropdown-menu a:hover {
    background: #f1f6ff;
    color: var(--light-blue);
}

body:not(.theme-dark) .dna-announcement {
    background: linear-gradient(90deg, #e7f0ff, #e8fff7);
    color: #143152;
    border-bottom: 1px solid rgba(23, 105, 232, 0.16);
}

/* Page shells */
body:not(.theme-dark) .toolpage-shell,
body:not(.theme-dark) .toolhome-shell,
body:not(.theme-dark) .sitehub-shell,
body:not(.theme-dark) .searchpage-shell {
    color: var(--light-text);
    background:
        linear-gradient(90deg, rgba(23, 105, 232, 0.045) 0 1px, transparent 1px) 0 0 / 58px 58px,
        radial-gradient(circle at 14% 0%, rgba(23, 105, 232, 0.12), transparent 34%),
        radial-gradient(circle at 88% 8%, rgba(16, 185, 129, 0.12), transparent 31%),
        linear-gradient(180deg, #f8fbff 0%, #f2f7fc 48%, #edf4fb 100%);
}

body:not(.theme-dark) .toolpage-layout,
body:not(.theme-dark) .toolhome-layout,
body:not(.theme-dark) .sitehub-layout,
body:not(.theme-dark) .searchpage-layout {
    border-color: var(--light-border);
}

/* Sidebars */
body:not(.theme-dark) .tool-sidebar,
body:not(.theme-dark) .tool-rightbar,
body:not(.theme-dark) .toolhome-leftbar,
body:not(.theme-dark) .toolhome-rightbar,
body:not(.theme-dark) .sitehub-leftbar,
body:not(.theme-dark) .sitehub-rightbar,
body:not(.theme-dark) .searchpage-leftbar,
body:not(.theme-dark) .searchpage-rightbar {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(244, 249, 255, 0.82));
    border-color: var(--light-border);
    box-shadow: inset -1px 0 rgba(255, 255, 255, 0.72);
}

body:not(.theme-dark) .sidebar-title,
body:not(.theme-dark) .toolhome-nav-card h2,
body:not(.theme-dark) .why-card h2,
body:not(.theme-dark) .new-tools-card h2 {
    color: #50647c;
}

body:not(.theme-dark) .sidebar-link,
body:not(.theme-dark) .toolhome-category-link {
    color: #22354d;
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

body:not(.theme-dark) .sidebar-link:hover,
body:not(.theme-dark) .sidebar-link.active,
body:not(.theme-dark) .toolhome-category-link.active,
body:not(.theme-dark) .toolhome-category-link:hover {
    background: linear-gradient(135deg, rgba(23, 105, 232, 0.12), rgba(8, 145, 178, 0.08));
    border-color: rgba(23, 105, 232, 0.20);
    color: var(--light-blue);
}

/* Core cards and panels */
body:not(.theme-dark) .tool-main-header,
body:not(.theme-dark) .tool-info-tabs,
body:not(.theme-dark) .stat-strip,
body:not(.theme-dark) .bookmark-card,
body:not(.theme-dark) .related-tools-card,
body:not(.theme-dark) .toolhome-section,
body:not(.theme-dark) .toolhome-newsletter,
body:not(.theme-dark) .why-card,
body:not(.theme-dark) .new-tools-card,
body:not(.theme-dark) .sitehub-panel,
body:not(.theme-dark) .searchpage-results,
body:not(.theme-dark) .searchpage-suggestions,
body:not(.theme-dark) .searchpage-hero {
    color: var(--light-text);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 251, 255, 0.86));
    border-color: var(--light-border);
    box-shadow: var(--light-shadow-soft);
}

body:not(.theme-dark) .tool-work-area,
body:not(.theme-dark) .placeholder-tool-panel,
body:not(.theme-dark) .image-tool-grid > *,
body:not(.theme-dark) .converter-workspace > *,
body:not(.theme-dark) .cropper-workspace > *,
body:not(.theme-dark) .pdf-workspace > *,
body:not(.theme-dark) .ip-workspace > *,
body:not(.theme-dark) .formatter-workspace,
body:not(.theme-dark) .editor-shell {
    background: linear-gradient(180deg, #ffffff, #f7fbff);
    border-color: var(--light-border-strong);
    color: var(--light-text);
    box-shadow: var(--light-shadow-soft);
}

body:not(.theme-dark) .related-tool-link,
body:not(.theme-dark) .sitehub-list-card,
body:not(.theme-dark) .sitehub-tool-card,
body:not(.theme-dark) .searchpage-result-card,
body:not(.theme-dark) .searchpage-suggestion-card,
body:not(.theme-dark) .all-tool-row,
body:not(.theme-dark) .popular-tool-card,
body:not(.theme-dark) .popular-tool-grid > *,
body:not(.theme-dark) .popular-tools-grid > * {
    color: var(--light-text);
    background: linear-gradient(180deg, #ffffff, #f7fbff);
    border-color: var(--light-border);
    box-shadow: 0 10px 24px rgba(31, 53, 83, 0.08);
}

body:not(.theme-dark) .related-tool-link:hover,
body:not(.theme-dark) .sitehub-list-card:hover,
body:not(.theme-dark) .sitehub-tool-card:hover,
body:not(.theme-dark) .searchpage-result-card:hover,
body:not(.theme-dark) .searchpage-suggestion-card:hover,
body:not(.theme-dark) .all-tool-row:hover,
body:not(.theme-dark) .popular-tool-card:hover {
    border-color: rgba(23, 105, 232, 0.24);
    background: #ffffff;
    box-shadow: 0 16px 34px rgba(31, 53, 83, 0.12);
}

/* Typography */
body:not(.theme-dark) h1,
body:not(.theme-dark) h2,
body:not(.theme-dark) h3,
body:not(.theme-dark) .tool-main-hero h1,
body:not(.theme-dark) .toolhome-title-row h1,
body:not(.theme-dark) .sitehub-hero h1,
body:not(.theme-dark) .searchpage-hero h1,
body:not(.theme-dark) .related-tool-title,
body:not(.theme-dark) .stat-title,
body:not(.theme-dark) .sitehub-tool-copy strong,
body:not(.theme-dark) .searchpage-result-card strong {
    color: #102033;
}

body:not(.theme-dark) p,
body:not(.theme-dark) small,
body:not(.theme-dark) .tool-main-hero p,
body:not(.theme-dark) .related-tool-description,
body:not(.theme-dark) .stat-text,
body:not(.theme-dark) .sitehub-tool-copy small,
body:not(.theme-dark) .searchpage-result-card small,
body:not(.theme-dark) .toolhome-section p,
body:not(.theme-dark) .tab-panel p,
body:not(.theme-dark) .tab-panel li {
    color: var(--light-muted);
}

body:not(.theme-dark) .breadcrumb-list a,
body:not(.theme-dark) .toolhome-breadcrumbs a,
body:not(.theme-dark) .sitehub-breadcrumbs a {
    color: var(--light-blue);
}

body:not(.theme-dark) .breadcrumb-list span,
body:not(.theme-dark) .toolhome-breadcrumbs span,
body:not(.theme-dark) .sitehub-breadcrumbs span {
    color: #5f7188;
}

/* Inputs and controls */
body:not(.theme-dark) input,
body:not(.theme-dark) select,
body:not(.theme-dark) textarea,
body:not(.theme-dark) .searchpage-form,
body:not(.theme-dark) .toolhome-search,
body:not(.theme-dark) .file-input-display,
body:not(.theme-dark) .upload-control {
    color: var(--light-text);
    background: #ffffff;
    border-color: var(--light-border-strong);
}

body:not(.theme-dark) input::placeholder,
body:not(.theme-dark) textarea::placeholder {
    color: #7b8da3;
}

body:not(.theme-dark) .primary-action,
body:not(.theme-dark) .bookmark-button,
body:not(.theme-dark) .share-button,
body:not(.theme-dark) .toolhome-load-all,
body:not(.theme-dark) .mobile-rail-button,
body:not(.theme-dark) .toolhome-mobile-button {
    border-color: rgba(23, 105, 232, 0.18);
}

/* Ads and utility surfaces */
body:not(.theme-dark) .ad-placeholder,
body:not(.theme-dark) .toolhome-ad,
body:not(.theme-dark) .sitehub-ad,
body:not(.theme-dark) .searchpage-ad {
    background:
        linear-gradient(90deg, rgba(23, 105, 232, 0.08) 0 1px, transparent 1px) 0 0 / 42px 42px,
        linear-gradient(135deg, rgba(23, 105, 232, 0.09), rgba(16, 185, 129, 0.08));
    border-color: rgba(23, 105, 232, 0.22);
    color: #16436d;
    box-shadow: none;
}

body:not(.theme-dark) .ad-placeholder span,
body:not(.theme-dark) .toolhome-ad span,
body:not(.theme-dark) .sitehub-ad span,
body:not(.theme-dark) .searchpage-ad span {
    color: var(--light-blue);
}

body:not(.theme-dark) .tool-image-box,
body:not(.theme-dark) .toolhome-hero-icon,
body:not(.theme-dark) .related-tool-icon,
body:not(.theme-dark) .row-icon,
body:not(.theme-dark) .tool-card-icon,
body:not(.theme-dark) .result-icon,
body:not(.theme-dark) .sitehub-tool-icon {
    background: linear-gradient(135deg, rgba(23, 105, 232, 0.12), rgba(8, 145, 178, 0.10));
    color: var(--light-blue);
}

/* Home page */
body:not(.theme-dark) .hero-v3 {
    background:
        radial-gradient(circle at top left, rgba(23, 105, 232, 0.15), transparent 35%),
        radial-gradient(circle at bottom right, rgba(16, 185, 129, 0.13), transparent 35%),
        linear-gradient(180deg, #f8fbff, #edf5fc);
}

body:not(.theme-dark) .hero-title,
body:not(.theme-dark) .hero-main-title,
body:not(.theme-dark) .hero-panel-title {
    color: #102033;
}

body:not(.theme-dark) .hero-description,
body:not(.theme-dark) .hero-subtitle {
    color: var(--light-muted);
}

body:not(.theme-dark) .hero-search-box,
body:not(.theme-dark) .hero-card,
body:not(.theme-dark) .category-card,
body:not(.theme-dark) .why-card-item,
body:not(.theme-dark) .promo-banner {
    background: rgba(255, 255, 255, 0.88);
    border-color: var(--light-border);
    color: var(--light-text);
    box-shadow: var(--light-shadow-soft);
}

/* Footer */
body:not(.theme-dark) .dna-footer {
    background: linear-gradient(180deg, #f7fbff, #edf4fb);
    color: var(--light-text);
    border-top: 1px solid var(--light-border);
}

body:not(.theme-dark) .footer-logo,
body:not(.theme-dark) .footer-links h3,
body:not(.theme-dark) .footer-newsletter h3 {
    color: #102033;
}

body:not(.theme-dark) .footer-links a,
body:not(.theme-dark) .footer-brand p,
body:not(.theme-dark) .footer-newsletter p,
body:not(.theme-dark) .dna-footer-bottom p,
body:not(.theme-dark) .footer-legal-links a {
    color: var(--light-muted);
}

body:not(.theme-dark) .footer-socials span,
body:not(.theme-dark) .footer-back-top {
    color: var(--light-blue);
    background: #ffffff;
    border-color: var(--light-border);
}

/* ===== LIGHT THEME CONSISTENCY PATCH ===== */
body:not(.theme-dark) {
    --light-page: #eef5fc;
    --light-page-soft: #f8fbff;
    --light-surface: rgba(255, 255, 255, 0.92);
    --light-surface-strong: #ffffff;
    --light-text: #0f2034;
    --light-muted: #405873;
    --light-soft: #62758d;
}

body:not(.theme-dark) .browse-categories-section,
body:not(.theme-dark) .why-choose-section,
body:not(.theme-dark) .popular-tools-section,
body:not(.theme-dark) .home-promo-section {
    background:
        linear-gradient(90deg, rgba(23,105,232,.045) 0 1px, transparent 1px) 0 0 / 58px 58px,
        linear-gradient(180deg, #f8fbff 0%, #eef5fc 100%);
    color: var(--light-text);
    border-color: var(--light-border);
}

body:not(.theme-dark) .browse-categories-header h2,
body:not(.theme-dark) .popular-tools-header h2,
body:not(.theme-dark) .why-choose-inner h2 { color: #0f2034; }

body:not(.theme-dark) .browse-categories-header p,
body:not(.theme-dark) .popular-tools-header p,
body:not(.theme-dark) .why-content p { color: #415a76; }

body:not(.theme-dark) .why-choose-inner {
    background: rgba(255,255,255,.82);
    border-color: rgba(23,105,232,.16);
    box-shadow: 0 18px 44px rgba(31,53,83,.08);
}

body:not(.theme-dark) .why-content h3 { color: #0f2034; }

body:not(.theme-dark) .popular-tools-view {
    color: #1769e8;
    background: #ffffff;
    border-color: rgba(23,105,232,.22);
    box-shadow: 0 12px 26px rgba(31,53,83,.08);
}

body:not(.theme-dark) .popular-tool-icon,
body:not(.theme-dark) .popular-tool-card .popular-tool-icon { color: #ffffff; }

body:not(.theme-dark) .popular-tool-card h3,
body:not(.theme-dark) .category-card h3 { color: #102033; }

body:not(.theme-dark) .popular-tool-card p,
body:not(.theme-dark) .category-card p,
body:not(.theme-dark) .popular-tool-meta { color: #405873; }

body:not(.theme-dark) .dashboard-wrapper,
body:not(.theme-dark) .stat-card,
body:not(.theme-dark) .popular-tools-panel,
body:not(.theme-dark) .hero-core-card,
body:not(.theme-dark) .dashboard-side,
body:not(.theme-dark) .security-card,
body:not(.theme-dark) .speed-card {
    opacity: 1;
    color: var(--light-text);
    background: rgba(255,255,255,.78);
    border-color: rgba(43,67,100,.16);
    box-shadow: 0 18px 42px rgba(31,53,83,.12);
}

body:not(.theme-dark) .dashboard-wrapper::before,
body:not(.theme-dark) .dashboard-wrapper::after { opacity: .35; }

body:not(.theme-dark) .stat-card h3,
body:not(.theme-dark) .popular-tools-panel h4,
body:not(.theme-dark) .dashboard-side h4,
body:not(.theme-dark) .hero-panel-title { color: #102033; }

body:not(.theme-dark) .stat-card p,
body:not(.theme-dark) .popular-tools-panel a,
body:not(.theme-dark) .dashboard-side p { color: #445c76; }

body:not(.theme-dark) .toolhome-mobile-rail {
    background: rgba(255,255,255,.86);
    border-color: rgba(23,105,232,.16);
    box-shadow: 0 14px 32px rgba(31,53,83,.12);
}

body:not(.theme-dark) .toolhome-mobile-button {
    color: #18304c;
    background: rgba(255,255,255,.9);
    border-color: rgba(43,67,100,.14);
}

body:not(.theme-dark) .toolhome-mobile-button.is-link {
    color: #0f684d;
    background: linear-gradient(135deg, rgba(16,185,129,.16), rgba(23,105,232,.10));
}

body:not(.theme-dark) .toolhome-mobile-details,
body:not(.theme-dark) .toolhome-mobile-detail-card {
    background: rgba(255,255,255,.9);
    border-color: rgba(43,67,100,.14);
    color: #102033;
    box-shadow: 0 12px 28px rgba(31,53,83,.08);
}

body:not(.theme-dark) .toolhome-mobile-details-head h2,
body:not(.theme-dark) .toolhome-mobile-detail-card strong { color: #102033; }

body:not(.theme-dark) .toolhome-mobile-detail-card small { color: #506882; }

body:not(.theme-dark) .toolhome-search {
    background: rgba(255,255,255,.94);
    border-color: rgba(43,67,100,.18);
    box-shadow: 0 12px 30px rgba(31,53,83,.10);
}

body:not(.theme-dark) .toolhome-search i { color: #1769e8; }

body:not(.theme-dark) .toolhome-search input {
    color: #102033;
    background: transparent;
}

body:not(.theme-dark) .dna-header-container.mobile-open .dna-nav {
    background: rgba(255,255,255,.98);
    border-color: rgba(43,67,100,.12);
    box-shadow: 0 18px 42px rgba(31,53,83,.14);
}

body:not(.theme-dark) .dna-header-container.mobile-open .dna-nav a,
body:not(.theme-dark) .dna-header-container.mobile-open .dna-nav button { color: #22354d; }

@media (max-width: 900px) {
    body:not(.theme-dark) .toolhome-shell,
    body:not(.theme-dark) .toolpage-shell,
    body:not(.theme-dark) .searchpage-shell,
    body:not(.theme-dark) .sitehub-shell {
        background:
            linear-gradient(90deg, rgba(23,105,232,.055) 0 1px, transparent 1px) 0 0 / 56px 56px,
            linear-gradient(180deg, #f8fbff 0%, #eef5fc 100%);
    }
}

/* ===== LIGHT MOBILE READABILITY FINAL ===== */
body:not(.theme-dark) .mobile-tool-rail{
    background:rgba(255,255,255,.9);
    border-color:rgba(37,99,235,.16);
    box-shadow:0 14px 30px rgba(31,53,83,.10);
}

body:not(.theme-dark) .mobile-rail-button{
    color:#17304d;
    background:#ffffff;
    border-color:rgba(43,67,100,.14);
}

body:not(.theme-dark) .mobile-rail-button.is-link{
    color:#0f684d;
    background:linear-gradient(135deg, rgba(16,185,129,.16), rgba(37,99,235,.10));
}

body:not(.theme-dark) .range-control strong{
    color:#102033;
    background:#f7fbff;
    border-color:rgba(43,67,100,.16);
}

@media(max-width:900px){
    body:not(.theme-dark) .tool-main-header{
        background:rgba(255,255,255,.82);
        border:1px solid rgba(43,67,100,.12);
    }
}

/* ===== LIGHT TOOL FORM FINAL ===== */
body:not(.theme-dark) .tool-form-panel,
body:not(.theme-dark) .tool-settings-panel,
body:not(.theme-dark) .tool-preview-panel,
body:not(.theme-dark) .compressor-work-area > *,
body:not(.theme-dark) .converter-work-area > *,
body:not(.theme-dark) .cropper-workspace > *,
body:not(.theme-dark) .pdf-workspace > *,
body:not(.theme-dark) .ip-workspace > *{
    color:#102033;
    background:linear-gradient(180deg, rgba(255,255,255,.94), rgba(247,251,255,.9));
    border-color:rgba(43,67,100,.16);
    box-shadow:0 12px 30px rgba(31,53,83,.08);
}

body:not(.theme-dark) .tool-settings-panel h2,
body:not(.theme-dark) .tool-form-panel h2,
body:not(.theme-dark) .field-label,
body:not(.theme-dark) .tool-panel-heading{
    color:#102033;
}

body:not(.theme-dark) .tool-preview-empty,
body:not(.theme-dark) .tool-preview-stage{
    color:#102033;
    background:#f7fbff;
    border-color:rgba(23,105,232,.22);
}

body:not(.theme-dark) .tool-preview-empty span,
body:not(.theme-dark) .tool-status,
body:not(.theme-dark) .tool-detail-grid dd,
body:not(.theme-dark) .tool-detail-grid dt{
    color:#506882;
}

/* ===== WHITE THEME CONTRAST BASELINE ===== */
body:not(.theme-dark){
    --light-text:#0b1b2f;
    --light-muted:#314a66;
    --light-soft:#58708c;
    --light-border:rgba(29,55,88,.16);
    --light-border-strong:rgba(29,55,88,.24);
}

body:not(.theme-dark) .dna-announcement{
    background:linear-gradient(90deg,#e8f1ff,#dffcf4,#efeaff) !important;
}
body:not(.theme-dark) .dna-announcement-text{color:#17304d !important;font-weight:800;}
body:not(.theme-dark) .dna-announcement-badge{color:#4f46e5;background:#fff;}
body:not(.theme-dark) .dna-announcement-close{color:#2563eb !important;}

body:not(.theme-dark) .hero-badge,
body:not(.theme-dark) .hero-feature,
body:not(.theme-dark) .hero-popular-link,
body:not(.theme-dark) .hero-popular-searches a,
body:not(.theme-dark) .quick-link,
body:not(.theme-dark) .toolhome-pills li,
body:not(.theme-dark) .benefit-row li{
    opacity:1 !important;
    color:#314a66 !important;
}

body:not(.theme-dark) .hero-badge{
    color:#2563eb !important;
    background:rgba(37,99,235,.10) !important;
    border-color:rgba(37,99,235,.24) !important;
}

body:not(.theme-dark) .hero-feature span,
body:not(.theme-dark) .hero-feature strong,
body:not(.theme-dark) .hero-popular-searches a{
    color:#48617d !important;
}

body:not(.theme-dark) .hero-search-box,
body:not(.theme-dark) .searchpage-form,
body:not(.theme-dark) .toolhome-search{
    background:rgba(255,255,255,.94) !important;
    border:1px solid rgba(29,55,88,.13) !important;
    box-shadow:0 18px 38px rgba(31,53,83,.13) !important;
}

body:not(.theme-dark) .hero-search-input,
body:not(.theme-dark) .hero-search-box input,
body:not(.theme-dark) .searchpage-form input,
body:not(.theme-dark) .toolhome-search input{
    color:#0b1b2f !important;
    background:transparent !important;
}

body:not(.theme-dark) .hero-search-input::placeholder,
body:not(.theme-dark) .hero-search-box input::placeholder,
body:not(.theme-dark) .searchpage-form input::placeholder,
body:not(.theme-dark) .toolhome-search input::placeholder{
    color:#6d8198 !important;
}

body:not(.theme-dark) .category-card,
body:not(.theme-dark) .popular-tool-card,
body:not(.theme-dark) .sitehub-tool-card,
body:not(.theme-dark) .searchpage-result-card,
body:not(.theme-dark) .searchpage-suggestion-card,
body:not(.theme-dark) .toolhome-section,
body:not(.theme-dark) .tool-info-tabs,
body:not(.theme-dark) .stat-strip,
body:not(.theme-dark) .related-tools-card{
    background:linear-gradient(180deg,#fff,#f7fbff) !important;
    color:#0b1b2f !important;
    border-color:rgba(29,55,88,.16) !important;
}

body:not(.theme-dark) .category-card p,
body:not(.theme-dark) .popular-tool-card p,
body:not(.theme-dark) .sitehub-tool-copy small,
body:not(.theme-dark) .searchpage-result-card small,
body:not(.theme-dark) .searchpage-suggestion-card small,
body:not(.theme-dark) .related-tool-description{
    color:#405873 !important;
}

@media(max-width:900px){
    body:not(.theme-dark) .hero-v3{padding-top:36px;}
    body:not(.theme-dark) .hero-content{text-align:center;}
    body:not(.theme-dark) .hero-features{justify-content:center;gap:14px 18px;}
    body:not(.theme-dark) .hero-feature{font-size:.86rem;}
    body:not(.theme-dark) .hero-popular-searches{justify-content:center;gap:12px;}
    body:not(.theme-dark) .toolhome-pills,
    body:not(.theme-dark) .benefit-row{gap:8px 10px;}
    body:not(.theme-dark) .toolhome-pills li,
    body:not(.theme-dark) .benefit-row li{background:rgba(15,23,42,.08);border-radius:999px;padding:5px 9px;}
}

/* ===== WHITE HOME HERO CONTRAST FINAL ===== */
body:not(.theme-dark) .feature-item,
body:not(.theme-dark) .feature-item span,
body:not(.theme-dark) .popular-searches a,
body:not(.theme-dark) .search-suggestions a{
    opacity:1 !important;
    color:#405873 !important;
}

body:not(.theme-dark) .feature-icon{opacity:1 !important;filter:none !important;}

/* ===== LIGHT HERO POLISH FINAL ===== */
body:not(.theme-dark) .hero-search{
    background:rgba(255,255,255,.86) !important;
    border-color:rgba(37,99,235,.12) !important;
    box-shadow:0 22px 48px rgba(31,53,83,.16) !important;
}

body:not(.theme-dark) .hero-search input{
    color:#102033 !important;
    background:#ffffff !important;
    border-radius:999px !important;
    height:34px !important;
}

body:not(.theme-dark) .hero-search input::placeholder{color:#687f98 !important;}

body:not(.theme-dark) .hero-tags a{
    color:#2563eb !important;
    background:rgba(255,255,255,.70) !important;
    border-color:rgba(37,99,235,.18) !important;
    box-shadow:0 8px 18px rgba(31,53,83,.07);
}

body:not(.theme-dark) .dashboard-wrapper{
    background:rgba(255,255,255,.68) !important;
    border-color:rgba(37,99,235,.14) !important;
}

body:not(.theme-dark) .dashboard-wrapper::after{opacity:.85 !important;}

/* ===== THEME SEARCH INPUT OVERRIDE FINAL ===== */
body.theme-dark .hero-search input{
    background:transparent !important;
    color:#f8fbff !important;
}

body:not(.theme-dark) .hero-search input{
    background:rgba(255,255,255,.72) !important;
    color:#102033 !important;
}


/* Light theme: keep Why Choose band blended with surrounding page background. */
body:not(.theme-dark) .why-choose-section {
    background: var(--home-bg, #eef5fc) !important;
    color: var(--light-text);
}

body:not(.theme-dark) .why-choose-inner {
    background:
        linear-gradient(180deg, rgba(255,255,255,.94), rgba(247,251,255,.88)) !important;
    border-color: rgba(23,105,232,.16) !important;
    box-shadow: 0 18px 44px rgba(31,53,83,.08) !important;
}

/* Light theme: keep home middle sections on one continuous background plane. */
body:not(.theme-dark) .browse-categories-section,
body:not(.theme-dark) .why-choose-section,
body:not(.theme-dark) .popular-tools-section,
body:not(.theme-dark) .home-promo-section {
    background:
        linear-gradient(90deg, rgba(23,105,232,.045) 0 1px, transparent 1px) 0 0 / 58px 58px,
        linear-gradient(180deg, rgba(23,105,232,.035) 0 1px, transparent 1px) 0 0 / 58px 58px,
        #eef5fc !important;
}

body:not(.theme-dark) .why-choose-section {
    color: var(--light-text) !important;
}

/* Light footer subscribe polish */
body:not(.theme-dark) .footer-subscribe {
    height: 48px !important;
    padding: 4px !important;
    border: 1px solid rgba(37, 99, 235, .16) !important;
    border-radius: 14px !important;
    background: rgba(255,255,255,.92) !important;
    box-shadow: 0 10px 24px rgba(31,53,83,.10) !important;
}

body:not(.theme-dark) .footer-subscribe input {
    color: #132238 !important;
    background: transparent !important;
    padding: 0 14px !important;
}

body:not(.theme-dark) .footer-subscribe input::placeholder {
    color: #6b7f96 !important;
}

body:not(.theme-dark) .footer-subscribe button {
    border-radius: 10px !important;
    background: linear-gradient(135deg, #1769e8, #3b82f6) !important;
    box-shadow: 0 8px 18px rgba(37,99,235,.20) !important;
}

/* Final home hero start fix: remove announcement-bottom gap */
body:not(.theme-dark) .hero-v3,
.hero-v3{
    padding-top:0 !important;
    margin-top:0 !important;
}

body:not(.theme-dark) .hero-inner,
.hero-inner{
    padding-top:0 !important;
}

body:not(.theme-dark) .hero-badge,
.hero-badge{
    margin-top:0 !important;
}

@media(max-width:900px){
    body:not(.theme-dark) .hero-v3,
    .hero-v3{
        padding-top:0 !important;
        margin-top:0 !important;
    }
}
/* Final measured fix: pull hero content to announcement edge */
.hero-inner{
    margin-top:-20px !important;
}

@media(max-width:900px){
    .hero-inner{
        margin-top:-20px !important;
    }
}
/* Final measured section pull: remove 20px hero band under announcement */
.hero-v3,
body.announcement-hidden .hero-v3,
body:not(.theme-dark) .hero-v3{
    margin-top:-20px !important;
    padding-top:0 !important;
}

@media(max-width:900px){
    .hero-v3,
    body.announcement-hidden .hero-v3,
    body:not(.theme-dark) .hero-v3{
        margin-top:-20px !important;
        padding-top:0 !important;
    }
}
/* Keep hero aligned correctly after announcement is closed */
body.announcement-hidden .hero-v3,
body.announcement-hidden:not(.theme-dark) .hero-v3{
    margin-top:0 !important;
}
/* Closed announcement: move hero up, but keep badge below header */
body.announcement-hidden .hero-v3,
body.announcement-hidden:not(.theme-dark) .hero-v3{
    margin-top:0 !important;
    padding-top:0 !important;
}

body.announcement-hidden .hero-inner,
body.announcement-hidden:not(.theme-dark) .hero-inner{
    margin-top:0 !important;
    padding-top:0 !important;
}
/* Small breathing room between fixed header and home hero */
.hero-v3,
body:not(.theme-dark) .hero-v3,
body.announcement-hidden .hero-v3,
body.announcement-hidden:not(.theme-dark) .hero-v3{
    margin-top:0 !important;
    padding-top:18px !important;
}

.hero-inner,
body:not(.theme-dark) .hero-inner,
body.announcement-hidden .hero-inner,
body.announcement-hidden:not(.theme-dark) .hero-inner{
    margin-top:0 !important;
}

@media(max-width:900px){
    .hero-v3,
    body:not(.theme-dark) .hero-v3,
    body.announcement-hidden .hero-v3,
    body.announcement-hidden:not(.theme-dark) .hero-v3{
        padding-top:14px !important;
    }
}

/* Category home sidebars: light theme polish */
body:not(.theme-dark) .toolhome-leftbar,
body:not(.theme-dark) .toolhome-rightbar{
    background:linear-gradient(180deg, #f8fbff 0%, #eef5fc 100%) !important;
    border-color:rgba(29,55,88,.14) !important;
    box-shadow:inset 0 1px rgba(255,255,255,.85), 0 18px 42px rgba(31,53,83,.07) !important;
}

body:not(.theme-dark) .toolhome-nav-card h2,
body:not(.theme-dark) .why-card h2,
body:not(.theme-dark) .new-tools-card h2{
    color:#263b56 !important;
}

body:not(.theme-dark) .toolhome-category-link{
    color:#0f2034 !important;
    background:transparent !important;
}

body:not(.theme-dark) .toolhome-category-link.active,
body:not(.theme-dark) .toolhome-category-link:hover{
    color:#1769e8 !important;
    background:linear-gradient(135deg, rgba(37,99,235,.10), rgba(139,92,246,.08)) !important;
    border-color:rgba(37,99,235,.24) !important;
}

body:not(.theme-dark) .toolhome-category-icon,
body:not(.theme-dark) .new-tools-card a span,
body:not(.theme-dark) .why-card li span{
    color:#7c3aed !important;
    background:linear-gradient(135deg, #eadcff, #dbeafe) !important;
}

body:not(.theme-dark) .toolhome-category-link small{
    color:#f8fbff !important;
    background:#52627a !important;
}

body:not(.theme-dark) .why-card,
body:not(.theme-dark) .new-tools-card{
    color:#102033 !important;
    background:linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,251,255,.90)) !important;
    border-color:rgba(29,55,88,.14) !important;
    box-shadow:0 12px 28px rgba(31,53,83,.08) !important;
}

body:not(.theme-dark) .why-card p,
body:not(.theme-dark) .why-card li,
body:not(.theme-dark) .why-card small,
body:not(.theme-dark) .new-tools-card a,
body:not(.theme-dark) .new-tools-card small{
    color:#203853 !important;
    opacity:1 !important;
}

body:not(.theme-dark) .new-tools-card a strong,
body:not(.theme-dark) .new-tools-card a b{
    color:#102033 !important;
}

body:not(.theme-dark) .toolhome-premium-card{
    color:#f8fbff !important;
    background:linear-gradient(180deg, #40506a, #263449) !important;
    border-color:rgba(15,23,42,.18) !important;
    box-shadow:0 16px 34px rgba(31,53,83,.16) !important;
}

body:not(.theme-dark) .toolhome-premium-card h3,
body:not(.theme-dark) .toolhome-premium-card p,
body:not(.theme-dark) .toolhome-premium-card li{
    color:#f8fbff !important;
    opacity:1 !important;
}

body:not(.theme-dark) .toolhome-premium-card p,
body:not(.theme-dark) .toolhome-premium-card li{
    color:#cdd8e8 !important;
}

/* Category sidebar/readability final override */
body:not(.theme-dark) .why-card,
body:not(.theme-dark) .new-tools-card,
body:not(.theme-dark) .toolhome-mobile-detail-card{
    background:#ffffff !important;
    color:#102033 !important;
    border-color:rgba(29,55,88,.16) !important;
}

body:not(.theme-dark) .why-card h2,
body:not(.theme-dark) .new-tools-card h2,
body:not(.theme-dark) .toolhome-mobile-details h2,
body:not(.theme-dark) .toolhome-mobile-detail-card strong{
    color:#102033 !important;
    opacity:1 !important;
}

body:not(.theme-dark) .why-card strong,
body:not(.theme-dark) .why-card small,
body:not(.theme-dark) .why-card li,
body:not(.theme-dark) .new-tools-card strong,
body:not(.theme-dark) .new-tools-card small,
body:not(.theme-dark) .toolhome-mobile-detail-card small{
    color:#243d5a !important;
    opacity:1 !important;
}

body:not(.theme-dark) .popular-tool-card{
    cursor:pointer;
}

/* Category main area: light theme final polish */
body:not(.theme-dark) .toolhome-shell{
    background:
        linear-gradient(90deg, rgba(37,99,235,.045) 0 1px, transparent 1px) 0 0 / 58px 58px,
        linear-gradient(180deg, #eef5fc 0%, #f8fbff 46%, #eef5fc 100%) !important;
}

body:not(.theme-dark) .toolhome-main{
    background:transparent !important;
}

body:not(.theme-dark) .toolhome-hero,
body:not(.theme-dark) .popular-tools-section,
body:not(.theme-dark) .all-tools-section{
    background:transparent !important;
    border-color:transparent !important;
    box-shadow:none !important;
}

body:not(.theme-dark) .toolhome-title-row h1,
body:not(.theme-dark) .toolhome-section-head h2{
    color:#102033 !important;
}

body:not(.theme-dark) .toolhome-hero p,
body:not(.theme-dark) .toolhome-breadcrumbs,
body:not(.theme-dark) .toolhome-breadcrumbs span{
    color:#284461 !important;
}

body:not(.theme-dark) .toolhome-breadcrumbs a,
body:not(.theme-dark) .toolhome-section-head a,
body:not(.theme-dark) .result-count{
    color:#1769e8 !important;
}

body:not(.theme-dark) .toolhome-title-row span{
    color:#7c3aed !important;
    background:#e9ddff !important;
}

body:not(.theme-dark) .toolhome-pills li{
    color:#334b65 !important;
    background:rgba(15,23,42,.10) !important;
}

body:not(.theme-dark) .toolhome-search{
    background:#ffffff !important;
    border-color:rgba(29,55,88,.13) !important;
    box-shadow:0 12px 28px rgba(31,53,83,.10) !important;
}

body:not(.theme-dark) .toolhome-search input{
    color:#102033 !important;
}

body:not(.theme-dark) .toolhome-search input::placeholder{
    color:#6b7f96 !important;
}

body:not(.theme-dark) .toolhome-ad{
    background:
        linear-gradient(90deg, rgba(37,99,235,.08) 0 1px, transparent 1px) 0 0 / 58px 58px,
        linear-gradient(180deg, rgba(232,241,255,.94), rgba(223,252,244,.84)) !important;
    border-color:rgba(37,99,235,.22) !important;
    color:#132238 !important;
}

body:not(.theme-dark) .toolhome-ad strong{
    color:#687f98 !important;
    opacity:.85 !important;
}

body:not(.theme-dark) .toolhome-ad span{
    color:#1769e8 !important;
}

body:not(.theme-dark) .toolhome-ad small{
    color:#284461 !important;
}

body:not(.theme-dark) .popular-tool-card,
body:not(.theme-dark) .all-tool-row{
    background:rgba(255,255,255,.94) !important;
    border-color:rgba(29,55,88,.14) !important;
    box-shadow:0 10px 24px rgba(31,53,83,.08) !important;
}

body:not(.theme-dark) .popular-tool-card:hover,
body:not(.theme-dark) .all-tool-row:hover{
    background:#ffffff !important;
    border-color:rgba(37,99,235,.24) !important;
    box-shadow:0 16px 32px rgba(31,53,83,.12) !important;
}

body:not(.theme-dark) .popular-tool-card h3,
body:not(.theme-dark) .all-tool-row strong{
    color:#071a31 !important;
}

body:not(.theme-dark) .popular-tool-card p,
body:not(.theme-dark) .all-tool-row small{
    color:#284461 !important;
}

body:not(.theme-dark) .popular-tool-card a{
    color:#7c3aed !important;
    background:#eadcff !important;
}

/* Category accent sync: keep light theme category colors dynamic */
body:not(.theme-dark) .toolhome-category-link.active,
body:not(.theme-dark) .toolhome-category-link:hover{
    color:var(--home-accent) !important;
    background:linear-gradient(135deg, color-mix(in srgb, var(--home-accent) 12%, transparent), rgba(255,255,255,.66)) !important;
    border-color:color-mix(in srgb, var(--home-accent) 28%, transparent) !important;
}

body:not(.theme-dark) .toolhome-category-icon,
body:not(.theme-dark) .tool-card-icon,
body:not(.theme-dark) .toolhome-hero-icon,
body:not(.theme-dark) .new-tools-card a span,
body:not(.theme-dark) .why-card li span{
    color:var(--home-accent) !important;
    background:color-mix(in srgb, var(--home-accent) 14%, #ffffff) !important;
    border-color:color-mix(in srgb, var(--home-accent) 22%, transparent) !important;
}

body:not(.theme-dark) .toolhome-title-row span,
body:not(.theme-dark) .toolhome-section-head h2 i,
body:not(.theme-dark) .toolhome-section-head a,
body:not(.theme-dark) .result-count,
body:not(.theme-dark) .toolhome-breadcrumbs a{
    color:var(--home-accent) !important;
}

body:not(.theme-dark) .toolhome-title-row span,
body:not(.theme-dark) .popular-tool-card a{
    background:color-mix(in srgb, var(--home-accent) 14%, #ffffff) !important;
}

body:not(.theme-dark) .popular-tool-card a{
    color:var(--home-accent) !important;
}

body:not(.theme-dark) .toolhome-search button,
body:not(.theme-dark) .toolhome-premium-card button,
body:not(.theme-dark) .toolhome-newsletter button{
    background:linear-gradient(135deg, var(--home-accent), #237bff) !important;
}

/* Neutral ad placeholders in light mode */
body:not(.theme-dark) .toolhome-ad{
    background:
        linear-gradient(90deg, rgba(29,55,88,.045) 0 1px, transparent 1px) 0 0 / 58px 58px,
        linear-gradient(180deg, rgba(255,255,255,.70), rgba(247,251,255,.82)) !important;
    border-color:rgba(29,55,88,.14) !important;
    color:#243d5a !important;
}

body:not(.theme-dark) .toolhome-ad strong{
    color:#7b8da3 !important;
}

body:not(.theme-dark) .toolhome-ad span{
    color:#243d5a !important;
}

body:not(.theme-dark) .toolhome-ad small{
    color:#52677f !important;
}

/* Popular/New/All hub pages: light theme reuse */
body:not(.theme-dark) .sitehub-shell{
    background:
        linear-gradient(90deg, rgba(29,55,88,.045) 0 1px, transparent 1px) 0 0 / 58px 58px,
        linear-gradient(180deg, #eef5fc 0%, #f8fbff 46%, #eef5fc 100%) !important;
}

body:not(.theme-dark) .sitehub-hero,
body:not(.theme-dark) .sitehub-panel{
    background:rgba(255,255,255,.92) !important;
    color:#102033 !important;
    border-color:rgba(29,55,88,.14) !important;
    box-shadow:0 12px 28px rgba(31,53,83,.08) !important;
}

body:not(.theme-dark) .sitehub-hero h1,
body:not(.theme-dark) .sitehub-section-head h2,
body:not(.theme-dark) .sitehub-group-head h3,
body:not(.theme-dark) .sitehub-article-card h3,
body:not(.theme-dark) .sitehub-tool-copy strong,
body:not(.theme-dark) .sitehub-list-copy strong{
    color:#102033 !important;
}

body:not(.theme-dark) .sitehub-hero p,
body:not(.theme-dark) .sitehub-tool-copy small,
body:not(.theme-dark) .sitehub-list-copy small,
body:not(.theme-dark) .sitehub-section-head span,
body:not(.theme-dark) .sitehub-group-head small,
body:not(.theme-dark) .sitehub-breadcrumbs span{
    color:#284461 !important;
}

body:not(.theme-dark) .sitehub-breadcrumbs a,
body:not(.theme-dark) .sitehub-section-head a,
body:not(.theme-dark) .sitehub-group-head a,
body:not(.theme-dark) .sitehub-card-arrow{
    color:#1769e8 !important;
}

body:not(.theme-dark) .sitehub-search-form{
    background:#ffffff !important;
    border-color:rgba(29,55,88,.13) !important;
    box-shadow:0 12px 28px rgba(31,53,83,.10) !important;
}

body:not(.theme-dark) .sitehub-search-form input{
    color:#102033 !important;
}

body:not(.theme-dark) .sitehub-search-form input::placeholder{
    color:#6b7f96 !important;
}

body:not(.theme-dark) .sitehub-search-form button,
body:not(.theme-dark) .bookmark-button{
    background:linear-gradient(135deg, #4f46e5, #1769e8) !important;
    color:#ffffff !important;
}

body:not(.theme-dark) .sitehub-tool-card,
body:not(.theme-dark) .sitehub-list-card,
body:not(.theme-dark) .sitehub-group-card,
body:not(.theme-dark) .sitehub-article-card,
body:not(.theme-dark) .bookmark-card,
body:not(.theme-dark) .sitehub-right-card{
    background:#ffffff !important;
    color:#102033 !important;
    border-color:rgba(29,55,88,.14) !important;
    box-shadow:0 10px 24px rgba(31,53,83,.08) !important;
}

body:not(.theme-dark) .sitehub-tool-card:hover,
body:not(.theme-dark) .sitehub-list-card:hover{
    border-color:rgba(37,99,235,.24) !important;
    box-shadow:0 16px 32px rgba(31,53,83,.12) !important;
}

body:not(.theme-dark) .sitehub-tool-icon,
body:not(.theme-dark) .sitehub-badge,
body:not(.theme-dark) .sitehub-stat-pill{
    color:#1769e8 !important;
    background:#e8f1ff !important;
}

body:not(.theme-dark) .sitehub-ad,
body:not(.theme-dark) .ad-placeholder{
    background:
        linear-gradient(90deg, rgba(29,55,88,.045) 0 1px, transparent 1px) 0 0 / 58px 58px,
        linear-gradient(180deg, rgba(255,255,255,.70), rgba(247,251,255,.82)) !important;
    border-color:rgba(29,55,88,.14) !important;
    color:#243d5a !important;
    box-shadow:none !important;
}

body:not(.theme-dark) .sitehub-ad strong,
body:not(.theme-dark) .ad-placeholder strong{
    color:#7b8da3 !important;
}

body:not(.theme-dark) .sitehub-ad span,
body:not(.theme-dark) .ad-placeholder span{
    color:#243d5a !important;
}

body:not(.theme-dark) .sitehub-ad small,
body:not(.theme-dark) .ad-placeholder small{
    color:#52677f !important;
}

/* Sitehub mobile rail and trending readability */
body:not(.theme-dark) .sitehub-mobile-button{
    color:#1769e8 !important;
    background:#ffffff !important;
    border-color:rgba(37,99,235,.16) !important;
    box-shadow:0 10px 22px rgba(31,53,83,.08) !important;
}

body:not(.theme-dark) .sitehub-right-card h2{
    color:#102033 !important;
    opacity:1 !important;
}

body:not(.theme-dark) .sitehub-chip-list a{
    background:#e8f1ff !important;
    color:#1769e8 !important;
    opacity:1 !important;
}

/* Tool page light theme polish */
body:not(.theme-dark) .toolpage-shell {
    background:
        linear-gradient(90deg, rgba(23, 105, 232, 0.07) 0 1px, transparent 1px) 0 0 / 58px 58px,
        linear-gradient(180deg, #f7fbff 0%, #eef5fc 45%, #f8fbff 100%) !important;
    color: #102033 !important;
}

body:not(.theme-dark) .toolpage-layout {
    border-top-color: rgba(29, 55, 88, 0.14) !important;
}

body:not(.theme-dark) .tool-sidebar,
body:not(.theme-dark) .tool-rightbar {
    background: linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(236, 245, 253, 0.94)) !important;
    border-color: rgba(29, 55, 88, 0.15) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

body:not(.theme-dark) .sidebar-title {
    color: #52677f !important;
}

body:not(.theme-dark) .sidebar-link {
    color: #243a55 !important;
}

body:not(.theme-dark) .sidebar-link:hover,
body:not(.theme-dark) .sidebar-link.active {
    border-color: rgba(23, 105, 232, 0.22) !important;
    background: linear-gradient(135deg, rgba(23, 105, 232, 0.12), rgba(56, 189, 248, 0.08)) !important;
    color: #0567e8 !important;
}

body:not(.theme-dark) .sidebar-link .badge {
    background: #e4f0ff !important;
    color: #2874df !important;
}

body:not(.theme-dark) .bookmark-card,
body:not(.theme-dark) .related-tools-card {
    background: rgba(255, 255, 255, 0.88) !important;
    border-color: rgba(29, 55, 88, 0.14) !important;
    box-shadow: 0 16px 42px rgba(30, 64, 110, 0.08) !important;
}

body:not(.theme-dark) .bookmark-card h3,
body:not(.theme-dark) .related-tools-card h2,
body:not(.theme-dark) .related-tool-title {
    color: #102033 !important;
}

body:not(.theme-dark) .bookmark-card p,
body:not(.theme-dark) .related-tool-description {
    color: #38516e !important;
}

body:not(.theme-dark) .toolpage-preview-area {
    background: transparent !important;
}

body:not(.theme-dark) .breadcrumb-list a {
    color: #0567e8 !important;
}

body:not(.theme-dark) .breadcrumb-list span,
body:not(.theme-dark) .breadcrumb-list li:not(:last-child)::after {
    color: #64748b !important;
}

body:not(.theme-dark) .tool-main-header {
    padding: 16px !important;
    border: 1px solid rgba(29, 55, 88, 0.12) !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.78) !important;
    box-shadow: 0 18px 48px rgba(30, 64, 110, 0.07) !important;
}

body:not(.theme-dark) .tool-image-box {
    border-color: rgba(23, 105, 232, 0.16) !important;
    background:
        radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.72), transparent 30%),
        linear-gradient(135deg, #e9f6ff, #dbeaff) !important;
    color: #0969e8 !important;
    box-shadow: 0 16px 34px rgba(23, 105, 232, 0.12) !important;
}

body:not(.theme-dark) .tool-main-hero h1 {
    color: #07182d !important;
}

body:not(.theme-dark) .tool-main-hero p,
body:not(.theme-dark) .benefit-row li {
    color: #27425f !important;
}

body:not(.theme-dark) .share-button {
    border-color: rgba(23, 105, 232, 0.22) !important;
    background: linear-gradient(135deg, #eef6ff, #ffffff) !important;
    color: #0a63d8 !important;
    box-shadow: 0 10px 24px rgba(23, 105, 232, 0.08) !important;
}

body:not(.theme-dark) .share-button:hover {
    border-color: rgba(23, 105, 232, 0.38) !important;
    color: #004fb8 !important;
}

body:not(.theme-dark) .ad-placeholder {
    border-color: rgba(29, 55, 88, 0.16) !important;
    background:
        linear-gradient(90deg, rgba(23, 105, 232, 0.06) 0 1px, transparent 1px) 0 0 / 58px 58px,
        linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(238, 245, 252, 0.72)) !important;
    color: #52677f !important;
}

body:not(.theme-dark) .ad-placeholder strong {
    color: #72839a !important;
}

body:not(.theme-dark) .ad-placeholder span {
    color: #1769e8 !important;
}

body:not(.theme-dark) .ad-placeholder small {
    color: #38516e !important;
}

body:not(.theme-dark) .related-tool-link {
    color: #203853 !important;
    background: rgba(255, 255, 255, 0.52) !important;
}

body:not(.theme-dark) .related-tool-link:hover {
    background: #eef6ff !important;
}

body:not(.theme-dark) .related-tool-icon {
    border-color: rgba(23, 105, 232, 0.14) !important;
    background: #e8f3ff !important;
    color: #0969e8 !important;
}

body:not(.theme-dark) .searchpage-chip-list a,
body:not(.theme-dark) .sitehub-chip-list a {
    color: #1769e8 !important;
    background: #e8f1ff !important;
    opacity: 1 !important;
}

/* Tool page lower sections light fix */
body:not(.theme-dark) .stat-strip {
    overflow: hidden !important;
    border-color: rgba(29, 55, 88, 0.14) !important;
    background: rgba(255, 255, 255, 0.86) !important;
    box-shadow: 0 16px 38px rgba(30, 64, 110, 0.07) !important;
}

body:not(.theme-dark) .stat-item {
    border-right-color: rgba(29, 55, 88, 0.12) !important;
    background: linear-gradient(135deg, #ffffff, #f2f8ff) !important;
}

body:not(.theme-dark) .stat-item::before {
    background: linear-gradient(115deg, transparent 0%, rgba(23, 105, 232, 0.10) 42%, rgba(56, 189, 248, 0.08) 52%, transparent 66%) !important;
}

body:not(.theme-dark) .stat-icon,
body:not(.theme-dark) .step-icon {
    border-color: rgba(23, 105, 232, 0.16) !important;
    background: linear-gradient(135deg, #e6f3ff, #dbeafe) !important;
    color: #1769e8 !important;
}

body:not(.theme-dark) .stat-title,
body:not(.theme-dark) .step-title {
    color: #102033 !important;
}

body:not(.theme-dark) .stat-text,
body:not(.theme-dark) .step-text {
    color: #4d6681 !important;
}

body:not(.theme-dark) .tool-info-tabs {
    overflow: hidden !important;
    border-color: rgba(29, 55, 88, 0.14) !important;
    background: rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 18px 42px rgba(30, 64, 110, 0.08) !important;
}

body:not(.theme-dark) .tab-controls {
    border-bottom-color: rgba(29, 55, 88, 0.12) !important;
    background: linear-gradient(180deg, #f8fbff, #edf5ff) !important;
}

body:not(.theme-dark) .tab-controls label {
    color: #5f7188 !important;
}

body:not(.theme-dark) .tab-controls label:hover,
body:not(.theme-dark) .tab-controls label.is-active {
    color: #1769e8 !important;
}

body:not(.theme-dark) .tab-controls label.is-active::after {
    background: linear-gradient(90deg, #1769e8, #38bdf8) !important;
    box-shadow: 0 0 14px rgba(23, 105, 232, 0.22) !important;
}

body:not(.theme-dark) .tab-panel {
    background: rgba(255, 255, 255, 0.88) !important;
}

body:not(.theme-dark) .tab-panel h2,
body:not(.theme-dark) .tab-panel summary {
    color: #102033 !important;
}

body:not(.theme-dark) .tab-panel p,
body:not(.theme-dark) .tab-panel li,
body:not(.theme-dark) .tab-panel details p {
    color: #27425f !important;
}

body:not(.theme-dark) .tab-panel details {
    border-top-color: rgba(29, 55, 88, 0.12) !important;
}

/* Right sidebar tool rows: keep every item the same height. */
.tool-rightbar .related-tool-list {
    gap: 8px !important;
}

.tool-rightbar .related-tool-link {
    height: 78px !important;
    min-height: 78px !important;
    box-sizing: border-box;
    align-items: center !important;
    overflow: hidden !important;
}

.tool-rightbar .related-tool-link > span:not(.related-tool-icon) {
    min-width: 0;
    overflow: hidden;
}

.tool-rightbar .related-tool-title,
.tool-rightbar .related-tool-description {
    max-width: 100%;
    overflow: hidden !important;
    text-overflow: ellipsis;
}

.tool-rightbar .related-tool-title {
    display: -webkit-box !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.tool-rightbar .related-tool-description {
    display: -webkit-box !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.tool-rightbar .related-tool-arrow {
    justify-self: end;
}

@media (max-width: 900px) {
    .tool-rightbar .related-tool-link {
        height: 66px !important;
        min-height: 66px !important;
    }

    .tool-rightbar .related-tool-title {
        -webkit-line-clamp: 1;
    }
}

/* Final state overrides: these must beat page-level grid defaults. */
body.mainroute-left-collapsed:not(.mainroute-right-collapsed) .toolpage-layout {
    grid-template-columns: 76px minmax(0, 1fr) 292px !important;
}

body.mainroute-right-collapsed:not(.mainroute-left-collapsed) .toolpage-layout {
    grid-template-columns: 206px minmax(0, 1fr) 0 !important;
}

body.mainroute-left-collapsed.mainroute-right-collapsed .toolpage-layout {
    grid-template-columns: 76px minmax(0, 1fr) 0 !important;
}

body.toolhome-left-collapsed:not(.toolhome-right-collapsed) .toolhome-layout {
    grid-template-columns: 76px minmax(0, 1fr) 292px !important;
}

body.toolhome-right-collapsed:not(.toolhome-left-collapsed) .toolhome-layout {
    grid-template-columns: 206px minmax(0, 1fr) 0 !important;
}

body.toolhome-left-collapsed.toolhome-right-collapsed .toolhome-layout {
    grid-template-columns: 76px minmax(0, 1fr) 0 !important;
}

body.sitehub-left-collapsed:not(.sitehub-right-collapsed) .sitehub-layout {
    grid-template-columns: 76px minmax(0, 1fr) 292px !important;
}

body.sitehub-right-collapsed:not(.sitehub-left-collapsed) .sitehub-layout {
    grid-template-columns: 206px minmax(0, 1fr) 0 !important;
}

body.sitehub-left-collapsed.sitehub-right-collapsed .sitehub-layout {
    grid-template-columns: 76px minmax(0, 1fr) 0 !important;
}

body.searchpage-left-collapsed:not(.searchpage-right-collapsed) .searchpage-layout {
    grid-template-columns: 76px minmax(0, 1fr) 292px !important;
}

body.searchpage-right-collapsed:not(.searchpage-left-collapsed) .searchpage-layout {
    grid-template-columns: 206px minmax(0, 1fr) 0 !important;
}

body.searchpage-left-collapsed.searchpage-right-collapsed .searchpage-layout {
    grid-template-columns: 76px minmax(0, 1fr) 0 !important;
}

/* ===== MOBILE LAYOUT FINAL OVERRIDES 20260708 ===== */
@media(max-width:900px){
    body{
        padding-top:158px !important;
    }

    body.announcement-hidden{
        padding-top:104px !important;
    }

    .dna-header-container{
        min-height:104px !important;
        gap:10px 10px !important;
        padding-block:13px 11px !important;
        overflow:visible !important;
    }

    .dna-page-title{
        margin-top:3px !important;
        padding-bottom:2px !important;
        line-height:1.35 !important;
    }

    .dna-announcement{
        top:104px !important;
    }

    .hero-v3,
    body.announcement-hidden .hero-v3,
    body:not(.theme-dark) .hero-v3{
        margin-top:0 !important;
        padding-top:18px !important;
    }

    .hero-inner,
    body.announcement-hidden .hero-inner,
    body.announcement-hidden:not(.theme-dark) .hero-inner{
        margin-top:0 !important;
        padding-top:0 !important;
    }

    .mobile-tool-rail,
    .toolhome-mobile-rail,
    .sitehub-mobile-rail,
    .searchpage-mobile-rail{
        margin-top:5px !important;
    }

    .toolhome-pills{
        justify-content:center !important;
        width:100%;
    }

    .toolhome-pills li{
        font-style:italic !important;
        font-weight:850 !important;
        text-align:center;
    }

    .toolhome-mobile-detail-grid{
        grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
    }

    .toolhome-mobile-detail-card:last-child:nth-child(odd){
        grid-column:1 / -1;
        width:min(50%, 180px);
        justify-self:center;
    }

    .stat-strip{
        grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
    }

    .stat-item:last-child:nth-child(odd){
        grid-column:1 / -1;
        width:min(50%, 180px);
        justify-self:center;
    }

    .tool-sidebar,
    .toolhome-leftbar,
    .tool-rightbar,
    .toolhome-rightbar,
    .sitehub-leftbar,
    .sitehub-rightbar,
    .searchpage-leftbar,
    .searchpage-rightbar{
        top:104px !important;
        bottom:0 !important;
        z-index:850 !important;
        min-height:0 !important;
        height:calc(100dvh - 104px) !important;
    }

    .tool-sidebar,
    .toolhome-leftbar,
    .sitehub-leftbar,
    .searchpage-leftbar{
        padding-top:14px !important;
    }

    .tool-rightbar,
    .toolhome-rightbar,
    .sitehub-rightbar,
    .searchpage-rightbar{
        padding-top:18px !important;
    }

    body.mainroute-sidebar-open::before,
    body.toolhome-sidebar-open::before,
    body.sitehub-sidebar-open::before,
    body.searchpage-sidebar-open::before,
    body.mainroute-rightbar-open::before,
    body.toolhome-rightbar-open::before,
    body.sitehub-rightbar-open::before,
    body.searchpage-rightbar-open::before{
        top:104px !important;
        z-index:840 !important;
    }
}

/* ===== SITEWIDE MOBILE/DESKTOP POLISH 20260710 ===== */
body:not(.theme-dark) .why-feature{
    color:#102033 !important;
}

body:not(.theme-dark) .why-feature h3{
    color:#102033 !important;
}

body:not(.theme-dark) .why-feature p{
    color:#405873 !important;
}

body:not(.theme-dark) .popular-tool-card{
    background:linear-gradient(180deg, #ffffff, #f7fbff) !important;
    border-color:rgba(29,55,88,.14) !important;
    box-shadow:0 16px 36px rgba(31,53,83,.10) !important;
}

.popular-tool-card::before{
    display:none !important;
}

body:not(.theme-dark) .popular-tool-card:hover{
    border-color:color-mix(in srgb, var(--tool-color, var(--home-accent, #2563eb)) 34%, rgba(29,55,88,.14)) !important;
    box-shadow:0 22px 44px rgba(31,53,83,.14) !important;
}

body:not(.theme-dark) .popular-tool-card h3{
    color:#0b1b2f !important;
}

body:not(.theme-dark) .popular-tool-card p{
    color:#405873 !important;
}

body:not(.theme-dark) .popular-tool-tag{
    background:color-mix(in srgb, var(--tag-color, #2563eb) 13%, #ffffff) !important;
}

body:not(.theme-dark) .popular-tool-cta{
    color:#ffffff !important;
}

body:not(.theme-dark) .sitehub-tool-card,
body:not(.theme-dark) .sitehub-list-card,
body:not(.theme-dark) .sitehub-group-card,
body:not(.theme-dark) .sitehub-article-card{
    background:linear-gradient(180deg,#ffffff,#f7fbff) !important;
    border-color:rgba(29,55,88,.14) !important;
    box-shadow:0 12px 28px rgba(31,53,83,.08) !important;
}

body:not(.theme-dark) .sitehub-tool-copy strong,
body:not(.theme-dark) .sitehub-list-copy strong,
body:not(.theme-dark) .sitehub-section-head h2,
body:not(.theme-dark) .sitehub-group-head h3,
body:not(.theme-dark) .sitehub-article-card h3{
    color:#102033 !important;
}

body:not(.theme-dark) .sitehub-tool-copy small,
body:not(.theme-dark) .sitehub-list-copy small,
body:not(.theme-dark) .sitehub-article-card p,
body:not(.theme-dark) .sitehub-article-card li{
    color:#405873 !important;
}

@media(max-width:760px){
    .dna-footer-main{
        grid-template-columns:repeat(3, minmax(0, 1fr)) !important;
        gap:24px 18px !important;
    }

    .footer-brand,
    .footer-newsletter,
    .dna-footer-bottom{
        grid-column:1 / -1;
    }

    .footer-links h3,
    .footer-newsletter h3{
        font-size:15px !important;
    }

    .footer-links a{
        font-size:13px !important;
        line-height:1.25 !important;
    }
}
