/* ToolSphare — Brand UI (logo-aligned blues) */
:root {
    --brand-blue: #00aeef;
    --brand-blue-light: #4dc4f5;
    --brand-blue-dark: #0088cc;
    --brand-navy: #0b1622;
    --brand-navy-soft: #111d2e;
    --primary: #00aeef;
    --primary-light: #4dc4f5;
    --primary-dark: #0077b6;
    --accent: #38bdf8;
    --accent-2: #0ea5e9;
    --bg: #060a12;
    --bg-soft: #0b1220;
    --bg-card: #0f1729;
    --bg-card-hover: #152238;
    --bg-elevated: #1a2840;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --border: rgba(0, 174, 239, 0.1);
    --border-strong: rgba(0, 174, 239, 0.22);
    --success: #34d399;
    --error: #f87171;
    --warning: #fbbf24;
    --radius: 16px;
    --radius-sm: 12px;
    --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    --shadow-glow: 0 0 48px rgba(0, 174, 239, 0.18);
    --font: 'Plus Jakarta Sans', system-ui, sans-serif;
    --mono: 'JetBrains Mono', monospace;
}

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

html { scroll-behavior: smooth; }

.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: 10000;
}
.skip-link:focus {
    position: fixed;
    left: 1rem;
    top: 1rem;
    width: auto;
    height: auto;
    overflow: visible;
    padding: .75rem 1.25rem;
    background: var(--brand-blue);
    color: #fff;
    font-weight: 700;
    border-radius: var(--radius-sm);
    text-decoration: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

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

/* ─── Cursors — interactive & readable ─── */
a[href],
button:not(:disabled),
.btn,
[role="button"],
label[for],
select,
summary,
.tool-card,
.category-pill,
.related-tool-link,
.section-link,
.ts-logo,
.nav-toggle,
.color-swatch,
.upload-zone,
.drop-zone,
.faq-item summary,
.uuid-item,
.copy-btn,
.copy-on-click,
.tool-panel textarea[readonly],
.tool-panel .copy-row input[readonly],
.tool-panel pre.code-block,
.pw-item,
.footer-links-list a,
.breadcrumb a,
.page-content a,
input[type="checkbox"],
input[type="radio"],
input[type="file"],
input[type="color"],
input[type="range"],
input[type="submit"],
input[type="button"],
input[type="reset"],
.case-btn {
    cursor: pointer;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="color"]):not([type="range"]):not([type="submit"]):not([type="button"]):not([type="reset"]),
textarea,
[contenteditable="true"] {
    cursor: text;
}

button:disabled,
.btn:disabled,
[disabled] {
    cursor: not-allowed !important;
}

.upload-zone,
.drop-zone,
.itp-drop {
    cursor: pointer;
}

.upload-zone.dragover,
.drop-zone.dragover,
.itp-drop.dragover {
    cursor: grabbing;
}

.page-content,
.content-section,
.tool-intro,
.faq-item p {
    cursor: default;
}

.page-bg,
.ts-cursor-dot,
.ts-cursor-ring {
    pointer-events: none;
}

.page-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 70% 55% at 15% -5%, rgba(0, 174, 239, 0.14), transparent 55%),
        radial-gradient(ellipse 55% 45% at 95% 5%, rgba(0, 119, 182, 0.12), transparent 50%),
        radial-gradient(ellipse 45% 35% at 50% 100%, rgba(14, 165, 233, 0.06), transparent 55%),
        linear-gradient(180deg, var(--bg) 0%, #050810 100%);
}

.container { max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; }
.main-content { flex: 1; }

/* ─── Header ─── */
/* Higher specificity (header.site-header) so tool stylesheets cannot restyle site chrome */
header.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    margin: 0;
    padding: 0;
    color: var(--text);
    background: rgba(6, 10, 18, 0.92);
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    border: 0;
    border-bottom: 1px solid var(--border);
    box-shadow: none;
    overflow: visible;
    isolation: isolate;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    margin: 0;
    padding: 0;
    background: rgba(6, 10, 18, 0.92);
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    border-bottom: 1px solid var(--border);
    box-shadow: none;
    isolation: isolate;
}

.site-header > .container.header-inner,
.site-header .header-inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "logo nav utilities";
    align-items: center;
    gap: 0.45rem 0.65rem;
    height: 64px;
    min-height: 64px;
    max-height: 64px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 1.25rem;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    position: relative;
    overflow: visible;
}

.site-header .ts-logo--header,
.site-header .ts-logo--mark {
    min-width: 0;
    z-index: 2;
}

.logo {
    display: flex;
    align-items: center;
    gap: .6rem;
    text-decoration: none;
    color: var(--text);
    flex-shrink: 0;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 10px;
    font-size: 1.1rem;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.logo-text { font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; }

/* ToolSphare logo — mark (header), hero (full), footer */
.ts-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    line-height: 0;
    transition: opacity .2s, transform .2s;
}

.ts-logo:hover { opacity: .95; transform: none; }

.ts-logo img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
}

/* Header logo — icon + wordmark (crisp at any DPI) */
.ts-logo--mark,
.ts-logo--header {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    height: 48px;
    max-width: min(220px, 42vw);
    min-width: 0;
}

.site-header .ts-logo--header .ts-logo__icon,
.site-header .ts-logo--mark .ts-logo__icon {
    width: 40px;
    height: 40px;
}

.site-header .ts-logo--header .ts-logo__icon img,
.site-header .ts-logo--mark .ts-logo__icon img {
    width: 100%;
    height: 100%;
    max-width: 40px;
    max-height: 40px;
    object-fit: contain;
    object-position: center;
}

.site-header .ts-logo--header .ts-logo__wordmark,
.site-header .ts-logo--mark .ts-logo__wordmark {
    font-size: clamp(1rem, 1.1vw, 1.22rem);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ts-logo__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    line-height: 0;
}

.ts-logo__icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    filter: drop-shadow(0 2px 10px rgba(0, 174, 239, 0.35));
}

.ts-logo__wordmark {
    display: flex;
    align-items: baseline;
    font-family: var(--font, 'Plus Jakarta Sans', system-ui, sans-serif);
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: -0.03em;
    line-height: 1;
    white-space: nowrap;
}

.ts-logo__tool {
    color: #00AEEF;
}

.ts-logo__sphere {
    color: #0a1628;
}

.site-header .ts-logo__sphere {
    color: #f0f9ff;
}

.ts-logo--footer .ts-logo__full-img,
.ts-logo--hero .ts-logo__full-img,
.ts-logo--full .ts-logo__full-img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
}

.ts-logo--footer img {
    max-height: 96px;
    background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 100%);
    border-radius: 14px;
    padding: 10px 16px;
    border: 1px solid rgba(0, 174, 239, 0.15);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
    margin-bottom: .75rem;
}

.ts-logo--hero img {
    max-height: 200px;
    width: auto;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border-radius: 20px;
    padding: 18px 28px;
    border: 1px solid rgba(0, 174, 239, 0.12);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35), 0 0 60px rgba(0, 174, 239, 0.12);
}

.ts-logo--full img {
    max-height: 170px;
    background: linear-gradient(180deg, #fff, #f0f9ff);
    border-radius: 18px;
    padding: 16px 24px;
    margin: 0 auto 1.5rem;
    border: 1px solid rgba(0, 174, 239, 0.12);
    box-shadow: var(--shadow);
}

.about-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

/* Long-form SEO content */
.content-section p { color: var(--text-muted); margin-bottom: 1rem; line-height: 1.8; font-size: .98rem; }
.keyword-strip {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1.25rem;
}
.keyword-pill {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: .35rem .65rem;
    border-radius: 999px;
    background: rgba(0, 174, 239, 0.1);
    border: 1px solid rgba(0, 174, 239, 0.22);
    color: var(--brand-blue-light);
}
.content-wordcount {
    font-size: .78rem;
    color: var(--text-dim);
    margin-top: .5rem;
}

.site-header .main-nav {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.12rem 0.18rem;
    min-width: 0;
    justify-content: center;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    grid-area: nav;
}

.site-header .main-nav::-webkit-scrollbar {
    display: none;
}

.header-utilities {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    flex-shrink: 0;
    grid-area: utilities;
    justify-self: end;
    align-self: center;
}

.site-header .header-account-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 5.75rem;
    min-height: 34px;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.45);
    color: #e2e8f0;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 650;
    white-space: nowrap;
    line-height: 1.2;
    box-sizing: border-box;
    transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}

.site-header .header-account-link:hover,
.site-header .header-account-link.is-active {
    color: #fff;
    border-color: rgba(0, 174, 239, 0.4);
    background: rgba(0, 174, 239, 0.14);
    transform: none;
}

.header-account-menu {
    position: relative;
    display: inline-flex;
}

.header-account-dropdown {
    position: absolute;
    top: calc(100% + .45rem);
    right: 0;
    min-width: 11.5rem;
    padding: .4rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.96);
    box-shadow: 0 16px 40px rgba(2, 6, 23, 0.45);
    display: none;
    z-index: 80;
}

.header-account-menu:hover .header-account-dropdown,
.header-account-menu:focus-within .header-account-dropdown {
    display: grid;
    gap: .15rem;
}

.header-account-dropdown a {
    display: block;
    padding: .55rem .7rem;
    border-radius: 8px;
    color: #e2e8f0;
    text-decoration: none;
    font-size: .82rem;
    font-weight: 600;
    white-space: nowrap;
}

.header-account-dropdown a:hover {
    background: rgba(0, 174, 239, 0.14);
    color: #fff;
}

.site-header .ts-logo--header,
.site-header .ts-logo--mark {
    grid-area: logo;
    justify-self: start;
    align-self: center;
}

.site-header .main-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: clamp(0.74rem, 0.82vw, 0.86rem);
    padding: 0.38rem 0.5rem;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid transparent;
    box-sizing: border-box;
    transition: color .15s ease, background-color .15s ease;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.2;
    transform: none;
}

.site-header .main-nav a:hover {
    color: var(--text);
    background: rgba(0, 174, 239, 0.08);
    transform: none;
}

.site-header .main-nav a.active {
    color: var(--brand-blue-light);
    background: rgba(0, 174, 239, 0.14);
    border-color: rgba(0, 174, 239, 0.28);
    transform: none;
    box-shadow: none;
}

.site-header .main-nav .btn-nav-cta {
    margin-left: 0.15rem;
    min-height: 34px;
    padding: 0.4rem 0.72rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    border: 1px solid transparent;
    color: #fff;
    font-size: clamp(0.72rem, 0.78vw, 0.84rem);
    flex-shrink: 0;
}

.site-header .main-nav .btn-nav-cta:hover {
    color: #fff;
    background: linear-gradient(135deg, var(--brand-blue) 0%, var(--primary-dark) 100%);
    box-shadow: none;
    transform: none;
}

.site-header .main-nav .btn-nav-cta.active {
    border-color: transparent;
    color: #fff;
}

@media (min-width: 1025px) {
    .site-header .ts-logo--header,
    .site-header .ts-logo--mark {
        height: 42px;
    }
    .site-header .ts-logo__wordmark {
        font-size: 1.15rem;
    }
}

@media (min-width: 1280px) {
    .site-header .main-nav a {
        font-size: 0.86rem;
        padding: 0.4rem 0.55rem;
    }
    .site-header .main-nav .btn-nav-cta {
        padding: 0.42rem 0.85rem;
        font-size: 0.84rem;
    }
}

@media (max-width: 1200px) and (min-width: 1025px) {
    .site-header .main-nav a:not(.btn-nav-cta) {
        font-size: 0.74rem;
        padding: 0.34rem 0.42rem;
    }
    .site-header .lang-switcher-name {
        display: none;
    }
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 12px;
    cursor: pointer;
    margin-left: .5rem;
    padding: 0;
    flex-shrink: 0;
    z-index: 2;
    transition: background .15s, border-color .15s;
}

.nav-toggle:hover {
    background: rgba(0, 174, 239, 0.12);
    border-color: rgba(0, 174, 239, 0.35);
}

.nav-toggle-bars {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 18px;
}

.nav-toggle-bars span {
    display: block;
    height: 2px;
    width: 100%;
    border-radius: 2px;
    background: currentColor;
    transition: transform .2s ease, opacity .2s ease;
}

.site-header.is-nav-open .nav-toggle-bars span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.site-header.is-nav-open .nav-toggle-bars span:nth-child(2) {
    opacity: 0;
}
.site-header.is-nav-open .nav-toggle-bars span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.main-nav-mobile-title {
    display: none;
}

.main-nav-drawer-head,
.main-nav-close {
    display: none;
}

.main-nav-links {
    display: contents;
}

.nav-backdrop {
    display: none;
}

@media (max-width: 1024px) {
    header.site-header,
    .site-header {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(6, 10, 18, 0.96);
    }

    .main-nav-drawer-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        margin: 0 0 0.5rem;
        padding: 0 0.15rem 0.75rem;
        border-bottom: 1px solid var(--border);
        flex-shrink: 0;
    }

    .main-nav-mobile-title {
        display: block;
        margin: 0;
        padding: 0;
        border: 0;
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--text-dim);
    }

    .main-nav-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        min-width: 40px;
        padding: 0;
        border: 1px solid var(--border);
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.04);
        color: var(--text);
        font-size: 1.5rem;
        line-height: 1;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .main-nav-close:hover {
        background: rgba(0, 174, 239, 0.12);
        border-color: rgba(0, 174, 239, 0.35);
    }

    .main-nav-links {
        display: flex;
        flex-direction: column;
        gap: 0.15rem;
        flex: 1;
        min-height: 0;
    }

    .nav-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1000;
        background: rgba(2, 6, 14, 0.55);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.22s ease, visibility 0.22s ease;
        border: 0;
        padding: 0;
        margin: 0;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .nav-backdrop:not([hidden]) {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    /* Header (and drawer inside it) must sit ABOVE the backdrop or links won't click. */
    body.nav-open header.site-header,
    body.nav-open .site-header {
        z-index: 1100;
    }

    body.nav-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
        left: 0;
        right: 0;
    }

    body.nav-open .ts-chatbot {
        visibility: hidden;
        pointer-events: none;
    }
}

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .7rem 1.35rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: .9rem;
    cursor: pointer;
    border: none;
    text-decoration: none;
    font-family: inherit;
    transition: transform .15s, box-shadow .2s, background .2s, border-color .2s;
}

.btn:active { transform: scale(0.98); }
.btn-primary {
    background: linear-gradient(135deg, var(--brand-blue) 0%, var(--primary-dark) 100%);
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 174, 239, 0.35);
}
.btn-primary:hover { box-shadow: 0 8px 28px rgba(0, 174, 239, 0.5); transform: translateY(-1px); }
.btn-outline {
    background: rgba(255,255,255,.04);
    border: 1px solid var(--border-strong);
    color: var(--text);
}
.btn-outline:hover { border-color: var(--brand-blue); color: var(--brand-blue-light); background: rgba(0, 174, 239, 0.06); }
.btn-lg { padding: .85rem 1.75rem; font-size: .95rem; }
.btn-sm { padding: .55rem 1rem; font-size: .82rem; min-height: 44px; display: inline-flex; align-items: center; }
.btn-link { background: none; border: none; color: var(--primary-light); cursor: pointer; text-decoration: underline; font-family: inherit; }

