/* ToolSphere — 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; }

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 ─── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(6, 10, 18, 0.88);
    backdrop-filter: blur(20px) saturate(1.5);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 0 rgba(0, 174, 239, 0.06);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    height: 72px;
}

.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; }

/* ToolSphere 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: .92; transform: translateY(-1px); }

.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.65rem;
    flex-shrink: 0;
    height: 48px;
    max-width: none;
}

.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: 48px;
    height: 48px;
    object-fit: contain;
    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; }
.cta-logo { opacity: .95; }
.cta-logo.ts-logo--header,
.cta-logo.ts-logo--mark {
    height: auto;
    gap: 0.5rem;
}
.cta-logo .ts-logo__icon { width: 40px; height: 40px; }
.cta-logo .ts-logo__icon img { width: 40px; height: 40px; filter: drop-shadow(0 4px 16px rgba(0, 174, 239, 0.4)); }
.cta-logo .ts-logo__wordmark { font-size: 1.15rem; }
.cta-logo .ts-logo__sphere { color: #f0f9ff; }

/* 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;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: .35rem;
    margin-left: auto;
}

.main-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: .9rem;
    padding: .5rem .85rem;
    border-radius: 999px;
    transition: color .2s, background .2s, transform .15s;
    cursor: pointer;
}

.main-nav a:hover { color: var(--text); background: rgba(0, 174, 239, 0.08); }
.main-nav a.active { color: var(--brand-blue-light); background: rgba(0, 174, 239, 0.14); border: 1px solid rgba(0, 174, 239, 0.2); }

.btn-header-cta { margin-left: .5rem; }
.nav-toggle {
    display: none;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 1.25rem;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    cursor: pointer;
    margin-left: auto;
}

/* ─── 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: .45rem .9rem; font-size: .82rem; }
.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; }
.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: .72rem; color: var(--text-dim); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }

.hero-visual {
    position: relative;
    min-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-glow {
    position: absolute;
    width: 280px;
    height: 280px;
    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;
}
@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.5rem;
    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: 260px;
    line-height: 1.5;
}
.hero-orbit {
    position: absolute;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: .35rem;
    padding: .5rem .85rem;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    color: var(--text-muted);
    box-shadow: var(--shadow);
    animation: orbit-float 5s ease-in-out infinite;
}
.hero-orbit span { font-size: 1rem; }
.hero-orbit-1 { top: 8%; left: 0; animation-delay: 0s; }
.hero-orbit-2 { top: 18%; right: -2%; animation-delay: .8s; }
.hero-orbit-3 { bottom: 22%; left: 2%; animation-delay: 1.6s; }
.hero-orbit-4 { bottom: 10%; right: 5%; animation-delay: 2.4s; }
@keyframes orbit-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Trust bar */
.trust-bar { padding: 0 0 2.5rem; 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; }

/* 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: 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; }

/* 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; }
.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: flex-end;
    margin-bottom: 1.75rem;
    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: .88rem; }

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

.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;
}

.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(-4px);
    border-color: rgba(0, 174, 239, 0.45);
    box-shadow: var(--shadow-glow);
    background: var(--bg-card-hover);
}
.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-card-badge {
    font-size: .65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: .2rem .5rem;
    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); }

.page-hero { padding: 3rem 0 1.5rem; }
.page-hero h1 { font-size: 2.25rem; font-weight: 800; letter-spacing: -0.02em; margin: .5rem 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-header h1 { font-size: 1.85rem; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.tool-page-url { font-size: .75rem; color: var(--text-dim); font-family: var(--mono); margin-top: .25rem; display: block; }

.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);
}

/* 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-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 {
    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: hidden;
}

.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-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;
}

.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); }
.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; 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;
}
.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-score-bar { height: 8px; background: var(--bg-elevated); border-radius: 999px; overflow: hidden; margin-bottom: .75rem; }
.ai-score-fill { height: 100%; background: linear-gradient(90deg, var(--success), var(--warning)); transition: width .5s; }
.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; }

/* Pages & blog */
.page-content { padding: 3rem 0 4rem; max-width: 760px; margin: 0 auto; }
.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 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; }

.blog-grid { display: grid; gap: 1rem; padding: 2rem 0 3rem; }
.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);
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    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 h4 {
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    margin-bottom: 1rem;
}

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

.footer-links-list { list-style: none; 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-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;
}

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

/* ─── Responsive ─── */
@media (max-width: 1024px) {
    .hero-inner { grid-template-columns: 1fr; }
    .hero-visual { min-height: 300px; margin-top: 1rem; }
    .page-hero-grid { grid-template-columns: 1fr; }
    .page-hero-logo-wrap { order: -1; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .trust-grid { grid-template-columns: 1fr; }
    .cta-band-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 768px) {
    .btn-header-cta { display: none; }
    .nav-toggle { display: flex; align-items: center; justify-content: center; }
    .main-nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(7, 11, 20, 0.98);
        padding: 1rem 1.25rem 1.25rem;
        border-bottom: 1px solid var(--border);
        margin-left: 0;
        gap: .25rem;
    }
    .main-nav.open { display: flex; }
    .main-nav a { width: 100%; padding: .75rem 1rem; border-radius: 10px; }
    .header-inner { position: relative; }
    .tool-layout { grid-template-columns: 1fr; }
    .tool-sidebar { position: static; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .footer-bottom-inner { flex-direction: column; text-align: center; }
    .hero-stats { gap: .5rem; }
    .stat-card { flex: 1; min-width: calc(50% - .25rem); }
    .hero-orbit { display: none; }
}

/* ─── 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; }

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