:root {
  --footnote-paper: #f2efe8;
  --footnote-ink: #111115;
  --footnote-gold: #d6b47a;
  --footnote-green: #9fc3ad;
  --footnote-blue: #8faec2;
  --footnote-border: rgba(255, 255, 255, 0.13);
}

.footnote-body {
  background:
    radial-gradient(circle at 4% 1%, rgba(143, 174, 194, 0.18), transparent 32rem),
    radial-gradient(circle at 98% 14%, rgba(214, 180, 122, 0.12), transparent 30rem),
    #08090a;
}

.footnote-shell {
  max-width: 1220px;
}

.footnote-nav,
.footnote-site-footer,
.footnote-breadcrumbs,
.footnote-map-heading,
.footnote-map-actions,
.footnote-nav > div,
.footnote-actions,
.footnote-card-meta,
.footnote-card-links,
.footnote-hero-meta,
.footnote-permalink,
.footnote-site-footer > div {
  display: flex;
  align-items: center;
}

.footnote-nav {
  position: relative;
  z-index: 20;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 44px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--footnote-border);
}

.footnote-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
}

.footnote-brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.footnote-nav > div,
.footnote-site-footer > div {
  gap: 18px;
}

.footnote-language-switch {
  display: inline-flex;
  gap: 2px;
  padding-left: 8px;
  border-left: 1px solid var(--footnote-border);
}

.footnote-language-switch a {
  min-width: 30px;
  padding: 5px 7px;
  border: 1px solid transparent;
  border-radius: 999px;
  text-align: center;
}

.footnote-language-switch a.is-active {
  border-color: var(--footnote-gold);
  color: var(--footnote-ink);
  background: var(--footnote-gold);
}

.footnote-nav > div a,
.footnote-site-footer a,
.footnote-breadcrumbs a {
  color: #b6ae9f;
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
}

.footnote-nav > div a:hover,
.footnote-nav > div a.is-active,
.footnote-site-footer a:hover,
.footnote-breadcrumbs a:hover {
  color: var(--footnote-paper);
}

.footnote-index-hero,
.footnote-hero,
.footnote-content-grid {
  display: grid;
  gap: clamp(24px, 5vw, 64px);
}

.footnote-index-hero {
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
  align-items: end;
  padding: clamp(28px, 6vw, 76px) 0 clamp(48px, 8vw, 96px);
}

