:root {
    color-scheme: light;
    --bg: #f7f8fc;
    --surface: rgba(255, 255, 255, 0.86);
    --surface-strong: #ffffff;
    --text: #12162a;
    --muted: #667085;
    --line: rgba(20, 24, 40, 0.1);
    --border: rgba(20, 24, 40, 0.12);
    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --primary-soft: rgba(79, 70, 229, 0.1);
    --success: #087f5b;
    --danger: #c92a2a;
    --shadow: 0 22px 60px rgba(31, 41, 55, 0.12);
    --radius: 24px;
    --radius-sm: 16px;
    --container: 1180px;
}

[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0a1020;
    --surface: rgba(18, 27, 48, 0.78);
    --surface-strong: #10192d;
    --text: #eef2ff;
    --muted: #aab4cc;
    --line: rgba(255, 255, 255, 0.12);
    --border: rgba(255, 255, 255, 0.16);
    --primary: #8b5cf6;
    --primary-dark: #a78bfa;
    --primary-soft: rgba(139, 92, 246, 0.18);
    --shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(79, 70, 229, 0.16), transparent 32rem),
        radial-gradient(circle at 85% 12%, rgba(14, 165, 233, 0.12), transparent 28rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.container { width: min(var(--container), calc(100% - 32px)); margin-inline: auto; }
.container.narrow { max-width: 820px; }
.skip-link {
    position: absolute;
    left: 1rem;
    top: -100px;
    z-index: 100;
    padding: .75rem 1rem;
    background: var(--text);
    color: var(--bg);
    border-radius: 999px;
}
.skip-link:focus { top: 1rem; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(18px);
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: .75rem; min-width: max-content; }
.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), #06b6d4);
    color: #fff;
    font-weight: 900;
    box-shadow: var(--shadow);
}
.brand strong { display: block; font-size: 1.05rem; line-height: 1.1; }
.brand small { display: block; color: var(--muted); font-size: .78rem; }
.site-nav { display: flex; align-items: center; gap: .35rem; }
.site-nav a, .theme-toggle, .nav-toggle {
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    padding: .7rem .9rem;
    min-height: 42px;
}
.site-nav a:hover, .site-nav a.active, .theme-toggle:hover {
    color: var(--text);
    background: var(--primary-soft);
}
.nav-toggle { display: none; color: var(--text); background: var(--surface); border: 1px solid var(--line); }

.hero-section { padding: 78px 0 56px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(320px, .72fr); gap: 36px; align-items: center; }
.hero-copy h1, .page-hero h1, .tool-hero h1 {
    margin: .35rem 0 1rem;
    font-size: clamp(2.3rem, 6vw, 5.1rem);
    line-height: .95;
    letter-spacing: -0.06em;
}
.hero-copy p, .page-hero p, .tool-hero p { max-width: 720px; color: var(--muted); font-size: 1.08rem; }
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--primary);
}
.hero-actions, .workspace-actions, .button-row { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: .78rem 1.05rem;
    min-height: 44px;
    font-weight: 800;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--primary), #06b6d4); color: #fff; border-color: transparent; }
.btn-soft { background: var(--surface); color: var(--text); }
.trust-pills { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.35rem; }
.trust-pills span {
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 999px;
    padding: .55rem .75rem;
    color: var(--muted);
    font-size: .9rem;
}

.hero-card, .tool-info-card, .tool-workspace, .category-card, .tool-card > a, .tool-card-disabled {
    border: 1px solid var(--line);
    background: var(--surface);
    backdrop-filter: blur(22px);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
}
.hero-card { padding: 1rem; transform: rotate(1deg); }
.search-panel { display: grid; gap: .45rem; margin-bottom: 1rem; }
.search-panel.wide { max-width: 760px; margin-top: 1.4rem; }
.search-panel label { color: var(--muted); font-weight: 800; font-size: .88rem; }
input, textarea, select {
    width: 100%;
    border: 1px solid var(--line);
    background: var(--surface-strong);
    color: var(--text);
    border-radius: 16px;
    outline: none;
    padding: .88rem 1rem;
}
input:focus, textarea:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
textarea { min-height: 340px; resize: vertical; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .92rem; line-height: 1.55; }
.mini-results { display: grid; gap: .7rem; }
.mini-tool { display: flex; align-items: center; gap: .7rem; padding: .8rem; border-radius: 18px; background: var(--surface-strong); border: 1px solid var(--line); }
.mini-tool span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; background: var(--primary-soft); color: var(--primary); font-weight: 900; }

.section { padding: 60px 0; }
.section-muted { background: color-mix(in srgb, var(--surface) 65%, transparent); border-block: 1px solid var(--line); }
.section-heading { margin-bottom: 1.5rem; }
.section-heading h2 { margin: .25rem 0 .35rem; font-size: clamp(1.7rem, 4vw, 3rem); line-height: 1; letter-spacing: -0.04em; }
.section-heading p { color: var(--muted); margin: 0; }
.section-heading.small h2 { font-size: clamp(1.4rem, 3vw, 2.2rem); }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.tool-card > a, .tool-card-disabled { display: block; min-height: 100%; padding: 1.15rem; transition: transform .18s ease, border-color .18s ease; }
.tool-card > a:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); }
.tool-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; background: var(--primary-soft); color: var(--primary); font-weight: 900; margin-bottom: .8rem; }
.tool-icon.large { width: 78px; height: 78px; font-size: 1.2rem; }
.tool-category { display: block; color: var(--primary); font-size: .78rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.tool-card h3 { margin: .35rem 0; font-size: 1.1rem; }
.tool-card p { margin: 0; color: var(--muted); }
.category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.category-card { padding: 1.2rem; display: grid; gap: .45rem; }
.category-card span, .category-card small { color: var(--muted); }
.category-card strong { font-size: 1.2rem; }
.category-sections { display: grid; gap: 3rem; }

.page-hero, .tool-hero { padding: 58px 0 30px; }
.page-hero.compact h1, .tool-hero h1 { font-size: clamp(2.1rem, 5vw, 4.4rem); }
.tool-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.5rem; align-items: start; }
.breadcrumb { display: inline-flex; margin-bottom: 1rem; color: var(--muted); font-weight: 800; }
.tool-info-card { padding: 1.2rem; }
.tool-info-card p { font-size: .94rem; }
.tool-workspace { padding: 1.1rem; }
.workspace-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.workspace-header h2 { margin: 0; font-size: 1.3rem; }
.workspace-header p { margin: .25rem 0 0; color: var(--muted); }
.editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.editor-box { display: grid; gap: .5rem; }
.editor-box span, .form-row label { color: var(--muted); font-weight: 800; font-size: .88rem; }
.editor-box.single { margin-top: 1rem; }
.workspace-actions { margin-top: 1rem; }
.workspace-actions select { width: auto; min-width: 150px; }
.workspace-actions.wrap { align-items: center; }
.check-option { display: inline-flex; align-items: center; gap: .45rem; color: var(--muted); font-weight: 700; }
.check-option input { width: 18px; height: 18px; }
.tool-message { min-height: 1.5rem; color: var(--muted); font-weight: 700; }
.tool-message.success { color: var(--success); }
.tool-message.error { color: var(--danger); }
.form-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; align-items: end; }
.result-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; }
.result-cards > div { padding: 1rem; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-strong); }
.result-cards span { display: block; color: var(--muted); font-weight: 800; font-size: .84rem; }
.result-cards strong { display: block; margin-top: .4rem; font-size: 1.35rem; }
.steps-list { padding-left: 1.25rem; color: var(--muted); font-weight: 700; }
.empty-state { padding: 2rem; border: 1px dashed var(--line); border-radius: var(--radius-sm); color: var(--muted); text-align: center; }
.site-footer { padding: 32px 0; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; color: var(--muted); }
.footer-grid strong { color: var(--text); }
.footer-grid p { margin: .25rem 0 0; }

@media (max-width: 920px) {
    .hero-grid, .tool-hero-grid, .editor-grid { grid-template-columns: 1fr; }
    .tool-grid, .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-row, .result-cards, .footer-grid { grid-template-columns: 1fr; }
    .hero-card { transform: none; }
}

@media (max-width: 680px) {
    .container { width: min(100% - 22px, var(--container)); }
    .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .site-nav {
        position: absolute;
        inset: 72px 11px auto 11px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: .7rem;
        border: 1px solid var(--line);
        border-radius: 20px;
        background: var(--surface-strong);
        box-shadow: var(--shadow);
    }
    .site-nav.open { display: flex; }
    .site-nav a, .theme-toggle { width: 100%; text-align: left; justify-content: flex-start; }
    .hero-section { padding-top: 46px; }
    .tool-grid, .category-grid { grid-template-columns: 1fr; }
    .workspace-header { flex-direction: column; }
    textarea { min-height: 250px; }
}

/* Home list directory layout */
.home-directory-hero {
    padding: 68px 0 34px;
}
.home-directory-hero h1 {
    max-width: 920px;
    margin: .35rem 0 1rem;
    font-size: clamp(2.25rem, 5.5vw, 4.8rem);
    line-height: .96;
    letter-spacing: -0.06em;
}
.home-directory-hero p {
    max-width: 760px;
    color: var(--muted);
    font-size: 1.08rem;
    margin: 0 0 1.35rem;
}
.home-search-line {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: center;
    gap: .85rem;
    max-width: 860px;
    padding: .75rem 0 0;
}
.home-search-line label {
    color: var(--muted);
    font-weight: 900;
    font-size: .9rem;
}
.directory-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}
.directory-heading h2 {
    margin: .2rem 0 0;
    font-size: clamp(1.65rem, 3.2vw, 2.6rem);
    line-height: 1;
    letter-spacing: -0.04em;
}
.tool-count {
    color: var(--muted);
    font-weight: 800;
    white-space: nowrap;
}
.tool-row-list {
    display: grid;
    border-top: 1px solid var(--line);
}
.tool-row {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) 190px 42px;
    align-items: center;
    gap: 1rem;
    min-height: 86px;
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
    transition: background .18s ease, padding-inline .18s ease;
}
.tool-row:hover,
.tool-row:focus-visible {
    background: color-mix(in srgb, var(--primary-soft) 55%, transparent);
    padding-inline: .8rem;
    outline: none;
}
.tool-row-icon {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 900;
    font-size: .88rem;
}
.tool-row-content {
    display: grid;
    gap: .18rem;
    min-width: 0;
}
.tool-row-content strong {
    font-size: 1.05rem;
    line-height: 1.25;
}
.tool-row-content small {
    color: var(--muted);
    font-size: .94rem;
    line-height: 1.45;
}
.tool-row-category {
    color: var(--muted);
    font-weight: 850;
    font-size: .82rem;
    text-align: right;
}
.tool-row-arrow {
    display: inline-grid;
    place-items: center;
    justify-self: end;
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--primary);
    font-size: 1.25rem;
    line-height: 1;
    transition: transform .18s ease, background .18s ease;
}
.tool-row:hover .tool-row-arrow,
.tool-row:focus-visible .tool-row-arrow {
    transform: translateX(4px);
    background: var(--primary-soft);
}

@media (max-width: 760px) {
    .home-directory-hero { padding: 44px 0 24px; }
    .home-search-line { grid-template-columns: 1fr; gap: .45rem; }
    .directory-heading { align-items: flex-start; flex-direction: column; }
    .tool-count { white-space: normal; }
    .tool-row {
        grid-template-columns: 46px minmax(0, 1fr) 34px;
        gap: .75rem;
        min-height: 92px;
    }
    .tool-row-category { display: none; }
    .tool-row-icon { width: 40px; height: 40px; border-radius: 12px; font-size: .78rem; }
    .tool-row-content strong { font-size: 1rem; }
    .tool-row-content small { font-size: .88rem; }
}

/* Compact homepage header update */
.home-directory-hero.simple-hero {
    padding: 34px 0 18px;
    border-bottom: 1px solid var(--line);
}
.simple-hero-top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .55rem;
}
.home-directory-hero.simple-hero h1 {
    margin: .15rem 0 0;
    font-size: clamp(2rem, 4vw, 3.3rem);
    line-height: .98;
    letter-spacing: -0.055em;
}
.home-directory-hero.simple-hero p {
    max-width: 760px;
    margin: 0 0 .95rem;
    font-size: .98rem;
}
.home-search-line.compact-search {
    max-width: 760px;
    grid-template-columns: 82px minmax(0, 1fr);
    padding-top: 0;
}
.compact-directory {
    padding-top: 20px;
}

@media (max-width: 760px) {
    .home-directory-hero.simple-hero { padding: 28px 0 16px; }
    .simple-hero-top { align-items: flex-start; flex-direction: column; gap: .45rem; }
    .home-search-line.compact-search { grid-template-columns: 1fr; }
}

/* Visual polish update: same layout, refined look only */
:root {
    --bg: #f5f7fb;
    --surface: rgba(255, 255, 255, 0.78);
    --surface-strong: #ffffff;
    --text: #111827;
    --muted: #64748b;
    --line: rgba(15, 23, 42, 0.09);
    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --primary-soft: rgba(79, 70, 229, 0.085);
    --shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

[data-theme="dark"] {
    --bg: #090e1a;
    --surface: rgba(15, 23, 42, 0.74);
    --surface-strong: #111827;
    --text: #f8fafc;
    --muted: #94a3b8;
    --line: rgba(226, 232, 240, 0.11);
    --primary: #8b5cf6;
    --primary-soft: rgba(139, 92, 246, 0.16);
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

body {
    background:
        radial-gradient(circle at 8% -8%, rgba(79, 70, 229, 0.13), transparent 26rem),
        radial-gradient(circle at 92% 0%, rgba(6, 182, 212, 0.10), transparent 24rem),
        linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 34rem),
        var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.site-header {
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.42) inset;
}

.header-inner {
    padding: 12px 0;
}

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    font-size: .82rem;
    letter-spacing: -.03em;
    box-shadow: 0 12px 26px rgba(79, 70, 229, 0.22);
}

.brand strong {
    letter-spacing: -.025em;
}

.brand small {
    font-size: .75rem;
}

.site-nav a,
.theme-toggle,
.nav-toggle {
    padding: .62rem .82rem;
    min-height: 38px;
    font-weight: 750;
}

.site-nav a:hover,
.site-nav a.active,
.theme-toggle:hover {
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 12%, transparent);
}

.home-directory-hero.simple-hero {
    padding: 30px 0 18px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 58%, transparent), transparent);
}

.simple-hero-top {
    align-items: center;
    margin-bottom: .5rem;
}

.eyebrow {
    letter-spacing: .14em;
    font-size: .72rem;
}

