:root {
    --paper: #f4f0e7;
    --paper-deep: #e9e1d2;
    --ink: #171a17;
    --muted: #5d625c;
    --rule: #c8c0b1;
    --green: #1d5a45;
    --green-soft: #dce8df;
    --white: #fffdf7;
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        linear-gradient(90deg, transparent 0 7.5%, rgba(42, 38, 31, 0.035) 7.5% 7.65%, transparent 7.65% 92.35%, rgba(42, 38, 31, 0.035) 92.35% 92.5%, transparent 92.5%),
        var(--paper);
    font-family: "Avenir Next", Avenir, "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
    font-size: 17px;
    line-height: 1.72;
}

a {
    color: var(--green);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}

a:hover {
    text-decoration-thickness: 2px;
}

a:focus-visible {
    outline: 3px solid var(--green);
    outline-offset: 4px;
}

.masthead {
    border-bottom: 1px solid var(--rule);
    background: rgba(244, 240, 231, 0.94);
}

.masthead__inner {
    width: min(1120px, calc(100% - 40px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.wordmark {
    color: var(--ink);
    font-family: "Iowan Old Style", "Palatino Linotype", "Songti SC", serif;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-decoration: none;
}

.masthead nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    font-size: 0.88rem;
}

.masthead nav a {
    color: var(--muted);
    text-decoration: none;
}

.document {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
    padding: 72px 0 96px;
}

.document__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.32fr);
    gap: 64px;
    padding-bottom: 48px;
    border-bottom: 2px solid var(--ink);
}

.eyebrow {
    margin: 0 0 18px;
    color: var(--green);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    font-family: "Iowan Old Style", "Palatino Linotype", "Songti SC", serif;
    font-weight: 600;
    line-height: 1.12;
}

h1 {
    max-width: 820px;
    margin: 0;
    font-size: clamp(2.8rem, 8vw, 6.8rem);
    letter-spacing: -0.055em;
}

.lede {
    max-width: 760px;
    margin: 28px 0 0;
    color: var(--muted);
    font-family: "Iowan Old Style", "Palatino Linotype", "Songti SC", serif;
    font-size: clamp(1.15rem, 2.2vw, 1.5rem);
    line-height: 1.5;
}

.document-meta {
    align-self: end;
    margin: 0;
    padding: 20px 0 0;
    border-top: 1px solid var(--rule);
    color: var(--muted);
    font-size: 0.86rem;
}

.document-meta strong {
    display: block;
    margin-bottom: 4px;
    color: var(--ink);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.document__grid {
    display: grid;
    grid-template-columns: 230px minmax(0, 720px);
    gap: 64px;
    justify-content: space-between;
    padding-top: 56px;
}

.toc {
    position: sticky;
    top: 28px;
    align-self: start;
    padding: 22px;
    border: 1px solid var(--rule);
    background: rgba(255, 253, 247, 0.58);
}

.toc h2 {
    margin: 0 0 14px;
    font-family: inherit;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.toc ol {
    margin: 0;
    padding-left: 1.25rem;
}

.toc li {
    margin: 8px 0;
    color: var(--muted);
    font-size: 0.82rem;
}

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

.prose section {
    padding: 0 0 48px;
    scroll-margin-top: 28px;
}

.prose section + section {
    padding-top: 48px;
    border-top: 1px solid var(--rule);
}

.prose h2 {
    margin: 0 0 22px;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    letter-spacing: -0.025em;
}

.prose h3 {
    margin: 28px 0 10px;
    font-size: 1.18rem;
}

.prose p,
.prose ul,
.prose ol {
    margin: 0 0 18px;
}

.prose li + li {
    margin-top: 8px;
}

.notice {
    margin: 28px 0;
    padding: 22px 24px;
    border-left: 4px solid var(--green);
    background: var(--green-soft);
}

.notice strong {
    display: block;
    margin-bottom: 4px;
}

.language-break {
    margin: 72px 0 56px;
    padding: 28px 0;
    border-top: 4px double var(--ink);
    border-bottom: 4px double var(--ink);
    text-align: center;
}

.language-break span {
    display: block;
    color: var(--green);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 40px;
}

.card {
    min-height: 230px;
    padding: 28px;
    border: 1px solid var(--rule);
    background: var(--white);
}

.card__number {
    color: var(--green);
    font-family: "Iowan Old Style", "Palatino Linotype", serif;
    font-size: 2.2rem;
}

.card h2 {
    margin: 32px 0 12px;
    font-size: 1.55rem;
}

.button-link {
    display: inline-block;
    margin-top: 10px;
    padding: 11px 18px;
    border: 1px solid var(--green);
    color: var(--white);
    background: var(--green);
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
}

.button-link:hover {
    color: var(--green);
    background: transparent;
}

.site-footer {
    padding: 32px 20px;
    border-top: 1px solid var(--rule);
    color: var(--muted);
    text-align: center;
    font-size: 0.8rem;
}

@media (max-width: 820px) {
    body {
        background: var(--paper);
        font-size: 16px;
    }

    .masthead__inner {
        min-height: 88px;
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        gap: 8px;
    }

    .document {
        padding-top: 48px;
    }

    .document__header,
    .document__grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .toc {
        position: static;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }
}

@media print {
    body {
        background: #fff;
        color: #000;
        font-size: 11pt;
    }

    .masthead,
    .toc,
    .site-footer,
    .button-link {
        display: none;
    }

    .document {
        width: 100%;
        padding: 0;
    }

    .document__grid,
    .document__header {
        display: block;
    }

    .prose section {
        break-inside: avoid;
    }
}
