:root {
    --bg: #f8fafb;
    --ink: #101417;
    --surface: #ffffff;
    --muted: color-mix(in srgb, var(--ink) 62%, transparent);
    --soft: color-mix(in srgb, var(--ink) 42%, transparent);
    --line: color-mix(in srgb, var(--ink) 14%, transparent);
    --accent: #0f6b8f;
    --second: #c88720;
    --radius: 8px;
    --max: 1180px;
}

html[data-theme="dark"] {
    --bg: #0f0f10;
    --ink: #f3f1ed;
    --surface: #1b1b1d;
    --muted: #aaa6a0;
    --soft: #807d78;
    --line: #2e2e31;
}

* { box-sizing: border-box; }
html { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--bg); color: var(--ink); letter-spacing: 0; }
body { margin: 0; min-width: 320px; background: var(--bg); }
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: auto; }
.inner, .wrap, .footer-inner { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }
.brand { display: inline-flex; align-items: center; min-width: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 900; line-height: 1; }
.brand img { max-width: 190px; max-height: 48px; object-fit: contain; }
h1, h2, h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; line-height: 1.05; letter-spacing: 0; }
h1 { font-size: clamp(2.2rem, 5vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
h3 { font-size: 1.32rem; }
p { line-height: 1.65; }
.eyebrow, .kicker { display: inline-flex; width: fit-content; margin: 0 0 10px; color: var(--accent); font-size: .78rem; font-weight: 950; text-transform: uppercase; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 13px; margin-top: 12px; color: var(--soft); font-size: .84rem; font-weight: 800; }
.nav-toggle { display: none; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); padding: 9px 12px; font-weight: 900; }
.site-navigation .nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.site-navigation .nav a { display: block; padding: 10px 12px; border-radius: var(--radius); color: var(--muted); font-weight: 850; font-size: .93rem; }
.site-navigation .nav-current a, .site-navigation .nav a:hover { background: var(--ink); color: var(--bg); }
.post-card, .topic-card, .feature-row, .headline { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 16px 42px rgba(20, 16, 12, .08); overflow: hidden; }
.post-card-media { display: grid; place-items: center; min-height: 210px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 24%, white), color-mix(in srgb, var(--second) 22%, white)); color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: 1.6rem; font-weight: 900; }
.post-card-media img { height: 100%; min-height: inherit; object-fit: cover; }
.post-card-body { padding: 20px; }
.post-card-body p { margin: 10px 0 0; color: var(--muted); }
.post-feed { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding: 34px 0; }
.pagination { display: flex; justify-content: center; gap: 14px; width: min(var(--max), calc(100% - 40px)); margin: 26px auto; color: var(--muted); font-weight: 850; }
.archive-header { padding: 50px 0 22px; border-bottom: 1px solid var(--line); }
.archive-header p { max-width: 720px; color: var(--muted); }
.article { padding: 48px 0; }
.article-header { max-width: 820px; margin: 0 auto 26px; text-align: center; }
.article-header p { color: var(--muted); font-size: 1.12rem; }
.article-image { max-width: 980px; margin: 0 auto 34px; }
.article-image img { border-radius: var(--radius); box-shadow: 0 18px 42px rgba(20, 16, 12, .08); }
.article-image figcaption { margin-top: 10px; color: var(--soft); font-size: .9rem; }
.gh-content { max-width: 740px; margin: 0 auto; font-family: Georgia, "Times New Roman", serif; font-size: 1.12rem; line-height: 1.78; }
.gh-content > * { margin-top: 0; margin-bottom: 1.25em; }
.gh-content h2, .gh-content h3 { margin-top: 1.7em; }
.gh-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.gh-content blockquote { margin-left: 0; border-left: 4px solid var(--accent); padding-left: 18px; color: var(--muted); }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); }
.footer-inner, .footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding: 28px 0; }
.footer-inner .nav { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; padding: 0; list-style: none; }

.theme-letter .center-head { padding: 44px 20px 24px; border-bottom: 1px solid var(--line); text-align: center; }
.theme-letter .center-head .brand { font-size: clamp(2.2rem, 5vw, 3.4rem); display: inline-flex; }
.theme-letter .center-head p { max-width: 680px; margin: 14px auto; color: var(--muted); }
.theme-letter .site-navigation .nav { justify-content: center; }
.theme-letter .nav-toggle { margin: 14px auto 0; }
.theme-letter .letter-open { max-width: 780px; padding: 42px 0 20px; text-align: center; }
.theme-letter .letter-open p { color: var(--muted); }
.theme-letter .letter-stack { max-width: 900px; padding-bottom: 42px; }
.theme-letter .letter-stack .post-card { display: grid; grid-template-columns: 190px 1fr; margin-bottom: 14px; box-shadow: none; }
.theme-letter .letter-stack .post-card-media { min-height: 160px; border-radius: 0; }