/* ─── Hero ─── */
.hero { padding: 4rem 0 2rem; }
.hero-home { padding: 4.5rem 0 2rem; overflow-x: visible; }
.hero-inner {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3rem;
    align-items: center;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .45rem 1rem .45rem .65rem;
    border-radius: 999px;
    background: rgba(0, 174, 239, 0.1);
    border: 1px solid rgba(0, 174, 239, 0.28);
    color: var(--brand-blue-light);
    font-size: .8rem;
    font-weight: 700;
    margin-bottom: 1.35rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.hero-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-blue);
    box-shadow: 0 0 10px var(--brand-blue);
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .7; transform: scale(1.15); }
}
.hero h1 {
    font-size: clamp(2.35rem, 5.5vw, 3.55rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.035em;
    margin-bottom: 1.25rem;
}
.gradient-text {
    background: linear-gradient(135deg, var(--brand-blue-light) 0%, var(--brand-blue) 45%, #7dd3fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-sub {
    color: var(--text-muted);
    font-size: 1.08rem;
    max-width: 540px;
    margin-bottom: 1.85rem;
    line-height: 1.75;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-bottom: 2.75rem; }
.hero-stats { display: flex; flex-wrap: wrap; gap: .75rem; }
.stat-card {
    background: linear-gradient(145deg, rgba(0, 174, 239, 0.06), rgba(255,255,255,.02));
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .9rem 1.2rem;
    min-width: 96px;
    transition: border-color .2s, transform .2s;
}
.stat-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.stat-card strong { display: block; font-size: 1.4rem; font-weight: 800; color: var(--brand-blue-light); }
.stat-card span { font-size: .75rem; color: var(--text-dim); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }

.hero-visual {
    position: relative;
    min-height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Room for outer orbit pills; do not clip them onto/off the logo */
    padding: 2.75rem 3.25rem;
    overflow: visible;
}
.hero-glow {
    position: absolute;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 174, 239, 0.25) 0%, transparent 70%);
    filter: blur(40px);
    animation: glow-pulse 4s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}
@keyframes glow-pulse {
    0%, 100% { opacity: .6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.08); }
}
.hero-brand-panel {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 1.35rem 1.25rem;
    max-width: 240px;
    width: 100%;
    border-radius: 24px;
    background: linear-gradient(160deg, rgba(255,255,255,0.06) 0%, rgba(0,174,239,0.04) 100%);
    border: 1px solid rgba(0, 174, 239, 0.18);
    backdrop-filter: blur(16px);
    box-shadow: 0 24px 64px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.06);
}
.hero-brand-tagline {
    margin-top: 1rem;
    font-size: .78rem;
    font-weight: 600;
    color: var(--text-dim);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    max-width: 220px;
    margin-inline: auto;
    line-height: 1.5;
}
.hero-orbits {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    overflow: visible;
}

.hero-orbit {
    --orbit-left: 50%;
    --orbit-top: 50%;
    --orbit-delay: 0s;
    --orbit-bg: rgba(15, 23, 42, 0.88);
    --orbit-border: rgba(148, 163, 184, 0.4);
    --orbit-color: #e2e8f0;
    --orbit-hover: rgba(0, 174, 239, 0.22);
    position: absolute;
    top: var(--orbit-top);
    left: var(--orbit-left);
    right: auto;
    bottom: auto;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .38rem .65rem;
    background: var(--orbit-bg);
    border: 1px solid var(--orbit-border);
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 700;
    color: var(--orbit-color);
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    transform: translate(-50%, -50%);
    animation: none;
    pointer-events: auto;
    white-space: nowrap;
    max-width: min(112px, 30vw);
}

.hero-orbit:hover {
    border-color: var(--orbit-border);
    color: #fff;
    background: var(--orbit-hover);
    z-index: 4;
}

.hero-orbit span { font-size: .88rem; line-height: 1; flex-shrink: 0; }
.hero-orbit-icon { font-size: .88rem; line-height: 1; }
.hero-orbit-label {
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-orbit--social {
    --orbit-bg: rgba(59, 130, 246, 0.28);
    --orbit-border: rgba(96, 165, 250, 0.6);
    --orbit-color: #bfdbfe;
    --orbit-hover: rgba(59, 130, 246, 0.45);
}
.hero-orbit--social-private {
    --orbit-bg: rgba(168, 85, 247, 0.28);
    --orbit-border: rgba(192, 132, 252, 0.6);
    --orbit-color: #e9d5ff;
    --orbit-hover: rgba(168, 85, 247, 0.45);
}
.hero-orbit--pdf {
    --orbit-bg: rgba(239, 68, 68, 0.28);
    --orbit-border: rgba(248, 113, 113, 0.6);
    --orbit-color: #fecaca;
    --orbit-hover: rgba(239, 68, 68, 0.45);
}
.hero-orbit--image {
    --orbit-bg: rgba(236, 72, 153, 0.28);
    --orbit-border: rgba(244, 114, 182, 0.6);
    --orbit-color: #fbcfe8;
    --orbit-hover: rgba(236, 72, 153, 0.45);
}
.hero-orbit--video {
    --orbit-bg: rgba(249, 115, 22, 0.28);
    --orbit-border: rgba(251, 146, 60, 0.6);
    --orbit-color: #fed7aa;
    --orbit-hover: rgba(249, 115, 22, 0.45);
}
.hero-orbit--audio {
    --orbit-bg: rgba(14, 165, 233, 0.28);
    --orbit-border: rgba(56, 189, 248, 0.6);
    --orbit-color: #bae6fd;
    --orbit-hover: rgba(14, 165, 233, 0.45);
}
.hero-orbit--ai {
    --orbit-bg: rgba(34, 197, 94, 0.28);
    --orbit-border: rgba(74, 222, 128, 0.6);
    --orbit-color: #bbf7d0;
    --orbit-hover: rgba(34, 197, 94, 0.45);
}
.hero-orbit--text {
    --orbit-bg: rgba(234, 179, 8, 0.28);
    --orbit-border: rgba(250, 204, 21, 0.6);
    --orbit-color: #fef08a;
    --orbit-hover: rgba(234, 179, 8, 0.45);
}
.hero-orbit--developer {
    --orbit-bg: rgba(6, 182, 212, 0.28);
    --orbit-border: rgba(34, 211, 238, 0.6);
    --orbit-color: #a5f3fc;
    --orbit-hover: rgba(6, 182, 212, 0.45);
}
.hero-orbit--design {
    --orbit-bg: rgba(244, 63, 94, 0.28);
    --orbit-border: rgba(251, 113, 133, 0.6);
    --orbit-color: #fecdd3;
    --orbit-hover: rgba(244, 63, 94, 0.45);
}
.hero-orbit--security {
    --orbit-bg: rgba(99, 102, 241, 0.28);
    --orbit-border: rgba(129, 140, 248, 0.6);
    --orbit-color: #c7d2fe;
    --orbit-hover: rgba(99, 102, 241, 0.45);
}
.hero-orbit--education {
    --orbit-bg: rgba(20, 184, 166, 0.28);
    --orbit-border: rgba(45, 212, 191, 0.6);
    --orbit-color: #99f6e4;
    --orbit-hover: rgba(20, 184, 166, 0.45);
}
.hero-orbit--kids {
    --orbit-bg: rgba(251, 191, 36, 0.28);
    --orbit-border: rgba(252, 211, 77, 0.65);
    --orbit-color: #fde68a;
    --orbit-hover: rgba(245, 158, 11, 0.45);
}
.hero-orbit--utility {
    --orbit-bg: rgba(148, 163, 184, 0.28);
    --orbit-border: rgba(203, 213, 225, 0.55);
    --orbit-color: #e2e8f0;
    --orbit-hover: rgba(148, 163, 184, 0.45);
}
.hero-orbit--seo {
    --orbit-bg: rgba(16, 185, 129, 0.28);
    --orbit-border: rgba(52, 211, 153, 0.6);
    --orbit-color: #a7f3d0;
    --orbit-hover: rgba(16, 185, 129, 0.45);
}
.hero-orbit--social-tools {
    --orbit-bg: rgba(59, 130, 246, 0.22);
    --orbit-border: rgba(147, 197, 253, 0.55);
    --orbit-color: #bfdbfe;
    --orbit-hover: rgba(59, 130, 246, 0.4);
}
.hero-orbit--health {
    --orbit-bg: rgba(244, 63, 94, 0.28);
    --orbit-border: rgba(251, 113, 133, 0.6);
    --orbit-color: #fecdd3;
    --orbit-hover: rgba(244, 63, 94, 0.45);
}
.hero-orbit--generators {
    --orbit-bg: rgba(168, 85, 247, 0.28);
    --orbit-border: rgba(192, 132, 252, 0.6);
    --orbit-color: #e9d5ff;
    --orbit-hover: rgba(168, 85, 247, 0.45);
}
.hero-orbit--writing {
    --orbit-bg: rgba(234, 179, 8, 0.26);
    --orbit-border: rgba(250, 204, 21, 0.55);
    --orbit-color: #fef08a;
    --orbit-hover: rgba(234, 179, 8, 0.42);
}
.hero-orbit--calculator {
    --orbit-bg: rgba(14, 165, 233, 0.28);
    --orbit-border: rgba(56, 189, 248, 0.6);
    --orbit-color: #bae6fd;
    --orbit-hover: rgba(14, 165, 233, 0.45);
}

@keyframes orbit-float {
    0%, 100% { transform: translate(-50%, -50%); }
    50% { transform: translate(-50%, calc(-50% - 3px)); }
}

/* Trust bar */
.trust-bar { padding: 0 0 2.5rem; }
.hero-home + .trust-bar { margin-top: -.5rem; }
.trust-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.trust-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.25rem 1.35rem;
    background: linear-gradient(145deg, var(--bg-card), rgba(0,174,239,0.03));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color .2s, transform .2s;
}
.trust-item:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.trust-icon {
    font-size: 1.6rem;
    line-height: 1;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 174, 239, 0.1);
    border-radius: 12px;
    flex-shrink: 0;
}
.trust-item strong { display: block; font-size: .92rem; margin-bottom: .2rem; color: var(--text); }
.trust-item p { font-size: .82rem; color: var(--text-muted); margin: 0; line-height: 1.5; }

/* Home intro & FAQ */
.home-intro {
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--border);
}
.home-intro-inner {
    max-width: 720px;
}
.home-intro h2 {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}
.home-intro-lead {
    font-size: 1.05rem;
    color: var(--text);
    line-height: 1.65;
    margin-bottom: .85rem;
}
.home-intro p {
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
}
.home-faq {
    padding: 3rem 0;
    border-top: 1px solid var(--border);
}
.home-faq h2 {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: .5rem;
    letter-spacing: -0.02em;
}
.home-faq-intro {
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    max-width: 640px;
    line-height: 1.6;
}
.home-faq .faq-list { max-width: 720px; }

/* Category bar */
.category-bar {
    padding: 2rem 0 2.5rem;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: rgba(0, 174, 239, 0.02);
}
.category-bar-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    gap: 1rem;
}
.category-bar-head h2 { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.02em; }

/* CTA band */
.cta-band {
    padding: 3.5rem 0;
    margin-top: 1rem;
    background: linear-gradient(135deg, rgba(0,174,239,0.12) 0%, rgba(0,119,182,0.08) 50%, transparent 100%);
    border-top: 1px solid var(--border);
}
.cta-band-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem 2rem;
    justify-content: space-between;
}
.cta-band-inner h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: .35rem; letter-spacing: -0.02em; }
.cta-band-inner p { color: var(--text-muted); font-size: .92rem; margin: 0; }
.cta-band-inner .btn { flex-shrink: 0; }

/* Page hero rich */
.page-hero-rich { padding: 2.5rem 0 2rem; }
.page-hero-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
}
.page-hero-logo-wrap { display: flex; justify-content: center; }
.page-hero-logo-wrap .ts-logo--hero img { max-height: 140px; padding: 14px 20px; }

.tools-search {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1rem;
    max-width: 40rem;
    align-items: center;
}
.tools-search .input-full {
    flex: 1 1 14rem;
    min-width: 0;
}
.tools-search .btn {
    flex: 0 0 auto;
}

/* /tools index polish */
.tools-index-hero .hero-sub {
    max-width: 36rem;
}
.tools-search--bar {
    max-width: 42rem;
    width: 100%;
    align-items: stretch;
}
.tools-search-field {
    position: relative;
    flex: 1 1 16rem;
    min-width: 0;
}
.tools-search-field .input-full {
    width: 100%;
    padding-left: 2.55rem;
    min-height: 48px;
}
.tools-search-icon {
    position: absolute;
    left: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 1rem;
    pointer-events: none;
    line-height: 1;
}
.tools-search-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: stretch;
}
.tools-search-actions .btn {
    min-height: 48px;
}
.tools-index-result-meta {
    margin-top: 0.75rem;
    font-size: 0.88rem;
    color: var(--text-dim);
    font-weight: 600;
}
.tools-index-empty {
    padding: 1.25rem 1.15rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
}
.tools-jump {
    padding: 1.25rem 0 0;
    border-top: 1px solid var(--border);
    border-bottom: none;
    background: rgba(0, 174, 239, 0.02);
}
.tools-jump .category-bar-head {
    margin-bottom: 0.85rem;
}
.tools-jump .category-bar-head p {
    margin: 0;
    color: var(--text-dim);
    font-size: 0.88rem;
}
.tools-jump-stick {
    position: sticky;
    top: var(--tools-header-offset, 72px);
    z-index: 40;
    padding: 0.7rem 0 0.85rem;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: rgba(6, 10, 18, 0.94);
    border-bottom: 1px solid var(--border);
    border-top: 1px solid rgba(0, 174, 239, 0.08);
}
.tools-jump-stick .container {
    position: relative;
}
.category-pills.category-pills--scroll {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    overflow: visible;
    padding: 0;
    margin: 0;
    scroll-snap-type: none;
}
.category-pills.category-pills--scroll .category-pill {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 0.48rem 0.9rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: #cbd5e1;
    box-shadow: none;
    transform: none;
}
.category-pills.category-pills--scroll .category-pill:hover {
    border-color: rgba(0, 174, 239, 0.55);
    color: #e0f2fe;
    background: rgba(0, 174, 239, 0.12);
    transform: none;
}
.category-pills.category-pills--scroll .category-pill.is-active {
    border-color: rgba(0, 174, 239, 0.65);
    color: #e0f2fe;
    background: rgba(0, 174, 239, 0.18);
    box-shadow: 0 0 0 1px rgba(0, 174, 239, 0.2);
}
.category-pills.category-pills--scroll .category-pill-icon {
    width: 1rem;
    font-size: 0.92rem;
    opacity: 0.95;
}
.category-pills.category-pills--scroll .category-pill-count {
    margin-left: 0.15rem;
    min-width: 1.35rem;
    padding: 0.1rem 0.42rem;
    border-radius: 999px;
    background: rgba(0, 174, 239, 0.16);
    border: 1px solid rgba(0, 174, 239, 0.2);
    font-size: 0.7rem;
    font-weight: 800;
    color: #7dd3fc;
    text-align: center;
}
.category-pills.category-pills--scroll .category-pill.is-active .category-pill-count {
    background: rgba(0, 174, 239, 0.28);
    color: #e0f2fe;
}

