/* ==========================================================================
   PureBDInfo public theme — modern "AI product" look on Bootstrap 5.3.
   No build step: design tokens + component-variable overrides only.
   The "SHARED THEME" block is duplicated in admin.css — keep them in sync.
   ========================================================================== */

/* ─── SHARED THEME: tokens ─────────────────────────────────────────────── */

:root {
    --pbi-primary: #7c3aed;
    --pbi-primary-hover: #6d28d9;
    --pbi-primary-active: #5b21b6;
    --pbi-primary-soft: #f2edfe;
    --pbi-gradient: linear-gradient(93deg, #7c3aed 0%, #4f46e5 48%, #0ea5e9 100%);
    --pbi-glow: 0 8px 24px -8px rgba(124, 58, 237, .45);
    --pbi-ink: #191b28;
    --pbi-muted: #62688a;
    --pbi-bg: #f7f7fc;
    --pbi-border: #e7e8f4;
    --pbi-radius: 1rem;
    --pbi-radius-sm: .625rem;
    --pbi-shadow-sm: 0 1px 2px rgba(23, 25, 60, .05), 0 2px 8px rgba(23, 25, 60, .04);
    --pbi-shadow-lg: 0 16px 40px -12px rgba(124, 58, 237, .25);

    --bs-primary: var(--pbi-primary);
    --bs-primary-rgb: 124, 58, 237;
    --bs-body-bg: var(--pbi-bg);
    --bs-body-bg-rgb: 247, 247, 252;
    --bs-body-color: var(--pbi-ink);
    --bs-body-color-rgb: 25, 27, 40;
    --bs-secondary-color: var(--pbi-muted);
    --bs-tertiary-bg: #f1f1f9;
    --bs-tertiary-bg-rgb: 241, 241, 249;
    --bs-border-color: var(--pbi-border);
    --bs-border-radius: var(--pbi-radius-sm);
    --bs-link-color-rgb: 109, 40, 217;
    --bs-link-hover-color-rgb: 91, 33, 182;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--pbi-ink);
}

::selection {
    background: var(--pbi-primary-soft);
    color: var(--pbi-primary-active);
}

