:root {
  --bg: #faf7f2;
  --bg-card: #ffffff;
  --bg-tint: #f1eae1;
  --ink: #2b2622;
  --ink-soft: #675e57;
  --accent: #8d5a44;
  --accent-ink: #6e4534;
  --line: #e6ddd2;
  --serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --sans: "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
  --wrap: 72rem;
  --measure: 42rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; text-decoration-color: rgba(141, 90, 68, 0.45); }
a:hover { text-decoration-color: currentColor; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem; }
.muted { color: var(--ink-soft); font-size: 0.95rem; }

.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: #fff; padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: 1.1rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); text-decoration: none; }
.brand-name { font-family: var(--serif); font-weight: 600; font-size: 1.55rem; letter-spacing: 0.005em; }
.nav { display: flex; gap: 1.4rem; flex-wrap: wrap; font-size: 0.92rem; letter-spacing: 0.01em; }
.nav a { color: var(--ink-soft); text-decoration: none; padding-bottom: 2px; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0; }
.eyebrow { font-family: var(--sans); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin: 0 0 0.5rem; font-weight: 600; }
.lede { font-size: 1.2rem; color: var(--ink-soft); line-height: 1.55; margin: 0.8rem 0 0; max-width: var(--measure); }
.section-title { font-size: 1.15rem; font-family: var(--sans); font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: var(--ink-soft); margin: 3.5rem 0 1.25rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--line); }

/* ---------- hero ---------- */
.hero { padding: 4.5rem 1.5rem 2.5rem; }
.hero h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); max-width: 18ch; letter-spacing: -0.01em; }
.hero .lede { max-width: 44rem; font-size: 1.22rem; }
.hero-links { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.8rem; }
.btn { display: inline-block; background: var(--accent); color: #fff; padding: 0.7rem 1.3rem; border-radius: 4px; text-decoration: none; font-size: 0.95rem; font-weight: 500; }
.btn:hover { background: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--accent-ink); border: 1px solid var(--accent); }
.btn-ghost:hover { background: var(--bg-tint); }

/* ---------- cards ---------- */
.card-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
.card { background: var(--bg-card); border: 1px solid var(--line); border-radius: 6px; padding: 1.5rem 1.6rem; display: flex; flex-direction: column; gap: 0.5rem; }
.card h3 { font-size: 1.5rem; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--accent-ink); text-decoration: underline; }
.card-desc { margin: 0; color: var(--ink-soft); font-size: 0.98rem; flex: 1; }
.card .meta { margin: 0.2rem 0 0; }
.meta { font-size: 0.85rem; color: var(--ink-soft); margin: 0; }
.featured .card-lead { grid-column: 1 / -1; padding: 2.2rem 2.4rem; background: var(--bg-tint); border-color: transparent; }
.featured .card-lead h3 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); max-width: 24ch; }
.featured .card-lead .card-desc { font-size: 1.08rem; max-width: 48rem; }

/* ---------- topics ---------- */
.topic-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.topic-grid a { display: flex; flex-direction: column; gap: 0.35rem; padding: 1.4rem 1.5rem; background: var(--bg-card); color: var(--ink); text-decoration: none; height: 100%; }
.topic-grid a:hover { background: var(--bg-tint); }
.topic-name { font-family: var(--serif); font-size: 1.45rem; font-weight: 500; }
.topic-desc { color: var(--ink-soft); font-size: 0.92rem; line-height: 1.5; flex: 1; }
.topic-count { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }

/* ---------- manifesto ---------- */
.manifesto { padding-bottom: 2rem; }
.manifesto-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.manifesto h3 { font-size: 1.4rem; margin-bottom: 0.4rem; }
.manifesto p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }

/* ---------- lists (guides, category) ---------- */
.page-head { padding: 3.5rem 1.5rem 1rem; }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
.post-list { list-style: none; margin: 1.5rem 0 3rem; padding: 0; max-width: 48rem; }
.post-list li { padding: 1.6rem 0; border-bottom: 1px solid var(--line); }
.post-list h2 { font-size: 1.75rem; margin-bottom: 0.3rem; }
.post-list h2 a { color: var(--ink); text-decoration: none; }
.post-list h2 a:hover { color: var(--accent-ink); text-decoration: underline; }
.post-list p { margin: 0 0 0.4rem; color: var(--ink-soft); }

/* ---------- article ---------- */
.post { max-width: var(--measure); padding-top: 2.5rem; }
.crumbs { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 1.5rem; }
.crumbs a { color: var(--ink-soft); text-decoration: none; }
.crumbs a:hover { color: var(--accent-ink); text-decoration: underline; }
.crumbs span { margin: 0 0.4rem; }
.post-head h1 { font-size: clamp(2.2rem, 5vw, 3.1rem); letter-spacing: -0.01em; }
.post-head .meta { margin-top: 1rem; }
.post-head .meta a { color: var(--ink-soft); }

