:root {
    --ink: #241914;
    --ink-soft: #4a3427;
    --paper: #f4ead2;
    --paper-deep: #e6d4ae;
    --gold: #b58a3a;
    --red: #8d2f25;
    --red-deep: #5c201b;
    --line: rgba(68, 42, 28, .22);
    --shadow: 0 18px 42px rgba(30, 18, 12, .16);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: "Noto Serif SC", "Songti SC", "SimSun", serif;
    line-height: 1.75;
    background:
        radial-gradient(circle at 18% 8%, rgba(181, 138, 58, .18), transparent 26rem),
        linear-gradient(135deg, rgba(36, 25, 20, .04) 0 25%, transparent 25% 50%, rgba(36, 25, 20, .035) 50% 75%, transparent 75%),
        var(--paper);
    background-size: auto, 18px 18px, auto;
}

img,
svg {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--red-deep);
    text-decoration: none;
}

a:hover,
a:focus {
    color: var(--red);
    text-decoration: underline;
}

.container {
    width: min(1160px, calc(100% - 32px));
    margin: 0 auto;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 8px;
    padding: 8px 12px;
    background: var(--ink);
    color: #fff;
    z-index: 1000;
}

.skip-link:focus {
    left: 8px;
}

.top-strip {
    height: 6px;
    background: repeating-linear-gradient(90deg, var(--ink) 0 18px, var(--gold) 18px 30px, var(--red) 30px 44px);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(244, 234, 210, .95);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 78px;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    text-decoration: none;
}

.brand:hover {
    text-decoration: none;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border: 2px solid var(--ink);
    border-radius: 50%;
    background: linear-gradient(145deg, var(--red), var(--red-deep));
    color: var(--paper);
    font-weight: 900;
    box-shadow: inset 0 0 0 4px rgba(244, 234, 210, .24);
}

.brand-text {
    display: grid;
}

.brand-text strong,
.footer-brand {
    font-size: 1.28rem;
    letter-spacing: .06em;
}

.brand-text em {
    font-style: normal;
    font-size: .86rem;
    color: var(--ink-soft);
}

.primary-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.primary-nav a {
    display: inline-flex;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--ink-soft);
    font-size: .95rem;
}

.primary-nav a:hover,
.primary-nav a:focus,
.primary-nav a.is-active {
    border-color: var(--gold);
    background: rgba(181, 138, 58, .13);
    text-decoration: none;
    color: var(--ink);
}

.nav-toggle {
    display: none;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 14px;
    background: var(--paper-deep);
    color: var(--ink);
    font: inherit;
}

main {
    min-height: 70vh;
}

.hero {
    padding: 62px 0 44px;
}

.hero-grid,
.split-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(280px, .92fr);
    gap: 36px;
    align-items: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--red-deep);
    font-weight: 700;
    letter-spacing: .12em;
}

.eyebrow::before {
    content: "";
    width: 34px;
    height: 2px;
    background: var(--red);
}

h1,
h2,
h3 {
    line-height: 1.25;
    margin: 0 0 16px;
    font-weight: 900;
}

h1 {
    font-size: clamp(2.15rem, 4vw, 4.6rem);
    letter-spacing: .04em;
}

h2 {
    font-size: clamp(1.65rem, 3vw, 2.6rem);
}

h3 {
    font-size: 1.2rem;
}

.lede {
    font-size: 1.12rem;
    color: var(--ink-soft);
    margin: 0 0 24px;
}

.actions,
.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid var(--ink);
    border-radius: 999px;
    background: var(--ink);
    color: var(--paper);
    box-shadow: 0 8px 22px rgba(36, 25, 20, .16);
}

.button:hover,
.button:focus {
    background: var(--red-deep);
    color: var(--paper);
    text-decoration: none;
}

.button.ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--gold);
    box-shadow: none;
}

.button.ghost:hover,
.button.ghost:focus {
    background: rgba(181, 138, 58, .16);
}

.hero-card,
.paper-card,
.note-card,
.archive-card,
.person-card,
.video-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(255, 249, 232, .82), rgba(230, 212, 174, .75)),
        var(--paper-deep);
    box-shadow: var(--shadow);
}

.hero-card {
    padding: 18px;
    transform: rotate(.6deg);
}

.hero-card img {
    display: block;
    border-radius: calc(var(--radius) - 5px);
    border: 1px solid rgba(36, 25, 20, .16);
    background: #f8efd5;
}

.section {
    padding: 48px 0;
}

