:root {
    --bg: #eef3f8;
    --panel: rgba(255, 255, 255, 0.92);
    --panel-strong: #ffffff;
    --text: #0e1728;
    --muted: #617086;
    --line: rgba(28, 45, 74, 0.12);
    --brand: #265cff;
    --brand-deep: #14327a;
    --brand-soft: #e5edff;
    --accent: #178b96;
    --warn: #d59b1d;
    --shadow: 0 18px 46px rgba(14, 23, 40, 0.09);
    --radius: 8px;
    --wrap: 1180px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        linear-gradient(180deg, rgba(241, 246, 252, 0.92), rgba(232, 239, 247, 0.98)),
        #eef3f8;
    color: var(--text);
    font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.65;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: min(calc(100% - 40px), var(--wrap));
    margin: 0 auto;
    padding: 16px 0;
    backdrop-filter: blur(14px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 220px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand), #0d1f48);
    color: #fff;
    font-weight: 800;
}

.brand strong,
.brand small {
    display: block;
}

.brand small {
    color: var(--muted);
    font-size: 0.78rem;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.site-nav a {
    min-height: 36px;
    padding: 6px 10px;
    border-radius: var(--radius);
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 600;
}

.site-nav a:hover {
    background: rgba(38, 92, 255, 0.08);
    color: var(--brand-deep);
}

main {
    width: min(calc(100% - 40px), var(--wrap));
    margin: 0 auto;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(360px, 0.78fr);
    gap: 24px;
    align-items: stretch;
    padding: 22px 0 18px;
}

.hero-copy,
.hero-media,
.tool-panel,
.tool-strip,
.site-footer {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.hero-copy {
    padding: 42px;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    max-width: 760px;
    margin-bottom: 18px;
    font-size: clamp(2.2rem, 4.5vw, 4.9rem);
    line-height: 1.05;
    letter-spacing: 0;
}

h2 {
    margin-bottom: 6px;
    font-size: 1.35rem;
    line-height: 1.18;
}

h3 {
    margin-bottom: 10px;
    font-size: 1.05rem;
    line-height: 1.2;
}

.hero-copy p:not(.eyebrow),
.panel-head p,
.site-footer p {
    color: var(--muted);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 700;
}

.button-primary {
    background: var(--brand);
    color: #fff;
}

.button-secondary {
    background: var(--brand-soft);
    color: var(--brand-deep);
}

.button:hover {
    transform: translateY(-1px);
}

.hero-media {
    display: grid;
    place-items: center;
    min-height: 360px;
    padding: 20px;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(225, 237, 250, 0.92));
}

.hero-media img {
    width: 100%;
    border-radius: var(--radius);
}

.tool-strip {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1px;
    margin: 6px 0 24px;
    padding: 8px;
}

.tool-strip a {
    display: grid;
    gap: 6px;
    min-height: 74px;
    padding: 12px;
    border-radius: var(--radius);
    color: var(--text);
    font-weight: 700;
}

.tool-strip a:hover {
    background: rgba(38, 92, 255, 0.08);
}

.tool-strip span,
.panel-index {
    color: var(--brand);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.tool-directory {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    padding: 6px 0 28px;
}

.directory-card {
    display: grid;
    gap: 12px;
    min-height: 210px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.directory-card:hover {
    transform: translateY(-2px);
    border-color: rgba(38, 92, 255, 0.28);
}

.directory-card span {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 0.78rem;
    font-weight: 800;
}

.directory-card h2 {
    margin: 0;
}

.directory-card p {
    margin: 0;
    color: var(--muted);
}

.single-tool-main {
    padding: 28px 0 36px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    margin-bottom: 16px;
    padding: 0 12px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid var(--line);
    color: var(--brand-deep);
    font-weight: 700;
}

.tool-panel-single {
    max-width: 960px;
    margin: 0 auto;
}

.tool-panel-single h1 {
    margin-bottom: 8px;
    font-size: clamp(2rem, 4vw, 3.5rem);
}

.workspace {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    padding-bottom: 24px;
}

.tool-panel {
    padding: 24px;
}

.tool-panel-wide {
    grid-column: 1 / -1;
}

.panel-head {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.panel-index {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    background: var(--brand-soft);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.form-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
}

input,
select {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--text);
}

input[type="range"] {
    padding: 0;
}

.check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.check-grid label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-height: 50px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.68);
    color: var(--text);
}

.check-grid input {
    width: 18px;
    min-height: 18px;
    margin-top: 3px;
}

.result {
    display: grid;
    gap: 12px;
    margin-top: 16px;
    padding: 18px;
    border-radius: var(--radius);
    background: #f7fafd;
    border: 1px solid var(--line);
}

.result:empty {
    display: none;
}

.result p,
.result ul {
    margin-bottom: 0;
}

.pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pill-list span {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-deep);
    font-weight: 700;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.metric-grid span {
    padding: 12px;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid var(--line);
}

.metric-grid strong {
    display: block;
    font-size: 1.55rem;
    line-height: 1;
}

pre {
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
    padding: 14px;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid var(--line);
    color: #13213a;
}

table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: var(--radius);
    background: #fff;
}

th,
td {
    padding: 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 0.86rem;
}

.copy-button {
    justify-self: start;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--brand-deep);
    cursor: pointer;
    font-weight: 700;
}

.score-bar {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8edf5;
}

.score-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), var(--brand));
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: min(calc(100% - 40px), var(--wrap));
    margin: 0 auto 28px;
    padding: 22px 24px;
}

.site-footer p {
    margin: 6px 0 0;
}

.site-footer a {
    color: var(--brand-deep);
    font-weight: 700;
}

@media (max-width: 1100px) {
    .hero,
    .workspace,
    .tool-directory {
        grid-template-columns: 1fr;
    }

    .tool-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .site-header,
    main,
    .site-footer {
        width: min(calc(100% - 24px), var(--wrap));
    }

    .site-header,
    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-nav {
        width: 100%;
    }

    .site-nav a {
        background: rgba(255, 255, 255, 0.7);
    }

    .hero-copy,
    .tool-panel {
        padding: 20px;
    }

    .hero-media {
        min-height: 220px;
    }

    .hero-actions .button {
        width: 100%;
    }

    .tool-strip,
    .form-grid,
    .form-grid.three,
    .check-grid,
    .metric-grid {
        grid-template-columns: 1fr;
    }

    .panel-head {
        grid-template-columns: 1fr;
    }
}
