/* ═══════════════════════════════════════════════════════════════
   WordStatsOnline — Platform Design System
   Supports: Homepage, Section pages, All Tools, Tool pages,
   Legal pages. Mobile-first, lightweight, fast.
   ═══════════════════════════════════════════════════════════════ */

:root {
    --bg: #f0f4ff;
    --surface: #ffffff;
    --surface2: #f8fafc;
    --border: #e2e8f0;
    --fg: #0f172a;
    --muted: #64748b;
    --brand: #2563eb;
    --brand-light: #dbeafe;
    --brand-dark: #1d4ed8;
    --good: #16a34a;
    --warn: #d97706;
    --bad: #dc2626;
    --shadow: 0 1px 3px rgba(0, 0, 0, .07), 0 4px 16px rgba(37, 99, 235, .08);
    --radius: 14px;
    --rsm: 8px;
    --tr: .2s ease;
    --max-w: 1300px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--fg);
    line-height: 1.6;
    min-height: 100vh
}

a {
    color: var(--brand);
    text-decoration: none
}

a:hover {
    text-decoration: underline
}

button,
select,
input {
    font-family: inherit;
    font-size: 14px;
    outline: none
}

img {
    max-width: 100%;
    height: auto
}

/* ═══ HEADER ═══ */
.hdr {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    height: 58px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 0 var(--border)
}

.hdr-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 16px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 12px
}

.logo {
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 800;
    font-size: 17px;
    color: var(--fg);
    flex-shrink: 0;
    text-decoration: none
}

.logo:hover {
    text-decoration: none
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 15px;
    font-weight: 900;
    flex-shrink: 0
}

/* Nav */
.hnav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto
}

.hnav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 99px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--tr);
    white-space: nowrap;
    cursor: pointer
}

.hnav-btn:hover {
    color: var(--brand);
    background: var(--brand-light);
    border-color: rgba(37, 99, 235, .2);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(37, 99, 235, .12)
}

.hnav-btn.active {
    color: var(--brand);
    background: var(--brand-light);
    border-color: rgba(37, 99, 235, .25)
}

/* Mobile hamburger */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: var(--fg)
}

@media(max-width:768px) {
    .nav-toggle {
        display: flex;
        align-items: center;
        margin-left: auto
    }

    .hnav {
        display: none;
        position: absolute;
        top: 58px;
        left: 0;
        right: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 8px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, .1)
    }

    .hnav.open {
        display: flex
    }

    .hnav-btn {
        width: 100%;
        justify-content: center;
        padding: 10px 16px
    }
}

/* ═══ HERO SECTION ═══ */
.hero {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 40%, #3b82f6 100%);
    color: #fff;
    padding: 60px 16px;
    text-align: center;
    position: relative;
    overflow: hidden
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E")
}

.hero-inner {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1
}

.hero h1 {
    font-size: clamp(28px, 5vw, 44px);
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2
}

.hero p {
    font-size: clamp(15px, 2.5vw, 18px);
    opacity: .9;
    max-width: 600px;
    margin: 0 auto 28px;
    line-height: 1.7
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: rgba(255, 255, 255, .15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 99px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 20px
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: #fff;
    color: var(--brand);
    border-radius: 99px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    transition: all var(--tr);
    box-shadow: 0 4px 20px rgba(0, 0, 0, .15)
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 0, 0, .2);
    text-decoration: none
}

/* ═══ SECTION CONTAINERS ═══ */
.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 32px 16px
}

.section-title {
    text-align: center;
    margin-bottom: 8px;
    font-size: clamp(22px, 4vw, 32px);
    font-weight: 800;
    color: var(--fg)
}

.section-subtitle {
    text-align: center;
    color: var(--muted);
    font-size: 15px;
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto
}

/* ═══ CATEGORY CARDS ═══ */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 40px
}

.cat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    transition: all var(--tr);
    text-decoration: none;
    color: var(--fg);
    box-shadow: var(--shadow)
}

.cat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(37, 99, 235, .15);
    border-color: var(--brand);
    text-decoration: none
}

.cat-card-icon {
    font-size: 36px;
    margin-bottom: 12px;
    display: block
}

.cat-card-name {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 6px
}

.cat-card-desc {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5
}

.cat-card-count {
    display: inline-block;
    margin-top: 10px;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 99px;
    background: var(--brand-light);
    color: var(--brand)
}

