/* ── Tokens ─────────────────────────────────────────────────────────────── */
:root {
    --bg: #0C0C0F;
    --bg2: #141418;
    --bg3: #1E1E24;
    --border: #2A2A33;
    --text: #E8E8F0;
    --muted: #7A7A8C;
    --accent: #D94C00;
    --accent2: #FF7A1A;
    --green: #3DDB96;
    --radius: 12px;
    --font: 'Space Grotesk', system-ui, sans-serif;
    --mono: 'Space Mono', monospace;
}

/* ── Nav Dropdown (Mega Menu) ────────────────────────────────────────────── */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-trigger {
    font-size: 0.85rem;
    color: var(--muted);
    transition: color .2s;
    cursor: pointer;
}

.nav-dropdown-trigger:hover {
    color: var(--text);
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 0.9rem);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 220px;
    padding: 0.5rem;
    z-index: 200;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
}

.nav-dropdown:hover .nav-dropdown-menu {
    display: block;
}

.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -0.9rem;
    left: 0;
    right: 0;
    height: 0.9rem;
}

.nav-dropdown-menu a {
    display: block;
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
    color: var(--text);
    border-radius: 8px;
    white-space: nowrap;
    transition: background .15s;
}

.nav-dropdown-menu a:hover {
    background: var(--bg3);
}

/* ── Reset ──────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
}

main {
    flex: 1;
}

/* ── Google Login Button ─────────────────────────────────────────────────── */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    background: #fff;
    color: #1F1F1F;
    padding: 0.75rem;
    border-radius: var(--radius);
    font-family: var(--font);
    font-weight: 500;
    font-size: 0.9rem;
    border: 1px solid var(--border);
    transition: opacity .2s;
}

.btn-google:hover {
    opacity: 0.9;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: var(--muted);
    font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border);
}

.auth-divider span {
    padding: 0 0.75rem;
}

.monitor-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.monitor-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.6rem 0.8rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.monitor-domain {
    font-size: 0.875rem;
    font-weight: 500;
    flex: 1;
}

.monitor-days {
    font-size: 0.8rem;
    color: var(--muted);
    font-family: var(--mono);
}


/* ── Navbar ─────────────────────────────────────────────────────────────── */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 2.5rem;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: rgba(12, 12, 15, 0.9);
    backdrop-filter: blur(12px);
    z-index: 100;
}

.nav-logo {
    font-family: var(--mono);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav-logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--muted);
    font-size: 0.9rem;
    transition: color .2s;
}

.nav-links a:hover {
    color: var(--text);
}

.nav-link--dashboard {
    color: var(--text);
    font-weight: 600;
    background: rgba(217, 76, 0, .15);
    border: 1px solid rgba(217, 76, 0, .3);
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
}

.nav-link--dashboard:hover {
    color: var(--text);
    background: rgba(217, 76, 0, .22);
}


/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn-primary {
    background: #8F3000;
    color: #fffdfd;
    padding: 0.6rem 1.4rem;
    border-radius: var(--radius);
    font-family: var(--font);
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: opacity .7s, transform .1s;
    display: inline-block;
}

.btn-primary:hover {
    opacity: 1;
}

.btn-primary:active {
    transform: scale(.98);
}

.btn-primary.btn-lg {
    padding: 0.85rem 2rem;
    font-size: 1rem;
}

.btn-primary.btn-sm {
    padding: 0.55rem 1rem;
    font-size: 0.85rem;
}

.btn-primary.btn-full {
    width: 100%;
    text-align: center;
    padding: 0.85rem;
}

.btn-outline {
    border: 1px solid var(--border);
    color: var(--text) !important;
    padding: 0.55rem 1.2rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    transition: border-color .2s;
}

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

.btn-ghost {
    color: var(--muted);
    font-size: 1rem;
    font-weight: 500;
    transition: color .2s;
    display: inline-block;
    padding: 0.85rem 0;
}

