/* =========================================================
   OptiDrop — Global Shared Styles
   ========================================================= */

/* ── Design Tokens (CSS Custom Properties) ──────────────── */
:root {
    /* Border Radius Scale */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-pill: 9999px;

    /* Color Palette — Brand (Cerise) — THE signature accent */
    --color-brand-50: #fdf2f8;
    --color-brand-100: #fce7f3;
    --color-brand-200: #f9a8d4;
    --color-brand-500: #ec4899;
    --color-brand: #e91e63;
    --color-brand-700: #be185b;
    --color-brand-800: #9d174d;

    /* Color Palette — Status (semantic use only) */
    --color-success-50: #ecfdf5;
    --color-success-500: #10b981;
    --color-success-600: #059669;
    --color-error-500: #ef4444;
    --color-info-500: #64748b;

    /* Neutral Scale */
    --color-slate-50: #f8fafc;
    --color-slate-100: #f1f5f9;
    --color-slate-200: #e2e8f0;
    --color-slate-300: #cbd5e1;
    --color-slate-400: #94a3b8;
    --color-slate-500: #64748b;
    --color-slate-600: #475569;
    --color-slate-700: #334155;
    --color-slate-800: #1e293b;
    --color-slate-900: #0f172a;

    /* Shadows — now tinted with brand color */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px -2px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 20px -4px rgba(233,30,99,0.10);
    --shadow-xl: 0 12px 24px -6px rgba(233,30,99,0.10);

    /* Timing */
    --ease-out: cubic-bezier(0.4, 0, 0.2, 1);
    --duration-fast: 0.15s;
    --duration-normal: 0.25s;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    background: var(--color-slate-50);
    color: var(--color-slate-800);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100vw;
}
/* Prevent margin collapse between header and adjacent elements */
.site-header + * { margin-top: 0; }
header.site-header { margin-top: 0 !important; }
/* noscript: let the browser handle display natively —
   JS-enabled browsers default to display:none; JS-disabled browsers default to display:block.
   DO NOT set display:block here — it overrides the browser's JS-enabled default and creates a layout gap. */
noscript { margin: 0 !important; padding: 0 !important; }
/* Belt-and-suspenders: if any inline style forces noscript visible, kill it */
html.js noscript, body > noscript { display: none !important; margin: 0 !important; padding: 0 !important; height: 0 !important; overflow: hidden !important; }
noscript + .site-header { margin-top: 0 !important; }

/* Phase 2: Global layout gap fix — prevent subpage header jumping */
main, .main-content, [role="main"] { margin-top: 0; padding-top: 0; }
body > main:first-of-type { margin-top: 0; }

/* ── Task 2: Eliminate navbar gap on all subpages ───────────── */
html { scroll-padding-top: 64px; }
body { margin-top: 0 !important; padding-top: 0 !important; }
.site-header {
    position: sticky !important;
    top: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
}
.site-header + main,
.site-header + .flex-grow,
.site-header + section,
.site-header + div {
    margin-top: 0 !important;
}
/* Phase 2: Ensure tool pages don't have rogue top spacing */
.tool-panel, .glass-panel { margin-top: 0; }

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ── Selection ─────────────────────────────────────────────── */
::selection { background: #e91e63; color: #fff; }

/* ── Toast ─────────────────────────────────────────────────── */
#toast-container {
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
    z-index: 9999; display: flex; flex-direction: column; gap: 10px;
    pointer-events: none;
}
.toast {
    animation: slideUpFade 0.3s ease-out forwards;
    pointer-events: auto;
}
@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Glass Panel ───────────────────────────────────────────── */
.glass-panel {
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(226,232,240,0.8);
    border-radius: 1.5rem;
    height: auto;
    min-height: 0;
}
/* Prevent overlaps inside tool widget flex/grid children */
.glass-panel .flex { flex-wrap: wrap; }
.glass-panel .flex > * { min-width: 0; flex-shrink: 1; }
.glass-panel select,
.glass-panel input[type="text"],
.glass-panel input[type="number"],
.glass-panel textarea {
    width: 100%; max-width: 100%;
    overflow-wrap: break-word;
    box-sizing: border-box;
}
.glass-panel .space-y-5 > * + * { margin-top: 1.25rem; }
.glass-panel .gap-3 { gap: 0.75rem; }
.glass-panel .gap-8 { gap: 2rem; }
/* Mobile: force single-column stacking inside tool widgets */
@media (max-width: 768px) {
    .glass-panel .flex.flex-col.md\:flex-row { flex-direction: column !important; }
    .glass-panel .flex.flex-col.md\:flex-row > .md\:w-1\/2 { width: 100% !important; }
    .glass-panel .flex.gap-3 { flex-direction: column; }
    .glass-panel .flex.gap-3 > * { width: 100% !important; }
}

/* ── Dropzone ──────────────────────────────────────────────── */
.dropzone-active {
    border-color: #3b82f6 !important;
    background-color: #eff6ff !important;
}

/* ── Phase 3: Tool Widget Container Fixes ──────────────────── */
/* Prevent overlapping text/inputs inside tool widgets */
.glass-panel .flex { flex-wrap: wrap; }
.glass-panel .flex > * { min-width: 0; flex-shrink: 1; }
.glass-panel .grid > * { min-width: 0; overflow-wrap: break-word; }
.tool-panel { overflow-wrap: break-word; }
.tool-panel .flex { flex-wrap: wrap; }
.tool-panel .flex > * { min-width: 0; }

/* Phase 3: Ensure tool widget inputs don't overflow on mobile */
@media (max-width: 600px) {
    .glass-panel .grid-cols-2,
    .glass-panel .grid-cols-3 {
        grid-template-columns: 1fr !important;
    }
    .tool-panel .flex.flex-col.sm\:flex-row {
        flex-direction: column !important;
    }
}

