:root {
  color-scheme: dark;
  --bg: #2a2418;
  --surface: #352d1f;
  --text: #efe3c8;
  --accent: #93b87a;
  --accent2: #d0a25f;
  --muted: #c7bda7;
  --green: #1e3327;
  --rule: #736348;
  --heading: Georgia, 'Iowan Old Style', 'Palatino Linotype', serif;
  --body: 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --cut: polygon(18px 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px), 0 18px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 2rem; }
body {
  margin: 0;
  background: radial-gradient(ellipse at 65% 5%, #d0a25f0c, transparent 45%), repeating-linear-gradient(0deg, transparent 0 5px, #efe3c802 5px 6px), var(--bg);
  color: var(--text);
  font: 400 clamp(1rem, .94rem + .22vw, 1.125rem)/1.75 var(--body);
  overflow-wrap: break-word;
  -webkit-text-size-adjust: 100%;
}
.page { min-height: 100vh; }
main { display: block; min-width: 0; }
.page-home main { counter-reset: chapter; }
.wrap { width: min(100% - clamp(2rem, 7vw, 8rem), 80rem); margin-inline: auto; }
img { display: block; max-width: 100%; height: auto; object-fit: cover; }
figure { margin: 0; }
h1, h2, h3, h4, h5, h6 { margin: 0 0 1rem; font-family: var(--heading); font-weight: 400; line-height: 1.15; text-wrap: balance; }
h1 { font-size: clamp(2.25rem, 1.45rem + 3vw, 4.8rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.75rem, 1.25rem + 1.5vw, 2.85rem); letter-spacing: -.02em; }
h3 { font-size: clamp(1.4rem, 1.15rem + .8vw, 1.95rem); }
h4, h5, h6 { font-size: 1.25rem; }
p { margin: 0 0 1.25rem; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .22em; transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease; }
a:hover { color: var(--text); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--accent2); outline-offset: 5px; }
::selection { color: var(--bg); background: var(--accent2); }
ul, ol { padding-inline-start: 1.5rem; margin-block: 1rem 1.5rem; }
li { padding-inline-start: .15rem; }
li::marker { color: var(--accent2); }
strong, b { font-weight: 650; }
small, figcaption { font-size: .875rem; color: var(--muted); }
figcaption { margin-top: .75rem; }
hr { border: 0; border-top: 3px double var(--rule); margin-block: 2.5rem; }
blockquote { margin: 2rem 0; padding: 1rem 1.5rem; border-left: 3px solid var(--accent2); background: var(--surface); font-family: var(--heading); font-size: 1.3em; }
table { width: 100%; border-collapse: collapse; font-size: .95em; }
th, td { padding: .75rem; border: 1px solid var(--rule); text-align: start; overflow-wrap: anywhere; }
th { background: var(--green); }
pre { max-width: 100%; overflow-x: auto; padding: 1rem; background: var(--surface); }
code, kbd { font-family: ui-monospace, monospace; font-size: .9em; }
input, button, textarea, select { max-width: 100%; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--rule); padding: .65rem; }
button, summary { cursor: pointer; }
dt { font-weight: 650; color: var(--accent2); }
dd { margin: .25rem 0 1rem; }
.skip-link { position: absolute; left: 1rem; top: 1rem; z-index: 10; padding: .75rem 1rem; background: var(--text); color: var(--bg); transform: translateY(-200%); }
.skip-link:focus { transform: translateY(0); color: var(--bg); }

.site-header { background: var(--green); border-bottom: 4px double var(--rule); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2.5rem; min-height: 105px; padding-block: 1.2rem; }
.brand { display: inline-flex; align-items: center; gap: .85rem; flex-shrink: 0; color: var(--text); font: small-caps 400 clamp(1.5rem, 1.2rem + .75vw, 2rem)/1.2 var(--heading); text-decoration: none; letter-spacing: .015em; }
.brand::before { content: ''; width: 27px; height: 32px; border: 1px solid var(--accent2); box-shadow: inset 0 0 0 4px var(--green), inset 0 0 0 5px var(--accent2); clip-path: polygon(0 0, 100% 0, 100% 70%, 50% 100%, 0 70%); }
.site-nav ul, .footer-nav ul { display: flex; flex-wrap: wrap; gap: .3rem 1.5rem; list-style: none; padding: 0; margin: 0; }
.site-nav li, .footer-nav li { padding: 0; }
.site-nav a { display: block; padding-block: .5rem; color: var(--text); font-size: .875rem; text-decoration: none; border-bottom: 1px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current='page'] { color: var(--accent); border-color: var(--accent); }