/* ═══ TOOL GRID ═══ */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px
}

.tool-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--fg);
    transition: all var(--tr);
    box-shadow: var(--shadow)
}

.tool-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(37, 99, 235, .12);
    border-color: var(--brand);
    text-decoration: none
}

.tool-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--brand-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0
}

.tool-card-name {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 3px
}

.tool-card-desc {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.5
}

/* ═══ POPULAR TOOLS ═══ */
.popular-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 40px
}

.popular-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--fg);
    transition: all var(--tr);
    box-shadow: var(--shadow)
}

.popular-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, .12);
    border-color: var(--brand);
    text-decoration: none
}

.popular-card .tool-card-icon {
    width: 40px;
    height: 40px;
    font-size: 18px
}

.popular-card-name {
    font-weight: 700;
    font-size: 14px
}

.popular-card-arrow {
    margin-left: auto;
    color: var(--brand);
    font-size: 18px;
    opacity: .4;
    transition: opacity var(--tr)
}

.popular-card:hover .popular-card-arrow {
    opacity: 1
}

/* ═══ TRUST BANNER ═══ */
.trust {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    margin: 32px auto;
    max-width: 700px;
    box-shadow: var(--shadow)
}

.trust-icon {
    font-size: 28px;
    margin-bottom: 8px
}

.trust-text {
    font-size: 14px;
    color: var(--muted);
    font-weight: 500
}

.trust-text strong {
    color: var(--fg)
}

/* ═══ TOOL PAGE LAYOUT ═══ */
.tool-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
    align-items: start
}

@media(max-width:900px) {
    .tool-layout {
        grid-template-columns: 1fr
    }
}

.tool-main {}

.tool-sidebar {
    position: sticky;
    top: 78px
}

/* Tool Card */
.tcard {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 20px
}

.tcard-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    font-size: 14px
}

.tcard-header .ci {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: var(--brand-light);
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0
}

.tcard-body {
    padding: 18px
}

/* Tool Textarea */
.tool-input {
    width: 100%;
    min-height: 200px;
    background: var(--surface2);
    border: 1.5px solid var(--border);
    border-radius: var(--rsm);
    color: var(--fg);
    padding: 14px;
    resize: vertical;
    font-size: 16px;
    line-height: 1.7;
    font-family: inherit;
    transition: border-color var(--tr)
}

.tool-input:focus {
    border-color: var(--brand);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .08)
}

/* Tool Action Bar */
.tool-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap
}

.tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    border-radius: var(--rsm);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--fg);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all var(--tr);
    white-space: nowrap
}

.tool-btn:hover {
    border-color: var(--brand);
    color: var(--brand);
    background: var(--brand-light)
}

.tool-btn--primary {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand)
}

.tool-btn--primary:hover {
    background: var(--brand-dark);
    color: #fff
}

.tool-btn--danger {
    color: var(--bad);
    border-color: rgba(220, 38, 38, .3)
}

.tool-btn--danger:hover {
    background: rgba(220, 38, 38, .08);
    border-color: var(--bad)
}

/* Tool Result Panel */
.tool-result {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--rsm);
    padding: 16px;
    margin-top: 14px;
    min-height: 60px;
    font-size: 15px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word
}

.tool-result:empty::before {
    content: 'Results will appear here…';
    color: var(--muted);
    font-style: italic
}

.tool-result-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 6px
}

/* Common Stats Bar */
.cstats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px
}

.cstat-item {
    flex: 1;
    min-width: 80px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--rsm);
    padding: 10px 8px;
    text-align: center;
    transition: transform .15s
}

.cstat-item:hover {
    transform: translateY(-2px)
}

.cstat-val {
    font-size: 18px;
    font-weight: 800;
    color: var(--brand)
}

.cstat-lbl {
    font-size: 10px;
    color: var(--muted);
    font-weight: 500;
    margin-top: 1px
}

/* ═══ TOOL CONTENT SECTIONS ═══ */
.tool-content {
    margin-top: 32px
}

.tool-content h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--fg)
}

.tool-content h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 20px 0 8px;
    color: var(--fg)
}

.tool-content p {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.8;
    margin-bottom: 12px
}

.tool-content ul,
.tool-content ol {
    margin: 0 0 14px 20px;
    font-size: 14px;
    color: var(--muted);
    line-height: 1.8
}