.home-directory-hero.simple-hero h1 {
    font-size: clamp(2rem, 3.6vw, 3rem);
    letter-spacing: -0.06em;
}

.home-directory-hero.simple-hero p {
    max-width: 720px;
    color: color-mix(in srgb, var(--muted) 92%, var(--text));
    line-height: 1.55;
}

.tool-count {
    padding: .45rem .7rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface-strong) 76%, transparent);
    color: color-mix(in srgb, var(--muted) 92%, var(--text));
    font-size: .82rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.home-search-line.compact-search {
    max-width: 780px;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: .7rem;
}

.home-search-line label {
    font-size: .82rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

input,
textarea,
select {
    border-radius: 14px;
    border-color: color-mix(in srgb, var(--line) 92%, var(--text));
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.62) inset;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

input[type="search"] {
    min-height: 46px;
    padding-inline: 1rem;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--surface-strong) 96%, transparent), var(--surface-strong));
}

input::placeholder,
textarea::placeholder {
    color: color-mix(in srgb, var(--muted) 68%, transparent);
}

input:focus,
textarea:focus,
select:focus {
    border-color: color-mix(in srgb, var(--primary) 62%, var(--line));
    box-shadow: 0 0 0 4px var(--primary-soft), 0 1px 0 rgba(255, 255, 255, 0.65) inset;
}

.compact-directory {
    padding-top: 16px;
}

.tool-row-list {
    border-top: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
}

.tool-row {
    grid-template-columns: 54px minmax(0, 1fr) 178px 38px;
    min-height: 78px;
    padding: .95rem .25rem;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
    border-radius: 0;
    position: relative;
    transition: background .18s ease, padding-inline .18s ease, border-color .18s ease, transform .18s ease;
}

.tool-row::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 3px;
    height: 0;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--primary), #06b6d4);
    transform: translateY(-50%);
    transition: height .18s ease;
}

.tool-row:hover,
.tool-row:focus-visible {
    background: linear-gradient(90deg, color-mix(in srgb, var(--primary-soft) 84%, transparent), transparent 70%);
    padding-inline: .75rem .45rem;
    border-color: color-mix(in srgb, var(--primary) 24%, var(--line));
    transform: translateX(2px);
}

.tool-row:hover::before,
.tool-row:focus-visible::before {
    height: 36px;
}

.tool-row-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--primary-soft) 94%, var(--surface-strong)), var(--primary-soft));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 10%, transparent);
}

.tool-row-content strong {
    font-size: 1.02rem;
    letter-spacing: -.018em;
}

.tool-row-content small {
    max-width: 760px;
    color: color-mix(in srgb, var(--muted) 88%, var(--text));
}

.tool-row-category {
    justify-self: end;
    padding: .35rem .62rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface-strong) 66%, transparent);
    font-size: .76rem;
    line-height: 1;
}

.tool-row-arrow {
    width: 32px;
    height: 32px;
    border-color: color-mix(in srgb, var(--primary) 18%, var(--line));
    background: color-mix(in srgb, var(--surface-strong) 72%, transparent);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.tool-row:hover .tool-row-arrow,
.tool-row:focus-visible .tool-row-arrow {
    color: #ffffff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--primary), #06b6d4);
    transform: translateX(4px);
}

.empty-state {
    background: color-mix(in srgb, var(--surface-strong) 70%, transparent);
}

.site-footer {
    margin-top: 18px;
    background: color-mix(in srgb, var(--surface) 48%, transparent);
}

@media (max-width: 760px) {
    .home-directory-hero.simple-hero {
        padding: 24px 0 15px;
    }

    .simple-hero-top {
        align-items: flex-start;
        gap: .55rem;
    }

    .tool-count {
        padding: .38rem .62rem;
    }

    .home-search-line.compact-search {
        grid-template-columns: 1fr;
    }

    .tool-row {
        grid-template-columns: 46px minmax(0, 1fr) 32px;
        min-height: 86px;
        padding: .9rem .1rem;
    }

    .tool-row:hover,
    .tool-row:focus-visible {
        padding-inline: .45rem .25rem;
        transform: none;
    }

    .tool-row-icon {
        width: 39px;
        height: 39px;
    }
}

/* Extra utility tool polish */
.form-row label {
    display: grid;
    gap: .45rem;
    color: var(--muted);
    font-weight: 800;
    font-size: .88rem;
}
.counter-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}
.sr-output {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    min-height: 1px;
    opacity: 0;
    pointer-events: none;
}
.table-preview-wrap {
    margin-top: 1rem;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface-strong);
}
.preview-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 520px;
}
.preview-table th,
.preview-table td {
    padding: .75rem .85rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}
.preview-table th {
    color: var(--text);
    background: var(--primary-soft);
    font-weight: 900;
}
.preview-table tr:last-child td { border-bottom: 0; }

@media (max-width: 920px) {
    .counter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


.registered-tool-panel {
    display: grid;
    gap: .9rem;
    padding: 1.1rem;
}
.registered-tool-panel h2 {
    margin: 0;
    letter-spacing: -0.03em;
}
.registered-tool-panel p {
    margin: 0;
    color: var(--muted);
}
.registered-tool-panel code {
    border: 1px solid var(--line);
    background: var(--primary-soft);
    border-radius: .55rem;
    padding: .1rem .35rem;
}

/* Homepage category-directory refresh */
.site-nav {
    display: flex !important;
    position: static !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
.nav-toggle { display: none !important; }

.home-directory-hero.simple-hero {
    padding: 26px 0 14px;
    border-bottom: 0;
    background: transparent;
}
.home-directory-hero.simple-hero .container {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
}
.home-directory-hero.simple-hero h1 {
    margin: .2rem 0 0;
    font-size: clamp(1.95rem, 3.2vw, 2.85rem);
    line-height: 1;
}

.compact-directory { padding-top: 8px; }
.tools-control-bar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem;
    margin-bottom: 1.1rem;
    border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
    border-radius: 20px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--surface-strong) 88%, transparent), color-mix(in srgb, var(--surface) 72%, transparent));
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(18px);
}
.tools-control-left {
    display: grid;
    grid-template-columns: minmax(210px, 270px) minmax(260px, 520px);
    gap: .75rem;
    align-items: end;
    width: min(100%, 840px);
}
.filter-field {
    display: grid;
    gap: .35rem;
}
.filter-field span {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.filter-field select,
.filter-field input {
    min-height: 46px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface-strong) 96%, transparent);
}
.tools-count-box {
    min-width: 104px;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    padding: .62rem .8rem;
    border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
    border-radius: 16px;
    background: color-mix(in srgb, var(--primary-soft) 65%, var(--surface-strong));
    color: var(--text);
    white-space: nowrap;
}
.tools-count-box strong {
    font-size: 1.15rem;
    line-height: 1;
}
.tools-count-box span {
    color: var(--muted);
    font-size: .84rem;
    font-weight: 800;
}

.category-section-list {
    display: grid;
    gap: 1.15rem;
}
.tool-category-block {
    border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
    border-radius: 22px;
    overflow: clip;
    background: color-mix(in srgb, var(--surface) 72%, transparent);
    box-shadow: 0 16px 45px rgba(15, 23, 42, 0.055);
}
.tool-category-header {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: .85rem;
    padding: 1rem 1.05rem;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
    background:
        radial-gradient(circle at 1.5rem 1.5rem, color-mix(in srgb, var(--primary-soft) 80%, transparent), transparent 8rem),
        color-mix(in srgb, var(--surface-strong) 74%, transparent);
}
.category-header-icon {
    width: 44px;
    height: 44px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary-soft) 86%, var(--surface-strong)), color-mix(in srgb, #06b6d4 12%, var(--surface-strong)));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 12%, transparent);
    font-size: 1.18rem;
}
.category-header-content {
    display: grid;
    gap: .15rem;
    min-width: 0;
}
.category-header-content strong {
    font-size: 1.05rem;
    letter-spacing: -.025em;
}
.category-header-content small {
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.category-header-count {
    padding: .4rem .65rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface-strong) 78%, transparent);
    color: var(--muted);
    font-size: .78rem;
    font-weight: 900;
    white-space: nowrap;
}
.tool-category-block .tool-row-list {
    border-top: 0;
}
.tool-category-block .tool-row:last-child {
    border-bottom: 0;
}
.tool-row {
    grid-template-columns: 54px minmax(0, 1fr) 38px;
    min-height: 76px;
    padding: .88rem 1rem;
}
.tool-row:hover,
.tool-row:focus-visible {
    padding-inline: 1.2rem 1rem;
}
.tool-row-icon {
    font-size: 1.06rem;
    color: var(--primary);
}
.tool-row-content strong {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
}
.tool-row-category { display: none; }

@media (max-width: 860px) {
    .home-directory-hero.simple-hero .container {
        display: block;
    }
    .tools-control-bar {
        align-items: stretch;
        flex-direction: column;
    }
    .tools-control-left {
        grid-template-columns: 1fr;
        width: 100%;
    }
    .tools-count-box {
        justify-content: flex-start;
        width: 100%;
    }
    .tool-category-header {
        grid-template-columns: 44px minmax(0, 1fr);
    }
    .category-header-count {
        grid-column: 2;
        justify-self: start;
        margin-top: .1rem;
    }
    .category-header-content small {
        white-space: normal;
    }
}

@media (max-width: 560px) {
    .container { width: min(var(--container), calc(100% - 22px)); }
    .site-nav a,
    .theme-toggle {
        padding: .56rem .68rem;
        min-height: 36px;
    }
    .brand small { display: none; }
    .tools-control-bar {
        padding: .7rem;
        border-radius: 17px;
    }
    .tool-category-block {
        border-radius: 18px;
    }
    .tool-category-header {
        padding: .82rem;
        gap: .65rem;
    }
    .tool-row {
        grid-template-columns: 45px minmax(0, 1fr) 30px;
        min-height: 82px;
        padding: .82rem .75rem;
    }
    .tool-row:hover,
    .tool-row:focus-visible {
        padding-inline: .85rem .75rem;
    }
}

/* Implementation batch: compact controls used by newly active tools */
.mini-field {
    display: inline-flex;
    flex-direction: column;
    gap: .35rem;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 700;
    min-width: 150px;
}
.mini-field input,
.mini-field select,
.workspace-actions select {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    min-height: 42px;
    padding: .68rem .8rem;
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.mini-field input:focus,
.mini-field select:focus,
.workspace-actions select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-soft);
}
.workspace-actions.calc-row {
    align-items: end;
    margin-bottom: 1rem;
}
.editor-box.single {
    margin-top: 1rem;
}
@media (max-width: 640px) {
    .mini-field,
    .mini-field input,
    .mini-field select,
    .workspace-actions select {
        width: 100%;
    }
}


/* Disabled registered tools: visible in registry, not clickable until built */
.tool-row.is-disabled {
    cursor: not-allowed;
    opacity: .58;
    filter: grayscale(.25);
}
.tool-row.is-disabled:hover,
.tool-row.is-disabled:focus-visible {
    transform: none;
    padding-inline: 1rem;
    border-color: var(--line);
    background: transparent;
    box-shadow: none;
}
.tool-row.is-disabled::before {
    opacity: 0;
}
.tool-row.is-disabled .tool-row-arrow {
    background: color-mix(in srgb, var(--muted) 10%, var(--surface-strong));
    color: color-mix(in srgb, var(--muted) 72%, transparent);
    transform: none;
    box-shadow: none;
}
.tool-card.is-disabled {
    cursor: not-allowed;
    opacity: .58;
    filter: grayscale(.25);
}
.tool-card-disabled {
    color: inherit;
}
.tool-card-disabled .tool-icon {
    background: color-mix(in srgb, var(--muted) 10%, var(--surface-strong));
    color: color-mix(in srgb, var(--muted) 72%, transparent);
}


/* MNB batch 4 media tools */
.tool-file { width: 100%; padding: 10px; border: 1px dashed var(--border); border-radius: 14px; background: var(--surface-soft); }
.tool-options-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 16px 0; }
.tool-options-grid .wide { grid-column: span 2; }
.tool-options-grid label { display: grid; gap: 6px; color: var(--muted); font-size: .9rem; }
.tool-options-grid input, .tool-options-grid select { width: 100%; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; background: var(--surface); color: var(--text); }
.image-stage { margin-top: 18px; border: 1px solid var(--border); border-radius: 18px; padding: 14px; background: var(--surface-soft); overflow: auto; }
.image-stage canvas { max-width: 100%; height: auto; display: block; border-radius: 14px; background: repeating-conic-gradient(from 45deg, rgba(148,163,184,.18) 0% 25%, transparent 0% 50%) 50% / 20px 20px; }
.single-output { grid-template-columns: 1fr; }
@media (max-width: 720px) { .tool-options-grid .wide { grid-column: span 1; } }

/* Homepage visual polish v2: cleaner directory look, same structure/features */
body {
    background:
        radial-gradient(circle at 9% -4%, color-mix(in srgb, var(--primary) 20%, transparent), transparent 28rem),
        radial-gradient(circle at 88% 6%, rgba(6, 182, 212, .14), transparent 30rem),
        linear-gradient(180deg, color-mix(in srgb, var(--bg) 88%, #ffffff 12%), var(--bg) 46%, color-mix(in srgb, var(--bg) 92%, #eef2ff 8%));
}

[data-theme="dark"] body {
    background:
        radial-gradient(circle at 9% -4%, color-mix(in srgb, var(--primary) 28%, transparent), transparent 28rem),
        radial-gradient(circle at 88% 6%, rgba(6, 182, 212, .16), transparent 30rem),
        linear-gradient(180deg, #090f1f, var(--bg) 48%, #070b16);
}

.site-header {
    background: color-mix(in srgb, var(--surface-strong) 74%, transparent);
    box-shadow: 0 10px 32px rgba(15, 23, 42, .055);
}

.header-inner {
    padding: 12px 0;
}

.brand {
    padding: .38rem .58rem .38rem .38rem;
    border: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface-strong) 62%, transparent);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 13px;
    box-shadow: 0 12px 26px color-mix(in srgb, var(--primary) 22%, transparent);
}

.site-nav a,
.theme-toggle {
    border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
    background: color-mix(in srgb, var(--surface-strong) 54%, transparent);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.32);
}

.site-nav a.active,
.site-nav a:hover,
.theme-toggle:hover {
    border-color: color-mix(in srgb, var(--primary) 24%, var(--line));
    background: color-mix(in srgb, var(--primary-soft) 78%, var(--surface-strong));
}

.home-directory-hero.simple-hero {
    padding: 30px 0 18px;
}

