:root {
  color-scheme: light dark;
  --page: #f6f1e8;
  --paper: #fffdf8;
  --ink: #20231f;
  --muted: #62665f;
  --olive: #3f5a45;
  --olive-strong: #263d2d;
  --sage: #dce4d7;
  --terracotta: #9c4f32;
  --line: rgba(32, 35, 31, 0.18);
  --soft-line: rgba(32, 35, 31, 0.1);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Iowan Old Style", Baskerville, Georgia, serif;
  --page-pad: clamp(1.25rem, 4vw, 4.5rem);
  --content: 88rem;
  --reading: 47rem;
  --radius: 0.65rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #171a17;
    --paper: #20241f;
    --ink: #f2f1eb;
    --muted: #b7b9b2;
    --olive: #9db89f;
    --olive-strong: #c6ddc7;
    --sage: #334137;
    --terracotta: #e89978;
    --line: rgba(242, 241, 235, 0.2);
    --soft-line: rgba(242, 241, 235, 0.11);
  }
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--page);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { color: var(--paper); background: var(--olive); }

a { color: inherit; }

h1, h2, h3, p { text-wrap: pretty; }

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--paper);
  background: var(--ink);
  transform: translateY(-180%);
  transition: transform 180ms ease;
}

.skip-link:focus { transform: translateY(0); }

:focus-visible {
  outline: 3px solid var(--terracotta);
  outline-offset: 4px;
}

.guide-header {
  display: flex;
  min-height: 4.75rem;
  max-width: var(--content);
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem var(--page-pad);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  font-size: 1.22rem;
  font-weight: 650;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.brand-mark { width: 2rem; height: 2rem; overflow: visible; }
.brand-mark path { fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 2.2; }
.brand-mark circle:first-of-type { fill: var(--terracotta); }
.brand-mark circle:last-of-type { fill: var(--olive); }

.guide-header nav,
.guide-footer nav {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2vw, 2rem);
}

.guide-header nav { font-size: 0.9rem; font-weight: 600; }
.guide-header nav a, .guide-footer nav a { text-decoration: none; }

.header-cta {
  padding: 0.7rem 0.95rem;
  border-radius: var(--radius);
  color: var(--paper);
  background: var(--olive-strong);
}

.journal-hero {
  display: grid;
  min-height: min(72svh, 48rem);
  max-width: var(--content);
  margin: 0 auto;
  padding: clamp(5rem, 11vw, 9rem) var(--page-pad) clamp(4rem, 8vw, 7rem);
  grid-template-columns: minmax(0, 8fr) minmax(17rem, 4fr);
  align-items: end;
  gap: clamp(2rem, 7vw, 7rem);
  border-bottom: 1px solid var(--line);
}

.journal-kicker,
.article-category,
.guide-category,
.answer-label,
.story-label {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.journal-kicker { grid-column: 1 / -1; margin: 0; color: var(--terracotta); }

.journal-hero h1 {
  max-width: 13ch;
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(3.4rem, 7vw, 7.2rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.93;
}

.journal-hero > p:last-child {
  max-width: 31rem;
  margin: 0 0 0.45rem;
  color: var(--muted);
  font-size: clamp(1.03rem, 1.5vw, 1.25rem);
  line-height: 1.6;
}

.guide-index {
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 var(--page-pad);
}

.guide-row {
  display: grid;
  min-height: 12rem;
  padding: clamp(1.6rem, 4vw, 3.2rem) 0;
  grid-template-columns: 3.5rem minmax(0, 1fr) 7rem 4.5rem;
  gap: clamp(1rem, 3vw, 3rem);
  align-items: start;
  border-bottom: 1px solid var(--line);
}

.guide-number, .guide-read { color: var(--muted); font-size: 0.78rem; }
.guide-category { margin: 0 0 0.55rem; color: var(--terracotta); }

.guide-row h2 {
  max-width: 28ch;
  margin: 0;
  font-size: clamp(1.55rem, 2.6vw, 2.45rem);
  font-weight: 540;
  letter-spacing: -0.038em;
  line-height: 1.08;
}

.guide-row h2 a { text-decoration: none; }
.guide-row h2 a:hover { color: var(--olive); }

.guide-row-copy > p:last-child {
  max-width: 48rem;
  margin: 0.85rem 0 0;
  color: var(--muted);
}

.guide-arrow {
  justify-self: end;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid currentColor;
  font-size: 0.85rem;
  font-weight: 650;
  text-decoration: none;
}

.editorial-note {
  display: grid;
  max-width: var(--content);
  margin: clamp(5rem, 10vw, 10rem) auto;
  padding: clamp(2rem, 4vw, 4rem) var(--page-pad);
  grid-template-columns: minmax(12rem, 4fr) minmax(0, 8fr);
  gap: clamp(2rem, 7vw, 7rem);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--sage);
}

.editorial-note h2 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.6rem); letter-spacing: -0.035em; }
.editorial-note p { max-width: 45rem; margin: 0; line-height: 1.7; }

