:root {
    --bg: #f6f0e5;
    --paper: #fbf7f0;
    --paper-strong: #f1e4cd;
    --ink: #241d18;
    --muted: #6f6256;
    --line: #d7c7ad;
    --accent: #9a6b2f;
    --accent-deep: #6d4718;
    --shadow: rgba(42, 26, 12, 0.08);
    --serif: "Iowan Old Style", "Noto Serif SC", "Source Han Serif SC", "Songti SC", Georgia, serif;
    --sans: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    background: radial-gradient(circle at top, #fefbf6 0%, var(--bg) 56%);
    color: var(--ink);
}

body {
    margin: 0;
    font-family: var(--sans);
    color: var(--ink);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0)),
        radial-gradient(circle at top right, rgba(154, 107, 47, 0.08), transparent 32%);
}

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

img {
    max-width: 100%;
    display: block;
}

.site-shell {
    width: min(1120px, calc(100vw - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(18px);
    background: rgba(246, 240, 229, 0.84);
    border-bottom: 1px solid rgba(154, 107, 47, 0.12);
}

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

.brand-mark {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.brand-mark__kicker,
.eyebrow,
.footer-kicker {
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-size: 11px;
    color: var(--accent);
}

.brand-mark__title {
    font-family: var(--serif);
    font-size: 28px;
    font-weight: 700;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    color: var(--muted);
}

.site-nav a:hover,
.footer-links a:hover,
.post-card h3 a:hover,
.featured-card h3 a:hover,
.article-nav a:hover,
.archive-year a:hover {
    color: var(--accent-deep);
}

.hero-panel,
.section-block,
.article-shell {
    background: rgba(251, 247, 240, 0.84);
    border: 1px solid rgba(154, 107, 47, 0.14);
    box-shadow: 0 28px 60px var(--shadow);
}

.hero-panel {
    margin: 36px 0 28px;
    padding: 42px;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
    gap: 28px;
    border-radius: 30px;
}

.hero-panel h1,
.section-heading h1,
.section-heading h2,
.article-header h1 {
    margin: 0;
    font-family: var(--serif);
    line-height: 1.1;
}

.hero-panel h1 {
    font-size: clamp(42px, 7vw, 72px);
    max-width: 9ch;
}

.hero-copy,
.hero-note p,
.footer-copy,
.post-card p,
.featured-card p {
    color: var(--muted);
    line-height: 1.8;
}

.hero-note {
    border-left: 1px solid var(--line);
    padding-left: 24px;
    display: flex;
    align-items: end;
}

.section-block {
    border-radius: 26px;
    padding: 32px;
    margin-bottom: 28px;
}

.section-block--split {
    background: linear-gradient(135deg, rgba(255, 250, 241, 0.96), rgba(243, 228, 205, 0.92));
}

.section-heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: end;
    margin-bottom: 24px;
}

.section-heading h2,
.section-heading h1,
.article-header h1 {
    font-size: clamp(32px, 4vw, 46px);
}

.featured-grid,
.category-grid {
    display: grid;
    gap: 18px;
}

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

.featured-card,
.post-card,
.category-chip {
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.52);
    border: 1px solid rgba(154, 107, 47, 0.14);
}

.featured-card {
    padding: 24px;
    min-height: 220px;
}

.featured-card h3,
.post-card h3 {
    margin: 12px 0 10px;
    font-family: var(--serif);
    font-size: 28px;
    line-height: 1.25;
}

.post-list {
    display: grid;
    gap: 18px;
}

.post-card {
    padding: 24px;
}

.post-card__meta,
.meta-line,
.article-meta {
    font-size: 14px;
    color: var(--muted);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

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

.category-chip {
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
}

.category-chip small {
    color: var(--muted);
}

.pagination-bar,
.article-nav {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-top: 24px;
    color: var(--muted);
}

.pagination-bar a,
.article-nav a {
    color: var(--accent-deep);
}

.article-shell {
    border-radius: 30px;
    padding: 40px;
    margin: 36px 0;
}

.article-shell--narrow {
    width: min(860px, 100%);
}

.article-header {
    margin-bottom: 24px;
}

.hero-figure {
    margin: 0 0 24px;
    overflow: hidden;
    border-radius: 22px;
    background: var(--paper-strong);
}

.article-content {
    font-size: 18px;
    line-height: 1.9;
}

.article-content > *:first-child {
    margin-top: 0;
}

.article-content h1,
.article-content h2,
.article-content h3 {
    font-family: var(--serif);
    line-height: 1.2;
    margin-top: 1.8em;
}

.article-content p,
.article-content li,
.article-content blockquote {
    color: #332922;
}

.article-content blockquote {
    margin: 24px 0;
    padding: 18px 20px;
    border-left: 3px solid var(--accent);
    background: rgba(154, 107, 47, 0.08);
}

.article-content pre,
.article-content code {
    font-family: "SFMono-Regular", Menlo, Consolas, monospace;
}

.article-content pre {
    overflow-x: auto;
    padding: 18px;
    border-radius: 16px;
    background: #2b241f;
    color: #f9f4ee;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
}

.article-content th,
.article-content td {
    padding: 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.legacy-document {
    background: #fffef9;
    border-radius: 20px;
    overflow: hidden;
}

.legacy-document-title {
    display: none;
}

.tag-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
}

.tag-strip span {
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--paper-strong);
    color: var(--accent-deep);
    font-size: 14px;
}

.archive-groups {
    display: grid;
    gap: 24px;
}

.archive-year {
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.archive-year ul,
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.archive-year li {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 16px;
    padding: 10px 0;
    color: var(--muted);
}

.archive-year li a {
    color: var(--ink);
}

.site-footer {
    padding: 0 0 36px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    padding: 26px 0 12px;
    border-top: 1px solid rgba(154, 107, 47, 0.18);
}

.empty-state {
    color: var(--muted);
}

@media (max-width: 900px) {
    .hero-panel,
    .featured-grid,
    .category-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-note {
        border-left: 0;
        padding-left: 0;
        border-top: 1px solid var(--line);
        padding-top: 20px;
    }

    .section-heading,
    .header-inner,
    .pagination-bar,
    .article-nav {
        flex-direction: column;
        align-items: start;
    }

    .article-shell,
    .section-block,
    .hero-panel {
        padding: 24px;
        border-radius: 24px;
    }
}
