:root {
    --ink: #0f172a;
    --muted: #64748b;
    --line: #F4DDC0;
    --page: #FBF6E9;
    --card: #ffffff;
    --brand: #E85D1A;
    --brand-dark: #C44A0E;
    --brand-soft: #FFF6E8;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font-family: Inter, "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 15px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.site {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.86);
    border-bottom: 1px solid rgba(232, 93, 26, 0.12);
    backdrop-filter: blur(16px);
}

.site-inner,
.frame {
    width: min(1152px, calc(100% - 48px));
    margin: 0 auto;
}

.site-inner {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.logo {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 1px;
    text-decoration: none;
    color: var(--brand-dark);
    background: linear-gradient(135deg, #E85D1A, #C44A0E);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.site nav a {
    color: #516074;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    padding: 7px 12px;
    border-radius: 10px;
}

.site nav a:hover,
.site nav a[aria-current="page"] {
    background: var(--brand-soft);
    color: var(--brand-dark);
}

.hero {
    border-bottom: 1px solid var(--line);
    padding: 56px 0 40px;
}

.eyebrow {
    margin: 0;
    color: var(--brand-dark);
    font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1 {
    margin: 16px 0 0;
    max-width: 16em;
    color: var(--ink);
    font-family: "Instrument Serif", "Noto Serif SC", "Songti SC", "Source Han Serif SC", Georgia, serif;
    font-size: 60px;
    font-weight: 400;
    line-height: 0.96;
    letter-spacing: -0.03em;
}

.lede {
    max-width: 40rem;
    margin: 20px 0 0;
    color: #334155;
    font-size: 18px;
    line-height: 1.55;
}

.glance {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    max-width: 48rem;
    margin-top: 32px;
    padding: 24px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
}

.glance h2 {
    margin: 0 0 8px;
    font-family: Inter, "Noto Sans SC", "PingFang SC", sans-serif;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.4;
    color: var(--ink);
}

.glance p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.6;
}

.actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 0 0 auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.btn.solid {
    background: linear-gradient(135deg, #FF8E48, #E85D1A);
    color: #fff;
    border: none;
    box-shadow: 0 10px 18px rgba(232, 93, 26, 0.22);
}

.btn.ghost {
    background: #fff;
    color: #334155;
    border: 1px solid rgba(232, 93, 26, 0.18);
}

.btn.ghost:hover {
    background: var(--brand-soft);
    color: var(--brand-dark);
}

.cols {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 48px;
    align-items: start;
    padding: 40px 0 88px;
}

.toc {
    position: sticky;
    top: 88px;
}

.toc-kicker {
    margin: 0 8px 10px;
    color: var(--muted);
    font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.toc-kicker.related { margin-top: 28px; }

.toc a {
    display: block;
    color: #516074;
    font-size: 14px;
    line-height: 1.45;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 10px;
}

.toc a:hover,
.toc a.is-on,
.toc a[aria-current="page"] {
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-weight: 600;
}

.doc { max-width: 48rem; }

.doc h2 {
    margin: 40px 0 12px;
    color: var(--ink);
    font-family: "Instrument Serif", "Noto Serif SC", "Songti SC", Georgia, serif;
    font-size: 30px;
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.025em;
    scroll-margin-top: 96px;
}

.doc h2:first-of-type { margin-top: 0; }

.doc p { margin: 0 0 12px; }

.doc ul,
.doc ol {
    margin: 0 0 12px;
    padding-left: 1.25em;
}

.doc li { margin: 6px 0; }

.doc li::marker { color: var(--brand); }

.doc a {
    color: var(--brand-dark);
    font-weight: 600;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.doc code {
    font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.92em;
    background: var(--brand-soft);
    color: var(--brand-dark);
    border-radius: 6px;
    padding: 1px 5px;
}

table {
    width: 100%;
    margin: 8px 0 16px;
    border-collapse: collapse;
    font-size: 14px;
    line-height: 1.5;
}

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

th {
    color: var(--brand-dark);
    font-weight: 600;
    background: var(--brand-soft);
}

th:first-child,
td:first-child { padding-left: 12px; }

.signoff {
    margin-top: 8px;
    color: var(--muted);
    font-size: 14px;
}

@media (max-width: 860px) {
    .site-inner,
    .frame { width: min(100% - 32px, 1152px); }
    h1 { font-size: 44px; }
    .glance { flex-direction: column; align-items: stretch; }
    .actions { flex-direction: row; flex-wrap: wrap; }
    .cols { display: block; padding-top: 28px; }
    .toc { position: static; margin-bottom: 36px; }
}

@media print {
    .site,
    .toc,
    .actions { display: none !important; }
    .hero { border: 0; padding-top: 0; }
    .glance { border: 0; padding: 0; background: transparent; box-shadow: none; }
    .btn.solid { box-shadow: none; }
    .cols { display: block; }
    body { background: #fff; }
}