.text-gradient {
    background: var(--pbi-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ─── SHARED THEME: buttons ────────────────────────────────────────────── */

.btn {
    --bs-btn-border-radius: var(--pbi-radius-sm);
    font-weight: 500;
    transition: transform .14s ease, box-shadow .14s ease, background-color .14s ease,
                background-position .3s ease, border-color .14s ease, color .14s ease;
}

.btn-primary {
    --bs-btn-bg: #6d28d9;
    --bs-btn-border-color: transparent;
    --bs-btn-hover-bg: #6d28d9;
    --bs-btn-hover-border-color: transparent;
    --bs-btn-active-bg: var(--pbi-primary-active);
    --bs-btn-active-border-color: transparent;
    --bs-btn-disabled-bg: #b9a3f5;
    --bs-btn-disabled-border-color: transparent;
    --bs-btn-focus-shadow-rgb: 139, 92, 246;
    background-image: var(--pbi-gradient);
    background-size: 160% 100%;
    background-position: left center;
    box-shadow: 0 2px 8px -2px rgba(124, 58, 237, .45);
}

.btn-primary:hover {
    background-image: var(--pbi-gradient);
    background-position: right center;
    transform: translateY(-1px);
    box-shadow: var(--pbi-glow);
}

.btn-primary:active, .btn-primary:disabled {
    background-image: none;
}

.btn-outline-secondary {
    --bs-btn-color: #4a5069;
    --bs-btn-border-color: #dbdcef;
    --bs-btn-hover-color: var(--pbi-primary-hover);
    --bs-btn-hover-bg: var(--pbi-primary-soft);
    --bs-btn-hover-border-color: #cfc4f7;
    --bs-btn-active-color: var(--pbi-primary-active);
    --bs-btn-active-bg: #e9e1fd;
    --bs-btn-active-border-color: #cfc4f7;
    background-color: #fff;
}

.btn-outline-danger {
    --bs-btn-color: #c02929;
    --bs-btn-border-color: #f0c9c9;
    --bs-btn-hover-bg: #fdf0f0;
    --bs-btn-hover-color: #a61f1f;
    --bs-btn-hover-border-color: #e5b3b3;
    --bs-btn-active-bg: #fbe4e4;
    --bs-btn-active-color: #a61f1f;
    --bs-btn-active-border-color: #e5b3b3;
    background-color: #fff;
}

.btn-outline-success {
    --bs-btn-color: #157347;
    --bs-btn-border-color: #bfe5d2;
    --bs-btn-hover-bg: #ecf9f2;
    --bs-btn-hover-color: #106239;
    --bs-btn-hover-border-color: #a3d9bd;
    --bs-btn-active-bg: #ddf2e7;
    --bs-btn-active-color: #106239;
    --bs-btn-active-border-color: #a3d9bd;
    background-color: #fff;
}

/* ─── SHARED THEME: forms ──────────────────────────────────────────────── */

.form-control, .form-select {
    border-color: var(--pbi-border);
    color: var(--pbi-ink);
}

.form-control:focus, .form-select:focus {
    border-color: #c3aef8;
    box-shadow: 0 0 0 .25rem rgba(124, 58, 237, .13);
}

.form-check-input:checked {
    background-color: var(--pbi-primary);
    border-color: var(--pbi-primary);
}

.form-check-input:focus {
    border-color: #c3aef8;
    box-shadow: 0 0 0 .25rem rgba(124, 58, 237, .13);
}

.form-range::-webkit-slider-thumb {
    background: var(--pbi-primary);
}

.form-range::-moz-range-thumb {
    background: var(--pbi-primary);
}

.form-label {
    font-weight: 500;
    font-size: .875rem;
}

/* ─── SHARED THEME: cards, badges, alerts, dropdowns, pagination ───────── */

.card {
    --bs-card-border-color: var(--pbi-border);
    --bs-card-border-radius: var(--pbi-radius);
    --bs-card-bg: #fff;
}

.shadow-sm {
    box-shadow: var(--pbi-shadow-sm) !important;
}

.badge {
    font-weight: 600;
    letter-spacing: .01em;
    border-radius: 999px;
    padding: .35em .7em;
}

.text-bg-primary   { background-color: var(--pbi-primary-soft) !important; color: var(--pbi-primary-active) !important; }
.text-bg-success   { background-color: #e7f6ee !important; color: #14764a !important; }
.text-bg-secondary { background-color: #eef0f6 !important; color: #5a6076 !important; }
.text-bg-warning   { background-color: #fff3dd !important; color: #9a5b00 !important; }
.text-bg-danger    { background-color: #fdecec !important; color: #b32424 !important; }
.text-bg-light     { background-color: #f3f4fa !important; color: #5a6076 !important; }

.alert {
    border-radius: var(--pbi-radius-sm);
}

.alert-success { background: #e7f6ee; color: #14764a; border-color: #c8ebd8; }
.alert-danger  { background: #fdecec; color: #b32424; border-color: #f4cccc; }
.alert-warning { background: #fff3dd; color: #9a5b00; border-color: #f7e1b5; }

.dropdown-menu {
    --bs-dropdown-border-color: var(--pbi-border);
    --bs-dropdown-border-radius: var(--pbi-radius-sm);
    --bs-dropdown-link-active-bg: var(--pbi-primary-soft);
    --bs-dropdown-link-active-color: var(--pbi-primary-active);
    box-shadow: 0 12px 32px -12px rgba(23, 25, 60, .22);
}

.pagination {
    --bs-pagination-color: var(--pbi-ink);
    --bs-pagination-border-color: var(--pbi-border);
    --bs-pagination-hover-color: var(--pbi-primary-hover);
    --bs-pagination-hover-bg: var(--pbi-primary-soft);
    --bs-pagination-active-bg: var(--pbi-primary);
    --bs-pagination-active-border-color: var(--pbi-primary);
    --bs-pagination-focus-color: var(--pbi-primary-hover);
    --bs-pagination-focus-box-shadow: 0 0 0 .25rem rgba(124, 58, 237, .13);
}

/* ─── PUBLIC: header ───────────────────────────────────────────────────── */

.site-header {
    z-index: 1030;
}

.site-header .navbar {
    position: relative;
    padding-block: .85rem;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(12px) saturate(1.4);
    -webkit-backdrop-filter: blur(12px) saturate(1.4);
    box-shadow: 0 6px 22px -12px rgba(23, 25, 60, .22);
}

.site-header .navbar-brand {
    font-weight: 800;
    letter-spacing: -.02em;
    display: flex;
    align-items: center;
}

.brand-mark {
    width: 30px;
    height: 30px;
    margin-right: .55rem;
    flex: none;
}

.brand-text {
    background: var(--pbi-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.site-header .nav-link {
    font-weight: 500;
    color: #4a5069;
    border-radius: 999px;
    padding-inline: .85rem;
}

.site-header .nav-link:hover {
    color: var(--pbi-primary-hover);
    background: var(--pbi-primary-soft);
}

/* Navbar search field with magnifier icon */
.nav-search-input {
    border-radius: 999px;
    min-width: 15rem;
    background-color: #f3f4fa;
    border-color: transparent;
    padding-left: 2.1rem;
}

.nav-search-input:focus {
    background-color: #fff;
    min-width: 17rem;
    transition: min-width .2s ease;
}

.nav-search-icon {
    position: absolute;
    left: .8rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--pbi-muted);
    display: flex;
    pointer-events: none;
    z-index: 5;
}

.hero-search-icon {
    position: absolute;
    left: 1.25rem;
    top: 1.05rem;
    color: var(--pbi-muted);
    display: flex;
    pointer-events: none;
    z-index: 5;
}

.hero-search .form-control {
    padding-left: 2.9rem;
}

/* Gradient "AI Tools" pill in the nav */
.site-header .nav-link.ai-pill {
    background: var(--pbi-gradient);
    color: #fff;
    font-weight: 600;
    padding: .4rem 1rem;
    box-shadow: 0 2px 10px -2px rgba(124, 58, 237, .5);
}

.site-header .nav-link.ai-pill:hover {
    color: #fff;
    background: var(--pbi-gradient);
    filter: brightness(1.08);
    transform: translateY(-1px);
}

/* "All Tools" categories dropdown — light and minimal */
.nav-categories-dd {
    min-width: 15rem;
    padding: .4rem;
}

.nav-categories-dd .dropdown-header {
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--pbi-muted);
    padding: .35rem .85rem .25rem;
}

.nav-categories-dd .dropdown-item {
    border-radius: .5rem;
    padding: .42rem .85rem;
    font-weight: 400;
}

.nav-categories-dd .dropdown-item:hover {
    background: var(--pbi-primary-soft);
    color: var(--pbi-primary-active);
}

/* Live search suggestions dropdown */
.live-search-results {
    position: absolute;
    top: calc(100% + .4rem);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--pbi-border);
    border-radius: var(--pbi-radius-sm);
    box-shadow: 0 16px 40px -12px rgba(23, 25, 60, .35);
    z-index: 1060;
    overflow-y: auto;
    max-height: 21rem;
    text-align: left;
}

.live-search-item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .75rem;
    padding: .55rem .95rem;
    text-decoration: none;
    color: var(--pbi-ink);
    font-size: .925rem;
    font-weight: 500;
}

.live-search-item small {
    color: var(--pbi-muted);
    font-weight: 400;
    flex-shrink: 0;
}

.live-search-item:hover, .live-search-item.active {
    background: var(--pbi-primary-soft);
    color: var(--pbi-primary-active);
}

.live-search-heading {
    padding: .5rem .95rem .15rem;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--pbi-muted);
}

.live-search-empty {
    padding: .7rem .95rem;
    color: var(--pbi-muted);
    font-size: .9rem;
}

/* ─── PUBLIC: hero ─────────────────────────────────────────────────────── */

.hero-section {
    position: relative;
    /* no overflow:hidden — the live-search dropdown must extend past the section */
    background:
        radial-gradient(52rem 24rem at 86% -20%, rgba(124, 58, 237, .17), transparent 60%),
        radial-gradient(42rem 20rem at 10% -24%, rgba(14, 165, 233, .15), transparent 60%),
        radial-gradient(36rem 18rem at 55% 130%, rgba(219, 39, 119, .07), transparent 62%),
        linear-gradient(#fdfdff, #f8f8fe);
    border-bottom: 1px solid var(--pbi-border);
}

/* Faint dot grid that fades out — the "AI canvas" texture. */
.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(99, 102, 241, .18) 1px, transparent 1.5px);
    background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .9), transparent 80%);
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, .9), transparent 80%);
    pointer-events: none;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .35rem .95rem;
    border-radius: 999px;
    background: rgba(124, 58, 237, .08);
    border: 1px solid rgba(124, 58, 237, .22);
    color: var(--pbi-primary-hover);
    font-weight: 600;
    font-size: .85rem;
    margin-bottom: 1rem;
}

.hero-title {
    letter-spacing: -.035em;
}

.hero-search .form-control {
    border-radius: 999px 0 0 999px;
    padding-left: 1.4rem;
    border-color: #ded9f5;
    box-shadow: var(--pbi-shadow-sm);
}

.hero-search .form-control:focus {
    box-shadow: 0 0 0 .25rem rgba(124, 58, 237, .13), 0 8px 24px -10px rgba(124, 58, 237, .35);
}

.hero-search .btn {
    border-radius: 0 999px 999px 0;
    padding-inline: 1.6rem;
}

/* ─── PUBLIC: tool & category cards ────────────────────────────────────── */

.tool-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.1rem;
    background: #fff;
    border: 1px solid var(--pbi-border);
    border-radius: .75rem;
    text-decoration: none;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.tool-card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--pbi-primary) 42%, var(--pbi-border));
    box-shadow: 0 12px 30px -14px rgba(23, 25, 60, .2);
}