.theme-broadsheet .paper-head { padding: 24px 20px; border-bottom: 3px double var(--line); text-align: center; }
.theme-broadsheet .issue-line { margin: 0 0 8px; color: var(--muted); }
.theme-broadsheet .paper-head .brand { display: inline-flex; font-size: clamp(2.6rem, 6vw, 4.4rem); }
.theme-broadsheet .site-navigation .nav { justify-content: center; margin-top: 14px; }
.theme-broadsheet .paper-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 18px; padding: 34px 0; }
.theme-broadsheet .headline { grid-row: span 2; border-top: 5px solid var(--ink); padding: 22px; box-shadow: none; }
.theme-broadsheet .headline p { color: var(--muted); }
.theme-broadsheet .paper-grid .post-card { box-shadow: none; }
.theme-broadsheet .paper-grid .post-card-media { display: none; }

.theme-profile .profile-head { display: grid; grid-template-columns: 94px 1fr; gap: 18px; align-items: center; width: min(var(--max), calc(100% - 40px)); margin: 0 auto; padding: 24px 0; border-bottom: 1px solid var(--line); }
.theme-profile .profile-mark { display: grid; place-items: center; width: 94px; height: 94px; border-radius: 50%; background: var(--ink); color: var(--bg); font-family: Georgia, "Times New Roman", serif; font-weight: 900; font-size: 2rem; overflow: hidden; }
.theme-profile .profile-mark img { height: 100%; object-fit: cover; }
.theme-profile .profile-copy p { margin: 8px 0 12px; color: var(--muted); }
.theme-profile .profile-copy .brand { font-size: 2rem; }
.theme-profile .profile-grid { display: grid; grid-template-columns: 260px 1fr; gap: 22px; padding: 34px 0; }
.theme-profile .topic-rail { display: grid; gap: 10px; align-self: start; position: sticky; top: 24px; }
.theme-profile .topic-card { display: flex; flex-direction: column; justify-content: space-between; min-height: 84px; padding: 16px; box-shadow: none; border-top: 4px solid var(--accent); }
.theme-profile .topic-card span { font-family: Georgia, "Times New Roman", serif; font-weight: 900; }
.theme-profile .topic-card strong { color: var(--soft); font-size: .82rem; }
.theme-profile .profile-feed { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.theme-profile .feature-row { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }
.theme-profile .feature-row .post-card-body { display: flex; flex-direction: column; justify-content: center; }

.theme-prism .site-header { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(12px); }
.theme-prism .site-nav { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; min-height: 66px; }
.theme-prism .brand { font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: 1.25rem; font-weight: 900; }
.theme-prism .site-actions { display: flex; align-items: center; gap: 8px; }
.theme-prism .icon-btn { width: 38px; height: 38px; border: 0; border-radius: var(--radius); background: transparent; color: var(--muted); cursor: pointer; font-size: 1.2rem; }
.theme-prism .icon-btn:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); }
.theme-prism .subscribe-btn { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; padding: 10px 18px; background: var(--accent); color: #fff; font-weight: 850; }
.theme-prism .publication-cover { padding: 86px 20px 44px; border-bottom: 1px solid var(--line); text-align: center; }
.theme-prism .publication-cover .inner { max-width: 760px; }
.theme-prism .publication-cover p { max-width: 580px; margin: 16px auto 24px; color: var(--muted); font-size: 1.12rem; }
.theme-prism .featured-section, .theme-prism .latest-section { padding: 48px 0; }
.theme-prism .section-title { display: inline-block; margin: 0 0 24px; border-bottom: 2px solid var(--ink); padding-bottom: 10px; color: var(--muted); font-size: .86rem; font-family: Inter, ui-sans-serif, system-ui, sans-serif; text-transform: uppercase; }
.theme-prism .featured-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 26px; }
.theme-prism .post-card { box-shadow: none; border: 0; background: transparent; }
.theme-prism .post-card-media { border-radius: 12px; min-height: 230px; }
.theme-prism .post-card-lead { grid-row: span 2; }
.theme-prism .post-card-lead .post-card-media { min-height: 390px; }
.theme-prism .post-feed { padding: 0; }
.theme-prism .footer-cta { max-width: 620px; text-align: center; padding: 54px 0 24px; }
.theme-prism .footer-cta p { color: var(--muted); }

@media (max-width: 980px) {
    .post-feed, .theme-broadsheet .paper-grid, .theme-profile .profile-feed { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .theme-broadsheet .headline { grid-row: auto; grid-column: 1 / -1; }
    .theme-profile .profile-grid, .theme-prism .featured-grid { grid-template-columns: 1fr; }
    .theme-profile .topic-rail { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .theme-profile .feature-row { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .inner, .wrap, .footer-inner, .footer-bottom, .theme-profile .profile-head { width: min(100% - 28px, var(--max)); }
    .nav-toggle { display: inline-flex; }
    .site-navigation { display: none; margin-top: 14px; }
    .site-navigation.is-open { display: block; }
    .site-navigation .nav { display: grid; grid-template-columns: 1fr; justify-content: stretch; }
    .site-navigation .nav a { border: 1px solid var(--line); background: var(--surface); }
    .post-feed, .theme-broadsheet .paper-grid, .theme-profile .profile-feed, .theme-profile .topic-rail { grid-template-columns: 1fr; }
    .theme-letter .letter-stack .post-card { grid-template-columns: 1fr; }
    .theme-profile .profile-head, .theme-prism .site-nav { grid-template-columns: 1fr auto; }
    .theme-profile .profile-copy { grid-column: 1 / -1; }
    .theme-prism .site-actions { grid-column: 1 / -1; }
    .footer-inner, .footer-bottom { display: block; }
}