.footnote-kicker {
  margin: 0 0 14px;
  color: var(--footnote-gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footnote-index-hero h1,
.footnote-hero h1 {
  max-width: 920px;
  margin: 0;
  font-size: clamp(2.8rem, 8vw, 6.8rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.9;
  text-wrap: balance;
}

.footnote-hero h1 {
  font-size: clamp(2.8rem, 7vw, 6.2rem);
}

.footnote-dek {
  max-width: 760px;
  margin: 28px 0 0;
  color: #c9c2b7;
  font-size: clamp(1.08rem, 2vw, 1.45rem);
  line-height: 1.55;
}

.footnote-actions {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.footnote-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border: 1px solid var(--footnote-gold);
  border-radius: 999px;
  color: #15130f;
  background: var(--footnote-gold);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.77rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.footnote-button:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.footnote-button.is-quiet {
  color: var(--footnote-paper);
  border-color: var(--footnote-border);
  background: rgba(255, 255, 255, 0.04);
}

.footnote-index-note,
.footnote-place,
.footnote-discovery {
  padding: 26px;
  border: 1px solid var(--footnote-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.footnote-index-note span,
.footnote-index-note strong {
  display: block;
}

.footnote-index-note span {
  color: #918a80;
  font: 700 0.68rem/1.4 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.footnote-index-note strong {
  margin-top: 8px;
  font-size: 1.1rem;
  line-height: 1.35;
}

.footnote-index-note p,
.footnote-discovery > p,
.footnote-place > p {
  color: #bdb5a9;
  line-height: 1.6;
}

.footnote-list-section {
  padding: 0 0 80px;
}

.footnote-section-heading {
  margin-bottom: 28px;
}

.footnote-section-heading h2,
.footnote-discovery h2,
.footnote-audio h2,
.footnote-transcript h2,
.footnote-place h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3.6rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1;
}

.footnote-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footnote-grid > li,
.footnote-card {
  min-width: 0;
  height: 100%;
}

.footnote-card {
  overflow: hidden;
  border: 1px solid var(--footnote-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  transition: border-color 150ms ease, transform 150ms ease, background 150ms ease;
}

.footnote-card:hover {
  border-color: rgba(214, 180, 122, 0.48);
  background: rgba(255, 255, 255, 0.055);
  transform: translateY(-3px);
}

.footnote-card-image {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #151518;
}

.footnote-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms ease;
}

.footnote-card:hover .footnote-card-image img {
  transform: scale(1.025);
}

.footnote-card-copy {
  padding: 22px;
}

.footnote-card-meta {
  justify-content: space-between;
  color: #938b80;
  font: 700 0.68rem/1.4 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.footnote-card h3 {
  margin: 14px 0 10px;
  font-size: 1.35rem;
  line-height: 1.12;
}

.footnote-card h3 a {
  text-decoration: none;
}

.footnote-card p {
  margin: 0;
  color: #b9b1a5;
  font-size: 0.96rem;
  line-height: 1.55;
}

.footnote-card-links {
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

.footnote-card-links a {
  color: var(--footnote-gold);
  font: 700 0.72rem/1.4 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.footnote-breadcrumbs {
  gap: 9px;
  margin-bottom: 28px;
  color: #8d867c;
  font: 700 0.7rem/1.4 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footnote-map-section {
  margin-bottom: clamp(34px, 6vw, 72px);
}

.footnote-map-heading {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.footnote-map-heading h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.8rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1;
}

.footnote-map-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.footnote-map-actions button,
.footnote-map-actions a {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--footnote-border);
  border-radius: 999px;
  color: var(--footnote-paper);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  font: 700 0.67rem/1 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.footnote-map-actions button:hover,
.footnote-map-actions a:hover {
  border-color: rgba(214, 180, 122, 0.5);
  background: rgba(214, 180, 122, 0.1);
}

.footnote-map-window {
  position: relative;
  width: 100%;
  height: clamp(360px, 48vw, 520px);
  overflow: hidden;
  border: 1px solid var(--footnote-border);
  border-radius: 12px;
  background: #111216;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
}

.footnote-map-loading {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  margin: 0;
  place-items: center;
  padding: 28px;
  color: #bbb3a7;
  background: rgba(12, 13, 15, 0.9);
  text-align: center;
  pointer-events: none;
}

.footnote-map-loading[hidden] {
  display: none;
}

.footnote-map-caption {
  margin: 10px 0 0;
  color: #918a80;
  font: 400 0.78rem/1.5 ui-sans-serif, system-ui, sans-serif;
}

.footnote-map-window .maplibregl-ctrl-attrib,
.footnote-map-window .maplibregl-ctrl-scale {
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.footnote-map-window .maplibregl-popup-content {
  padding: 13px 14px;
  border: 1px solid var(--footnote-border);
  border-radius: 10px;
  color: var(--footnote-paper);
  background: rgba(15, 15, 18, 0.96);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.4);
}

.footnote-map-window .maplibregl-popup-tip {
  border-top-color: rgba(15, 15, 18, 0.96);
  border-bottom-color: rgba(15, 15, 18, 0.96);
}

.footnote-map-window .maplibregl-popup-close-button {
  color: #a9a195;
  font-size: 1rem;
}

.footnote-map-popup {
  display: grid;
  gap: 8px;
  min-width: 150px;
  padding-right: 8px;
  font-family: Georgia, "Times New Roman", serif;
}

.footnote-map-popup strong {
  line-height: 1.3;
}

.footnote-map-popup a {
  color: var(--footnote-gold);
  font: 700 0.68rem/1.4 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0.07em;
  text-decoration: none;
  text-transform: uppercase;
}

.footnote-agnes-marker {
  position: relative;
  width: 0;
  height: 0;
  overflow: visible;
  pointer-events: none;
}

.footnote-agnes-marker img {
  position: absolute;
  left: 0;
  bottom: 0;
  display: block;
  width: 42px;
  height: auto;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.45));
  transform: translate(-50%, -28%);
  transform-origin: 50% 100%;
}

.footnote-hero {
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  min-height: 470px;
  padding: clamp(24px, 6vw, 72px) 0 clamp(50px, 8vw, 88px);
}

.footnote-hero.has-image {
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.75fr);
}

.footnote-hero-media {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--footnote-border);
  border-radius: 12px;
  background: #141416;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
}

.footnote-hero-gallery {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.footnote-hero-gallery.has-multiple {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.footnote-hero-gallery.has-multiple .footnote-hero-media img {
  aspect-ratio: 4 / 5;
}

.footnote-hero-media img {
  display: block;
  width: 100%;
  max-height: 560px;
  object-fit: cover;
}

.footnote-hero-media figcaption {
  padding: 12px 16px;
  color: #958e84;
  font-size: 0.78rem;
  line-height: 1.45;
}

.footnote-hero-meta {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.footnote-hero-meta span {
  padding: 6px 10px;
  border: 1px solid var(--footnote-border);
  border-radius: 999px;
  color: #aaa296;
  font: 700 0.66rem/1.3 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.footnote-content-grid {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  align-items: start;
  padding-bottom: 72px;
}

.footnote-audio {
  margin-bottom: 62px;
  padding: 28px;
  border: 1px solid rgba(214, 180, 122, 0.3);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(214, 180, 122, 0.12), rgba(255, 255, 255, 0.025));
}

.footnote-audio audio {
  width: 100%;
  margin-top: 24px;
  accent-color: var(--footnote-gold);
}

.footnote-audio > p:not(.footnote-audio-continuation) {
  margin: 12px 0 0;
  color: #938b80;
  font: 700 0.68rem/1.4 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footnote-audio .footnote-audio-continuation {
  margin: 10px 0 0;
  color: #b9b1a5;
  font: 400 0.86rem/1.5 ui-sans-serif, system-ui, sans-serif;
}

.footnote-transcript h2 {
  margin-bottom: 28px;
}

.footnote-prose {
  max-width: 720px;
  color: #ded9d0;
  font-size: clamp(1.03rem, 1.5vw, 1.18rem);
  line-height: 1.78;
}

.footnote-prose p {
  margin: 0 0 1.25em;
}

.footnote-prose .transcript-cue {
  color: #8f887e;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.78em;
  font-style: italic;
  letter-spacing: 0.03em;
}

.footnote-place {
  position: sticky;
  top: 18px;
}

.footnote-place h2 {
  font-size: 2rem;
}

.footnote-place dl {
  margin: 24px 0;
}

.footnote-place dl div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--footnote-border);
}

.footnote-place dt,
.footnote-place dd {
  margin: 0;
  font: 700 0.7rem/1.4 ui-monospace, monospace;
}

.footnote-place dt {
  color: #918a80;
  text-transform: uppercase;
}

.footnote-place-note {
  font-size: 0.78rem;
}

.footnote-external-links {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(214, 180, 122, 0.34);
}

.footnote-external-links h3 {
  margin: 0 0 16px;
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1.2;
}

.footnote-external-links ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footnote-external-links a {
  display: grid;
  gap: 4px;
  padding: 12px 13px;
  border: 1px solid var(--footnote-border);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
  text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.footnote-external-links a:hover {
  border-color: rgba(214, 180, 122, 0.5);
  background: rgba(214, 180, 122, 0.08);
  transform: translateY(-1px);
}

.footnote-external-links span {
  color: var(--footnote-gold);
  font-size: 0.92rem;
  line-height: 1.35;
}

.footnote-external-links small {
  color: #918a80;
  font: 700 0.62rem/1.45 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.footnote-directions {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(214, 180, 122, 0.34);
  scroll-margin-top: 24px;
}

.footnote-directions h3 {
  margin: 0 0 18px;
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1.2;
}

.footnote-direction-note + .footnote-direction-note {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed var(--footnote-border);
}

.footnote-direction-note p {
  margin: 0 0 0.9em;
  color: #ddd6ca;
  font-size: 0.92rem;
  line-height: 1.58;
}

.footnote-direction-note .transcript-cue {
  color: #918a80;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.72rem;
  font-style: italic;
}

.footnote-direction-note .footnote-direction-safety {
  margin-top: 12px;
  padding-left: 11px;
  border-left: 2px solid var(--footnote-gold);
  color: #a9a195;
  font-size: 0.78rem;
}

.footnote-sequence {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 56px;
  padding-top: 26px;
  border-top: 1px solid var(--footnote-border);
}

.footnote-sequence a {
  display: grid;
  gap: 7px;
  padding: 20px;
  border: 1px solid var(--footnote-border);
  border-radius: 10px;
  text-decoration: none;
}

.footnote-sequence a:hover {
  border-color: rgba(214, 180, 122, 0.5);
  background: rgba(255, 255, 255, 0.04);
}

.footnote-sequence a.is-next {
  text-align: right;
}

.footnote-sequence span {
  color: #918a80;
  font: 700 0.67rem/1.4 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footnote-sequence strong {
  line-height: 1.35;
}

.footnote-discovery {
  margin: 0 0 44px;
  padding: clamp(28px, 5vw, 54px);
  background:
    radial-gradient(circle at 90% 10%, rgba(159, 195, 173, 0.12), transparent 24rem),
    rgba(255, 255, 255, 0.035);
}

.footnote-discovery h2 {
  max-width: 820px;
}

.footnote-discovery > p {
  max-width: 720px;
  font-size: 1.05rem;
}

.footnote-permalink {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px 20px;
  margin-bottom: 44px;
  padding: 18px 0;
  border-top: 1px solid var(--footnote-border);
  border-bottom: 1px solid var(--footnote-border);
}

.footnote-permalink div {
  min-width: 0;
}

.footnote-permalink span,
.footnote-permalink strong {
  display: block;
}

.footnote-permalink span {
  margin-bottom: 4px;
  color: #918a80;
  font: 700 0.65rem/1.4 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footnote-permalink strong {
  overflow: hidden;
  color: #bdb5a9;
  font: 400 0.78rem/1.5 ui-monospace, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.footnote-permalink button {
  padding: 9px 14px;
  border: 1px solid var(--footnote-border);
  border-radius: 999px;
  color: var(--footnote-paper);
  background: transparent;
  cursor: pointer;
  font: 700 0.68rem/1 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footnote-permalink > p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--footnote-green);
  font-size: 0.8rem;
}

.footnote-site-footer {
  justify-content: space-between;
  gap: 18px;
  padding-top: 20px;
  border-top: 1px solid var(--footnote-border);
  color: #918a80;
  font-size: 0.75rem;
}

.footnote-error {
  display: grid;
  min-height: 100vh;
  margin: 0;
  place-items: center;
  padding: 24px;
  color: var(--footnote-paper);
  background: #08090a;
  font-family: Georgia, serif;
}

.footnote-error main {
  max-width: 660px;
}

.footnote-error h1 {
  font-size: clamp(2.4rem, 8vw, 5rem);
  font-weight: 400;
  line-height: 0.96;
}

.footnote-error a {
  color: var(--footnote-gold);
}

@media (max-width: 900px) {
  .footnote-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footnote-index-hero,
  .footnote-hero.has-image,
  .footnote-content-grid {
    grid-template-columns: 1fr;
  }

  .footnote-place {
    position: static;
  }
}

@media (max-width: 620px) {
  .footnote-body {
    padding: 0;
  }

  .footnote-shell {
    padding: 18px;
    border: 0;
    border-radius: 0;
  }

  .footnote-nav {
    align-items: flex-start;
    margin-bottom: 24px;
  }

  .footnote-map-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .footnote-map-actions {
    justify-content: flex-start;
  }

  .footnote-map-window {
    height: 370px;
  }

  .footnote-agnes-marker img {
    width: 32px;
  }

  .footnote-nav > div {
    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: 9px 14px;
    text-align: right;
  }

  .footnote-brand span {
    display: none;
  }

  .footnote-index-hero {
    padding-top: 30px;
  }

  .footnote-index-hero h1,
  .footnote-hero h1 {
    font-size: clamp(2.7rem, 15vw, 4.8rem);
  }

  .footnote-grid {
    grid-template-columns: 1fr;
  }

  .footnote-hero {
    min-height: 0;
  }

  .footnote-hero-gallery.has-multiple {
    grid-template-columns: 1fr;
  }

  .footnote-hero-gallery.has-multiple .footnote-hero-media img {
    aspect-ratio: auto;
  }

  .footnote-audio,
  .footnote-place,
  .footnote-index-note {
    padding: 20px;
  }

  .footnote-sequence {
    grid-template-columns: 1fr;
  }

  .footnote-sequence > span {
    display: none;
  }

  .footnote-site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .footnote-site-footer > div {
    flex-wrap: wrap;
    gap: 10px 16px;
  }

  .footnote-permalink {
    grid-template-columns: 1fr;
  }

  .footnote-permalink button {
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .footnote-card,
  .footnote-card-image img,
  .footnote-button,
  .footnote-external-links a {
    transition: none;
  }
}