/* Home multi-row category pills (same look as tools jump pills) */
.home-category-bar {
    background: rgba(0, 174, 239, 0.02);
}
.category-pills.category-pills--wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}
.category-pills.category-pills--wrap .category-pill {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 0.48rem 0.9rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: #cbd5e1;
    box-shadow: none;
    transform: none;
}
.category-pills.category-pills--wrap .category-pill:hover {
    border-color: rgba(0, 174, 239, 0.55);
    color: #e0f2fe;
    background: rgba(0, 174, 239, 0.12);
    transform: none;
}
.category-pills.category-pills--wrap .category-pill-icon {
    width: 1rem;
    font-size: 0.92rem;
    opacity: 0.95;
}
.category-pills.category-pills--wrap .category-pill-count {
    margin-left: 0.15rem;
    min-width: 1.35rem;
    padding: 0.1rem 0.42rem;
    border-radius: 999px;
    background: rgba(0, 174, 239, 0.16);
    border: 1px solid rgba(0, 174, 239, 0.2);
    font-size: 0.7rem;
    font-weight: 800;
    color: #7dd3fc;
    text-align: center;
}

.tools-index {
    --tools-jump-offset: 140px;
}
.tools-index [id^="tools-cat-"] {
    scroll-margin-top: var(--tools-jump-offset);
}
.tools-grid--dense {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}
.tools-grid--dense .tool-card-desc {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tools-index .tool-card-desc {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Features strip */
.features-strip {
    padding: 0 0 2rem;
    margin-top: -1rem;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}
.feature-item {
    display: flex;
    gap: .85rem;
    align-items: flex-start;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.15rem;
}
.feature-icon { font-size: 1.5rem; line-height: 1; }
.feature-item strong { display: block; font-size: .9rem; margin-bottom: .15rem; }
.feature-item p { font-size: .8rem; color: var(--text-muted); margin: 0; }

/* ─── Tools grid ─── */
.tools-section {
    padding: 3.5rem 0;
    overflow: visible;
}
.tools-section-alt { background: rgba(255,255,255,.015); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    gap: 1rem;
    flex-wrap: wrap;
}
.section-title-group { display: flex; gap: 1rem; align-items: flex-start; }
.section-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 174, 239, 0.1);
    border: 1px solid rgba(0, 174, 239, 0.15);
    border-radius: 14px;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.section-header h2 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.section-desc { color: var(--text-dim); font-size: .88rem; margin-top: .2rem; }
.section-link {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 700;
    font-size: .9rem;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: .35rem 0;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.15rem;
    /* Room for hover lift + glow so cards are not clipped under the header */
    padding: .85rem .35rem .65rem;
    margin: -.35rem -.35rem 0;
    overflow: visible;
}

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.35rem;
    text-decoration: none;
    color: var(--text);
    transition: transform .2s, border-color .2s, box-shadow .2s, background .2s;
    display: flex;
    flex-direction: column;
    min-height: 170px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    z-index: 0;
}

.tool-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,174,239,.08), transparent 60%);
    opacity: 0;
    transition: opacity .2s;
}

.tool-card:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 174, 239, 0.45);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28), var(--shadow-glow);
    background: var(--bg-card-hover);
    z-index: 2;
}
.tool-card:hover::before { opacity: 1; }

.tool-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: .85rem; position: relative; }
.tool-card-icon { font-size: 1.6rem; }
.tool-list-icon--category { font-size: 1.6rem; line-height: 1; }
.tool-card-top .tool-list-icon--category { font-size: 1.6rem; }
.tool-glyph-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
.tool-glyph-icon svg {
    display: block;
    width: 100%;
    height: 100%;
}
.tool-page-header .tool-glyph-icon,
.tool-page-header .social-brand-icon {
    width: 56px;
    height: 56px;
}
.tool-card-badge {
    font-size: .75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: .25rem .55rem;
    border-radius: 999px;
    background: rgba(52, 211, 153, .12);
    color: var(--success);
    border: 1px solid rgba(52, 211, 153, .25);
}
.tool-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .35rem; position: relative; line-height: 1.35; }
.tool-card-meta { font-size: .82rem; color: var(--text-dim); margin-bottom: auto; position: relative; }
.tool-card-cta { font-size: .82rem; font-weight: 700; color: var(--primary-light); margin-top: 1rem; position: relative; }
.tool-card-category { font-size: .72rem; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.tool-card-arrow { color: var(--primary-light); font-weight: 700; }
.tool-card-lg { min-height: 180px; }
.tool-card-desc {
    font-size: .85rem;
    color: var(--text-muted);
    margin: .35rem 0 auto;
    line-height: 1.5;
    flex-grow: 1;
    position: relative;
}
.tool-card-link { font-size: .85rem; color: var(--primary-light); font-weight: 700; }
.tool-count { color: var(--text-dim); font-size: .88rem; }

.category-pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.category-pill {
    padding: .65rem 1.15rem;
    border-radius: 999px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    font-size: .85rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: all .2s;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
}
.category-pill:hover { border-color: var(--brand-blue); color: var(--brand-blue-light); background: rgba(0,174,239,.1); transform: translateY(-1px); }
.category-pill-count {
    margin-left: .25rem;
    padding: .05rem .4rem;
    border-radius: 999px;
    background: rgba(0,174,239,.12);
    font-size: .75rem;
    font-weight: 700;
    color: var(--brand-blue-light, #38bdf8);
}

.category-pill-icon,
.footer-cat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    font-size: 1rem;
    line-height: 1;
    flex-shrink: 0;
}

.page-hero { padding: 3rem 0 1.5rem; }
.page-hero h1 { font-size: 2.25rem; font-weight: 800; letter-spacing: -0.02em; margin: .5rem 0; }

.page-hero-compact {
    padding: 2rem 0 1.35rem;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.015);
}

.page-hero-compact h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0;
    line-height: 1.2;
}

.page-hero-compact .breadcrumb {
    margin-bottom: 0.65rem;
}

.page-hero-compact .hero-sub {
    margin: 0.75rem 0 0;
    max-width: 42rem;
    color: var(--text-muted);
    line-height: 1.65;
    font-size: 1rem;
}

.page-body {
    padding-bottom: 4rem;
}

.page-body .page-content {
    padding: 2rem 0 0;
}

/* ─── Tool page ─── */
.tool-page { padding: 2rem 0 3rem; }
.tool-layout { display: grid; grid-template-columns: 1fr 280px; gap: 2rem; align-items: start; }
.breadcrumb { font-size: .82rem; color: var(--text-dim); margin-bottom: 1.25rem; display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.breadcrumb a { color: var(--primary-light); text-decoration: none; font-weight: 600; }
.breadcrumb a:hover { text-decoration: underline; }

.tool-page-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}
.tool-page-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 174, 239, 0.1);
    border: 1px solid rgba(0, 174, 239, 0.15);
    border-radius: 14px;
    font-size: 1.75rem;
    flex-shrink: 0;
}
.tool-page-shot {
    margin: 1.15rem 0 0;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(2, 8, 20, 0.55);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}
.tool-page-shot img {
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    object-position: center top;
    background: #020814;
}
.social-brand-icon {
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(2, 6, 23, .28);
}
.social-brand-icon svg {
    display: block;
    width: 56px;
    height: 56px;
}
.social-brand-icon--hero {
    width: 52px;
    height: 52px;
    box-shadow: 0 8px 22px rgba(2, 6, 23, .35);
}
.social-brand-icon--hero svg {
    width: 52px;
    height: 52px;
}
.social-brand-icon--sm {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    box-shadow: none;
}
.social-brand-icon--sm svg {
    width: 28px;
    height: 28px;
}
[class*="-hero"] .social-brand-icon--hero {
    margin-bottom: .65rem;
}
.tool-card-top .social-brand-icon--sm {
    margin-right: .15rem;
}
.tool-page-header h1 { font-size: 1.85rem; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.tool-updated { margin: 0.35rem 0 0; font-size: 0.85rem; color: var(--text-muted); }

.tool-intro { color: var(--text-muted); font-size: 1.02rem; margin-bottom: 1.5rem; line-height: 1.75; }

.tool-run-progress {
    position: sticky;
    top: 72px;
    z-index: 40;
    margin-bottom: 1rem;
    padding: 1rem 1.15rem;
    background: rgba(10, 15, 28, 0.94);
    border: 1px solid rgba(0, 174, 239, 0.35);
    border-radius: var(--radius);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
}

.tool-run-progress[hidden] { display: none !important; }

.tool-run-progress-head {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .65rem;
}

.tool-run-progress-pulse {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-light);
    box-shadow: 0 0 0 0 rgba(0, 174, 239, 0.55);
    flex-shrink: 0;
}

.tool-run-progress.is-active .tool-run-progress-pulse {
    animation: runProgressPulse 1.4s ease infinite;
}

.tool-run-progress-copy {
    flex: 1;
    min-width: 0;
}

.tool-run-progress-copy strong {
    display: block;
    font-size: .92rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tool-run-progress-step {
    display: block;
    font-size: .78rem;
    color: var(--text-dim);
    margin-top: .15rem;
}

.tool-run-progress-pct {
    font-size: .82rem;
    font-weight: 800;
    font-family: var(--mono);
    color: var(--primary-light);
    flex-shrink: 0;
}

.tool-run-progress-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    overflow: hidden;
}

.tool-run-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width .25s ease;
}

.tool-run-progress.is-indeterminate .tool-run-progress-fill {
    width: 35% !important;
    animation: runProgressIndeterminate 1.2s ease-in-out infinite;
}

.tool-run-progress.is-done {
    border-color: rgba(52, 211, 153, 0.4);
}

.tool-run-progress.is-done .tool-run-progress-fill {
    background: linear-gradient(90deg, var(--success), #34d399);
}

.tool-run-progress.is-done .tool-run-progress-pulse {
    background: var(--success);
    animation: none;
}

.tool-run-progress.is-error {
    border-color: rgba(248, 113, 113, 0.45);
}

.tool-run-progress.is-error .tool-run-progress-fill {
    background: var(--error);
}

.tool-run-progress.is-error .tool-run-progress-pulse {
    background: var(--error);
    animation: none;
}

@keyframes runProgressPulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 174, 239, 0.55); }
    70% { box-shadow: 0 0 0 10px rgba(0, 174, 239, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 174, 239, 0); }
}

@keyframes runProgressIndeterminate {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(320%); }
}

.tool-widget {
    background: linear-gradient(180deg, var(--bg-card) 0%, rgba(17,24,39,.6) 100%);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 1.75rem;
    margin-bottom: 2rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

/* Page already has H1 + intro — hide the duplicate widget hero. */
.tool-page .tool-widget header[class*="-hero"] {
    display: none !important;
}

/* Tool panel layout — consistent spacing inside every tool */
.tool-panel {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.tool-panel .form-group,
.tool-panel .form-row {
    margin-bottom: 0;
}

.tool-panel > .upload-zone,
.tool-panel > .image-preview-panel {
    margin-bottom: 0;
}

.tool-panel .image-preview-panel {
    margin: 0;
}

.tool-panel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: center;
}

.tool-panel-actions .btn-primary {
    min-width: 10rem;
}

.tool-note {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    padding: .9rem 1rem;
    border-radius: var(--radius-sm);
    font-size: .84rem;
    line-height: 1.55;
    color: var(--text-muted);
    background: rgba(0, 174, 239, 0.07);
    border: 1px solid rgba(0, 174, 239, 0.2);
    margin: 0;
}

.tool-note::before {
    content: 'ℹ';
    flex-shrink: 0;
    width: 1.35rem;
    height: 1.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: .72rem;
    font-weight: 800;
    color: var(--primary-light);
    background: rgba(0, 174, 239, 0.15);
}

.tool-note--warn {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.28);
    color: var(--text-muted);
}

.tool-note--warn::before {
    content: '!';
    color: var(--warning);
    background: rgba(245, 158, 11, 0.18);
}

.tool-note a {
    color: var(--primary-light);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.tool-warning {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    padding: .9rem 1rem;
    border-radius: var(--radius-sm);
    font-size: .84rem;
    line-height: 1.55;
    color: var(--text-muted);
    background: rgba(0, 174, 239, 0.07);
    border: 1px solid rgba(0, 174, 239, 0.2);
    margin: 0;
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin: 0;
}

.file-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1rem;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .88rem;
}

.file-item-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.file-item-name {
    flex: 1;
    font-weight: 600;
    color: var(--text);
    word-break: break-all;
}

.file-item-size {
    font-size: .78rem;
    color: var(--text-dim);
    font-family: var(--mono);
    flex-shrink: 0;
}

.video-preview {
    width: 100%;
    max-width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: #000;
}

.video-preview[hidden] {
    display: none !important;
}

.gif-result {
    margin-top: .25rem;
}

.gif-result img {
    max-width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.pdf-upload-zone .upload-zone-change,
.video-upload-zone .upload-zone-change {
    margin-left: auto;
}

.content-section { margin-bottom: 2.25rem; }
.content-section h2 {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 1rem;
    padding-bottom: .65rem;
    border-bottom: 1px solid var(--border);
    letter-spacing: -0.01em;
}
.steps-list { padding-left: 1.35rem; }
.steps-list li { margin-bottom: .65rem; color: var(--text-muted); padding-left: .25rem; }
.features-list { list-style: none; display: grid; gap: .5rem; }
.features-list li {
    padding: .65rem .85rem .65rem 2.25rem;
    position: relative;
    color: var(--text-muted);
    background: rgba(255,255,255,.02);
    border-radius: 8px;
    border: 1px solid var(--border);
}
.features-list li::before {
    content: '✓';
    position: absolute;
    left: .85rem;
    color: var(--success);
    font-weight: 800;
}

.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: .5rem; overflow: hidden; background: var(--bg-card); }
.faq-item summary { padding: 1rem 1.15rem; cursor: pointer; font-weight: 700; font-size: .95rem; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item[open] summary { border-bottom: 1px solid var(--border); color: var(--primary-light); }
.faq-item p { padding: 1rem 1.15rem; color: var(--text-muted); font-size: .92rem; line-height: 1.65; }

.related-tools { display: flex; flex-wrap: wrap; gap: .5rem; }
.related-tool-link {
    padding: .55rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 999px;
    text-decoration: none;
    color: var(--text);
    font-size: .85rem;
    font-weight: 600;
    transition: all .2s;
}
.related-tool-link:hover { border-color: var(--primary); color: var(--primary-light); background: rgba(99,102,241,.08); }

.tool-primary-keyword {
    margin: .35rem 0 0;
    color: var(--text-muted);
    font-size: .95rem;
    font-weight: 600;
}
.tool-keyword-section { margin-top: .5rem; }
.tool-keyword-lead {
    color: var(--text-muted);
    margin: 0 0 1.15rem;
    line-height: 1.7;
    font-size: .95rem;
}
.tool-keyword-group { margin-bottom: 1.15rem; }
.tool-keyword-group h3 {
    margin: 0 0 .55rem;
    font-size: .88rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.tool-keyword-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}
.tool-keyword-chip {
    display: inline-block;
    padding: .4rem .75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text);
    font-size: .82rem;
    font-weight: 600;
    line-height: 1.35;
}

.empty-state-card {
    width: min(100%, 760px);
    margin: 1.25rem auto;
    padding: 2rem 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-strong);
    background: linear-gradient(160deg, rgba(0, 174, 239, 0.08), rgba(255, 255, 255, 0.02));
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
    text-align: center;
}

