/* One Earth — shared voice. One palette, one nav, one type scale.
   Page-specific styles stay in each page's own <style>. */

:root {
  color-scheme: dark;
  --bg: #121110;
  --bg-soft: #1a1816;
  --ink: #e9e2d4;
  --ink-dim: #9b9183;
  --ink-faint: #7d7466;   /* metadata; raised from #5e574d for legibility */
  --ink-ghost: #57504a;   /* hairline decorations only, never body text */
  --gold: #c9a86a;
  --condemn: #b05f52;
  --line: #2c2925;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.65;
  overflow-x: hidden;
}
a { color: var(--gold); text-decoration: none; }
button { font-family: var(--serif); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 2px; }
::selection { background: rgba(201, 168, 106, .25); }

/* ---------- shared nav ---------- */
.site-nav { border-bottom: 1px solid var(--line); background: var(--bg); }
.sn-in {
  max-width: 1240px; margin: 0 auto; padding: 10px 20px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0 26px;
}
.sn-brand {
  color: var(--ink); font-size: 14.5px; letter-spacing: .22em; text-transform: uppercase;
  padding: 9px 0; margin-right: 6px; white-space: nowrap;
}
.sn-brand .accent { color: var(--gold); }
.sn-links { display: flex; flex-wrap: wrap; gap: 0 4px; }
.sn-link {
  display: inline-flex; align-items: center; min-height: 42px; padding: 2px 10px;
  color: var(--ink-dim); font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase;
  border-bottom: 1px solid transparent; transition: color .2s ease;
}
.sn-link:hover { color: var(--ink); }
.sn-link[aria-current="page"] { color: var(--gold); border-bottom-color: var(--gold); }
.sn-langs { display: flex; flex-wrap: wrap; gap: 0 2px; margin-left: auto; }
.sn-lang {
  display: inline-flex; align-items: center; min-height: 42px; padding: 2px 7px;
  color: var(--ink-faint); font-size: 11.5px; letter-spacing: .08em;
  transition: color .2s ease;
}
.sn-lang:hover { color: var(--ink); }
.sn-lang[aria-current="true"] { color: var(--gold); }
@media (max-width: 640px) {
  .sn-in { padding: 6px 14px 8px; }
  .sn-link { padding: 2px 8px; letter-spacing: .12em; }
  .sn-langs { margin-left: 0; }
  .sn-lang { min-height: 34px; }
}

/* ---------- shared footer ---------- */
.site-foot { text-align: center; color: var(--ink-faint); font-size: 13px; padding: 34px 20px 60px; }
.site-foot .sf-mark { letter-spacing: .3em; text-transform: uppercase; color: var(--ink-dim); margin-bottom: 8px; }
.site-foot .sf-line { max-width: 640px; margin: 0 auto; }

/* ---------- loading & failure ---------- */
.data-wait { text-align: center; padding: 90px 24px; color: var(--ink-dim); font-style: italic; }
.data-wait .dw-dots { display: inline-flex; gap: 10px; margin-bottom: 18px; }
.data-wait .dw-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--gold);
  animation: dw-breathe 1.4s ease-in-out infinite;
}
.data-wait .dw-dot:nth-child(2) { animation-delay: .22s; }
.data-wait .dw-dot:nth-child(3) { animation-delay: .44s; }
@keyframes dw-breathe { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .data-wait .dw-dot { animation: none; opacity: .8; }
  html { scroll-behavior: auto; }
}
.data-err { text-align: center; padding: 90px 24px; color: var(--ink-dim); max-width: 560px; margin: 0 auto; }
.data-err .de-title { font-size: 22px; color: var(--ink); margin-bottom: 10px; }
.data-err button.de-retry {
  margin-top: 18px; background: none; border: 1px solid var(--line); border-radius: 999px;
  color: var(--gold); font-size: 14px; padding: 9px 26px; cursor: pointer;
}
.data-err button.de-retry:hover { border-color: var(--gold); }

/* ---------- the quote voice (the soul of the site) ---------- */
.quote { border-left: 2px solid var(--gold); padding-left: 22px; max-width: 65ch; }
.quote .q-orig { font-size: 20px; font-style: italic; color: var(--ink); line-height: 1.85; }
.quote .q-tr { margin-top: 8px; color: var(--ink-dim); font-size: 15.5px; }
.quote .q-loc { margin-top: 5px; color: var(--ink-faint); font-size: 12.5px; }

/* ---------- small shared pieces ---------- */
.chip {
  font-family: var(--serif); font-size: 13.5px; color: var(--ink-dim);
  background: transparent; border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 14px; cursor: pointer; transition: all .25s ease; letter-spacing: .04em;
  min-height: 34px;
}
.chip:hover { border-color: var(--gold); color: var(--ink); }
.chip.active { border-color: var(--gold); color: var(--gold); background: rgba(201, 168, 106, .08); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.empty-note { text-align: center; color: var(--ink-dim); font-style: italic; padding: 40px 20px; }

/* On a phone held upright, wide canvases (timeline, map) pan by touch —
   and a quiet line suggests the better way to hold the page. */
.rotate-hint { display: none; }
@media (max-width: 820px) and (orientation: portrait) {
  .rotate-hint {
    display: block; text-align: center; color: var(--ink-faint);
    font-size: 12.5px; font-style: italic; padding: 8px 18px 2px;
  }
}