.btn-ghost:hover {
    color: var(--text);
}

/* ── Flash Messages ──────────────────────────────────────────────────────── */
.flash-container {
    padding: 0 2.5rem;
    margin-top: 1rem;
}

.flash {
    padding: 0.85rem 1.2rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.flash--success {
    background: rgba(61, 219, 150, .12);
    border: 1px solid rgba(61, 219, 150, .3);
    color: var(--green);
}

.flash--error {
    background: rgba(255, 80, 80, .1);
    border: 1px solid rgba(255, 80, 80, .3);
    color: #ff6b6b;
}

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
    max-width: 780px;
    margin: 6rem auto 4rem;
    padding: 0 2rem;
    text-align: center;
}

.hero-tag {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent2);
    background: rgba(123, 97, 255, .1);
    border: 1px solid rgba(123, 97, 255, .25);
    padding: 0.35rem 1rem;
    border-radius: 999px;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: 1.25rem;
}

.accent {
    color: var(--accent);
}

.hero-sub {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 560px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Ad Slots ────────────────────────────────────────────────────────────── */
.ad-slot {
    position: relative;
    text-align: center;
    margin: 2rem auto;
}

.suggestion-section {
    max-width: 900px;
    margin: 0 auto 3rem;
    padding: 0 2rem;
}

.suggestion-card {
    background: linear-gradient(135deg, rgba(217, 76, 0, 0.16), rgba(255, 122, 26, 0.08));
    border: 1px solid rgba(217, 76, 0, 0.24);
    border-radius: calc(var(--radius) * 1.5);
    padding: 2rem;
    text-align: center;
}

.suggestion-card h2 {
    font-size: clamp(1.4rem, 2.5vw, 1.9rem);
    margin-bottom: 0.75rem;
}

.suggestion-card p {
    color: var(--muted);
    margin-bottom: 1.25rem;
}

.suggestion-form {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    max-width: 680px;
    margin: 0 auto;
}

.suggestion-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.suggestion-form input,
.suggestion-form textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-family: inherit;
}

.suggestion-form input::placeholder,
.suggestion-form textarea::placeholder {
    color: var(--muted);
}

.suggestion-form textarea {
    resize: vertical;
    min-height: 110px;
}

.suggestion-form button {
    align-self: center;
}

@media (max-width: 700px) {
    .suggestion-field-row {
        grid-template-columns: 1fr;
    }
}

.ad-slot--banner {
    max-width: 760px;
}

.ad-label {
    display: block;
    font-size: 0.65rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.4rem;
}

.ad-placeholder {
    background: var(--bg2);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    color: var(--muted);
    font-size: 0.85rem;
    font-family: var(--mono);
}

/* ── Tools Section ───────────────────────────────────────────────────────── */
.tools-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.section-eyebrow {
    font-family: var(--mono);
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 3rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.tool-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) * 1.5);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: border-color .2s, transform .2s;
    cursor: pointer;
}

.tool-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
}

.tool-card--accent {
    border-color: rgba(123, 97, 255, .35);
    background: rgba(123, 97, 255, .06);
}

.tool-icon {
    font-size: 2rem;
}

.tool-body h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.tool-body p {
    font-size: 0.875rem;
    color: var(--muted);
    line-height: 1.6;
}

.tool-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.tool-tag {
    font-family: var(--mono);
    font-size: 0.7rem;
    background: var(--bg3);
    border: 1px solid var(--border);
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    color: var(--muted);
}

.tool-arrow {
    color: var(--accent);
    font-size: 1.1rem;
}

/* ── CTA Section ─────────────────────────────────────────────────────────── */
.cta-section {
    text-align: center;
    padding: 6rem 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.cta-section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.cta-section p {
    color: var(--muted);
    margin-bottom: 2rem;
}

/* ── Auth ────────────────────────────────────────────────────────────────── */
.auth-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 140px);
    padding: 2rem;
}

.auth-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) * 1.5);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
}