.tool-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .9rem;
}

.tool-card-ic {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: var(--pbi-primary-soft);
    color: var(--pbi-primary);
    display: grid;
    place-items: center;
    transition: background .16s ease, color .16s ease;
}

.tool-card-ic svg {
    width: 22px;
    height: 22px;
    display: block;
}

.tool-card:hover .tool-card-ic {
    background: var(--pbi-primary);
    color: #fff;
}

.tool-card-arrow {
    color: #cccfe0;
    opacity: 0;
    transform: translate(-3px, 3px);
    transition: opacity .16s ease, transform .16s ease, color .16s ease;
}

.tool-card:hover .tool-card-arrow {
    opacity: 1;
    transform: translate(0, 0);
    color: var(--pbi-primary);
}

.tool-card-title {
    font-size: .98rem;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--pbi-ink);
    margin: 0 0 .3rem;
    transition: color .14s ease;
}

.tool-card:hover .tool-card-title {
    color: var(--pbi-primary-hover);
}

.tool-card-text {
    font-size: .85rem;
    line-height: 1.5;
    color: var(--pbi-muted);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tool-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    box-shadow: 0 4px 12px -4px rgba(23, 25, 60, .3);
}

.tool-avatar-0 { background: linear-gradient(135deg, #8b5cf6, #6366f1); }
.tool-avatar-1 { background: linear-gradient(135deg, #0ea5e9, #22d3ee); }
.tool-avatar-2 { background: linear-gradient(135deg, #10b981, #34d399); }
.tool-avatar-3 { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.tool-avatar-4 { background: linear-gradient(135deg, #ec4899, #a855f7); }

section > h2.h4 {
    margin-bottom: 1rem;
}

/* ─── PUBLIC: tool page & content ──────────────────────────────────────── */

.breadcrumb {
    --bs-breadcrumb-divider: "›";
    --bs-breadcrumb-divider-color: #a3a9c4;
}

.accordion {
    --bs-accordion-border-color: var(--pbi-border);
    --bs-accordion-border-radius: var(--pbi-radius);
    --bs-accordion-inner-border-radius: calc(var(--pbi-radius) - 1px);
    --bs-accordion-active-bg: var(--pbi-primary-soft);
    --bs-accordion-active-color: var(--pbi-primary-active);
    --bs-accordion-btn-focus-box-shadow: 0 0 0 .25rem rgba(124, 58, 237, .13);
    box-shadow: var(--pbi-shadow-sm);
    border-radius: var(--pbi-radius);
}

.accordion-button {
    font-weight: 500;
}

.page-content h2 {
    font-size: 1.25rem;
    margin-top: 1.75rem;
}

.category-seo-content {
    max-width: 65rem;
}

/* Tool page hero (title block, sits inside .tool-panel) */
.tool-hero {
    display: flex;
    align-items: center;
    gap: .85rem;
    margin-bottom: .55rem;
}

.tool-hero-ic {
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--pbi-primary-soft);
    color: var(--pbi-primary);
    display: grid;
    place-items: center;
}

.tool-hero-ic svg {
    width: 24px;
    height: 24px;
    display: block;
}

.tool-eyebrow {
    display: inline-block;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: #9aa0be;
    text-decoration: none;
}

.tool-eyebrow:hover {
    color: var(--pbi-primary);
}

.tool-title {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.025em;
    margin: .05rem 0 0;
}

.tool-sub {
    font-size: .98rem;
    color: var(--pbi-muted);
    max-width: 64ch;
    margin: 0;
}

/* The unified tool panel — flat, bordered; holds the hero + the tool in one block */
.tool-panel {
    background: #fff;
    border: 1px solid #e2e2ea;
    border-radius: .75rem;
    padding: clamp(1.2rem, 2vw, 1.9rem);
}

.tool-divider {
    height: 1px;
    background: var(--pbi-border);
    margin: 1.15rem 0;
}

/* Breadcrumb tucked inside the tool panel */
.tool-breadcrumb {
    margin-bottom: .9rem;
    padding-bottom: .8rem;
    border-bottom: 1px solid var(--pbi-border);
}

.tool-breadcrumb .breadcrumb {
    margin-bottom: 0;
    font-size: .8rem;
    --bs-breadcrumb-divider-color: #b9bcce;
}

/* Neutralize the tool's own root card so it blends into .tool-panel */
#tool-root > .card {
    border: 0;
    box-shadow: none;
    background: transparent;
    border-radius: 0;
    overflow: visible;
}

#tool-root > .card > .card-body {
    padding: 0 !important;
}

/* Inputs inside tools — softer fill, roomy line-height, clean focus */
#tool-root .form-control,
#tool-root .form-select {
    border-radius: var(--pbi-radius-sm);
    background-color: #f7f7fb;
}

#tool-root .form-control:focus,
#tool-root .form-select:focus {
    background-color: #fff;
}

#tool-root textarea.form-control {
    line-height: 1.7;
}

/* Stat / result tiles — flat, bordered, solid numbers */
#tool-root .border.rounded {
    border-color: var(--pbi-border) !important;
    border-radius: var(--pbi-radius-sm) !important;
    background: #fff;
    transition: border-color .14s ease;
}

#tool-root .border.rounded:hover {
    border-color: #cdbff2 !important;
}

/* ─── PUBLIC: footer ───────────────────────────────────────────────────── */

.site-footer {
    background: #fff;
    border-top: 1px solid var(--pbi-border);
}

.site-footer a {
    color: var(--pbi-muted);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--pbi-primary-hover);
}