.empty-state-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto .85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 1.8rem;
    background: rgba(0, 174, 239, 0.14);
    border: 1px solid rgba(0, 174, 239, 0.3);
}

.empty-state-card h2 {
    margin: 0 0 .65rem;
    border: 0;
    padding: 0;
}

.empty-state-card p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.7;
}

.tool-sidebar { position: sticky; top: 86px; }
.sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
}
.sidebar-card h3 { font-size: .95rem; font-weight: 800; margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim); }
.sidebar-card dl { font-size: .88rem; }
.sidebar-card dt { color: var(--text-dim); margin-top: .65rem; font-size: .78rem; text-transform: uppercase; letter-spacing: 0.04em; }
.sidebar-card dd { font-weight: 700; color: var(--text); }

/* Forms */
.form-group { margin-bottom: 1.1rem; }
.tool-panel .form-group { margin-bottom: 0; }
.form-group label { display: block; font-weight: 700; margin-bottom: .4rem; font-size: .88rem; color: var(--text-muted); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; }
.form-row--tight { gap: 0.75rem; }
.input-full {
    width: 100%;
    padding: .8rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    background: var(--bg-soft);
    color: var(--text);
    font-family: inherit;
    font-size: .92rem;
    transition: border-color .2s, box-shadow .2s;
}
.input-full:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
.mono { font-family: var(--mono); font-size: .85rem; }
.btn-row { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.checkbox-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
.checkbox-row label { display: flex; align-items: center; gap: .4rem; font-size: .88rem; cursor: pointer; color: var(--text-muted); }

.upload-zone-input {
    /* hidden via attribute; keep class for tests */
}

label.upload-zone-empty,
.upload-zone-empty {
    display: block;
    cursor: pointer;
    margin: 0;
}

.upload-zone-browse-link {
    color: var(--brand-blue-light);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.upload-zone {
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius);
    padding: 1.5rem 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: border-color .25s, background .25s, box-shadow .25s, transform .15s;
    background: rgba(255,255,255,.02);
    margin-bottom: 0;
    position: relative;
    overflow: visible;
}

.upload-zone--compact {
    padding: 1rem 1rem;
}

.upload-zone--compact .upload-zone-icon {
    font-size: 1.75rem;
    margin-bottom: 0.4rem;
}

.upload-zone--compact .upload-zone-title {
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.upload-zone--compact .upload-zone-hint {
    font-size: 0.82rem;
}

.upload-zone--compact.has-file {
    padding: 0.75rem 1rem;
}

.image-tool--compact {
    gap: 0.75rem;
}

.upload-zone::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(0, 174, 239, 0.08), transparent 55%);
    opacity: 0;
    transition: opacity .25s;
    pointer-events: none;
}

.upload-zone:hover::before,
.upload-zone.dragover::before,
.upload-zone.has-file::before {
    opacity: 1;
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--brand-blue);
    background: rgba(0, 174, 239, 0.06);
    box-shadow: 0 0 0 4px rgba(0, 174, 239, 0.08);
}

.upload-zone.dragover {
    transform: scale(1.01);
    border-style: solid;
}

.upload-zone.has-file {
    padding: 0.85rem 1rem;
    text-align: left;
    border-style: solid;
    border-color: rgba(0, 174, 239, 0.35);
    background: rgba(0, 174, 239, 0.04);
}

.upload-zone-icon {
    font-size: 2.5rem;
    line-height: 1;
    margin-bottom: .75rem;
    filter: drop-shadow(0 4px 12px rgba(0, 174, 239, 0.25));
}

.upload-zone-title {
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: .35rem;
    color: var(--text);
}

.upload-zone-hint {
    color: var(--text-muted);
    font-size: .88rem;
    margin: 0;
}

.upload-zone-selected {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.upload-zone-selected[hidden],
.upload-zone-empty[hidden] {
    display: none !important;
}

.upload-zone-thumb-wrap {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid rgba(0, 174, 239, 0.25);
    background: var(--bg-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.upload-zone-thumb-wrap--file {
    background: linear-gradient(135deg, rgba(0, 174, 239, 0.15), rgba(0, 119, 182, 0.08));
}

.upload-zone-file-icon {
    font-size: 2rem;
}

.upload-zone-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.upload-zone-thumb[hidden],
.upload-zone-file-icon[hidden] {
    display: none !important;
}

.upload-zone-thumb-wrap--file .upload-zone-file-icon {
    display: flex;
}

.upload-zone-thumb-wrap:not(.upload-zone-thumb-wrap--file) .upload-zone-file-icon {
    display: none;
}

.upload-zone-meta {
    flex: 1;
    min-width: 140px;
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.upload-zone-name {
    font-weight: 700;
    font-size: .92rem;
    color: var(--text);
    word-break: break-all;
}

.upload-zone-details {
    font-size: .82rem;
    color: var(--text-muted);
}

.upload-zone-change {
    margin-left: auto;
}

.upload-zone small { display: block; margin-top: .65rem; color: var(--text-dim); font-size: .8rem; }

.upload-selected-name {
    margin-top: .75rem;
    font-size: .88rem;
    font-weight: 600;
    color: var(--brand-blue-light);
}

/* Image preview panel */
.image-preview-panel {
    margin: 1.25rem 0;
    animation: previewFadeIn .35s ease;
}

.image-preview-panel[hidden] {
    display: none !important;
}

@keyframes previewFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.image-preview-card {
    display: grid;
    grid-template-columns: minmax(160px, 280px) 1fr;
    gap: 1.25rem;
    align-items: start;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 1.15rem;
    box-shadow: var(--shadow-glow);
}

.image-preview-card--file {
    grid-template-columns: auto 1fr;
}

.image-preview-file-icon {
    font-size: 2.5rem;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 174, 239, 0.1);
    border-radius: 12px;
}

.image-preview-frame {
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    line-height: 0;
    max-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-preview-frame img {
    max-width: 100%;
    max-height: 320px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.image-preview-frame.checkerboard {
    background-color: var(--bg-soft);
    background-image:
        linear-gradient(45deg, rgba(255,255,255,.04) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255,255,255,.04) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(255,255,255,.04) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(255,255,255,.04) 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}

.image-preview-filename {
    font-size: .95rem;
    font-weight: 700;
    margin-bottom: .75rem;
    word-break: break-all;
    color: var(--text);
}

.image-preview-meta {
    display: grid;
    gap: .5rem;
}

.image-preview-meta div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: .85rem;
    padding: .45rem 0;
    border-bottom: 1px solid var(--border);
}

.image-preview-meta dt {
    color: var(--text-dim);
    font-weight: 600;
}

.image-preview-meta dd {
    color: var(--brand-blue-light);
    font-weight: 700;
    margin: 0;
}

.image-preview-note {
    margin-top: .75rem;
    font-size: .82rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.image-preview-note.success {
    color: var(--success);
    font-weight: 600;
}

.image-preview-actions {
    margin-top: 1rem;
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.image-compare-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 1.15rem;
}

.image-compare-item {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.image-compare-label {
    font-size: .75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--brand-blue-light);
}

.image-compare-arrow {
    font-size: 1.5rem;
    color: var(--brand-blue);
    font-weight: 700;
    opacity: .7;
}

/* Remove AI Watermark tool */
.watermark-tool {
    gap: 1rem;
}

.watermark-upload-block {
    margin-bottom: 0.25rem;
}

.watermark-tool .upload-zone {
    margin-bottom: 0;
}

.watermark-source-preview {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0, 174, 239, 0.25);
    background: rgba(0, 174, 239, 0.05);
}

.watermark-source-preview-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.watermark-source-preview img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid rgba(0, 174, 239, 0.3);
    flex-shrink: 0;
}

.watermark-source-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.watermark-source-meta strong {
    font-size: 0.92rem;
    word-break: break-word;
}

.watermark-settings {
    padding: 1rem 1.1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.watermark-settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 1rem;
}

.watermark-range {
    width: 100%;
    margin-top: 0.35rem;
    accent-color: var(--brand-blue);
}

.watermark-range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.35rem;
    font-size: 0.75rem;
    color: var(--text-dim);
}

.watermark-actions {
    margin-top: 0.25rem;
}

.watermark-result-wrap {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.watermark-result-heading {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    font-weight: 700;
}

.watermark-result-wrap .image-preview-panel {
    margin: 0;
}

.watermark-result-note {
    margin: 0.75rem 0 0;
    font-size: 0.84rem;
    color: var(--text-muted);
}

.watermark-tool .tool-status {
    margin-top: 0;
}

@media (max-width: 640px) {
    .watermark-settings-grid {
        grid-template-columns: 1fr;
    }

    .watermark-source-preview-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

.color-picker-canvas {
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-strong);
    box-shadow: var(--shadow-glow);
    transition: box-shadow .2s;
}

.color-picker-canvas:hover {
    box-shadow: 0 0 0 3px rgba(0, 174, 239, 0.2);
}

.img-preview-row { margin: 1rem 0; }
.img-preview-row img { max-width: 100%; border-radius: var(--radius-sm); border: 1px solid var(--border); }

@media (max-width: 640px) {
    .image-preview-card,
    .image-compare-grid {
        grid-template-columns: 1fr;
    }
    .image-compare-arrow {
        text-align: center;
        transform: rotate(90deg);
    }
    .upload-zone-selected {
        flex-direction: column;
        align-items: flex-start;
    }
    .upload-zone-change { margin-left: 0; }
}

.tool-status {
    margin-top: 1rem;
    padding: .85rem 1rem;
    border-radius: var(--radius-sm);
    font-size: .88rem;
    font-weight: 600;
    display: none;
}

.tool-status:not(:empty) {
    display: block;
}
.tool-status.error { background: rgba(248,113,113,.12); color: var(--error); border: 1px solid rgba(248,113,113,.25); }
.tool-status.success { background: rgba(52,211,153,.12); color: var(--success); border: 1px solid rgba(52,211,153,.25); }
.tool-status.info { background: rgba(0,174,239,.12); color: var(--brand-blue-light); border: 1px solid rgba(0,174,239,.25); }
.heic-tool #heicConvertBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.heic-tool form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.heic-tool .upload-zone small {
    display: block;
    margin-top: .5rem;
    color: var(--text-dim);
    font-size: .78rem;
}

.code-block {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    overflow-x: auto;
    font-family: var(--mono);
    font-size: .82rem;
    white-space: pre-wrap;
    word-break: break-all;
}

.copy-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.copy-row input { flex: 1; }

.color-picker-layout { display: flex; gap: 1.5rem; align-items: flex-start; flex-wrap: wrap; }
.color-wheel-input { width: 120px; height: 120px; border: none; cursor: pointer; border-radius: var(--radius); }
.color-history { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }
.color-swatch { width: 32px; height: 32px; border-radius: 8px; cursor: pointer; border: 2px solid var(--border-strong); }

.qr-result { margin-top: 1.5rem; text-align: center; }
.qr-result canvas { max-width: 100%; border-radius: var(--radius-sm); background: #fff; padding: 1rem; }

.favicon-previews {
    display: flex;
    gap: 1.5rem;
    margin: 1.25rem 0;
    align-items: flex-end;
    flex-wrap: wrap;
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
}

.favicon-size {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
}

.favicon-size canvas {
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    image-rendering: pixelated;
}

.favicon-size span {
    font-size: .75rem;
    font-weight: 700;
    color: var(--text-muted);
}
.favicon-size { text-align: center; }
.favicon-size canvas { border: 1px solid var(--border); border-radius: 6px; image-rendering: pixelated; }
.favicon-size span { display: block; font-size: .72rem; color: var(--text-dim); margin-top: .25rem; }

.word-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: .75rem; }
.word-stat {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    text-align: center;
}
.word-stat strong { display: block; font-size: 1.4rem; color: var(--primary-light); font-weight: 800; }
.word-stat span { font-size: .72rem; color: var(--text-dim); font-weight: 600; text-transform: uppercase; }

.pw-results { margin-top: 1rem; }
.pw-item {
    display: flex; align-items: center; justify-content: space-between; gap: .5rem;
    padding: .75rem 1rem;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: .5rem;
    font-family: var(--mono);
    font-size: .88rem;
    cursor: pointer;
    transition: border-color .2s, background .15s;
}
.pw-item:hover {
    border-color: rgba(0, 174, 239, 0.45);
    background: var(--bg-elevated);
}
.pw-item::after {
    content: 'Click to copy';
    font-size: .68rem;
    color: var(--text-dim);
    font-family: var(--font);
    flex-shrink: 0;
}

.uuid-results { margin-top: 1rem; }
.uuid-item {
    padding: .55rem .85rem;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: .35rem;
    cursor: pointer;
    font-family: var(--mono);
    font-size: .82rem;
    transition: background .15s;
}
.uuid-item:hover { background: var(--bg-elevated); border-color: var(--primary); }
.uuid-item::after {
    content: 'Click to copy';
    float: right;
    font-size: .68rem;
    color: var(--text-dim);
    font-family: var(--font);
}

/* Click-to-copy */
.copy-hint {
    font-size: .75rem;
    font-weight: 500;
    color: var(--text-dim);
    text-transform: none;
    letter-spacing: 0;
}

.copy-on-click,
.tool-panel textarea[readonly],
.tool-panel .copy-row input[readonly],
.tool-panel pre.code-block {
    transition: border-color .2s, box-shadow .2s;
}

.copy-on-click:hover,
.tool-panel textarea[readonly]:hover,
.tool-panel .copy-row input[readonly]:hover,
.tool-panel pre.code-block:hover {
    border-color: rgba(0, 174, 239, 0.45);
}

.copy-flash {
    animation: copyFlash .65s ease;
}

@keyframes copyFlash {
    0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
    100% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); }
}

.ts-copy-toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    z-index: 9999;
    padding: .65rem 1.15rem;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(52, 211, 153, 0.35);
    color: var(--success);
    font-size: .88rem;
    font-weight: 600;
    border-radius: 999px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s, transform .2s;
}

.ts-copy-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ─── Toast notifications (site-wide) ─── */
.ts-toast-wrap{
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: .65rem;
    width: min(420px, calc(100vw - 2rem));
    pointer-events: none;
}
html.is-offline .ts-toast-wrap {
    top: calc(max(0.85rem, env(safe-area-inset-top, 0px)) + 5.75rem);
}
.ts-toast{
    pointer-events: auto;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: .75rem;
    padding: .85rem .95rem;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid var(--border-strong);
    box-shadow: 0 14px 40px rgba(0,0,0,.42);
    transform: translateY(-10px);
    opacity: 0;
    transition: opacity .18s ease, transform .18s ease;
}
.ts-toast.is-visible{
    opacity: 1;
    transform: translateY(0);
}
.ts-toast__content{display:flex;flex-direction:column;gap:.25rem}
.ts-toast__title{
    font-size:.92rem;
    font-weight:850;
    letter-spacing:-0.01em;
    color:var(--text);
}
.ts-toast__msg{
    color: var(--text-muted);
    font-size: .88rem;
    font-weight: 650;
    line-height: 1.35;
}
.ts-toast__close{
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.25rem;
    line-height: 1;
    padding: 0 .15rem;
    cursor: pointer;
}
.ts-toast__close:hover{ color: var(--text); }