/* ── Smooth Transition ─────────────────────────────────────── */
.transition-all-ease {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Dropzone Dark Mode ───────────────────────────────────── */
.dark-mode .dropzone-active {
    background-color: #1e3a5f !important;
    border-color: #3b82f6 !important;
}

/* ── Tool Panel Animation ──────────────────────────────────── */
.tool-panel { animation: fadeInUp 0.3s ease-out; }
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Preset Pills ──────────────────────────────────────────── */
.preset-btn {
    display: inline-flex; align-items: center;
    padding: 0.25rem 0.75rem; font-size: 0.75rem; font-weight: 700;
    border-radius: 9999px; border: 2px solid #e2e8f0;
    color: #475569; background: #f8fafc; cursor: pointer;
    transition: all 0.2s ease; white-space: nowrap;
}
.preset-btn:hover { border-color: #3b82f6; color: #2563eb; background: #eff6ff; }
.preset-btn.active { border-color: #3b82f6; background: #3b82f6; color: #fff; }

/* ── Passport Presets ──────────────────────────────────────── */
.passport-preset-btn {
    display: inline-flex; align-items: center;
    padding: 0.3rem 0.6rem; font-size: 0.7rem; font-weight: 700;
    border-radius: 9999px; border: 2px solid #e2e8f0;
    color: #475569; background: #f8fafc; cursor: pointer;
    transition: all 0.2s ease; white-space: nowrap; gap: 0.25rem;
}
.passport-preset-btn:hover { border-color: #10b981; color: #059669; background: #ecfdf5; }
.passport-preset-btn.active { border-color: #10b981; background: #10b981; color: #fff; }

/* ── Resizer Presets ───────────────────────────────────────── */
.resizer-preset-btn {
    display: inline-flex; align-items: center;
    padding: 0.35rem 0.7rem; font-size: 0.7rem; font-weight: 700;
    border-radius: 9999px; border: 2px solid #d1fae5;
    color: #059669; background: #ecfdf5; cursor: pointer;
    transition: all 0.2s ease; white-space: nowrap;
}
.resizer-preset-btn:hover { border-color: #059669; background: #d1fae5; }
.resizer-preset-btn.active { border-color: #059669; background: #059669; color: #fff; }

/* ── Stamper Colors ────────────────────────────────────────── */
.stamper-color-btn {
    width: 2rem; height: 2rem; border-radius: 9999px;
    cursor: pointer; border: 3px solid transparent; transition: all 0.2s ease;
}
.stamper-color-btn:hover { transform: scale(1.15); }
.stamper-color-btn.active { border-color: #3b82f6; box-shadow: 0 0 0 2px #eff6ff; }

/* ── Form Controls ─────────────────────────────────────────── */
.settings-select {
    display: block; width: 100%;
    padding: 0.65rem 1rem; font-size: 0.875rem; font-weight: 600;
    border: 2px solid #e2e8f0; border-radius: 0.75rem;
    background: #fff; color: #1e293b; cursor: pointer; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.1rem;
    transition: border-color 0.2s ease;
    max-width: 100%; overflow-wrap: break-word; box-sizing: border-box;
    min-width: 0;
}
.settings-select:focus { outline: none; border-color: #e91e63; }

.dim-input {
    display: block; width: 100%;
    padding: 0.65rem 0.75rem; font-size: 0.875rem; font-weight: 600;
    border: 2px solid #e2e8f0; border-radius: 0.75rem;
    color: #1e293b; transition: border-color 0.2s ease;
    max-width: 100%; overflow-wrap: break-word; box-sizing: border-box;
    min-width: 0;
}
.dim-input:focus { outline: none; border-color: #e91e63; }
.dim-input::placeholder { font-weight: 400; color: #94a3b8; }

/* ── Action Buttons ────────────────────────────────────────── */
.btn-pdf {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.4rem 0.65rem; border-radius: 0.75rem;
    border: 1px solid transparent; color: #dc2626;
    background: transparent; cursor: pointer; transition: all 0.2s ease;
    flex-shrink: 0; touch-action: manipulation;
}
.btn-pdf:hover { background: #fef2f2; border-color: #fecaca; }
.btn-pdf:active { transform: scale(0.95); }

.btn-compare {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.4rem 0.65rem; border-radius: 0.75rem;
    border: 1px solid transparent; color: #7c3aed;
    background: transparent; cursor: pointer; transition: all 0.2s ease;
    flex-shrink: 0; touch-action: manipulation;
}
.btn-compare:hover { background: #f5f3ff; border-color: #ddd6fe; }
.btn-compare:active { transform: scale(0.95); }

/* ── Merge Queue ───────────────────────────────────────────── */
.merge-queue-item {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.5rem 0.75rem; background: #fff;
    border: 1px solid #e2e8f0; border-radius: 0.75rem;
    transition: all 0.2s ease;
}
.merge-queue-item:hover { border-color: #cbd5e1; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.merge-queue-item.dragging { opacity: 0.5; border-color: #6366f1; background: #eef2ff; }
.merge-page-num {
    width: 1.5rem; height: 1.5rem;
    display: flex; align-items: center; justify-content: center;
    background: #e0e7ff; color: #4338ca;
    font-size: 0.7rem; font-weight: 800; border-radius: 9999px; flex-shrink: 0;
}
.merge-thumb { width: 3rem; height: 3rem; object-fit: cover; border-radius: 0.5rem; border: 1px solid #e2e8f0; flex-shrink: 0; }
.merge-controls { display: flex; flex-direction: column; gap: 0.15rem; flex-shrink: 0; }
.merge-btn {
    padding: 0.15rem; border-radius: 0.25rem; border: none;
    background: transparent; color: #94a3b8; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: all 0.15s ease;
}
.merge-btn:hover { background: #f1f5f9; color: #475569; }
.merge-btn.remove:hover { background: #fef2f2; color: #dc2626; }

/* ── PDF2JPG Results ───────────────────────────────────────── */
.pdf2jpg-result-item {
    background: #fff; border: 1px solid #e2e8f0;
    border-radius: 0.75rem; overflow: hidden; transition: all 0.2s ease;
}
.pdf2jpg-result-item:hover { border-color: #c4b5fd; box-shadow: 0 4px 12px rgba(124,58,237,0.1); }
.pdf2jpg-result-item img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.pdf2jpg-result-item .pdf2jpg-item-actions { padding: 0.5rem; display: flex; gap: 0.25rem; }

/* ── Advanced Settings Accordion ────────────────────────────── */
details.advanced-settings {
    border: 1px solid #e2e8f0; border-radius: 0.75rem;
    overflow: hidden; margin-top: 0.75rem;
}
details.advanced-settings summary {
    padding: 0.75rem 1rem; font-size: 0.8rem; font-weight: 700;
    color: #64748b; cursor: pointer; background: #f8fafc;
    transition: all 0.2s ease; list-style: none;
    display: flex; align-items: center; gap: 0.5rem; user-select: none;
}
details.advanced-settings summary::-webkit-details-marker { display: none; }
details.advanced-settings summary::after {
    content: ''; margin-left: auto;
    width: 0; height: 0;
    border-left: 4px solid transparent; border-right: 4px solid transparent;
    border-top: 5px solid #94a3b8; transition: transform 0.2s ease;
}
details.advanced-settings[open] summary::after { transform: rotate(180deg); }
details.advanced-settings summary:hover { background: #f1f5f9; color: #475569; }
details.advanced-settings .advanced-content { padding: 1rem; background: #fff; }

/* ── Compare Modal ─────────────────────────────────────────── */
.compare-container { position: relative; overflow: hidden; }
#compareOverlay { position: absolute; top: 0; left: 0; height: 100%; overflow: hidden; }
#compareSliderHandle {
    position: absolute; top: 0; bottom: 0; width: 2px;
    background: white; cursor: ew-resize; z-index: 10;
}
#compareSliderHandle > div {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
    width: 2rem; height: 2rem; background: white; border-radius: 9999px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: flex; align-items: center; justify-content: center;
}

/* ── Ad Slots ──────────────────────────────────────────────── */
.ad-slot {
    min-height: 90px; background: #f8fafc;
    border: 1px dashed #cbd5e1; border-radius: 0.75rem;
    display: flex; align-items: center; justify-content: center;
    color: #94a3b8; font-size: 0.875rem;
    margin: 2.5rem auto; max-width: 728px;
    overflow: hidden;
}
.ad-slot-leaderboard { min-height: 90px; }
.ad-slot-rectangle { min-height: 250px; max-width: 336px; }

/* ── Search Bar ────────────────────────────────────────────── */
.search-bar {
    max-width: 480px; margin: 0 auto 2rem; position: relative;
}
.search-bar input {
    width: 100%; padding: 0.875rem 1rem 0.875rem 3rem;
    border: 2px solid #e2e8f0; border-radius: 1rem;
    font-size: 1rem; font-weight: 500; color: #1e293b;
    background: #fff; transition: all 0.2s ease;
    font-family: inherit;
}
.search-bar input:focus { outline: none; border-color: #e91e63; box-shadow: 0 0 0 3px rgba(233,30,99,0.12), 0 4px 16px rgba(233,30,99,0.08); }
.search-bar .search-icon {
    position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
    color: #94a3b8; pointer-events: none;
}
.search-bar .search-icon-btn {
    position: absolute; left: 0; top: 0; bottom: 0; width: 3rem;
    background: none; border: none; cursor: pointer; z-index: 2;
    display: flex; align-items: center; justify-content: center;
    border-radius: 1rem 0 0 1rem; transition: background 0.15s ease;
    padding: 0; margin: 0; line-height: 1;
}
.search-bar .search-icon-btn:hover { background: rgba(59,130,246,0.06); }
/* Task 6: Fix icon centering — ensure SVG sits dead-center in button */
.search-bar .search-icon-btn .search-icon {
    position: static;
    transform: none;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    vertical-align: middle;
    margin: 0;
    padding: 0;
    line-height: 1;
    width: 20px;
    height: 20px;
}

/* ── Trust Badges ──────────────────────────────────────────── */
.trust-badge {
    display: flex; flex-direction: column; align-items: center;
    gap: 0.5rem; padding: 1.25rem;
    background: #fff; border: 1px solid #e2e8f0; border-radius: 1rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, box-shadow;
}
.trust-badge:hover {
    border-color: transparent;
    box-shadow: 0 8px 20px -4px rgba(59,130,246,0.12), 0 4px 8px -2px rgba(0,0,0,0.05);
    transform: translateY(-3px);
}
.trust-badge-icon {
    width: 3rem; height: 3rem; border-radius: 0.75rem;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.trust-badge:hover .trust-badge-icon { transform: scale(1.08); }

/* ── Tool Cards ────────────────────────────────────────────── */
.tool-card {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 1rem;
    padding: 1.75rem; cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; align-items: flex-start;
    text-decoration: none; color: inherit;
    min-height: 180px;
    will-change: transform, box-shadow;
}
.tool-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: #e91e63;
    opacity: 0; transition: opacity 0.3s ease;
}
.tool-card:hover {
    border-color: #e91e63;
    box-shadow: 0 8px 20px -4px rgba(233,30,99,0.10), 0 4px 8px -2px rgba(0,0,0,0.06);
    transform: translateY(-3px);
}
.tool-card:hover::before { opacity: 1; }
.tool-card:active { transform: translateY(-2px); transition-duration: 0.1s; }
.tool-card-icon {
    width: 3.5rem; height: 3.5rem; border-radius: 0.875rem;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1rem;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.tool-card:hover .tool-card-icon { transform: scale(1.08); }
.tool-card-icon svg {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.tool-card:hover .tool-card-icon svg { transform: scale(1.05); }
.tool-card-title { font-size: 1.125rem; font-weight: 800; color: #0f172a; margin-bottom: 0.5rem; line-height: 1.3; }
.tool-card-desc { font-size: 0.85rem; color: #64748b; line-height: 1.6; flex: 1; }
.tool-card-tag {
    display: inline-block; margin-top: 0.75rem;
    padding: 0.2rem 0.7rem; border-radius: 9999px;
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.02em;
}
.tool-card-tag.blue   { background: #eff6ff; color: #2563eb; }
.tool-card-tag.indigo { background: #eef2ff; color: #4338ca; }
.tool-card-tag.orange { background: #fff7ed; color: #c2410c; }
.tool-card-tag.purple { background: #faf5ff; color: #7c3aed; }
.tool-card-tag.emerald{ background: #ecfdf5; color: #059669; }
.tool-card-tag.rose   { background: #fff1f2; color: #e11d48; }
.tool-card-tag.teal   { background: #f0fdfa; color: #0d9488; }
.tool-card-tag.cyan   { background: #ecfeff; color: #0891b2; }
.tool-card-tag.amber  { background: #fffbeb; color: #d97706; }
.tool-card-tag.lime   { background: #f7fee7; color: #65a30d; }

/* ── Premium Icon Wrapper (Duotone Style) ─────────────────── */
.premium-icon-wrapper {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease;
}
.premium-icon-wrapper svg {
    width: 24px; height: 24px;
}
/* Dark mode premium icon wrappers — all use cerise accent */
.dark-mode .premium-icon-wrapper.blue,
.dark-mode .premium-icon-wrapper.indigo,
.dark-mode .premium-icon-wrapper.purple,
.dark-mode .premium-icon-wrapper.emerald,
.dark-mode .premium-icon-wrapper.orange,
.dark-mode .premium-icon-wrapper.red,
.dark-mode .premium-icon-wrapper.teal,
.dark-mode .premium-icon-wrapper.amber,
.dark-mode .premium-icon-wrapper.rose,
.dark-mode .premium-icon-wrapper.pink,
.dark-mode .premium-icon-wrapper.green,
.dark-mode .premium-icon-wrapper.cyan,
.dark-mode .premium-icon-wrapper.brand {
    background: #3b0f2a; color: #f472b6;
}
/* Color variants — ALL use signature cerise accent (single-brand identity) */
.premium-icon-wrapper.blue,
.premium-icon-wrapper.indigo,
.premium-icon-wrapper.purple,
.premium-icon-wrapper.emerald,
.premium-icon-wrapper.orange,
.premium-icon-wrapper.red,
.premium-icon-wrapper.teal,
.premium-icon-wrapper.amber,
.premium-icon-wrapper.rose,
.premium-icon-wrapper.pink,
.premium-icon-wrapper.green,
.premium-icon-wrapper.cyan,
.premium-icon-wrapper.brand {
    background: #fdf2f8; color: #be185b;
}

/* Featured tool cards — premium icon sizing */
.featured-tool-card .premium-icon-wrapper {
    width: 48px; height: 48px;
    margin-bottom: 0.75rem;
}
.featured-tool-card:hover .premium-icon-wrapper { transform: scale(1.08); }

/* Category cards — premium icon sizing */
.category-card .premium-icon-wrapper {
    width: 40px; height: 40px;
}
.category-card .premium-icon-wrapper svg { width: 20px; height: 20px; }
.category-card:hover .premium-icon-wrapper { transform: scale(1.08); }

/* Tool cards — premium icon sizing */
.tool-card .premium-icon-wrapper {
    width: 48px; height: 48px;
    margin-bottom: 1rem;
}
.tool-card:hover .premium-icon-wrapper { transform: scale(1.08); }

/* How It Works — premium icon sizing */
#how-it-works .premium-icon-wrapper {
    width: 48px; height: 48px;
    margin-bottom: 1rem;
}
#how-it-works .p-6:hover .premium-icon-wrapper {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Trust Signals — premium icon sizing */
.premium-icon-wrapper.stat-icon {
    width: 48px; height: 48px;
    margin-bottom: 0.75rem;
}

/* Dark Mode: Premium Icon Wrapper — all cerise (duplicate removed, kept one rule) */

/* ── Badge Pop Hover (for all card badges/tags) ──────────── */
.tool-card:hover .tool-card-tag,
.featured-tool-card:hover .featured-badge {
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* ── Performance: Content Visibility for below-fold sections ── */
.category-section { content-visibility: auto; contain-intrinsic-size: auto 400px; }
.tools-grid { content-visibility: auto; contain-intrinsic-size: auto 600px; }

/* ── Blog Cards ────────────────────────────────────────────── */
.blog-card {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 1rem;
    overflow: hidden; transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; flex-direction: column; text-decoration: none; color: inherit;
    will-change: transform, box-shadow;
}
.blog-card:hover { border-color: #e91e63; box-shadow: 0 8px 20px -4px rgba(233,30,99,0.10), 0 4px 8px -2px rgba(0,0,0,0.06); transform: translateY(-3px); }
.blog-card:focus-visible { outline: 2px solid #e91e63; outline-offset: 2px; }
.blog-card-thumb { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: #f1f5f9; display:flex; align-items:center; justify-content:center; }
.blog-card-thumb svg { width: 56px; height: 56px; opacity: 0.9; color: #0f172a; }
.blog-card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.blog-card-tag { font-size: 0.7rem; font-weight: 700; color: #e91e63; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.5rem; }
.blog-card-title { font-size: 1.05rem; font-weight: 800; color: #0f172a; line-height: 1.4; margin-bottom: 0.5rem; }
.blog-card-excerpt { font-size: 0.85rem; color: #475569; line-height: 1.6; flex: 1; }
.blog-card-meta { font-size: 0.75rem; color: #64748b; margin-top: 0.75rem; }

/* Blog card grid — single responsive container */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

/* Dark Mode: Blog Cards */
.dark-mode .blog-card { background: #272a33 !important; border-color: #3d4455 !important; }
.dark-mode .blog-card:hover { border-color: #f472b6 !important; }
.dark-mode .blog-card-title { color: #f1f5f9 !important; }
.dark-mode .blog-card-excerpt { color: #94a3b8 !important; }
.dark-mode .blog-card-meta { color: #94a3b8 !important; }

/* Task 1: Dark Mode Blog Card Thumbnail — tame blinding pastels */
.dark-mode .blog-card-thumb {
    background: #272a33 !important;
}
.dark-mode .blog-card-thumb svg {
    color: #e2e8f0 !important;
    opacity: 0.85;
}
/* Override any inline pastel backgrounds on blog card thumbnails */
.dark-mode .blog-card [style*="background:#dbeafe"],
.dark-mode .blog-card [style*="background:#fee2e2"],
.dark-mode .blog-card [style*="background:#e0e7ff"],
.dark-mode .blog-card [style*="background:#ede9fe"],
.dark-mode .blog-card [style*="background:#d1fae5"],
.dark-mode .blog-card [style*="background:#cffafe"],
.dark-mode .blog-card [style*="background:#fef3c7"],
.dark-mode .blog-card [style*="background:#ffe4e6"],
.dark-mode .blog-card [style*="background:#dcfce7"],
.dark-mode .blog-card [style*="background:#fce7f3"],
.dark-mode .blog-card [style*="background:#ffedd5"],
.dark-mode .blog-card [style*="background:#f0fdfa"],
.dark-mode .blog-card [style*="background:#ecfeff"],
.dark-mode .blog-card [style*="background:#f7fee7"],
.dark-mode .blog-card [style*="background:#ecfdf5"],
.dark-mode .blog-card [style*="background:#eef2ff"],
.dark-mode .blog-card [style*="background:#eff6ff"],
.dark-mode .blog-card [style*="background:#fff7ed"],
.dark-mode .blog-card [style*="background:#faf5ff"],
.dark-mode .blog-card [style*="background:#fff1f2"],
.dark-mode .blog-card [style*="background:#fffbeb"],
.dark-mode .blog-card [style*="background:#f1f5f9"],
.dark-mode .blog-card .blog-card-thumb[style] {
    background-color: #272a33 !important;
    border: 1px solid #3d4455;
}

/* ── Blog Post Content ─────────────────────────────────────── */
.blog-content { max-width: 720px; margin: 0 auto; }
.blog-content h2 { font-size: 1.5rem; font-weight: 800; color: #0f172a; margin: 2rem 0 0.75rem; }
.blog-content h3 { font-size: 1.2rem; font-weight: 700; color: #1e293b; margin: 1.5rem 0 0.5rem; }
.blog-content p { font-size: 1rem; line-height: 1.8; color: #475569; margin: 0 0 1rem; }
.blog-content ul, .blog-content ol { padding-left: 1.5rem; margin: 0 0 1rem; }
.blog-content li { font-size: 1rem; line-height: 1.8; color: #475569; margin-bottom: 0.25rem; }
.blog-content a { color: #2563eb; text-decoration: underline; text-underline-offset: 2px; }
.blog-content a:hover { color: #1d4ed8; }
.blog-content strong { color: #1e293b; }
.blog-content blockquote {
    border-left: 4px solid #3b82f6; padding: 0.75rem 1.25rem;
    margin: 1.5rem 0; background: #eff6ff; border-radius: 0 0.5rem 0.5rem 0;
    font-style: italic; color: #1e3a8a;
}

/* ── Tool Documentation Sections (AdSense Content Engine) ─── */
.tool-doc-section {
    max-width: 56rem; margin: 0 auto;
    padding: 2rem 1rem;
}
.tool-doc-section h2 {
    font-size: 1.25rem; font-weight: 800; color: #0f172a;
    margin-top: 2rem; margin-bottom: 1rem;
}
.tool-doc-section p {
    font-size: 0.95rem; line-height: 1.8; color: #475569;
    margin-bottom: 1rem;
}
.tool-doc-section ol {
    padding-left: 1.5rem; margin: 0 0 1rem;
}
.tool-doc-section ol li {
    font-size: 0.95rem; line-height: 1.8; color: #475569;
    margin-bottom: 0.5rem;
}
.dark-mode .tool-doc-section h2 { color: #f1f5f9 !important; }
.dark-mode .tool-doc-section p,
.dark-mode .tool-doc-section ol li { color: #cbd5e1 !important; }

/* ── Collapsible SEO Prose (details/summary) ─────────────── */
details.seo-collapse {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    overflow: hidden;
    margin-top: 1rem;
}
details.seo-collapse summary {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    background: #f8fafc;
    transition: all 0.2s ease;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    user-select: none;
}
details.seo-collapse summary::-webkit-details-marker { display: none; }
details.seo-collapse summary::after {
    content: ''; margin-left: auto;
    width: 0; height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #94a3b8;
    transition: transform 0.2s ease;
}
details.seo-collapse[open] summary::after { transform: rotate(180deg); }
details.seo-collapse summary:hover { background: #f1f5f9; color: #1e293b; }
details.seo-collapse .seo-collapse-content { padding: 1rem 1.25rem; }
.dark-mode details.seo-collapse { border-color: #3d4455 !important; }
.dark-mode details.seo-collapse summary { background: #272a33 !important; color: #a1a7b3 !important; }
.dark-mode details.seo-collapse summary::after { border-top-color: #64748b; }
.dark-mode details.seo-collapse summary:hover { background: #334155 !important; color: #e2e8f0 !important; }
.dark-mode details.seo-collapse .seo-collapse-content { background: #1e293b !important; }

/* ── CTA Button ────────────────────────────────────────────── */
.cta-btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.875rem 1.75rem; background: #e91e63; color: #fff;
    font-weight: 700; font-size: 0.95rem; border-radius: 0.75rem;
    text-decoration: none; transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(233,30,99,0.3);
}
.cta-btn:hover { background: #be185b; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(233,30,99,0.4); }

/* ── Hero Typography Enhancement ──────────────────────────── */
/* Premium text gradient for hero headline — cerise brand accent */
h1 .text-transparent.bg-clip-text {
    background-image: linear-gradient(135deg, #e91e63 0%, #ec4899 50%, #f472b6 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

/* ── "How It Works" Icon Enhancement ──────────────────────── */
#how-it-works .w-12 {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease;
}
#how-it-works .p-6:hover .w-12 {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
#how-it-works .p-6 {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 1rem;
}
#how-it-works .p-6:hover {
    transform: translateY(-2px);
}

/* ── Header ────────────────────────────────────────────────── */
.site-header {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226,232,240,0.6);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    position: sticky; top: 0; z-index: 1000;
    height: 64px;
    margin: 0;
    padding: 0;
    transition: box-shadow 0.2s ease, background 0.2s ease;
}
.site-header.scrolled {
    background: rgba(255,255,255,0.95);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.dark-mode .site-header.scrolled {
    background: rgba(15,23,42,0.95);
}
.header-inner {
    max-width: 1200px; margin: 0 auto;
    padding: 0 24px; height: 64px;
    display: flex; align-items: center; justify-content: space-between;
}
.site-logo { display: flex; align-items: center; text-decoration: none; }
.logo-text {
  font-size: 24px;
  font-weight: 800;
  text-decoration: none;
  color: #1a1a2e;
  letter-spacing: -0.8px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1;
}
.logo-text span {
  color: #e91e63;
}
.logo-mark {
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
    flex-shrink: 0;
}
.header-nav { display: flex; align-items: center; gap: 0.75rem; }
.header-nav a, .header-nav .nav-link {
    font-size: 14px; font-weight: 500; color: #374151;
    text-decoration: none; transition: all 0.15s ease;
    padding: 8px 12px; border-radius: 6px;
    display: inline-flex; align-items: center; gap: 0.375rem;
    line-height: 1;
    vertical-align: middle;
}
.header-nav a:hover, .header-nav .nav-link:hover { background: #f3f4f6; color: #111827; }

/* "All Tools" nav link — signature accent, visually distinct */
.nav-all-tools {
    background: #fdf2f8 !important;
    color: #be185b !important;
    font-weight: 600 !important;
    border: 1px solid #f9a8d4;
    border-radius: 8px !important;
    padding: 7px 14px !important;
}
.nav-all-tools:hover {
    background: #e91e63 !important;
    color: #fff !important;
    border-color: #e91e63 !important;
}
.dark-mode .nav-all-tools {
    background: #3b0f2a !important;
    color: #f472b6 !important;
    border-color: #9d174d !important;
}
.dark-mode .nav-all-tools:hover {
    background: #e91e63 !important;
    color: #fff !important;
    border-color: #e91e63 !important;
}
.privacy-badge {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 500; color: #16a34a;
    background: #f0fdf4; border: 1px solid #bbf7d0;
    padding: 4px 12px; border-radius: 20px;
}
.privacy-badge .dot { width: 6px; height: 6px; border-radius: 9999px; background: #22c55e; }
.back-link {
    display: inline-flex; align-items: center; gap: 0.375rem;
    font-size: 14px; font-weight: 500; color: #374151;
    text-decoration: none; transition: all 0.15s ease;
    padding: 8px 12px; border-radius: 6px;
}
.back-link:hover { background: #f3f4f6; color: #111827; }

/* ── Feedback Button (Nav) ─────────────────────────────────── */
.nav-feedback-btn {
    display: inline-flex; align-items: center; gap: 0.375rem;
    padding: 7px 16px; font-size: 13px; font-weight: 600;
    color: #e91e63;
    border: 1px solid #e91e63;
    border-radius: 8px; background: transparent;
    text-decoration: none; cursor: pointer;
    transition: all 0.2s ease; white-space: nowrap;
    line-height: 1;
}
.nav-feedback-btn:hover {
    background: #fdf2f8; border-color: #be185b; color: #be185b;
}
.nav-feedback-btn svg {
    width: 14px; height: 14px; flex-shrink: 0;
}
.dark-mode .nav-feedback-btn {
    color: #f472b6 !important;
    border-color: #f472b6 !important;
    background: transparent !important;
}
.dark-mode .nav-feedback-btn:hover {
    background: rgba(233,30,99,0.15) !important;
    border-color: #f9a8d4 !important;
    color: #f9a8d4 !important;
}

/* ── Mega Menu ─────────────────────────────────────────────── */
.nav-categories { position: relative; }
.nav-categories .nav-link {
    cursor: default;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    line-height: 1;
}
.nav-categories .nav-link svg {
    transition: transform 0.2s ease;
    flex-shrink: 0;
    display: block;
}
.nav-categories:hover .nav-link svg { transform: rotate(180deg); }
.nav-categories:hover .mega-menu {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.mega-menu {
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: visibility 0s linear 0.15s, opacity 0.15s ease, transform 0.15s ease;
    position: fixed;
    top: 72px;
    left: 50%;
    transform: translateY(-8px) translateX(-50%);
    width: calc(100vw - 40px);
    max-width: 1100px;
    background: #ffffff;
    box-shadow: 0 12px 48px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0;
    z-index: 999;
    padding: 32px;
    overflow: hidden;
    border-radius: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}
.nav-categories:hover .mega-menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0) translateX(-50%);
    transition-delay: 0s;
}
.mega-menu-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.75rem;
}
.mega-menu-group h3 {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    margin-bottom: 0.875rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f1f5f9;
    line-height: 1.4;
}
.mega-menu-item {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.5rem 0.625rem;
    margin-bottom: 4px;
    border-radius: 0.5rem;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
    white-space: nowrap;
    overflow: hidden;
    line-height: 1.5;
}
.mega-menu-item:hover { background: #f1f5f9; }
.mega-menu-item .mm-info { flex: 1; min-width: 0; overflow: hidden; }
.mega-menu-item .mm-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #1e293b;
    display: block;
    letter-spacing: -0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mega-menu-item .mm-count {
    font-size: 0.68rem;
    color: #94a3b8;
    display: block;
    margin-top: 1px;
    font-weight: 500;
}
.mega-menu-item:hover .mm-name { color: #2563eb; }

.mega-menu-footer {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid #f1f5f9;
    text-align: center;
}
.mega-menu-footer a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.75rem;
    background: #eff6ff;
    color: #2563eb;
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 0.625rem;
    transition: all 0.15s ease;
    letter-spacing: 0.01em;
}
.mega-menu-footer a:hover { background: #2563eb; color: #fff; }

/* Mega-menu responsive: 5→4→3→2 columns */
@media (max-width: 1200px) {
    .mega-menu-inner { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
    .mega-menu { width: calc(100vw - 32px); max-width: 960px; }
}
@media (max-width: 992px) {
    .mega-menu-inner { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
    .mega-menu { padding: 24px; }
}
@media (max-width: 640px) {
    .mega-menu-inner { grid-template-columns: repeat(2, 1fr); gap: 1rem; padding: 0 16px; }
    .mega-menu { width: calc(100vw - 16px); padding: 20px; border-radius: 12px; }
}

/* ── Task 2: User Hub Dropdown ─────────────────────────────── */
.user-hub { position: relative; }
.user-hub-trigger {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border: none; background: transparent;
    border-radius: 8px; cursor: pointer; color: #64748b;
    transition: all 0.15s ease;
}
.user-hub-trigger:hover { background: #f1f5f9; color: #1e293b; }
.user-hub-dropdown {
    visibility: hidden; opacity: 0;
    transform: translateY(-6px);
    transition: visibility 0s linear 0.15s, opacity 0.15s ease, transform 0.15s ease;
    position: absolute; top: 100%; right: 0;
    width: 340px; max-height: 420px;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.04);
    z-index: 1000; overflow: hidden;
    margin-top: 8px;
    color: #1e293b !important;
}
.user-hub:hover .user-hub-dropdown,
.user-hub.open .user-hub-dropdown {
    visibility: visible; opacity: 1; transform: translateY(0);
    transition-delay: 0s;
}
.user-hub-tabs {
    display: flex; border-bottom: 1px solid #f1f5f9;
    padding: 0.25rem 0.25rem 0;
}
.user-hub-tab {
    flex: 1; padding: 0.625rem 0.75rem;
    font-size: 0.8rem; font-weight: 600; color: #64748b !important;
    background: transparent !important; border: none; cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.15s ease; text-align: center;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
.user-hub-tab:hover { color: #1e293b; }
.user-hub-tab.active { color: #2563eb; border-bottom-color: #2563eb; }
.user-hub-panel {
    max-height: 340px; overflow-y: auto; padding: 0.5rem;
}
.user-hub-empty {
    text-align: center; padding: 2rem 1rem;
    font-size: 0.85rem; font-weight: 600; color: #94a3b8;
    line-height: 1.6;
}
.user-hub-empty span { font-weight: 400; font-size: 0.78rem; }
.user-hub-item {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.625rem 0.75rem; border-radius: 8px;
    text-decoration: none; color: inherit;
    transition: background 0.15s ease;
}
.user-hub-item:hover { background: #f1f5f9; }
.user-hub-item-name {
    font-size: 0.85rem; font-weight: 600; color: #1e293b;
    flex: 1; min-width: 0; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap;
}
.user-hub-item-cat {
    font-size: 0.65rem; font-weight: 600; color: #94a3b8;
    background: #f1f5f9; padding: 0.1rem 0.4rem;
    border-radius: 4px; flex-shrink: 0;
    text-transform: capitalize;
}
.user-hub-item-remove {
    background: none; border: none; cursor: pointer;
    color: #cbd5e1; padding: 2px; border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s ease; flex-shrink: 0;
}
.user-hub-item-remove:hover { color: #ef4444; background: #fef2f2; }

/* Dark Mode: User Hub */
.dark-mode .user-hub-trigger { color: #94a3b8; }
.dark-mode .user-hub-trigger:hover { background: #2e3138; color: #e2e8f0; }
.dark-mode .user-hub-dropdown {
    background: #272a33 !important; border-color: #3d4455 !important;
    box-shadow: 0 12px 40px rgba(0,0,0,0.3), 0 2px 8px rgba(0,0,0,0.12) !important;
    color: #e2e8f0 !important;
}
.dark-mode .user-hub-tabs { border-bottom-color: #2e3138 !important; }
.dark-mode .user-hub-tab { color: #94a3b8 !important; }
.dark-mode .user-hub-tab:hover { color: #e2e8f0 !important; }
.dark-mode .user-hub-tab.active { color: #60a5fa !important; border-bottom-color: #3b82f6 !important; }
.dark-mode .user-hub-item:hover { background: #2e3138 !important; }
.dark-mode .user-hub-item-name { color: #f1f5f9 !important; }
.dark-mode .user-hub-item-cat { background: #2e3138 !important; color: #a1a7b3 !important; }
.dark-mode .user-hub-item-remove { color: #4b5563 !important; }
.dark-mode .user-hub-item-remove:hover { color: #f87171 !important; background: #3b1a1a !important; }
.dark-mode .user-hub-empty { color: #6b7280 !important; }


@media (max-width: 480px) {
    .user-hub-dropdown { width: 280px; }
}

/* ── Tools Sidebar (tools.html) ────────────────────────────── */
.tools-layout {
    display: flex;
    gap: 0;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 600px;
}
.tools-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    padding: 1rem 0.75rem;
    position: sticky;
    top: 4rem;
    height: calc(100vh - 4rem);
    overflow-y: auto;
}
.tools-sidebar-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    padding: 0.5rem 0.75rem 0.75rem;
}
.tools-sidebar-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 0.75rem;
    border-radius: 0.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    text-align: left;
    color: #475569;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    border-left: 3px solid transparent;
}
.tools-sidebar-item:hover {
    background: #f8fafc;
    color: #1e293b;
}
.tools-sidebar-item.active {
    background: linear-gradient(90deg, #eff6ff, #dbeafe);
    color: #2563eb;
    border-left-color: #2563eb;
    font-weight: 700;
    box-shadow: 2px 0 8px -2px rgba(59,130,246,0.1);
}
.tools-sidebar-item .sidebar-count {
    font-size: 0.7rem;
    font-weight: 500;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 0.1rem 0.4rem;
    border-radius: 9999px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.tools-sidebar-item.active .sidebar-count {
    background: #dbeafe;
    color: #2563eb;
}
.tools-content {
    flex: 1;
    min-width: 0;
    padding: 1.5rem;
}
.tools-content-header {
    margin-bottom: 1.5rem;
}
.tools-content-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
}
.tools-content-header .result-count {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 0.25rem;
}
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}
.tools-grid .tool-card {
    min-height: 140px;
    padding: 1.25rem;
}
.tools-grid .tool-card-title { font-size: 0.95rem; }
.tools-grid .tool-card-desc { font-size: 0.8rem; }

/* Mobile: 3-column dense tools grid */
@media (max-width: 640px) {
    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }
    .tools-grid .tool-card {
        min-height: auto;
        padding: 0.5rem;
        border-radius: 0.625rem;
        text-align: center;
        align-items: center;
    }
    .tools-grid .tool-card-title {
        font-size: 0.65rem;
        font-weight: 700;
        line-height: 1.3;
        margin-bottom: 0.15rem;
        word-break: normal;
        overflow-wrap: normal;
    }
    .tools-grid .tool-card-desc { display: none; }
    .tools-grid .tool-card-tag {
        font-size: 0.5rem;
        padding: 0.1rem 0.3rem;
        margin-top: 0.25rem;
    }
    .tools-grid .tool-card-icon {
        width: 1.75rem;
        height: 1.75rem;
        margin-bottom: 0.35rem;
    }
    .tools-grid .tool-card-icon svg {
        width: 1rem;
        height: 1rem;
    }
}

/* Mobile compact: horizontal card layout at ≤480px */
@media (max-width: 480px) {
    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.375rem;
    }
    .tools-grid .tool-card {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        padding: 0.375rem 0.5rem;
        min-height: auto;
        border-radius: 0.5rem;
    }
    .tools-grid .tool-card-title {
        font-size: 0.6rem;
        font-weight: 700;
        line-height: 1.25;
        margin-bottom: 0.125rem;
        /* 2-line clamp with ellipsis */
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        word-break: normal;
        overflow-wrap: normal;
    }
    .tools-grid .tool-card-desc { display: none; }
    .tools-grid .tool-card-tag {
        font-size: 0.45rem;
        padding: 0.05rem 0.25rem;
        margin-top: 0;
        display: inline-block;
        letter-spacing: 0;
    }
    .tools-grid .tool-card-icon {
        width: 1.25rem;
        height: 1.25rem;
        margin-bottom: 0.25rem;
    }
    .tools-grid .tool-card-icon svg {
        width: 0.75rem;
        height: 0.75rem;
    }
}
.load-more-btn {
    display: block;
    margin: 2rem auto 0;
    padding: 0.75rem 2rem;
    background: #fff;
    color: #2563eb;
    font-weight: 700;
    font-size: 0.9rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.load-more-btn:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    box-shadow: 0 4px 12px rgba(59,130,246,0.1);
    transform: translateY(-1px);
}
.dark-mode .load-more-btn {
    background: #1e293b !important;
    color: #60a5fa !important;
    border-color: #334155 !important;
}
.dark-mode .load-more-btn:hover {
    background: #1e3a5f !important;
    border-color: #3b82f6 !important;
}

/* ── Featured Tools (Homepage) ─────────────────────────────── */
.featured-tools-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
}
.featured-tool-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-top: 3px solid #e91e63;
    border-radius: 1rem;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
    will-change: transform, box-shadow;
}
.featured-tool-card:hover {
    border-color: #e91e63;
    border-top-color: #be185b;
    box-shadow: 0 8px 20px -4px rgba(233,30,99,0.15), 0 4px 8px -2px rgba(0,0,0,0.06);
    transform: translateY(-3px);
}
.featured-tool-card:focus-visible {
    outline: 2px solid #e91e63;
    outline-offset: 2px;
}
.featured-tool-card:active { transform: translateY(-2px); transition-duration: 0.1s; }
.featured-tool-card .featured-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.featured-tool-card:hover .featured-icon { transform: scale(1.08); }
.featured-tool-card .featured-name {
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.375rem;
}
.featured-tool-card .featured-desc {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.5;
    flex: 1;
}
.featured-tool-card .featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    margin-top: 0.625rem;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.65rem;
    font-weight: 700;
    background: #fdf2f8;
    color: #be185b;
    letter-spacing: 0.02em;
}

/* ── Category Grid (Homepage) ──────────────────────────────── */
.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    width: 100%;
    max-width: 100%;
}
.category-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    min-width: 0;
    overflow-wrap: break-word;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    display: flex;
    align-items: center;
    gap: 0.875rem;
}
.category-card:hover {
    border-color: #e91e63;
    box-shadow: 0 2px 8px rgba(233,30,99,0.08);
}
.category-card:focus-visible {
    outline: 2px solid #e91e63;
    outline-offset: 2px;
}
.category-card:active { background: #fdf2f8; }
.category-card .cat-emoji {
    font-size: 1.35rem;
    line-height: 1;
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 0.75rem;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: #334155;
}
.category-card:hover .cat-emoji { transform: scale(1.08); }
.category-card .cat-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.category-card .cat-name {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    letter-spacing: -0.01em;
    display: block;
}
.category-card .cat-count {
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 500;
    line-height: 1;
    display: block;
    letter-spacing: 0.01em;
}
.category-card .cat-arrow {
    color: #cbd5e1;
    font-size: 1.1rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    margin-left: auto;
}
.category-card:hover .cat-arrow { color: #e91e63; transform: translateX(4px); }

/* ── Stats Strip (Homepage) ────────────────────────────────── */
.stats-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    font-size: 0.8rem;
    color: #475569;
    font-weight: 500;
}
.stats-strip .stats-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #cbd5e1;
    flex-shrink: 0;
}

/* ── New Tools Strip (Homepage) ────────────────────────────── */
.new-tools-strip {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.new-tool-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    text-decoration: none;
    color: #1e293b;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.15s ease;
}
.new-tool-pill:hover {
    border-color: #93c5fd;
    background: #eff6ff;
    color: #2563eb;
}
.new-tool-pill .new-badge {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #15803d;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 0.15rem 0.45rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

@media (max-width: 768px) {
    .header-nav { gap: 0.25rem; }
    .header-nav .hide-mobile { display: none; }
    .privacy-badge span { display: none; }
    .mega-menu { display: none !important; }
    .tools-sidebar { display: none; }
    .tools-layout { flex-direction: column; }
    .featured-tools-row { grid-template-columns: repeat(6, minmax(180px, 1fr)); overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding-bottom: 0.5rem; }
    .featured-tools-row::-webkit-scrollbar { display: none; }
    .featured-tool-card { scroll-snap-align: start; min-width: 180px; }
    .category-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
        width: 100%;
        max-width: 100%;
    }
    .new-tools-strip { gap: 0.5rem; }
    .new-tool-pill { font-size: 0.8rem; padding: 0.4rem 0.75rem; }
    .search-bar { max-width: 100%; }
    .search-bar input { padding: 0.875rem 1rem 0.875rem 2.75rem; font-size: 16px; }
    .featured-tool-card { min-height: 48px; }
    .category-card {
        min-height: auto;
        padding: 0.5rem;
        gap: 0.35rem;
        flex-direction: column;
        text-align: center;
        border-radius: 0.625rem;
    }
    .category-card .cat-name {
        font-size: 0.65rem;
        font-weight: 700;
        word-break: keep-all;
        overflow-wrap: normal;
        hyphens: none;
        -webkit-hyphens: none;
        line-height: 1.25;
    }
    .category-card .cat-count {
        font-size: 0.5rem;
        display: none;
    }
    .category-card .cat-emoji {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 1rem;
        border-radius: 0.5rem;
        margin-bottom: 0.15rem;
    }
    .category-card .cat-arrow { display: none; }
    .new-tool-pill { min-height: 48px; display: inline-flex; align-items: center; }
}

/* Prevent word-splitting in category cards at all breakpoints */
.cat-name {
    word-break: keep-all;
    overflow-wrap: normal;
    hyphens: none;
    -webkit-hyphens: none;
}

/* ── Footer ────────────────────────────────────────────────── */
.site-footer {
    background: #fff; border-top: 1px solid #e2e8f0;
    padding: 2.5rem 1.5rem 1.5rem; margin-top: auto;
}
.footer-inner { max-width: 72rem; margin: 0 auto; }
.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: left;
    margin-bottom: 2rem;
    width: 100%;
    max-width: 100%;
}
@media (min-width: 640px) {
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
    .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1.5fr 1fr; }
}
.footer-col {
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
}
.footer-col h4 {
    font-size: 0.85rem; font-weight: 800; color: #0f172a;
    text-transform: uppercase; letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}
.footer-col a {
    display: block; font-size: 0.8rem; color: #64748b;
    text-decoration: none; padding: 0.2rem 0; transition: color 0.2s;
}
.footer-col a:hover { color: #2563eb; }
.footer-about p {
    font-size: 0.8rem; color: #64748b; line-height: 1.7;
    margin-bottom: 0.75rem;
}
.footer-bottom {
    border-top: 1px solid #e2e8f0; padding-top: 1.25rem;
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 0.75rem;
}
.footer-bottom p { color: #94a3b8; font-size: 0.8rem; margin: 0; }
.footer-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.footer-links a {
    font-size: 0.8rem; color: #64748b; text-decoration: none;
    transition: color 0.2s;
}
.footer-links a:hover { color: #2563eb; }

@media (max-width: 480px) {
    .footer-bottom { flex-direction: column; text-align: center; }
    .site-footer { padding: 1.5rem 1rem 1rem; }
    .footer-col > div[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 640px) {
    .tool-card { padding: 1.25rem; }
    .merge-queue-item { padding: 0.4rem 0.5rem; }
    .merge-thumb { width: 2.5rem; height: 2.5rem; }
}

/* ── Touch Responsiveness ──────────────────────────────────── */
.preset-btn, .passport-preset-btn, .resizer-preset-btn,
.stamper-color-btn, .btn-pdf, .btn-compare, .merge-btn {
    -webkit-user-select: none; user-select: none;
}

@media (hover: none) and (pointer: coarse) {
    .btn-pdf, .btn-compare, .merge-btn { min-width: 44px; min-height: 44px; }
}

/* ── Spinner ───────────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
.animate-spin { animation: spin 1s linear infinite; }

/* ── Focus-Visible States (accessibility) ─────────────────── */
.tool-card:focus-visible,
a[role="button"]:focus-visible,
input[type="submit"]:focus-visible {
    outline: 2px solid #e91e63;
    outline-offset: 2px;
}
button:focus-visible,
.btn-pdf:focus-visible,
.btn-compare:focus-visible,
.cta-btn:focus-visible {
    outline: 2px solid #e91e63;
    outline-offset: 2px;
}

/* ── CSS-Only Skeleton Loader ─────────────────────────────── */
@keyframes shimmer {
    0% { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}
.skeleton {
    background: #e2e8f0;
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 800px 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 0.375rem;
    min-height: 1rem;
}
.dark-mode .skeleton {
    background: #2f3340;
    background: linear-gradient(90deg, #2f3340 25%, #3d4455 50%, #2f3340 75%);
    background-size: 800px 100%;
}

/* ── CSS-Only Spinner (for tool actions >300ms) ───────────── */
.spinner-overlay {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.85);
    border-radius: inherit;
    z-index: 10;
    align-items: center;
    justify-content: center;
}
.spinner-overlay.active { display: flex; }
.dark-mode .spinner-overlay { background: rgba(15,23,42,0.85); }
.spinner {
    width: 2.5rem; height: 2.5rem;
    border: 3px solid #e2e8f0;
    border-top-color: #e91e63;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
.dark-mode .spinner { border-color: #3d4455; border-top-color: #f472b6; }

/* ── FAQ Accordion ─────────────────────────────────────────── */
.faq-question {
    cursor: pointer;
    user-select: none;
}

.faq-answer {
    transition: all 0.2s ease;
}

.faq-item.open .faq-icon {
    transform: rotate(180deg);
}

/* ── Tab Switcher ──────────────────────────────────────────── */
.tab-btn {
    color: #64748b;
    background: transparent;
    border: none;
    cursor: pointer;
}
.tab-btn.active {
    background: #ffffff;
    color: #2563eb;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* ── SEO Section Prose Overrides ───────────────────────────── */
#seo-features article {
    border-left: 4px solid #dbeafe;
    padding-left: 1.25rem;
    transition: border-color 0.2s ease;
}
#seo-features article:hover {
    border-left-color: #3b82f6;
}

/* ── Results Container Buttons ─────────────────────────────── */
#resultsContainer button {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
#resultsContainer button:active {
    transform: scale(0.95);
}

/* ── Sidebar Navigation (App View) ─────────────────────────── */
.app-layout {
    display: flex;
    gap: 0;
    min-height: 600px;
}
.app-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    position: sticky;
    top: 4rem;
    height: calc(100vh - 4rem);
    overflow-y: auto;
}
.app-sidebar-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    padding: 0.5rem 0.75rem 0.25rem;
}
.sidebar-tool-btn {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.6rem 0.75rem;
    border-radius: 0.625rem;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    text-align: left;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
.sidebar-tool-btn:hover {
    background: #f1f5f9;
    color: #1e293b;
}
.sidebar-tool-btn.active {
    background: linear-gradient(90deg, #eff6ff, #dbeafe);
    color: #2563eb;
    font-weight: 700;
    box-shadow: 2px 0 8px -2px rgba(59,130,246,0.1);
}
.sidebar-tool-btn .sidebar-icon {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.sidebar-tool-btn .sidebar-icon svg {
    width: 1rem;
    height: 1rem;
}
.app-content {
    flex: 1;
    min-width: 0;
}

/* ── Bottom Nav (Mobile) ───────────────────────────────────── */
.app-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    z-index: 45;
    padding: 0.375rem 0.5rem;
    padding-bottom: calc(0.375rem + env(safe-area-inset-bottom, 0px));
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.app-bottom-nav::-webkit-scrollbar { display: none; }
.bottom-nav-inner {
    display: flex;
    gap: 0.25rem;
    min-width: max-content;
}
.bottom-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 0.375rem 0.625rem;
    border-radius: 0.625rem;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    color: #94a3b8;
    font-size: 0.6rem;
    font-weight: 600;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    white-space: nowrap;
    min-width: 56px;
}
.bottom-nav-btn:hover,
.bottom-nav-btn.active {
    color: #2563eb;
    background: #eff6ff;
}
.bottom-nav-btn .bottom-nav-icon {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bottom-nav-btn .bottom-nav-icon svg {
    width: 1rem;
    height: 1rem;
}

@media (max-width: 768px) {
    .app-sidebar { display: none; }
    .app-bottom-nav { display: block; }
    .app-layout { min-height: auto; }
    #app-section { padding-bottom: 5rem !important; }
}

/* ═══════════════════════════════════════════════════════════
   MOBILE RESPONSIVENESS — Comprehensive
   ═══════════════════════════════════════════════════════════ */

/* Prevent horizontal scroll globally + Viewport Clipping Protections */
html {
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
    scroll-padding-top: 64px; /* Offset for sticky header */
}
body {
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
    box-sizing: border-box;
    font-size: 16px;
}

/* ── Hamburger Menu ────────────────────────────────────────── */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #374151;
    border-radius: 6px;
    transition: background 0.15s ease;
}
.mobile-menu-toggle:hover { background: #f3f4f6; }
.mobile-menu-toggle svg { width: 1.25rem; height: 1.25rem; }

.mobile-nav {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid #e8e9eb;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    z-index: 1001;
    padding: 0;
}
.mobile-nav.open { display: flex; flex-direction: column; }
.mobile-nav a {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    padding: 0 24px;
    height: 48px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.15s ease;
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover { background: #f3f4f6; color: #111827; }

/* ── Mobile Accordion (inside mobile nav) ──────────────────── */
.mobile-accordion { border-bottom: 1px solid #f3f4f6; }
.mobile-accordion-trigger {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; padding: 0 24px; height: 48px;
    font-size: 14px; font-weight: 700; color: #1e293b;
    background: none; border: none; cursor: pointer;
    font-family: inherit;
}
.mobile-accordion-trigger svg { transition: transform 0.2s ease; }
.mobile-accordion.open .mobile-accordion-trigger svg { transform: rotate(180deg); }
.mobile-accordion-content {
    display: none;
    padding: 0 24px 0.5rem;
    border-left: 3px solid #e2e8f0;
    margin-left: 24px;
}
.mobile-accordion.open .mobile-accordion-content { display: block; }
/* Task 7: Child links — reduced size, softer color, clear indentation */
.mobile-accordion-content a {
    display: block; font-size: 12.5px; font-weight: 400;
    color: #64748b; text-decoration: none;
    padding: 0.3rem 0.75rem; border-bottom: none;
    height: auto; min-height: 32px;
    align-items: center;
    border-radius: 6px;
    transition: all 0.15s ease;
}
.mobile-accordion-content a:hover { color: #2563eb; background: #f1f5f9; }

/* ── Tablet (768px and below) ──────────────────────────────── */
@media (max-width: 768px) {
    .header-inner { height: 64px; padding: 0 16px; }
    .mobile-menu-toggle { display: block; }

    .tool-card { padding: 1.25rem; }
    .trust-badge { padding: 1rem; }
    .glass-panel { border-radius: 1rem; padding: 1.25rem; }

    /* Cap ad height on tablet so tools stay visible */
    .ad-slot, .ad-slot-leaderboard, .ad-slot-rectangle {
        max-height: 100px !important;
        min-height: 50px !important;
        margin: 0.5rem auto 1rem !important;
        overflow: hidden !important;
    }
    .ad-placeholder, .ad-placeholder-leaderboard, .ad-placeholder-banner {
        max-height: 100px !important;
        min-height: 50px !important;
        overflow: hidden !important;
    }
    ins.adsbygoogle {
        max-height: 100px !important;
        min-height: 50px !important;
        overflow: hidden !important;
    }
    .adsense-slot-wrapper,
    .adsense-slot-wrapper--leaderboard,
    .adsense-slot-wrapper--banner {
        max-height: 100px !important;
        min-height: 50px !important;
        overflow: hidden !important;
    }
}

/* ── Mobile (600px and below) ──────────────────────────────── */
@media (max-width: 600px) {
    /* Typography */
    body { font-size: 15px; }
    h1 { font-size: 1.625rem !important; line-height: 1.4; letter-spacing: -0.01em; }
    h2 { font-size: 1.2rem !important; line-height: 1.4; }
    h3 { font-size: 1.05rem !important; line-height: 1.4; }
    p, li { font-size: 0.9375rem; line-height: 1.75; }

    /* Homepage: 2-column grid for How It Works & Trust Signals */
    #how-it-works .grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }
    #how-it-works .p-6 {
        padding: 0.75rem !important;
        text-align: center;
    }
    #how-it-works .p-6 h3 { font-size: 0.875rem !important; margin-bottom: 0.375rem; }
    #how-it-works .p-6 p { font-size: 0.75rem !important; }

    /* Trust Signals: 2-column grid */
    .grid.grid-cols-2 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.625rem !important;
    }
    .grid.grid-cols-2 .text-center.p-4 {
        padding: 0.5rem !important;
    }
    .grid.grid-cols-2 .text-2xl { font-size: 1.25rem !important; }
    .grid.grid-cols-2 .text-xs { font-size: 0.625rem !important; }

    /* Layout */
    .max-w-7xl, .max-w-6xl, .max-w-5xl { padding-left: 0.875rem; padding-right: 0.875rem; }
    section { padding-top: 1.75rem !important; padding-bottom: 1.75rem !important; }

    /* Tool cards — single column (targeted, not global) */
    .grid-cols-2, .grid-cols-3, .grid-cols-4 { grid-template-columns: 1fr !important; }

    /* Buttons — minimum 48px touch target */
    button, .btn-pdf, .btn-compare, .merge-btn, .preset-btn,
    .passport-preset-btn, .resizer-preset-btn, .cta-btn,
    a[role="button"], input[type="submit"] {
        min-height: 48px;
        font-size: 0.9375rem;
    }

    /* Upload / dropzone areas — full width */
    .dropzone, [class*="upload"], [class*="dropzone"] {
        width: 100%;
        min-height: 150px;
        padding: 1.5rem 1rem;
    }

    /* Header */
    .header-inner { height: 64px; padding: 0 12px; }
    .header-nav { gap: 0.25rem; }

    /* Footer */
    .site-footer { padding: 1.5rem 0.75rem; }
    .footer-links { flex-direction: column; gap: 0.5rem; align-items: center; }

    /* Blog cards */
    .blog-card-body { padding: 1rem; }

    /* Form inputs */
    input, select, textarea {
        font-size: 16px; /* Prevents iOS zoom on focus */
        padding: 0.75rem;
    }

    /* Ad slots — force-compact so tool stays above fold */
    .ad-slot,
    .ad-slot-leaderboard,
    .ad-slot-rectangle {
        min-height: 50px !important;
        max-height: 100px !important;
        margin: 10px auto !important;
        padding: 0.5rem !important;
        overflow: hidden !important;
        display: block !important;
    }
    .ad-placeholder,
    .ad-placeholder-leaderboard,
    .ad-placeholder-banner {
        min-height: 50px !important;
        max-height: 100px !important;
        margin: 10px auto !important;
        overflow: hidden !important;
        display: block !important;
    }
    .ad-placeholder-sidebar { display: none !important; }
    /* Target AdSense injected ins elements directly */
    ins.adsbygoogle {
        min-height: 50px !important;
        max-height: 100px !important;
        overflow: hidden !important;
        display: block !important;
    }
    .ad-container {
        min-height: 50px !important;
        max-height: 100px !important;
        overflow: hidden !important;
    }
    .adsense-slot-wrapper,
    .adsense-slot-wrapper--leaderboard,
    .adsense-slot-wrapper--banner {
        min-height: 50px !important;
        max-height: 100px !important;
        margin: 10px auto !important;
        overflow: hidden !important;
    }

    /* Featured "Most Used" tool cards — compact on mobile */
    .featured-tools-row {
        gap: 0.5rem !important;
    }
    .featured-tool-card {
        padding: 0.625rem !important;
        min-height: auto !important;
        min-width: 140px !important;
        border-radius: 0.75rem;
    }
    .featured-tool-card .premium-icon-wrapper,
    .featured-tool-card .featured-icon {
        width: 2rem !important;
        height: 2rem !important;
        margin-bottom: 0.35rem !important;
        border-radius: 0.5rem;
    }
    .featured-tool-card .premium-icon-wrapper svg,
    .featured-tool-card .featured-icon svg {
        width: 1rem !important;
        height: 1rem !important;
    }
    .featured-tool-card .featured-name {
        font-size: 0.75rem !important;
        margin-bottom: 0.15rem !important;
    }
    .featured-tool-card .featured-desc {
        font-size: 0.625rem !important;
        line-height: 1.3 !important;
    }
    .featured-tool-card .featured-badge {
        font-size: 0.5rem !important;
        padding: 0.1rem 0.35rem !important;
        margin-top: 0.3rem !important;
    }

    /* FAQ section */
    .faq-item { padding: 0.75rem; }

    /* Tool page specific */
    .tool-panel {
        padding: 1rem !important;
        min-height: auto !important;
        height: max-content;
        padding-bottom: 1.5rem !important;
    }
    .glass-panel {
        min-height: auto !important;
        height: max-content;
        padding: 0.75rem !important;
        padding-bottom: 1rem !important;
        border-radius: 0.75rem !important;
    }
    .universal-tool-container {
        min-height: auto !important;
        height: max-content;
        padding-bottom: 1.5rem !important;
    }

    /* Blog grid — compact multi-column on mobile */
    .blog-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
        gap: 1rem !important;
    }
    .blog-card {
        border-radius: 0.75rem;
    }
    .blog-card-thumb {
        aspect-ratio: 16/10;
    }
    .blog-card-thumb svg {
        width: 32px;
        height: 32px;
    }
    .blog-card-body {
        padding: 0.75rem !important;
    }
    .blog-card-tag {
        font-size: 0.55rem !important;
        margin-bottom: 0.25rem !important;
    }
    .blog-card-title {
        font-size: 0.8rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.25rem !important;
    }
    .blog-card-excerpt {
        font-size: 0.65rem !important;
        line-height: 1.4 !important;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .blog-card-meta {
        font-size: 0.6rem !important;
        margin-top: 0.375rem !important;
    }

    /* Hero section mobile typography */
    section.text-center { padding-top: 1.5rem !important; padding-bottom: 1rem !important; }
    section.text-center h1 { margin-bottom: 0.75rem; }
    section.text-center p.text-lg {
        font-size: 0.9375rem;
        line-height: 1.7;
        margin-bottom: 1.5rem;
    }
    section.text-center p strong { font-size: 0.9375rem; }
    .stats-strip {
        font-size: 0.75rem;
        gap: 0.5rem;
        padding: 0.5rem 0.75rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Section headings — consistent mobile spacing */
    h2.text-xl, h2.text-lg {
        margin-bottom: 0.875rem;
        line-height: 1.4;
    }

    /* Featured tools section */
    .featured-tools-row { gap: 0.625rem; }
    .featured-tool-card { padding: 1rem; }
    .featured-tool-card .featured-name { font-size: 0.875rem; }
    .featured-tool-card .featured-desc { font-size: 0.75rem; }

    /* Trust badges — tighter spacing */
    .trust-badge { gap: 0.375rem; padding: 0.875rem; }
    .trust-badge-icon { width: 2.5rem; height: 2.5rem; }

    /* Search bar mobile refinement */
    .search-bar { margin-bottom: 1.25rem; }
    .search-bar input { padding: 0.75rem 1rem 0.75rem 2.75rem; font-size: 16px; }
}

/* ── Small Mobile (375px — iPhone SE) ──────────────────────── */
@media (max-width: 375px) {
    .header-inner { height: 64px; padding: 0 10px; }
    .privacy-badge { padding: 3px 8px; font-size: 12px; }
    .tool-card { padding: 1rem; }
    .tool-card-icon { width: 2.75rem; height: 2.75rem; }
    .tool-card-title { font-size: 1rem; }
    .tool-card-desc { font-size: 0.8rem; }

    /* Even denser tools grid for tiny screens */
    .tools-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.375rem !important;
    }
    .tools-grid .tool-card {
        padding: 0.375rem !important;
    }
    .tools-grid .tool-card-title {
        font-size: 0.6rem !important;
    }

    /* Category grid — 2 columns on tiny screens */
    .category-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ── Micro Mobile (360px and below) ───────────────────────── */
@media (max-width: 360px) {
    /* Typography — prevent text overlap on ultra-narrow viewports */
    h1 { font-size: 1.375rem !important; line-height: 1.45; }
    h2 { font-size: 1.1rem !important; line-height: 1.4; }
    h3 { font-size: 1rem !important; line-height: 1.4; }
    p, li { font-size: 0.875rem; line-height: 1.7; }

    /* Tighter container padding */
    .max-w-7xl, .max-w-6xl, .max-w-5xl, .max-w-4xl, .max-w-3xl {
        padding-left: 0.625rem;
        padding-right: 0.625rem;
    }

    /* Category grid — single column fallback to prevent word splitting */
    .category-grid {
        grid-template-columns: 1fr !important;
        gap: 0.5rem !important;
    }
    .category-card {
        padding: 0.75rem 0.625rem;
        gap: 0.5rem;
    }
    .category-card .cat-name { font-size: 0.8125rem; }
    .category-card .cat-emoji { width: 1.75rem; height: 1.75rem; font-size: 1rem; }

    /* Star rating widget — prevent star clipping */
    .od-rating-container {
        padding: 1rem 0.75rem;
        gap: 0.5rem;
    }
    .od-rating-prompt { font-size: 0.8125rem; }
    .od-stars-row { gap: 0.25rem; }
    .od-star-btn { padding: 0.25rem; }
    .od-star-icon { width: 20px; height: 20px; }
    .od-rating-thankyou { font-size: 0.75rem; }

    /* Featured tools */
    .featured-tool-card { padding: 0.75rem; min-width: 150px; }
    .featured-tool-card .featured-name { font-size: 0.8125rem; }
    .featured-tool-card .featured-desc { font-size: 0.7rem; }

    /* Tool documentation sections */
    .tool-doc-section { padding: 1.5rem 0.625rem; }
    .tool-doc-section h2 { font-size: 1.1rem; margin-top: 1.5rem; }
    .tool-doc-section p { font-size: 0.875rem; }

    /* Header compact */
    .header-inner { padding: 0 8px; }

    /* Stats strip — allow wrapping */
    .stats-strip {
        font-size: 0.6875rem;
        gap: 0.375rem;
        line-height: 1.4;
    }
}

/* ═══════════════════════════════════════════════════════════
   ADSENSE CLS ARMOR — Prevent Cumulative Layout Shift
   ═══════════════════════════════════════════════════════════ */

.ad-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border: 1px dashed #e2e8f0;
    border-radius: 0.5rem;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
}
.ad-placeholder-leaderboard {
    min-height: 90px;
    max-height: 90px;
}
.ad-placeholder-banner {
    min-height: 250px;
    max-height: 250px;
}
.ad-placeholder-sidebar {
    min-height: 250px;
    max-height: 600px;
}
.ad-placeholder-mobile {
    min-height: 50px;
    max-height: 50px;
}
@media (max-width: 768px) {
    .ad-placeholder-leaderboard { min-height: 60px; max-height: 60px; }
    .ad-placeholder-banner { min-height: 100px; max-height: 100px; }
    .ad-placeholder-sidebar { display: none; }
}

.dark-mode .ad-placeholder {
    background: #1e293b;
    border-color: #334155;
}

/* ═══════════════════════════════════════════════════════════
   ADSENSE SLOT WRAPPERS — CLS-Safe Ad Positioning
   ═══════════════════════════════════════════════════════════ */
.adsense-slot-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 2.5rem auto;
    overflow: hidden;
    position: relative;
}
.adsense-slot-wrapper--leaderboard {
    min-height: 90px;
    max-width: 728px;
    background: rgba(30, 41, 59, 0.03);
    border: 1px dashed rgba(148, 163, 184, 0.3);
    border-radius: 0.5rem;
}
.adsense-slot-wrapper--banner {
    min-height: 250px;
    max-width: 336px;
    background: rgba(30, 41, 59, 0.03);
    border: 1px dashed rgba(148, 163, 184, 0.3);
    border-radius: 0.5rem;
}
@media (max-width: 768px) {
    .adsense-slot-wrapper--leaderboard { min-height: 60px; }
    .adsense-slot-wrapper--banner { min-height: 100px; max-width: 100%; }
}
.dark-mode .adsense-slot-wrapper--leaderboard,
.dark-mode .adsense-slot-wrapper--banner {
    background: rgba(30, 41, 59, 0.2);
    border-color: rgba(51, 65, 85, 0.5);
}

/* ═══════════════════════════════════════════════════════════
   STAR RATING WIDGET
   ═══════════════════════════════════════════════════════════ */
.od-star-rating-widget {
    max-width: 56rem;
    margin: 0 auto;
    padding: 0 1rem;
    margin-bottom: 1rem;
}
.od-rating-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem 1.25rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    text-align: center;
}
.od-rating-prompt {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}
.od-stars-row {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}
.od-star-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease;
    color: #cbd5e1;
    min-width: auto;
    min-height: auto;
}
.od-star-btn:hover {
    transform: scale(1.15);
}
.od-star-icon {
    transition: fill 0.15s ease, stroke 0.15s ease;
}
.od-rating-thankyou {
    font-size: 0.85rem;
    font-weight: 600;
    color: #16a34a;
}
.dark-mode .od-rating-container {
    background: #1e293b;
    border-color: #334155;
}
.dark-mode .od-rating-prompt { color: #f1f5f9; }
.dark-mode .od-star-btn { color: #475569; }
.dark-mode .od-rating-thankyou { color: #4ade80; }

@media (max-width: 600px) {
    .od-rating-container { padding: 1.25rem 1rem; }
    .od-rating-prompt { font-size: 0.875rem; }
    .od-star-btn { padding: 0.375rem; }
    .od-star-icon { width: 24px; height: 24px; }
}

/* ═══════════════════════════════════════════════════════════
   DOCUMENT & FORM TOOL STYLES
   ═══════════════════════════════════════════════════════════ */

/* ── Form Groups ─────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block; font-size: 0.85rem; font-weight: 700;
    color: #334155; margin-bottom: 0.375rem;
}
.form-group input, .form-group select, .form-group textarea {
    display: block; width: 100%;
    padding: 0.7rem 0.875rem; font-size: 0.9rem; font-weight: 500;
    border: 2px solid #e2e8f0; border-radius: 0.75rem;
    color: #1e293b; background: #fff; font-family: inherit;
    transition: border-color 0.2s ease;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.08);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-group input::placeholder, .form-group textarea::placeholder {
    color: #94a3b8; font-weight: 400;
}

/* ── Document Preview ────────────────────────────────────── */
.doc-preview {
    background: #fff; border: 1px solid #e2e8f0;
    border-radius: 0.75rem; padding: 2rem;
    font-size: 0.9rem; line-height: 1.7; color: #1e293b;
    max-height: 600px; overflow-y: auto;
}
.doc-preview h2 { font-size: 1.25rem; font-weight: 800; margin-bottom: 0.75rem; color: #0f172a; }
.doc-preview h3 { font-size: 1.05rem; font-weight: 700; margin: 1rem 0 0.5rem; color: #1e293b; }
.doc-preview p { margin-bottom: 0.5rem; }
.doc-preview hr { border: none; border-top: 1px solid #e2e8f0; margin: 1rem 0; }

/* ── Action Bar ──────────────────────────────────────────── */
.action-bar {
    display: flex; flex-wrap: wrap; gap: 0.75rem;
    margin-top: 1.25rem; padding-top: 1.25rem;
    border-top: 1px solid #e2e8f0;
}

/* ── Stat Cards (for calculators) ────────────────────────── */
.stat-card {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 1px solid #bfdbfe; border-radius: 1rem;
    padding: 1.25rem; text-align: center;
}
.stat-card.green { background: linear-gradient(135deg, #ecfdf5, #d1fae5); border-color: #a7f3d0; }
.stat-card.red { background: linear-gradient(135deg, #fef2f2, #fecaca); border-color: #fca5a5; }
.stat-card.purple { background: linear-gradient(135deg, #faf5ff, #e9d5ff); border-color: #c4b5fd; }
.stat-card.amber { background: linear-gradient(135deg, #fffbeb, #fde68a); border-color: #fcd34d; }
.stat-card-label { font-size: 0.8rem; font-weight: 600; color: #475569; margin-bottom: 0.25rem; }
.stat-card-value { font-size: 1.5rem; font-weight: 800; color: #0f172a; }

/* ── Result Highlights ───────────────────────────────────── */
.result-highlight {
    background: #f0fdf4; border: 2px solid #86efac;
    border-radius: 0.75rem; padding: 1rem;
    text-align: center; font-weight: 700; color: #166534;
}

/* ── Entry Rows (for add/remove entries like work exp) ──── */
.entry-row {
    background: #f8fafc; border: 1px solid #e2e8f0;
    border-radius: 0.75rem; padding: 1rem;
    margin-bottom: 0.75rem; position: relative;
}
.entry-row .remove-entry {
    position: absolute; top: 0.5rem; right: 0.5rem;
    background: none; border: none; color: #94a3b8;
    cursor: pointer; padding: 0.25rem; border-radius: 0.5rem;
    transition: all 0.2s;
}
.entry-row .remove-entry:hover { color: #dc2626; background: #fef2f2; }

/* ── Toggle Switch ───────────────────────────────────────── */
.toggle-switch {
    position: relative; display: inline-block; width: 48px; height: 26px;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background: #cbd5e1; border-radius: 9999px; transition: 0.3s;
}
.toggle-slider::before {
    content: ''; position: absolute; height: 20px; width: 20px;
    left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: 0.3s;
}
.toggle-switch input:checked + .toggle-slider { background: #2563eb; }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(22px); }

/* ── Tab Panel ───────────────────────────────────────────── */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Template Selector ───────────────────────────────────── */
.template-option {
    border: 2px solid #e2e8f0; border-radius: 0.75rem;
    padding: 0.75rem; cursor: pointer; text-align: center;
    transition: all 0.2s; font-size: 0.85rem; font-weight: 600;
    color: #475569; background: #fff;
}
.template-option:hover { border-color: #93c5fd; color: #2563eb; }
.template-option.active { border-color: #2563eb; background: #eff6ff; color: #2563eb; }

/* ── Category Chips ──────────────────────────────────────── */
.category-chip {
    display: inline-flex; align-items: center; gap: 0.375rem;
    padding: 0.4rem 1rem; border-radius: 9999px;
    font-size: 0.8rem; font-weight: 600;
    border: 2px solid #e2e8f0; background: #fff;
    color: #475569; cursor: pointer; transition: all 0.2s;
}
.category-chip:hover { border-color: #93c5fd; color: #2563eb; }
.category-chip.active { border-color: #2563eb; background: #2563eb; color: #fff; }

/* ── Table Responsive ────────────────────────────────────── */
.table-responsive {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    border: 1px solid #e2e8f0; border-radius: 0.75rem;
}
.table-responsive::-webkit-scrollbar { height: 6px; }
.table-responsive::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

/* ── Print Styles ────────────────────────────────────────── */
@media print {
    .site-header, .site-footer, .ad-slot, #toast-container,
    .action-bar, .mobile-nav, .mobile-menu-toggle,
    .privacy-badge, .back-link { display: none !important; }
    body { background: #fff; font-size: 12pt; }
    .doc-preview { border: none; padding: 0; max-height: none; overflow: visible; }
    .glass-panel { border: none; box-shadow: none; }
}

/* ── Grid Breakpoints for Medium Screens ─────────────────── */
@media (min-width: 601px) and (max-width: 900px) {
    .grid-cols-3, .grid-cols-4 { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ── Jobs Table ──────────────────────────────────────────── */
.jobs-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.jobs-table th {
    background: #f1f5f9; padding: 0.6rem 0.75rem;
    font-weight: 700; color: #475569; text-align: left;
    white-space: nowrap; font-size: 0.8rem;
}
.jobs-table td {
    padding: 0.6rem 0.75rem; border-bottom: 1px solid #f1f5f9;
    white-space: nowrap;
}
.jobs-table tr:hover td { background: #f8fafc; }

/* ── Status Badge ────────────────────────────────────────── */
.status-badge {
    display: inline-block; padding: 0.15rem 0.5rem;
    border-radius: 9999px; font-size: 0.7rem; font-weight: 700;
}
.status-badge.applied { background: #dbeafe; color: #1d4ed8; }
.status-badge.screen { background: #fef3c7; color: #b45309; }
.status-badge.interview { background: #e0e7ff; color: #4338ca; }
.status-badge.offer { background: #d1fae5; color: #059669; }
.status-badge.rejected { background: #fee2e2; color: #dc2626; }
.status-badge.withdrawn { background: #f1f5f9; color: #64748b; }

/* ═══════════════════════════════════════════════════════════
   BLOCK 1 — WORKFLOW NEXT STEPS
   ═══════════════════════════════════════════════════════════ */
.next-step-section {
    max-width: 72rem; margin: 0 auto; padding: 2rem 1rem;
}
.next-step-section h2 {
    font-size: 1.25rem; font-weight: 800; color: #0f172a; margin-bottom: 1rem;
}
.next-step-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem;
}
.next-step-card {
    display: flex; align-items: center; gap: 1rem;
    padding: 1.25rem; background: #fff; border: 1px solid #e2e8f0;
    border-radius: 1rem; text-decoration: none; color: inherit;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, box-shadow;
}
.next-step-card:hover {
    border-color: transparent; box-shadow: 0 8px 20px -4px rgba(59,130,246,0.12), 0 4px 8px -2px rgba(0,0,0,0.06);
    transform: translateY(-3px);
}
.next-step-arrow {
    width: 2.5rem; height: 2.5rem; border-radius: 0.75rem;
    background: #eff6ff; color: #2563eb;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.next-step-card:hover .next-step-arrow { background: #2563eb; color: #fff; }
.next-step-info h3 {
    font-size: 1rem; font-weight: 700; color: #0f172a; margin-bottom: 0.25rem;
}
.next-step-info p {
    font-size: 0.8rem; color: #64748b; line-height: 1.5; margin: 0;
}

/* ═══════════════════════════════════════════════════════════
   BLOCK 2 — SMOOTH FAQ ACCORDION
   ═══════════════════════════════════════════════════════════ */
.faq-answer {
    max-height: 0; overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease, opacity 0.25s ease;
    opacity: 0; padding-top: 0; padding-bottom: 0;
    border-top: 1px solid transparent;
}
.faq-item.open .faq-answer {
    max-height: 500px; opacity: 1;
    padding-top: 1rem; padding-bottom: 1rem;
    border-top-color: #f1f5f9;
}
.faq-item.open .faq-icon { transform: rotate(180deg); }

/* ═══════════════════════════════════════════════════════════
   BLOCK 5 — UPLOAD TRUST BADGE
   ═══════════════════════════════════════════════════════════ */
.upload-trust-badge {
    display: flex; align-items: center; justify-content: center; gap: 0.375rem;
    margin-top: 0.75rem; font-size: 12px; color: #94a3b8; text-align: center;
}
.upload-trust-badge svg { color: #22c55e; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════
   BLOCK 4 — HOMEPAGE DRAG-DROP OVERLAY
   ═══════════════════════════════════════════════════════════ */
.drag-drop-overlay {
    position: fixed; inset: 0; z-index: 9998;
    background: rgba(255,255,255,0.95); backdrop-filter: blur(8px);
    display: none; align-items: center; justify-content: center;
    flex-direction: column; gap: 1rem;
}
.drag-drop-overlay.active { display: flex; }
.drag-drop-overlay .drop-zone-box {
    width: 80%; max-width: 500px; min-height: 250px;
    border: 3px dashed #3b82f6; border-radius: 2rem;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 1rem; padding: 2rem;
    background: rgba(239,246,255,0.5);
}
.drag-drop-overlay h3 {
    font-size: 1.5rem; font-weight: 800; color: #0f172a;
}
.drag-drop-overlay p {
    font-size: 1rem; color: #64748b;
}

/* ═══════════════════════════════════════════════════════════
   BLOCK 6 — DRAFT BAR
   ═══════════════════════════════════════════════════════════ */
.draft-bar {
    position: fixed; top: 64px; left: 0; right: 0; z-index: 9999;
    background: #eff6ff; border-bottom: 2px solid #bfdbfe;
    padding: 0.75rem 1.5rem; display: flex; align-items: center;
    justify-content: center; gap: 1rem; flex-wrap: wrap;
    font-size: 0.9rem; font-weight: 600; color: #1e3a8a;
    transform: translateY(-100%); transition: transform 0.3s ease;
}
.draft-bar.show { transform: translateY(0); }
.draft-bar-actions { display: flex; gap: 0.5rem; }
.draft-btn-continue {
    padding: 0.4rem 1rem; background: #2563eb; color: #fff;
    border: none; border-radius: 0.5rem; font-weight: 700; font-size: 0.85rem;
    cursor: pointer; transition: background 0.2s;
}
.draft-btn-continue:hover { background: #1d4ed8; }
.draft-btn-fresh {
    padding: 0.4rem 1rem; background: #fff; color: #64748b;
    border: 1px solid #cbd5e1; border-radius: 0.5rem; font-weight: 700; font-size: 0.85rem;
    cursor: pointer; transition: all 0.2s;
}
.draft-btn-fresh:hover { background: #f1f5f9; }

/* ═══════════════════════════════════════════════════════════
   BLOCK 8 — BOOKMARK TOAST
   ═══════════════════════════════════════════════════════════ */
.bookmark-toast {
    position: fixed; top: 0; left: 50%; transform: translate(-50%, -100%);
    z-index: 99999; background: #dbeafe; color: #1e3a8a;
    padding: 0.75rem 1.5rem; border-radius: 0 0 1rem 1rem;
    font-size: 0.875rem; font-weight: 600;
    display: flex; align-items: center; gap: 0.5rem;
    box-shadow: 0 4px 16px rgba(37,99,235,0.2);
    transition: transform 0.4s ease;
}
.bookmark-toast.show { transform: translate(-50%, 0); }

/* ═══════════════════════════════════════════════════════════
   BLOCK 9 — SEARCH DROPDOWN
   ═══════════════════════════════════════════════════════════ */
.search-bar { position: relative; }
.search-dropdown {
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border: 1px solid #e2e8f0;
    border-radius: 0.75rem; box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    max-height: 360px; overflow-y: auto; z-index: 50;
    margin-top: 0.25rem;
}
/* Task 8: Mobile keyboard overlap fix — constrain results above keyboard */
@media (max-width: 600px) {
    .search-dropdown {
        position: fixed;
        top: auto;
        left: 0.875rem;
        right: 0.875rem;
        max-height: 45vh;
        max-height: calc(100dvh - 200px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 0.75rem;
        z-index: 100;
    }
    .cmd-palette-results {
        max-height: 50vh;
        max-height: calc(100dvh - 180px);
    }
}
.search-dropdown-item {
    display: block; padding: 0.75rem 1rem;
    text-decoration: none; color: inherit;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s;
}
.search-dropdown-item:last-child { border-bottom: none; }
.search-dropdown-item:hover,
.search-dropdown-item.highlighted { background: #eff6ff; }
.search-dropdown-title { font-weight: 700; font-size: 0.9rem; color: #0f172a; }
.search-dropdown-meta { font-size: 0.78rem; color: #64748b; margin-top: 0.15rem; }
.search-dropdown-cat {
    display: inline-block; padding: 0.1rem 0.4rem;
    background: #f1f5f9; border-radius: 0.25rem;
    font-size: 0.65rem; font-weight: 700; color: #475569;
    margin-right: 0.25rem;
}

/* ═══════════════════════════════════════════════════════════
   BLOCK 3 — SHARE CALCULATION BUTTON
   ═══════════════════════════════════════════════════════════ */
.share-calc-btn {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.5rem 1rem; background: #eff6ff; color: #2563eb;
    border: 1px solid #bfdbfe; border-radius: 0.75rem;
    font-size: 0.85rem; font-weight: 700; cursor: pointer;
    transition: all 0.2s; margin-top: 0.5rem;
}
.share-calc-btn:hover { background: #2563eb; color: #fff; border-color: #2563eb; }

/* ═══════════════════════════════════════════════════════════
   FEATURE 6 — DARK MODE
   ═══════════════════════════════════════════════════════════ */
.dark-mode-toggle {
    background: none; border: none; cursor: pointer; padding: 6px;
    border-radius: 6px; color: #475569; transition: all 0.15s;
    display: flex; align-items: center; justify-content: center;
}
.dark-mode-toggle:hover { background: #f1f5f9; }
.dark-mode .dm-icon-sun { display: block; }
.dark-mode .dm-icon-moon { display: none; }
.dm-icon-sun { display: none; }
.dm-icon-moon { display: block; }

.dark-mode {
    --dm-bg: #1c1f26;
    --dm-bg2: #272a33;
    --dm-bg3: #2f3340;
    --dm-text: #e2e8f0;
    --dm-text2: #a1a7b3;
    --dm-border: #3d4455;
    --dm-card: #272a33;
    --dm-hover: #2f3340;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-pill: 9999px;
}
.dark-mode body,
.dark-mode {
    background: #1c1f26 !important;
    color: #e2e8f0 !important;
}
.dark-mode .site-header {
    background: rgba(28,31,38,0.92) !important;
    backdrop-filter: blur(12px) !important; -webkit-backdrop-filter: blur(12px) !important;
    border-bottom-color: rgba(46,49,56,0.6) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2) !important;
}
.dark-mode .header-nav a, .dark-mode .header-nav .nav-link { color: #cbd5e1 !important; }
.dark-mode .header-nav a:hover, .dark-mode .header-nav .nav-link:hover { background: #2e3138 !important; color: #f1f5f9 !important; }
.dark-mode .logo-text { color: #e2e8f0 !important; }
.dark-mode .privacy-badge { background: #1a2e3d !important; border-color: #2563eb !important; color: #60a5fa !important; }
.dark-mode .privacy-badge .dot { background: #60a5fa !important; }
.dark-mode .mobile-nav { background: #1e2026 !important; border-bottom-color: #2e3138 !important; }
.dark-mode .mobile-nav a { color: #a1a7b3 !important; border-bottom-color: #2e3138 !important; }
.dark-mode .mobile-nav a:hover { background: #2e3138 !important; color: #e2e8f0 !important; }
.dark-mode .mobile-menu-toggle { color: #a1a7b3 !important; }
.dark-mode .mobile-menu-toggle:hover { background: #2e3138 !important; }

/* Task 7: Dark Mode Mobile Accordion Hierarchy */
.dark-mode .mobile-accordion { border-bottom-color: #2e3138 !important; }
.dark-mode .mobile-accordion-trigger { color: #f1f5f9 !important; }
.dark-mode .mobile-accordion-content { border-left-color: #3d4455 !important; }
.dark-mode .mobile-accordion-content a { color: #94a3b8 !important; }
.dark-mode .mobile-accordion-content a:hover { color: #60a5fa !important; background: #2e3138 !important; }

/* Dark Mode: Mega Menu */
.dark-mode .mega-menu { background: #1e2026 !important; border-color: #2e3138 !important; box-shadow: 0 12px 48px rgba(0,0,0,0.35), 0 4px 12px rgba(0,0,0,0.15) !important; }
.dark-mode .mega-menu-group h3 { color: #cbd5e1 !important; border-bottom-color: #2e3138 !important; }
.dark-mode .mega-menu-item:hover { background: #2e3138 !important; }
.dark-mode .mega-menu-item .mm-name { color: #e2e8f0 !important; }
.dark-mode .mega-menu-item .mm-count { color: #a1a7b3 !important; font-weight: 500; }
.dark-mode .mega-menu-item:hover .mm-name { color: #60a5fa !important; }
.dark-mode .mega-menu-footer { border-top-color: #2e3138 !important; }
.dark-mode .mega-menu-footer a { background: #1a2e3d !important; color: #60a5fa !important; }
.dark-mode .mega-menu-footer a:hover { background: #2563eb !important; color: #fff !important; }

/* Dark Mode: Tools Sidebar */
.dark-mode .tools-sidebar { background: #1e2026 !important; border-right-color: #2e3138 !important; }
.dark-mode .sidebar-tool-btn.active { background: linear-gradient(90deg, #1a2e3d, #1e2026) !important; color: #60a5fa !important; box-shadow: 2px 0 8px -2px rgba(59,130,246,0.12) !important; }
.dark-mode .tools-sidebar-title { color: #6b7280 !important; }
.dark-mode .tools-sidebar-item { color: #a1a7b3 !important; }
.dark-mode .tools-sidebar-item:hover { background: #2e3138 !important; color: #e2e8f0 !important; }
.dark-mode .tools-sidebar-item.active { background: linear-gradient(90deg, #1a2e3d, #1e2026) !important; color: #60a5fa !important; border-left-color: #3b82f6 !important; box-shadow: 2px 0 8px -2px rgba(59,130,246,0.12) !important; }
.dark-mode .tools-sidebar-item .sidebar-count { background: #2e3138 !important; color: #a1a7b3 !important; }
.dark-mode .tools-sidebar-item.active .sidebar-count { background: #1a2e3d !important; color: #60a5fa !important; }
.dark-mode .tools-content-header h2 { color: #f1f5f9 !important; }
.dark-mode .tools-content-header .result-count { color: #a1a7b3 !important; }

/* Dark Mode: Featured Tools */
.dark-mode .featured-tool-card { background: #272a33 !important; border-color: #3d4455 !important; }
.dark-mode .featured-tool-card:hover { border-color: #f472b6 !important; box-shadow: 0 8px 20px -4px rgba(233,30,99,0.15), 0 4px 8px -2px rgba(0,0,0,0.2) !important; }
.dark-mode .featured-tool-card .featured-name { color: #f1f5f9 !important; }
.dark-mode .featured-tool-card .featured-desc { color: #a1a7b3 !important; }
.dark-mode .featured-tool-card .featured-badge { background: linear-gradient(135deg, #78350f, #92400e) !important; color: #fcd34d !important; }

/* Dark Mode: Category Grid */
.dark-mode .category-card { background: #272a33 !important; border-color: #3d4455 !important; }
.dark-mode .category-card:hover { border-color: #3b82f6 !important; box-shadow: 0 8px 20px -4px rgba(59,130,246,0.12), 0 4px 8px -2px rgba(0,0,0,0.2) !important; }
.dark-mode .category-card .cat-emoji { background: #383c44 !important; color: #e2e8f0 !important; }
.dark-mode .category-card .cat-name { color: #f1f5f9 !important; font-weight: 700; }
.dark-mode .category-card .cat-count { color: #94a3b8 !important; font-weight: 500; }
.dark-mode .category-card .cat-arrow { color: #6b7280 !important; }
.dark-mode .category-card:hover .cat-arrow { color: #60a5fa !important; }

/* Dark Mode: New Tools Strip */
.dark-mode .new-tool-pill { background: #272a33 !important; border-color: #3d4455 !important; color: #e2e8f0 !important; }
.dark-mode .new-tool-pill:hover { border-color: #3b82f6 !important; background: #1a2e3d !important; color: #60a5fa !important; }
.dark-mode .new-tool-pill .new-badge { background: linear-gradient(135deg, #1a3a2a, #14532d) !important; color: #4ade80 !important; }

/* Dark Mode: Hero Text Gradient */
.dark-mode h1 .text-transparent.bg-clip-text {
    background-image: linear-gradient(135deg, #60a5fa 0%, #818cf8 50%, #a78bfa 100%) !important;
}

/* Dark Mode: How It Works section */
.dark-mode #how-it-works .p-6:hover .w-12 {
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Dark Mode: Stats Strip */
.dark-mode .stats-strip { color: #a1a7b3 !important; }
.dark-mode .stats-strip .stats-dot { background: #4b5563 !important; }

.dark-mode .tool-card {
    background: #272a33 !important;
    border-color: #3d4455 !important;
    color: #e2e8f0 !important;
}
.dark-mode .tool-card:hover {
    border-color: #f472b6 !important;
    box-shadow: 0 8px 20px -4px rgba(233,30,99,0.12), 0 4px 8px -2px rgba(0,0,0,0.2) !important;
}
.dark-mode .tool-card-title { color: #f1f5f9 !important; }
.dark-mode .tool-card-desc { color: #94a3b8 !important; }

.dark-mode .trust-badge {
    background: #272a33 !important;
    border-color: #3d4455 !important;
}
.dark-mode .trust-badge:hover { border-color: #3b82f6 !important; box-shadow: 0 8px 20px -4px rgba(59,130,246,0.12), 0 4px 8px -2px rgba(0,0,0,0.2) !important; }
.dark-mode .text-sm.font-bold.text-slate-800 { color: #f1f5f9 !important; }
.dark-mode .text-xs.text-slate-500 { color: #94a3b8 !important; }

.dark-mode .glass-panel {
    background: #272a33 !important;
    border-color: #3d4455 !important;
}

.dark-mode details.advanced-settings {
    border-color: #3d4455 !important;
}
.dark-mode details.advanced-settings summary {
    background: #272a33 !important;
    color: #a1a7b3 !important;
}
.dark-mode details.advanced-settings summary::after {
    border-top-color: #64748b;
}
.dark-mode details.advanced-settings .advanced-content {
    background: #1e293b !important;
    color: #e2e8f0 !important;
}

.dark-mode details.advanced-settings summary:hover {
    background: #334155 !important;
    color: #e2e8f0 !important;
}

.dark-mode .site-footer {
    background: #181b22 !important;
    border-top-color: #3d4455 !important;
}
.dark-mode .footer-col h4 { color: #f1f5f9 !important; }
.dark-mode .footer-col a { color: #94a3b8 !important; }
.dark-mode .footer-col a:hover { color: #60a5fa !important; }
.dark-mode .footer-about p { color: #94a3b8 !important; }
.dark-mode .footer-bottom p { color: #94a3b8 !important; }
.dark-mode .footer-links a { color: #94a3b8 !important; }
.dark-mode .footer-links a:hover { color: #60a5fa !important; }
.dark-mode .footer-bottom { border-top-color: #334155 !important; }

.dark-mode .search-bar input {
    background: #272a33 !important;
    border-color: #3d4455 !important;
    color: #e2e8f0 !important;
}
.dark-mode .search-bar input:focus { border-color: #3b82f6 !important; }
.dark-mode .search-bar .search-icon { color: #94a3b8 !important; }
.dark-mode .search-dropdown {
    background: #272a33 !important;
    border-color: #3d4455 !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25) !important;
}
.dark-mode .search-dropdown-item { border-bottom-color: #3d4455 !important; }
.dark-mode .search-dropdown-item:hover,
.dark-mode .search-dropdown-item.highlighted { background: #334155 !important; }
.dark-mode .search-dropdown-title { color: #f1f5f9 !important; }
.dark-mode .search-dropdown-meta { color: #a1a7b3 !important; }
.dark-mode .search-dropdown-cat { background: #2e3138 !important; color: #a1a7b3 !important; }

.dark-mode .faq-item { border-color: #3d4455 !important; }
.dark-mode .faq-question { background: #272a33 !important; color: #f1f5f9 !important; }
.dark-mode .faq-question:hover { background: #2f3340 !important; }
.dark-mode .faq-answer { color: #cbd5e1 !important; border-top-color: #3d4455 !important; }

.dark-mode .blog-card {
    background: #272a33 !important;
    border-color: #3d4455 !important;
}
.dark-mode .blog-card:hover { border-color: #f472b6 !important; box-shadow: 0 8px 20px -4px rgba(233,30,99,0.12), 0 4px 8px -2px rgba(0,0,0,0.2) !important; }
.dark-mode .blog-card-title { color: #f1f5f9 !important; }
.dark-mode .blog-card-excerpt { color: #a1a7b3 !important; }
.dark-mode .blog-card-meta { color: #6b7280 !important; }
.dark-mode .blog-card-tag { color: #60a5fa !important; }

.dark-mode .blog-content h2,
.dark-mode .blog-content h3 { color: #f1f5f9 !important; }
.dark-mode .blog-content p,
.dark-mode .blog-content li { color: #a1a7b3 !important; }
.dark-mode .blog-content a { color: #60a5fa !important; }
.dark-mode .blog-content strong { color: #e2e8f0 !important; }
.dark-mode .blog-content blockquote {
    background: #1a2e3d !important;
    border-left-color: #3b82f6 !important;
    color: #93c5fd !important;
}

.dark-mode .cta-btn { box-shadow: 0 4px 12px rgba(37,99,235,0.4) !important; }

.dark-mode .form-group label { color: #a1a7b3 !important; }
.dark-mode .form-group input,
.dark-mode .form-group select,
.dark-mode .form-group textarea {
    background: #272a33 !important;
    border-color: #3d4455 !important;
    color: #e2e8f0 !important;
}
.dark-mode .form-group input:focus,
.dark-mode .form-group select:focus,
.dark-mode .form-group textarea:focus { border-color: #3b82f6 !important; }

.dark-mode .doc-preview {
    background: #272a33 !important;
    border-color: #3d4455 !important;
    color: #e2e8f0 !important;
}
.dark-mode .doc-preview h2,
.dark-mode .doc-preview h3 { color: #f1f5f9 !important; }

.dark-mode .stat-card { background: linear-gradient(135deg, #1a2e3d, #22252b) !important; border-color: #2563eb !important; }
.dark-mode .stat-card.green { background: linear-gradient(135deg, #1a3a2a, #22252b) !important; border-color: #059669 !important; }
.dark-mode .stat-card.red { background: linear-gradient(135deg, #3b1a1a, #22252b) !important; border-color: #dc2626 !important; }
.dark-mode .stat-card.purple { background: linear-gradient(135deg, #2d1a3e, #22252b) !important; border-color: #7c3aed !important; }
.dark-mode .stat-card-label { color: #a1a7b3 !important; }
.dark-mode .stat-card-value { color: #f1f5f9 !important; }

.dark-mode .result-highlight {
    background: #1a3a2a !important;
    border-color: #059669 !important;
    color: #4ade80 !important;
}

.dark-mode .ad-slot { background: #22252b !important; border-color: #2e3138 !important; }

.dark-mode .draft-bar { background: #1a2e3d !important; border-bottom-color: #2563eb !important; color: #93c5fd !important; }
.dark-mode .draft-btn-continue { background: #2563eb !important; }
.dark-mode .draft-btn-fresh { background: #2e3138 !important; color: #a1a7b3 !important; border-color: #4b5563 !important; }

.dark-mode .bookmark-toast { background: #1a2e3d !important; color: #93c5fd !important; }

.dark-mode .preset-btn,
.dark-mode .passport-preset-btn,
.dark-mode .resizer-preset-btn {
    background: #2e3138 !important;
    border-color: #4b5563 !important;
    color: #a1a7b3 !important;
}
.dark-mode .preset-btn:hover,
.dark-mode .preset-btn.active { border-color: #3b82f6 !important; background: #3b82f6 !important; color: #fff !important; }

.dark-mode .settings-select {
    background-color: #272a33 !important;
    border-color: #3d4455 !important;
    color: #e2e8f0 !important;
}
.dark-mode .dim-input {
    background: #272a33 !important;
    border-color: #3d4455 !important;
    color: #e2e8f0 !important;
}

.dark-mode .next-step-card {
    background: #272a33 !important;
    border-color: #3d4455 !important;
}
.dark-mode .next-step-card:hover { border-color: #f472b6 !important; }
.dark-mode .next-step-info h3 { color: #f1f5f9 !important; }
.dark-mode .next-step-info p { color: #a1a7b3 !important; }

.dark-mode .share-calc-btn { background: #1a2e3d !important; color: #60a5fa !important; border-color: #2563eb !important; }
.dark-mode .share-calc-btn:hover { background: #2563eb !important; color: #fff !important; }

.dark-mode .drag-drop-overlay { background: rgba(23,25,30,0.95) !important; }
.dark-mode .drag-drop-overlay .drop-zone-box {
    background: rgba(34,37,43,0.8) !important;
    border-color: #3b82f6 !important;
}
.dark-mode .drag-drop-overlay h3 { color: #f1f5f9 !important; }
.dark-mode .drag-drop-overlay p { color: #a1a7b3 !important; }

.dark-mode .category-chip {
    background: #2e3138 !important;
    border-color: #4b5563 !important;
    color: #a1a7b3 !important;
}
.dark-mode .category-chip.active { background: #2563eb !important; border-color: #2563eb !important; color: #fff !important; }

.dark-mode .tab-btn { color: #a1a7b3 !important; }
.dark-mode .tab-btn.active { background: #22252b !important; color: #60a5fa !important; box-shadow: 0 1px 3px rgba(0,0,0,0.25) !important; }

.dark-mode .entry-row { background: #22252b !important; border-color: #2e3138 !important; }
.dark-mode .toggle-slider { background: #4b5563 !important; }
.dark-mode .toggle-switch input:checked + .toggle-slider { background: #2563eb !important; }

.dark-mode .status-badge.screen { background: #78350f !important; color: #fbbf24 !important; }
.dark-mode .status-badge.interview { background: #312e81 !important; color: #a5b4fc !important; }

.dark-mode .jobs-table th { background: #2e3138 !important; color: #a1a7b3 !important; }
.dark-mode .jobs-table td { border-bottom-color: #2e3138 !important; color: #e2e8f0 !important; }
.dark-mode .jobs-table tr:hover td { background: #2e3138 !important; }

.dark-mode .table-responsive { border-color: #2e3138 !important; }
.dark-mode .table-responsive table th { background: #2e3138 !important; color: #a1a7b3 !important; }
.dark-mode .table-responsive table td { border-bottom-color: #2e3138 !important; color: #e2e8f0 !important; }

.dark-mode .template-option {
    background: #2e3138 !important;
    border-color: #4b5563 !important;
    color: #a1a7b3 !important;
}
.dark-mode .template-option.active { border-color: #2563eb !important; background: #1a2e3d !important; color: #60a5fa !important; }

.dark-mode .merge-queue-item { background: #22252b !important; border-color: #2e3138 !important; }
.dark-mode .merge-page-num { background: #312e81 !important; color: #a5b4fc !important; }

.dark-mode .pdf2jpg-result-item { background: #22252b !important; border-color: #2e3138 !important; }
.dark-mode .pdf2jpg-result-item:hover { border-color: #7c3aed !important; }

.dark-mode #seo-features article { border-left-color: #1a2e3d !important; }
.dark-mode #seo-features article:hover { border-left-color: #3b82f6 !important; }

.dark-mode .upload-trust-badge { color: #6b7280 !important; }
.dark-mode .upload-trust-badge svg { color: #4ade80 !important; }

.dark-mode .back-link { color: #a1a7b3 !important; }
.dark-mode .back-link:hover { background: #2e3138 !important; color: #e2e8f0 !important; }

/* ── Dark Mode: Preset / Interactive Buttons ─────────────── */
.dark-mode .preset-btn {
    background: #2e3138 !important; border-color: #4b5563 !important; color: #a1a7b3 !important;
}
.dark-mode .preset-btn:hover { border-color: #3b82f6 !important; color: #93c5fd !important; background: #1a2e3d !important; }
.dark-mode .preset-btn.active { border-color: #3b82f6 !important; background: #3b82f6 !important; color: #fff !important; }

.dark-mode .passport-preset-btn {
    background: #1a3a2a !important; border-color: #2d5a3d !important; color: #86efac !important;
}
.dark-mode .passport-preset-btn:hover { border-color: #10b981 !important; color: #6ee7b7 !important; background: #1a3a2a !important; }
.dark-mode .passport-preset-btn.active { border-color: #10b981 !important; background: #10b981 !important; color: #fff !important; }

.dark-mode .resizer-preset-btn {
    background: #1a3a2a !important; border-color: #2d5a3d !important; color: #86efac !important;
}
.dark-mode .resizer-preset-btn:hover { border-color: #059669 !important; color: #6ee7b7 !important; }
.dark-mode .resizer-preset-btn.active { border-color: #059669 !important; background: #059669 !important; color: #fff !important; }

.dark-mode .stamper-color-btn { border-color: #4b5563 !important; }
.dark-mode .stamper-color-btn.active { border-color: #3b82f6 !important; box-shadow: 0 0 0 2px #1a2e3d !important; }

.dark-mode .merge-btn { color: #6b7280 !important; }
.dark-mode .merge-btn:hover { background: #2e3138 !important; color: #a1a7b3 !important; }
.dark-mode .merge-btn.remove:hover { background: #3b1a1a !important; color: #f87171 !important; }

.dark-mode .next-step-card {
    background: #272a33 !important; border-color: #3d4455 !important;
}
.dark-mode .next-step-card:hover { border-color: #3b82f6 !important; box-shadow: 0 8px 20px -4px rgba(59,130,246,0.12), 0 4px 8px -2px rgba(0,0,0,0.2) !important; }
.dark-mode .next-step-info h3 { color: #f1f5f9 !important; }
.dark-mode .next-step-info p { color: #a1a7b3 !important; }
.dark-mode .next-step-arrow { background: #1a2e3d !important; color: #60a5fa !important; }
.dark-mode .next-step-card:hover .next-step-arrow { background: #3b82f6 !important; color: #fff !important; }

.dark-mode .entry-row .remove-entry { color: #6b7280 !important; }
.dark-mode .entry-row .remove-entry:hover { color: #f87171 !important; background: #3b1a1a !important; }

.dark-mode .action-bar { border-top-color: #2e3138 !important; }

.dark-mode .doc-preview h2 { color: #f1f5f9 !important; }
.dark-mode .doc-preview h3 { color: #e2e8f0 !important; }

/* ── Dark Mode: Override inline style dark colors ────────── */
/* These override inline style="color:#0f172a" etc on all elements */
.dark-mode h2[style*="color:#0f172a"],
.dark-mode h2[style*="color: #0f172a"],
.dark-mode h3[style*="color:#0f172a"],
.dark-mode h3[style*="color: #0f172a"],
.dark-mode strong[style*="color:#0f172a"],
.dark-mode strong[style*="color: #0f172a"] { color: #f1f5f9 !important; }

.dark-mode h2[style*="color:#1e293b"],
.dark-mode h2[style*="color: #1e293b"],
.dark-mode h3[style*="color:#1e293b"],
.dark-mode h3[style*="color: #1e293b"] { color: #e2e8f0 !important; }

.dark-mode p[style*="color:#0f172a"],
.dark-mode p[style*="color: #0f172a"] { color: #f1f5f9 !important; }

.dark-mode p[style*="color:#1e293b"],
.dark-mode p[style*="color: #1e293b"] { color: #e2e8f0 !important; }

.dark-mode p[style*="color:#475569"],
.dark-mode p[style*="color: #475569"],
.dark-mode li[style*="color:#475569"],
.dark-mode li[style*="color: #475569"],
.dark-mode ol[style*="color:#475569"],
.dark-mode ol[style*="color: #475569"],
.dark-mode div[style*="color:#475569"],
.dark-mode div[style*="color: #475569"] { color: #94a3b8 !important; }

.dark-mode span[style*="color:#0f172a"],
.dark-mode span[style*="color: #0f172a"] { color: #f1f5f9 !important; }

/* Dark mode: Tailwind prose class overrides */
.dark-mode .prose { color: #94a3b8; }
.dark-mode .prose h2 { color: #f1f5f9 !important; }
.dark-mode .prose h3 { color: #e2e8f0 !important; }
.dark-mode .prose p { color: #94a3b8 !important; }
.dark-mode .prose strong { color: #e2e8f0 !important; }
.dark-mode .prose li { color: #94a3b8 !important; }
.dark-mode .prose a { color: #f472b6 !important; }

.dark-mode [style*="color:#334155"] { color: #a1a7b3 !important; }
.dark-mode [style*="color: #334155"] { color: #a1a7b3 !important; }

.dark-mode .result-highlight {
    background: #1a3a2a !important; border-color: #059669 !important; color: #4ade80 !important;
}

/* ── Dark Mode: Tool Card Tags (keep readable) ──────────── */
.dark-mode .tool-card-tag.blue { background: #1e3a5f !important; color: #93c5fd !important; }
.dark-mode .tool-card-tag.indigo { background: #2e1065 !important; color: #c4b5fd !important; }
.dark-mode .tool-card-tag.orange { background: #431407 !important; color: #fdba74 !important; }
.dark-mode .tool-card-tag.purple { background: #3b0764 !important; color: #d8b4fe !important; }
.dark-mode .tool-card-tag.emerald { background: #1a3a2a !important; color: #86efac !important; }
.dark-mode .tool-card-tag.rose { background: #4c0519 !important; color: #fda4af !important; }
.dark-mode .tool-card-tag.teal { background: #134e4a !important; color: #5eead4 !important; }
.dark-mode .tool-card-tag.cyan { background: #164e63 !important; color: #67e8f9 !important; }
.dark-mode .tool-card-tag.amber { background: #451a03 !important; color: #fcd34d !important; }
.dark-mode .tool-card-tag.lime { background: #1a2e05 !important; color: #bef264 !important; }

.dark-mode .blog-card-tag { color: #60a5fa !important; }
.dark-mode .blog-card-meta { color: #6b7280 !important; }

/* ── Dark Mode: Tailwind Utility Class Overrides ────────── */
/* These override Tailwind's generated utility classes that use hardcoded light colors */
.dark-mode .text-slate-900 { color: #f1f5f9 !important; }
.dark-mode .text-slate-800 { color: #e2e8f0 !important; }
.dark-mode .text-slate-700 { color: #cbd5e1 !important; }
.dark-mode .text-slate-600 { color: #a1a7b3 !important; }
.dark-mode .text-slate-500 { color: #a1a7b3 !important; }
.dark-mode .text-slate-400 { color: #6b7280 !important; }

.dark-mode .bg-white { background-color: #272a33 !important; }
.dark-mode .bg-white\/95, .dark-mode [class*="bg-white/95"] { background-color: rgba(15,23,42,0.95) !important; }
.dark-mode .bg-slate-50 { background-color: #1c1f26 !important; }
.dark-mode .bg-slate-100 { background-color: #272a33 !important; }
.dark-mode .bg-slate-200 { background-color: #2f3340 !important; }

.dark-mode .border-slate-100 { border-color: #2f3340 !important; }
.dark-mode .border-slate-200 { border-color: #3d4455 !important; }

/* Dark mode: colored background utilities (result cards, info boxes) */
.dark-mode .bg-blue-50 { background-color: #1a2e3d !important; }
.dark-mode .bg-blue-100 { background-color: #1e3a5f !important; }
.dark-mode .bg-green-50 { background-color: #052e16 !important; }
.dark-mode .bg-green-100 { background-color: #064e3b !important; }
.dark-mode .bg-indigo-50 { background-color: #1e1b4b !important; }
.dark-mode .bg-indigo-100 { background-color: #2e1065 !important; }
.dark-mode .bg-purple-50 { background-color: #2e1065 !important; }
.dark-mode .bg-purple-100 { background-color: #3b0764 !important; }
.dark-mode .bg-orange-50 { background-color: #431407 !important; }
.dark-mode .bg-orange-100 { background-color: #7c2d12 !important; }
.dark-mode .bg-red-50 { background-color: #450a0a !important; }
.dark-mode .bg-red-100 { background-color: #7f1d1d !important; }
.dark-mode .bg-teal-50 { background-color: #042f2e !important; }
.dark-mode .bg-teal-100 { background-color: #064e3b !important; }
.dark-mode .bg-amber-50 { background-color: #451a03 !important; }
.dark-mode .bg-amber-100 { background-color: #78350f !important; }

.dark-mode .border-blue-200 { border-color: #1e3a5f !important; }
.dark-mode .border-green-200 { border-color: #064e3b !important; }
.dark-mode .border-indigo-200 { border-color: #2e1065 !important; }
.dark-mode .border-purple-200 { border-color: #3b0764 !important; }
.dark-mode .border-orange-200 { border-color: #7c2d12 !important; }
.dark-mode .border-red-200 { border-color: #7f1d1d !important; }
.dark-mode .border-teal-200 { border-color: #064e3b !important; }
.dark-mode .border-amber-200 { border-color: #78350f !important; }

/* Dark mode: gradient-from utilities (result summary cards) */
.dark-mode .from-blue-50 { --tw-gradient-from: #1a2e3d !important; }
.dark-mode .to-blue-100 { --tw-gradient-to: #1e3a5f !important; }
.dark-mode .from-green-50 { --tw-gradient-from: #052e16 !important; }
.dark-mode .to-green-100 { --tw-gradient-to: #064e3b !important; }
.dark-mode .from-indigo-50 { --tw-gradient-from: #1e1b4b !important; }
.dark-mode .to-indigo-100 { --tw-gradient-to: #2e1065 !important; }
.dark-mode .from-purple-50 { --tw-gradient-from: #2e1065 !important; }
.dark-mode .to-purple-100 { --tw-gradient-to: #3b0764 !important; }
.dark-mode .border-slate-300 { border-color: #525969 !important; }
.dark-mode .divide-slate-100 > * + * { border-color: #2f3340 !important; }
.dark-mode .divide-slate-200 > * + * { border-color: #3d4455 !important; }

.dark-mode .ring-slate-200 { --tw-ring-color: #2e3138 !important; }
.dark-mode .ring-slate-300 { --tw-ring-color: #4b5563 !important; }

.dark-mode .shadow-sm { box-shadow: 0 1px 2px rgba(0,0,0,0.2) !important; }
.dark-mode .shadow { box-shadow: 0 1px 3px rgba(0,0,0,0.2), 0 1px 2px rgba(0,0,0,0.15) !important; }
.dark-mode .shadow-md { box-shadow: 0 4px 6px rgba(0,0,0,0.2) !important; }
.dark-mode .shadow-lg { box-shadow: 0 8px 12px rgba(0,0,0,0.2) !important; }
.dark-mode .shadow-xl { box-shadow: 0 12px 20px rgba(0,0,0,0.2) !important; }

/* Dark mode: Tailwind brand custom color overrides — cerise accent */
.dark-mode .text-brand-600 { color: #f472b6 !important; }
.dark-mode .text-brand-700 { color: #f9a8d4 !important; }
.dark-mode .bg-brand-50 { background-color: #3b0f2a !important; }
.dark-mode .bg-brand-100 { background-color: #3b0f2a !important; }
.dark-mode .hover\:text-brand-700:hover { color: #f9a8d4 !important; }
.dark-mode .hover\:bg-brand-50:hover { background-color: #3b0f2a !important; }
.dark-mode .hover\:border-brand-200:hover { border-color: #ec4899 !important; }
.dark-mode .from-brand-600 { --tw-gradient-from: #e91e63 !important; }
.dark-mode .to-indigo-600 { --tw-gradient-to: #ec4899 !important; }

/* Dark mode: Tailwind semantic color overrides (sidebar icons, badges, etc.) */
.dark-mode .bg-blue-50 { background-color: #1e3a5f !important; }
.dark-mode .bg-blue-100 { background-color: #1e3a5f !important; }
.dark-mode .text-blue-600 { color: #60a5fa !important; }
.dark-mode .bg-indigo-50 { background-color: #2e1065 !important; }
.dark-mode .bg-indigo-100 { background-color: #2e1065 !important; }
.dark-mode .text-indigo-600 { color: #a5b4fc !important; }
.dark-mode .bg-orange-50 { background-color: #431407 !important; }
.dark-mode .bg-orange-100 { background-color: #431407 !important; }
.dark-mode .text-orange-600 { color: #fdba74 !important; }
.dark-mode .bg-purple-50 { background-color: #3b0764 !important; }
.dark-mode .bg-purple-100 { background-color: #3b0764 !important; }
.dark-mode .text-purple-600 { color: #d8b4fe !important; }
.dark-mode .bg-emerald-50 { background-color: #1a3a2a !important; }
.dark-mode .bg-emerald-100 { background-color: #1a3a2a !important; }
.dark-mode .text-emerald-600 { color: #86efac !important; }
.dark-mode .bg-rose-50 { background-color: #4c0519 !important; }
.dark-mode .bg-rose-100 { background-color: #4c0519 !important; }
.dark-mode .text-rose-600 { color: #fda4af !important; }
.dark-mode .bg-teal-50 { background-color: #134e4a !important; }
.dark-mode .bg-teal-100 { background-color: #134e4a !important; }
.dark-mode .text-teal-600 { color: #5eead4 !important; }
.dark-mode .bg-cyan-50 { background-color: #164e63 !important; }
.dark-mode .bg-cyan-100 { background-color: #164e63 !important; }
.dark-mode .text-cyan-600 { color: #67e8f9 !important; }
.dark-mode .bg-amber-50 { background-color: #451a03 !important; }
.dark-mode .bg-amber-100 { background-color: #451a03 !important; }
.dark-mode .text-amber-600 { color: #fcd34d !important; }
.dark-mode .bg-green-50 { background-color: #1a3a2a !important; }
.dark-mode .bg-green-100 { background-color: #1a3a2a !important; }
.dark-mode .text-green-600 { color: #86efac !important; }
.dark-mode .bg-red-50 { background-color: #3b1a1a !important; }
.dark-mode .bg-red-100 { background-color: #3b1a1a !important; }
.dark-mode .text-red-600 { color: #fca5a5 !important; }
.dark-mode .bg-yellow-50 { background-color: #451a03 !important; }
.dark-mode .bg-yellow-100 { background-color: #451a03 !important; }
.dark-mode .text-yellow-600 { color: #fcd34d !important; }

/* Dark mode: Tailwind text-*-700 overrides (stat card labels) */
.dark-mode .text-blue-700 { color: #60a5fa !important; }
.dark-mode .text-green-700 { color: #86efac !important; }
.dark-mode .text-emerald-700 { color: #6ee7b7 !important; }
.dark-mode .text-indigo-700 { color: #a5b4fc !important; }
.dark-mode .text-purple-700 { color: #d8b4fe !important; }
.dark-mode .text-amber-700 { color: #fcd34d !important; }
.dark-mode .text-red-700 { color: #fca5a5 !important; }
.dark-mode .text-orange-700 { color: #fdba74 !important; }
.dark-mode .text-teal-700 { color: #5eead4 !important; }
.dark-mode .text-cyan-700 { color: #67e8f9 !important; }
.dark-mode .text-yellow-700 { color: #fde68a !important; }

/* Dark mode: Tailwind text-*-800 overrides (status badges, recommendations) */
.dark-mode .text-blue-800 { color: #93c5fd !important; }
.dark-mode .text-green-800 { color: #86efac !important; }
.dark-mode .text-emerald-800 { color: #6ee7b7 !important; }
.dark-mode .text-indigo-800 { color: #a5b4fc !important; }
.dark-mode .text-purple-800 { color: #d8b4fe !important; }
.dark-mode .text-amber-800 { color: #fcd34d !important; }
.dark-mode .text-red-800 { color: #fca5a5 !important; }
.dark-mode .text-orange-800 { color: #fdba74 !important; }
.dark-mode .text-teal-800 { color: #5eead4 !important; }
.dark-mode .text-yellow-800 { color: #fde68a !important; }

/* Dark mode: Tailwind text-*-900 overrides (CRITICAL — calculator result values) */
.dark-mode .text-blue-900 { color: #93c5fd !important; }
.dark-mode .text-green-900 { color: #86efac !important; }
.dark-mode .text-emerald-900 { color: #6ee7b7 !important; }
.dark-mode .text-indigo-900 { color: #a5b4fc !important; }
.dark-mode .text-purple-900 { color: #d8b4fe !important; }
.dark-mode .text-amber-900 { color: #fcd34d !important; }
.dark-mode .text-red-900 { color: #fca5a5 !important; }
.dark-mode .text-orange-900 { color: #fdba74 !important; }
.dark-mode .text-teal-900 { color: #5eead4 !important; }
.dark-mode .text-yellow-900 { color: #fde68a !important; }

/* Dark mode: Tailwind border-*-200 overrides (result card borders) */
.dark-mode .border-blue-200 { border-color: #1e3a5f !important; }
.dark-mode .border-green-200 { border-color: #2d5a3d !important; }
.dark-mode .border-emerald-200 { border-color: #2d5a3d !important; }
.dark-mode .border-indigo-200 { border-color: #312e81 !important; }
.dark-mode .border-purple-200 { border-color: #581c87 !important; }
.dark-mode .border-amber-200 { border-color: #78350f !important; }
.dark-mode .border-red-200 { border-color: #7f1d1d !important; }
.dark-mode .border-orange-200 { border-color: #7c2d12 !important; }
.dark-mode .border-teal-200 { border-color: #134e4a !important; }
.dark-mode .border-cyan-200 { border-color: #164e63 !important; }
.dark-mode .border-yellow-200 { border-color: #713f12 !important; }
.dark-mode .border-blue-300 { border-color: #1e3a5f !important; }
.dark-mode .border-green-300 { border-color: #2d5a3d !important; }
.dark-mode .border-indigo-300 { border-color: #312e81 !important; }
.dark-mode .border-amber-300 { border-color: #78350f !important; }

/* Dark mode: Tailwind gradient custom property overrides (result card gradients) */
.dark-mode .from-blue-50 { --tw-gradient-from: #1e3a5f !important; }
.dark-mode .to-blue-100 { --tw-gradient-to: #1e3a5f !important; }
.dark-mode .from-green-50 { --tw-gradient-from: #1a3a2a !important; }
.dark-mode .to-green-100 { --tw-gradient-to: #14532d !important; }
.dark-mode .from-emerald-50 { --tw-gradient-from: #1a3a2a !important; }
.dark-mode .to-emerald-100 { --tw-gradient-to: #14532d !important; }
.dark-mode .from-indigo-50 { --tw-gradient-from: #2e1065 !important; }
.dark-mode .to-indigo-100 { --tw-gradient-to: #312e81 !important; }
.dark-mode .from-purple-50 { --tw-gradient-from: #3b0764 !important; }
.dark-mode .to-purple-100 { --tw-gradient-to: #581c87 !important; }
.dark-mode .from-amber-50 { --tw-gradient-from: #451a03 !important; }
.dark-mode .to-amber-100 { --tw-gradient-to: #78350f !important; }
.dark-mode .from-red-50 { --tw-gradient-from: #3b1a1a !important; }
.dark-mode .to-red-100 { --tw-gradient-to: #7f1d1d !important; }
.dark-mode .from-orange-50 { --tw-gradient-from: #431407 !important; }
.dark-mode .to-orange-100 { --tw-gradient-to: #7c2d12 !important; }
.dark-mode .from-teal-50 { --tw-gradient-from: #134e4a !important; }
.dark-mode .to-teal-100 { --tw-gradient-to: #134e4a !important; }
.dark-mode .from-slate-50 { --tw-gradient-from: #0f172a !important; }
.dark-mode .to-slate-100 { --tw-gradient-to: #1e293b !important; }
.dark-mode .from-yellow-50 { --tw-gradient-from: #451a03 !important; }
.dark-mode .to-yellow-100 { --tw-gradient-to: #713f12 !important; }
.dark-mode .from-emerald-100 { --tw-gradient-from: #14532d !important; }
.dark-mode .to-emerald-200 { --tw-gradient-to: #1a3a2a !important; }

/* Dark mode: Tailwind gradient backgrounds */
.dark-mode .bg-gradient-to-br { background-blend-mode: normal !important; }

/* Dark mode: form inputs using Tailwind classes */
.dark-mode input[type="text"],
.dark-mode input[type="number"],
.dark-mode input[type="email"],
.dark-mode input[type="date"],
.dark-mode input[type="password"],
.dark-mode textarea,
.dark-mode select {
    background-color: #272a33 !important;
    border-color: #3d4455 !important;
    color: #e2e8f0 !important;
}
.dark-mode input:focus,
.dark-mode textarea:focus,
.dark-mode select:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.2) !important;
}

/* Dark mode: glass-panel overrides */
.dark-mode .glass-panel {
    background: #272a33 !important;
    border-color: #3d4455 !important;
}
/* NOTE: .tool-card dark mode is defined at line ~2998 — do not duplicate here */

/* Dark mode: search bar */
.dark-mode .search-bar input {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

/* ═══════════════════════════════════════════════════════════
   FEATURE 3 — COMMAND PALETTE
   ═══════════════════════════════════════════════════════════ */
.cmd-palette-overlay {
    position: fixed; inset: 0; z-index: 99999;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
    display: flex; align-items: flex-start; justify-content: center;
    padding-top: 15vh;
}
.cmd-palette-box {
    width: 90%; max-width: 520px; background: #fff;
    border-radius: 1rem; box-shadow: 0 25px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}
.cmd-palette-input {
    width: 100%; padding: 1rem 1.25rem; border: none; outline: none;
    font-size: 1rem; font-weight: 500; color: #1e293b;
    background: transparent; border-bottom: 1px solid #e2e8f0;
    font-family: inherit;
}
.cmd-palette-results {
    max-height: 360px; overflow-y: auto;
}
@media (max-width: 600px) {
    .cmd-palette-overlay { padding-top: 8vh; }
    .cmd-palette-results {
        max-height: 50vh;
        max-height: calc(100dvh - 180px);
    }
}
.cmd-palette-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.75rem 1.25rem; text-decoration: none; color: inherit;
    border-bottom: 1px solid #f1f5f9; transition: background 0.1s;
    cursor: pointer;
}
.cmd-palette-item:hover,
.cmd-palette-item.highlighted { background: #eff6ff; }
.cmd-item-name { font-weight: 600; font-size: 0.9rem; color: #1e293b; }
.cmd-item-cat {
    font-size: 0.7rem; font-weight: 700; color: #64748b;
    background: #f1f5f9; padding: 0.15rem 0.5rem; border-radius: 9999px;
}
.cmd-palette-footer {
    display: flex; justify-content: space-between;
    padding: 0.5rem 1.25rem; font-size: 0.75rem; color: #94a3b8;
    border-top: 1px solid #e2e8f0;
}
.cmd-palette-footer kbd {
    background: #f1f5f9; border: 1px solid #e2e8f0;
    padding: 0.1rem 0.35rem; border-radius: 0.25rem;
    font-size: 0.7rem; font-family: inherit;
}

.dark-mode .cmd-palette-box { background: #1e293b !important; }
.dark-mode .cmd-palette-input { color: #e2e8f0 !important; border-bottom-color: #334155 !important; }
.dark-mode .cmd-palette-item { border-bottom-color: #334155 !important; }
.dark-mode .cmd-palette-item:hover,
.dark-mode .cmd-palette-item.highlighted { background: #334155 !important; }
.dark-mode .cmd-item-name { color: #f1f5f9 !important; }
.dark-mode .cmd-item-cat { background: #334155 !important; color: #94a3b8 !important; }
.dark-mode .cmd-palette-footer { border-top-color: #334155 !important; color: #64748b !important; }
.dark-mode .cmd-palette-footer kbd { background: #334155 !important; border-color: #475569 !important; }
.dark-mode .cmd-palette-overlay { background: rgba(0,0,0,0.7) !important; }

/* ═══════════════════════════════════════════════════════════
   FEATURE 8 — MOBILE FAB
   ═══════════════════════════════════════════════════════════ */
.fab-button {
    display: none;
    position: fixed; bottom: 20px; right: 20px; z-index: 998;
    width: 56px; height: 56px; border-radius: 50%;
    background: #e91e63; color: #fff; border: none;
    box-shadow: 0 4px 16px rgba(233,30,99,0.4);
    cursor: pointer; align-items: center; justify-content: center;
    transition: transform 0.2s;
}
.fab-button:active { transform: scale(0.9); }
.fab-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
    display: flex; align-items: flex-end; justify-content: center;
    padding-bottom: 90px;
}
.fab-panel {
    width: 90%; max-width: 360px; background: #fff;
    border-radius: 1.25rem; overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    animation: slideUpFade 0.2s ease-out;
}
.fab-panel-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 1.25rem; font-weight: 700; color: #0f172a;
    border-bottom: 1px solid #e2e8f0;
}
.fab-close {
    background: none; border: none; cursor: pointer; color: #94a3b8;
    padding: 4px; border-radius: 6px;
}
.fab-close:hover { background: #f1f5f9; }
.fab-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem;
    padding: 1rem;
}
.fab-tool-btn {
    display: flex; align-items: center; justify-content: center;
    padding: 1rem; background: #f8fafc; border: 1px solid #e2e8f0;
    border-radius: 0.75rem; text-decoration: none; color: #1e293b;
    font-weight: 600; font-size: 0.85rem; text-align: center;
    transition: all 0.15s;
}
.fab-tool-btn:hover { background: #fdf2f8; border-color: #f9a8d4; color: #be185b; }

.dark-mode .fab-button { background: #e91e63 !important; }
.dark-mode .fab-panel { background: #1e293b !important; }
.dark-mode .fab-panel-header { color: #f1f5f9 !important; border-bottom-color: #334155 !important; }
.dark-mode .fab-close { color: #64748b !important; }
.dark-mode .fab-close:hover { background: #334155 !important; }
.dark-mode .fab-tool-btn { background: #334155 !important; border-color: #475569 !important; color: #e2e8f0 !important; }
.dark-mode .fab-tool-btn:hover { background: #1e3a5f !important; border-color: #3b82f6 !important; color: #60a5fa !important; }

@media (max-width: 768px) {
    .fab-button { display: flex; }
}

/* ═══════════════════════════════════════════════════════════
   FEATURE 1 — RECENTLY USED TOOLS
   ═══════════════════════════════════════════════════════════ */
#recentToolsSection {
    display: flex; gap: 1rem; flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════
   FEATURE 7 — SOCIAL PROOF
   ═══════════════════════════════════════════════════════════ */
.social-proof-text {
    font-size: 0.72rem; color: #94a3b8; margin-top: 0.35rem;
    font-weight: 500;
}
.dark-mode .social-proof-text { color: #64748b !important; }

/* ═══════════════════════════════════════════════════════════
   FEATURE 4 — POST-COMPLETION SUGGESTIONS
   ═══════════════════════════════════════════════════════════ */
.next-action-section {
    display: none; max-width: 72rem; margin: 1.5rem auto; padding: 0 1rem;
}
.next-action-section.visible { display: block; }
.next-action-box {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 1rem;
    padding: 1.5rem; text-align: center;
}
.next-action-box h3 { font-size: 1.1rem; font-weight: 700; color: #0f172a; margin-bottom: 1rem; }
.next-action-links { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.next-action-link {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.75rem 1.25rem; background: #eff6ff; color: #2563eb;
    border: 1px solid #bfdbfe; border-radius: 0.75rem;
    font-weight: 700; font-size: 0.9rem; text-decoration: none;
    transition: all 0.2s;
}
.next-action-link:hover { background: #2563eb; color: #fff; border-color: #2563eb; }

.dark-mode .next-action-box { background: #1e293b !important; border-color: #334155 !important; }
.dark-mode .next-action-box h3 { color: #f1f5f9 !important; }
.dark-mode .next-action-link { background: #1e3a5f !important; color: #60a5fa !important; border-color: #2563eb !important; }
.dark-mode .next-action-link:hover { background: #2563eb !important; color: #fff !important; }

/* ═══════════════════════════════════════════════════════════
   FEATURE 5 — SHARE CALC BUTTON (already exists, just dark mode)
   ═══════════════════════════════════════════════════════════ */
.dark-mode .toast { background: #334155 !important; }

/* ═══════════════════════════════════════════════════════════
   DARK MODE — KEYBOARD SHORTCUT HINT
   ═══════════════════════════════════════════════════════════ */
.kbd-hint {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 12px; color: #94a3b8; background: #f1f5f9;
    padding: 3px 8px; border-radius: 6px; border: 1px solid #e2e8f0;
    cursor: pointer; transition: all 0.15s; font-weight: 500;
}
.kbd-hint:hover { border-color: #93c5fd; color: #2563eb; }
.kbd-hint kbd {
    background: #fff; border: 1px solid #e2e8f0;
    padding: 0 4px; border-radius: 3px; font-size: 11px;
    font-family: inherit; font-weight: 600;
}
.dark-mode .kbd-hint { background: #334155 !important; border-color: #475569 !important; color: #94a3b8 !important; }
.dark-mode .kbd-hint:hover { border-color: #3b82f6 !important; color: #60a5fa !important; }
.dark-mode .kbd-hint kbd { background: #1e293b !important; border-color: #475569 !important; }

/* ═══════════════════════════════════════════════════════════
   DARK MODE — SCROLLBAR
   ═══════════════════════════════════════════════════════════ */
.dark-mode ::-webkit-scrollbar-track { background: #1e293b; }
.dark-mode ::-webkit-scrollbar-thumb { background: #475569; }
.dark-mode ::-webkit-scrollbar-thumb:hover { background: #64748b; }

/* ═══════════════════════════════════════════════════════════
   DARK MODE — TOOL-PAGE CUSTOM CLASSES
   Overrides for <style> blocks in individual tool HTML files
   ═══════════════════════════════════════════════════════════ */

/* ── Developer Tools: URL Encoder ────────────────────────── */
.dark-mode .url-output {
    background: #1e293b !important; border-color: #334155 !important; color: #e2e8f0 !important;
}
.dark-mode .url-tab-btn {
    background: #334155 !important; border-color: #475569 !important; color: #94a3b8 !important;
}
.dark-mode .url-tab-btn.active {
    background: #2563eb !important; border-color: #2563eb !important; color: #fff !important;
}

/* ── Developer Tools: Color Converter ────────────────────── */
.dark-mode .color-preview { border-color: #334155 !important; }
.dark-mode .color-format-row {
    background: #1e293b !important; border-color: #334155 !important;
}
.dark-mode .color-format-label { color: #94a3b8 !important; }
.dark-mode .color-format-value { color: #e2e8f0 !important; }
.dark-mode .color-copy-btn { border-color: #475569 !important; color: #94a3b8 !important; }
.dark-mode .color-copy-btn:hover { border-color: #3b82f6 !important; color: #60a5fa !important; }

/* ── Developer Tools: Base64 ─────────────────────────────── */
.dark-mode .base64-output {
    background: #1e293b !important; border-color: #334155 !important; color: #e2e8f0 !important;
}

/* ── Developer Tools: Hash Generator ─────────────────────── */
.dark-mode .hash-result-card {
    background: #1e293b !important; border-color: #334155 !important;
}
.dark-mode .hash-label { color: #94a3b8 !important; }
.dark-mode .hash-badge {
    background: #1e3a5f !important; color: #60a5fa !important;
}
.dark-mode .hash-value {
    background: #0f172a !important; color: #e2e8f0 !important;
}

/* ── Developer Tools: Markdown Preview ───────────────────── */
.dark-mode .md-split { border-color: #334155 !important; }
.dark-mode .md-editor-pane { border-right-color: #334155 !important; }
.dark-mode .md-preview-pane { background: #0f172a !important; }
.dark-mode .md-pane-header {
    background: #1e293b !important; border-bottom-color: #334155 !important; color: #94a3b8 !important;
}
.dark-mode .md-textarea {
    color: #e2e8f0 !important; background: #0f172a !important; border-color: #334155 !important;
}
.dark-mode .md-preview-content { color: #e2e8f0 !important; }
.dark-mode .md-preview-content h1,
.dark-mode .md-preview-content h2 { color: #f1f5f9 !important; }
.dark-mode .md-preview-content h3 { color: #e2e8f0 !important; }
.dark-mode .md-preview-content a { color: #60a5fa !important; }
.dark-mode .md-preview-content code {
    background: #334155 !important; color: #f1f5f9 !important;
}
.dark-mode .md-preview-content pre {
    background: #1e293b !important; border-color: #334155 !important;
}
.dark-mode .md-preview-content blockquote {
    border-left-color: #3b82f6 !important; color: #94a3b8 !important;
}
.dark-mode .md-preview-content table th,
.dark-mode .md-preview-content table td {
    border-color: #334155 !important;
}

/* ── Developer Tools: JSON Formatter ─────────────────────── */
.dark-mode .error-box {
    background: #3b1a1a !important; border-color: #dc2626 !important; color: #fca5a5 !important;
}
.dark-mode .tab-btn-json {
    background: #334155 !important; border-color: #475569 !important; color: #94a3b8 !important;
}
.dark-mode .tab-btn-json.active {
    background: #2563eb !important; border-color: #2563eb !important; color: #fff !important;
}

/* ── Developer Tools: JWT Decoder ────────────────────────── */
.dark-mode .jwt-part { background: #1e293b !important; border-color: #334155 !important; }
.dark-mode .jwt-label { color: #94a3b8 !important; }
.dark-mode .jwt-value { color: #e2e8f0 !important; }

/* ── Developer Tools: CSS Minifier ───────────────────────── */
.dark-mode .css-output {
    background: #1e293b !important; border-color: #334155 !important; color: #e2e8f0 !important;
}

/* ── Text Tools: Random Name Generator ───────────────────── */
.dark-mode .name-card {
    background: #1e293b !important; border-color: #334155 !important;
}
.dark-mode .name-card .name-text { color: #f1f5f9 !important; }

/* ── Text Tools: Text Case Converter ─────────────────────── */
.dark-mode .case-btn {
    background: #334155 !important; border-color: #475569 !important; color: #94a3b8 !important;
}
.dark-mode .case-btn.active {
    background: #2563eb !important; border-color: #2563eb !important; color: #fff !important;
}
.dark-mode .case-btn:hover {
    border-color: #3b82f6 !important; color: #60a5fa !important;
}

/* ── Text Tools: Binary to Text ──────────────────────────── */
.dark-mode .tab-btn-bin {
    background: #334155 !important; border-color: #475569 !important; color: #94a3b8 !important;
}
.dark-mode .tab-btn-bin.active {
    background: #2563eb !important; border-color: #2563eb !important; color: #fff !important;
}

/* ── Health Tools: Water Intake ──────────────────────────── */
.dark-mode .glass-icon {
    background: #334155 !important; border-color: #475569 !important;
}
.dark-mode .glass-icon.filled {
    background: #1e3a5f !important; border-color: #3b82f6 !important;
}

/* ── Health Tools: Sleep Calculator ──────────────────────── */
.dark-mode .sleep-time-card {
    background: linear-gradient(135deg, #1e3a5f, #1e293b) !important;
    border-color: #2563eb !important;
}
.dark-mode .sleep-time-card.recommended {
    background: linear-gradient(135deg, #1a3a2a, #1e293b) !important;
    border-color: #059669 !important;
}
.dark-mode .sleep-time-value { color: #f1f5f9 !important; }
.dark-mode .sleep-time-label { color: #94a3b8 !important; }

/* ── Health Tools: Pregnancy Due Date ────────────────────── */
.dark-mode .milestone-item {
    background: #1e293b !important; border-color: #334155 !important;
}
.dark-mode .milestone-week {
    background: linear-gradient(135deg, #1e3a5f, #1e293b) !important;
    border-color: #2563eb !important; color: #60a5fa !important;
}
.dark-mode .milestone-text { color: #94a3b8 !important; }
.dark-mode .milestone-text strong { color: #e2e8f0 !important; }

/* ── Health Tools: Ovulation Calculator ──────────────────── */
.dark-mode .cal-day { color: #94a3b8 !important; }
.dark-mode .cal-day.today { color: #f1f5f9 !important; font-weight: 800; }
.dark-mode .cal-day.period { background: #3b1a1a !important; color: #fca5a5 !important; }
.dark-mode .cal-day.fertile { background: #1a3a2a !important; color: #86efac !important; }
.dark-mode .cal-day.header { color: #64748b !important; }

/* ── Health Tools: Body Fat / Macro ──────────────────────── */
.dark-mode .bf-result-card,
.dark-mode .macro-result-card {
    background: #1e293b !important; border-color: #334155 !important;
}

/* ── Calculators: Grade Calculator ───────────────────────── */
.dark-mode .mode-btn {
    background: #334155 !important; border-color: #475569 !important; color: #94a3b8 !important;
}
.dark-mode .mode-btn.active {
    background: #2563eb !important; border-color: #2563eb !important; color: #fff !important;
}

/* ── Calculators: SIP / Compound Interest Charts ─────────── */
.dark-mode .sip-chart-container,
.dark-mode .ci-chart-container {
    background: #1e293b !important; border-color: #334155 !important;
}

/* ── Career: Resume Builder ──────────────────────────────── */
.dark-mode .template-thumb {
    background: #334155 !important; border-color: #475569 !important;
}
.dark-mode .template-thumb.active {
    border-color: #3b82f6 !important;
}
.dark-mode .resume-preview {
    background: #1e293b !important; color: #e2e8f0 !important;
}
.dark-mode .resume-preview h1 { color: #f1f5f9 !important; }
.dark-mode .resume-preview h2 {
    color: #f1f5f9 !important; border-bottom-color: #334155 !important;
}
.dark-mode .resume-preview h3 { color: #e2e8f0 !important; }
.dark-mode .resume-preview .contact-line { color: #94a3b8 !important; }
.dark-mode .resume-preview .exp-sub { color: #94a3b8 !important; }
.dark-mode .resume-preview .skill-tag {
    background: #334155 !important; color: #e2e8f0 !important;
}

/* ── Career: Job Tracker ─────────────────────────────────── */
.dark-mode .job-card {
    background: #1e293b !important; border-color: #334155 !important;
}
.dark-mode .job-card:hover { border-color: #3b82f6 !important; }

/* ── Business: Invoice / Salary Slip Preview ─────────────── */
.dark-mode .invoice-preview,
.dark-mode .salary-preview {
    background: #1e293b !important; border-color: #334155 !important; color: #e2e8f0 !important;
}
.dark-mode .invoice-preview h2,
.dark-mode .salary-preview h2 { color: #f1f5f9 !important; }
.dark-mode .invoice-preview table th {
    background: #334155 !important; color: #94a3b8 !important;
}
.dark-mode .invoice-preview table td {
    border-color: #334155 !important; color: #e2e8f0 !important;
}

/* ── Business: Profit Calculator Results ─────────────────── */
.dark-mode .profit-result-card {
    background: #1e293b !important; border-color: #334155 !important;
}

/* ── Professional: Bio Generator Output ──────────────────── */
.dark-mode .bio-output {
    background: #1e293b !important; border-color: #334155 !important; color: #e2e8f0 !important;
}

/* ── Professional: Email Signature Preview ───────────────── */
.dark-mode .sig-preview-container {
    background: #fff !important; /* Keep white — signature is meant for email clients */
    border-color: #334155 !important;
}

/* ── Professional: Business Card Preview ─────────────────── */
.dark-mode .bcard-preview {
    background: #fff !important; /* Keep white — card is meant for export */
    border-color: #334155 !important;
}

/* ── Utility: Pomodoro Timer ─────────────────────────────── */
.dark-mode .pomodoro-dot { background: #475569 !important; }
.dark-mode .pomodoro-dot.active { background: #3b82f6 !important; }
.dark-mode .pomodoro-dot.completed { background: #10b981 !important; }
.dark-mode .timer-svg circle:first-child { stroke: #334155 !important; }

/* ── Utility: Password Generator ─────────────────────────── */
.dark-mode .password-output {
    background: #1e293b !important; border-color: #334155 !important; color: #e2e8f0 !important;
}

/* ── Utility: Aspect Ratio Calculator ────────────────────── */
.dark-mode .ratio-preview {
    background: #1e293b !important; border-color: #334155 !important;
}

/* ── Calculators: Loan Amortization Table ────────────────── */
.dark-mode .amort-table th {
    background: #334155 !important; color: #94a3b8 !important;
}
.dark-mode .amort-table td {
    border-bottom-color: #334155 !important; color: #e2e8f0 !important;
}

/* ── Calculators: Discount & Tax ─────────────────────────── */
.dark-mode .discount-result {
    background: #1e293b !important; border-color: #334155 !important;
}

/* ── Developer: EXIF Stripper ────────────────────────────── */
.dark-mode .exif-data-card {
    background: #1e293b !important; border-color: #334155 !important;
}
.dark-mode .exif-label { color: #94a3b8 !important; }
.dark-mode .exif-value { color: #e2e8f0 !important; }

/* ── Utility: QR Code ────────────────────────────────────── */
.dark-mode .qr-preview {
    background: #fff !important; /* QR needs white background to scan */
    border-color: #334155 !important;
}

/* ── Blog / SEO Content Blocks ───────────────────────────── */
.dark-mode .seo-feature-card {
    background: #1e293b !important; border-color: #334155 !important;
}
.dark-mode .seo-feature-card h3 { color: #f1f5f9 !important; }
.dark-mode .seo-feature-card p { color: #94a3b8 !important; }

/* ── Miscellaneous: Generic card/box overrides ───────────── */
.dark-mode .info-box {
    background: #1e3a5f !important; border-color: #2563eb !important; color: #93c5fd !important;
}
.dark-mode .warning-box {
    background: #78350f !important; border-color: #d97706 !important; color: #fde68a !important;
}
.dark-mode .success-box {
    background: #1a3a2a !important; border-color: #059669 !important; color: #86efac !important;
}

/* ── Dynamic inline style overrides (JS-generated content) ─ */
/* These catch dynamically injected HTML with hardcoded light colors */
.dark-mode [style*="background:#fff"] { background-color: #272a33 !important; }
.dark-mode [style*="background: #fff"] { background-color: #272a33 !important; }
.dark-mode [style*="background:#ffffff"] { background-color: #272a33 !important; }
.dark-mode [style*="background: #ffffff"] { background-color: #272a33 !important; }
.dark-mode [style*="background-color:#fff"] { background-color: #272a33 !important; }
.dark-mode [style*="background-color: #fff"] { background-color: #272a33 !important; }
.dark-mode [style*="background:#f8fafc"] { background-color: #272a33 !important; }
.dark-mode [style*="background: #f8fafc"] { background-color: #272a33 !important; }
.dark-mode [style*="color:#0f172a"] { color: #f1f5f9 !important; }
.dark-mode [style*="color: #0f172a"] { color: #f1f5f9 !important; }
.dark-mode [style*="color:#1e293b"] { color: #e2e8f0 !important; }
.dark-mode [style*="color: #1e293b"] { color: #e2e8f0 !important; }
.dark-mode [style*="color:#334155"] { color: #a1a7b3 !important; }
.dark-mode [style*="color: #334155"] { color: #a1a7b3 !important; }
.dark-mode [style*="color:#475569"] { color: #94a3b8 !important; }
.dark-mode [style*="color: #475569"] { color: #94a3b8 !important; }
.dark-mode [style*="color:#333333"] { color: #e2e8f0 !important; }
.dark-mode [style*="color:#333"] { color: #e2e8f0 !important; }
.dark-mode [style*="color: #333"] { color: #e2e8f0 !important; }
.dark-mode [style*="color:#555"] { color: #94a3b8 !important; }
.dark-mode [style*="color:#555555"] { color: #94a3b8 !important; }
.dark-mode [style*="color:#64748b"] { color: #94a3b8 !important; }
.dark-mode [style*="color: #64748b"] { color: #94a3b8 !important; }
.dark-mode [style*="border-color:#e2e8f0"] { border-color: #334155 !important; }
.dark-mode [style*="border-color: #e2e8f0"] { border-color: #334155 !important; }
.dark-mode [style*="border:1px solid #e2e8f0"] { border-color: #334155 !important; }
.dark-mode [style*="border: 1px solid #e2e8f0"] { border-color: #334155 !important; }

/* Exception: signature/email-card previews should stay white for export accuracy */
.dark-mode .sig-preview-container [style*="background:#fff"],
.dark-mode .sig-preview-container [style*="background: #fff"],
.dark-mode .bcard-preview [style*="background:#fff"],
.dark-mode .bcard-preview [style*="background: #fff"] {
    background-color: #fff !important;
}
.dark-mode .sig-preview-container [style*="color:#0f172a"],
.dark-mode .sig-preview-container [style*="color:#333"],
.dark-mode .bcard-preview [style*="color:#0f172a"],
.dark-mode .bcard-preview [style*="color:#333"] {
    color: #0f172a !important; /* Keep original colors in export previews */
}

/* ── Favorite Button ─────────────────────────────────────── */
.fav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 0;
}
.fav-btn:hover {
    border-color: #f59e0b;
    background: #fffbeb;
    transform: scale(1.1);
}
.fav-btn.favorited {
    border-color: #f59e0b;
    background: #fffbeb;
}
.fav-btn.favorited:hover {
    border-color: #ef4444;
    background: #fef2f2;
}
.dark-mode .fav-btn {
    background: #1e293b;
    border-color: #334155;
}
.dark-mode .fav-btn:hover {
    border-color: #f59e0b;
    background: #422006;
}
.dark-mode .fav-btn.favorited {
    border-color: #f59e0b;
    background: #422006;
}
.fav-icon {
    transition: all 0.2s ease;
}

/* ── PWA Install Prompt ──────────────────────────────────── */
.pwa-install-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);
    z-index: 9998;
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 400px;
    animation: slideUpFade 0.4s ease-out;
}
.pwa-install-banner button {
    background: white;
    color: #2563eb;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}
.pwa-install-banner .pwa-dismiss {
    background: transparent;
    color: rgba(255,255,255,0.7);
    padding: 0.25rem;
    font-size: 1.2rem;
}

/* ── Focus Styles for Accessibility ──────────────────────── */

/* ── Phase 4: Review Cards ────────────────────────────────── */
.review-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-xl, 16px);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: all var(--duration-normal, 0.25s) var(--ease-out, cubic-bezier(0.4, 0, 0.2, 1));
    will-change: transform, box-shadow;
}
.review-card:hover {
    border-color: #e91e63;
    box-shadow: 0 8px 20px -4px rgba(233,30,99,0.10);
    transform: translateY(-2px);
}
.dark-mode .review-card {
    background: #272a33 !important;
    border-color: #3d4455 !important;
}
.dark-mode .review-card:hover {
    border-color: #f472b6 !important;
    box-shadow: 0 8px 20px -4px rgba(233,30,99,0.12), 0 4px 8px -2px rgba(0,0,0,0.2) !important;
}

/* ── Phase 3: Enhanced Tool Widget Containers ─────────────── */
/* Additional overflow protection for complex tool layouts */
.glass-panel select,
.glass-panel input[type="text"],
.glass-panel input[type="number"],
.glass-panel textarea {
    width: 100%; max-width: 100%;
    overflow-wrap: break-word;
    box-sizing: border-box;
    min-width: 0;
}

/* ── Phase 1: Secondary Accent Integration ────────────────── */
/* Success states use emerald instead of generic green */
.result-highlight {
    background: #f0fdf4;
    border: 2px solid #10b981;
    border-radius: var(--radius-lg, 12px);
    padding: 1rem;
    text-align: center;
    font-weight: 700;
    color: #065f46;
}
.dark-mode .result-highlight {
    background: #064e3b !important;
    border-color: #10b981 !important;
    color: #6ee7b7 !important;
}

/* Toast success state uses emerald */
.toast.toast-success,
.toast[data-type="success"] {
    border-left: 3px solid #10b981;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 4px;
}
.cmd-palette-item:focus-visible,
.tool-card:focus-visible,
.category-card:focus-visible {
    outline: 3px solid #3b82f6;
    outline-offset: -2px;
}

/* ═══════════════════════════════════════════════════════════
   TASK 5 — UNIVERSAL TOOL UI STANDARD
   Bulletproof CSS classes for all 330+ nested tool pages.
   Apply .universal-tool-container to the main wrapper of
   any tool page to guarantee no overlapping flex/grid children.
   ═══════════════════════════════════════════════════════════ */

/* ── 1. Universal Tool Container ─────────────────────────── */
.universal-tool-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
    box-sizing: border-box;
}
.universal-tool-container > * {
    min-width: 0;
    flex-shrink: 1;
    max-width: 100%;
    box-sizing: border-box;
}
.universal-tool-container .flex {
    flex-wrap: wrap;
}
.universal-tool-container .flex > * {
    min-width: 0;
    flex-shrink: 1;
}
.universal-tool-container input,
.universal-tool-container select,
.universal-tool-container textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow-wrap: break-word;
}
/* Force single-column on narrow viewports */
@media (max-width: 768px) {
    .universal-tool-container {
        flex-direction: column;
    }
    .universal-tool-container > * {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* ── 2. Bulletproof Dark-Mode Input Styling ─────────────── */
/* These selectors cascade to ALL inputs site-wide in dark mode */
.dark-mode input[type="text"],
.dark-mode input[type="number"],
.dark-mode input[type="email"],
.dark-mode input[type="date"],
.dark-mode input[type="password"],
.dark-mode input[type="url"],
.dark-mode input[type="tel"],
.dark-mode input[type="search"],
.dark-mode textarea,
.dark-mode select {
    background-color: #272a33 !important;
    border-color: #3d4455 !important;
    color: #e2e8f0 !important;
    -webkit-text-fill-color: #e2e8f0 !important;
}
.dark-mode input::placeholder,
.dark-mode textarea::placeholder {
    color: #6b7280 !important;
    -webkit-text-fill-color: #6b7280 !important;
}
.dark-mode select option {
    background: #272a33 !important;
    color: #e2e8f0 !important;
}
.dark-mode input:focus,
.dark-mode textarea:focus,
.dark-mode select:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.2) !important;
    outline: none;
}

/* ── 3. Native Feature Block (Premium Ad/Content Slots) ── */
/* Use .native-feature-block inside tool pages to insert
   premium-looking static content, feature cards, or ads. */
.native-feature-block {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.5rem;
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
}
.native-feature-block h3 {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    line-height: 1.4;
}
.native-feature-block p {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
    max-width: 480px;
}
.native-feature-block .native-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1.25rem;
    background: #2563eb;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 0.625rem;
    text-decoration: none;
    transition: all 0.2s ease;
}
.native-feature-block .native-cta:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}
/* Dark mode: Native Feature Block */
.dark-mode .native-feature-block {
    background: linear-gradient(135deg, #272a33 0%, #1e2026 100%) !important;
    border-color: #3d4455 !important;
}
.dark-mode .native-feature-block h3 { color: #f1f5f9 !important; }
.dark-mode .native-feature-block p { color: #94a3b8 !important; }

/* ── Performance Optimizations ───────────────────────────── */
.tool-card,.category-card,.faq-item,.blog-card{content-visibility:auto;contain-intrinsic-size:0 220px;}
.ad-container,ins.adsbygoogle{min-height:90px;}

/* ═══════════════════════════════════════════════════════════
   MOBILE AD SLOT KILL-SWITCH — Bulletproof height clamp
   Targets: .ad-slot wrapper, ins.adsbygoogle (including
   dynamically injected by AdSense), their iframes, and
   any AdSense Auto Ads containers.
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 640px) {

    /* ── Layer 1: The wrapper (.ad-slot) ──────────────────── */
    /* This is the outermost container that sits between
       </header> and <main>, or inside <main>. Constraining
       this clips ALL children regardless of what AdSense
       injects inside. */
    .ad-slot,
    .ad-slot-leaderboard,
    .ad-slot-rectangle {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 100px !important;
        min-height: 50px !important;
        max-height: 100px !important;
        margin: 6px auto !important;
        padding: 0 !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
        -webkit-overflow-scrolling: touch;
    }

    /* ── Layer 2: The <ins> element ──────────────────────── */
    /* Overrides the inline style="width:728px;height:90px"
       that AdSense sets. Also catches any <ins> that AdSense
       Auto Ads injects without a .ad-slot wrapper. */
    .ad-slot ins.adsbygoogle,
    .ad-slot-leaderboard ins.adsbygoogle,
    .ad-slot-rectangle ins.adsbygoogle,
    ins.adsbygoogle {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 100px !important;
        min-height: 50px !important;
        max-height: 100px !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    /* ── Layer 3: AdSense iframes & injected children ────── */
    /* The iframe that AdSense creates inside <ins> can have
       its own fixed dimensions. Clamp it. */
    .ad-slot iframe,
    .ad-slot-leaderboard iframe,
    .ad-slot-rectangle iframe,
    ins.adsbygoogle iframe,
    ins.adsbygoogle > div,
    ins.adsbygoogle > span {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 100px !important;
        max-height: 100px !important;
        overflow: hidden !important;
    }

    /* ── Layer 4: AdSense Auto Ads containers ────────────── */
    /* Auto Ads can inject <div> wrappers that don't have
       the .ad-slot class. Target common selectors. */
    .ad-container,
    .adsbygoogle-container,
    [data-ad-status],
    ins.adsbygoogle[data-ad-status="filled"],
    ins.adsbygoogle[data-ad-status="done"] {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 100px !important;
        max-height: 100px !important;
        overflow: hidden !important;
    }

    /* ── Layer 5: Ad placeholder states ──────────────────── */
    .ad-placeholder,
    .ad-placeholder-leaderboard,
    .ad-placeholder-banner {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 100px !important;
        min-height: 50px !important;
        max-height: 100px !important;
        margin: 6px auto !important;
        overflow: hidden !important;
    }
    .ad-placeholder-sidebar { display: none !important; }

    /* ── Layer 6: AdSense slot wrappers ──────────────────── */
    .adsense-slot-wrapper,
    .adsense-slot-wrapper--leaderboard,
    .adsense-slot-wrapper--banner {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 100px !important;
        max-height: 100px !important;
        margin: 6px auto !important;
        overflow: hidden !important;
    }
}

/* ── Skip Link Accessibility ──────────────────────────────── */
.skip-link{position:absolute;top:-120%;left:1rem;background:#2563eb;color:#fff;padding:.5rem 1rem;border-radius:.375rem;z-index:9999;text-decoration:none;font-weight:600;transition:top .2s;}
.skip-link:focus{top:1rem;}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important;}}
h1,h2,h3{text-wrap:balance;}
::-webkit-scrollbar{width:8px;}
::-webkit-scrollbar-track{background:#0f172a;}
::-webkit-scrollbar-thumb{background:#334155;border-radius:4px;}
button,[role="button"],select,.tool-card,.category-card{min-height:44px;}