/* ─── AUTH pages (login/register share app.css) ────────────────────────── */

.auth-page {
    background:
        radial-gradient(46rem 22rem at 82% -18%, rgba(124, 58, 237, .16), transparent 60%),
        radial-gradient(38rem 18rem at 8% -22%, rgba(14, 165, 233, .13), transparent 60%),
        var(--pbi-bg);
}

.auth-card {
    max-width: 420px;
}

/* --- TOOL PAGE: white body + app-like 2-column layout --- */

body.is-tool-page,
body.is-category {
    --bs-body-bg: #fff;
    background-color: #fff;
}

/* Category page header */
.cat-head-block {
    margin-bottom: 1.6rem;
}

.cat-head-block .breadcrumb {
    font-size: .8rem;
    margin-bottom: .3rem;
    --bs-breadcrumb-divider-color: #b9bcce;
}

.cat-subchips {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1.1rem;
}

.cat-subchips a {
    font-size: .82rem;
    font-weight: 600;
    color: var(--pbi-muted);
    text-decoration: none;
    background: #fff;
    border: 1px solid var(--pbi-border);
    border-radius: 999px;
    padding: .35rem .85rem;
    transition: border-color .14s ease, color .14s ease;
}

.cat-subchips a:hover {
    border-color: var(--pbi-primary);
    color: var(--pbi-primary-active);
}