.ts-toast--success{ border-color: rgba(52,211,153,.35); }
.ts-toast--success .ts-toast__msg{ color: #b9f6d2; }
.ts-toast--error{ border-color: rgba(248,113,113,.35); }
.ts-toast--error .ts-toast__msg{ color: #fecaca; }
.ts-toast--warning{ border-color: rgba(251,191,36,.35); }
.ts-toast--warning .ts-toast__msg{ color: #fde68a; }
.ts-toast--info{ border-color: rgba(56,189,248,.35); }
.ts-toast--info .ts-toast__msg{ color: #bae6fd; }

.img-preview-row { margin: 1rem 0; }
.img-preview-row img { max-width: 100%; border-radius: var(--radius-sm); border: 1px solid var(--border); }

.md-preview { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1.25rem; min-height: 80px; }
.ai-result { margin-top: 1rem; padding: 1.15rem; background: var(--bg-soft); border-radius: var(--radius-sm); border: 1px solid var(--border); }
.ai-input-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: .45rem;
    font-size: .85rem;
    color: var(--text-muted);
}
.ai-score-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}
.ai-verdict {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0 0 .35rem;
    letter-spacing: -0.02em;
}
.ai-confidence {
    margin: 0;
    font-size: .85rem;
    color: var(--text-muted);
}
.ai-score-ring {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    border: 4px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--bg-elevated);
}
.ai-score-ring span {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1;
}
.ai-score-ring small {
    font-size: .65rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: .2rem;
}
.ai-score-ring--ai-high { border-color: #ef4444; color: #fca5a5; }
.ai-score-ring--ai { border-color: #f59e0b; color: #fcd34d; }
.ai-score-ring--mixed { border-color: #94a3b8; color: #cbd5e1; }
.ai-score-ring--human { border-color: #22c55e; color: #86efac; }
.ai-score-ring--human-high { border-color: #16a34a; color: #4ade80; }
.ai-dual-bars { display: grid; gap: .75rem; margin-bottom: 1.15rem; }
.ai-dual-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: .8rem;
    margin-bottom: .3rem;
    color: var(--text-muted);
}
.ai-score-bar { height: 8px; background: var(--bg-elevated); border-radius: 999px; overflow: hidden; margin-bottom: .75rem; }
.ai-score-bar--human, .ai-score-bar--ai { margin-bottom: 0; }
.ai-score-fill { height: 100%; width: 0; transition: width .45s ease; }
.ai-score-bar--human .ai-score-fill { background: linear-gradient(90deg, #16a34a, #4ade80); }
.ai-score-bar--ai .ai-score-fill { background: linear-gradient(90deg, #f59e0b, #ef4444); }
.ai-signals-title {
    font-size: .95rem;
    font-weight: 800;
    margin: 0 0 .65rem;
}
.ai-signals {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: .5rem;
}
.ai-signal {
    padding: .75rem .85rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
}
.ai-signal-top {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .25rem;
}
.ai-signal-top strong { font-size: .88rem; }
.ai-signal p {
    margin: 0;
    font-size: .82rem;
    color: var(--text-muted);
    line-height: 1.45;
}
.ai-signal-impact {
    font-size: .75rem;
    font-weight: 700;
    padding: .1rem .45rem;
    border-radius: 999px;
    background: var(--bg-soft);
}
.ai-signal--ai { border-color: rgba(239, 68, 68, .35); }
.ai-signal--ai .ai-signal-impact { color: #fca5a5; background: rgba(239, 68, 68, .12); }
.ai-signal--human { border-color: rgba(34, 197, 94, .35); }
.ai-signal--human .ai-signal-impact { color: #86efac; background: rgba(34, 197, 94, .12); }
.ai-signal--neutral .ai-signal-impact { color: var(--text-muted); }
.ai-result-note { margin-top: 1rem; margin-bottom: 0; }
.grammar-issue { padding: .65rem .85rem; background: rgba(251,191,36,.08); border-radius: 8px; margin-bottom: .35rem; font-size: .88rem; color: var(--warning); border: 1px solid rgba(251,191,36,.2); }

input[type="range"] { width: 100%; accent-color: var(--primary); }
.adsense-slot { margin: 1rem 0; min-height: 90px; }

/* Offline notice — single compact card, top-right on laptop + mobile */
.ts-offline-banner {
    position: fixed;
    top: max(0.85rem, env(safe-area-inset-top, 0px));
    right: max(0.85rem, env(safe-area-inset-right, 0px));
    left: auto;
    z-index: 10050;
    display: none;
    width: min(360px, calc(100vw - 1.5rem));
    pointer-events: none;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}
.ts-offline-banner.is-visible,
.ts-offline-banner:not([hidden]) {
    display: block;
}
.ts-offline-banner[hidden] {
    display: none !important;
}
html.is-offline header.site-header {
    z-index: 200;
}
html.is-offline body {
    scroll-padding-top: 0;
}
.ts-offline-banner__inner {
    max-width: none;
    margin: 0;
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 0.75rem;
    pointer-events: auto;
    padding: 0.85rem 0.95rem;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(251, 191, 36, 0.4);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
}
.ts-offline-banner__copy {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.ts-offline-banner__title {
    font-size: 0.92rem;
    font-weight: 850;
    color: #fde68a;
    letter-spacing: -0.01em;
}
.ts-offline-banner__msg {
    flex: none;
    min-width: 0;
    font-size: 0.82rem;
    line-height: 1.4;
    font-weight: 650;
    color: #cbd5e1;
}
.ts-offline-banner__btn {
    appearance: none;
    flex-shrink: 0;
    align-self: center;
    border: 1px solid rgba(251, 191, 36, 0.45);
    background: rgba(251, 191, 36, 0.14);
    color: #fef3c7;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 0.4rem 0.85rem;
    cursor: pointer;
}
.ts-offline-banner__btn:hover {
    background: rgba(251, 191, 36, 0.24);
    color: #fff;
}
html.is-offline .adsense-slot {
    display: none !important;
    min-height: 0 !important;
    margin: 0 !important;
}
html.is-offline .ts-cursor-dot,
html.is-offline .ts-cursor-ring {
    display: none !important;
}
html.is-offline.ts-custom-cursor,
html.is-offline body.ts-custom-cursor,
body.is-offline.ts-custom-cursor {
    cursor: auto !important;
}
html.is-offline body.ts-custom-cursor:not(.ts-cursor-text),
html.is-offline body.ts-custom-cursor:not(.ts-cursor-text) a,
html.is-offline body.ts-custom-cursor:not(.ts-cursor-text) button,
html.is-offline body.ts-custom-cursor:not(.ts-cursor-text) .btn {
    cursor: auto !important;
}

@media (max-width: 640px) {
    .ts-offline-banner {
        top: max(0.65rem, env(safe-area-inset-top, 0px));
        right: max(0.65rem, env(safe-area-inset-right, 0px));
        left: max(0.65rem, env(safe-area-inset-left, 0px));
        width: auto;
    }
    .ts-offline-banner__inner {
        align-items: center;
    }
    .ts-offline-banner__msg {
        font-size: 0.78rem;
    }
}

/* Pages & blog */
.page-content {
    max-width: 760px;
    margin: 0 auto;
    padding: 3rem 0 4rem;
}

.page-content.container,
.container > .page-content {
    max-width: 760px;
}

.page-content h1 { font-size: 2rem; font-weight: 800; margin-bottom: 1.25rem; letter-spacing: -0.02em; }
.page-content h2 { font-size: 1.2rem; font-weight: 800; margin: 2rem 0 1rem; }
.page-content h2:first-child { margin-top: 0; }
.page-content p, .page-content li { color: var(--text-muted); margin-bottom: 1rem; line-height: 1.75; }
.page-content a { color: var(--primary-light); }
.page-content ul { padding-left: 1.35rem; margin-bottom: 1.25rem; }

.page-info-card {
    padding: 1.15rem 1.25rem;
    margin-bottom: 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-soft);
}

.page-info-card h2 {
    margin-top: 0;
}

.page-info-card-last {
    margin-bottom: 0 !important;
}

.page-form-panel.tool-panel {
    padding: 1.35rem;
    margin: 0.5rem 0 2rem;
}

.blog-grid { display: grid; gap: 1rem; padding: 2rem 0 0; }
.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text);
    transition: all .2s;
}
.blog-card:hover { border-color: var(--primary); box-shadow: var(--shadow-glow); transform: translateY(-2px); }
.blog-card h3 { margin-bottom: .5rem; font-weight: 700; }
.blog-card code { font-size: .78rem; color: var(--accent); font-family: var(--mono); }

.category-nav { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.category-nav h3 { margin-bottom: 1rem; font-size: 1.05rem; font-weight: 800; }

.tag-tier1, .tag-tier2, .tag-tier3 { padding: .15rem .45rem; border-radius: 4px; font-size: .7rem; font-weight: 700; }
.tag-tier3 { background: rgba(52,211,153,.15); color: var(--success); }
.tag-tier2 { background: rgba(251,191,36,.15); color: var(--warning); }
.tag-tier1 { background: rgba(248,113,113,.15); color: var(--error); }

/* ─── Footer ─── */
.site-footer {
    margin-top: auto;
    border-top: 1px solid var(--border);
    background: var(--bg-soft);
    position: relative;
    z-index: 1;
}

.footer-top { padding: 3.5rem 0 2.5rem; }

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1.6fr 0.9fr;
    gap: 2.5rem;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    text-decoration: none;
    color: var(--text);
    font-weight: 800;
    font-size: 1.15rem;
    margin-bottom: .85rem;
}

.footer-logo .logo-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 10px;
    font-size: 1rem;
}

.footer-tagline { color: var(--brand-blue-light); font-weight: 700; font-size: .88rem; margin-bottom: .65rem; letter-spacing: 0.02em; }
.footer-desc { color: var(--text-muted); font-size: .88rem; line-height: 1.65; margin-bottom: 1.25rem; max-width: 300px; }

.footer-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.footer-stats span {
    font-size: .78rem;
    color: var(--text-dim);
    font-weight: 600;
}
.footer-stats strong { color: var(--text); font-size: .95rem; margin-right: .25rem; }

.footer-col h3 {
    font-size: .8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    margin-bottom: 1rem;
}

.footer-subheading { margin-top: 1.5rem; }

/* Company / Streaming / Legal — one stack on desktop, compact grid on phones */
.footer-meta-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.35rem;
    align-items: start;
}
.footer-meta-block h3 {
    margin-bottom: .85rem;
}
.footer-meta-block .footer-links-list {
    gap: .45rem;
}

.footer-links-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .55rem;
}
.footer-links-list a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: .88rem;
    font-weight: 500;
    transition: color .15s;
    line-height: 1.4;
}
.footer-links-list a:hover { color: var(--primary-light); }

.footer-categories-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .55rem 1.25rem;
    align-content: start;
}

.footer-categories-list li {
    min-width: 0;
}

.footer-categories-list a {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.footer-categories-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem 1.75rem;
    align-items: start;
}

.footer-categories-group h3 {
    margin-bottom: 1rem;
}

.footer-categories-group .footer-links-list a {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    max-width: 100%;
}

.footer-cat-icon {
    flex-shrink: 0;
}

.footer-cat-label {
    min-width: 0;
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 1.25rem 0;
    background: rgba(0,0,0,.25);
}

.footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: .75rem;
    /* Keep credit text clear of the fixed chat FAB (bottom-right) */
    padding-right: 4.75rem;
}

.footer-bottom p {
    font-size: .82rem;
    color: var(--text-dim);
    margin: 0;
}

.footer-credit {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .35rem .45rem;
    justify-content: flex-end;
    max-width: min(100%, 28rem);
    position: relative;
    z-index: 2;
}

.footer-credit-label {
    color: var(--text-dim);
}

.footer-credit-link {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: #e2e8f0 !important;
    text-decoration: none !important;
    font-weight: 700;
    border-radius: 999px;
    padding: .15rem .55rem .15rem .15rem;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    transition: background .15s, border-color .15s, color .15s;
}

.footer-credit-link:hover {
    background: rgba(0, 174, 239, .16);
    border-color: rgba(0, 174, 239, .45);
    color: #fff !important;
}

.footer-credit-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    display: block;
    border: 1px solid rgba(255,255,255,.2);
}

.footer-credit-name {
    white-space: nowrap;
}

.footer-credit-sep {
    color: var(--text-dim);
    opacity: .7;
}

.footer-credit-role {
    color: var(--primary-light, #38bdf8);
    font-weight: 600;
    white-space: nowrap;
}

/* ─── Site chatbot ─── */
.ts-chatbot {
    --ts-chat-header-clear: 5.25rem; /* sticky header (~72px) + breathing room */
    --ts-chat-fab-size: 3.55rem;
    --ts-chat-gap: .7rem;
    --ts-chat-edge: max(1.15rem, env(safe-area-inset-bottom, 0px));
    position: fixed;
    top: auto;
    left: auto;
    right: max(1.15rem, env(safe-area-inset-right, 0px));
    bottom: var(--ts-chat-edge);
    z-index: 12000;
    width: max-content;
    max-width: calc(100vw - 1.5rem);
    height: auto;
    max-height: calc(100dvh - var(--ts-chat-header-clear));
    margin: 0;
    padding: 0;
    border: 0;
    font-family: inherit;
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: var(--ts-chat-gap);
    pointer-events: none;
    /* Keep out of body flex flow / document height */
    flex: none;
    align-self: auto;
    overflow: visible;
}

.ts-chatbot > * {
    pointer-events: auto;
}

.ts-chatbot-fab {
    width: var(--ts-chat-fab-size);
    height: var(--ts-chat-fab-size);
    flex: 0 0 auto;
    border: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    background: transparent;
    padding: 0;
    box-shadow: 0 14px 36px rgba(10, 132, 255, .42);
    position: relative;
    transition: transform .2s ease, box-shadow .2s ease;
    overflow: visible;
    z-index: 2;
}

.ts-chatbot-fab:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 18px 40px rgba(10, 132, 255, .5);
}

.ts-chatbot-fab:focus-visible {
    outline: 2px solid #38bdf8;
    outline-offset: 3px;
}

.ts-chatbot-fab-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: relative;
}

.ts-chatbot-fab-photo {
    width: 100%;
    height: 100%;
    border-radius: 999px;
    object-fit: cover;
    object-position: center top;
    display: block;
    border: 2px solid rgba(255,255,255,.55);
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.25);
}

.ts-chatbot-fab-badge {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #0a84ff, #0060df);
    border: 2px solid #0b1220;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,.35);
}

.ts-chatbot-fab-badge--close {
    background: linear-gradient(145deg, #ef4444, #b91c1c);
}

.ts-chatbot-fab-badge svg {
    width: .75rem;
    height: .75rem;
    display: block;
}

.ts-chatbot-fab-icon--close { display: none; }
.ts-chatbot[data-open="true"] .ts-chatbot-fab-icon--chat { display: none; }
.ts-chatbot[data-open="true"] .ts-chatbot-fab-icon--close { display: inline-flex; }

.ts-chatbot-panel {
    position: relative;
    right: 0;
    bottom: auto;
    width: min(380px, calc(100vw - 1.5rem));
    height: min(520px, calc(100dvh - var(--ts-chat-header-clear) - var(--ts-chat-fab-size) - var(--ts-chat-gap) - var(--ts-chat-edge)));
    max-height: calc(100dvh - var(--ts-chat-header-clear) - var(--ts-chat-fab-size) - var(--ts-chat-gap) - var(--ts-chat-edge));
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 24px 60px rgba(0,0,0,.5);
    backdrop-filter: blur(16px);
    z-index: 1;
}

.ts-chatbot-panel[hidden] { display: none !important; }

.ts-chatbot-head {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    gap: .75rem;
    align-items: center;
    padding: .8rem .9rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
    background: rgba(0,0,0,.22);
}

.ts-chatbot-avatar,
.ts-chatbot-avatar--dev {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    object-fit: cover;
    object-position: center top;
    background: #111;
    border: 1px solid rgba(255,255,255,.14);
    box-sizing: border-box;
    display: block;
    position: static;
    padding: 0;
    box-shadow: none;
}

.ts-chatbot-head-text h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: -.01em;
    line-height: 1.2;
}