.section.alt {
    background: rgba(36, 25, 20, .04);
    border-top: 1px solid rgba(36, 25, 20, .08);
    border-bottom: 1px solid rgba(36, 25, 20, .08);
}

.section-head {
    max-width: 820px;
    margin-bottom: 28px;
}

.section-head p {
    color: var(--ink-soft);
    margin: 0;
}

.grid {
    display: grid;
    gap: 20px;
}

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

.grid.four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.paper-card,
.note-card,
.archive-card,
.person-card,
.video-card {
    padding: 20px;
}

.paper-card img,
.note-card img,
.archive-card img,
.person-card img,
.video-card img {
    border-radius: 12px;
    border: 1px solid rgba(36, 25, 20, .14);
    background: #f8efd5;
    margin-bottom: 14px;
}

.card-kicker {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--red-deep);
    font-weight: 700;
    font-size: .9rem;
}

.index-list,
.check-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.index-list li,
.check-list li {
    padding: 10px 0 10px 24px;
    border-bottom: 1px dashed rgba(36, 25, 20, .22);
    position: relative;
}

.index-list li::before,
.check-list li::before {
    content: "◆";
    position: absolute;
    left: 0;
    top: 10px;
    color: var(--gold);
    font-size: .78rem;
}

.timeline {
    position: relative;
    display: grid;
    gap: 18px;
    margin-top: 10px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 18px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: linear-gradient(var(--red), var(--gold));
}

.timeline-item {
    position: relative;
    padding-left: 56px;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--paper);
    border: 4px solid var(--red);
    box-shadow: 0 0 0 4px rgba(141, 47, 37, .12);
}

.timeline-item time {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--red-deep);
    font-weight: 900;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 249, 232, .64);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

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

th {
    background: rgba(36, 25, 20, .08);
    color: var(--ink);
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 0;
}

.badge {
    display: inline-flex;
    border: 1px solid rgba(141, 47, 37, .25);
    border-radius: 999px;
    padding: 4px 10px;
    color: var(--red-deep);
    background: rgba(141, 47, 37, .06);
    font-size: .9rem;
}

.search-panel {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
    margin-top: 20px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 249, 232, .64);
}

.field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
}

.field select,
.field input {
    width: 100%;
    min-height: 42px;
    border: 1px solid rgba(36, 25, 20, .28);
    border-radius: 10px;
    padding: 8px 10px;
    background: #fff8e7;
    color: var(--ink);
    font: inherit;
}

.result-line {
    margin-top: 14px;
    color: var(--ink-soft);
}

.faq details {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 249, 232, .62);
    padding: 14px 16px;
    margin-bottom: 12px;
}

.faq summary {
    cursor: pointer;
    font-weight: 800;
}

.breadcrumb {
    padding: 18px 0 0;
    color: var(--ink-soft);
    font-size: .95rem;
}

.page-hero {
    padding: 46px 0 34px;
}

.page-hero .container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 28px;
    align-items: center;
}

.page-hero img {
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: #f8efd5;
}

.quote-panel {
    padding: 24px;
    border-left: 6px solid var(--red);
    background: rgba(255, 249, 232, .68);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.site-footer {
    margin-top: 48px;
    padding: 38px 0;
    color: #f6ead2;
    background:
        linear-gradient(135deg, rgba(141, 47, 37, .28), transparent),
        var(--ink);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, minmax(0, .75fr));
    gap: 22px;
}

.site-footer a,
.site-footer span {
    display: block;
    color: #f6ead2;
    margin: 6px 0;
}

.footer-brand {
    font-weight: 900;
}

@media (max-width: 920px) {
    .header-inner {
        align-items: flex-start;
        padding: 12px 0;
    }

    .nav-toggle {
        display: inline-flex;
        margin-top: 7px;
    }

    .primary-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 86px;
        display: none;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--paper);
        box-shadow: var(--shadow);
        justify-content: flex-start;
    }

    .primary-nav.is-open {
        display: flex;
    }

    .hero-grid,
    .split-grid,
    .page-hero .container {
        grid-template-columns: 1fr;
    }

    .grid.three,
    .grid.four,
    .search-panel,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .page-hero img {
        max-width: 320px;
    }
}

@media (max-width: 620px) {
    .container {
        width: min(100% - 22px, 1160px);
    }

    .hero {
        padding-top: 36px;
    }

    h1 {
        font-size: 2.25rem;
    }

    .grid.three,
    .grid.four,
    .search-panel,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .brand-text em {
        display: none;
    }

    .primary-nav {
        top: 76px;
    }
}