.home-directory-hero.simple-hero .container {
    position: relative;
    align-items: center;
    padding: 1.15rem 1.25rem;
    border: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
    border-radius: 24px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--surface-strong) 82%, transparent), color-mix(in srgb, var(--surface) 70%, transparent)),
        radial-gradient(circle at top right, color-mix(in srgb, var(--primary-soft) 80%, transparent), transparent 20rem);
    box-shadow: 0 20px 50px rgba(15, 23, 42, .07);
    overflow: hidden;
}

.home-directory-hero.simple-hero .container::after {
    content: "";
    position: absolute;
    right: -58px;
    top: -72px;
    width: 190px;
    height: 190px;
    border-radius: 999px;
    background: radial-gradient(circle, color-mix(in srgb, var(--primary) 16%, transparent), transparent 65%);
    pointer-events: none;
}

.home-directory-hero.simple-hero .eyebrow {
    padding: .36rem .58rem;
    border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary-soft) 68%, var(--surface-strong));
    letter-spacing: .11em;
}

.home-directory-hero.simple-hero h1 {
    position: relative;
    z-index: 1;
    font-size: clamp(2.05rem, 3.4vw, 3.15rem);
    letter-spacing: -.055em;
}

.compact-directory {
    padding-top: 10px;
}

.tools-control-bar {
    position: sticky;
    top: 76px;
    z-index: 20;
    align-items: end;
    padding: .78rem;
    margin-bottom: 1.25rem;
    border-radius: 22px;
    border-color: color-mix(in srgb, var(--line) 72%, transparent);
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--surface-strong) 86%, transparent), color-mix(in srgb, var(--surface) 76%, transparent));
    box-shadow: 0 18px 46px rgba(15, 23, 42, .075);
}

.tools-control-left {
    gap: .8rem;
}

.filter-field span {
    padding-left: .1rem;
    color: color-mix(in srgb, var(--muted) 86%, var(--text));
}

.filter-field select,
.filter-field input {
    border: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
    border-radius: 16px;
    background: color-mix(in srgb, var(--surface-strong) 92%, transparent);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.44), 0 8px 18px rgba(15, 23, 42, .035);
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.filter-field select:focus,
.filter-field input:focus {
    outline: none;
    border-color: color-mix(in srgb, var(--primary) 48%, var(--line));
    box-shadow: 0 0 0 4px var(--primary-soft), inset 0 1px 0 rgba(255,255,255,.5);
}

.search-field input {
    padding-left: 1rem;
}

.tools-count-box {
    min-width: 118px;
    border-radius: 18px;
    border-color: color-mix(in srgb, var(--primary) 22%, var(--line));
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary-soft) 82%, var(--surface-strong)), color-mix(in srgb, #06b6d4 8%, var(--surface-strong)));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.4);
}

.tools-count-box strong {
    font-size: 1.28rem;
    letter-spacing: -.04em;
}

.category-section-list {
    gap: 1.25rem;
}

.tool-category-block {
    border-radius: 24px;
    border-color: color-mix(in srgb, var(--line) 76%, transparent);
    background: color-mix(in srgb, var(--surface-strong) 58%, transparent);
    box-shadow: 0 18px 55px rgba(15, 23, 42, .058);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.tool-category-block:hover {
    border-color: color-mix(in srgb, var(--primary) 18%, var(--line));
    box-shadow: 0 22px 60px rgba(15, 23, 42, .075);
}

.tool-category-header {
    position: sticky;
    top: 156px;
    z-index: 5;
    padding: .92rem 1rem;
    border-bottom-color: color-mix(in srgb, var(--line) 72%, transparent);
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--surface-strong) 88%, transparent), color-mix(in srgb, var(--surface) 78%, transparent)),
        radial-gradient(circle at 2rem 1rem, color-mix(in srgb, var(--primary-soft) 88%, transparent), transparent 10rem);
    backdrop-filter: blur(14px);
}

.category-header-icon {
    border-radius: 16px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--primary) 14%, var(--surface-strong)), color-mix(in srgb, #06b6d4 12%, var(--surface-strong)));
    color: var(--primary);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 16%, transparent), 0 10px 20px rgba(15, 23, 42, .045);
}

.category-header-content strong {
    font-size: 1.08rem;
    letter-spacing: -.035em;
}

.category-header-content small {
    font-size: .88rem;
}

.category-header-count {
    border-color: color-mix(in srgb, var(--primary) 14%, var(--line));
    background: color-mix(in srgb, var(--primary-soft) 42%, var(--surface-strong));
}

.tool-category-block .tool-row-list {
    background: color-mix(in srgb, var(--surface-strong) 34%, transparent);
}

.tool-row {
    position: relative;
    min-height: 74px;
    border-bottom-color: color-mix(in srgb, var(--line) 68%, transparent);
    background: transparent;
    transition: background .18s ease, transform .18s ease, box-shadow .18s ease, padding .18s ease, border-color .18s ease;
}

.tool-row::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--line) 82%, transparent), transparent);
    opacity: .75;
}

.tool-category-block .tool-row:last-child::after {
    display: none;
}

.tool-row:hover,
.tool-row:focus-visible {
    transform: translateY(-1px);
    background: linear-gradient(90deg, color-mix(in srgb, var(--primary-soft) 72%, transparent), color-mix(in srgb, var(--surface-strong) 42%, transparent));
    box-shadow: inset 3px 0 0 color-mix(in srgb, var(--primary) 72%, #06b6d4);
}

.tool-row-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface-strong) 72%, transparent);
    border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.42);
}

.tool-row:hover .tool-row-icon,
.tool-row:focus-visible .tool-row-icon {
    border-color: color-mix(in srgb, var(--primary) 28%, var(--line));
    background: color-mix(in srgb, var(--primary-soft) 64%, var(--surface-strong));
}

.tool-row-content strong {
    color: var(--text);
    font-size: 1.01rem;
    line-height: 1.25;
}

.tool-row-content small {
    color: color-mix(in srgb, var(--muted) 94%, var(--text));
    line-height: 1.35;
}

.tool-row-arrow {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--surface-strong) 70%, transparent);
    border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
    color: var(--primary);
}