.toc { margin: 2.2rem 0 0; padding: 1.1rem 1.4rem; background: var(--bg-tint); border-radius: 6px; font-size: 0.93rem; }
.toc-title { margin: 0 0 0.4rem; font-weight: 600; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.toc ol { margin: 0; padding-left: 1.2rem; columns: 2; column-gap: 2rem; }
.toc li { break-inside: avoid; margin: 0.15rem 0; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--accent-ink); text-decoration: underline; }

.post-body { margin-top: 2.2rem; }
.post-body h2 { font-size: 1.95rem; margin: 2.6rem 0 0.7rem; }
.post-body h3 { font-size: 1.4rem; margin: 1.9rem 0 0.4rem; }
.post-body p { margin: 0 0 1.1rem; }
.post-body ul, .post-body ol { padding-left: 1.4rem; margin: 0 0 1.2rem; }
.post-body li { margin-bottom: 0.4rem; }
.post-body li p { margin-bottom: 0.4rem; }
.post-body strong { font-weight: 600; }
.post-body blockquote { margin: 1.6rem 0; padding: 0.2rem 1.4rem; border-left: 3px solid var(--accent); color: var(--ink-soft); font-family: var(--serif); font-size: 1.3rem; line-height: 1.45; }
.post-body table { border-collapse: collapse; width: 100%; margin: 1.4rem 0 1.8rem; font-size: 0.95rem; display: block; overflow-x: auto; }
.post-body th, .post-body td { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.post-body th { background: var(--bg-tint); font-weight: 600; white-space: nowrap; }
.post-body img { max-width: 100%; height: auto; border-radius: 6px; }
.post-body figure { margin: 1.6rem 0; }
.post-body figcaption { font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.4rem; }
.post-body .note { background: var(--bg-tint); border-radius: 6px; padding: 1rem 1.3rem; margin: 1.6rem 0; font-size: 0.98rem; }
.post-body .note p:last-child { margin-bottom: 0; }
.post-body hr { border: 0; border-top: 1px solid var(--line); margin: 2.4rem 0; }

.faq { margin-top: 3rem; }
.faq h2 { font-size: 1.95rem; margin-bottom: 0.8rem; }
.faq details { border-bottom: 1px solid var(--line); padding: 0.8rem 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; position: relative; padding-right: 1.6rem; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 0; color: var(--accent); font-size: 1.2rem; line-height: 1.4; }
.faq details[open] summary::after { content: "−"; }
.faq summary::-webkit-details-marker { display: none; }
.faq p { margin: 0.5rem 0 0; color: var(--ink-soft); }

.author-box { margin-top: 3rem; padding: 1.4rem 1.6rem; background: var(--bg-card); border: 1px solid var(--line); border-radius: 6px; font-size: 0.95rem; }
.author-name { margin: 0 0 0.3rem; font-family: var(--serif); font-size: 1.3rem; font-weight: 500; }
.author-box p { margin: 0; color: var(--ink-soft); }

.related { padding-bottom: 2rem; }

/* ---------- prose pages ---------- */
.prose { max-width: var(--measure); padding-top: 3rem; padding-bottom: 2rem; }
.prose h1 { font-size: clamp(2.2rem, 5vw, 3rem); margin-bottom: 1.2rem; }
.prose h2 { font-size: 1.8rem; margin: 2.2rem 0 0.6rem; }
.prose p, .prose li { color: var(--ink); }
.prose ul { padding-left: 1.3rem; }

/* ---------- footer ---------- */
.site-footer { margin-top: 5rem; border-top: 1px solid var(--line); background: var(--bg-tint); padding: 3rem 0 2rem; font-size: 0.93rem; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 2fr 1fr 1fr; }
.footer-brand { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; margin: 0 0 0.3rem; }
.footer-head { font-weight: 600; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 0.5rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0.25rem 0; }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.footer-bottom p { margin: 0; }

@media (max-width: 720px) {
  body { font-size: 1rem; }
  .hero { padding-top: 3rem; }
  .featured .card-lead { padding: 1.6rem; }
  .toc ol { columns: 1; }
  .footer-grid { grid-template-columns: 1fr; }
  .header-inner { padding-block: 0.9rem; }
  .nav { gap: 1rem; font-size: 0.88rem; }
}

.post-body img.narrow { max-width: 400px; display: block; }

.author-title { margin: 0 0 0.4rem; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.figure-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.figure-pair img { width: 100%; height: auto; }
@media (max-width: 520px) { .figure-pair { grid-template-columns: 1fr; } }

.prose figure, .author-photo { margin: 2rem 0 1rem; }
.prose figure img, .author-photo img { max-width: 100%; border-radius: 8px; }
.prose figcaption, .author-photo figcaption { font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.4rem; }
