/* ==========================================================================
   Lumen theme for Qingyan
   ========================================================================== */

:root {
    --paper: #f6f1e7;
    --paper-soft: #fbf8f1;
    --card: #fffdf8;
    --ink: #28241e;
    --ink-soft: #5f574c;
    --muted: #8f8577;
    --line: #e2d8c8;
    --line-strong: #cdbfab;
    --accent: #b4532a;
    --accent-soft: #f2e1d5;
    --dark: #24211c;
    --serif: "Iowan Old Style", "Baskerville", "Songti SC", "Noto Serif SC", "STSong", Georgia, serif;
    --sans: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    --shadow: 0 18px 45px rgba(62, 48, 31, .07);
    --radius: 3px;
    --shell: 1200px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    background:
        radial-gradient(1000px 500px at 88% -6%, rgba(220, 197, 166, .32), transparent 60%),
        var(--paper);
    color: var(--ink);
    font-family: var(--serif);
    font-size: 16px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}
html[data-font="sans"] body,
html[data-font="sans"] .article-content {
    font-family: var(--sans);
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
button, input, textarea { font: inherit; }
button { color: inherit; }
h1, h2, h3, h4, p { margin-top: 0; }
::selection { background: var(--accent); color: #fff; }
.shell { width: min(var(--shell), calc(100% - 64px)); margin: 0 auto; }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
    position: fixed;
    left: 16px;
    top: -60px;
    z-index: 999;
    background: var(--ink);
    color: var(--paper);
    padding: 8px 14px;
    border-radius: 3px;
    font-size: 13px;
}
.skip-link:focus { top: 12px; color: var(--paper); }

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
}
.header-inner {
    height: 84px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
}
.site-brand { display: flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: var(--accent);
    border: 1px solid var(--line-strong);
    border-radius: 50%;
}
.brand-mark svg { width: 25px; height: 25px; }
.brand-logo { max-height: 40px; width: auto; }
.brand-text strong {
    display: block;
    font-size: 19px;
    line-height: 1.25;
    letter-spacing: .12em;
    font-weight: 600;
}
.brand-text small {
    display: block;
    font-family: var(--sans);
    font-size: 7.5px;
    color: var(--muted);
    letter-spacing: .25em;
    margin-top: 1px;
}
.site-nav { display: flex; align-items: center; gap: 30px; margin-left: auto; }
.site-nav a {
    font-family: var(--sans);
    font-size: 12.5px;
    color: var(--ink-soft);
    position: relative;
    padding: 4px 0;
    letter-spacing: .02em;
}
.site-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .22s ease;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.header-tools { display: flex; align-items: center; gap: 12px; }
.header-search {
    display: flex;
    align-items: center;
    width: 172px;
    height: 34px;
    border-bottom: 1px solid var(--line-strong);
    gap: 5px;
}
.header-search input {
    width: 100%;
    border: 0;
    background: none;
    outline: none;
    font-family: var(--sans);
    font-size: 11.5px;
    color: var(--ink);
    padding: 4px 0;
}
.header-search input::placeholder { color: var(--muted); }
.header-search button {
    border: 0;
    background: none;
    color: var(--muted);
    cursor: pointer;
    padding: 0;
    display: grid;
    place-items: center;
}
.header-search button svg { width: 15px; height: 15px; }
.header-search button:hover { color: var(--accent); }
.rss-link {
    font-family: var(--sans);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .1em;
    color: var(--muted);
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    padding: 3px 8px;
}
.rss-link:hover { border-color: var(--accent); color: var(--accent); }
.menu-toggle {
    display: none;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    position: relative;
}
.menu-toggle span:not(.sr-only) {
    position: absolute;
    left: 11px;
    right: 11px;
    height: 1px;
    background: var(--ink);
    transition: transform .2s ease, top .2s ease;
}
.menu-toggle span:nth-child(1) { top: 15px; }
.menu-toggle span:nth-child(2) { top: 21px; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { top: 18px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { top: 18px; transform: rotate(-45deg); }
.mobile-nav { display: none; }
.site-header.is-scrolled { box-shadow: 0 10px 32px rgba(62, 48, 31, .06); }

/* ---------- Public flash messages ---------- */
.site-flashes {
    width: min(var(--shell), calc(100% - 64px));
    margin: 18px auto 0;
    display: grid;
    gap: 7px;
}
.site-flash {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    background: var(--card);
    border: 1px solid var(--line);
    border-left: 3px solid var(--muted);
    padding: 9px 12px;
    box-shadow: var(--shadow);
}
.site-flash > span { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); margin-top: 8px; flex: 0 0 5px; }
.site-flash p { margin: 0; font-family: var(--sans); font-size: 11.5px; line-height: 1.7; color: var(--ink-soft); }
.site-flash-success { border-left-color: #2f6b4f; }
.site-flash-success > span { background: #2f6b4f; }
.site-flash-error { border-left-color: #a63a2a; }
.site-flash-error > span { background: #a63a2a; }
.site-flash-warning { border-left-color: #8a5a12; }
.site-flash-warning > span { background: #8a5a12; }

/* ---------- Home hero ---------- */
.home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 270px;
    align-items: end;
    gap: 40px;
    padding: 76px 0 58px;
    position: relative;
}
.home-hero::before {
    content: "";
    position: absolute;
    left: 0;
    top: 48px;
    width: 42px;
    height: 1px;
    background: var(--accent);
}
.hero-kicker, .section-kicker {
    font-family: var(--sans);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .24em;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 16px;
}
.hero-copy h1 {
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1.25;
    font-weight: 500;
    letter-spacing: -.035em;
    margin-bottom: 24px;
    max-width: 800px;
}
.hero-text {
    font-family: var(--sans);
    color: var(--ink-soft);
    font-size: 14px;
    line-height: 1.9;
    max-width: 480px;
    margin-bottom: 26px;
}
.hero-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--ink);
    color: var(--paper-soft);
    padding: 11px 20px;
    font-family: var(--sans);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .02em;
    border: 1px solid var(--ink);
    border-radius: 999px;
    transition: background .18s ease, transform .18s ease;
}
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; transform: translateY(-1px); }
.btn-primary span { font-size: 13px; }
.btn-text {
    font-family: var(--sans);
    font-size: 12.5px;
    color: var(--ink-soft);
    border-bottom: 1px solid var(--line-strong);
    padding-bottom: 2px;
    display: inline-flex;
    gap: 6px;
    align-items: center;
}
.btn-text:hover { color: var(--accent); border-color: var(--accent); }
.hero-side {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 8px;
    position: relative;
}
.hero-stamp {
    width: 94px;
    height: 94px;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    color: var(--muted);
    font-family: var(--sans);
    font-size: 7px;
    letter-spacing: .16em;
    transform: rotate(-8deg);
}
.hero-stamp strong { font-family: var(--serif); font-size: 19px; font-weight: 500; color: var(--ink-soft); letter-spacing: .02em; line-height: 1.2; }
.hero-count { text-align: right; padding-bottom: 4px; }
.hero-count strong { display: block; font-family: var(--serif); font-size: 34px; font-weight: 500; line-height: 1; color: var(--ink); }
.hero-count span { font-family: var(--sans); font-size: 9px; color: var(--muted); letter-spacing: .16em; }
.hero-lines {
    position: absolute;
    right: 0;
    top: -30px;
    width: 62px;
    height: 62px;
    background-image: linear-gradient(var(--line-strong) 1px, transparent 1px);
    background-size: 100% 9px;
    opacity: .55;
}

/* ---------- Feed + cards ---------- */
.home-layout { display: block; padding-bottom: 70px; }
.home-layout.with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 286px;
    gap: 54px;
    align-items: start;
}
.section-bar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 22px;
}
.section-kicker { margin-bottom: 5px; }
.section-bar h2 { font-size: 25px; font-weight: 500; letter-spacing: -.01em; margin: 0; }
.section-link { font-family: var(--sans); font-size: 10.5px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; padding-bottom: 3px; }
.section-link:hover { color: var(--accent); }
.post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.post-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    min-height: 260px;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    position: relative;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.post-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.post-cat {
    font-family: var(--sans);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent);
}
.post-number { font-family: var(--sans); font-size: 9px; color: var(--muted); letter-spacing: .08em; }
.post-title {
    font-size: 23px;
    line-height: 1.4;
    font-weight: 500;
    margin-bottom: 10px;
    letter-spacing: -.015em;
}
.post-title a:hover { color: var(--accent); }
.post-excerpt {
    font-family: var(--sans);
    font-size: 12.5px;
    line-height: 1.85;
    color: var(--ink-soft);
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-meta {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--sans);
    font-size: 9.5px;
    color: var(--muted);
    padding-top: 13px;
    border-top: 1px solid var(--line);
    flex-wrap: wrap;
}
.meta-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--line-strong); flex: 0 0 3px; }
.post-arrow { margin-left: auto; font-size: 13px; color: var(--ink-soft); }
.post-cover { margin: -4px -4px 16px; overflow: hidden; aspect-ratio: 16 / 9; border-radius: 2px; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.post-card:hover .post-cover img { transform: scale(1.03); }
.post-card--lead {
    grid-column: span 2;
    background: var(--dark);
    border-color: var(--dark);
    color: #f2ece1;
    padding: 32px 34px;
    min-height: 300px;
}
.post-card--lead .post-cat { color: #e1a17d; }
.post-card--lead .post-number, .post-card--lead .post-meta { color: #9f9587; }
.post-card--lead .post-excerpt { color: #c9c0b3; max-width: 680px; font-size: 13px; }
.post-card--lead .post-title { font-size: clamp(27px, 3.3vw, 38px); line-height: 1.35; max-width: 760px; margin-bottom: 13px; }
.post-card--lead .post-title a:hover { color: #e6b291; }
.post-card--lead .post-meta { border-top-color: #3a352d; }
.post-card--lead .post-arrow { color: #f2ece1; }
.post-card--lead .post-cover { aspect-ratio: 21 / 9; }

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid var(--line);
    margin-top: 34px;
    padding-top: 18px;
}
.page-numbers { display: flex; align-items: center; gap: 12px; font-family: var(--sans); font-size: 11px; }
.page-numbers a, .page-numbers span { color: var(--muted); }
.page-numbers a.is-current { color: var(--ink); font-weight: 700; position: relative; }
.page-numbers a.is-current::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -7px;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--accent);
    transform: translateX(-50%);
}
.page-arrow { font-family: var(--sans); font-size: 10.5px; color: var(--ink-soft); }
.page-arrow.is-disabled { opacity: .3; pointer-events: none; }

/* ---------- Sidebar ---------- */
.sidebar { display: grid; gap: 18px; position: sticky; top: 106px; }
.side-card {
    border-top: 1px solid var(--line-strong);
    padding-top: 17px;
}
.side-kicker {
    font-family: var(--sans);
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: .22em;
    color: var(--accent);
    margin-bottom: 9px;
}
.about-card { background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--ink); padding: 19px; }
.about-text { font-size: 13px; line-height: 1.9; color: var(--ink-soft); margin-bottom: 12px; }
.side-more { font-family: var(--sans); font-size: 10.5px; color: var(--ink); display: inline-flex; gap: 4px; align-items: center; }
.side-more span { color: var(--accent); }
.side-more:hover { color: var(--accent); }
.side-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.side-head h3 { font-size: 14px; font-weight: 600; margin: 0; }
.side-head span { font-family: var(--sans); font-size: 7px; letter-spacing: .17em; color: var(--muted); }
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px dashed var(--line);
    padding: 7px 0;
    font-size: 12.5px;
}
.side-list li:last-child { border-bottom: 0; }
.side-list a { color: var(--ink-soft); }
.side-list a:hover { color: var(--accent); }
.side-list em { font-family: var(--sans); font-style: normal; font-size: 9px; color: var(--muted); }
.side-posts { list-style: none; margin: 0; padding: 0; }
.side-posts li { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.side-posts li:last-child { border-bottom: 0; }
.side-posts a { display: block; font-size: 12.5px; line-height: 1.6; color: var(--ink-soft); }
.side-posts a:hover { color: var(--accent); }
.side-posts time { font-family: var(--sans); font-size: 8.5px; color: var(--muted); margin-top: 2px; display: block; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-list a {
    font-family: var(--sans);
    font-size: 10px;
    color: var(--ink-soft);
    border: 1px solid var(--line);
    background: var(--card);
    border-radius: 999px;
    padding: 3px 9px;
}
.tag-list a:hover { border-color: var(--accent); color: var(--accent); }
.side-comments { list-style: none; margin: 0; padding: 0; }
.side-comments li { padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 11px; }
.side-comments li:last-child { border: 0; }
.side-comments strong { display: block; font-family: var(--sans); font-size: 9.5px; color: var(--ink); }
.side-comments a { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.side-comments a:hover { color: var(--accent); }
.subscribe-card p:not(.side-kicker) { font-family: var(--sans); font-size: 11px; color: var(--muted); line-height: 1.7; margin-bottom: 7px; }

/* ---------- Page hero / archive ---------- */
.page-hero { padding: 62px 0 40px; max-width: 1000px; margin: 0 auto; }
.breadcrumbs {
    font-family: var(--sans);
    font-size: 9.5px;
    color: var(--muted);
    display: flex;
    gap: 7px;
    align-items: center;
    margin-bottom: 24px;
    letter-spacing: .04em;
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent); }
.page-hero h1 {
    font-size: clamp(36px, 5vw, 58px);
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: -.035em;
    margin-bottom: 14px;
}
.page-hero-desc { font-family: var(--sans); color: var(--ink-soft); font-size: 13px; line-height: 1.9; max-width: 620px; margin-bottom: 10px; }
.archive-count { font-family: var(--sans); font-size: 9.5px; color: var(--muted); letter-spacing: .08em; }
.hero-search {
    display: flex;
    align-items: center;
    max-width: 540px;
    border-bottom: 1px solid var(--line-strong);
    margin-top: 26px;
}
.hero-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: none;
    outline: none;
    padding: 11px 0;
    font-family: var(--sans);
    font-size: 13px;
    color: var(--ink);
}
.hero-search button {
    border: 0;
    background: none;
    font-family: var(--sans);
    font-size: 11px;
    color: var(--accent);
    cursor: pointer;
    padding: 8px 0 8px 15px;
}
.archive-months { display: grid; gap: 26px; }
.archive-year { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 28px; }
.archive-year-label { padding-top: 3px; }
.archive-year-label strong { display: block; font-size: 41px; font-weight: 500; line-height: 1; letter-spacing: -.02em; }
.archive-year-label span { font-family: var(--sans); font-size: 8.5px; color: var(--muted); letter-spacing: .1em; }
.archive-month-list { border-top: 1px solid var(--line); }
.archive-month-list a {
    display: grid;
    grid-template-columns: 48px 1fr 70px 22px;
    align-items: center;
    gap: 12px;
    padding: 13px 2px;
    border-bottom: 1px solid var(--line);
    transition: padding .18s ease, background .18s ease;
}
.archive-month-list a:hover { padding-left: 9px; background: color-mix(in srgb, var(--card) 75%, transparent); }
.month-number { font-family: var(--sans); font-size: 9px; color: var(--muted); letter-spacing: .06em; }
.month-name { font-size: 15px; }
.month-count { font-family: var(--sans); font-size: 9.5px; color: var(--muted); text-align: right; }
.month-arrow { color: var(--muted); text-align: right; font-size: 12px; }
.archive-month-list a:hover .month-arrow { color: var(--accent); }

/* ---------- Single article ---------- */
.article-shell { width: min(760px, calc(100% - 64px)); margin: 0 auto; padding: 64px 0 90px; }
.article-header { margin-bottom: 38px; }
.article-header h1 {
    font-size: clamp(35px, 5vw, 55px);
    line-height: 1.28;
    font-weight: 500;
    letter-spacing: -.035em;
    margin-bottom: 17px;
}
.article-lead { color: var(--ink-soft); font-size: 16px; line-height: 1.85; font-family: var(--sans); max-width: 660px; margin-bottom: 24px; }
.article-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-family: var(--sans);
    font-size: 10px;
    color: var(--muted);
    padding-top: 17px;
    border-top: 1px solid var(--line);
}
.meta-author { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-soft); }
.author-dot {
    width: 23px;
    height: 23px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    display: grid;
    place-items: center;
    font-family: var(--serif);
    font-size: 10px;
}
.article-cover { margin: 0 0 38px; }
.article-cover img { width: 100%; border-radius: 2px; }
.article-content {
    font-size: 16.5px;
    line-height: 2;
    color: #332e27;
    overflow-wrap: break-word;
}
.article-content > *:first-child { margin-top: 0; }
.article-content h1, .article-content h2, .article-content h3, .article-content h4 {
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: -.02em;
    margin: 2em 0 .7em;
}
.article-content h2 { font-size: 28px; padding-top: .4em; }
.article-content h3 { font-size: 21px; }
.article-content h4 { font-size: 17px; }
.article-content p { margin: 0 0 1.35em; }
.article-content a { color: var(--accent); border-bottom: 1px solid color-mix(in srgb, var(--accent) 38%, transparent); }
.article-content a:hover { background: var(--accent-soft); }
.article-content strong { font-weight: 700; color: var(--ink); }
.article-content blockquote {
    margin: 1.9em 0;
    padding: 4px 0 4px 24px;
    border-left: 2px solid var(--accent);
    color: var(--ink-soft);
    font-size: 17px;
    font-style: italic;
}
.article-content blockquote p:last-child { margin-bottom: 0; }
.article-content ul, .article-content ol { padding-left: 1.5em; margin: 0 0 1.4em; }
.article-content li { margin-bottom: .4em; }
.article-content li::marker { color: var(--accent); }
.article-content hr { border: 0; border-top: 1px solid var(--line); margin: 2.8em auto; width: 64px; }
.article-content pre {
    background: #25221d;
    color: #e9e1d4;
    border-radius: 3px;
    padding: 19px 21px;
    overflow-x: auto;
    font-family: var(--mono);
    font-size: 12.5px;
    line-height: 1.8;
    margin: 1.8em 0;
}
.article-content code { font-family: var(--mono); font-size: .85em; }
.article-content :not(pre) > code { background: #eee5d8; color: #8b3f21; padding: 2px 5px; border-radius: 3px; }
.article-content img { border-radius: 2px; margin: 1.8em 0; }
.article-content iframe, .article-content video { max-width: 100%; border: 0; }
.article-content .table-wrap { overflow-x: auto; margin: 1.8em 0; }
.article-content table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 13px; }
.article-content th, .article-content td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; }
.article-content th { background: var(--paper-soft); font-weight: 600; }
.article-tags {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    margin-top: 45px;
    padding-top: 17px;
    border-top: 1px solid var(--line);
    font-family: var(--sans);
    font-size: 10px;
    color: var(--muted);
}
.article-tags a { border: 1px solid var(--line); padding: 3px 9px; border-radius: 999px; }
.article-tags a:hover { border-color: var(--accent); color: var(--accent); }
.author-card {
    margin-top: 34px;
    display: flex;
    align-items: flex-start;
    gap: 17px;
    background: var(--card);
    border: 1px solid var(--line);
    padding: 21px;
}
.author-avatar {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    display: grid;
    place-items: center;
    font-size: 19px;
}
.author-card h3 { margin: 0 0 3px; font-size: 16px; font-weight: 600; }
.author-card p:not(.side-kicker) { margin: 0; font-family: var(--sans); color: var(--muted); font-size: 11.5px; line-height: 1.7; }
.article-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 40px; }
.article-nav-item {
    border: 1px solid var(--line);
    background: var(--card);
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-height: 84px;
}
.article-nav-item span { font-family: var(--sans); font-size: 9px; color: var(--muted); letter-spacing: .05em; }
.article-nav-item strong { font-size: 13px; font-weight: 500; line-height: 1.55; }
.article-nav-item:hover { border-color: var(--accent); }
.article-nav-item.next { text-align: right; }
.article-nav-item.is-empty { border-style: dashed; background: transparent; }
.related { margin-top: 58px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.related-grid a { border-top: 1px solid var(--line-strong); padding: 13px 0; display: flex; flex-direction: column; gap: 5px; }
.related-grid span { font-family: var(--sans); font-size: 8.5px; color: var(--accent); letter-spacing: .09em; text-transform: uppercase; }
.related-grid strong { font-size: 14px; font-weight: 500; line-height: 1.5; }
.related-grid small { font-family: var(--sans); font-size: 9px; color: var(--muted); }
.related-grid a:hover strong { color: var(--accent); }
.comments-closed { margin-top: 42px; font-family: var(--sans); color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); padding-top: 17px; }