/* ═══ RELATED TOOLS ═══ */
.rtool-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--rsm);
    text-decoration: none;
    color: var(--fg);
    transition: all var(--tr);
    margin-bottom: 8px;
    background: var(--surface)
}

.rtool-card:hover {
    border-color: var(--brand);
    background: var(--brand-light);
    text-decoration: none;
    transform: translateX(3px)
}

.rtool-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--brand-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0
}

.rtool-name {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 2px
}

.rtool-desc {
    font-size: 11px;
    color: var(--muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden
}

/* ═══ AD SLOTS ═══ */
.ad-slot {
    background: var(--surface2);
    border: 1px dashed var(--border);
    border-radius: var(--rsm);
    padding: 12px;
    margin: 16px 0;
    text-align: center;
    position: relative;
    min-height: 90px
}

.ad-label {
    position: absolute;
    top: 4px;
    right: 8px;
    font-size: 9px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .5px
}

/* ═══ ARTICLE / SEO CONTENT ═══ */
.article {
    max-width: 800px;
    margin: 40px auto 0;
    padding: 0 16px
}

.article h1 {
    font-size: clamp(22px, 4vw, 30px);
    font-weight: 800;
    margin-bottom: 14px;
    color: var(--fg)
}

.article h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 28px 0 10px;
    color: var(--fg)
}

.article h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 20px 0 8px;
    color: var(--fg)
}

.article p {
    font-size: 14px;
    color: #475569;
    line-height: 1.8;
    margin-bottom: 12px
}

.article ul,
.article ol {
    margin: 0 0 14px 20px;
    font-size: 14px;
    color: #475569;
    line-height: 1.8
}

.article li {
    margin-bottom: 4px
}

.article .cta {
    background: var(--brand-light);
    border: 1px solid rgba(37, 99, 235, .15);
    border-radius: var(--rsm);
    padding: 18px;
    margin: 24px 0;
    font-size: 14px;
    line-height: 1.7;
    color: var(--fg)
}

/* FAQ */
.faq-list {
    margin: 16px 0
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--rsm);
    margin-bottom: 8px;
    background: var(--surface);
    overflow: hidden
}

.faq-item summary {
    padding: 14px 18px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background var(--tr)
}

.faq-item summary:hover {
    background: var(--surface2)
}

.faq-item summary::after {
    content: '▸';
    transition: transform var(--tr);
    font-size: 12px;
    color: var(--muted)
}

.faq-item[open] summary::after {
    transform: rotate(90deg)
}

.faq-item p {
    padding: 0 18px 14px;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.7
}

/* ═══ FOOTER ═══ */
.footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 40px 16px 24px;
    margin-top: 48px
}

.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 32px
}

@media(max-width:768px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 20px
    }
}

@media(max-width:480px) {
    .footer-inner {
        grid-template-columns: 1fr
    }
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 10px
}

.footer-brand p {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.6
}

.footer-col h4 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--fg);
    margin-bottom: 12px
}

.footer-col a {
    display: block;
    font-size: 13px;
    color: var(--muted);
    text-decoration: none;
    padding: 3px 0;
    transition: color var(--tr)
}

.footer-col a:hover {
    color: var(--brand);
    text-decoration: none
}

.footer-bottom {
    max-width: var(--max-w);
    margin: 24px auto 0;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px
}

.footer-copy {
    font-size: 12px;
    color: var(--muted)
}

.footer-copy a {
    color: var(--brand)
}

/* ═══ SECTION LANDING PAGES ═══ */
.section-hero {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: #fff;
    padding: 40px 16px;
    text-align: center
}

.section-hero h1 {
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 800;
    margin-bottom: 10px
}

.section-hero p {
    font-size: 15px;
    opacity: .9;
    max-width: 600px;
    margin: 0 auto
}

/* ═══ LEGAL PAGES ═══ */
.legal {
    max-width: 800px;
    margin: 0 auto;
    padding: 32px 16px
}

.legal h1 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 16px
}

.legal h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 24px 0 8px
}

.legal h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 18px 0 6px
}

.legal p,
.legal li {
    font-size: 14px;
    color: #475569;
    line-height: 1.8;
    margin-bottom: 10px
}

.legal ul,
.legal ol {
    margin: 0 0 14px 20px
}

.legal a {
    color: var(--brand)
}

/* ═══ GENERAL ═══ */
.wrap {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 18px 14px
}

.row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap
}

.mt {
    margin-top: 8px
}