.ts-chatbot-status {
    margin: .2rem 0 0;
    font-size: .72rem;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    line-height: 1.2;
}

.ts-chatbot-dot {
    width: .45rem;
    height: .45rem;
    border-radius: 999px;
    background: #34d399;
    box-shadow: 0 0 0 3px rgba(52, 211, 153, .18);
    flex: 0 0 auto;
    animation: ts-chat-pulse 1.8s ease-in-out infinite;
}

@keyframes ts-chat-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .55; }
}

.ts-chatbot-close {
    width: 2.15rem;
    height: 2.15rem;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 10px;
    background: rgba(255,255,255,.04);
    color: #e2e8f0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, border-color .15s, color .15s;
}

.ts-chatbot-close:hover {
    background: rgba(248, 113, 113, .16);
    border-color: rgba(248, 113, 113, .45);
    color: #fff;
}

.ts-chatbot-close svg { width: 1rem; height: 1rem; }

.ts-chatbot-messages {
    flex: 1;
    overflow: auto;
    padding: .85rem .8rem;
    display: flex;
    flex-direction: column;
    gap: .65rem;
}

.ts-chat-msg { display: flex; }
.ts-chat-msg--user { justify-content: flex-end; }
.ts-chat-msg--bot { justify-content: flex-start; }

.ts-chat-bubble {
    max-width: 92%;
    padding: .65rem .75rem;
    border-radius: 14px;
    font-size: .84rem;
    line-height: 1.45;
    color: #e2e8f0;
}

.ts-chat-msg--user .ts-chat-bubble {
    background: rgba(10, 132, 255, .28);
    border: 1px solid rgba(10, 132, 255, .35);
    border-bottom-right-radius: 5px;
}

.ts-chat-msg--bot .ts-chat-bubble {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    border-bottom-left-radius: 5px;
}

.ts-chat-bubble a {
    color: #7dd3fc;
    text-decoration: underline;
}

.ts-chat-bubble ul {
    margin: .45rem 0 0;
    padding-left: 1.1rem;
}

.ts-chat-bubble ol {
    margin: .45rem 0 0;
    padding-left: 1.25rem;
}

.ts-chat-bubble li { margin: .2rem 0; }

.ts-chat-typing {
    display: inline-flex;
    align-items: center;
    gap: .28rem;
    min-height: 1.1rem;
    padding: .75rem .9rem !important;
}

.ts-chat-typing span {
    width: .38rem;
    height: .38rem;
    border-radius: 999px;
    background: #94a3b8;
    animation: ts-chat-typing 1.05s ease-in-out infinite;
}

.ts-chat-typing span:nth-child(2) { animation-delay: .15s; }
.ts-chat-typing span:nth-child(3) { animation-delay: .3s; }

@keyframes ts-chat-typing {
    0%, 80%, 100% { transform: translateY(0); opacity: .45; }
    40% { transform: translateY(-3px); opacity: 1; }
}

.ts-chatbot-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    padding: .15rem .75rem .55rem;
    border-top: 1px solid rgba(255,255,255,.06);
    background: rgba(0,0,0,.12);
}

.ts-chatbot-chips[hidden] { display: none !important; }

.ts-chatbot-chips button {
    border: 1px solid rgba(56, 189, 248, .35);
    background: rgba(14, 165, 233, .1);
    color: #e0f2fe;
    border-radius: 999px;
    padding: .32rem .7rem;
    font-size: .72rem;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

.ts-chatbot-chips button:hover {
    border-color: rgba(56, 189, 248, .65);
    background: rgba(14, 165, 233, .22);
}

.ts-chatbot-form {
    padding: .7rem .75rem .85rem;
    border-top: 1px solid rgba(255,255,255,.08);
    background: rgba(0,0,0,.18);
}

.ts-chatbot-composer {
    display: flex;
    align-items: center;
    gap: .35rem;
    width: 100%;
    min-height: 48px;
    padding: .28rem .28rem .28rem .85rem;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 14px;
    background: rgba(2, 6, 23, .72);
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
}

.ts-chatbot-composer:focus-within {
    border-color: rgba(10, 132, 255, .7);
    box-shadow: 0 0 0 3px rgba(10, 132, 255, .16);
}

.ts-chatbot-composer input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: #f8fafc;
    padding: .55rem 0;
    font: inherit;
    font-size: .9rem;
    height: 40px;
}

.ts-chatbot-composer input::placeholder {
    color: #94a3b8;
}

.ts-chatbot-send {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(145deg, #0a84ff, #0060df);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    box-shadow: 0 6px 16px rgba(10, 132, 255, .28);
}

.ts-chatbot-send:hover { filter: brightness(1.08); }
.ts-chatbot-send svg { width: 1.05rem; height: 1.05rem; display: block; }

@media (max-width: 640px) {
    .ts-chatbot {
        right: max(.75rem, env(safe-area-inset-right, 0px));
        left: auto;
        --ts-chat-edge: max(.85rem, env(safe-area-inset-bottom, 0px));
        --ts-chat-header-clear: 4.5rem;
        --ts-chat-fab-size: 3.25rem;
        --ts-chat-gap: .55rem;
        max-width: calc(100vw - 1rem);
    }
    .ts-chatbot-fab {
        box-shadow: 0 10px 28px rgba(10, 132, 255, .4);
    }
    .ts-chatbot-fab-badge {
        width: 1.2rem;
        height: 1.2rem;
    }
    .ts-chatbot-fab-badge svg {
        width: .68rem;
        height: .68rem;
    }
    .ts-chatbot-panel {
        width: calc(100vw - 1rem);
        max-width: calc(100vw - 1rem);
        height: min(72dvh, calc(100dvh - var(--ts-chat-header-clear) - var(--ts-chat-fab-size) - var(--ts-chat-gap) - var(--ts-chat-edge)));
        border-radius: 16px;
    }
    .ts-chatbot-head {
        padding: .7rem .8rem;
        gap: .6rem;
        grid-template-columns: 36px 1fr auto;
    }
    .ts-chatbot-avatar,
    .ts-chatbot-avatar--dev {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }
    .ts-chatbot-head-text h2 { font-size: .95rem; }
    .ts-chatbot-chips {
        padding: .45rem .65rem;
        gap: .4rem;
    }
    .ts-chatbot-chips button {
        font-size: .75rem;
        padding: .35rem .65rem;
    }
    .ts-chatbot-composer {
        min-height: 44px;
    }
    .ts-chatbot-composer input {
        font-size: 16px; /* avoid iOS zoom */
    }
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
    .hero-inner { grid-template-columns: 1fr; }
    .hero-visual {
        min-height: 0;
        margin-top: 1.25rem;
        padding: 1rem;
        overflow: hidden;
    }
    .hero-brand-panel {
        padding: 1.2rem 1.1rem;
        max-width: min(280px, 70vw);
    }
    .hero-glow {
        width: 220px;
        height: 220px;
    }
    /* Orbit pills sit outside the logo on desktop only — hide on stacked layouts */
    .hero-orbits {
        display: none !important;
    }
    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
        padding: 0.65rem 0 0.35rem;
        margin: 0;
    }
    .page-hero-grid { grid-template-columns: 1fr; }
    .page-hero-logo-wrap { order: -1; max-width: min(220px, 55vw); margin-inline: auto; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .footer-brand-col { grid-column: 1 / -1; }
    /* Tablet: keep Company / Streaming / Legal readable beside categories */
    .footer-meta-grid {
        grid-template-columns: 1fr;
        gap: 1.15rem;
    }
    .footer-meta-block h3 { margin-bottom: .7rem; }
    .trust-grid { grid-template-columns: 1fr; }
    .cta-band-inner { flex-direction: column; text-align: center; }

    .nav-toggle { display: inline-flex; margin-left: 0; }
    .site-header .header-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        grid-template-columns: none;
        grid-template-areas: none;
        height: 64px;
        min-height: 64px;
        gap: 0.75rem;
        padding-left: max(1rem, env(safe-area-inset-left, 0px));
        padding-right: max(1rem, env(safe-area-inset-right, 0px));
        position: static;
    }
    .header-utilities {
        margin-left: auto;
        grid-area: auto;
        justify-self: auto;
    }
    .site-header .ts-logo--header,
    .site-header .ts-logo--mark {
        grid-area: auto;
    }
    .site-header .ts-logo--header,
    .site-header .ts-logo--mark {
        height: 42px;
        max-width: min(58vw, 220px);
    }
    .ts-logo__wordmark { font-size: 1.1rem; }
    .ts-logo__icon,
    .ts-logo__icon img {
        width: 40px;
        height: 40px;
    }

    .main-nav {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(88vw, 320px);
        max-width: 320px;
        height: 100dvh;
        height: 100vh;
        overflow: hidden;
        margin: 0;
        padding: max(0.85rem, env(safe-area-inset-top, 0px)) max(1rem, env(safe-area-inset-right, 0px)) max(1.25rem, env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px));
        background: #0b1220;
        border-right: 1px solid var(--border);
        box-shadow: 12px 0 40px rgba(0, 0, 0, 0.45);
        z-index: 1101;
        transform: translate3d(-105%, 0, 0);
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.26s ease, visibility 0.26s ease;
        justify-content: flex-start;
        align-items: stretch;
        gap: 0;
        -webkit-transform: translate3d(-105%, 0, 0);
    }

    .main-nav .main-nav-links {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        touch-action: pan-y;
        padding-top: 0.15rem;
        position: relative;
        z-index: 1;
        pointer-events: auto;
    }

    .main-nav .main-nav-links a {
        position: relative;
        z-index: 2;
        pointer-events: auto;
        color: var(--text);
        text-decoration: none;
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(0, 174, 239, 0.2);
    }

    body.is-rtl .main-nav {
        left: auto;
        right: 0;
        border-right: 0;
        border-left: 1px solid var(--border);
        box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45);
        transform: translate3d(105%, 0, 0);
        padding-left: max(1rem, env(safe-area-inset-right, 0px));
        padding-right: max(1rem, env(safe-area-inset-left, 0px));
    }

    .main-nav.open {
        transform: translate3d(0, 0, 0);
        visibility: visible;
        pointer-events: auto;
    }

    body.is-rtl .main-nav.open {
        transform: translate3d(0, 0, 0);
    }

    .main-nav a:not(.btn-nav-cta) {
        width: 100%;
        min-height: 48px;
        padding: 0.85rem 1rem;
        border-radius: 12px;
        font-size: 0.95rem;
        white-space: normal;
        box-sizing: border-box;
        justify-content: flex-start;
        text-align: start;
    }
    .main-nav .btn-nav-cta {
        margin: 0.55rem 0 0;
        width: 100%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        min-height: 48px;
        border-radius: 12px;
    }
    body.nav-open .main-nav a,
    body.nav-open .nav-toggle {
        touch-action: manipulation;
    }

    body.nav-open .main-nav {
        touch-action: pan-y;
    }
}

@media (max-width: 480px) {
    .site-header .header-inner {
        height: 64px;
        min-height: 64px;
        max-height: 64px;
        gap: 0.5rem;
    }
    .ts-logo__wordmark {
        font-size: 1rem;
    }
    .nav-toggle {
        width: 42px;
        height: 42px;
        min-width: 42px;
    }
    .footer-categories-pair {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .footer-categories-pair {
        grid-template-columns: 1fr 1fr;
        gap: 1rem 1.25rem;
    }
    .tool-layout { grid-template-columns: 1fr; }
    .tool-sidebar { position: static; }
    .footer-top { padding: 2.25rem 0 1.5rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .footer-brand-col .footer-desc { max-width: none; }
    /* Match categories: Company | Streaming, Legal on second row */
    .footer-meta-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.15rem 1.25rem;
    }
    .footer-meta-block h3 {
        margin-bottom: .65rem;
        font-size: .74rem;
    }
    .footer-meta-block .footer-links-list {
        gap: .4rem;
    }
    .footer-meta-block .footer-links-list a {
        font-size: .84rem;
    }
    .footer-meta-block--legal {
        grid-column: 1 / -1;
        padding-top: .15rem;
        border-top: 1px solid rgba(255, 255, 255, .06);
    }
    .footer-meta-block--legal .footer-links-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: .4rem 1.25rem;
    }
    .footer-bottom-inner {
        flex-direction: column;
        text-align: center;
        padding-right: 0;
        padding-bottom: 4.75rem; /* clear chat FAB when credit stacks above it */
        gap: .65rem;
    }
    .footer-credit {
        justify-content: center;
        max-width: 100%;
    }
    .hero-stats { gap: .5rem; }
    .stat-card { flex: 1 1 calc(50% - .25rem); min-width: 0; max-width: 100%; box-sizing: border-box; }
    .hero-home { padding: 2.75rem 0 1.35rem; overflow-x: clip; }
    .hero-visual {
        min-height: 0;
        margin-top: 0.85rem;
    }
    .hero-brand-panel {
        max-width: min(240px, 72vw);
        padding: 1rem 0.9rem;
        border-radius: 20px;
    }
    .hero-brand-tagline {
        font-size: 0.68rem;
        margin-top: 0.7rem;
        max-width: 200px;
    }
    .hero-glow {
        width: 170px;
        height: 170px;
    }
    .tools-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 0.5rem 0 0.35rem;
        margin: 0;
        gap: 0.75rem;
    }
    .tools-grid--dense {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }
    .tools-grid--dense .tool-card,
    .tools-grid--dense .tool-card-lg,
    .tools-index .tool-card,
    .tools-index .tool-card-lg {
        min-height: 0;
        padding: 1rem;
    }
    .tools-grid--dense .tool-card-desc,
    .tools-index .tool-card-desc {
        -webkit-line-clamp: 2;
        font-size: 0.8rem;
        margin-bottom: 0.65rem;
    }
    .tools-grid--dense .tool-card-cta,
    .tools-index .tool-card-cta {
        margin-top: auto;
        font-size: 0.78rem;
    }
    .tools-index .section-header {
        align-items: flex-start;
        margin-bottom: 0.95rem;
    }
    .tools-index .section-header h2 {
        font-size: 1.2rem;
    }
    .tools-index .section-icon {
        width: 40px;
        height: 40px;
        font-size: 1.15rem;
        border-radius: 12px;
    }
    .tools-index .tools-section {
        padding: 2.25rem 0;
    }
    .tools-jump {
        padding-top: 1rem;
    }
    .tools-jump-stick {
        top: var(--tools-header-offset, 60px);
        padding: 0.55rem 0 0.65rem;
    }
    .tools-search--bar {
        flex-direction: column;
        align-items: stretch;
        max-width: none;
    }
    .tools-search-field {
        flex: 1 1 auto;
        width: 100%;
    }
    .tools-search-actions {
        width: 100%;
    }
    .tools-search-actions .btn {
        flex: 1 1 auto;
        justify-content: center;
    }
    .tools-index-logo {
        display: none;
    }
    .category-pills {
        gap: 0.4rem;
    }
    .category-pill {
        font-size: 0.82rem;
        padding: 0.45rem 0.75rem;
    }
}