.breadcrumbs {
  display: flex;
  max-width: var(--content);
  margin: 0 auto;
  padding: 1.35rem var(--page-pad) 0;
  gap: 0.65rem;
  color: var(--muted);
  font-size: 0.77rem;
  flex-wrap: wrap;
}

.breadcrumbs a { text-underline-offset: 0.18em; }

.article-hero {
  display: grid;
  max-width: var(--content);
  margin: 0 auto;
  padding: clamp(2.8rem, 6vw, 5rem) var(--page-pad) clamp(2.8rem, 5vw, 4.5rem);
  grid-template-columns: minmax(0, 7fr) minmax(19rem, 5fr);
  gap: clamp(2.5rem, 7vw, 7rem);
  align-items: end;
  border-bottom: 1px solid var(--line);
}

.article-category { margin: 0 0 1.35rem; color: var(--terracotta); }

.article-hero h1 {
  max-width: 17ch;
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(3.1rem, 5.7vw, 5.5rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.94;
}

.article-dek {
  max-width: 43rem;
  margin: 1.8rem 0 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 1.7vw, 1.32rem);
  line-height: 1.55;
}

.answer-card {
  padding: clamp(1.7rem, 3vw, 2.7rem);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--sage);
}

.answer-label { margin: 0 0 1.25rem; color: var(--olive-strong); }
.answer-card > p:last-child { margin: 0; font-size: clamp(1.08rem, 1.6vw, 1.32rem); font-weight: 540; letter-spacing: -0.02em; line-height: 1.45; }

.article-meta {
  display: flex;
  padding-top: 1rem;
  grid-column: 1 / -1;
  gap: 0.6rem 1.7rem;
  color: var(--muted);
  font-size: 0.78rem;
  flex-wrap: wrap;
}

.article-layout {
  display: grid;
  max-width: var(--content);
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 7rem) var(--page-pad);
  grid-template-columns: minmax(12rem, 3fr) minmax(0, 9fr);
  gap: clamp(2rem, 8vw, 8rem);
  align-items: start;
}

.article-aside {
  position: sticky;
  top: 2rem;
  max-width: 17rem;
  padding-top: 0.35rem;
}

.article-aside > p:first-child { margin: 0; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; }
.article-aside ol { margin: 1.2rem 0 2rem; padding: 0; list-style: none; }
.article-aside li + li { margin-top: 0.8rem; }
.article-aside a { color: var(--muted); font-size: 0.84rem; text-decoration: none; }
.article-aside a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 0.2em; }

.article-safety {
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.article-body { max-width: var(--reading); }

.story-block {
  margin-bottom: clamp(4rem, 8vw, 7rem);
  padding: clamp(1.7rem, 4vw, 3rem);
  border-left: 4px solid var(--terracotta);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--paper);
}

.story-block > div { display: flex; margin-bottom: 1.8rem; align-items: baseline; justify-content: space-between; gap: 1rem; }
.story-label { margin: 0; color: var(--terracotta); white-space: nowrap; }
.story-disclosure { max-width: 27rem; margin: 0; color: var(--muted); font-size: 0.76rem; text-align: right; }
.story-block h2 { margin: 0 0 1.2rem; font-family: var(--font-serif); font-size: clamp(2.1rem, 4vw, 3.4rem); font-weight: 400; letter-spacing: -0.035em; line-height: 1.03; }
.story-block > p { margin: 0; color: var(--muted); font-size: 1.06rem; line-height: 1.75; }
.story-block > p + p { margin-top: 1rem; }

.article-section, .faq, .sources, .method-note { scroll-margin-top: 2rem; }
.article-section + .article-section, .faq, .sources, .method-note { margin-top: clamp(4rem, 8vw, 7rem); }

.article-body h2 {
  margin: 0 0 1.35rem;
  font-size: clamp(2rem, 3.5vw, 3.1rem);
  font-weight: 540;
  letter-spacing: -0.042em;
  line-height: 1.08;
}

.article-section p, .faq p, .sources > p, .method-note p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.04rem, 1.35vw, 1.15rem);
  line-height: 1.78;
}

.article-section p + p { margin-top: 1.2rem; }

.article-section ul {
  display: grid;
  margin: 1.5rem 0 0;
  padding: 0;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  list-style: none;
}

.article-section li {
  position: relative;
  padding: 1rem 1rem 1rem 2.35rem;
  border-radius: var(--radius);
  background: var(--paper);
}

.article-section li::before {
  position: absolute;
  top: 1.45rem;
  left: 1rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--terracotta);
  content: "";
}