.tool-container {
    max-width: 1480px;
    margin-inline: auto;
    padding-inline: clamp(1rem, 2.5vw, 2rem);
}

.tool-layout {
    display: grid;
    gap: 1.6rem;
    grid-template-columns: 264px minmax(0, 1fr);
    align-items: start;
}

.tool-rail {
    position: sticky;
    top: 6rem;
}

@media (max-width: 991.98px) {
    .tool-layout {
        grid-template-columns: 1fr;
    }

    .tool-rail {
        position: static;
    }
}

/* AI Tools promo card — top of the left rail (subtle, single-hue highlight) */
.ai-promo {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .7rem .75rem;
    margin-bottom: 1rem;
    border-radius: .75rem;
    background: var(--pbi-primary-soft);
    border: 1px solid color-mix(in srgb, var(--pbi-primary) 20%, transparent);
    color: var(--pbi-ink);
    text-decoration: none;
    transition: border-color .15s ease, background .15s ease;
}

.ai-promo:hover {
    color: var(--pbi-ink);
    border-color: var(--pbi-primary);
    background: #ece4fd;
}

.ai-promo-ic {
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--pbi-primary);
    color: #fff;
    display: grid;
    place-items: center;
}

.ai-promo-ic svg {
    width: 19px;
    height: 19px;
    display: block;
}