/* ─── Custom cursor (desktop, fine pointer) ─── */
.ts-cursor-dot,
.ts-cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 99999;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease, width 0.2s ease, height 0.2s ease, margin 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
    will-change: left, top, transform, opacity;
}

.ts-cursor-dot.is-visible,
.ts-cursor-ring.is-visible {
    opacity: 1;
}

.ts-cursor-dot {
    width: 8px;
    height: 8px;
    margin: -4px 0 0 -4px;
    background: var(--brand-blue);
    box-shadow: 0 0 12px rgba(0, 174, 239, 0.85), 0 0 24px rgba(0, 174, 239, 0.35);
}

.ts-cursor-ring {
    width: 38px;
    height: 38px;
    margin: -19px 0 0 -19px;
    border: 1.5px solid rgba(0, 174, 239, 0.45);
    background: rgba(0, 174, 239, 0.04);
}

.ts-custom-cursor:not(.ts-cursor-text) {
    cursor: none;
}

.ts-custom-cursor:not(.ts-cursor-text) a,
.ts-custom-cursor:not(.ts-cursor-text) button,
.ts-custom-cursor:not(.ts-cursor-text) .btn,
.ts-custom-cursor:not(.ts-cursor-text) label,
.ts-custom-cursor:not(.ts-cursor-text) summary,
.ts-custom-cursor:not(.ts-cursor-text) select,
.ts-custom-cursor:not(.ts-cursor-text) .tool-card,
.ts-custom-cursor:not(.ts-cursor-text) .category-pill,
.ts-custom-cursor:not(.ts-cursor-text) .upload-zone,
.ts-custom-cursor:not(.ts-cursor-text) .drop-zone,
.ts-custom-cursor:not(.ts-cursor-text) .ts-logo,
.ts-custom-cursor:not(.ts-cursor-text) .nav-toggle,
.ts-custom-cursor:not(.ts-cursor-text) [role="button"] {
    cursor: none;
}

.ts-custom-cursor.ts-cursor-hover .ts-cursor-ring {
    width: 54px;
    height: 54px;
    margin: -27px 0 0 -27px;
    border-color: var(--brand-blue-light);
    background: rgba(0, 174, 239, 0.12);
    box-shadow: 0 0 20px rgba(0, 174, 239, 0.25);
}

.ts-custom-cursor.ts-cursor-hover .ts-cursor-dot {
    transform: scale(1.35);
    background: var(--brand-blue-light);
}

.ts-custom-cursor.ts-cursor-active .ts-cursor-dot {
    transform: scale(0.75);
}

.ts-custom-cursor.ts-cursor-active .ts-cursor-ring {
    width: 32px;
    height: 32px;
    margin: -16px 0 0 -16px;
    border-color: var(--brand-blue);
    background: rgba(0, 174, 239, 0.2);
}

.ts-custom-cursor.ts-cursor-text .ts-cursor-dot,
.ts-custom-cursor.ts-cursor-text .ts-cursor-ring {
    opacity: 0 !important;
}

.diff-result {
    margin-top: 1rem;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 0.85rem;
    max-height: 400px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
}

.diff-line { padding: 0.25rem 0.75rem; border-bottom: 1px solid rgba(255,255,255,0.04); }
.diff-same { color: var(--text-muted); }
.diff-add { background: rgba(34, 197, 94, 0.12); color: #86efac; }
.diff-remove { background: rgba(239, 68, 68, 0.12); color: #fca5a5; }

.diff-stats { margin-top: 0.75rem; font-size: 0.9rem; color: var(--text-muted); }
.diff-stat-add { color: #86efac; }
.diff-stat-remove { color: #fca5a5; }

.regex-matches, .regex-highlight {
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.85rem;
    max-height: 200px;
    overflow: auto;
}

.regex-highlight mark {
    background: rgba(99, 102, 241, 0.35);
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
}

.regex-match-item { padding: 0.25rem 0; }

.crop-workspace { margin: 1rem 0; }
.crop-canvas-wrap {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: repeating-conic-gradient(#334155 0% 25%, #1e293b 0% 50%) 50% / 16px 16px;
}

#cropCanvas { display: block; max-width: 100%; cursor: crosshair; }

.meme-output-wrap {
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--bg-card);
    padding: 0.75rem;
    text-align: center;
    line-height: 0;
}

.meme-output-wrap[hidden] {
    display: none !important;
}

.meme-canvas {
    display: block;
    max-width: 100%;
    max-height: min(420px, 55vh);
    width: auto;
    height: auto;
    margin: 0 auto;
    border-radius: var(--radius-sm);
}

.cron-human {
    margin: 0.75rem 0;
    padding: 0.75rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius);
    font-family: var(--font-mono, monospace);
    font-size: 0.9rem;
}

.ts-result, .ts-result p { margin: 0.5rem 0; }

.checkbox-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.checkbox-row label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9rem;
}

.tool-note--inline {
    margin: 0.5rem 0 0;
    font-size: 0.85rem;
}

.text-muted { color: var(--text-muted); font-size: 0.85rem; }

/* ─── Downloader tools — input + Paste/Fetch/Clear one row ─── */
.igd-url-row .btn,
.fbd-url-row .btn,
.xdl-url-row .btn,
.rdd-url-row .btn,
.pnd-url-row .btn,
.scd-url-row .btn,
.tbd-url-row .btn,
.ytdl-url-row .btn,
.ttd-url-row .ttd-action-btn,
.ldl-url-row .btn,
.thdl-url-row .btn,
.vmdl-url-row .btn,
.twdl-url-row .btn,
.lkdl-url-row .btn,
.scdl-url-row .btn,
.dmdl-url-row .btn,
.tbdl-url-row .btn,
.bsdl-url-row .btn,
.rmdl-url-row .btn,
.pd-url-row .btn {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 640px) {
    /* Input full width; action buttons equal columns underneath */
    .igd-url-row,
    .fbd-url-row,
    .xdl-url-row,
    .rdd-url-row,
    .pnd-url-row,
    .scd-url-row,
    .ttd-url-row,
    .tbd-url-row,
    .ldl-url-row,
    .thdl-url-row,
    .vmdl-url-row,
    .twdl-url-row,
    .lkdl-url-row,
    .scdl-url-row,
    .dmdl-url-row,
    .tbdl-url-row,
    .bsdl-url-row,
    .rmdl-url-row,
    .pd-url-row {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 0.55rem !important;
        align-items: stretch;
    }

    .ytdl-url-row {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 0.55rem !important;
    }

    .ttd-url-field,
    .igd-url-row > input,
    .igd-url-row > .input-full,
    .fbd-url-row > input,
    .fbd-url-row > .input-full,
    .xdl-url-row > input,
    .xdl-url-row > .input-full,
    .rdd-url-row > input,
    .rdd-url-row > .input-full,
    .pnd-url-row > input,
    .pnd-url-row > .input-full,
    .scd-url-row > input,
    .scd-url-row > .input-full,
    .ldl-url-row > input,
    .ldl-url-row > .input-full,
    .thdl-url-row > input,
    .thdl-url-row > .input-full,
    .vmdl-url-row > input,
    .vmdl-url-row > .input-full,
    .twdl-url-row > input,
    .twdl-url-row > .input-full,
    .lkdl-url-row > input,
    .lkdl-url-row > .input-full,
    .scdl-url-row > input,
    .scdl-url-row > .input-full,
    .dmdl-url-row > input,
    .dmdl-url-row > .input-full,
    .tbdl-url-row > input,
    .tbdl-url-row > .input-full,
    .bsdl-url-row > input,
    .bsdl-url-row > .input-full,
    .rmdl-url-row > input,
    .rmdl-url-row > .input-full,
    .tbd-url-row > input,
    .tbd-url-row > .input-full,
    .tbd-url-row > textarea,
    .pd-url-row > input,
    .pd-url-row > .input-full,
    .ytdl-url-row > .ytdl-input {
        grid-column: 1 / -1 !important;
        width: 100%;
        min-width: 0;
    }

    .igd-url-row .btn,
    .fbd-url-row .btn,
    .xdl-url-row .btn,
    .rdd-url-row .btn,
    .pnd-url-row .btn,
    .scd-url-row .btn,
    .tbd-url-row .btn,
    .ytdl-url-row .btn,
    .ttd-url-row .ttd-action-btn,
    .ldl-url-row .btn,
    .thdl-url-row .btn,
    .vmdl-url-row .btn,
    .twdl-url-row .btn,
    .lkdl-url-row .btn,
    .scdl-url-row .btn,
    .dmdl-url-row .btn,
    .tbdl-url-row .btn,
    .bsdl-url-row .btn,
    .rmdl-url-row .btn,
    .pd-url-row .btn {
        width: 100%;
        min-width: 0;
        min-height: 48px;
        justify-content: center;
        text-align: center;
        white-space: normal;
        line-height: 1.25;
        padding-left: 0.4rem;
        padding-right: 0.4rem;
    }

    /* Hero badge + copy stack on phones */
    .igd-hero,
    .fbd-hero,
    .xdl-hero,
    .rdd-hero,
    .pnd-hero,
    .scd-hero,
    .tbd-hero,
    .ldl-hero,
    .thdl-hero,
    .vmdl-hero,
    .twdl-hero,
    .lkdl-hero,
    .scdl-hero,
    .dmdl-hero,
    .tbdl-hero,
    .bsdl-hero,
    .rmdl-hero,
    .ytdl-hero {
        flex-direction: column;
        align-items: stretch;
        gap: 0.85rem;
    }

    .igd-badge,
    .fbd-badge,
    .xdl-badge,
    .rdd-badge,
    .pnd-badge,
    .scd-badge,
    .tbd-badge,
    .ldl-badge,
    .thdl-badge,
    .vmdl-badge,
    .twdl-badge,
    .lkdl-badge,
    .scdl-badge,
    .dmdl-badge,
    .tbdl-badge,
    .bsdl-badge,
    .rmdl-badge {
        align-self: flex-start;
    }
}

/* ─── Responsive — all pages & tools (mobile / tablet) ─── */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    overflow-x: clip;
}

body {
    overflow-x: clip;
    max-width: 100%;
}

img, video, canvas, svg {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    max-width: 1180px;
}

.page-content,
.tool-page,
.blog-page,
.about-page {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 1024px) {
    .tool-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .tool-sidebar {
        position: static;
        order: 2;
    }

    .tool-main {
        min-width: 0;
    }

    .page-hero h1 {
        font-size: 1.85rem;
    }

    .hero-title {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }

    .tools-jump-stick {
        top: var(--tools-header-offset, 64px);
    }

    .tools-index-hero {
        padding: 1.75rem 0 1.35rem;
    }

    .tools-index-hero h1 {
        font-size: clamp(1.55rem, 5vw, 2rem);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .site-header .header-inner {
        height: 64px;
        max-height: 64px;
        gap: 0.75rem;
    }

    .site-header .ts-logo--header,
    .site-header .ts-logo--mark {
        height: 42px;
        max-width: min(52vw, 220px);
    }

    .site-header .ts-logo__wordmark {
        font-size: 1.05rem;
    }

    .site-header .ts-logo__icon,
    .site-header .ts-logo__icon img {
        width: 40px;
        height: 40px;
    }

    .tool-page {
        padding: 1.25rem 0 2rem;
    }

    .tool-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .tool-page-header h1 {
        font-size: clamp(1.35rem, 5.5vw, 1.65rem);
        line-height: 1.25;
    }

    .tool-page-url {
        font-size: 0.68rem;
        word-break: break-all;
        line-height: 1.4;
    }

    .tool-intro {
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }

    .tool-widget {
        padding: 1rem;
        margin-bottom: 1.25rem;
    }

    .tool-run-progress {
        top: 64px;
        padding: 0.85rem;
    }

    .tool-run-progress-copy strong {
        white-space: normal;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .form-row--2,
    .form-row--3 {
        grid-template-columns: 1fr !important;
    }

    .input-full,
    .tool-panel select,
    .tool-panel textarea,
    .tool-panel input[type="text"],
    .tool-panel input[type="email"],
    .tool-panel input[type="number"],
    .tool-panel input[type="url"],
    .tool-panel input[type="password"],
    .tool-panel input[type="search"] {
        width: 100%;
        max-width: 100%;
        min-height: 44px;
        font-size: 16px;
    }

    .tool-panel textarea {
        min-height: 120px;
    }

    .tool-panel-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .tool-panel-actions .btn,
    .tool-panel-actions .btn-primary,
    .tool-panel > .btn-primary,
    .tool-panel > .btn {
        width: 100%;
        min-height: 44px;
        justify-content: center;
    }

    .tool-panel-actions .btn-primary {
        min-width: 0;
    }

    .upload-zone,
    .drop-zone,
    .itp-drop {
        min-height: 140px;
        padding: 1.25rem 1rem;
    }

    .copy-row {
        flex-direction: column;
        align-items: stretch;
    }

    .copy-row input {
        width: 100%;
    }

    .color-picker-layout {
        flex-direction: column;
    }

    .color-wheel-input {
        width: 100%;
        max-width: 160px;
        height: auto;
        aspect-ratio: 1;
    }

    .favicon-previews {
        justify-content: center;
        gap: 1rem;
        padding: 1rem;
    }

    .word-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .breadcrumb {
        font-size: 0.75rem;
        line-height: 1.5;
    }

    .content-section h2 {
        font-size: 1.1rem;
    }

    .content-section p,
    .steps-list li,
    .features-list li {
        font-size: 0.92rem;
    }

    .faq-item summary {
        padding: 0.85rem 1rem;
        font-size: 0.9rem;
    }

    .tool-card-lg {
        padding: 1rem;
    }

    .hero-inner {
        padding: 2rem 0 1.5rem;
    }

    .hero-sub {
        font-size: 0.95rem;
    }

    .stat-card {
        flex: 1 1 calc(50% - 0.35rem);
        min-width: 0;
        max-width: 100%;
        padding: 0.85rem;
        box-sizing: border-box;
    }

    .ts-toast-wrap {
        top: max(0.65rem, env(safe-area-inset-top, 0px));
        right: max(0.65rem, env(safe-area-inset-right, 0px));
        left: max(0.65rem, env(safe-area-inset-left, 0px));
        bottom: auto;
        width: auto;
    }

    .ts-toast {
        width: 100%;
        max-width: none;
    }

    .ts-copy-toast {
        left: 1rem;
        right: 1rem;
        transform: none;
        width: auto;
        text-align: center;
        border-radius: var(--radius-sm);
    }

    .ts-copy-toast.is-visible {
        transform: none;
    }

    .page-hero {
        padding: 2rem 0 1rem;
    }

    .page-hero-compact {
        padding: 1.5rem 0 1rem;
    }

    .page-hero-compact h1 {
        font-size: 1.65rem;
    }

    .page-body {
        padding-bottom: 3rem;
    }

    .page-body .page-content {
        padding-top: 1.5rem;
    }

    .related-tools-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .igd-note,
    .fbd-note,
    .xdl-note,
    .rdd-note,
    .pnd-note,
    .scd-note,
    .tbd-note,
    .ytdl-note,
    .ttd-note,
    .ldl-note,
    .thdl-note,
    .vmdl-note,
    .twdl-note,
    .lkdl-note,
    .scdl-note,
    .dmdl-note,
    .tbdl-note,
    .bsdl-note,
    .rmdl-note,
    .pd-note,
    [class$="-note"] {
        min-width: 0 !important;
        flex: 1 1 100%;
    }

    .pd-fetch {
        min-width: 0;
        width: 100%;
    }

    .tool-panel > .btn,
    .tool-panel > .btn-primary,
    .tool-panel-actions .btn,
    .tool-panel-actions .btn-primary {
        width: 100%;
        min-width: 0;
    }

    /* Generic tool action rows — full width on phones */
    .tool-panel-actions,
    .copy-row,
    [class$="-actions"]:not([class*="inline"]):not([class*="meta"]) {
        width: 100%;
    }

    .copy-row {
        flex-wrap: wrap;
    }

    .copy-row .btn,
    .copy-row button {
        width: 100%;
        min-height: 44px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.85rem;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .tools-grid--dense {
        grid-template-columns: 1fr;
        gap: 0.7rem;
    }

    .tools-index .tool-card-top .tool-list-icon,
    .tools-index .tool-card-top svg {
        width: 34px;
        height: 34px;
    }

    .page-hero-logo-wrap {
        display: none;
    }

    .tool-page-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }

    .tool-widget {
        padding: 0.85rem;
        border-radius: var(--radius-sm);
    }

    .checkbox-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.65rem;
    }

    .pw-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }

    .pw-item::after {
        align-self: flex-end;
    }

    .word-stats {
        grid-template-columns: 1fr;
    }

    .category-pill {
        font-size: 0.8rem;
        padding: 0.55rem 0.9rem;
    }

    .footer-grid {
        gap: 1.5rem;
    }
}

@media (pointer: coarse), (prefers-reduced-motion: reduce) {
    .ts-cursor-dot,
    .ts-cursor-ring {
        display: none !important;
    }

    .hero-orbit-icon,
    .hero-glow,
    .pulse-dot {
        animation: none !important;
    }
}

/* —— Error pages (404 / 403 / 419 / 500 / 503) —— */
.error-page {
    position: relative;
    min-height: min(68vh, 640px);
    display: grid;
    place-items: center;
    padding: 3.5rem 0 4rem;
    overflow: hidden;
}

.error-page::before {
    content: '';
    position: absolute;
    inset: 10% 50% auto 50%;
    width: min(520px, 90vw);
    height: min(520px, 90vw);
    transform: translate(-50%, -20%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 174, 239, 0.22) 0%, rgba(14, 165, 233, 0.08) 42%, transparent 70%);
    pointer-events: none;
}

