:root {
  --paper: #f4f1ea;
  --ink: #171713;
  --muted: #625f56;
  --line: #c8c2b7;
  --white: #fffef9;
  --accent: #b8492f;
  --dark: #1d2522;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: Iowan Old Style, Baskerville, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-underline-offset: .18em; }
a:hover { color: var(--accent); }
button, input { font: inherit; }
button { color: inherit; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--white);
  padding: .75rem 1rem;
  border: 2px solid var(--ink);
}
.skip-link:focus { top: 1rem; }
.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;
}

.hero {
  min-height: 92vh;
  padding: 0 clamp(1.25rem, 4vw, 5rem) 4rem;
  background: var(--dark);
  color: #f4f0e6;
}
.topbar {
  max-width: 1500px;
  margin: 0 auto;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,.24);
}
.wordmark { font-weight: 750; text-decoration: none; letter-spacing: -.02em; }
.toplinks { display: flex; gap: clamp(1rem, 3vw, 2.5rem); }
.toplinks a { color: inherit; font-size: .84rem; text-decoration: none; }
.toplinks a:hover { color: #e99a76; }
.hero-grid {
  max-width: 1500px;
  margin: 0 auto;
  padding-top: clamp(5rem, 12vh, 9rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 320px);
  gap: clamp(4rem, 12vw, 12rem);
  align-items: end;
}
.eyebrow {
  margin: 0 0 1.5rem;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.hero h1, .section-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  line-height: .91;
  letter-spacing: -.055em;
}
.hero h1 { font-size: clamp(4rem, 10vw, 9.5rem); }
.dek {
  max-width: 780px;
  margin: 2.5rem 0 0;
  color: #c8c8bd;
  font-size: clamp(1.05rem, 1.7vw, 1.35rem);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.25rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: .7rem 1.1rem;
  border: 1px solid #eee9dc;
  text-decoration: none;
  font-size: .86rem;
  font-weight: 700;
}
.button.primary { background: #eee9dc; color: var(--dark); }
.button.secondary { color: #eee9dc; }
.button:hover { background: #e99a76; border-color: #e99a76; color: var(--dark); }
.hero-note { border-top: 1px solid #eee9dc; padding-top: 1.25rem; }
.hero-note .note-number { font-family: var(--serif); font-size: 5rem; line-height: 1; }
.hero-note p { color: #c8c8bd; font-size: .9rem; }
.hero-note strong { color: #f4f0e6; }
.hero-note hr { margin: 1.6rem 0; border: 0; border-top: 1px solid rgba(255,255,255,.24); }

.section { max-width: 1500px; margin: 0 auto; padding: clamp(5rem, 10vw, 10rem) clamp(1.25rem, 4vw, 5rem); }
.section-heading { display: grid; grid-template-columns: minmax(180px, .32fr) minmax(0, 1fr); gap: 2rem; align-items: start; }
.section-heading h2 { font-size: clamp(3rem, 7vw, 7rem); }
.section-heading.compact { grid-template-columns: minmax(180px, .32fr) minmax(0, .68fr); }
.section-heading.compact > p:last-child { grid-column: 2; max-width: 720px; color: var(--muted); }
.prose-grid { margin: 4rem 0 0 32%; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 7rem); }
.prose-grid p { margin-top: 0; color: var(--muted); }
.prose-grid .lead { color: var(--ink); font-family: var(--serif); font-size: clamp(1.35rem, 2.2vw, 1.8rem); line-height: 1.45; }
sup a { color: var(--accent); font: 700 .68rem var(--sans); text-decoration: none; }

.domain-map { margin-top: 6rem; border-top: 1px solid var(--ink); }
.domain-map article {
  display: grid;
  grid-template-columns: 70px minmax(250px, .8fr) 1fr;
  gap: 1.5rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.domain-map span { color: var(--accent); font-size: .72rem; font-weight: 800; }
.domain-map h3, .domain-map p { margin: 0; }
.domain-map h3 { font-size: 1rem; }
.domain-map p { color: var(--muted); font-size: .88rem; }

.guide { max-width: none; background: var(--white); }
.guide > * { max-width: 1340px; margin-left: auto; margin-right: auto; }
.controls { position: sticky; top: 0; z-index: 20; margin-top: 4rem; padding: 1rem 0; background: rgba(255,254,249,.96); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); backdrop-filter: blur(10px); }
.search-field input { width: 100%; padding: .8rem 0; border: 0; border-bottom: 1px solid var(--line); outline: none; background: transparent; color: var(--ink); font-size: clamp(1rem, 2vw, 1.35rem); }
.search-field input:focus { border-color: var(--accent); }
.filter-row { display: flex; flex-wrap: wrap; gap: .55rem; padding-top: .9rem; }
.filter-button { border: 1px solid var(--line); padding: .38rem .7rem; background: transparent; cursor: pointer; font-size: .72rem; }
.filter-button:hover, .filter-button:focus-visible { border-color: var(--ink); }
.filter-button[aria-pressed="true"] { background: var(--ink); color: var(--white); border-color: var(--ink); }
.result-count { color: var(--muted); margin-top: 1.5rem; font-size: .78rem; }
.schema-list { border-top: 1px solid var(--ink); }
.schema-card { border-bottom: 1px solid var(--ink); }
.schema-summary {
  list-style: none;
  display: grid;
  grid-template-columns: 64px minmax(180px, .34fr) minmax(0, .66fr) 30px;
  gap: 1.25rem;
  align-items: center;
  padding: 1.6rem 0;
  cursor: pointer;
}
.schema-summary::-webkit-details-marker { display: none; }
.schema-summary:hover .schema-title, .schema-summary:focus-visible .schema-title { color: var(--accent); }
.schema-index { color: var(--accent); font-size: .72rem; font-weight: 800; }
.schema-title { margin: 0; font-family: var(--serif); font-size: clamp(1.65rem, 3vw, 2.55rem); line-height: 1; }
.schema-story { margin: 0; color: var(--muted); font-size: .93rem; }
.open-mark { font-size: 1.5rem; transition: transform .2s ease; }
details[open] .open-mark { transform: rotate(45deg); }
.schema-content { padding: 1rem 0 4rem 64px; }
.schema-topline { display: grid; grid-template-columns: minmax(180px, .34fr) minmax(0, .66fr); gap: 1.5rem; padding-bottom: 2rem; }
.domain-label { margin: 0; color: var(--accent); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.analysis-copy { font-family: var(--serif); font-size: clamp(1.2rem, 2vw, 1.55rem); line-height: 1.5; }
.analysis-copy p { margin-top: 0; }
.coping-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.coping-grid article { padding: 1.2rem 1.2rem 1.2rem 0; }
.coping-grid article + article { border-left: 1px solid var(--line); padding-left: 1.2rem; }
.coping-grid h4 { margin: 0 0 .4rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.coping-grid p { margin: 0; color: var(--muted); font-size: .86rem; }
.healthy-panel { display: grid; grid-template-columns: minmax(180px, .34fr) minmax(0, .66fr); gap: 1.5rem; padding: 2rem 0; }
.healthy-panel h4 { margin: 0; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; }
.healthy-panel p { margin: 0; color: var(--muted); }
.reflection { padding: 1.5rem; background: var(--dark); color: #f4f0e6; }
.reflection span { display: block; margin-bottom: .5rem; color: #e99a76; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.reflection p { margin: 0; font-family: var(--serif); font-size: clamp(1.25rem, 2.2vw, 1.7rem); }
.media-heading { margin: 3rem 0 1.25rem; font-family: var(--serif); font-size: clamp(1.7rem, 3vw, 2.5rem); font-weight: 400; }
.media-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.media-group { border-top: 3px solid var(--ink); }
.media-group-title { margin: .75rem 0; display: flex; align-items: baseline; justify-content: space-between; text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; }
.media-group-title span { color: var(--muted); letter-spacing: 0; text-transform: none; }
.media-item { display: grid; grid-template-columns: 26px 1fr; gap: .55rem; padding: .9rem 0; border-top: 1px solid var(--line); }
.media-rank { color: var(--accent); font-size: .68rem; font-weight: 800; }
.media-item h5 { margin: 0; font-family: var(--serif); font-size: 1.08rem; line-height: 1.25; }
.media-meta { margin: .2rem 0 .4rem; color: var(--muted); font-size: .72rem; }
.media-lens { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.5; }
.empty-state { padding: 4rem 0; text-align: center; }

.method-grid { margin-top: 5rem; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.method-grid article { padding: 1.5rem 1.5rem 2rem 0; }
.method-grid article + article { border-left: 1px solid var(--line); padding-left: 1.5rem; }
.method-grid span { color: var(--accent); font-size: .72rem; font-weight: 800; }
.method-grid h3 { margin: 2.5rem 0 .5rem; font-family: var(--serif); font-size: 1.6rem; font-weight: 400; }
.method-grid p { color: var(--muted); font-size: .9rem; }
.evidence-note, .safety-note { margin: 5rem 0 0 32%; max-width: 900px; }
.evidence-note h3, .safety-note h3 { font-family: var(--serif); font-size: 2rem; font-weight: 400; }
.evidence-note p, .safety-note p { color: var(--muted); }
.safety-note { padding: 1.5rem; border: 1px solid var(--ink); }
.safety-note h3 { margin-top: 0; }

.sources { border-top: 1px solid var(--ink); }
.reference-list { margin: 4rem 0 0 32%; padding: 0; list-style-position: inside; }
.reference-list li { padding: 1rem 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.reference-list a { color: var(--ink); }
.scope-note { margin: 3rem 0 0 32%; max-width: 900px; padding-top: 1.5rem; border-top: 3px solid var(--ink); color: var(--muted); }

footer {
  min-height: 220px;
  padding: 3rem clamp(1.25rem, 4vw, 5rem);
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 2rem;
  align-items: end;
  background: var(--dark);
  color: #d3d1c8;
  font-size: .82rem;
}
footer p { margin: 0; }

@media (max-width: 900px) {
  .hero { min-height: auto; }
  .hero-grid { grid-template-columns: 1fr; gap: 4rem; }
  .hero-note { max-width: 420px; }
  .section-heading, .section-heading.compact { grid-template-columns: 1fr; }
  .section-heading.compact > p:last-child { grid-column: auto; }
  .prose-grid, .evidence-note, .safety-note, .reference-list, .scope-note { margin-left: 0; }
  .schema-summary { grid-template-columns: 46px 1fr 30px; }
  .schema-story { grid-column: 2; }
  .schema-content { padding-left: 46px; }
  .schema-topline, .healthy-panel { grid-template-columns: 1fr; }
  .media-columns { grid-template-columns: 1fr; gap: 2.5rem; }
}

@media (max-width: 640px) {
  .toplinks a:nth-child(-n+2) { display: none; }
  .hero h1 { font-size: clamp(3.6rem, 20vw, 6rem); }
  .prose-grid, .coping-grid, .method-grid { grid-template-columns: 1fr; }
  .domain-map article { grid-template-columns: 44px 1fr; }
  .domain-map p { grid-column: 2; }
  .coping-grid article + article, .method-grid article + article { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .schema-summary { grid-template-columns: 36px 1fr 24px; gap: .75rem; }
  .schema-content { padding-left: 0; }
  .schema-title { font-size: 1.55rem; }
  footer { grid-template-columns: 1fr; min-height: 260px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

@media print {
  .hero { min-height: auto; color: var(--ink); background: white; }
  .topbar, .hero-actions, .controls, footer { display: none; }
  .guide { background: white; }
  .schema-card:not([open]) .schema-content { display: block; }
  .schema-list { border-top: 0; }
  .schema-card { break-inside: avoid; }
  body { background: white; }
}