.ai-promo-tx {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.2;
}

.ai-promo-title {
    display: block;
    font-weight: 800;
    font-size: .92rem;
    letter-spacing: -.01em;
    color: var(--pbi-primary-active);
}

.ai-promo-sub {
    display: block;
    font-size: .73rem;
    color: var(--pbi-muted);
    margin-top: .12rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-promo-arrow {
    flex: none;
    width: 15px;
    height: 15px;
    color: var(--pbi-primary);
    transition: transform .15s ease;
}

.ai-promo:hover .ai-promo-arrow {
    transform: translateX(3px);
}

/* Left category sidebar */
.rail-card {
    background: #fff;
    border: 1px solid var(--pbi-border);
    border-radius: .75rem;
    padding: .45rem;
}

.tools-sidebar-title {
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #9aa0be;
    padding: .55rem .6rem .35rem;
}

.tsb-accordion {
    --bs-accordion-border-color: transparent;
    box-shadow: none;
    border-radius: 0;
}

.tsb-item {
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--pbi-border);
}

.tsb-item:last-child {
    border-bottom: 0;
}

.tsb-cat {
    display: flex;
    align-items: center;
    border-radius: var(--pbi-radius-sm);
}

.tsb-cat:hover,
.tsb-cat.is-current {
    background: #f6f6fa;
}

.tsb-cat-link {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem .55rem;
    font-weight: 600;
    font-size: .9rem;
    color: var(--pbi-ink);
    text-decoration: none;
}

.tsb-cat-ic {
    flex: none;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #f1f1f5;
    color: var(--pbi-muted);
    display: grid;
    place-items: center;
}

.tsb-cat-ic svg {
    width: 16px;
    height: 16px;
    display: block;
}

.tsb-cat.is-current .tsb-cat-ic {
    background: var(--pbi-primary-soft);
    color: var(--pbi-primary);
}

.tsb-cat-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tsb-cat.is-current .tsb-cat-name {
    color: var(--pbi-primary-active);
}

.tsb-count {
    flex: none;
    font-size: .68rem;
    font-weight: 700;
    color: var(--pbi-muted);
    background: #f4f4f8;
    border: 1px solid var(--pbi-border);
    border-radius: 999px;
    padding: .05rem .48rem;
}

.tsb-cat.is-current .tsb-count {
    background: var(--pbi-primary-soft);
    border-color: transparent;
    color: var(--pbi-primary-active);
}

