:root {
  --paper: #e9e1cf;
  --paper-deep: #d9d0bc;
  --ink: #10283b;
  --ash: #5d675f;
  --mineral: #102d46;
  --basalt: #173b55;
  --teal: #68a6a0;
  --ember: #d9512a;
  --rule: rgba(16, 40, 59, 0.18);
  --measure: 46rem;
  --wide: 76rem;
  --gutter: clamp(1.15rem, 4vw, 3.25rem);
  --section-space: clamp(3.5rem, 6vw, 4.75rem);
  --figure-space: clamp(1.75rem, 3.2vw, 2.5rem);
  --display: "Satoshi", "Helvetica Neue", sans-serif;
  --body: "Satoshi", "Helvetica Neue", sans-serif;
  --mono: "Satoshi", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(1rem, 0.97rem + 0.14vw, 1.08rem);
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

#quarto-content, main, .page-columns { display: block !important; }
#quarto-margin-sidebar, #quarto-sidebar, .nav-page, #title-block-header { display: none !important; }
main.content { max-width: none; padding: 0; margin: 0; }

main.content > *, body > * {
  max-width: var(--measure);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

main.content > .cell, body > .cell,
main.content > .full, body > .full,
main.content > .wide, body > .wide { max-width: var(--wide); }

main.content > .cell.figure-full, body > .cell.figure-full { max-width: 100%; padding: 0; }

h1, h2, h3 {
  color: var(--ink);
  font-family: var(--display);
  text-wrap: balance;
}

h1 {
  max-width: 19ch;
  margin: 0 0 clamp(1.1rem, 2vw, 1.5rem);
  font-size: clamp(3rem, 5.4vw, 5.4rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.99;
}

h2 {
  margin-top: 0.65rem;
  margin-bottom: 1.5rem;
  font-size: clamp(1.95rem, 3.3vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

h3 {
  margin-top: 2.5rem;
  margin-bottom: 0.7rem;
  font-size: clamp(1.3rem, 1.8vw, 1.55rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

p { margin-top: 0; margin-bottom: 1.25rem; text-wrap: pretty; }
a { color: var(--mineral); text-underline-offset: 3px; }
strong { font-weight: 700; }

.hero {
  max-width: var(--wide);
  padding-top: clamp(2.75rem, 5vw, 4.5rem);
  padding-bottom: 0;
}

.eyebrow p,
.standfirst p,
.hero-meta p,
.stat-item p,
.section-mark p,
.pullquote p,
.colophon p { margin-bottom: 0; }

.eyebrow, .hero-meta, .section-mark, .stat-label, .note, figcaption, .figure-caption, .colophon {
  font-family: var(--mono);
}

.eyebrow {
  margin-bottom: 1.25rem;
  color: var(--ember);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.standfirst {
  max-width: 42rem;
  margin-bottom: 0;
  color: var(--basalt);
  font-size: clamp(1.18rem, 1.7vw, 1.45rem);
  line-height: 1.5;
}

.hero-art {
  max-width: none;
  margin: clamp(1.75rem, 3.5vw, 2.5rem) calc(var(--gutter) * -1) 0;
  padding: 0;
  overflow: hidden;
  background: var(--paper);
}

.hero-art .cell { max-width: none; margin: 0; padding: 0; }
.hero-art figure { margin: 0; }
.hero-art img { width: 100%; max-height: 66vh; object-fit: cover; object-position: center; }
.hero-art figcaption { margin-top: 0.9rem; }

.hero-meta {
  max-width: calc(var(--measure) - (2 * var(--gutter)));
  margin: 1.3rem auto 0;
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
  color: var(--ash);
  font-size: 0.8rem;
  letter-spacing: 0.01em;
  line-height: 1.55;
}

.statgrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  max-width: var(--wide);
  margin-top: clamp(2.25rem, 4vw, 3.25rem);
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.stat-item { min-width: 0; padding: 0 1.5rem; }
.stat-item:first-child { padding-left: 0; }
.stat-item:last-child { padding-right: 0; }
.stat-item + .stat-item { border-left: 1px solid var(--rule); }
.stat {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(2.25rem, 4vw, 3.4rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
}

.stat-label {
  display: block;
  color: var(--ash);
  font-size: 0.74rem;
  letter-spacing: 0.07em;
  line-height: 1.5;
  text-transform: uppercase;
}

.section-mark {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: var(--section-space);
  margin-bottom: 0;
  padding-top: 1.05rem;
  border-top: 1px solid var(--rule);
  color: var(--ember);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.section-gap {
  margin-top: var(--section-space);
}

.section-mark::before {
  width: 2.1rem;
  height: 2px;
  background: var(--ember);
  content: "";
}

.pullquote {
  margin-top: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: clamp(1.75rem, 3vw, 2.25rem);
  padding: 1.2rem 0 1.2rem 1.4rem;
  border-left: 3px solid var(--ember);
  color: var(--mineral);
  font-family: var(--display);
  font-size: clamp(1.55rem, 2.8vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.14;
}

figure, .cell-output-display { margin: var(--figure-space) 0; }
figure.quarto-float { max-width: 100%; margin-left: 0; margin-right: 0; }
.quarto-uncaptioned { display: none; }
img { display: block; max-width: 100%; height: auto; }

figcaption, .figure-caption {
  color: var(--ash);
  font-size: clamp(0.75rem, 0.73rem + 0.08vw, 0.8rem);
  line-height: 1.55;
}

figure figcaption,
.cell .figure-caption {
  width: 100%;
  max-width: calc(var(--measure) - (2 * var(--gutter)));
  margin: 0.9rem auto 0;
}

body > .figure-caption,
main.content > .figure-caption {
  max-width: var(--measure);
  margin-top: 0.9rem;
}

.arc-map-wrap {
  width: 100%;
  max-width: var(--wide);
  aspect-ratio: 2200 / 790;
  margin: var(--figure-space) auto 0;
  background: var(--paper);
}
/* Keep every Leaflet wrapper at the map height. */
.arc-map-wrap,
.arc-map-wrap .cell,
.arc-map-wrap .cell-output-display,
.arc-map-wrap .quarto-figure,
.arc-map-wrap figure,
.arc-map-wrap figure > div {
  height: 100%;
}
.arc-map-wrap .html-widget.leaflet { width: 100% !important; height: 100% !important; }
.arc-map-wrap .leaflet-container { background: var(--paper); font-family: var(--body); }
.arc-map-wrap .leaflet-marker-icon,
.arc-map-wrap .leaflet-interactive { cursor: pointer; }

.volcano-tip-wrap.leaflet-tooltip {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 2px;
  box-shadow: 0 6px 18px rgba(16, 40, 59, 0.18);
  padding: 0.6rem 0.75rem;
  opacity: 1;
}
.volcano-tip-wrap.leaflet-tooltip::before { display: none; }
.volcano-tip { display: flex; flex-direction: column; gap: 0.15rem; min-width: 11rem; }
.volcano-tip strong {
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}
.volcano-tip span {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  color: var(--ash);
  line-height: 1.4;
}

.cell > .sourceCode, .cell > details { margin-top: 1.3rem; }
details > summary { color: var(--ash); cursor: pointer; font-family: var(--mono); font-size: 0.72rem; }
pre { overflow-x: auto; padding: 1rem; background: var(--paper-deep); border: 0; font-size: 0.78rem; }

.method-panel {
  margin-top: 1.1rem;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  background: rgba(217, 208, 188, 0.56);
  border: 1px solid var(--rule);
}

.method-panel h3 { margin-top: 0; font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.1em; line-height: 1.35; text-transform: uppercase; }
.method-panel > :last-child { margin-bottom: 0; }
.method-panel ul { margin: 0; padding-left: 1.15rem; }
.method-panel li { margin-bottom: 0.45rem; }

.colophon {
  max-width: var(--measure);
  margin-top: var(--section-space);
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  color: var(--ash);
  font-size: 0.76rem;
  line-height: 1.55;
}

.colophon p + p {
  margin-top: 0.75rem;
  color: var(--ink);
  text-align: center;
}

.colophon a { font-weight: 700; }

table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 0.9rem; }
th, td { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--rule); text-align: left; }
th { color: var(--ash); font-family: var(--mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }

.js-reveal .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js-reveal .reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 700px) {
  :root {
    --section-space: 3.25rem;
    --figure-space: 1.75rem;
  }
  body { font-size: 1rem; line-height: 1.64; }
  h1 { max-width: 15ch; font-size: clamp(2.7rem, 11.5vw, 3.55rem); line-height: 1.01; }
  h2 { margin-top: 0.55rem; margin-bottom: 1.25rem; font-size: clamp(1.8rem, 8.5vw, 2.5rem); }
  .hero { padding-top: 2.25rem; }
  .standfirst { font-size: 1.14rem; line-height: 1.5; }
  .statgrid { grid-template-columns: 1fr; margin-top: 2.25rem; padding: 0; }
  .stat-item { padding: 1.15rem 0; }
  .stat-item + .stat-item { border-top: 1px solid var(--rule); border-left: 0; }
  .hero-art { margin-top: 1.75rem; }
  .hero-art img { min-height: 17rem; max-height: 56vh; object-fit: cover; }
  .arc-map-wrap { aspect-ratio: 3 / 2; }
  .pullquote { margin-top: 1.5rem; padding-left: 1.1rem; }
  .method-panel { padding: 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js-reveal .reveal { opacity: 1; transform: none; transition: none; }
}

:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }
