/*
Theme Name: ToolGrid
Theme URI: https://toolgrid.online/
Author: ToolGrid
Author URI: https://toolgrid.online/
Description: 62 Free Online Tools for creators, developers, and professionals. No signup, fast, and private.
Version: 1.0.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: toolgrid
Domain Path: /languages
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
*/

/* ===== ORIGINAL TOOLGRID STYLES - ALL PRESERVED AS-IS ===== */

:root {
    --primary: #0A2540;
    --accent: #FF6B00;
    --accent-hover: #E55F00;
    --bg: #FFFFFF;
    --card-bg: #FFFFFF;
    --border: #E5E7EB;
    --text-main: #1F2937;
    --text-muted: #4B5563;
    --text-light: #6B7280;
    --footer-bg: #1F2937;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    color: var(--text-main);
    background-color: #F9FAFB;
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* NAVIGATION */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a:focus-visible {
    color: var(--accent);
}

.nav-toggle {
    width: 44px;
    height: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    border: 0;
    background: transparent;
    border-radius: 10px;
    position: relative;
    z-index: 2101;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
    background: rgba(10,37,64,0.06);
    outline: none;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
    transition: transform 0.25s ease, opacity 0.2s ease, background 0.2s ease;
    transform-origin: center;
}

/* The hamburger is intentionally used at every viewport width so the same
   navigation experience works on desktop, tablet, and mobile. */
.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.48);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: min(340px, 88vw);
    height: 100dvh;
    padding: 88px 28px 32px;
    background: var(--primary);
    box-shadow: -12px 0 32px rgba(0,0,0,0.28);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    z-index: 2100;
    transform: translateX(105%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.3s ease, visibility 0.3s ease;
    overflow-y: auto;
}

.nav-menu.active {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
}

.nav-menu a {
    color: #fff;
    font-size: 1rem;
    padding: 13px 12px;
    border-radius: 8px;
}

.nav-menu a:hover,
.nav-menu a:focus-visible {
    color: #fff;
    background: rgba(255,255,255,0.10);
    outline: none;
}

.nav-toggle.active span {
    background: var(--primary);
}

body.menu-open {
    overflow: hidden;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: block;
}

/* HERO */
.tg-hero {
    text-align: center;
    padding: 80px 20px;
    background: var(--primary);
    color: white;
    border-radius: 0 0 24px 24px;
    margin-bottom: 40px;
}

.tg-hero h1 {
    font-size: 3rem;
    margin: 0;
    font-weight: 800;
}

.tg-hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin: 15px 0 30px;
}

.search-container {
    display: flex !important;
    flex-direction: row !important;
    gap: 10px;
    max-width: 600px;
    margin: 20px auto 0;
    position: relative;
    width: 100%;
}

.tg-search {
    flex: 1;
    min-width: 0; /* Allow shrinking */
    padding: 16px 20px;
    border-radius: 12px;
    border: none;
    font-size: 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    outline: none;
}

.search-btn {
    background: var(--accent);
    color: white;
    border: none;
    width: 54px;
    height: 54px;
    border-radius: 12px;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.search-btn:hover {
    background: var(--accent-hover);
}

/* CATEGORIES */
.tg-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin: 40px 0;
}

.tg-cat-btn {
    padding: 10px 20px;
    border: 1px solid var(--border);
    background: white;
    color: var(--text-muted);
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.tg-cat-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.tg-cat-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.2);
}

/* GRID */
.tg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 80px;
}

.tg-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
}

.tg-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.05);
    border-color: var(--accent);
}

.tg-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.tg-card h3 {
    margin: 0 0 10px;
    font-size: 1.25rem;
    color: var(--primary);
    font-weight: 700;
}

.tg-card p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-muted);
    flex-grow: 1;
}

.use-tool {
    margin-top: 20px;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.2s;
}

.tg-card:hover .use-tool {
    opacity: 1;
}

/* TOOL PAGE / BLUE TOOLGRID HERO */
#tool-view {
    padding-bottom: 70px;
}

.tg-tool-wrap {
    padding-top: 24px;
}

.tg-tool-header {
    background: var(--primary);
    color: #fff;
    border-radius: 0 0 24px 24px;
    padding: 48px 28px 52px;
    margin: 0 -20px 34px;
    text-align: center;
}

.tg-tool-header .tg-tool-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.05rem;
    margin-bottom: 18px;
}

.tg-tool-header .tg-tool-brand-icon {
    width: 30px;
    height: 30px;
    display: block;
}

.tg-tool-header h1 {
    margin: 0 auto 12px;
    color: #fff;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.15;
    font-weight: 800;
    max-width: 900px;
}

