:root {
    --bg: #f3f5f1;
    --surface: #ffffff;
    --surface-alt: #eef3ea;
    --ink: #18201a;
    --muted: #657066;
    --line: rgba(24, 32, 26, 0.12);
    --line-strong: rgba(24, 32, 26, 0.24);
    --accent: #2e7d4f;
    --accent-soft: rgba(46, 125, 79, 0.12);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --shadow: 0 22px 60px rgba(41, 52, 42, 0.08);
    --container: 1380px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at top right, rgba(46, 125, 79, 0.12), transparent 20%),
        linear-gradient(180deg, #f8faf7 0%, var(--bg) 100%);
}

a {
    color: inherit;
}

.shell {
    width: min(calc(100% - 24px), var(--container));
    margin: 0 auto;
    padding: 16px 0 28px;
}

.topbar,
.footerbar,
.hero,
.panel,
.workbench,
.navcard,
.editor,
.result {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
}

.topbar,
.footerbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-radius: 999px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.mark {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border-radius: 16px;
    background: var(--ink);
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.brand h1,
.hero h2,
.panel h2,
.navcard h2 {
    margin: 0;
}

.brand h1 {
    font-size: 1.18rem;
    font-weight: 700;
}

.versions,
.cta-row,
.nav-row,
.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pill,
.nav,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: #fff;
    text-decoration: none;
}

.pill.current,
button {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

.hero {
    margin-top: 16px;
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) 320px;
}

.hero-main {
    padding: 30px;
    display: grid;
    gap: 22px;
}

.kicker {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero h2 {
    font-family: "Iowan Old Style", "Songti SC", serif;
    font-size: clamp(2rem, 4.2vw, 4rem);
    line-height: 1;
    letter-spacing: -0.03em;
    max-width: 12ch;
}

.hero-side {
    padding: 24px;
    background: var(--surface-alt);
    border-left: 1px solid var(--line);
    display: grid;
    align-content: space-between;
    gap: 16px;
}

.hero-side .meta {
    color: var(--muted);
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero-num {
    font-size: clamp(3.6rem, 7vw, 6rem);
    font-weight: 800;
    letter-spacing: -0.06em;
}

.hero-links {
    display: grid;
    gap: 12px;
}

.hero-link {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    text-decoration: none;
}

.hero-no {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 800;
}

.grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 16px;
    margin-top: 16px;
}

.panel {
    border-radius: var(--radius-lg);
    padding: 24px;
}

.panel h2 {
    font-family: "Iowan Old Style", "Songti SC", serif;
    font-size: 2rem;
}

.api-block + .api-block {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

pre {
    margin: 10px 0 0;
    padding: 16px;
    overflow-x: auto;
    border-radius: var(--radius-md);
    background: #141816;
    color: #f3f5f1;
}

code,
pre,
textarea,
select {
    font-family: "SFMono-Regular", Consolas, monospace;
}

.workbench {
    margin-top: 16px;
    border-radius: var(--radius-xl);
    padding: 16px;
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr) 360px;
    gap: 16px;
}

.navcard,
.editor,
.result {
    border-radius: var(--radius-lg);
}

.navcard {
    padding: 20px;
    background: var(--surface-alt);
    display: grid;
    align-content: start;
    gap: 16px;
}

.navcard h2 {
    font-family: "Iowan Old Style", "Songti SC", serif;
    font-size: 2.4rem;
    line-height: 0.92;
}

.nav-row {
    flex-direction: column;
}

.navcard .nav {
    width: 100%;
}

.editor,
.result {
    padding: 20px;
}

.field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.meta {
    color: var(--muted);
}

textarea,
select {
    width: 100%;
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    background: #fff;
    color: var(--ink);
    padding: 14px 15px;
    outline: none;
}

textarea {
    min-height: 340px;
    resize: vertical;
    line-height: 1.7;
}

.toolbar {
    margin-top: 16px;
    justify-content: space-between;
    align-items: end;
}

.toolbar > div:first-child {
    flex: 1 1 250px;
}

.toolbar > div:last-child {
    flex: 0 0 200px;
}

.result:empty {
    display: none;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 14px;
    border: 1px solid var(--line);
    background: #fff;
}

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

th {
    background: var(--surface-alt);
}

tr:last-child td {
    border-bottom: none;
}

.footerbar {
    margin-top: 16px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
}

.footer-links a {
    color: var(--accent);
    text-decoration: none;
}

@media (max-width: 1160px) {
    .hero-grid,
    .grid,
    .workbench {
        grid-template-columns: 1fr;
    }

    .hero-side {
        border-left: none;
        border-top: 1px solid var(--line);
    }
}

@media (max-width: 640px) {
    .versions,
    .cta-row,
    .toolbar,
    .footerbar {
        flex-direction: column;
        align-items: stretch;
    }

    .pill,
    .nav,
    button {
        width: 100%;
    }
}