.mb {
    margin-bottom: 8px
}

.note {
    font-size: 11px;
    color: var(--muted)
}

.muted {
    color: var(--muted)
}

.text-center {
    text-align: center
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden
}

/* ═══ FORM ELEMENTS ═══ */
select,
input[type="number"],
input[type="text"] {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--rsm);
    color: var(--fg);
    padding: 5px 8px;
    transition: border-color var(--tr)
}

select:hover,
select:focus,
input[type="number"]:hover,
input[type="number"]:focus,
input[type="text"]:hover,
input[type="text"]:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, .1)
}

textarea {
    width: 100%;
    min-height: 200px;
    background: var(--surface2);
    border: 1.5px solid var(--border);
    border-radius: var(--rsm);
    color: var(--fg);
    padding: 13px;
    resize: vertical;
    font-size: 16px;
    line-height: 1.7;
    font-family: inherit;
    transition: border-color var(--tr)
}

textarea:focus {
    border-color: var(--brand);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .08)
}

/* ═══ SCROLL ANIMATIONS ═══ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.animate-in {
    animation: fadeInUp .5s ease both
}

/* ═══ BREADCRUMB ═══ */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 16px;
    flex-wrap: wrap
}

.breadcrumb a {
    color: var(--muted);
    text-decoration: none
}

.breadcrumb a:hover {
    color: var(--brand)
}

.breadcrumb .sep {
    color: var(--border);
    font-size: 10px
}

/* ═══ TOOL OPTIONS BAR ═══ */
.tool-options {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap
}

.tool-options label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--muted);
    cursor: pointer
}

.tool-options select {
    font-size: 12px;
    padding: 4px 8px
}

.tool-options .clbl {
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
    white-space: nowrap
}

/* ═══ FREQUENCY TABLE ═══ */
.freq-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 10px
}

.freq-table th {
    text-align: left;
    padding: 8px 10px;
    background: var(--surface2);
    border-bottom: 2px solid var(--border);
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .3px
}

.freq-table td {
    padding: 7px 10px;
    border-bottom: 1px solid var(--border)
}

.freq-table tr:hover td {
    background: var(--brand-light)
}

.freq-bar {
    height: 6px;
    background: var(--brand);
    border-radius: 3px;
    min-width: 2px;
    transition: width .3s
}

/* ═══ TOAST ═══ */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--fg);
    color: #fff;
    padding: 10px 22px;
    border-radius: var(--rsm);
    font-size: 13px;
    font-weight: 600;
    z-index: 9999;
    transition: transform .3s ease;
    pointer-events: none
}

.toast.show {
    transform: translateX(-50%) translateY(0)
}

/* ═══ TOOL PAGE SELECT BUTTONS ═══ */
.opt-btns {
    display: flex;
    gap: 4px;
    flex-wrap: wrap
}

.opt-btn {
    padding: 5px 14px;
    border-radius: 99px;
    border: 1px solid var(--border);
    background: var(--surface2);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--tr)
}

.opt-btn:hover {
    border-color: var(--brand);
    color: var(--brand)
}

.opt-btn.active {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand)
}

/* ═══ RESPONSIVE ═══ */
@media(max-width:600px) {
    .cstats {
        gap: 6px
    }

    .cstat-item {
        min-width: 60px;
        padding: 8px 4px
    }

    .cstat-val {
        font-size: 15px
    }

    .tool-grid {
        grid-template-columns: 1fr
    }

    .cat-grid {
        grid-template-columns: 1fr
    }

    .popular-grid {
        grid-template-columns: 1fr
    }

    .hero {
        padding: 40px 16px
    }
}
/* ═══ INTERLINK CARDS ═══ */
.interlink-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
    margin: 14px 0 20px
}

.interlink-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--rsm);
    text-decoration: none;
    color: var(--fg);
    transition: all var(--tr);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04)
}

.interlink-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(37, 99, 235, .12);
    border-color: var(--brand);
    text-decoration: none
}

.interlink-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--brand-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0
}

.interlink-name {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 1px
}

.interlink-desc {
    font-size: 11px;
    color: var(--muted);
    line-height: 1.3
}

.interlink-arrow {
    margin-left: auto;
    color: var(--brand);
    font-size: 16px;
    opacity: .3;
    transition: opacity var(--tr);
    flex-shrink: 0
}

.interlink-card:hover .interlink-arrow {
    opacity: 1
}