.tool-row:hover .tool-row-arrow,
.tool-row:focus-visible .tool-row-arrow {
    background: linear-gradient(135deg, var(--primary), #06b6d4);
    border-color: transparent;
    color: #fff;
    transform: translateX(2px);
}

.tool-row.is-disabled {
    opacity: .48;
    background: color-mix(in srgb, var(--surface) 28%, transparent);
}

.tool-row.is-disabled:hover,
.tool-row.is-disabled:focus-visible {
    padding-inline: 1rem;
    transform: none;
    background: color-mix(in srgb, var(--surface) 28%, transparent);
    box-shadow: none;
}

.tool-row.is-disabled .tool-row-icon {
    color: var(--muted);
}

.tool-row.is-disabled .tool-row-arrow,
.tool-row.is-disabled:hover .tool-row-arrow,
.tool-row.is-disabled:focus-visible .tool-row-arrow {
    background: color-mix(in srgb, var(--surface-strong) 58%, transparent);
    border-color: color-mix(in srgb, var(--line) 72%, transparent);
    color: color-mix(in srgb, var(--muted) 68%, transparent);
    transform: none;
}

.empty-state {
    padding: 1.1rem;
    border: 1px dashed color-mix(in srgb, var(--primary) 24%, var(--line));
    border-radius: 18px;
    background: color-mix(in srgb, var(--primary-soft) 50%, var(--surface-strong));
    color: var(--muted);
    text-align: center;
    font-weight: 800;
}

@media (max-width: 860px) {
    .home-directory-hero.simple-hero .container {
        padding: 1rem;
    }

    .tools-control-bar,
    .tool-category-header {
        position: static;
    }

    .tools-count-box {
        min-width: 0;
    }
}

@media (max-width: 560px) {
    .brand {
        padding-right: .42rem;
    }

    .brand-mark {
        width: 36px;
        height: 36px;
    }

    .home-directory-hero.simple-hero {
        padding-top: 18px;
    }

    .home-directory-hero.simple-hero .container {
        border-radius: 20px;
    }

    .home-directory-hero.simple-hero h1 {
        font-size: 2rem;
    }

    .tools-control-bar {
        border-radius: 18px;
    }

    .tool-category-block {
        border-radius: 19px;
    }

    .tool-row {
        grid-template-columns: 42px minmax(0, 1fr) 30px;
        gap: .65rem;
    }

    .tool-row-icon {
        width: 38px;
        height: 38px;
        border-radius: 13px;
    }

    .tool-row-content strong {
        font-size: .98rem;
    }

    .tool-row-content small {
        font-size: .84rem;
    }
}

/* SEO footer polish */
.footer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.footer-grid a { color: inherit; text-decoration: none; border-bottom: 1px solid color-mix(in srgb, currentColor 35%, transparent); }
.footer-grid a:hover { color: var(--primary); }
@media (max-width: 1100px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .footer-grid { grid-template-columns: 1fr; } }


/* Homepage accordion + improved category dropdown */
.category-filter-field {
    position: relative;
}
.category-select-wrap {
    position: relative;
    display: block;
}
.category-select-wrap select {
    width: 100%;
    appearance: none;
    padding-right: 2.7rem;
    cursor: pointer;
    font-weight: 800;
}
.category-select-wrap select:hover {
    border-color: color-mix(in srgb, var(--primary) 26%, var(--line));
    background: color-mix(in srgb, var(--surface-strong) 100%, transparent);
}
.category-select-arrow {
    position: absolute;
    right: .85rem;
    top: 50%;
    translate: 0 -50%;
    width: 28px;
    height: 28px;
    display: inline-grid;
    place-items: center;
    border-radius: 10px;
    color: var(--primary);
    background: color-mix(in srgb, var(--primary-soft) 74%, var(--surface-strong));
    pointer-events: none;
    font-size: 1.05rem;
    line-height: 1;
}
.tool-category-block {
    scroll-margin-top: 168px;
}
.tool-category-header {
    padding: 0;
}
.category-toggle {
    width: 100%;
    min-height: 76px;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: .85rem;
    padding: 1rem 1.05rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    text-align: left;
}
.category-toggle:hover,
.category-toggle:focus-visible {
    background: linear-gradient(90deg, color-mix(in srgb, var(--primary-soft) 58%, transparent), transparent 72%);
    outline: none;
}
.category-toggle:focus-visible {
    box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--primary) 32%, transparent);
}
.category-header-meta {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: .55rem;
    white-space: nowrap;
}
.category-collapse-icon {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--primary) 16%, var(--line));
    border-radius: 12px;
    background: color-mix(in srgb, var(--surface-strong) 80%, transparent);
    color: var(--primary);
    font-weight: 900;
    transition: transform .18s ease, background .18s ease, color .18s ease;
}
.tool-category-block:not(.is-collapsed) .category-collapse-icon {
    transform: rotate(180deg);
    background: linear-gradient(135deg, var(--primary), #06b6d4);
    color: #fff;
    border-color: transparent;
}
.tool-category-block.is-collapsed {
    box-shadow: 0 10px 30px rgba(15, 23, 42, .045);
}
.tool-category-block.is-collapsed .tool-category-header {
    border-bottom-color: transparent;
}
.tool-category-block.is-collapsed .tool-row-list {
    display: none;
}
.tool-row-list[hidden] {
    display: none !important;
}
@media (max-width: 860px) {
    .tool-category-block { scroll-margin-top: 18px; }
    .category-toggle {
        grid-template-columns: 44px minmax(0, 1fr) auto;
        min-height: 72px;
    }
    .category-header-meta {
        grid-column: 1 / -1;
        justify-content: space-between;
        padding-left: calc(44px + .65rem);
    }
}
@media (max-width: 560px) {
    .category-toggle {
        grid-template-columns: 38px minmax(0, 1fr);
        padding: .82rem;
        gap: .65rem;
    }
    .category-header-meta {
        grid-column: 2;
        padding-left: 0;
        justify-content: flex-start;
    }
    .category-collapse-icon {
        width: 30px;
        height: 30px;
        border-radius: 10px;
    }
}


/* Reference-inspired homepage redesign: dark hero + clean directory rows */
body.home-reference-design {
    background: #f4f7fb;
}
body.home-reference-design .site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(7, 14, 24, .92);
    border-bottom: 1px solid rgba(255,255,255,.08);
    box-shadow: none;
    backdrop-filter: blur(16px);
}
body.home-reference-design .brand,
body.home-reference-design .site-nav a,
body.home-reference-design .theme-toggle {
    color: rgba(255,255,255,.9);
}
body.home-reference-design .brand small,
body.home-reference-design .site-nav a:not(.active) {
    color: rgba(255,255,255,.64);
}
body.home-reference-design .site-nav a.active,
body.home-reference-design .site-nav a:hover,
body.home-reference-design .theme-toggle:hover {
    color: #fff;
    background: rgba(255,255,255,.1);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
body.home-reference-design .brand-mark {
    background: linear-gradient(135deg, #2dd4bf, #14b8a6);
    box-shadow: 0 12px 28px rgba(20, 184, 166, .25);
}
body.home-reference-design .home-directory-hero.simple-hero {
    position: relative;
    isolation: isolate;
    min-height: 410px;
    padding: 76px 0 56px;
    overflow: hidden;
    border-bottom: 0;
    color: #fff;
    background:
        linear-gradient(90deg, rgba(7, 14, 24, .94), rgba(7, 14, 24, .74)),
        radial-gradient(circle at 18% 28%, rgba(45, 212, 191, .32), transparent 18rem),
        radial-gradient(circle at 84% 24%, rgba(79, 70, 229, .34), transparent 22rem),
        linear-gradient(135deg, #0b1220, #111827 58%, #0f172a);
}
body.home-reference-design .home-directory-hero.simple-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    opacity: .26;
    background-image:
        linear-gradient(30deg, rgba(255,255,255,.08) 12%, transparent 12.5%, transparent 87%, rgba(255,255,255,.08) 87.5%, rgba(255,255,255,.08)),
        linear-gradient(150deg, rgba(255,255,255,.08) 12%, transparent 12.5%, transparent 87%, rgba(255,255,255,.08) 87.5%, rgba(255,255,255,.08)),
        linear-gradient(30deg, rgba(255,255,255,.08) 12%, transparent 12.5%, transparent 87%, rgba(255,255,255,.08) 87.5%, rgba(255,255,255,.08)),
        linear-gradient(150deg, rgba(255,255,255,.08) 12%, transparent 12.5%, transparent 87%, rgba(255,255,255,.08) 87.5%, rgba(255,255,255,.08));
    background-size: 74px 128px;
    background-position: 0 0, 0 0, 37px 64px, 37px 64px;
}
body.home-reference-design .home-hero-overlay {
    position: absolute;
    inset: auto 0 0;
    height: 120px;
    z-index: -1;
    background: linear-gradient(180deg, transparent, rgba(0,0,0,.22));
}
body.home-reference-design .home-directory-hero.simple-hero .container,
body.home-reference-design .home-hero-inner {
    display: grid;
    justify-items: center;
    gap: 1.45rem;
    padding: 0;
    max-width: var(--container);
    background: transparent;
    border: 0;
    box-shadow: none;
}
body.home-reference-design .home-hero-copy {
    max-width: 860px;
    text-align: center;
}
body.home-reference-design .home-directory-hero.simple-hero .eyebrow {
    color: #5eead4;
}
body.home-reference-design .home-directory-hero.simple-hero h1 {
    margin: .45rem 0 .55rem;
    font-size: clamp(2.25rem, 5.4vw, 4.65rem);
    line-height: .98;
    letter-spacing: -.07em;
    color: #fff;
}
body.home-reference-design .home-directory-hero.simple-hero p {
    max-width: 720px;
    margin: 0 auto;
    color: rgba(255,255,255,.76);
    font-size: clamp(.95rem, 1.35vw, 1.12rem);
}
body.home-reference-design .tools-control-bar {
    width: min(920px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 0;
    padding: 0;
    margin: .25rem 0 0;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 28px 70px rgba(0,0,0,.25);
    backdrop-filter: none;
}
body.home-reference-design .tools-control-left {
    display: grid;
    grid-template-columns: minmax(190px, 255px) minmax(260px, 1fr);
    width: 100%;
    gap: 0;
}
body.home-reference-design .filter-field {
    position: relative;
    display: grid;
    gap: .18rem;
    min-height: 68px;
    padding: .7rem .95rem;
    border-right: 1px solid #e8eef5;
    background: #fff;
}
body.home-reference-design .filter-field span:first-child {
    color: #8a95a6;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .09em;
    text-transform: uppercase;
}
body.home-reference-design .filter-field select,
body.home-reference-design .filter-field input {
    min-height: 31px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #0f172a;
    font-weight: 750;
}
body.home-reference-design .filter-field input::placeholder {
    color: #94a3b8;
    font-weight: 650;
}
body.home-reference-design .filter-field select:focus,
body.home-reference-design .filter-field input:focus {
    box-shadow: none;
    outline: none;
}
body.home-reference-design .category-select-arrow {
    right: 0;
    width: 24px;
    height: 24px;
    color: #0f766e;
    background: rgba(20, 184, 166, .1);
}
body.home-reference-design .tools-count-box {
    min-width: 128px;
    min-height: 68px;
    padding: .75rem 1rem;
    border: 0;
    border-radius: 0;
    background: linear-gradient(135deg, #14b8a6, #0f766e);
    color: #fff;
    box-shadow: none;
}
body.home-reference-design .tools-count-box strong {
    font-size: 1.45rem;
    color: #fff;
}
body.home-reference-design .tools-count-box span {
    color: rgba(255,255,255,.86);
}
body.home-reference-design .home-stats-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 2.2rem;
    margin-top: .25rem;
}
body.home-reference-design .home-stats-row span {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    color: rgba(255,255,255,.82);
    font-weight: 800;
}
body.home-reference-design .home-stats-row span::before {
    content: "";
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: rgba(45, 212, 191, .22);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}
body.home-reference-design .home-stats-row strong {
    color: #fff;
    font-size: 1.05rem;
}
body.home-reference-design .tool-directory-section.compact-directory {
    padding: 38px 0 66px;
    background: #fff;
}
body.home-reference-design .directory-heading-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
body.home-reference-design .directory-heading-row h2 {
    margin: .25rem 0 0;
    font-size: clamp(1.75rem, 3.4vw, 3rem);
    line-height: 1;
    letter-spacing: -.055em;
    color: #111827;
}
body.home-reference-design .directory-heading-row .eyebrow {
    color: #0f766e;
}
body.home-reference-design .category-section-list {
    display: grid;
    gap: 1.15rem;
}
body.home-reference-design .tool-category-block {
    overflow: hidden;
    border: 1px solid #edf1f6;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 16px 45px rgba(15, 23, 42, .045);
    transform: none;
}
body.home-reference-design .tool-category-block:hover {
    border-color: #dbe8ee;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .06);
}
body.home-reference-design .tool-category-header {
    position: static;
    padding: 0;
    border-bottom: 1px solid #edf1f6;
    background: #fff;
    backdrop-filter: none;
}
body.home-reference-design .category-toggle {
    min-height: 84px;
    grid-template-columns: 50px minmax(0, 1fr) auto;
    padding: 1.05rem 1.2rem;
    background: #fff;
}
body.home-reference-design .category-toggle:hover,
body.home-reference-design .category-toggle:focus-visible {
    background: #fbfefe;
    box-shadow: none;
}
body.home-reference-design .category-header-icon {
    width: 46px;
    height: 46px;
    border-radius: 999px;
    color: #0f766e;
    background: rgba(20,184,166,.12);
    border: 1px solid rgba(20,184,166,.18);
    box-shadow: none;
}
body.home-reference-design .category-header-content strong {
    color: #111827;
    font-size: 1.12rem;
    letter-spacing: -.025em;
}
body.home-reference-design .category-header-content small {
    color: #64748b;
    font-size: .9rem;
}
body.home-reference-design .category-header-count {
    color: #0f766e;
    border-color: rgba(20,184,166,.18);
    background: rgba(20,184,166,.08);
}
body.home-reference-design .category-collapse-icon {
    border-color: #e2e8f0;
    background: #fff;
    color: #64748b;
}
body.home-reference-design .tool-category-block:not(.is-collapsed) .category-collapse-icon {
    background: #14b8a6;
    color: #fff;
}
body.home-reference-design .tool-row-list {
    padding: .35rem 1rem 1rem;
    background: #fff;
}
body.home-reference-design .tool-row {
    min-height: 82px;
    grid-template-columns: 50px minmax(0, 1fr) 118px 38px;
    gap: .9rem;
    margin-top: .65rem;
    padding: .95rem 1rem;
    border: 1px solid #edf1f6;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .035);
    transform: none;
}
body.home-reference-design .tool-row::before,
body.home-reference-design .tool-row::after {
    display: none;
}
body.home-reference-design .tool-row:hover,
body.home-reference-design .tool-row:focus-visible {
    padding: .95rem 1rem;
    border-color: rgba(20,184,166,.22);
    background: #fcfffe;
    box-shadow: 0 16px 36px rgba(15, 23, 42, .06);
    transform: translateY(-1px);
}
body.home-reference-design .tool-row-icon {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    color: #0f766e;
    background: rgba(20,184,166,.1);
    border-color: rgba(20,184,166,.16);
}
body.home-reference-design .tool-row-content strong {
    color: #111827;
    font-size: 1.04rem;
}
body.home-reference-design .tool-row-content small {
    max-width: 780px;
    color: #64748b;
}
body.home-reference-design .tool-row::after {
    display: none;
}
body.home-reference-design .tool-row-arrow {
    justify-self: end;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    color: #0f766e;
    border-color: rgba(20,184,166,.2);
    background: rgba(20,184,166,.08);
}
body.home-reference-design .tool-row:hover .tool-row-arrow,
body.home-reference-design .tool-row:focus-visible .tool-row-arrow {
    color: #fff;
    border-color: transparent;
    background: #14b8a6;
    transform: translateX(2px);
}
body.home-reference-design .tool-row.is-disabled {
    opacity: .55;
    background: #f8fafc;
    box-shadow: none;
}
body.home-reference-design .tool-row.is-disabled:hover,
body.home-reference-design .tool-row.is-disabled:focus-visible {
    padding: .95rem 1rem;
    border-color: #edf1f6;
    background: #f8fafc;
    transform: none;
    box-shadow: none;
}
body.home-reference-design .tool-row.is-disabled .tool-row-arrow,
body.home-reference-design .tool-row.is-disabled:hover .tool-row-arrow,
body.home-reference-design .tool-row.is-disabled:focus-visible .tool-row-arrow {
    color: #94a3b8;
    border-color: #e2e8f0;
    background: #f1f5f9;
}
body.home-reference-design .empty-state {
    margin-top: 1rem;
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #64748b;
}
body.home-reference-design .site-footer {
    margin-top: 0;
    background: #08111f;
    color: rgba(255,255,255,.82);
    border-top: 0;
}
body.home-reference-design .site-footer p,
body.home-reference-design .site-footer a {
    color: rgba(255,255,255,.7);
}
body.home-reference-design .site-footer a:hover {
    color: #5eead4;
}

@media (max-width: 920px) {
    body.home-reference-design .home-directory-hero.simple-hero {
        padding: 52px 0 42px;
        min-height: auto;
    }
    body.home-reference-design .tools-control-bar {
        grid-template-columns: 1fr;
        max-width: 660px;
    }
    body.home-reference-design .tools-control-left {
        grid-template-columns: 1fr;
    }
    body.home-reference-design .filter-field {
        border-right: 0;
        border-bottom: 1px solid #e8eef5;
    }
    body.home-reference-design .tools-count-box {
        min-height: 58px;
    }
    body.home-reference-design .home-stats-row span::before {
        width: 34px;
        height: 34px;
    }
    body.home-reference-design .tool-row {
        grid-template-columns: 46px minmax(0, 1fr) 34px;
    }
}
@media (max-width: 620px) {
    body.home-reference-design .header-inner {
        padding: 10px 0;
    }
    body.home-reference-design .brand small {
        display: none;
    }
    body.home-reference-design .home-directory-hero.simple-hero {
        padding: 38px 0 32px;
    }
    body.home-reference-design .home-directory-hero.simple-hero h1 {
        font-size: 2.35rem;
    }
    body.home-reference-design .home-stats-row {
        gap: .75rem;
    }
    body.home-reference-design .home-stats-row span {
        font-size: .88rem;
    }
    body.home-reference-design .directory-heading-row h2 {
        font-size: 2rem;
    }
    body.home-reference-design .category-toggle {
        grid-template-columns: 42px minmax(0, 1fr);
        gap: .75rem;
        padding: .95rem;
    }
    body.home-reference-design .category-header-meta {
        grid-column: 2;
        padding-left: 0;
        justify-content: flex-start;
    }
    body.home-reference-design .tool-row-list {
        padding: .15rem .75rem .85rem;
    }
    body.home-reference-design .tool-row {
        grid-template-columns: 42px minmax(0, 1fr) 32px;
        gap: .65rem;
        border-radius: 14px;
    }
    body.home-reference-design .tool-row-icon {
        width: 38px;
        height: 38px;
    }
    body.home-reference-design .tool-row-content small {
        font-size: .84rem;
    }
}

/* Accordion fix only: make the category header button control the full row cleanly. */
.tool-category-header {
    display: block;
    padding: 0;
    position: static;
}

.category-toggle {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    border: 0;
    margin: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: .85rem;
    padding: 1rem 1.05rem;
}

.category-toggle:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--primary) 24%, transparent);
    outline-offset: -3px;
}

.category-header-meta {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: .65rem;
    min-width: max-content;
}

.category-collapse-icon {
    width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface-strong) 74%, transparent);
    color: var(--muted);
    line-height: 1;
    transition: transform .18s ease, color .18s ease, background .18s ease, border-color .18s ease;
}

.category-toggle:hover .category-collapse-icon,
.category-toggle:focus-visible .category-collapse-icon {
    color: var(--primary);
    border-color: color-mix(in srgb, var(--primary) 28%, var(--line));
    background: color-mix(in srgb, var(--primary-soft) 62%, var(--surface-strong));
}

.tool-category-block.is-collapsed .tool-category-header {
    border-bottom: 0;
}

.tool-category-block.is-collapsed .category-collapse-icon {
    transform: rotate(-90deg);
}

.tool-category-block .tool-row-list[hidden],
.tool-category-block.is-collapsed .tool-row-list {
    display: none !important;
}

@media (max-width: 860px) {
    .category-toggle {
        grid-template-columns: 44px minmax(0, 1fr) auto;
        padding: .9rem;
    }

    .category-header-meta {
        grid-column: 3;
    }
}

@media (max-width: 560px) {
    .category-toggle {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: .65rem;
        padding: .82rem;
    }

    .category-header-meta {
        grid-column: 2;
        justify-self: start;
        margin-top: .2rem;
    }
}


/* Premium homepage UI generated from the approved mockup */
.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.home-premium-tools-ui {
    --hero-dark: #030915;
    --hero-mid: #071427;
    --hero-blue: #0d8cff;
    --hero-cyan: #11c5ff;
    --hero-purple: #9658ff;
    --panel-line: rgba(18, 35, 66, .105);
    background: #f7f9fd;
}

body.home-premium-tools-ui .site-header {
    position: absolute;
    inset: 0 0 auto 0;
    z-index: 60;
    background: linear-gradient(180deg, rgba(2, 7, 18, .94), rgba(2, 7, 18, .72));
    border-bottom: 1px solid rgba(255,255,255,.08);
    box-shadow: none;
    backdrop-filter: blur(18px);
}

body.home-premium-tools-ui .header-inner {
    min-height: 70px;
    padding: 12px 0;
}

body.home-premium-tools-ui .brand {
    gap: .62rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #fff;
    box-shadow: none;
}

body.home-premium-tools-ui .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 0;
    background: transparent;
    color: #eaf4ff;
    box-shadow: none;
}

body.home-premium-tools-ui .brand-text strong {
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: -.04em;
    color: #f8fbff;
}

body.home-premium-tools-ui .brand-text strong span {
    color: #158bff;
}

body.home-premium-tools-ui .site-nav {
    gap: 1rem;
}

body.home-premium-tools-ui .site-nav a {
    position: relative;
    min-height: 52px;
    padding: .7rem .85rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: rgba(255,255,255,.86);
    font-weight: 800;
}

body.home-premium-tools-ui .site-nav a.active,
body.home-premium-tools-ui .site-nav a:hover {
    color: #fff;
    background: transparent;
}

body.home-premium-tools-ui .site-nav a.active::after,
body.home-premium-tools-ui .site-nav a:hover::after {
    content: "";
    position: absolute;
    left: .45rem;
    right: .45rem;
    bottom: 0;
    height: 3px;
    border-radius: 99px 99px 0 0;
    background: linear-gradient(90deg, #158bff, #7c5cff);
    box-shadow: 0 0 22px rgba(21,139,255,.72);
}

body.home-premium-tools-ui .theme-toggle {
    width: 46px;
    height: 46px;
    min-height: 46px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255,255,255,.1);
    background: rgba(255,255,255,.08);
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 12px 30px rgba(0,0,0,.24);
}