/* ---------- Comments ---------- */
.comments { margin-top: 60px; }
.comments-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); padding-bottom: 13px; margin-bottom: 24px; }
.comments-head h2 { margin: 0; font-size: 23px; font-weight: 500; }
.comments-head h2 span { color: var(--muted); font-size: 13px; }
.comments-head > p { margin: 0; font-family: var(--sans); font-size: 10px; color: var(--muted); }
.comments-empty { font-family: var(--sans); font-size: 12px; color: var(--muted); padding: 10px 0 24px; }
.comment-list, .comment-children { list-style: none; margin: 0; padding: 0; }
.comment-item { border-bottom: 1px solid var(--line); padding: 17px 0; }
.comment-item:first-child { padding-top: 0; }
.comment-main { display: flex; gap: 12px; align-items: flex-start; }
.comment-avatar {
    width: 35px;
    height: 35px;
    flex: 0 0 35px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    display: grid;
    place-items: center;
    font-size: 13px;
}
.comment-body { flex: 1; min-width: 0; }
.comment-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.comment-top strong { font-size: 13px; font-weight: 600; }
.comment-top time { font-family: var(--sans); font-size: 9px; color: var(--muted); white-space: nowrap; }
.comment-text { font-family: var(--sans); font-size: 12.5px; line-height: 1.85; color: var(--ink-soft); overflow-wrap: anywhere; }
.comment-actions { display: flex; gap: 13px; margin-top: 5px; font-family: var(--sans); font-size: 9px; color: var(--muted); }
.comment-actions a:hover { color: var(--accent); }
.comment-children { margin-left: 47px; margin-top: 10px; border-left: 1px solid var(--line); padding-left: 16px; }
.comment-children .comment-item { padding: 13px 0; }
.comment-children .comment-avatar { width: 28px; height: 28px; flex-basis: 28px; font-size: 11px; }