.tg-tool-header p {
    margin: 0 auto;
    max-width: 760px;
    color: rgba(255,255,255,0.9);
    font-size: 1.05rem;
}

.tg-breadcrumbs {
    padding: 8px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.tg-breadcrumbs a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.tg-tool-box {
    max-width: 900px;
    margin: 0 auto 32px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: clamp(22px, 4vw, 38px);
    box-shadow: 0 10px 28px rgba(10,37,64,0.07);
}

.tg-howto,
.tg-tips,
.tg-faq {
    max-width: 900px;
    margin: 24px auto 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
}

.tg-howto h3,
.tg-tips h3,
.tg-faq h3,
.tg-related h3 {
    color: var(--primary);
    margin-top: 0;
}

.tg-howto ol,
.tg-tips ul {
    margin: 0;
    padding-left: 24px;
}

.tg-howto li,
.tg-tips li {
    margin: 10px 0;
}

.tg-faq {
    margin-bottom: 24px;
}

.faq-item + .faq-item {
    border-top: 1px solid var(--border);
    margin-top: 18px;
    padding-top: 18px;
}

.faq-item h4 {
    margin: 0 0 6px;
    color: var(--primary);
}

.faq-item p {
    margin: 0;
    color: var(--text-muted);
}

.tg-related {
    max-width: 1100px;
    margin: 34px auto 0;
}

.tg-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.tg-related-grid .tg-card {
    min-height: 150px;
}

@media (max-width: 640px) {
    .tg-tool-header {
        padding: 38px 20px 42px;
        margin-left: -20px;
        margin-right: -20px;
        border-radius: 0 0 20px 20px;
    }

    .tg-tool-box,
    .tg-howto,
    .tg-tips,
    .tg-faq {
        padding: 22px 18px;
    }
}

/* PAGE VIEWS */
#home-view, #tool-view, #page-view {
    display: none;
}

#home-view.active, #tool-view.active, #page-view.active {
    display: block;
}

.tg-page-wrap {
    background: white;
    padding: 40px;
    border-radius: 20px;
    border: 1px solid var(--border);
    margin: 40px 0;
    min-height: 400px;
}

.tg-page-wrap h1 {
    color: var(--primary);
    margin-top: 0;
}

.tg-page-wrap h2 {
    color: var(--primary);
    margin-top: 30px;
}

.tg-page-wrap p {
    color: var(--text-muted);
    line-height: 1.6;
}

.tg-tool-wrap {
    max-width: 900px;
    margin: 40px auto;
}

.tg-breadcrumbs {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tg-breadcrumbs a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.tg-breadcrumbs a:hover {
    color: var(--accent);
}

.tg-tool-header {
    margin-bottom: 40px;
}

.tg-tool-header h1 {
    font-size: 2.5rem;
    color: var(--primary);
    margin: 0 0 12px;
    font-weight: 800;
}

.tg-tool-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin: 0;
}

.tg-tool-box {
    background: white;
    border: 2px solid var(--border);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    margin-bottom: 40px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tg-tool-form {
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.tg-tool-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary);
}

.tg-upload-area {
    border: 2px dashed var(--border);
    padding: 40px;
    border-radius: 12px;
    background: #F9FAFB;
    transition: 0.3s;
}

.tg-upload-area:hover {
    border-color: var(--accent);
    background: #FFF7ED;
}

