:root {
    color-scheme: light;
    --paper: #f6f8f7;
    --ink: #1a3237;
    --muted: #52676b;
    --accent: #05675c;
    --border: #d0ddda;
    --header: #15383e;
    font-family: system-ui, "Microsoft YaHei", "PingFang SC", sans-serif;
    line-height: 1.75;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
a { color: var(--accent); text-underline-offset: .24em; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
p { margin: 0 0 .8rem; }

.wrap { width: min(100% - 3rem, 70rem); margin-inline: auto; }
.skip-link {
    position: absolute;
    z-index: 2;
    top: .75rem;
    left: .75rem;
    padding: .5rem .85rem;
    background: white;
    transform: translateY(-180%);
}
.skip-link:focus { transform: none; }

.page-header {
    color: #edf5f4;
    background-color: var(--header);
    background-image: radial-gradient(#3a6265 1px, transparent 1px);
    background-size: 22px 22px;
    border-bottom: 4px solid #d9ab58;
}
.intro { padding-block: clamp(2.2rem, 6vw, 4.5rem) clamp(2rem, 4vw, 3rem); }
.wordmark {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin-bottom: .5rem;
    font-size: .83rem;
    font-weight: 750;
    letter-spacing: .12em;
    color: #f7d495;
}
.mark {
    width: .65rem;
    height: .65rem;
    background: #f1c474;
    box-shadow: 2px 2px #996b36;
}
h1 { margin: 0 0 .65rem; font-size: clamp(2.5rem, 7vw, 4rem); line-height: 1.18; }
.lede { max-width: 42rem; color: #e1edeb; }
.dates { display: flex; flex-wrap: wrap; gap: .35rem 1.75rem; margin: 1rem 0 0; font-size: .87rem; }
.dates div { display: flex; gap: .55rem; }
.dates dt { color: #c0d5d3; }
dd { margin: 0; overflow-wrap: anywhere; }
.draft { margin: .95rem 0 0; color: #f7d495; font-size: .88rem; }

.layout {
    display: grid;
    grid-template-columns: 12rem minmax(0, 1fr);
    align-items: start;
    gap: clamp(2rem, 6vw, 5rem);
    padding-block: 2.5rem 3.25rem;
}
.contents { position: sticky; top: 1.5rem; }
.contents h2 { margin: 0 0 .45rem; font-size: 1rem; }
.contents ol { display: grid; gap: .2rem; margin: 0; padding-inline-start: 1.35rem; font-size: .92rem; }
.contents li::marker { color: var(--muted); font-variant-numeric: tabular-nums; }
.contents a { display: inline-block; padding-block: .22rem; text-decoration: none; }
.contents a:hover { text-decoration: underline; }

main { max-width: 49rem; min-width: 0; }
section { padding: 1.65rem 0 1.25rem; border-top: 1px solid var(--border); scroll-margin-top: 1.4rem; }
section:first-child { padding-top: 0; border-top: 0; }
section h2 { margin: 0 0 .6rem; font-size: clamp(1.3rem, 3.5vw, 1.58rem); line-height: 1.4; }
section p:last-child { margin-bottom: 0; }
code { font-family: ui-monospace, Consolas, monospace; color: var(--accent); font-size: .9em; }
.contact { margin: .9rem 0 0; padding: .8rem 1rem; border-left: 3px solid #54847c; background: #eaf1ef; }
.contact div { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: .75rem; }
.contact dt { color: var(--muted); }
.page-footer { border-top: 1px solid var(--border); color: var(--muted); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .55rem; padding-block: 1.05rem; font-size: .85rem; }

@media (max-width: 46rem) {
    .wrap { width: calc(100% - 2rem); }
    .layout { grid-template-columns: 1fr; gap: 1.45rem; padding-top: 1.45rem; }
    .contents { position: static; padding-bottom: 1.1rem; border-bottom: 1px solid var(--border); }
    .contents ol { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.55rem; }
}

@media print {
    body, .page-header, .contact { background: white; color: black; }
    .wordmark, .lede, .dates dt, .draft, a { color: black; }
    .wrap { width: 100%; }
    .intro, .layout { display: block; padding: .5rem 0; }
    .contents, .skip-link, .page-footer, .mark { display: none; }
    section h2 { break-after: avoid; }
}