.respond { margin-top: 32px; background: var(--card); border: 1px solid var(--line); padding: 23px; }
.respond-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 17px; }
.respond-head h3 { margin: 0; font-size: 17px; font-weight: 500; }
.cancel-reply { font-family: var(--sans); font-size: 10px; color: var(--muted); }
.comment-form .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.comment-form label { display: block; }
.comment-form label > span { display: block; font-family: var(--sans); font-size: 9.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 5px; letter-spacing: .02em; }
.comment-form input, .comment-form textarea {
    width: 100%;
    border: 1px solid var(--line-strong);
    background: var(--paper-soft);
    border-radius: 2px;
    outline: none;
    padding: 8px 10px;
    font-family: var(--sans);
    font-size: 12px;
    color: var(--ink);
    line-height: 1.7;
    transition: border-color .15s ease, background .15s ease;
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--accent); background: #fffdf9; }
.comment-form textarea { resize: vertical; min-height: 118px; }
.comment-form .form-grid .full { grid-column: 1 / -1; }
.comment-content { display: block; margin-bottom: 12px; }
.comment-submit { display: flex; align-items: center; justify-content: space-between; gap: 15px; flex-wrap: wrap; }
.comment-submit p { margin: 0; font-family: var(--sans); font-size: 9px; color: var(--muted); line-height: 1.6; }
.comment-submit .btn-primary { cursor: pointer; }
.hp-field { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Empty / error / password ---------- */
.empty-state { text-align: center; padding: 58px 24px; border: 1px dashed var(--line-strong); background: color-mix(in srgb, var(--card) 55%, transparent); }
.empty-symbol { display: block; font-size: 35px; color: var(--accent); margin-bottom: 10px; line-height: 1; }
.empty-state h2 { font-size: 23px; font-weight: 500; margin-bottom: 6px; }
.empty-state p { font-family: var(--sans); font-size: 12px; color: var(--muted); max-width: 380px; margin: 0 auto 15px; line-height: 1.8; }
.error-page { padding: 90px 0 100px; max-width: 720px; }
.error-number { font-size: clamp(100px, 18vw, 190px); line-height: .9; letter-spacing: -.09em; color: var(--line-strong); font-weight: 500; margin-bottom: 24px; }
.error-page h1, .password-page h1 { font-size: clamp(32px, 4.5vw, 48px); font-weight: 500; line-height: 1.3; letter-spacing: -.03em; margin-bottom: 13px; }
.error-page > p:not(.section-kicker), .password-page > p:not(.section-kicker) { font-family: var(--sans); font-size: 13px; color: var(--ink-soft); line-height: 1.9; max-width: 520px; margin-bottom: 22px; }
.error-actions { display: flex; align-items: center; gap: 20px; }
.maintenance-mark { font-size: 56px; color: var(--line-strong); margin-bottom: 20px; line-height: 1; }
.password-page { padding: 95px 0 110px; max-width: 620px; }
.password-form { display: flex; gap: 8px; margin: 28px 0 20px; max-width: 480px; }
.password-form input {
    flex: 1;
    border: 1px solid var(--line-strong);
    background: var(--card);
    padding: 11px 13px;
    border-radius: 2px;
    font-family: var(--sans);
    font-size: 13px;
    outline: none;
}
.password-form input:focus { border-color: var(--accent); }
.password-form .btn-primary { cursor: pointer; border-radius: 2px; }
.back-link { font-family: var(--sans); font-size: 10.5px; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: color-mix(in srgb, var(--paper-soft) 75%, transparent); }
.footer-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
    padding: 38px 0 30px;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-mark {
    width: 37px;
    height: 37px;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--accent);
}
.footer-mark svg { width: 23px; height: 23px; }
.footer-brand strong { display: block; font-size: 17px; letter-spacing: .1em; font-weight: 600; }
.footer-brand p { margin: 1px 0 0; font-family: var(--sans); font-size: 10.5px; color: var(--muted); }
.footer-meta { text-align: right; }
.footer-meta > p { margin: 0 0 8px; font-family: var(--sans); font-size: 10px; color: var(--muted); }
.footer-links { display: flex; gap: 14px; justify-content: flex-end; font-family: var(--sans); font-size: 9.5px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--line); padding: 10px 0; }
.footer-bottom .shell { display: flex; justify-content: space-between; gap: 16px; font-family: var(--sans); font-size: 8.5px; color: var(--muted); letter-spacing: .04em; }

