:root {
  --ink: #26332a;
  --ink-soft: #526056;
  --paper: #f7f0dc;
  --paper-deep: #eadfbe;
  --paper-light: #fffdf6;
  --leaf: #294f3b;
  --leaf-dark: #183527;
  --petal: #5b2a69;
  --petal-light: #8a568f;
  --pollen: #f1c453;
  --clay: #c96846;
  --line: rgba(41, 79, 59, 0.22);
  --shadow: 0 24px 70px rgba(38, 51, 42, 0.14);
  --radius: 26px;
  --content: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 280px;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(241, 196, 83, 0.17), transparent 24rem),
    linear-gradient(rgba(41, 79, 59, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: auto, 100% 34px, auto;
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.72;
  overflow-wrap: anywhere;
}

a { color: var(--petal); text-decoration-thickness: 0.08em; text-underline-offset: 0.17em; }
a:hover { color: var(--clay); }
img { display: block; max-width: 100%; height: auto; }

.affiliation-note {
  padding: 0.62rem 1rem;
  color: #fff8e3;
  background: var(--leaf-dark);
  border-bottom: 1px solid rgba(255,255,255,0.15);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1.4;
  text-align: center;
  text-transform: uppercase;
}

.masthead {
  position: relative;
  z-index: 2;
  background: rgba(247, 240, 220, 0.96);
  border-bottom: 1px solid var(--line);
}

.masthead-inner {
  width: min(calc(100% - 2rem), var(--content));
  min-width: 0;
  margin: 0 auto;
  padding: 1.05rem 0 0.85rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem 1.5rem;
}

.brand {
  min-width: 0;
  color: var(--leaf-dark);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  width: 2.35rem;
  height: 2.35rem;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--paper-light);
  background: var(--petal);
  border: 3px solid var(--pollen);
  border-radius: 50% 48% 52% 45%;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 800;
  transform: rotate(-5deg);
}

.brand-copy { min-width: 0; }
.brand-name {
  display: block;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.05rem, 3vw, 1.45rem);
  font-weight: 700;
  line-height: 1.05;
}
.brand-tag {
  display: block;
  margin-top: 0.15rem;
  color: var(--ink-soft);
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-nav { min-width: 0; max-width: 100%; }
.site-nav ul {
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  list-style: none;
}
.site-nav li { min-width: 0; }
.site-nav a {
  display: block;
  padding: 0.5rem 0.72rem;
  color: var(--leaf-dark);
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--paper-light);
  background: var(--leaf);
  border-color: var(--leaf);
}

