:root {
  --font-display: 'Fraunces', serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --paper: #f8f7f2;
  --surface: #fffefa;
  --surface-muted: #efeee7;
  --ink: #24332d;
  --ink-soft: #627068;
  --line: #dfe3db;
  --sage: #738b79;
  --sage-deep: #486452;
  --terracotta: #b87861;
  --sand: #ded1bb;
  --link: #3d6851;
  --shell: min(88vw, 1240px);
  --radius: 0.55rem;
  --shadow-soft: 0 0.75rem 2.5rem rgba(47, 58, 49, 0.07);
  color-scheme: light;
}

html[data-theme="dark"], html.dark {
  --paper: #17201c;
  --surface: #202b25;
  --surface-muted: #29372f;
  --ink: #eef0e9;
  --ink-soft: #b3c0b6;
  --line: #3b4b40;
  --sage: #9ab09b;
  --sage-deep: #c5d5c3;
  --terracotta: #df9b82;
  --sand: #596252;
  --link: #b9d8bd;
  --shadow-soft: 0 0.75rem 2.5rem rgba(0, 0, 0, 0.22);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; }
button { color: inherit; }
.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; }

.site-header {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 94%, transparent);
}
.header-inner {
  width: var(--shell);
  min-height: 6.9rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.8rem;
  position: relative;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex: 0 0 auto;
}
.brand-mark {
  width: 2.7rem;
  height: 2.7rem;
  display: grid;
  place-items: center;
  color: var(--surface);
  background: var(--sage-deep);
  border-radius: 50% 50% 50% 0.35rem;
  transform: rotate(-8deg);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
}
.brand-name {
  max-width: 10rem;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1.7vw, 1.55rem);
  line-height: 1.03;
  letter-spacing: -0.03em;
}
.primary-nav { margin-left: auto; }
.nav-list {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: clamp(0.85rem, 1.7vw, 1.7rem);
  list-style: none;
}
.nav-list a {
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.nav-list a:hover, .nav-list a:focus-visible { color: var(--ink); }
.header-tools {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: 0.55rem;
}
.icon-button, .menu-toggle, [data-theme-toggle] {
  width: 2.55rem;
  height: 2.55rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}
.icon-button:hover, .menu-toggle:hover, [data-theme-toggle]:hover {
  background: var(--surface-muted);
  border-color: var(--sage);
  transform: translateY(-1px);
}
.search-icon { width: 1rem; height: 1rem; border: 1.5px solid currentColor; border-radius: 50%; position: relative; }
.search-icon::after { content: ''; position: absolute; width: 0.45rem; height: 1.5px; background: currentColor; right: -0.32rem; bottom: -0.16rem; transform: rotate(48deg); }
.moon-mark { font-size: 1.05rem; line-height: 1; color: var(--sage-deep); }
.menu-toggle { display: none; }

.shell { width: var(--shell); margin: 0 auto; }
.rail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 11rem;
  gap: clamp(1.5rem, 3vw, 3.25rem);
  align-items: start;
}
.rail-layout:has([data-side-links][hidden]) { grid-template-columns: minmax(0, 1fr); }
[data-side-links][hidden] { display: none; }
.side-links {
  position: sticky;
  top: 1.5rem;
  padding: 1rem 0 0 1rem;
  border-left: 1px solid var(--line);
}
.side-links h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
}
.side-links ol { margin: 0; padding-left: 1.1rem; color: var(--ink-soft); font-size: 0.82rem; }
.side-links li { padding: 0.25rem 0; }
.side-links a { text-decoration: none; }
.side-links a:hover { color: var(--link); }

main { min-width: 0; }
.home-main { padding: clamp(2.25rem, 5vw, 4.7rem) 0 5rem; }
.page-main { padding: clamp(2.5rem, 5vw, 5rem) 0 5.5rem; }
.home-intro {
  max-width: 41rem;
  margin-bottom: clamp(2.25rem, 5vw, 4.25rem);
}
.eyebrow, .section-kicker, .category-label {
  color: var(--terracotta);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  line-height: 1.3;
  text-transform: uppercase;
}
.home-intro h1, .page-intro h1 {
  max-width: 12ch;
  margin: 0.7rem 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 5.2vw, 4.7rem);
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 0.98;
}
.home-intro p, .page-intro p { max-width: 38rem; margin: 0; color: var(--ink-soft); font-size: 1.08rem; }
.intro-note { display: flex; align-items: center; gap: 1rem; margin-top: 1.35rem; }
.intro-note img { width: 5.25rem; height: 5.25rem; flex: 0 0 auto; object-fit: cover; border-radius: 50% 50% 50% 0.5rem; }
.intro-note p { font-size: 0.9rem; line-height: 1.5; }
.intro-links { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 1rem !important; color: var(--link) !important; font-size: 0.78rem !important; }
.intro-links a { text-decoration: underline; text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.8rem;
}
.section-heading h2, .band-heading h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.1;
}
.section-heading p { margin: 0; color: var(--ink-soft); font-size: 0.86rem; }