/* ---------- Responsive ---------- */
@media (max-width: 1050px) {
    .shell { width: min(var(--shell), calc(100% - 44px)); }
    .home-layout.with-sidebar { grid-template-columns: minmax(0, 1fr) 250px; gap: 34px; }
    .home-hero { grid-template-columns: minmax(0, 1fr) 210px; }
    .header-search { width: 135px; }
}
@media (max-width: 880px) {
    .site-nav { display: none; }
    .menu-toggle { display: block; }
    .mobile-nav {
        display: none;
        border-top: 1px solid var(--line);
        padding: 17px 22px 22px;
        background: var(--paper-soft);
    }
    .mobile-nav.is-open { display: block; }
    .mobile-nav nav { display: grid; gap: 0; }
    .mobile-nav nav a {
        font-family: var(--sans);
        font-size: 13px;
        padding: 10px 0;
        border-bottom: 1px solid var(--line);
    }
    .mobile-search { display: flex; gap: 7px; margin-top: 14px; }
    .mobile-search input {
        flex: 1;
        border: 1px solid var(--line-strong);
        background: var(--card);
        padding: 8px 10px;
        font-family: var(--sans);
        font-size: 12px;
        outline: none;
    }
    .mobile-search button { border: 0; background: var(--ink); color: var(--paper); padding: 0 13px; font-family: var(--sans); font-size: 11px; }
    .mobile-note { margin: 12px 0 0; font-family: var(--sans); font-size: 9.5px; color: var(--muted); }
    .home-layout.with-sidebar { grid-template-columns: 1fr; }
    .sidebar { position: static; grid-template-columns: 1fr 1fr; margin-top: 40px; }
    .home-hero { grid-template-columns: 1fr; padding: 56px 0 40px; }
    .hero-side { display: none; }
    .post-grid { grid-template-columns: 1fr; }
    .post-card--lead { grid-column: auto; }
    .archive-year { grid-template-columns: 1fr; gap: 8px; }
    .archive-year-label { display: flex; align-items: baseline; gap: 10px; }
    .archive-year-label strong { font-size: 28px; }
    .article-shell { width: min(760px, calc(100% - 44px)); }
    .related-grid { grid-template-columns: 1fr; }
    .footer-inner { flex-direction: column; gap: 20px; }
    .footer-meta { text-align: left; }
    .footer-links { justify-content: flex-start; }
}
@media (max-width: 640px) {
    .shell { width: calc(100% - 34px); }
    .header-inner { height: 72px; }
    .header-search, .rss-link { display: none; }
    .hero-copy h1 { font-size: clamp(36px, 10vw, 48px); }
    .hero-text { font-size: 13px; }
    .home-hero { padding: 44px 0 34px; }
    .home-hero::before { top: 27px; }
    .post-grid { gap: 12px; }
    .post-card { padding: 19px; min-height: 230px; }
    .post-card--lead { padding: 24px 21px; }
    .post-card--lead .post-title { font-size: 27px; }
    .post-title { font-size: 21px; }
    .post-excerpt { font-size: 12px; }
    .sidebar { grid-template-columns: 1fr; }
    .section-bar h2 { font-size: 22px; }
    .page-hero { padding: 42px 0 28px; }
    .page-hero h1 { font-size: 37px; }
    .archive-month-list a { grid-template-columns: 38px 1fr 58px 16px; gap: 7px; }
    .article-shell { width: calc(100% - 34px); padding: 42px 0 55px; }
    .article-header h1 { font-size: 33px; }
    .article-lead { font-size: 14px; }
    .article-content { font-size: 15.5px; line-height: 1.95; }
    .article-content h2 { font-size: 23px; }
    .article-content h3 { font-size: 19px; }
    .article-content blockquote { font-size: 15.5px; padding-left: 17px; }
    .article-content pre { padding: 14px; font-size: 11.5px; }
    .article-nav { grid-template-columns: 1fr; }
    .article-nav-item.next { text-align: left; }
    .comment-form .form-grid { grid-template-columns: 1fr; }
    .comments-head { flex-direction: column; align-items: flex-start; gap: 4px; }
    .comment-children { margin-left: 19px; padding-left: 10px; }
    .respond { padding: 17px; }
    .comment-submit { align-items: flex-start; flex-direction: column; }
    .error-page { padding: 55px 0 70px; }
    .footer-bottom .shell { flex-direction: column; gap: 3px; }
    .pagination { flex-wrap: wrap; gap: 10px; }
    .password-form { flex-direction: column; }
    .password-form .btn-primary { justify-content: center; }
}