.tsb-toggle {
    flex: none;
    width: 28px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
    color: #9aa0be;
    cursor: pointer;
}

.tsb-toggle svg {
    width: 15px;
    height: 15px;
    transition: transform .2s ease;
}

.tsb-toggle.collapsed svg {
    transform: rotate(-90deg);
}

.tsb-tools {
    list-style: none;
    margin: .15rem 0 .55rem 1.5rem;
    padding: 0 0 0 .85rem;
    border-left: 2px solid var(--pbi-border);
}

.tsb-tools li + li {
    border-top: 1px solid var(--pbi-border);
}

.tsb-tool {
    display: block;
    padding: .42rem .55rem;
    font-size: .85rem;
    color: var(--pbi-muted);
    text-decoration: none;
}

.tsb-tool:hover {
    color: var(--pbi-primary-active);
}

.tsb-tool.active {
    color: var(--pbi-primary-active);
    background: var(--pbi-primary-soft);
    border-radius: var(--pbi-radius-sm);
    font-weight: 600;
}

/* Reading content (About / How to use) */
.tool-prose {
    max-width: 720px;
    margin-top: 1.6rem;
}

.tool-prose h2 {
    font-size: 1.18rem;
    font-weight: 800;
    letter-spacing: -.015em;
    margin: 1.9rem 0 .65rem;
}

.tool-prose section:first-child h2 {
    margin-top: .6rem;
}

.tool-prose p,
.tool-prose li {
    color: #454a63;
    font-size: 1.02rem;
    line-height: 1.75;
}

/* Related tools grid (below the tool) */
.related-tools {
    margin-top: 2.2rem;
}

.related-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .9rem;
}

.related-head h2 {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -.01em;
    margin: 0;
}

.related-head a {
    font-size: .84rem;
    font-weight: 700;
    color: var(--pbi-primary);
    text-decoration: none;
    white-space: nowrap;
}

.related-head a:hover {
    color: var(--pbi-primary-hover);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: .7rem;
}

.rcard {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .8rem .85rem;
    background: #fff;
    border: 1px solid var(--pbi-border);
    border-radius: var(--pbi-radius-sm);
    text-decoration: none;
    color: var(--pbi-ink);
    transition: border-color .14s ease, background .14s ease;
}

.rcard:hover {
    border-color: #cdbff2;
    background: #faf9ff;
}

.rcard-ic {
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: #f1f1f5;
    color: var(--pbi-muted);
    display: grid;
    place-items: center;
}

.rcard-ic svg {
    width: 18px;
    height: 18px;
    display: block;
}

.rcard-tx {
    min-width: 0;
}

.rcard-name {
    display: block;
    font-weight: 600;
    font-size: .9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rcard-cat {
    font-size: .74rem;
    color: #9aa0be;
}

/* Ad slot — subtle "Advertisement" label, no heavy chrome */
.ad-slot::before {
    content: "Advertisement";
    display: block;
    font-size: .62rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #b7bacb;
    margin-bottom: .35rem;
}

/* --- HOME PAGE: bold hero + big search + category cards --- */

body.is-home {
    --bs-body-bg: #fff;
    background-color: #fff;
}

.home-hero {
    position: relative;
    padding: clamp(2.75rem, 6vw, 5.5rem) 0 clamp(2.5rem, 5vw, 4rem);
    background:
        radial-gradient(52rem 24rem at 85% -22%, rgba(124, 58, 237, .16), transparent 60%),
        radial-gradient(42rem 20rem at 8% -24%, rgba(14, 165, 233, .13), transparent 60%),
        linear-gradient(#ffffff, #fbfbff);
    border-bottom: 1px solid var(--pbi-border);
}

.home-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(99, 102, 241, .15) 1px, transparent 1.5px);
    background-size: 24px 24px;
    -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .75), transparent 72%);
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, .75), transparent 72%);
    pointer-events: none;
}

.home-hero .container {
    position: relative;
    z-index: 1;
}