.feature-band {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(16rem, 5fr);
  gap: clamp(1.2rem, 2.2vw, 2rem);
  align-items: stretch;
  margin-bottom: clamp(3.6rem, 7vw, 6rem);
}
.feature-column, .support-column { min-width: 0; }
.feature-column [data-feed] { display: grid; gap: 2rem; }
.feature-column .story-card:first-child { border-bottom: 1px solid var(--line); padding-bottom: 1.7rem; }
.feature-column .story-card:first-child .story-image { aspect-ratio: 1.7 / 1; }
.feature-column .story-card:not(:first-child) { display: grid; grid-template-columns: 10.5rem minmax(0, 1fr); gap: 1rem; align-items: start; }
.feature-column .story-card:not(:first-child) .story-image { aspect-ratio: 1.25 / 1; }
.support-column { border-left: 1px solid var(--line); padding-left: clamp(1.2rem, 2.2vw, 2rem); }
.support-column [data-feed] { display: flex; flex-direction: column; height: 100%; overflow: hidden; }
.support-column .story-card { display: grid; grid-template-columns: 5.6rem minmax(0, 1fr); gap: 0.9rem; align-items: start; padding: 0.75rem 0 1rem; border-bottom: 1px solid var(--line); }
.support-column .story-card:first-child { padding-top: 0; }
.support-column .story-image { grid-column: 1; aspect-ratio: 1 / 1; }
.support-column .story-body { grid-column: 2; }
.support-column .story-card h3 { font-size: 1.02rem; }
.support-column .story-card p { display: none; }