.hero {
  position: relative;
  min-height: min(77vh, 780px);
  display: grid;
  align-items: end;
  overflow: hidden;
  background: var(--leaf-dark);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(18, 37, 26, 0.9) 0%, rgba(18, 37, 26, 0.66) 39%, rgba(18, 37, 26, 0.06) 72%), linear-gradient(0deg, rgba(18,37,26,0.55), transparent 45%);
}
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-copy {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 2rem), var(--content));
  margin: 0 auto;
  padding: clamp(4rem, 10vw, 8rem) 0 clamp(3rem, 8vw, 6rem);
  color: #fffdf6;
}
.hero-copy > * { max-width: 690px; }
.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--pollen);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  line-height: 1.08;
  text-wrap: balance;
}
.hero h1 {
  margin: 0;
  font-size: clamp(3rem, 8vw, 6.7rem);
  font-weight: 650;
  letter-spacing: -0.04em;
}
.hero-lede {
  margin: 1.2rem 0 1.7rem;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.6;
}
.button-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.82rem 1.05rem;
  color: var(--leaf-dark);
  background: var(--pollen);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 4px 18px 4px 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.22);
  font-weight: 800;
  text-decoration: none;
}
.button-link:hover { color: var(--leaf-dark); background: #ffda72; transform: translateY(-2px); }

.page-header {
  width: min(calc(100% - 2rem), var(--content));
  margin: clamp(2rem, 6vw, 4.8rem) auto 0;
  display: grid;
  grid-template-columns: minmax(150px, 0.32fr) minmax(0, 1fr);
  gap: clamp(1.2rem, 5vw, 5rem);
  align-items: end;
}
.page-header .field-tab {
  padding: 1rem 1rem 1.15rem;
  color: var(--paper-light);
  background: var(--petal);
  border-left: 7px solid var(--pollen);
  border-radius: 3px 20px 3px 20px;
  box-shadow: var(--shadow);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.45;
  text-transform: uppercase;
}
.page-header h1 {
  margin: 0;
  color: var(--leaf-dark);
  font-size: clamp(2.5rem, 7vw, 5.6rem);
  font-weight: 640;
  letter-spacing: -0.035em;
}
.page-header .summary {
  max-width: 760px;
  margin: 1rem 0 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.feature-figure {
  width: min(calc(100% - 2rem), 1280px);
  margin: clamp(2rem, 6vw, 4.5rem) auto 0;
  position: relative;
}
.feature-figure::before {
  content: "FIELD IMAGE";
  position: absolute;
  z-index: 1;
  top: -0.8rem;
  left: clamp(0.5rem, 5vw, 3rem);
  padding: 0.42rem 0.75rem;
  color: var(--leaf-dark);
  background: var(--pollen);
  border: 1px solid rgba(24,53,39,0.25);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.13em;
}
.feature-figure img {
  width: 100%;
  max-height: 690px;
  object-fit: cover;
  border: 9px solid var(--paper-light);
  border-radius: var(--radius) 4px var(--radius) 4px;
  box-shadow: var(--shadow);
}
.feature-figure img.portrait { max-height: 800px; object-fit: contain; background: var(--leaf-dark); }
.feature-figure figcaption {
  width: min(90%, 720px);
  margin: 0.7rem 0 0 auto;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-style: italic;
  text-align: right;
}

.article-shell {
  width: min(calc(100% - 2rem), var(--content));
  margin: clamp(2.5rem, 7vw, 5.5rem) auto clamp(3.5rem, 8vw, 7rem);
  display: grid;
  grid-template-columns: minmax(150px, 0.3fr) minmax(0, 760px);
  gap: clamp(1.2rem, 5vw, 5rem);
  align-items: start;
  justify-content: start;
}
.article-index {
  position: sticky;
  top: 1rem;
  padding: 1rem 0;
  border-top: 5px solid var(--petal);
  border-bottom: 1px solid var(--line);
}
.article-index span { display: block; color: var(--ink-soft); font-size: 0.76rem; font-weight: 800; letter-spacing: 0.11em; text-transform: uppercase; }
.article-index strong { display: block; margin-top: 0.4rem; color: var(--leaf); font-family: "Fraunces", Georgia, serif; font-size: 1.35rem; line-height: 1.2; }
.article-index a { display: inline-block; margin-top: 0.8rem; font-size: 0.82rem; font-weight: 800; }

.prose { min-width: 0; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.25rem; }
.prose h2 {
  margin: 2.8rem 0 1rem;
  color: var(--leaf-dark);
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  font-weight: 650;
  letter-spacing: -0.025em;
}
.prose h2::before { content: "✦"; display: inline-block; margin-right: 0.55rem; color: var(--clay); font-size: 0.55em; transform: translateY(-0.18em); }
.prose h3 { margin-top: 2rem; font-size: 1.4rem; }
.prose ul, .prose ol { margin: 1.2rem 0 1.5rem; padding-left: 1.2rem; }
.prose li { margin: 0.55rem 0; padding-left: 0.35rem; }
.prose strong { color: var(--leaf-dark); }
.prose a { font-weight: 700; }
.prose p:first-child {
  padding-left: 1.1rem;
  border-left: 5px solid var(--pollen);
  font-size: 1.1rem;
}

.next-notes {
  width: min(calc(100% - 2rem), var(--content));
  margin: 0 auto clamp(3rem, 8vw, 6rem);
  padding: clamp(1.4rem, 4vw, 2.5rem);
  color: var(--paper-light);
  background: var(--leaf);
  border-radius: 3px var(--radius) 3px var(--radius);
  box-shadow: var(--shadow);
}
.next-notes h2 { margin: 0 0 1rem; font-size: clamp(1.6rem, 4vw, 2.5rem); }
.note-links { display: flex; flex-wrap: wrap; gap: 0.65rem; }
.note-links a { padding: 0.58rem 0.78rem; color: var(--paper-light); border: 1px solid rgba(255,255,255,0.3); border-radius: 999px; font-size: 0.82rem; font-weight: 800; text-decoration: none; }
.note-links a:hover { color: var(--leaf-dark); background: var(--pollen); border-color: var(--pollen); }

.site-footer { color: #f7f0dc; background: var(--leaf-dark); }
.footer-grid {
  width: min(calc(100% - 2rem), var(--content));
  margin: 0 auto;
  padding: 3rem 0 2rem;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 2rem 4rem;
}
.footer-grid h2 { margin: 0 0 0.6rem; color: var(--pollen); font-size: 1.65rem; }
.footer-grid p { max-width: 620px; margin: 0; color: rgba(255,255,255,0.76); font-size: 0.88rem; }
.footer-links { min-width: 0; display: flex; flex-wrap: wrap; align-content: start; gap: 0.5rem 0.9rem; }
.footer-links a { color: #fff8e3; font-size: 0.82rem; font-weight: 700; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.14); }
.footer-bottom-inner { width: min(calc(100% - 2rem), var(--content)); margin: 0 auto; padding: 1rem 0 1.35rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem; color: rgba(255,255,255,0.64); font-size: 0.74rem; }

.not-found {
  min-height: 65vh;
  display: grid;
  place-items: center;
  padding: 3rem 1rem;
}
.not-found-card {
  width: min(720px, 100%);
  padding: clamp(2rem, 7vw, 5rem);
  text-align: center;
  background: var(--paper-light);
  border: 1px solid var(--line);
  border-radius: var(--radius) 4px var(--radius) 4px;
  box-shadow: var(--shadow);
}
.not-found-number { margin: 0; color: var(--petal); font-family: "Fraunces", Georgia, serif; font-size: clamp(5rem, 18vw, 10rem); font-weight: 700; line-height: 0.8; }
.not-found h1 { margin: 1.5rem 0 0.7rem; font-size: clamp(2rem, 6vw, 3.8rem); }

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

@media (max-width: 820px) {
  .masthead-inner { align-items: flex-start; }
  .site-nav { width: 100%; }
  .site-nav ul { justify-content: flex-start; }
  .page-header, .article-shell { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .page-header .field-tab { width: fit-content; }
  .article-index { position: static; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; }
  .article-index strong { font-size: 1.05rem; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .affiliation-note { text-align: left; }
  .brand-tag { display: none; }
  .site-nav a { padding: 0.45rem 0.58rem; font-size: 0.75rem; }
  .hero { min-height: 680px; }
  .hero::after { background: linear-gradient(0deg, rgba(18,37,26,0.94) 0%, rgba(18,37,26,0.62) 62%, rgba(18,37,26,0.14) 100%); }
  .page-header { margin-top: 2.5rem; }
  .feature-figure img { border-width: 5px; }
  .footer-bottom-inner { display: block; }
  .footer-bottom-inner span { display: block; margin-top: 0.4rem; }
}

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