.tg-btn-outline {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.tg-btn-outline:hover {
    background: var(--accent);
    color: white;
}

.tg-result-box {
    text-align: left;
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

.tg-stat-card {
    background: #F3F4F6;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.tg-stat-card h4 {
    margin: 0 0 5px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.tg-stat-card p {
    margin: 0;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
}

.tg-upload-text {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.tg-btn {
    background: var(--accent);
    color: white;
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.2);
}

.tg-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 0, 0.3);
}

.tg-note {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 24px;
}

.tg-howto {
    background: white;
    padding: 32px;
    border-radius: 16px;
    border: 1px solid var(--border);
    margin: 40px 0;
}

.tg-howto h3 {
    color: var(--primary);
    margin-top: 0;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.tg-howto ol {
    padding-left: 20px;
    margin: 0;
}

.tg-howto li {
    margin-bottom: 12px;
    color: var(--text-muted);
}

.tg-related {
    margin-top: 60px;
}

.tg-related h3 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 24px;
}

.tg-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

/* FOOTER */
.tg-footer {
    background: var(--footer-bg);
    color: white;
    padding: 80px 20px 40px;
    margin-top: 100px;
}

.tg-footer-wrap {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.tg-footer h4 {
    color: var(--accent);
    margin-bottom: 24px;
    font-size: 1.2rem;
    font-weight: 700;
}

.tg-footer p {
    color: #9CA3AF;
    font-size: 0.95rem;
    line-height: 1.6;
}

.tg-footer a {
    color: #D1D5DB;
    text-decoration: none;
    display: block;
    margin: 12px 0;
    transition: color 0.2s;
    font-size: 0.95rem;
}

.tg-footer a:hover {
    color: var(--accent);
}

.tg-copy {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid #374151;
    margin-top: 60px;
    color: #9CA3AF;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .tg-hero { padding: 60px 20px; }
    .tg-hero h1 { font-size: 2.2rem; }
    .tg-grid { grid-template-columns: 1fr; }
    .tg-tool-header h1 { font-size: 2rem; }
}


/* TIPS & BEST PRACTICES */
.tg-tips {
    background: #FFF7ED;
    border-left: 4px solid var(--accent);
    padding: 24px;
    border-radius: 8px;
    margin: 40px 0;
}

.tg-tips h3 {
    color: var(--primary);
    margin-top: 0;
    font-size: 1.3rem;
    margin-bottom: 16px;
}

.tg-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tg-tips li {
    margin-bottom: 10px;
    color: var(--text-muted);
    padding-left: 24px;
    position: relative;
}

.tg-tips li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
    font-size: 1.1rem;
}

/* FAQ SECTION */
.tg-faq {
    background: #F9FAFB;
    border: 1px solid var(--border);
    padding: 32px;
    border-radius: 12px;
    margin: 40px 0;
}

.tg-faq h3 {
    color: var(--primary);
    margin-top: 0;
    font-size: 1.3rem;
    margin-bottom: 24px;
}

.faq-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.faq-item h4 {
    color: var(--primary);
    margin: 0 0 8px;
    font-weight: 600;
    font-size: 1rem;
}

.faq-item p {
    color: var(--text-muted);
    margin: 0;
    line-height: 1.6;
}


/* =========================================================
   ToolGrid UI polish: consistent brand header + navigation
   ========================================================= */
:root {
    --hero-blue: #0A2540;
    --hero-blue-2: #0D2D4D;
}

header {
    background: #fff;
    min-height: 64px;
}

.logo,
.logo:visited,
.logo:hover {
    color: var(--primary);
}

.logo-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    max-width: 32px;
    min-height: 32px;
    max-height: 32px;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    overflow: visible;
}

.menu-overlay {
    z-index: 1500;
}

@media (max-width: 1024px) {
    .nav-toggle {
        display: flex !important;
        position: relative;
        z-index: 2100;
        background: transparent;
        border: 0;
    }

    .nav-menu {
        display: flex !important;
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        transform: translateX(24px);
        right: 0;
        width: min(320px, 88vw);
        background: var(--hero-blue);
        transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
        z-index: 2000;
    }

    .nav-menu.active {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        transform: translateX(0);
        right: 0;
    }

    .nav-menu a {
        color: #fff !important;
        padding: 12px 0;
        border-bottom: 1px solid rgba(255,255,255,.12);
    }

    .nav-menu a:hover,
    .nav-menu a:focus {
        color: var(--accent) !important;
    }

    body.menu-open {
        overflow: hidden;
    }
}

/* Tool pages use the same blue brand treatment as the homepage hero. */
#tool-view {
    background: var(--hero-blue);
    padding-bottom: 70px;
}

#tool-view .container {
    max-width: 1200px;
}

#tool-view .tg-breadcrumbs {
    padding-top: 34px;
    color: rgba(255,255,255,.72);
}

#tool-view .tg-breadcrumbs a {
    color: #fff;
}

#tool-view .tg-tool-header {
    color: #fff;
    margin-bottom: 28px;
    padding: 8px 0 0;
}

#tool-view .tg-tool-header h1 {
    color: #fff;
    margin-bottom: 10px;
}

#tool-view .tg-tool-header p {
    color: rgba(255,255,255,.82);
}

#tool-view .tg-tool-box {
    background: #fff;
    box-shadow: 0 18px 50px rgba(0,0,0,.18);
    border: 0;
}

#tool-view .tg-howto,
#tool-view .tg-tips,
#tool-view .tg-faq {
    box-shadow: 0 10px 30px rgba(0,0,0,.12);
}

#tool-view .tg-howto h3,
#tool-view .tg-tips h3,
#tool-view .tg-faq h3,
#tool-view .tg-related h3 {
    color: var(--primary);
}

#tool-view .tg-related {
    margin-top: 48px;
}

#tool-view .tg-related > h3 {
    color: #fff;
}

.tg-related-grid .tg-card {
    background: #fff;
}