.story-card { min-width: 0; }
.story-image { display: block; position: relative; aspect-ratio: 1.45 / 1; overflow: hidden; border-radius: var(--radius); background: var(--surface-muted); }
.story-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.story-body { min-width: 0; }
.story-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.75rem; margin: 0.8rem 0 0.35rem; color: var(--ink-soft); font-size: 0.72rem; }
.story-meta time { font-family: var(--font-mono); font-size: 0.64rem; }
.story-card h3 { margin: 0; font-family: var(--font-display); font-size: clamp(1.25rem, 2vw, 1.65rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1.12; }
.story-card h3 a { text-decoration: none; }
.story-card h3 a:hover { color: var(--link); }
.story-card p { margin: 0.55rem 0 0; color: var(--ink-soft); font-size: 0.9rem; line-height: 1.48; }
.empty-state { margin: 0; color: var(--ink-soft); font-size: 0.92rem; }

.latest-section { margin-bottom: clamp(3.8rem, 7vw, 6rem); }
.news-grid, .archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16.5rem), 1fr));
  gap: clamp(1.6rem, 3.2vw, 2.8rem) clamp(1.15rem, 2.3vw, 2rem);
}
.news-grid .story-card .story-image { aspect-ratio: 1.45 / 1; }
.news-grid .story-card h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); }
.textured-band {
  margin: 0 calc((var(--shell) - 100vw) / 2) clamp(3.8rem, 7vw, 6rem);
  padding: clamp(2.2rem, 5vw, 3.5rem) max(6vw, calc((100vw - var(--shell)) / 2));
  background: var(--surface-muted);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.band-heading { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.band-heading p { max-width: 20rem; margin: 0; color: var(--ink-soft); font-size: 0.84rem; }
.secondary-band { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; align-items: stretch; }
.secondary-band > section { min-width: 0; }
.secondary-band [data-feed] { height: 100%; overflow: hidden; }
.secondary-band .story-card { padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.secondary-band .story-card + .story-card { padding-top: 1rem; }
.secondary-band .story-card h3 { font-size: 1.13rem; }
.secondary-band .story-card p { display: none; }
.secondary-band .middle-feed .story-card:first-child .story-image { aspect-ratio: 1.45 / 1; }
.secondary-band .middle-feed .story-card:not(:first-child) { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 0.75rem; }
.secondary-band .middle-feed .story-card:not(:first-child) .story-image { grid-column: 1; aspect-ratio: 1 / 1; }
.secondary-band .middle-feed .story-card:not(:first-child) .story-body { grid-column: 2; }

.mosaic-section { margin-bottom: 2rem; }
.mosaic-grid { display: grid; grid-template-columns: 1.15fr 0.85fr 1.15fr 0.85fr; gap: 1.25rem; align-items: stretch; }
.mosaic-grid [data-feed] { display: contents; }
.mosaic-grid .story-card { border-top: 2px solid var(--sage); padding-top: 0.85rem; }
.mosaic-grid .story-card:nth-child(4n + 1) .story-image, .mosaic-grid .story-card:nth-child(4n + 3) .story-image { aspect-ratio: 1.1 / 1; }
.mosaic-grid .story-card:nth-child(4n + 2) .story-image, .mosaic-grid .story-card:nth-child(4n) .story-image { display: none; }
.mosaic-grid .story-card h3 { font-size: 1.2rem; }

.more-link, .button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.55rem 1.15rem;
  border: 1px solid var(--sage-deep);
  border-radius: 999px;
  color: var(--sage-deep);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}
.more-link:hover, .button-link:hover { background: var(--sage-deep); color: var(--surface); }
.latest-section .more-link { margin-top: 2rem; }

.page-intro { margin-bottom: 2.7rem; }
.page-intro h1 { max-width: 16ch; }
.archive-tools { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-bottom: 2rem; }
.archive-search { flex: 1 1 18rem; position: relative; }
.archive-search input {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
}
.archive-search input:focus { outline: 2px solid var(--sage); outline-offset: 2px; }
.filter-list { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.filter-list a { padding: 0.45rem 0.75rem; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft); font-size: 0.76rem; text-decoration: none; }
.filter-list a:hover { border-color: var(--sage); color: var(--ink); }
.archive-grid { align-items: stretch; }
.archive-grid .story-card { display: flex; flex-direction: column; height: 100%; }
.archive-grid .story-image { aspect-ratio: 1.4 / 1; }
.archive-grid .story-body { display: flex; flex: 1; flex-direction: column; }
.archive-grid .story-card h3 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.archive-grid .story-card p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }

.guide-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(17rem, 0.85fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.guide-copy h2, .guide-aside h2 { margin: 0 0 0.65rem; font-family: var(--font-display); font-size: clamp(1.65rem, 3vw, 2.25rem); line-height: 1.1; letter-spacing: -0.04em; }
.guide-copy > p { max-width: 42rem; color: var(--ink-soft); }
.principle-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; margin: 2rem 0 0; }
.principle { padding-top: 1rem; border-top: 2px solid var(--sage); }
.principle strong { display: block; margin-bottom: 0.35rem; font-family: var(--font-display); font-size: 1.2rem; }
.principle p { margin: 0; color: var(--ink-soft); font-size: 0.88rem; }
.guide-aside { padding: 1.5rem; background: var(--surface-muted); border-radius: var(--radius); }
.guide-aside img { display: block; width: 100%; aspect-ratio: 1.15 / 1; object-fit: cover; border-radius: var(--radius); margin-bottom: 1.25rem; }
.guide-aside p { margin: 0; color: var(--ink-soft); font-size: 0.9rem; }
.ritual-section { margin-top: clamp(3.5rem, 7vw, 6rem); padding-top: 1.5rem; border-top: 1px solid var(--line); }
.ritual-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.ritual-card { padding: 1.3rem 0; border-bottom: 1px solid var(--line); }
.ritual-card span { color: var(--terracotta); font-family: var(--font-mono); font-size: 0.72rem; }
.ritual-card h3 { margin: 0.55rem 0 0.35rem; font-family: var(--font-display); font-size: 1.35rem; }
.ritual-card p { margin: 0; color: var(--ink-soft); font-size: 0.9rem; }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 11rem; gap: clamp(1.8rem, 5vw, 5rem); align-items: start; }
.article-layout:has([data-side-links][hidden]) { grid-template-columns: minmax(0, 1fr); }
#article-content { min-width: 0; }
.article-header { max-width: 52rem; margin-bottom: 2rem; }
.article-header h1 { margin: 0.55rem 0 1rem; font-family: var(--font-display); font-size: clamp(2.45rem, 5vw, 4.8rem); letter-spacing: -0.065em; line-height: 1; }
.article-deck { max-width: 42rem; margin: 0; color: var(--ink-soft); font-size: 1.12rem; }
.article-cover { display: block; width: 100%; max-height: 38rem; object-fit: cover; border-radius: var(--radius); margin: 2rem 0 2.5rem; }
.prose { max-width: 47rem; font-family: var(--font-body); font-size: 1.08rem; line-height: 1.85; }
.prose p { margin: 0 0 1.25rem; }
.prose h2, .prose h3 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -0.035em; }
.prose h2 { margin: 2.7rem 0 0.75rem; font-size: 2rem; }
.prose h3 { margin: 2rem 0 0.6rem; font-size: 1.45rem; }
.prose a { color: var(--link); text-decoration: underline; text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin: 0.4rem 0; }
.prose blockquote { margin: 2rem 0; padding: 0.4rem 1.3rem; border-left: 3px solid var(--terracotta); color: var(--sage-deep); font-family: var(--font-display); font-size: 1.45rem; line-height: 1.35; }
.prose table { width: 100%; border-collapse: collapse; margin: 2rem 0; font-size: 0.9rem; }
.prose th, .prose td { padding: 0.65rem; border-bottom: 1px solid var(--line); text-align: left; }
.byline { display: flex; gap: 0.8rem; align-items: center; max-width: 47rem; margin: 0 0 2rem; padding: 0.9rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.byline img { width: 2.8rem; height: 2.8rem; border-radius: 50%; object-fit: cover; background: var(--surface-muted); }
.byline strong { display: block; font-size: 0.88rem; }
.byline p { margin: 0.1rem 0 0; color: var(--ink-soft); font-size: 0.8rem; }
.related-section { max-width: 47rem; margin-top: 4rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.related-section h2 { margin: 0 0 1.3rem; font-family: var(--font-display); font-size: 1.8rem; }
.related-section .news-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.related-section .story-card h3 { font-size: 1.05rem; }
.related-section .story-card p { display: none; }

.category-results { margin-top: 2rem; }
.not-found { max-width: 40rem; padding: 5rem 0 7rem; }
.not-found h1 { margin: 0.7rem 0 1rem; font-family: var(--font-display); font-size: clamp(3rem, 7vw, 6rem); letter-spacing: -0.07em; line-height: 0.94; }
.not-found p { max-width: 32rem; color: var(--ink-soft); font-size: 1.1rem; }

.site-footer { border-top: 1px solid var(--line); padding: 3.5rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1.5fr 1fr; gap: 2rem; }
.footer-brand { margin: 0 0 0.7rem; font-family: var(--font-display); font-size: 1.5rem; }
.footer-copy, .footer-disclaimer { margin: 0; color: var(--ink-soft); font-size: 0.82rem; }
.footer-links { display: grid; grid-template-columns: repeat(2, max-content); gap: 0.3rem 1.5rem; align-content: start; }
.footer-links a { color: var(--ink-soft); font-size: 0.82rem; text-decoration: none; }
.footer-links a:hover { color: var(--link); }
.footer-secondary { display: flex; flex-direction: column; gap: 0.3rem; }
.footer-secondary a { color: var(--ink-soft); font-size: 0.78rem; text-decoration: none; }
.footer-disclaimer { grid-column: 1 / -1; max-width: 60rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }

@media (max-width: 1100px) {
  .header-inner { gap: 1rem; }
  .nav-list { gap: 0.8rem; }
  .nav-list a { font-size: 0.75rem; }
}
@media (max-width: 900px) {
  :root { --shell: min(90vw, 760px); }
  .header-inner { min-height: 5.8rem; }
  .primary-nav { position: absolute; top: calc(100% + 1px); left: 0; right: 0; z-index: 10; display: none; padding: 1rem 5vw 1.3rem; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-soft); }
  .primary-nav.is-open { display: block; }
  .nav-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; }
  .nav-list a { display: block; padding: 0.7rem 0; font-size: 0.88rem; }
  .header-tools { margin-left: auto; }
  .menu-toggle { display: inline-grid; }
  .menu-glyph { width: 1rem; height: 0.7rem; position: relative; border-top: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; }
  .menu-glyph::after { content: ''; position: absolute; left: 0; right: 0; top: 0.25rem; border-top: 1.5px solid currentColor; }
  .feature-band { grid-template-columns: minmax(0, 1.25fr) minmax(15rem, 0.75fr); }
  .mosaic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide-layout { grid-template-columns: minmax(0, 1fr) minmax(15rem, 0.7fr); }
  .article-layout { grid-template-columns: minmax(0, 1fr) 9rem; gap: 2rem; }
}
@media (max-width: 680px) {
  :root { --shell: min(91vw, 560px); }
  .brand-name { max-width: 8rem; font-size: 1.15rem; }
  .brand-mark { width: 2.35rem; height: 2.35rem; }
  .feature-band, .secondary-band, .guide-layout, .footer-grid { grid-template-columns: 1fr; }
  .support-column { border-left: 0; border-top: 1px solid var(--line); padding: 1.5rem 0 0; }
  .support-column [data-feed] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
  .support-column .story-card { display: block; padding: 0.8rem 0 1rem; }
  .support-column .story-card:first-child { padding-top: 0.8rem; }
  .support-column .story-image { margin-bottom: 0.7rem; }
  .secondary-band { gap: 2rem; }
  .secondary-band > section + section { border-top: 1px solid var(--line); padding-top: 1.5rem; }
  .guide-aside { order: -1; }
  .principle-list, .ritual-grid { grid-template-columns: 1fr; }
  .article-layout { display: block; }
  .article-layout .side-links { position: static; margin-top: 3rem; }
  .related-section .news-grid { grid-template-columns: 1fr; }
  .footer-links { grid-template-columns: repeat(2, max-content); }
  .footer-disclaimer { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