.hero { padding-block: clamp(2.5rem, 5vw, 5rem); }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(2rem, 4vw, 4.5rem); align-items: center; border-bottom: 3px double var(--rule); padding-bottom: clamp(2.5rem, 5vw, 5rem); }
.hero-text { min-width: 0; }
.hero h1 { font-size: clamp(2.25rem, 1.3rem + 2.7vw, 4rem); max-width: 18ch; }
.eyebrow { display: flex; align-items: center; gap: .9rem; color: var(--accent2); font-size: .8rem; font-variant: small-caps; font-weight: 600; letter-spacing: .16em; line-height: 1.5; margin-bottom: 1.5rem; }
.eyebrow::before { content: ''; width: 2.5rem; border-top: 3px double var(--accent2); flex-shrink: 0; }
.lead { color: var(--muted); font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem); line-height: 1.8; }
.hero-actions { margin-top: 1.8rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 1.5rem; max-width: 100%; min-height: 48px; padding: .8rem 1.3rem; border: 1px solid var(--accent); font-size: .95rem; font-weight: 650; text-decoration: none; }
.btn::after { content: '\2192'; font-size: 1.2rem; }
.btn-primary { background: var(--accent); color: var(--bg); box-shadow: 4px 4px 0 #171e16; }
.btn-primary:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
.hero-media { padding: 8px; background: var(--rule); clip-path: var(--cut); transform: rotate(1deg); }
.hero-media img { width: 100%; aspect-ratio: 4 / 5; clip-path: var(--cut); filter: saturate(.78) sepia(.12); }

.section { padding-block: clamp(2rem, 4vw, 4rem); counter-increment: chapter; }
.section + .section:not(.section-partners) > .wrap { padding-top: clamp(2rem, 4vw, 3.5rem); border-top: 3px double var(--rule); }
.section-title { max-width: 26ch; }
.section-title::before { content: counter(chapter, decimal-leading-zero); display: block; width: fit-content; margin-bottom: 1.15rem; padding: .25rem .65rem; border: 3px double var(--rule); color: var(--accent2); font: 500 .8rem/1.3 var(--body); letter-spacing: .12em; transform: rotate(-3deg); }
.section-intro { max-width: 75ch; color: var(--muted); }
.section > .wrap > p { max-width: 80ch; }
.split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.split-text { min-width: 0; }
.split-text p:last-child { margin-bottom: 0; }
.split-media { padding: .6rem; border: 3px double var(--rule); }
.split-media img { width: 100%; aspect-ratio: 4 / 3; filter: saturate(.8); }
.section-feature { padding-top: .5rem; }
.card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-block: 2.5rem; counter-reset: card; }
.card { display: flex; flex-direction: column; min-width: 0; position: relative; padding: clamp(1.25rem, 2vw, 2rem); background: linear-gradient(135deg, #d0a25f08, transparent 60%), var(--surface); border-top: 3px solid var(--accent); clip-path: var(--cut); counter-increment: card; transition: background-color 180ms ease, transform 180ms ease; }
.card::before { content: counter(card, upper-roman); display: block; color: var(--accent2); font: 1rem/1 var(--heading); margin: .5rem 0 2rem; letter-spacing: .08em; }
.card-title { color: var(--text); }
.card-text { color: var(--muted); font-size: .95rem; }
.card-link { margin-top: auto; padding-top: 1.2rem; border-top: 1px solid var(--rule); font-size: .9rem; line-height: 1.6; font-weight: 600; }
.card:focus-within { background-color: #3e3526; }
.fact-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: 1rem; padding: 0; list-style: none; margin-block: 2rem; }
.fact { padding: 1.3rem; border-block: 3px double var(--rule); background: var(--surface); }
.fact strong { display: block; color: var(--accent2); font: 2rem/1.3 var(--heading); }

.section-partners { margin-top: clamp(2rem, 4vw, 4rem); padding-block: 2.5rem; background: #231f16; border-top: 4px double var(--rule); }
.section-partners .section-title { font-size: 1.8rem; }
.section-partners .section-title::before { display: inline-block; margin: 0 1rem 0 0; vertical-align: middle; }
.section-partners .section-intro { font-size: .9rem; }
.partner-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; padding: 0; margin: 1.5rem 0 0; list-style: none; }
.partner { min-width: 0; padding: 1rem; border: 1px solid #594e39; background: var(--bg); }
.partner-link { display: block; overflow-wrap: anywhere; font-size: .8rem; line-height: 1.55; }
.partner-phrase { margin: .8rem 0 .45rem; color: var(--text); font-size: .875rem; font-weight: 600; line-height: 1.5; }
.partner-desc { margin: 0; color: var(--muted); font-size: .8125rem; line-height: 1.65; }

.page-sub { background-color: var(--bg); }
.article { padding-block: clamp(1.5rem, 3vw, 3rem) clamp(3rem, 7vw, 7rem); }
.article > .wrap { max-width: 66rem; }
.breadcrumb { color: var(--muted); font-size: .8rem; line-height: 1.7; margin-bottom: clamp(2rem, 4vw, 4rem); }
.breadcrumb a { margin-right: .45rem; }
.breadcrumb span { margin-left: .45rem; }
.page-header { border-top: 3px double var(--rule); padding-top: clamp(1.5rem, 3vw, 2.5rem); padding-bottom: 1.5rem; }
.page-header h1 { max-width: 24ch; }
.page-header .lead { max-width: 80ch; margin-top: 1.5rem; }
.article-figure { padding: .6rem; border: 3px double var(--rule); margin-block: .5rem 3rem; clip-path: var(--cut); }
.article-figure img { width: 100%; max-height: 35rem; aspect-ratio: 16 / 9; clip-path: var(--cut); }
.prose { max-width: 88ch; margin-inline: auto; counter-reset: entry; }
.prose h2 { position: relative; margin-top: 2.7rem; padding-top: 1.7rem; border-top: 1px solid var(--rule); font-size: clamp(1.6rem, 1.3rem + 1vw, 2.25rem); counter-increment: entry; }
.prose h2::before { content: counter(entry, decimal-leading-zero) ' /'; display: block; color: var(--accent2); font: 500 .75rem/1.5 var(--body); letter-spacing: .12em; margin-bottom: .8rem; }
.prose h3 { margin-top: 2rem; }
.prose p { margin-bottom: 1.4rem; }
.prose > p:first-of-type::first-letter { color: var(--accent2); font-family: var(--heading); font-size: 1.6em; }
.article-figure-inline { margin-block: 2.5rem; }
.note { padding: 1.3rem 1.5rem; margin-block: 2rem; border-left: 3px solid var(--accent2); background: var(--surface); color: var(--text); }
.note p:last-child { margin: 0; }
.site-footer { background: var(--green); padding-block: 2rem; border-top: 4px double var(--rule); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem 3rem; }
.footer-note { color: var(--muted); max-width: 50ch; font-size: .85rem; margin: 0; }
.footer-nav a { display: inline-block; padding-block: .45rem; font-size: .8rem; }

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .card:hover { transform: translateY(-3px); background-color: #3e3526; }
}
@media (min-width: 1400px) {
  .hero-media { margin-left: 1rem; }
}
@media (max-width: 1100px) {
  .header-inner { flex-wrap: wrap; gap: .8rem; }
  .site-nav { width: 100%; }
  .card-grid, .partner-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-inner { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 2rem; }
  .hero h1 { font-size: clamp(2.25rem, 4vw, 3.5rem); }
  .hero-media img { aspect-ratio: 3 / 5; }
  .footer-inner { align-items: start; flex-direction: column; }
}
@media (max-width: 760px) {
  .hero-inner, .split { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { max-width: 22ch; font-size: clamp(2.2rem, 6.8vw, 3.5rem); }
  .hero-media { transform: none; }
  .hero-media img { aspect-ratio: 16 / 10; }
  .split-media img { aspect-ratio: 16 / 10; }
  .site-nav ul { column-gap: 1.2rem; }
  .site-nav a { font-size: .8125rem; }
  .page-header h1 { font-size: clamp(2rem, 6vw, 3rem); }
  .article-figure { margin-bottom: 2rem; }
  .article-figure img { aspect-ratio: 4 / 3; }
}
@media (max-width: 480px) {
  .card-grid, .partner-list { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 1.5rem; }
  .card::before { margin-bottom: 1rem; }
  .section-partners { padding-block: 2rem; }
  .header-inner { padding-block: 1.2rem .8rem; }
  .footer-nav ul { gap: .25rem 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  body { background: white; color: black; font-size: 11pt; }
  .site-header, .site-footer, .skip-link, .hero-actions, .section-partners { display: none; }
  .wrap { width: 100%; }
  a, .lead, .prose h2::before { color: black; }
  .article { padding: 0; }
  .article-figure { max-width: 70%; margin-inline: auto; }
  h1, h2, h3 { break-after: avoid; }
  figure, .note { break-inside: avoid; }
}