.tg-monetization-slot {
    margin-top: 20px;
    padding: 16px;
    border-radius: 12px;
    background: #374151;
    border: 1px solid rgba(255,255,255,.08);
}

.tg-monetization-title {
    color: #fff;
    font-size: .85rem;
    font-weight: 700;
    margin: 0 0 10px;
}

.tg-monetization-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tg-monetization-links a {
    display: inline-flex;
    margin: 0;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: .8rem;
}

.tg-monetization-links a:hover {
    background: var(--accent);
    color: #fff;
}

/* Accessible keyboard focus */
.nav-toggle:focus-visible,
.nav-menu a:focus-visible,
.tg-btn:focus-visible,
.tg-cat-btn:focus-visible {
    outline: 3px solid rgba(255,107,0,.55);
    outline-offset: 3px;
}


/* =========================================================
   FINAL TOOLGRID NAVIGATION + TOOL PAGE OVERRIDES
   These rules intentionally sit last so older styles cannot override them.
   ========================================================= */
:root { --tg-hero-blue: #0A2540; }

header {
    position: sticky !important;
    top: 0 !important;
    z-index: 5000 !important;
    background: #fff !important;
    min-height: 64px !important;
}

.header-flex {
    min-height: 64px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.nav-toggle {
    appearance: none !important;
    -webkit-appearance: none !important;
    display: flex !important;
    flex: 0 0 44px !important;
    width: 44px !important;
    height: 44px !important;
    margin-left: auto !important;
    padding: 8px !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    cursor: pointer !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    position: relative !important;
    z-index: 6002 !important;
}

.nav-toggle span {
    display: block !important;
    width: 25px !important;
    height: 3px !important;
    margin: 0 !important;
    background: var(--tg-hero-blue) !important;
    border-radius: 3px !important;
    transition: transform .25s ease, opacity .2s ease !important;
}


.nav-menu {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    width: min(360px, 88vw) !important;
    height: 100dvh !important;
    margin: 0 !important;
    padding: 90px 26px 32px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 4px !important;
    background: var(--tg-hero-blue) !important;
    box-shadow: -12px 0 35px rgba(0,0,0,.28) !important;
    z-index: 6001 !important;
    transform: translateX(105%) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    overflow-y: auto !important;
    transition: transform .3s ease, opacity .25s ease, visibility .3s ease !important;
}

.nav-menu.active {
    transform: translateX(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.nav-menu a, .nav-menu a:visited {
    display: block !important;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    padding: 14px 12px !important;
    border-radius: 8px !important;
    white-space: normal !important;
    border-bottom: 1px solid rgba(255,255,255,.12) !important;
}

.nav-menu a:hover, .nav-menu a:focus-visible {
    color: #fff !important;
    background: rgba(255,255,255,.11) !important;
    outline: none !important;
}

.menu-overlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 6000 !important;
    background: rgba(0,0,0,.52) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity .25s ease, visibility .25s ease !important;
}
.menu-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* The tool page has the same dark-blue branded hero treatment as the homepage. */
#tool-view { background: #F9FAFB !important; padding: 0 0 70px !important; }
.tg-tool-hero { background: var(--tg-hero-blue) !important; color: #fff !important; }
.tg-tool-wrap-hero { max-width: 900px !important; margin: 0 auto !important; padding: 28px 20px 46px !important; }
.tg-tool-wrap-content { max-width: 900px !important; margin: 0 auto !important; padding-top: 36px !important; }
#tool-view .tg-breadcrumbs { margin: 0 0 18px !important; color: rgba(255,255,255,.75) !important; }
#tool-view .tg-breadcrumbs a { color: #fff !important; }
#tool-view .tg-tool-header { margin: 0 !important; padding: 0 !important; color: #fff !important; }
#tool-view .tg-tool-header h1 { color: #fff !important; font-size: 2.5rem !important; margin: 0 0 10px !important; }
#tool-view .tg-tool-header p { color: rgba(255,255,255,.84) !important; margin: 0 !important; }
#tool-view .tg-tool-box, #tool-view .tg-howto, #tool-view .tg-tips, #tool-view .tg-faq { background: #fff !important; }
#tool-view .tg-related > h3 { color: var(--tg-hero-blue) !important; }

@media (max-width: 640px) {
    .header-flex { padding-left: 14px !important; padding-right: 14px !important; }
    .logo { font-size: 1.2rem !important; gap: 7px !important; }
    .logo-icon { width: 30px !important; height: 30px !important; }
    .tg-tool-wrap-hero { padding: 24px 20px 38px !important; }
    #tool-view .tg-tool-header h1 { font-size: 2rem !important; line-height: 1.15 !important; }
}