.auth-card h1 {
    font-size: 1.6rem;
    margin-bottom: 0.4rem;
}

.auth-sub {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
    color: var(--muted);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    background: var(--bg3);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 0.95rem;
    transition: border-color .2s;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
}

.form-group input[type="file"] {
    padding: 0.6rem;
    cursor: pointer;
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
}

.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--muted);
    font-size: 0.875rem;
}

.auth-switch a {
    color: var(--accent2);
}

/* ── Dashboard ───────────────────────────────────────────────────────────── */
.dashboard {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.dash-header {
    margin-bottom: 2.5rem;
}

.dash-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.dash-header p {
    color: var(--muted);
}

.tools-grid--dash {
    margin-bottom: 3rem;
}

.usage-section h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.usage-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.usage-table th,
.usage-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.usage-table th {
    color: var(--muted);
    font-weight: 500;
    font-family: var(--mono);
    font-size: 0.75rem;
}

/* ── Tool Page ───────────────────────────────────────────────────────────── */
.tool-page {
    max-width: 700px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.back-link {
    color: #d8d4cf;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-block;
    margin-bottom: 0.9rem;
    padding: 0.18rem 0.45rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.back-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.tool-page-header {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.tool-page-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.tool-page-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.tool-page-header p {
    color: var(--muted);
}

.tool-form-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) * 1.5);
    padding: 2rem;
    margin-top: 1.5rem;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.footer {
    border-top: 1px solid var(--border);
    padding: 2rem 2.5rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.8rem;
    font-family: var(--mono);
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .navbar {
        padding: 1rem 1.25rem;
    }

    .hero {
        margin-top: 3rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .tools-section,
    .dashboard,
    .tool-page {
        padding: 2rem 1.25rem;
    }
}

/* ── Category Sections ──────────────────────────────────────────────────── */
.category-section {
    margin-bottom: 3rem;
    scroll-margin-top: 90px;
}

.category-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

/* ── Nav Categories ──────────────────────────────────────────────────────── */
.nav-categories {
    display: flex;
    gap: 1.5rem;
}

.nav-categories a {
    font-size: 0.85rem;
    color: var(--muted);
    transition: color .2s;
}

.nav-categories a:hover {
    color: var(--text);
}

/* ── User Avatar & Dropdown ──────────────────────────────────────────────── */
.user-menu {
    position: relative;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: none;
    font-family: var(--font);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .2s;
}

.user-avatar:hover {
    opacity: 0.85;
}

.user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 220px;
    padding: 0.5rem;
    z-index: 200;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
}

.user-dropdown.open {
    display: block;
}

.user-dropdown-header {
    display: flex;
    flex-direction: column;
    padding: 0.6rem 0.75rem 0.75rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.5rem;
}

.user-dropdown-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

.user-dropdown-email {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 0.15rem;
}

.user-dropdown a {
    display: block;
    padding: 0.55rem 0.75rem;
    font-size: 0.875rem;
    color: var(--text);
    border-radius: 8px;
    transition: background .15s;
}

.user-dropdown a:hover {
    background: var(--bg3);
}

/* Hide category links on smaller screens to avoid clutter */
@media (max-width: 900px) {
    .nav-categories {
        display: none;
    }
}

/* ── Featured Tools Strip ────────────────────────────────────────────────── */
.featured-tools {
    max-width: 900px;
    margin: 3rem auto 2.5rem;
    padding: 0 2rem;
    text-align: center;
}

.featured-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.featured-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.featured-card {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.6rem 1.25rem;
    transition: border-color .2s, transform .2s, background .2s;
}

.featured-card:hover {
    border-color: var(--accent);
    background: rgba(217, 76, 0, .12);
    transform: translateY(-2px);
}

.featured-icon {
    font-size: 1.1rem;
}

.featured-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
}

@media (max-width: 600px) {
    .featured-grid {
        gap: 0.5rem;
    }

    .featured-card {
        padding: 0.5rem 1rem;
    }
}

/* ── Hamburger Button ────────────────────────────────────────────────────── */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

.hamburger-btn span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text);
    margin: 0 auto;
    transition: transform .2s, opacity .2s;
}