.error-page-inner {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 36rem;
}

.error-code {
    margin: 0 0 .35rem;
    font-family: var(--mono, ui-monospace, monospace);
    font-size: clamp(3.5rem, 12vw, 6.5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    background: linear-gradient(135deg, var(--brand-blue-light) 0%, var(--brand-blue) 55%, #7dd3fc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: error-code-fade 0.7s ease both;
}

.error-page h1 {
    margin: 0 0 .75rem;
    font-size: clamp(1.55rem, 4vw, 2.15rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #f1f5f9;
    animation: error-rise 0.55s ease 0.08s both;
}

.error-message {
    margin: 0 auto 1.75rem;
    max-width: 32rem;
    color: var(--muted, #94a3b8);
    font-size: 1.05rem;
    line-height: 1.55;
    animation: error-rise 0.55s ease 0.16s both;
}

.error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
    justify-content: center;
    margin-bottom: 1.75rem;
    animation: error-rise 0.55s ease 0.24s both;
}

.error-links {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem 1.15rem;
    justify-content: center;
    animation: error-rise 0.55s ease 0.32s both;
}

.error-links a {
    color: #94a3b8;
    text-decoration: none;
    font-size: .9rem;
    font-weight: 600;
}

.error-links a:hover {
    color: var(--brand-blue-light);
}

@keyframes error-code-fade {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes error-rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .error-code,
    .error-page h1,
    .error-message,
    .error-actions,
    .error-links {
        animation: none;
    }
}

/* Wave tools — result / meter / timer UI */
.wave-result {
    margin-top: 1rem;
    padding: .9rem 1rem;
    border-radius: 10px;
    background: color-mix(in srgb, var(--brand-blue, #00aeef) 10%, #fff);
    border: 1px solid color-mix(in srgb, var(--brand-blue, #00aeef) 22%, transparent);
    line-height: 1.55;
}
.wave-meter {
    height: 10px;
    margin: .65rem 0 .35rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.22);
    overflow: hidden;
}
.wave-meter-bar {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: #38bdf8;
    transition: width .2s ease, background .2s ease;
}
.wave-tips {
    margin: .5rem 0 0;
    padding-left: 1.1rem;
    color: var(--c-muted, #94a3b8);
    font-size: .9rem;
}
.wave-timer-display {
    font-size: clamp(2.4rem, 6vw, 3.4rem);
    font-weight: 700;
    letter-spacing: .06em;
    font-variant-numeric: tabular-nums;
    text-align: center;
    margin: .75rem 0 1rem;
    color: var(--c-text, #e2e8f0);
}
.wave-tool-extra .word-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
    gap: .65rem;
    margin-top: .85rem;
}
.wave-tool-extra .word-stat {
    text-align: center;
    padding: .7rem .5rem;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.wave-tool-extra .word-stat strong {
    display: block;
    font-size: 1.25rem;
}
.wave-tool-extra .word-stat span {
    font-size: .75rem;
    color: #64748b;
}
.btn.is-active,
.wave-tool .btn.is-active {
    background: var(--brand-blue, #00aeef);
    color: #fff;
    border-color: transparent;
}

/* Wave redesign — layout helpers (dark-theme compatible) */
.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .85rem;
}
@media (max-width: 640px) {
    .form-row-2 { grid-template-columns: 1fr; }
}
.tool-inline-check {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .9rem;
    color: var(--text-muted, #64748b);
    margin: .35rem 0 .5rem;
}
.wave-calc-grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 1rem;
}
@media (max-width: 860px) {
    .wave-calc-grid { grid-template-columns: 1fr; }
}
.wave-calc-result {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--c-text, #e2e8f0);
    min-height: 3rem;
}
.wave-calc-line {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .55rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, .14);
}
.wave-calc-line:last-child { border-bottom: 0; }
.wave-calc-line span { color: var(--c-muted, #94a3b8); }
.wave-calc-line strong { font-size: 1.15rem; color: var(--c-text, #e2e8f0); }
.design-tool-layout {
    display: grid;
    grid-template-columns: minmax(220px, 320px) 1fr;
    gap: 1.25rem;
    align-items: start;
}
@media (max-width: 800px) {
    .design-tool-layout { grid-template-columns: 1fr; }
}
.design-tool-preview {
    min-height: 160px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, .2);
    background: rgba(15, 23, 42, .35);
}
.palette-preview {
    display: flex;
    overflow: hidden;
    min-height: 120px;
}
.palette-swatch { flex: 1; min-height: 120px; }
.media-preview {
    display: block;
    width: 100%;
    max-height: 280px;
    margin: .75rem 0;
    border-radius: 12px;
    background: #0b1220;
}
.media-tool .tool-panel-actions,
.pdf-tool .tool-panel-actions,
.text-tool .btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    align-items: center;
    margin: .85rem 0;
}
.word-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
    gap: .65rem;
    margin: .85rem 0 1rem;
}
.word-stat {
    text-align: center;
    padding: .7rem .5rem;
    border-radius: 10px;
    background: rgba(15, 23, 42, .45);
    border: 1px solid rgba(148, 163, 184, .16);
}
.word-stat strong {
    display: block;
    font-size: 1.25rem;
    color: var(--text, #e2e8f0);
}
.word-stat span {
    font-size: .75rem;
    color: var(--text-muted, #94a3b8);
}
[data-theme="light"] .word-stat,
html:not([data-theme="dark"]) .tool-panel .word-stat {
    background: #f8fafc;
    border-color: #e2e8f0;
}
[data-theme="light"] .word-stat strong,
html:not([data-theme="dark"]) .tool-panel .word-stat strong {
    color: #0f172a;
}
.wave-timer-display {
    color: var(--c-text, #e2e8f0);
}
.wave-meter {
    background: rgba(148, 163, 184, .2);
}
.wave-tips {
    color: var(--c-muted, #94a3b8);
}
.tool-note {
    margin-top: 1rem;
    font-size: .88rem;
    color: var(--text-muted, #64748b);
    line-height: 1.5;
}
a.btn[hidden] { display: none !important; }

/* —— Language switcher —— */
.lang-switcher {
    position: relative;
    z-index: 40;
    flex-shrink: 0;
}
.lang-switcher-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .4rem .65rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 174, 239, 0.28);
    background: rgba(15, 23, 42, 0.78);
    color: #e2e8f0;
    font: inherit;
    font-size: .72rem;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
}
.lang-switcher-btn:hover,
.lang-switcher.is-open .lang-switcher-btn {
    border-color: rgba(0, 174, 239, 0.55);
    color: #fff;
}
.lang-switcher-code {
    color: var(--brand-blue-light, #4dc4f5);
    letter-spacing: 0.04em;
}
.lang-switcher-name {
    max-width: 7.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lang-switcher-caret { opacity: .7; font-size: .65rem; }
.lang-switcher-menu {
    position: absolute;
    top: calc(100% + .45rem);
    right: 0;
    min-width: 220px;
    max-height: min(70vh, 420px);
    overflow: auto;
    margin: 0;
    padding: .4rem;
    list-style: none;
    border-radius: 14px;
    border: 1px solid rgba(0, 174, 239, 0.22);
    background: rgba(11, 18, 32, 0.97);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
}
.lang-switcher-option {
    display: grid;
    grid-template-columns: 2.2rem 1fr;
    grid-template-rows: auto auto;
    column-gap: .55rem;
    align-items: center;
    padding: .55rem .6rem;
    border-radius: 10px;
    text-decoration: none;
    color: #e2e8f0;
}
.lang-switcher-option:hover,
.lang-switcher-option.is-active {
    background: rgba(0, 174, 239, 0.14);
}
.lang-switcher-option-code {
    grid-row: 1 / span 2;
    font-size: .68rem;
    font-weight: 800;
    color: var(--brand-blue-light, #4dc4f5);
}
.lang-switcher-option-native {
    font-size: .82rem;
    font-weight: 700;
}
.lang-switcher-option-en {
    font-size: .68rem;
    color: #94a3b8;
}
body.is-rtl .lang-switcher-menu { right: auto; left: 0; }
body.is-rtl .lang-switcher-option {
    grid-template-columns: 1fr 2.2rem;
}
body.is-rtl .lang-switcher-option-code { grid-column: 2; }

body.is-rtl .header-utilities { margin-left: 0; margin-right: auto; }
body.is-rtl .site-header .header-inner {
    direction: rtl;
}
body.is-rtl .main-nav {
    justify-content: center;
}
body.is-rtl .main-nav .btn-nav-cta {
    margin-left: 0;
    margin-right: 0.15rem;
}
body.is-rtl .lang-switcher-btn { direction: rtl; }

body.is-rtl .ts-chatbot {
    right: auto;
    left: max(1.15rem, env(safe-area-inset-left, 0px));
    align-items: flex-start;
}
body.is-rtl .ts-chatbot-panel { direction: rtl; text-align: right; }
body.is-rtl .ts-chat-msg--user { justify-content: flex-start; }
body.is-rtl .ts-chat-msg--bot { justify-content: flex-end; }
body.is-rtl .ts-chatbot-chips { direction: rtl; }

@media (max-width: 1320px) and (min-width: 981px) {
    .lang-switcher-name {
        max-width: 4.75rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .lang-switcher-btn {
        max-width: 7.5rem;
        padding-inline: .55rem;
    }
}

@media (max-width: 980px) {
    .lang-switcher-name { display: none; }
    .site-header .header-inner { gap: .55rem; }
}

/* Homepage discovery: search, social downloaders, popular */
.home-hero-search {
    margin: 0 0 1.15rem;
    max-width: 36rem;
}
.home-popular {
    padding: 2.25rem 0 2.5rem;
    border-bottom: 1px solid var(--border);
}
.home-social-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: .55rem;
}
.home-social-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    min-height: 44px;
    padding: .55rem .8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text);
    text-decoration: none;
    font-size: .88rem;
    font-weight: 700;
}
.home-social-link:hover {
    border-color: var(--primary);
    color: var(--primary-light);
}
.home-social-link em {
    font-style: normal;
    font-size: .7rem;
    font-weight: 800;
    color: var(--brand-blue-light);
    text-transform: uppercase;
    letter-spacing: .04em;
}
.tools-section + .tools-section,
.home-popular,
.home-faq,
.cta-band {
    content-visibility: auto;
    contain-intrinsic-size: 1px 720px;
}
.tool-suggest {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + .4rem);
    z-index: 30;
    display: grid;
    gap: .15rem;
    padding: .4rem;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.4);
    max-height: min(22rem, 70vh);
    overflow: auto;
}
.tool-suggest[hidden] { display: none; }
.tool-suggest-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .1rem;
    width: 100%;
    padding: .55rem .7rem;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    font: inherit;
}
.tool-suggest-item:hover,
.tool-suggest-item.is-active {
    background: rgba(0, 174, 239, 0.14);
}
.tool-suggest-item strong {
    font-size: .9rem;
    font-weight: 700;
}
.tool-suggest-item small {
    font-size: .75rem;
    color: var(--text-muted);
}
.tool-suggest-empty {
    margin: 0;
    padding: .55rem .7rem;
    color: var(--text-muted);
    font-size: .85rem;
}
.related-tools-lead {
    color: var(--text-muted);
    margin: -.35rem 0 1rem;
    line-height: 1.6;
}
.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: .65rem;
}
.related-tool-card {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .75rem .85rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text);
    min-height: 64px;
}
.related-tool-card:hover {
    border-color: var(--primary);
    background: rgba(0, 174, 239, 0.06);
}
.related-tool-card strong {
    display: block;
    font-size: .88rem;
    line-height: 1.3;
}
.related-tool-card small {
    display: block;
    margin-top: .15rem;
    color: var(--text-muted);
    font-size: .75rem;
}
.related-tools-more {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
    margin: 1.15rem 0 0;
}
.related-tools-more a,
.related-tools-cta,
.section-header .related-tools-cta,
.category-bar-head .related-tools-cta,
.section-header-link {
    flex: 0 0 auto;
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.2;
    letter-spacing: 0.01em;
    min-height: 42px;
    padding: .55rem 1.05rem;
    border-radius: 999px;
    box-sizing: border-box;
}
.related-tools-more a.btn-outline,
.related-tools-cta.btn-outline {
    border: 1px solid var(--border-strong);
    background: rgba(255,255,255,.05);
    color: var(--text);
}
.related-tools-more a.btn-primary,
.related-tools-cta.btn-primary {
    color: #fff;
}
@media (max-width: 640px) {
    .related-tools-more,
    .section-header,
    .category-bar-head {
        align-items: stretch;
    }
    .related-tools-more a,
    .related-tools-cta,
    .section-header-link {
        width: 100%;
        justify-content: center;
        white-space: nowrap;
    }
}