.faq-item { padding: 1.2rem 0; border-bottom: 1px solid var(--line); }
.faq-item:first-of-type { border-top: 1px solid var(--line); }
.faq-item summary { cursor: pointer; font-size: 1.08rem; font-weight: 650; }
.faq-item p { margin-top: 1rem; }

.sources ol { margin: 1.5rem 0 0; padding: 0; list-style: none; }
.sources li { display: grid; padding: 1rem 0; grid-template-columns: minmax(0, 1fr) minmax(9rem, 13rem); gap: 1.5rem; border-bottom: 1px solid var(--line); }
.sources a { font-weight: 600; text-underline-offset: 0.2em; }
.sources li span { color: var(--muted); font-size: 0.8rem; text-align: right; }

.method-note { padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); }
.method-note h2 { font-size: 1.25rem; }
.method-note p { font-size: 0.9rem; }

.guide-cta {
  display: grid;
  max-width: var(--content);
  margin: 0 auto clamp(4rem, 8vw, 8rem);
  padding: clamp(2rem, 5vw, 5rem) var(--page-pad);
  grid-template-columns: minmax(0, 8fr) auto;
  gap: 2rem;
  align-items: end;
  border-radius: var(--radius);
  color: #f5f4ee;
  background: #263d2d;
}

.guide-cta > div > p:first-child { margin: 0 0 1rem; color: #c6ddc7; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.guide-cta h2 { max-width: 18ch; margin: 0; font-family: var(--font-serif); font-size: clamp(2.3rem, 4.5vw, 4.4rem); font-weight: 400; letter-spacing: -0.045em; line-height: 0.98; }
.guide-cta > div > p:last-child { max-width: 45rem; margin: 1rem 0 0; color: #d8dfd7; }
.guide-cta > a { display: inline-flex; min-height: 3.2rem; align-items: center; justify-content: center; padding: 0.85rem 1.15rem; border-radius: var(--radius); color: #263d2d; background: #f5f4ee; font-weight: 700; text-decoration: none; white-space: nowrap; }
.guide-cta > a:active { transform: translateY(1px); }

.related-guides {
  max-width: var(--content);
  margin: 0 auto clamp(5rem, 10vw, 9rem);
  padding: 0 var(--page-pad);
}

.related-guides h2 { margin: 0 0 1rem; font-size: 1.2rem; }
.related-guides ul { margin: 0; padding: 0; list-style: none; }
.related-guides li { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.related-guides li:first-child { border-top: 1px solid var(--line); }
.related-guides a { font-size: clamp(1.15rem, 2vw, 1.6rem); font-weight: 570; letter-spacing: -0.02em; text-decoration: none; }
.related-guides a:hover { color: var(--olive); }

.guide-footer {
  display: grid;
  max-width: var(--content);
  margin: 0 auto;
  padding: 2rem var(--page-pad) 3rem;
  grid-template-columns: auto minmax(13rem, 1fr) auto auto;
  gap: clamp(1.25rem, 4vw, 4rem);
  align-items: start;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
}

.guide-footer > p { max-width: 28rem; margin: 0; }
.guide-footer .brand { color: var(--ink); }

@media (max-width: 900px) {
  .journal-hero, .article-hero, .editorial-note, .article-layout { grid-template-columns: 1fr; }
  .journal-hero { min-height: auto; padding-top: 6rem; }
  .journal-kicker { grid-column: auto; }
  .article-aside { position: static; max-width: none; }
  .article-aside ol { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem 1.2rem; }
  .article-aside li + li { margin-top: 0; }
  .article-safety { max-width: 37rem; }
  .guide-footer { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .guide-header { align-items: flex-start; }
  .guide-header nav { gap: 0.8rem; font-size: 0.78rem; }
  .guide-header nav a:first-child { display: none; }
  .header-cta { padding: 0.55rem 0.7rem; }
  .guide-row { grid-template-columns: 2.5rem minmax(0, 1fr); }
  .guide-read { grid-column: 2; }
  .guide-arrow { grid-column: 2; justify-self: start; }
  .article-section ul { grid-template-columns: 1fr; }
  .story-block > div { display: block; }
  .story-disclosure { margin-top: 0.5rem; text-align: left; }
  .sources li { grid-template-columns: 1fr; gap: 0.4rem; }
  .sources li span { text-align: left; }
  .guide-cta { margin-right: 0.8rem; margin-left: 0.8rem; grid-template-columns: 1fr; align-items: start; }
  .guide-cta > a { justify-self: start; }
  .article-aside ol { grid-template-columns: 1fr; }
  .guide-footer { grid-template-columns: 1fr; }
  .guide-footer nav { align-items: flex-start; flex-direction: column; gap: 0.55rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