.hamburger-btn.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger-btn.open span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile Menu Panel ───────────────────────────────────────────────────── */
.mobile-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem;
}

.mobile-menu.open {
    display: flex;
}

.mobile-menu a {
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    color: var(--text);
    border-radius: 8px;
    transition: background .15s;
}

.mobile-menu a:hover {
    background: var(--bg3);
}

/* Prevent nav-links content from shrinking off screen */
.nav-links {
    flex-shrink: 0;
}

.user-menu {
    flex-shrink: 0;
}

/* Responsive rules - switched to hamburger earlier (1080px) so avatar never gets squeezed */
@media (max-width: 1080px) {
    .nav-categories {
        display: none;
    }

    .hamburger-btn {
        display: flex;
    }
}

@media (min-width: 1081px) {
    .mobile-menu {
        display: none !important;
    }
}

/* ── Buy Me a Coffee Card ────────────────────────────────────────────────── */
.coffee-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 138, 61, 0.08);
    border: 1px solid rgba(255, 138, 61, 0.25);
    border-radius: calc(var(--radius) * 1.5);
    padding: 1.25rem 1.5rem;
    margin-top: 1.5rem;
}

.coffee-icon {
    font-size: 1.75rem;
    flex-shrink: 0;
}

.coffee-text {
    flex: 1;
}

.coffee-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

.coffee-sub {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 0.15rem;
}

.btn-coffee {
    flex-shrink: 0;
    background: #FF8A3D;
    color: #1a1a1a;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    transition: opacity .2s;
}

.btn-coffee:hover {
    opacity: 0.88;
}

@media (max-width: 600px) {
    .coffee-card {
        flex-direction: column;
        text-align: center;
    }
}


/* ── Tool Search Bar ─────────────────────────────────────────────────────── */
.tool-search-wrapper {
    margin-bottom: 2.5rem;
}

.tool-search-input {
    width: 100%;
    background: var(--bg2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 0.95rem;
    outline: none;
    transition: border-color .2s;
}

.tool-search-input:focus {
    border-color: var(--accent);
}

.tool-search-input::placeholder {
    color: var(--muted);
}

.no-results-message {
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
    padding: 2rem 0;
}

/* Hide category sections entirely when all their tools are filtered out */
.category-section.search-hidden {
    display: none;
}

.tool-card.search-hidden {
    display: none;
}

/* ── Live Search Results Dropdown ────────────────────────────────────────── */
.tool-search-wrapper {
    position: relative;
    max-width: 500px;
    margin: 0 auto 2rem;
}

.search-results {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem;
    max-height: 320px;
    overflow-y: auto;
    z-index: 150;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .5);
    text-align: left;
}

.search-results.open {
    display: block;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    transition: background .15s;
}

.search-result-item:hover {
    background: var(--bg3);
}

.search-result-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.search-result-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
}

.search-result-category {
    font-size: 0.7rem;
    color: var(--muted);
    margin-left: auto;
    font-family: var(--mono);
}

.search-no-results {
    padding: 1rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--muted);
}

/* ── Policy Pages ────────────────────────────────────────────────────────── */
.policy-page {
    max-width: 700px;
    margin: 0 auto;
    padding: 4rem 2rem 6rem;
}

.policy-page h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.policy-updated {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 2rem;
}

.policy-page h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.policy-page p {
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.policy-page ul {
    margin: 0 0 1rem 1.25rem;
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.8;
}

.policy-page a {
    color: var(--accent2);
    text-decoration: underline;
}

.footer-links {
    margin-top: 0.5rem;
}

.footer-links a {
    color: var(--muted);
}

.footer-links a:hover {
    color: var(--text);
}