body.home-premium-tools-ui .nav-toggle {
    border-color: rgba(255,255,255,.14);
    background: rgba(255,255,255,.08);
    color: #fff;
}

.home-premium-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 456px;
    padding: 104px 0 124px;
    background:
        radial-gradient(circle at 16% 38%, rgba(16, 135, 255, .36), transparent 15rem),
        radial-gradient(circle at 84% 38%, rgba(16, 135, 255, .32), transparent 16rem),
        linear-gradient(180deg, #020611 0%, #071225 62%, #061222 100%);
    color: #fff;
}

.home-premium-hero::before,
.home-premium-hero::after {
    content: "";
    position: absolute;
    z-index: -2;
    inset: auto -10% 0 -10%;
    height: 62%;
    opacity: .9;
    background:
        radial-gradient(circle at 20% 58%, rgba(0, 153, 255, .9) 0 1px, transparent 1.8px),
        radial-gradient(circle at 65% 46%, rgba(80, 190, 255, .72) 0 1px, transparent 1.6px);
    background-size: 28px 20px, 34px 26px;
    transform: skewY(-7deg) translateY(42px);
    mask-image: linear-gradient(90deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
}

.home-premium-hero::after {
    inset: 4% -12% auto -12%;
    height: 62%;
    opacity: .38;
    transform: skewY(8deg) translateY(20px);
    background-size: 30px 24px;
}

.hero-wave {
    position: absolute;
    z-index: -1;
    width: 54vw;
    height: 260px;
    bottom: 54px;
    opacity: .64;
    border: 1px solid rgba(39, 167, 255, .2);
    border-color: rgba(40,170,255,.22) transparent transparent transparent;
    border-radius: 50% 50% 0 0;
    filter: drop-shadow(0 0 30px rgba(21,139,255,.44));
}

.hero-wave-left { left: -10vw; transform: rotate(-7deg); }
.hero-wave-right { right: -10vw; transform: rotate(7deg); }

.hero-stars {
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: .42;
    background-image:
        radial-gradient(circle at 13% 31%, #2fb2ff 0 2px, transparent 2.5px),
        radial-gradient(circle at 29% 63%, #0d8cff 0 1.5px, transparent 2px),
        radial-gradient(circle at 70% 26%, #36c3ff 0 1.5px, transparent 2px),
        radial-gradient(circle at 89% 48%, #168fff 0 2px, transparent 2.5px);
}

.home-premium-hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 18px;
    padding: .42rem 1rem;
    border: 1px solid rgba(21, 139, 255, .55);
    border-radius: 999px;
    background: rgba(0, 24, 58, .54);
    color: #25a8ff;
    font-size: .78rem;
    line-height: 1;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 28px rgba(21,139,255,.18);
}

.home-premium-hero h1 {
    margin: 0;
    font-size: clamp(2.7rem, 5.8vw, 5rem);
    line-height: .98;
    letter-spacing: -.07em;
    font-weight: 950;
    color: #fff;
    text-shadow: 0 18px 50px rgba(0,0,0,.34);
}

.hero-gradient-line {
    margin: .7rem 0 0;
    font-size: clamp(1.55rem, 3.7vw, 3rem);
    line-height: 1.05;
    letter-spacing: -.05em;
    font-weight: 930;
    background: linear-gradient(90deg, #1dc7ff 8%, #338cff 46%, #a95dff 92%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-summary {
    margin: 1.05rem 0 0;
    max-width: 760px;
    color: rgba(255,255,255,.74);
    font-size: clamp(.98rem, 1.55vw, 1.17rem);
    line-height: 1.62;
}

.hero-trust-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.4rem 2.15rem;
    margin-top: 1.7rem;
    color: rgba(255,255,255,.86);
    font-weight: 750;
}

.hero-trust-row > span {
    display: inline-flex;
    align-items: center;
    gap: .62rem;
}

.trust-icon {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(21,139,255,.42);
    border-radius: 999px;
    background: rgba(8,23,49,.62);
    color: #23a1ff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 18px rgba(21,139,255,.2);
}

.premium-tools-section {
    position: relative;
    z-index: 5;
    padding: 0 0 64px;
    margin-top: -66px;
    background: linear-gradient(180deg, transparent 0, #f7f9fd 66px, #f7f9fd 100%);
}

.tools-browser-shell {
    padding: 24px 28px 28px;
    border: 1px solid rgba(15, 23, 42, .1);
    border-radius: 22px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 32px 80px rgba(15, 23, 42, .15), inset 0 1px 0 rgba(255,255,255,.88);
    backdrop-filter: blur(18px);
}

body.home-premium-tools-ui .tools-control-bar {
    position: relative;
    top: auto;
    z-index: 10;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 22px;
    margin: 0 0 20px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

body.home-premium-tools-ui .tools-control-left {
    display: grid;
    grid-template-columns: 238px minmax(260px, 1fr);
    align-items: center;
    gap: 18px;
}

body.home-premium-tools-ui .filter-field {
    display: block;
    min-width: 0;
}

.category-select-wrap,
.search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 48px;
    border: 1px solid rgba(15,23,42,.12);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15,23,42,.04), inset 0 1px 0 rgba(255,255,255,.85);
}

.category-select-wrap select,
.search-input-wrap input {
    width: 100%;
    min-height: 48px;
    padding: 0 46px 0 52px;
    border: 0 !important;
    border-radius: 12px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #172033;
    font-weight: 760;
    outline: 0;
}

.search-input-wrap input {
    font-weight: 650;
}

.category-select-wrap select {
    appearance: none;
    cursor: pointer;
}

.control-icon {
    position: absolute;
    left: 18px;
    z-index: 2;
    display: inline-flex;
    color: #516079;
    pointer-events: none;
}

.category-select-arrow {
    position: absolute;
    right: 16px;
    z-index: 2;
    display: inline-flex;
    color: #5a6780;
    pointer-events: none;
}

.search-input-wrap kbd {
    position: absolute;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 26px;
    padding: 0 .5rem;
    border: 0;
    border-radius: 8px;
    background: #f1f4f9;
    color: #7c879a;
    font-size: .78rem;
    font-weight: 850;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}

body.home-premium-tools-ui .tools-count-box {
    min-width: 116px;
    min-height: 48px;
    display: inline-flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: .32rem;
    padding: .55rem .9rem;
    border: 0;
    border-radius: 12px;
    background: #eaf2ff;
    color: #0864de;
    box-shadow: none;
}

body.home-premium-tools-ui .tools-count-box strong,
body.home-premium-tools-ui .tools-count-box span {
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: -.025em;
    color: #0864de;
}

body.home-premium-tools-ui .category-section-list {
    gap: 10px;
}

body.home-premium-tools-ui .tool-category-block {
    overflow: hidden;
    border: 1px solid rgba(18, 35, 66, .105);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15,23,42,.04);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

body.home-premium-tools-ui .tool-category-block:hover {
    transform: none;
    border-color: rgba(21,139,255,.18);
    box-shadow: 0 16px 36px rgba(15,23,42,.06);
}

body.home-premium-tools-ui .tool-category-block:not(.is-collapsed) {
    border-color: rgba(21,139,255,.28);
    box-shadow: 0 18px 44px rgba(21, 91, 170, .08);
}

body.home-premium-tools-ui .tool-category-block:not(.is-collapsed)::before {
    content: "";
    position: absolute;
}

body.home-premium-tools-ui .tool-category-header {
    position: relative;
    top: auto;
    z-index: 1;
    padding: 0;
    border-bottom: 0;
    background: transparent;
    backdrop-filter: none;
}

body.home-premium-tools-ui .category-toggle {
    width: 100%;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    min-height: 74px;
    padding: 12px 16px;
    border: 0;
    background:
        linear-gradient(90deg, rgba(21,139,255,.035), transparent 44%),
        #fff;
    text-align: left;
}

body.home-premium-tools-ui .tool-category-block:not(.is-collapsed) .category-toggle {
    background: linear-gradient(90deg, rgba(21,139,255,.08), rgba(255,255,255,1) 40%);
    box-shadow: inset 3px 0 0 #157fff;
}

body.home-premium-tools-ui .category-header-icon {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 13px;
    background: linear-gradient(135deg, #0d7cff, #4d68ff);
    color: #fff;
    font-size: .78rem;
    font-weight: 950;
    line-height: 1;
    box-shadow: 0 14px 24px rgba(13,124,255,.18), inset 0 1px 0 rgba(255,255,255,.24);
}

body.home-premium-tools-ui .tool-category-block:nth-child(4n+2) .category-header-icon { background: linear-gradient(135deg, #13b981, #16c6a3); box-shadow: 0 14px 24px rgba(19,185,129,.16), inset 0 1px 0 rgba(255,255,255,.24); }
body.home-premium-tools-ui .tool-category-block:nth-child(4n+3) .category-header-icon { background: linear-gradient(135deg, #ff7b22, #ff9e19); box-shadow: 0 14px 24px rgba(255,123,34,.16), inset 0 1px 0 rgba(255,255,255,.24); }
body.home-premium-tools-ui .tool-category-block:nth-child(4n+4) .category-header-icon { background: linear-gradient(135deg, #8d43e8, #b15cff); box-shadow: 0 14px 24px rgba(141,67,232,.16), inset 0 1px 0 rgba(255,255,255,.24); }

body.home-premium-tools-ui .category-header-content strong {
    display: block;
    color: #101828;
    font-size: 1.13rem;
    line-height: 1.15;
    font-weight: 950;
    letter-spacing: -.035em;
}

body.home-premium-tools-ui .category-header-content small {
    display: block;
    margin-top: .22rem;
    color: #667085;
    font-size: .9rem;
    line-height: 1.35;
    font-weight: 620;
}

body.home-premium-tools-ui .category-header-meta {
    display: flex;
    align-items: center;
    gap: 16px;
}

body.home-premium-tools-ui .category-header-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 74px;
    height: 32px;
    padding: 0 .75rem;
    border: 0;
    border-radius: 9px;
    background: #eef4fb;
    color: #0665dc;
    font-size: .8rem;
    font-weight: 950;
    text-transform: none;
    letter-spacing: 0;
}

body.home-premium-tools-ui .category-collapse-icon {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(21, 139, 255, .26);
    border-radius: 14px;
    background: #fff;
    color: #0d72ee;
    box-shadow: 0 8px 18px rgba(15,23,42,.075), inset 0 1px 0 rgba(255,255,255,.85);
    transition: transform .22s ease, background .22s ease, border-color .22s ease, color .22s ease;
}

body.home-premium-tools-ui .tool-category-block.is-collapsed .category-collapse-icon {
    transform: rotate(180deg);
    border-color: rgba(15,23,42,.1);
    color: #26364f;
}

body.home-premium-tools-ui .category-toggle:hover .category-collapse-icon,
body.home-premium-tools-ui .category-toggle:focus-visible .category-collapse-icon {
    background: #eef6ff;
    border-color: rgba(21,139,255,.34);
}

body.home-premium-tools-ui .tool-row-list {
    display: block;
    padding: 0 16px 12px;
    background: linear-gradient(180deg, rgba(245, 249, 255, .78), rgba(255,255,255,1));
}

body.home-premium-tools-ui .tool-row-list[hidden] {
    display: none !important;
}

body.home-premium-tools-ui .tool-row {
    display: grid;
    grid-template-columns: 46px minmax(0,1fr) auto;
    align-items: center;
    gap: 16px;
    min-height: 58px;
    padding: 8px 2px;
    border-bottom: 1px solid rgba(18, 35, 66, .085);
    background: transparent;
    color: inherit;
    box-shadow: none;
    transition: background .18s ease, transform .18s ease, padding .18s ease;
}

body.home-premium-tools-ui .tool-row::before,
body.home-premium-tools-ui .tool-row::after {
    display: none !important;
}

body.home-premium-tools-ui .tool-row:hover,
body.home-premium-tools-ui .tool-row:focus-visible {
    padding-inline: 8px;
    border-radius: 10px;
    background: #f6faff;
    transform: translateY(-1px);
    box-shadow: none;
    outline: none;
}

body.home-premium-tools-ui .tool-row-icon {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(21,139,255,.1);
    border-radius: 10px;
    background: #eef5ff;
    color: #156fe8;
    font-size: 1.05rem;
    font-weight: 900;
    box-shadow: none;
}

body.home-premium-tools-ui .tool-row:nth-child(3n+2) .tool-row-icon { color: #0c9f70; background: #eafaf4; border-color: rgba(12,159,112,.12); }
body.home-premium-tools-ui .tool-row:nth-child(3n+3) .tool-row-icon { color: #8048e8; background: #f2edff; border-color: rgba(128,72,232,.12); }

body.home-premium-tools-ui .tool-row-content strong {
    color: #151d30;
    font-size: .93rem;
    line-height: 1.12;
    font-weight: 950;
    letter-spacing: -.02em;
}

body.home-premium-tools-ui .tool-row-content small {
    display: block;
    margin-top: .18rem;
    color: #667085;
    font-size: .84rem;
    line-height: 1.25;
    font-weight: 570;
}

body.home-premium-tools-ui .tool-row-arrow {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(15,23,42,.12);
    border-radius: 10px;
    background: #fff;
    color: #3d4b62;
    box-shadow: 0 4px 12px rgba(15,23,42,.045);
    transition: background .18s ease, color .18s ease, transform .18s ease, border-color .18s ease;
}

body.home-premium-tools-ui .tool-row:hover .tool-row-arrow,
body.home-premium-tools-ui .tool-row:focus-visible .tool-row-arrow {
    background: #157fff;
    color: #fff;
    border-color: #157fff;
    transform: translate(2px, -2px);
}

body.home-premium-tools-ui .tool-row.is-disabled {
    opacity: .72;
    cursor: not-allowed;
}

body.home-premium-tools-ui .tool-row.is-disabled:hover,
body.home-premium-tools-ui .tool-row.is-disabled:focus-visible {
    padding-inline: 2px;
    transform: none;
    border-radius: 0;
    background: transparent;
}

body.home-premium-tools-ui .tool-row.is-disabled .tool-row-icon {
    filter: grayscale(.65);
    color: #59677b;
    background: #f3f5f8;
    border-color: rgba(15,23,42,.08);
}

.tool-row-planned {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    min-height: 30px;
    padding: .25rem .7rem;
    border-radius: 8px;
    background: #f1f4f9;
    color: #667085;
    font-size: .79rem;
    font-weight: 850;
}

body.home-premium-tools-ui .empty-state {
    margin-top: 14px;
    border-radius: 12px;
    background: #f6faff;
    color: #667085;
}

@media (max-width: 900px) {
    body.home-premium-tools-ui .site-header { position: sticky; }
    body.home-premium-tools-ui .site-nav { background: rgba(2,7,18,.92); border-color: rgba(255,255,255,.1); }
    .home-premium-hero { padding: 74px 0 104px; min-height: auto; }
    .home-premium-hero h1 { font-size: clamp(2.45rem, 9vw, 4rem); }
    .hero-gradient-line { font-size: clamp(1.6rem, 6.5vw, 2.65rem); }
    .premium-tools-section { margin-top: -50px; }
    .tools-browser-shell { padding: 18px; border-radius: 18px; }
    body.home-premium-tools-ui .tools-control-bar { grid-template-columns: 1fr; gap: 14px; }
    body.home-premium-tools-ui .tools-control-left { grid-template-columns: 1fr; gap: 12px; }
    body.home-premium-tools-ui .tools-count-box { width: 100%; }
    body.home-premium-tools-ui .category-toggle { grid-template-columns: 48px minmax(0,1fr); }
    body.home-premium-tools-ui .category-header-meta { grid-column: 1 / -1; justify-content: space-between; padding-left: 64px; }
}

@media (max-width: 620px) {
    body.home-premium-tools-ui .brand-text strong { font-size: 1.08rem; }
    body.home-premium-tools-ui .brand-mark { width: 34px; height: 34px; }
    .home-premium-hero { padding-top: 88px; }
    .hero-summary br { display: none; }
    .hero-trust-row { gap: .8rem; align-items: stretch; }
    .hero-trust-row > span { width: 100%; justify-content: center; }
    body.home-premium-tools-ui .tool-row { grid-template-columns: 42px minmax(0,1fr); }
    body.home-premium-tools-ui .tool-row-arrow,
    .tool-row-planned { grid-column: 2; justify-self: start; margin-top: .25rem; }
}

/* Premium home UI refinement: lighter hero + softer font weights */
body.home-premium-tools-ui {
    background: #f8fbff;
}

body.home-premium-tools-ui .site-header {
    background: rgba(255, 255, 255, .78);
    border-bottom: 1px solid rgba(25, 92, 169, .10);
    box-shadow: 0 12px 32px rgba(31, 72, 124, .08);
    backdrop-filter: blur(20px);
}

body.home-premium-tools-ui .brand,
body.home-premium-tools-ui .brand-text strong,
body.home-premium-tools-ui .site-nav a {
    color: #14243d;
}

body.home-premium-tools-ui .brand-text strong {
    font-weight: 720;
    letter-spacing: -.025em;
}

body.home-premium-tools-ui .brand-text strong span {
    color: #1277e7;
}

body.home-premium-tools-ui .site-nav a {
    font-weight: 620;
}

body.home-premium-tools-ui .site-nav a.active,
body.home-premium-tools-ui .site-nav a:hover {
    color: #0b63d8;
}

body.home-premium-tools-ui .theme-toggle,
body.home-premium-tools-ui .nav-toggle {
    border-color: rgba(26, 83, 153, .14);
    background: rgba(255, 255, 255, .82);
    color: #244160;
    box-shadow: 0 10px 26px rgba(31, 72, 124, .12), inset 0 1px 0 rgba(255,255,255,.9);
}

.home-premium-hero {
    min-height: 430px;
    padding: 104px 0 116px;
    background:
        radial-gradient(circle at 18% 28%, rgba(77, 163, 255, .34), transparent 17rem),
        radial-gradient(circle at 86% 32%, rgba(149, 118, 255, .22), transparent 18rem),
        radial-gradient(circle at 48% 105%, rgba(36, 190, 255, .18), transparent 19rem),
        linear-gradient(180deg, #f4f9ff 0%, #edf7ff 55%, #f9fcff 100%);
    color: #14243d;
}

.home-premium-hero::before,
.home-premium-hero::after {
    opacity: .28;
    background:
        radial-gradient(circle at 20% 58%, rgba(25, 129, 235, .72) 0 1px, transparent 1.8px),
        radial-gradient(circle at 65% 46%, rgba(71, 178, 238, .58) 0 1px, transparent 1.6px);
    filter: blur(.15px);
}

.home-premium-hero::after {
    opacity: .18;
}

.hero-wave {
    opacity: .34;
    border-color: rgba(30, 134, 238, .22) transparent transparent transparent;
    filter: drop-shadow(0 0 28px rgba(47, 142, 255, .18));
}

.hero-stars {
    opacity: .28;
    background-image:
        radial-gradient(circle at 13% 31%, rgba(43, 140, 239, .72) 0 2px, transparent 2.5px),
        radial-gradient(circle at 29% 63%, rgba(13, 116, 224, .55) 0 1.5px, transparent 2px),
        radial-gradient(circle at 70% 26%, rgba(82, 176, 239, .64) 0 1.5px, transparent 2px),
        radial-gradient(circle at 89% 48%, rgba(22, 128, 226, .6) 0 2px, transparent 2.5px);
}

.hero-kicker {
    border-color: rgba(26, 119, 230, .22);
    background: rgba(255, 255, 255, .78);
    color: #0b70df;
    font-weight: 650;
    letter-spacing: .045em;
    box-shadow: 0 10px 28px rgba(31, 95, 170, .08), inset 0 1px 0 rgba(255,255,255,.9);
}

.home-premium-hero h1 {
    color: #10213b;
    font-weight: 700;
    letter-spacing: -.055em;
    text-shadow: none;
}

.hero-gradient-line {
    font-weight: 680;
    letter-spacing: -.035em;
    background: linear-gradient(90deg, #138bea 6%, #326df0 50%, #8d55f1 92%);
    -webkit-background-clip: text;
    background-clip: text;
}

.hero-summary {
    color: #51647d;
    font-weight: 430;
}

.hero-trust-row {
    color: #30455e;
    font-weight: 520;
}

.trust-icon {
    border-color: rgba(25, 119, 230, .18);
    background: rgba(255, 255, 255, .76);
    color: #1177e5;
    box-shadow: 0 8px 20px rgba(31, 95, 170, .08), inset 0 1px 0 rgba(255,255,255,.9);
}

.premium-tools-section {
    background: linear-gradient(180deg, transparent 0, #f8fbff 66px, #f8fbff 100%);
}

.tools-browser-shell {
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 26px 70px rgba(35, 72, 118, .12), inset 0 1px 0 rgba(255,255,255,.95);
}

.category-select-wrap select,
.search-input-wrap input {
    font-weight: 520;
}

.search-input-wrap kbd,
body.home-premium-tools-ui .tools-count-box strong,
body.home-premium-tools-ui .tools-count-box span,
body.home-premium-tools-ui .category-header-count,
.tool-row-planned {
    font-weight: 650;
}

body.home-premium-tools-ui .category-header-icon {
    font-weight: 700;
}

body.home-premium-tools-ui .category-header-content strong {
    font-weight: 700;
    letter-spacing: -.02em;
}

body.home-premium-tools-ui .category-header-content small {
    font-weight: 430;
}

body.home-premium-tools-ui .tool-row-icon {
    font-weight: 650;
}

body.home-premium-tools-ui .tool-row-content strong {
    font-weight: 650;
    letter-spacing: -.01em;
}

body.home-premium-tools-ui .tool-row-content small {
    font-weight: 420;
}

@media (max-width: 900px) {
    body.home-premium-tools-ui .site-header {
        position: sticky;
        background: rgba(255,255,255,.9);
    }

    body.home-premium-tools-ui .site-nav {
        background: rgba(255,255,255,.96);
        border-color: rgba(25, 92, 169, .12);
    }

    .home-premium-hero {
        padding: 78px 0 100px;
    }
}

/* Hero refinement v1.5.5: shorter section, softer alignment, cleaner visual balance */
body.home-premium-tools-ui .site-header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, .86);
    border-bottom: 1px solid rgba(25, 92, 169, .10);
    box-shadow: 0 10px 28px rgba(31, 72, 124, .075);
}

.home-premium-hero {
    min-height: 286px;
    padding: 44px 0 72px;
    background:
        radial-gradient(circle at 12% 18%, rgba(74, 163, 255, .24), transparent 17rem),
        radial-gradient(circle at 88% 8%, rgba(142, 119, 255, .18), transparent 18rem),
        linear-gradient(180deg, #f8fbff 0%, #edf7ff 68%, #f8fbff 100%);
    border-bottom: 1px solid rgba(25, 92, 169, .08);
}

.home-premium-hero::before,
.home-premium-hero::after,
.hero-wave {
    opacity: .14;
}

.hero-stars {
    opacity: .18;
}

.home-premium-hero-inner {
    max-width: 920px;
    min-height: 170px;
    justify-content: center;
    margin-inline: auto;
    gap: 0;
}

.hero-kicker {
    margin-bottom: 12px;
    padding: .34rem .82rem;
    font-size: .72rem;
    font-weight: 620;
    letter-spacing: .035em;
    background: rgba(255, 255, 255, .86);
}

.home-premium-hero h1 {
    max-width: 820px;
    font-size: clamp(2rem, 4vw, 3.35rem);
    line-height: 1.04;
    letter-spacing: -.045em;
    font-weight: 680;
}

.hero-gradient-line {
    max-width: 760px;
    margin-top: .44rem;
    font-size: clamp(1.02rem, 2vw, 1.55rem);
    line-height: 1.22;
    letter-spacing: -.022em;
    font-weight: 560;
}

.hero-summary {
    max-width: 660px;
    margin-top: .62rem;
    font-size: clamp(.94rem, 1.15vw, 1.02rem);
    line-height: 1.55;
    color: #55677f;
}

.hero-trust-row {
    margin-top: 1rem;
    gap: .6rem .9rem;
    font-size: .9rem;
}

.hero-trust-row > span {
    gap: .42rem;
    padding: .28rem .56rem;
    border: 1px solid rgba(25, 119, 230, .10);
    border-radius: 999px;
    background: rgba(255, 255, 255, .55);
}

.trust-icon {
    width: 26px;
    height: 26px;
    font-size: .78rem;
}

.premium-tools-section {
    margin-top: -38px;
    background: linear-gradient(180deg, transparent 0, #f8fbff 38px, #f8fbff 100%);
}

.tools-browser-shell {
    border-radius: 18px;
    box-shadow: 0 22px 56px rgba(35, 72, 118, .11), inset 0 1px 0 rgba(255,255,255,.95);
}

@media (max-width: 900px) {
    .home-premium-hero {
        min-height: 260px;
        padding: 34px 0 64px;
    }

    .home-premium-hero-inner {
        min-height: 150px;
    }

    .premium-tools-section {
        margin-top: -30px;
    }
}

@media (max-width: 620px) {
    .home-premium-hero {
        min-height: 245px;
        padding: 30px 0 58px;
    }

    .home-premium-hero h1 {
        font-size: clamp(1.86rem, 10vw, 2.55rem);
    }

    .hero-gradient-line {
        font-size: 1rem;
    }

    .hero-trust-row {
        display: grid;
        grid-template-columns: 1fr;
        width: min(100%, 320px);
        margin-inline: auto;
        gap: .45rem;
    }

    .hero-trust-row > span {
        width: 100%;
        justify-content: center;
    }
}


/* Hero video layout v1.5.6: left content + right autoplay tools advertisement */
.home-premium-hero.hero-with-video {
    min-height: 358px;
    padding: 38px 0 66px;
    background:
        radial-gradient(circle at 8% 16%, rgba(74, 163, 255, .22), transparent 16rem),
        radial-gradient(circle at 76% 18%, rgba(135, 113, 255, .16), transparent 18rem),
        linear-gradient(180deg, #f9fcff 0%, #edf7ff 68%, #f8fbff 100%);
}

.home-premium-hero.hero-with-video .home-premium-hero-inner {
    max-width: 1180px;
    min-height: 250px;
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(360px, .78fr);
    align-items: center;
    gap: clamp(24px, 5vw, 58px);
    text-align: left;
}

.hero-copy-left {
    min-width: 0;
}

.hero-copy-left .hero-kicker {
    justify-content: flex-start;
}

.hero-copy-left .hero-summary,
.hero-copy-left .hero-gradient-line,
.hero-copy-left h1 {
    margin-left: 0;
    margin-right: 0;
}

.home-premium-hero.hero-with-video h1 {
    max-width: 620px;
    font-size: clamp(2rem, 3.75vw, 3.3rem);
}

.home-premium-hero.hero-with-video .hero-gradient-line {
    max-width: 650px;
}

.home-premium-hero.hero-with-video .hero-summary {
    max-width: 590px;
}

.hero-copy-left .hero-trust-row {
    justify-content: flex-start;
}

.hero-video-side {
    width: 100%;
    min-width: 0;
}

.hero-video-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(25, 92, 169, .14);
    border-radius: 24px;
    background: rgba(255, 255, 255, .75);
    box-shadow: 0 24px 54px rgba(35, 72, 118, .16), inset 0 1px 0 rgba(255,255,255,.95);
    backdrop-filter: blur(18px);
}

.hero-video-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(28, 132, 238, .24), transparent 34%, rgba(135, 94, 238, .18));
    opacity: .72;
}

.hero-video-topbar {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: .42rem;
    padding: .72rem .9rem;
    border-bottom: 1px solid rgba(25, 92, 169, .10);
    background: rgba(255, 255, 255, .78);
    color: #536984;
    font-size: .78rem;
}

.hero-video-topbar span {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #d7e3f1;
}

.hero-video-topbar span:nth-child(1) { background: #ff7b7b; }
.hero-video-topbar span:nth-child(2) { background: #ffcc66; }
.hero-video-topbar span:nth-child(3) { background: #48d18a; }

.hero-video-topbar strong {
    margin-left: .32rem;
    color: #314761;
    font-weight: 650;
}

.hero-ad-video {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #0f172a;
}

.hero-video-caption {
    position: absolute;
    z-index: 3;
    left: 16px;
    right: 16px;
    bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    padding: .68rem .78rem;
    border: 1px solid rgba(255,255,255,.34);
    border-radius: 16px;
    background: rgba(255, 255, 255, .78);
    color: #233a56;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .16);
    backdrop-filter: blur(14px);
}

.hero-video-caption span {
    color: #0b70df;
    font-size: .78rem;
    font-weight: 620;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.hero-video-caption strong {
    font-size: .88rem;
    font-weight: 650;
}

@media (max-width: 980px) {
    .home-premium-hero.hero-with-video {
        padding: 34px 0 62px;
    }

    .home-premium-hero.hero-with-video .home-premium-hero-inner {
        grid-template-columns: 1fr;
        max-width: 720px;
        gap: 24px;
        text-align: center;
    }

    .hero-copy-left .hero-kicker,
    .hero-copy-left .hero-trust-row {
        justify-content: center;
    }

    .hero-copy-left .hero-summary,
    .hero-copy-left .hero-gradient-line,
    .hero-copy-left h1 {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-video-card {
        max-width: 560px;
        margin-inline: auto;
    }
}

@media (max-width: 620px) {
    .home-premium-hero.hero-with-video {
        min-height: auto;
        padding: 28px 0 56px;
    }

    .home-premium-hero.hero-with-video .home-premium-hero-inner {
        min-height: 0;
        gap: 18px;
    }

    .hero-video-card {
        border-radius: 18px;
    }

    .hero-video-topbar {
        padding: .58rem .7rem;
    }

    .hero-video-caption {
        position: static;
        margin: 10px;
        flex-direction: column;
        align-items: flex-start;
        gap: .25rem;
    }
}

/* JSON Formatter premium editor layout */
.json-tool-suite {
    display: grid;
    gap: 1.25rem;
}

.json-workspace-intro {
    align-items: center;
    padding: .35rem .15rem .85rem;
    border-bottom: 1px solid var(--line);
}

.json-workspace-intro h2 {
    font-size: clamp(1.35rem, 2vw, 1.85rem);
    letter-spacing: -.035em;
}

.json-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    justify-content: flex-end;
}

.json-editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(230px, 280px) minmax(0, 1fr);
    gap: 1rem;
    align-items: stretch;
}

.json-editor-panel,
.json-action-panel,
.json-howto-card, .json-howto-section {
    border: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
    border-radius: 24px;
    overflow: hidden;
    background: color-mix(in srgb, var(--surface-strong) 92%, transparent);
    box-shadow: 0 18px 45px rgba(15, 23, 42, .08);
}

.json-editor-panel {
    min-width: 0;
}

.json-panel-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    min-height: 48px;
    padding: .65rem .85rem;
    background: linear-gradient(135deg, #223348, #152133);
    color: #fff;
}

.json-topbar-left {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    min-width: 0;
}

.json-panel-topbar strong {
    font-size: .92rem;
    font-weight: 650;
    letter-spacing: -.01em;
    white-space: nowrap;
}

.json-status-dot {
    width: .68rem;
    height: .68rem;
    border-radius: 99px;
    background: #38bdf8;
    box-shadow: 0 0 0 5px rgba(56, 189, 248, .14);
}

.json-status-dot.output {
    background: #22c55e;
    box-shadow: 0 0 0 5px rgba(34, 197, 94, .14);
}

.json-toolbar-mini {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: rgba(255,255,255,.78);
    font-size: .78rem;
    font-weight: 650;
}

.json-toolbar-mini span {
    display: inline-grid;
    place-items: center;
    min-width: 26px;
    height: 26px;
    padding-inline: .45rem;
    border-radius: 999px;
    background: rgba(255,255,255,.09);
    border: 1px solid rgba(255,255,255,.1);
}

.json-code-editor {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    min-height: 520px;
    background: #ffffff;
}

[data-theme="dark"] .json-code-editor {
    background: #0d1424;
}

.json-line-gutter {
    margin: 0;
    padding: 1rem .65rem;
    overflow: hidden;
    border-right: 1px solid #e5e7eb;
    background: #f3f4f6;
    color: #64748b;
    text-align: right;
    font: 14px/1.65 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    user-select: none;
}

[data-theme="dark"] .json-line-gutter {
    background: #111827;
    border-right-color: rgba(255,255,255,.1);
    color: #94a3b8;
}

.json-code-editor textarea {
    width: 100%;
    min-height: 520px;
    resize: vertical;
    border: 0;
    outline: none;
    padding: 1rem 1rem 1rem .85rem;
    background: transparent;
    color: #0f172a;
    font: 14px/1.65 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    tab-size: 2;
    white-space: pre;
    overflow: auto;
}

[data-theme="dark"] .json-code-editor textarea {
    color: #e5e7eb;
}

.json-code-editor textarea::placeholder {
    color: #94a3b8;
}

.json-action-panel {
    display: flex;
    flex-direction: column;
    gap: .85rem;
    padding: 1rem;
    background:
        radial-gradient(circle at top, rgba(20, 184, 166, .22), transparent 15rem),
        linear-gradient(180deg, rgba(15, 185, 168, .14), rgba(79, 70, 229, .08)),
        color-mix(in srgb, var(--surface-strong) 94%, transparent);
}

.json-main-action,
.json-secondary-action,
.json-action-panel select {
    width: 100%;
    min-height: 46px;
    border-radius: 14px;
    border: 1px solid color-mix(in srgb, var(--primary) 26%, var(--line));
    font-weight: 650;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.json-main-action {
    color: #fff;
    background: linear-gradient(135deg, #14b8a6, #2563eb);
    box-shadow: 0 14px 28px rgba(37, 99, 235, .18);
}

.json-main-action:hover,
.json-secondary-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, .12);
}

.json-secondary-action {
    color: var(--text);
    background: color-mix(in srgb, var(--surface-strong) 96%, var(--primary-soft));
}

.json-action-panel select {
    padding: 0 .85rem;
    color: var(--text);
    background: var(--surface-strong);
}

.json-control-label {
    margin: .2rem 0 -.55rem;
    color: var(--muted);
    font-size: .75rem;
    font-weight: 750;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.json-message {
    margin: .15rem 0 0;
    min-height: 3.25rem;
    padding: .85rem;
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface-strong) 72%, transparent);
    border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
    font-size: .88rem;
    line-height: 1.45;
}

.json-howto-card, .json-howto-section {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(320px, 1fr);
    gap: 1.1rem;
    padding: 1rem;
    background:
        linear-gradient(135deg, rgba(79, 70, 229, .06), rgba(20, 184, 166, .07)),
        var(--surface-strong);
}

.json-video-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: #07111f;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}

.json-video-wrap video {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 260px;
    object-fit: cover;
    background: #07111f;
}

.json-howto-content {
    padding: .5rem .5rem .5rem .2rem;
    align-self: center;
}

.json-howto-content h3 {
    margin: .35rem 0 .75rem;
    font-size: clamp(1.35rem, 2.2vw, 2rem);
    line-height: 1.1;
    letter-spacing: -.04em;
}

.json-howto-steps {
    display: grid;
    gap: .6rem;
    margin: 0;
    padding-left: 1.2rem;
    color: var(--muted);
}

.json-howto-steps strong {
    color: var(--text);
    font-weight: 700;
}

.json-feature-pills {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin-top: 1rem;
}

.json-feature-pills span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: .35rem .75rem;
    border-radius: 999px;
    color: color-mix(in srgb, var(--primary) 82%, var(--text));
    background: var(--primary-soft);
    border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--line));
    font-size: .84rem;
    font-weight: 650;
}

@media (max-width: 1100px) {
    .json-editor-layout {
        grid-template-columns: 1fr;
    }

    .json-action-panel {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: end;
    }

    .json-message {
        grid-column: 1 / -1;
    }
}

@media (max-width: 820px) {
    .json-workspace-intro {
        flex-direction: column;
        align-items: stretch;
    }

    .json-quick-actions {
        justify-content: flex-start;
    }

    .json-howto-card, .json-howto-section {
        grid-template-columns: 1fr;
    }

    .json-code-editor,
    .json-code-editor textarea {
        min-height: 380px;
    }
}

@media (max-width: 560px) {
    .json-action-panel {
        grid-template-columns: 1fr;
    }

    .json-code-editor {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .json-line-gutter,
    .json-code-editor textarea {
        font-size: 12.5px;
    }

    .json-panel-topbar {
        padding-inline: .65rem;
    }

    .json-toolbar-mini span:not(:first-child) {
        display: none;
    }
}

/* JSON Formatter Toolkit upgrade */
.json-flagship-tool {
    gap: 1.35rem;
}

.json-flagship-intro {
    padding: .25rem 0 1rem;
}

.json-flagship-intro p {
    max-width: 760px;
}

.json-privacy-note {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .85rem 1rem;
    border-radius: 18px;
    color: color-mix(in srgb, var(--text) 86%, var(--primary));
    background: linear-gradient(135deg, rgba(20, 184, 166, .10), rgba(37, 99, 235, .08));
    border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
    font-size: .94rem;
}

.json-toolkit-layout {
    grid-template-columns: minmax(0, 1.05fr) minmax(240px, 300px) minmax(0, 1.08fr);
}

.json-toolkit-actions {
    gap: .78rem;
}

.json-action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .55rem;
}

.json-toolkit-actions .json-main-action,
.json-toolkit-actions .json-secondary-action {
    min-height: 42px;
    font-size: .91rem;
}

.json-toolkit-actions .json-action-grid .json-main-action,
.json-toolkit-actions .json-action-grid .json-secondary-action {
    border-radius: 12px;
}

.json-output-topbar {
    flex-wrap: wrap;
}

.json-output-tabs {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .25rem;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.10);
}

.json-output-tabs button {
    height: 28px;
    padding: 0 .7rem;
    border: 0;
    border-radius: 999px;
    color: rgba(255,255,255,.78);
    background: transparent;
    font-size: .78rem;
    font-weight: 650;
    cursor: pointer;
}

.json-output-tabs button.is-active {
    color: #0f172a;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(0,0,0,.16);
}

.json-output-pane {
    display: none;
}

.json-output-pane.is-active {
    display: block;
}

.json-tree-view,
.json-stats-grid,
.json-error-box {
    min-height: 520px;
    max-height: 680px;
    overflow: auto;
    padding: 1rem;
    background: #fff;
}

[data-theme="dark"] .json-tree-view,
[data-theme="dark"] .json-stats-grid,
[data-theme="dark"] .json-error-box {
    background: #0d1424;
}

.json-empty-state {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.json-tree-view details {
    margin: .2rem 0;
}

.json-tree-view summary,
.json-tree-leaf,
.json-tree-closing {
    display: flex;
    align-items: center;
    gap: .55rem;
    min-height: 34px;
    padding: .22rem .35rem;
    border-radius: 10px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: .86rem;
}

.json-tree-view summary:hover,
.json-tree-leaf:hover,
.json-tree-closing:hover {
    background: color-mix(in srgb, var(--primary-soft) 58%, transparent);
}

.json-tree-children {
    margin-left: 1rem;
    padding-left: .8rem;
    border-left: 1px dashed color-mix(in srgb, var(--primary) 25%, var(--line));
}

.json-node-name {
    color: color-mix(in srgb, var(--primary) 72%, var(--text));
    font-weight: 700;
}

.json-node-type {
    color: var(--muted);
    font-size: .76rem;
}

.json-tree-brace {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 .34rem;
    border-radius: 8px;
    color: color-mix(in srgb, var(--primary) 86%, var(--text));
    background: color-mix(in srgb, var(--primary-soft) 72%, #ffffff);
    border: 1px solid color-mix(in srgb, var(--primary) 14%, var(--line));
    font-weight: 750;
}

.json-tree-closing {
    margin-top: .18rem;
    color: var(--muted);
    opacity: .9;
    border: 1px dashed color-mix(in srgb, var(--primary) 16%, var(--line));
    background: color-mix(in srgb, var(--surface) 92%, var(--primary-soft));
}

.json-tree-closing .json-tree-brace {
    color: color-mix(in srgb, var(--muted) 72%, var(--primary));
    background: color-mix(in srgb, var(--surface) 82%, var(--line));
}

[data-theme="dark"] .json-tree-brace {
    background: color-mix(in srgb, var(--primary-soft) 22%, #111827);
}

[data-theme="dark"] .json-tree-closing {
    background: color-mix(in srgb, var(--surface) 82%, #111827);
}

.json-tree-leaf code {
    padding: .12rem .38rem;
    border-radius: 8px;
    color: var(--text);
    background: color-mix(in srgb, var(--surface) 84%, var(--primary-soft));
    border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
}

.json-value-string { color: #15803d !important; }
.json-value-number { color: #c2410c !important; }
.json-value-boolean { color: #2563eb !important; }
.json-value-null { color: #64748b !important; }

.json-path-copy {
    margin-left: auto;
    min-height: 26px;
    padding: 0 .55rem;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
    color: color-mix(in srgb, var(--primary) 85%, var(--text));
    background: color-mix(in srgb, var(--primary-soft) 72%, var(--surface-strong));
    font-size: .72rem;
    font-weight: 650;
    cursor: pointer;
}

.json-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-content: start;
    gap: .85rem;
}

.json-stat-card {
    padding: 1rem;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(37, 99, 235, .08), rgba(20, 184, 166, .08));
    border: 1px solid color-mix(in srgb, var(--primary) 13%, var(--line));
}

.json-stat-card span {
    display: block;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.json-stat-card strong {
    display: block;
    margin-top: .35rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
}

.json-error-box strong {
    display: block;
    margin-bottom: .4rem;
    color: #dc2626;
    font-size: 1.05rem;
}

.json-error-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin: .85rem 0;
}

.json-error-meta span,
.json-error-tip {
    padding: .55rem .7rem;
    border-radius: 12px;
    background: rgba(220, 38, 38, .08);
    border: 1px solid rgba(220, 38, 38, .16);
    color: #991b1b;
    font-size: .86rem;
}

[data-theme="dark"] .json-error-meta span,
[data-theme="dark"] .json-error-tip {
    color: #fecaca;
}

.json-diff-card, .json-diff-section,
.json-seo-info-grid article {
    border: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
    border-radius: 24px;
    background: color-mix(in srgb, var(--surface-strong) 94%, transparent);
    box-shadow: 0 18px 45px rgba(15, 23, 42, .07);
}

.json-diff-card, .json-diff-section {
    padding: 1.1rem;
}

.json-diff-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.json-diff-header h3 {
    margin: .25rem 0 .35rem;
    font-size: clamp(1.25rem, 1.8vw, 1.7rem);
    letter-spacing: -.035em;
}

.json-diff-header p {
    margin: 0;
    color: var(--muted);
}

.json-diff-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .9rem;
}

.json-diff-grid label span {
    display: block;
    margin-bottom: .4rem;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.json-diff-grid textarea,
.json-diff-output {
    width: 100%;
    min-height: 170px;
    border-radius: 16px;
    border: 1px solid color-mix(in srgb, var(--line) 90%, transparent);
    background: var(--surface);
    color: var(--text);
    padding: .9rem;
    font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    resize: vertical;
}

.json-diff-output {
    margin: .9rem 0 0;
    white-space: pre-wrap;
    overflow: auto;
}

.json-seo-info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.json-seo-info-grid article {
    padding: 1.1rem;
}

.json-seo-info-grid h3 {
    margin: 0 0 .65rem;
    font-size: 1.08rem;
    letter-spacing: -.02em;
}

.json-seo-info-grid p,
.json-seo-info-grid li {
    color: var(--muted);
    line-height: 1.65;
}

.json-seo-info-grid ul {
    margin: 0;
    padding-left: 1.1rem;
}

.json-action-panel .tool-message {
    margin: .15rem 0 0;
    min-height: 3.25rem;
    padding: .85rem;
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface-strong) 72%, transparent);
    border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
    font-size: .88rem;
    line-height: 1.45;
}

@media (max-width: 1180px) {
    .json-toolkit-layout {
        grid-template-columns: 1fr;
    }

    .json-toolkit-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: end;
    }

    .json-toolkit-actions .json-action-grid {
        grid-column: 1 / -1;
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .json-toolkit-actions .tool-message {
        grid-column: 1 / -1;
    }
}

@media (max-width: 820px) {
    .json-diff-header {
        align-items: stretch;
        flex-direction: column;
    }

    .json-diff-grid,
    .json-seo-info-grid {
        grid-template-columns: 1fr;
    }

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

    .json-tree-view,
    .json-stats-grid,
    .json-error-box {
        min-height: 360px;
    }
}

@media (max-width: 560px) {
    .json-toolkit-actions,
    .json-toolkit-actions .json-action-grid,
    .json-stats-grid {
        grid-template-columns: 1fr;
    }

    .json-output-tabs {
        width: 100%;
        justify-content: space-between;
        border-radius: 14px;
    }

    .json-output-tabs button {
        flex: 1;
        padding: 0 .4rem;
    }
}

/* JSON Toolkit flat/no-card layout update */
.json-flagship-tool {
    gap: 1.15rem;
}

.json-editor-panel,
.json-action-panel,
.json-howto-card, .json-howto-section,
.json-diff-card, .json-diff-section,
.json-seo-info-grid article {
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

.json-editor-panel,
.json-action-panel {
    border: 1px solid color-mix(in srgb, var(--line) 88%, transparent) !important;
}

.json-editor-panel {
    overflow: hidden;
}

.json-action-panel {
    background: color-mix(in srgb, var(--surface-strong) 72%, transparent) !important;
    padding: .95rem !important;
}

.json-panel-topbar {
    border-radius: 0 !important;
    background: #223348 !important;
}

.json-code-editor,
.json-tree-view,
.json-stats-grid,
.json-error-box {
    background: var(--surface-strong) !important;
}

[data-theme="dark"] .json-code-editor,
[data-theme="dark"] .json-tree-view,
[data-theme="dark"] .json-stats-grid,
[data-theme="dark"] .json-error-box {
    background: #0d1424 !important;
}

.json-tree-view summary,
.json-tree-leaf,
.json-tree-closing {
    border-radius: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent) !important;
    padding: .18rem .1rem !important;
}

.json-tree-view summary:hover,
.json-tree-leaf:hover,
.json-tree-closing:hover {
    background: color-mix(in srgb, var(--primary-soft) 42%, transparent) !important;
}

.json-tree-brace,
.json-tree-leaf code,
.json-path-copy {
    border-radius: 4px !important;
    box-shadow: none !important;
}

.json-tree-closing {
    margin-top: 0 !important;
    opacity: 1 !important;
    color: var(--muted) !important;
}

.json-stat-card {
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 78%, transparent) !important;
    padding: .75rem .15rem !important;
}

.json-howto-card, .json-howto-section,
.json-diff-card, .json-diff-section,
.json-seo-info-grid {
    border-top: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
    padding-top: 1.1rem;
}

.json-howto-card, .json-howto-section {
    border-left: 0 !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
    padding: 1.1rem 0 0 !important;
}

.json-video-wrap {
    border-radius: 0 !important;
    box-shadow: none !important;
}

.json-diff-card, .json-diff-section {
    border-left: 0 !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
    padding: 1.1rem 0 0 !important;
}

.json-diff-grid textarea,
.json-diff-output {
    border-radius: 0 !important;
    background: var(--surface-strong) !important;
}

.json-seo-info-grid article {
    border-radius: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-top: 0 !important;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 86%, transparent) !important;
    padding: 0 0 1rem !important;
}

.json-feature-pills span,
.json-message,
.json-action-panel .tool-message,
.json-error-meta span,
.json-error-tip {
    border-radius: 4px !important;
}

@media (max-width: 820px) {
    .json-howto-card, .json-howto-section,
    .json-diff-card, .json-diff-section,
    .json-seo-info-grid {
        padding-top: .9rem;
    }
}

/* JSON Toolkit recommended flat workspace update */
.json-sample-preset-wrap {
    align-items: center;
}

.json-sample-select,
.json-convert-bar select {
    min-height: 38px;
    padding: 0 .8rem;
    border: 1px solid color-mix(in srgb, var(--line) 90%, transparent);
    border-radius: 4px;
    color: var(--text);
    background: var(--surface-strong);
    font-weight: 500;
}

.json-flagship-intro h2 {
    font-weight: 650;
}

.json-toolkit-actions .json-action-grid {
    grid-template-columns: 1fr 1fr;
}

.json-toolkit-actions .json-main-action,
.json-toolkit-actions .json-secondary-action {
    min-height: 38px;
    border-radius: 4px !important;
    font-weight: 560;
}

.json-output-tabs {
    flex-wrap: wrap;
    border-radius: 4px !important;
}

.json-output-tabs button {
    min-width: 74px;
    border-radius: 4px !important;
    font-weight: 560;
}

.json-line-gutter span {
    display: block;
    min-height: 1.65em;
    padding-inline: .2rem;
}

.json-line-gutter span.is-error {
    color: #b91c1c;
    background: rgba(239, 68, 68, .16);
    font-weight: 750;
}

.json-code-editor[data-error-line] {
    box-shadow: inset 4px 0 0 rgba(239, 68, 68, .75);
}

.json-tab-tools,
.json-convert-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .55rem;
    padding: .75rem .85rem;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 85%, transparent);
    background: color-mix(in srgb, var(--surface-strong) 92%, var(--primary-soft));
}

.json-convert-bar label {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.json-tab-tool {
    min-height: 34px;
    padding: 0 .7rem;
    border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
    border-radius: 4px;
    color: color-mix(in srgb, var(--primary) 82%, var(--text));
    background: color-mix(in srgb, var(--surface-strong) 86%, var(--primary-soft));
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
}

.json-tab-tool.primary {
    color: #fff;
    background: linear-gradient(135deg, #14b8a6, #2563eb);
    border-color: transparent;
}

.json-tree-toolbar + .json-tree-view {
    min-height: 464px;
}

.json-tree-actions {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    margin-left: auto;
}

.json-tree-actions .json-path-copy {
    margin-left: 0;
}

.json-tree-view summary,
.json-tree-leaf,
.json-tree-closing {
    gap: .45rem;
}

.json-tree-leaf code {
    max-width: min(520px, 52vw);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.json-tab-textarea {
    width: 100%;
    min-height: 470px;
    border: 0;
    resize: vertical;
    padding: 1rem;
    color: var(--text);
    background: var(--surface-strong);
    font: 14px/1.65 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    outline: none;
}

.json-diff-tab-header {
    padding: .85rem .9rem 0;
    margin-bottom: .75rem !important;
}

.json-output-pane[data-json-pane="diff"] .json-diff-grid,
.json-output-pane[data-json-pane="diff"] .json-diff-output {
    margin-inline: .85rem;
    width: calc(100% - 1.7rem);
}

.json-output-pane[data-json-pane="diff"] .json-diff-output {
    margin-bottom: .85rem;
}

.json-output-pane[data-json-pane="convert"] {
    background: var(--surface-strong);
}

.json-output-pane[data-json-pane="tree"],
.json-output-pane[data-json-pane="errors"],
.json-output-pane[data-json-pane="stats"] {
    background: var(--surface-strong);
}

@media (max-width: 1180px) {
    .json-toolkit-actions .json-action-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .json-sample-preset-wrap {
        justify-content: flex-start;
    }

    .json-sample-select {
        flex: 1 1 100%;
    }

    .json-output-tabs {
        width: 100%;
        justify-content: flex-start;
    }

    .json-output-tabs button {
        flex: 1 1 calc(33.333% - .35rem);
    }

    .json-convert-bar label,
    .json-convert-bar select,
    .json-convert-bar button {
        flex: 1 1 100%;
    }

    .json-tree-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
}

@media (max-width: 560px) {
    .json-toolkit-actions .json-action-grid {
        grid-template-columns: 1fr 1fr;
    }

    .json-output-tabs button {
        flex-basis: calc(50% - .35rem);
    }

    .json-tree-leaf,
    .json-tree-view summary,
    .json-tree-closing {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .json-tree-actions {
        width: 100%;
        margin-left: 0;
        justify-content: flex-start;
    }
}

/* Sitemap XML Generator - crawler workspace */
.sitemap-header p { max-width: 880px; }
.sitemap-tool { display: grid; gap: 18px; }
.sitemap-control-bar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 130px 170px auto;
    gap: 14px;
    align-items: end;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(148, 163, 184, .28);
}
.sitemap-field { display: grid; gap: 8px; color: #64748b; font-size: 13px; font-weight: 650; }
.sitemap-field input,
.sitemap-field select {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(148, 163, 184, .34);
    border-radius: 14px;
    background: #fff;
    padding: 0 14px;
    color: #0f172a;
    font: 500 15px/1.4 inherit;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.sitemap-field input:focus,
.sitemap-field select:focus { border-color: rgba(59, 130, 246, .72); box-shadow: 0 0 0 4px rgba(59, 130, 246, .12); }
.sitemap-check {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 14px;
    padding: 0 14px;
    color: #334155;
    font-size: 14px;
    font-weight: 650;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
}
.sitemap-note {
    border-left: 3px solid #38bdf8;
    padding: 10px 14px;
    background: rgba(14, 165, 233, .06);
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
}
.sitemap-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 18px; align-items: stretch; }
.sitemap-panel { display: grid; gap: 10px; min-width: 0; }
.sitemap-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sitemap-panel-head strong { display: block; color: #0f172a; font-size: 15px; }
.mini-label { display: block; margin-bottom: 2px; color: #64748b; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.mini-btn {
    border: 1px solid rgba(148, 163, 184, .28);
    background: #fff;
    color: #334155;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
}
.mini-btn:hover { border-color: rgba(59, 130, 246, .45); color: #2563eb; }
.sitemap-panel textarea {
    min-height: 390px;
    resize: vertical;
    width: 100%;
    border: 1px solid rgba(148, 163, 184, .32);
    border-radius: 16px;
    background: #fff;
    padding: 18px;
    color: #0f172a;
    font: 500 14px/1.7 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    outline: none;
}
.sitemap-panel textarea:focus { border-color: rgba(59, 130, 246, .65); box-shadow: 0 0 0 4px rgba(59, 130, 246, .1); }
.sitemap-actions { padding-top: 2px; }
.tool-message.is-info { color: #2563eb; }
@media (max-width: 980px) {
    .sitemap-control-bar { grid-template-columns: 1fr 1fr; }
    .sitemap-field-main { grid-column: 1 / -1; }
    .sitemap-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .sitemap-control-bar { grid-template-columns: 1fr; }
    .sitemap-check { justify-content: flex-start; }
    .sitemap-panel textarea { min-height: 280px; }
}


/* Quality upgrade system */
.quality-info-card { display: grid; gap: .85rem; }
.quality-badge {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: .7rem;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: .72rem .85rem;
    background: var(--surface-strong);
    color: var(--text);
}
.quality-badge span { font-weight: 800; }
.quality-badge strong { font-size: .9rem; color: var(--primary); }
.quality-flagship { border-color: rgba(79, 70, 229, .36); background: linear-gradient(135deg, rgba(79,70,229,.10), rgba(6,182,212,.08)); }
.quality-production { border-color: rgba(8, 127, 91, .28); background: rgba(8,127,91,.06); }
.quality-browser { border-color: rgba(37, 99, 235, .25); background: rgba(37,99,235,.06); }
.quality-beta { border-color: rgba(217, 119, 6, .30); background: rgba(217,119,6,.07); }
.quality-requires-setup { border-color: rgba(201, 42, 42, .24); background: rgba(201,42,42,.06); }
.quality-mini-list { display: flex; flex-wrap: wrap; gap: .45rem; }
.quality-mini-list span,
.quality-strip-actions span,
.quality-strip-actions a {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-strong);
    color: var(--muted);
    padding: .38rem .6rem;
    font-size: .78rem;
    font-weight: 800;
}
.quality-requirements { display: grid; gap: .45rem; padding-top: .4rem; }
.quality-requirements > strong { font-size: .82rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.quality-req {
    display: grid;
    gap: .1rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: .55rem .65rem;
    font-size: .82rem;
    font-weight: 800;
    background: var(--surface-strong);
}
.quality-req small { color: var(--muted); font-weight: 600; }
.quality-req.ok { border-color: rgba(8, 127, 91, .26); color: var(--success); }
.quality-req.missing { border-color: rgba(201, 42, 42, .26); color: var(--danger); }
.quality-strip-section { padding: 0 0 10px; }
.quality-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
    padding: .95rem 1rem;
}
.quality-strip div:first-child { display: grid; gap: .15rem; }
.quality-strip strong { font-size: .96rem; }
.quality-strip span { color: var(--muted); font-size: .88rem; }
.quality-strip-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .45rem; min-width: max-content; }
.workspace-header-actions { display: inline-flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.btn-small { min-height: 38px; padding: .58rem .78rem; font-size: .86rem; }
.editor-live-stats { color: var(--muted); font-size: .74rem; font-weight: 700; margin-top: -.25rem; }
.server-quality-note,
.server-requirements-note { padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-strong); }
.server-req-grid { display: grid; gap: .45rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: .75rem; }
@media (max-width: 760px) {
    .quality-strip { align-items: flex-start; flex-direction: column; }
    .quality-strip-actions { justify-content: flex-start; min-width: 0; }
    .server-req-grid { grid-template-columns: 1fr; }
}

/* Live tool info panel: production package does not expose QA/quality audit UI. */
.live-tool-card { display: grid; gap: .85rem; }
.live-tool-card h3 { margin: 0; font-size: 1.05rem; font-weight: 650; }
.live-tool-card p { margin: 0; color: var(--muted); }