.home-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .4rem 1rem;
    border-radius: 999px;
    background: var(--pbi-primary-soft);
    border: 1px solid color-mix(in srgb, var(--pbi-primary) 14%, transparent);
    color: var(--pbi-primary-active);
    font-weight: 700;
    font-size: .82rem;
    margin-bottom: 1.1rem;
}

.home-title {
    font-size: clamp(2.1rem, 1.1rem + 3.6vw, 3.6rem);
    font-weight: 800;
    letter-spacing: -.035em;
    line-height: 1.05;
    margin: 0 0 1rem;
    text-wrap: balance;
}

.home-lede {
    font-size: clamp(1rem, .95rem + .35vw, 1.2rem);
    color: var(--pbi-muted);
    max-width: 42ch;
    margin: 0 auto 2rem;
}

.home-search {
    display: flex;
    align-items: center;
    gap: .5rem;
    max-width: 660px;
    margin: 0 auto;
    padding: .45rem .45rem .45rem 1.4rem;
    background: #fff;
    border: 1px solid #ded9f5;
    border-radius: 999px;
    box-shadow: 0 14px 44px -18px rgba(124, 58, 237, .4), var(--pbi-shadow-sm);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.home-search:focus-within {
    border-color: var(--pbi-primary);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, .12), 0 16px 48px -18px rgba(124, 58, 237, .45);
}

.home-search-ic {
    flex: none;
    color: var(--pbi-muted);
}

.home-search-input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 1.08rem;
    padding: .65rem .2rem;
    color: var(--pbi-ink);
}

.home-search-input::placeholder {
    color: var(--pbi-muted);
}

.home-search-btn {
    flex: none;
    border: 0;
    border-radius: 999px;
    padding: .72rem 1.7rem;
    background: var(--pbi-gradient);
    color: #fff;
    font-weight: 700;
    font-size: .98rem;
    cursor: pointer;
    transition: filter .15s ease, transform .15s ease;
}

.home-search-btn:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.home-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: .5rem;
    margin-top: 1.4rem;
}

.home-chips-label {
    font-size: .82rem;
    font-weight: 600;
    color: var(--pbi-muted);
}

.home-chips a {
    font-size: .84rem;
    font-weight: 600;
    color: var(--pbi-muted);
    text-decoration: none;
    background: #fff;
    border: 1px solid var(--pbi-border);
    border-radius: 999px;
    padding: .4rem .9rem;
    transition: border-color .14s ease, color .14s ease;
}

.home-chips a:hover {
    border-color: var(--pbi-primary);
    color: var(--pbi-primary-active);
}

/* Home sections */
.home-section {
    margin-top: clamp(2.5rem, 5vw, 4rem);
}

.home-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.15rem;
}

.home-section-head h2 {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -.02em;
    margin: 0;
}

.home-section-head a {
    font-size: .86rem;
    font-weight: 700;
    color: var(--pbi-primary);
    text-decoration: none;
    white-space: nowrap;
}

/* Category cards */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
    gap: .8rem;
}

.cat-card {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid var(--pbi-border);
    border-radius: .75rem;
    text-decoration: none;
    color: var(--pbi-ink);
    transition: border-color .14s ease, box-shadow .14s ease, transform .14s ease;
}

.cat-card:hover {
    border-color: color-mix(in srgb, var(--pbi-primary) 45%, var(--pbi-border));
    box-shadow: var(--pbi-shadow-sm);
    transform: translateY(-2px);
}

.cat-card-ic {
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--pbi-primary-soft);
    color: var(--pbi-primary);
    display: grid;
    place-items: center;
}

.cat-card-ic svg {
    width: 22px;
    height: 22px;
    display: block;
}

.cat-card-tx {
    flex: 1 1 auto;
    min-width: 0;
}

.cat-card-name {
    display: block;
    font-weight: 700;
    font-size: .96rem;
}

.cat-card-count {
    display: block;
    font-size: .78rem;
    color: var(--pbi-muted);
    margin-top: .12rem;
}

.cat-card-arrow {
    flex: none;
    color: #c3c6da;
    transition: transform .14s ease, color .14s ease;
}

.cat-card:hover .cat-card-arrow {
    color: var(--pbi-primary);
    transform: translateX(3px);
}
