/*
VOICE   Calm, elegant, timeless: the American West in print.
IDEA    A well-made field guide or history book: generous margins, quiet color.
PICTURE Salt flat and Panamint Range at the top of each article.
COLOUR  Soft sand ground, salt white panels, deep cactus header and footer, desert sky for quotes.
GRAMMAR Serial (Oxford) comma in every list of three or more.
TITLES  Title case (Chicago style) for headings, card titles and menu labels.
DATES   No visible dates except a 'Last reviewed' line on Visit pages. Dates stay in structured data.
TYPE    Cormorant Garamond headings, Goudy Bookletter 1911 body. Locked 2026-12-04.
*/

/* ---------- Fonts (self-hosted; SIL Open Font License, see /fonts) ---------- */
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 500; font-display: swap; src: url("../fonts/cormorant-garamond-latin-500-italic.woff2") format("woff2"); }
@font-face { font-family: "Goudy Bookletter 1911"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/goudy-bookletter-1911-latin-400-normal.woff2") format("woff2"); }

/* ---------- Tokens (final selections) ---------- */
:root {
  color-scheme: light;
  --sand: #F9F5EE;
  --salt: #FDFBF8;
  --cactus-soft: #8A9A7B;
  --cactus-deep: #5F6E53;
  --cactus-tint: #E6EBDF;        /* pale cactus: article boxes */
  --cactus-tint-line: #D3DBC9;
  --cactus-tint-hover: #DCE3D3;
  --sky: #3E5C76;
  --ink: #2A2520;
  --ink-secondary: #6B6157;
  --clay: #A8644A;
  --hairline: #E8E0D2;

  --font-heading: "Cormorant Garamond", Georgia, serif;
  --font-body: "Goudy Bookletter 1911", Georgia, serif;
  --measure: 62ch;
  --radius-card: 10px;
  --radius-button: 6px;
}

/* Emphasis rule: Goudy Bookletter has no bold or italic.
   Bold labels use --font-heading at 600; italics stay rare. */

* { box-sizing: border-box; min-width: 0; }
html { scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1.75;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--cactus-deep); text-decoration: underline; text-decoration-color: var(--cactus-soft); text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--cactus-deep); }
a:focus-visible { outline: 2px solid var(--cactus-deep); outline-offset: 3px; border-radius: 2px; }
strong, b { font-family: var(--font-heading); font-weight: 600; font-size: 1.08em; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Header and navigation ---------- */
.site-header { background: var(--cactus-deep); }
.site-header .inner {
  max-width: 1120px; margin: 0 auto; padding: 22px max(5vw, 20px);
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 32px;
}
.wordmark { font-family: var(--font-heading); font-weight: 600; font-size: 28px; letter-spacing: .01em; color: #FDFBF8; text-decoration: none; }
.wordmark span { color: #D6DECB; font-weight: 500; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 26px; }
.site-nav a { font-family: var(--font-heading); font-size: 19px; font-weight: 500; color: #F3F1EA; text-decoration: none; padding: 6px 0; display: inline-block; border-bottom: 1px solid transparent; }
.site-nav a:hover { border-bottom-color: #C7D1BB; }
.site-nav a:focus-visible { outline-color: #FDFBF8; }
.site-nav a[aria-current="page"] { color: #FDFBF8; border-bottom-color: #FDFBF8; }

/* ---------- Article layout ---------- */
.article { max-width: 1120px; margin: 0 auto; padding: 0 max(5vw, 20px); }
.crumbs { font-size: 15px; color: var(--ink-secondary); margin: 36px 0 0; }
.crumbs a { color: var(--ink-secondary); }
.article-head { max-width: 820px; margin: 28px auto 0; text-align: center; }
.eyebrow { font-family: var(--font-heading); font-weight: 600; font-size: 17px; color: var(--cactus-deep); margin: 0 0 10px; }
h1 {
  font-family: var(--font-heading); font-weight: 600; font-size: clamp(36px, 5.4vw, 52px);
  line-height: 1.08; margin: 0 0 22px; text-wrap: balance;
}
.dek { font-size: 22px; line-height: 1.6; color: var(--ink-secondary); margin: 0 auto 18px; max-width: 40em; text-wrap: pretty; }
.meta { font-size: 15px; color: var(--ink-secondary); margin: 0; }
.meta span + span::before { content: "·"; margin: 0 10px; color: var(--cactus-soft); }

.hero { margin: 44px auto 0; max-width: 1000px; }
.hero img { display: block; width: 100%; height: auto; border-radius: var(--radius-card); background: #E8E0D2; }
figcaption { font-size: 15px; line-height: 1.5; color: var(--ink-secondary); margin-top: 12px; }
.hero figcaption { text-align: center; }
.hero-narrow { max-width: 800px; } /* for source photos under 1000px wide */

.prose { max-width: var(--measure); margin: 56px auto 0; }
.prose p { margin: 0 0 1.35em; }
.prose h2 {
  font-family: var(--font-heading); font-weight: 600; font-size: 34px; line-height: 1.15;
  margin: 2.2em 0 .7em; text-wrap: balance;
}
.prose ul { padding-left: 1.2em; margin: 0 0 1.35em; }
.prose li { margin-bottom: .5em; }
.prose h3.sub-h { font-family: var(--font-heading); font-weight: 600; font-size: 25px; margin: 1.4em 0 .5em; }
.prose li::marker { color: var(--cactus-soft); }
.lede::first-letter {
  font-family: var(--font-heading); font-weight: 600; float: left;
  font-size: 4.1em; line-height: .82; margin: .08em .1em 0 0; color: var(--cactus-deep);
}

/* Pull quote */
.pull {
  margin: 2.2em 0; padding: 0 0 0 26px; border-left: 2px solid var(--cactus-soft); border-radius: 0;
  font-family: var(--font-heading); font-style: italic; font-size: 28px; line-height: 1.35; color: var(--sky);
}
.pull cite { display: block; margin-top: 10px; font-family: var(--font-body); font-style: normal; font-size: 15px; color: var(--ink-secondary); }

/* Salt-white panels: quick facts, timeline, myth vs fact */
.panel { background: var(--salt); border: 1px solid var(--hairline); border-radius: var(--radius-card); padding: 26px 30px; margin: 2.2em 0; }
.panel h3 { font-family: var(--font-heading); font-weight: 600; font-size: 26px; line-height: 1.2; margin: 0 0 14px; }
.facts { margin: 0; display: grid; gap: 14px; }
.facts div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 4px 18px; border-top: 1px solid var(--hairline); padding-top: 12px; }
.facts div:first-child { border-top: 0; padding-top: 0; }
.facts dt { font-size: 17px; color: var(--ink-secondary); line-height: 1.5; }
.facts dd { margin: 0; font-family: var(--font-heading); font-weight: 600; font-size: 21px; line-height: 1.35; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 7.2em minmax(0, 1fr); gap: 16px; padding: 10px 0; border-top: 1px solid var(--hairline); font-size: 18px; line-height: 1.55; }
.timeline li:first-child { border-top: 0; }
.timeline time { font-family: var(--font-heading); font-weight: 600; font-size: 19px; color: var(--cactus-deep); white-space: nowrap; }

.myths { display: grid; gap: 18px; }
.myth { border-top: 1px solid var(--hairline); padding-top: 16px; }
.myth:first-of-type { border-top: 0; padding-top: 0; }
.myth p { margin: 0; font-size: 18px; line-height: 1.6; }
.myth .label { font-family: var(--font-heading); font-weight: 600; font-size: 19px; }
.myth .claim .label { color: var(--clay); }
.myth .truth { margin-top: 6px; }
.myth .truth .label { color: var(--cactus-deep); }

/* Image waiting to be added */
.img-todo { border: 1px dashed var(--cactus-soft); border-radius: var(--radius-card); background: var(--salt); padding: 44px 24px; text-align: center; color: var(--ink-secondary); font-size: 16px; line-height: 1.5; }
.figure { margin: 2.2em 0; }
.img-todo-hero { min-height: 260px; display: flex; align-items: center; justify-content: center; padding: 40px 24px; font-size: 18px; }
.figure img { display: block; width: 100%; height: auto; mix-blend-mode: multiply; }

/* Visit pages only: quiet review date near the bottom */
.reviewed { max-width: var(--measure); margin: 2em auto 0; font-size: 15px; color: var(--ink-secondary); }

/* ---------- Ad slots ---------- */
/* Space is reserved so the page doesn't jump when an ad loads. */
.ad-slot { margin: 2.6em auto; max-width: 760px; background: var(--salt); border: 1px solid var(--hairline); border-radius: var(--radius-card); padding: 10px 16px 16px; }
.ad-slot .ad-label { font-family: var(--font-heading); font-size: 14px; color: var(--ink-secondary); margin: 0 0 8px; text-align: center; }
.ad-slot .ad-box { min-height: 250px; display: grid; place-items: center; color: #B3A898; font-size: 15px; border-radius: 6px; background: repeating-linear-gradient(135deg, transparent 0 14px, rgba(232,224,210,.45) 14px 15px); }

/* ---------- Sources ---------- */
.sources { max-width: var(--measure); margin: 2.5em auto 0; border-top: 1px solid var(--hairline); padding-top: 16px; }
.sources h2 { font-family: var(--font-heading); font-weight: 600; font-size: 19px; margin: 0 0 8px; color: var(--ink-secondary); }
.sources ol { padding-left: 1.4em; margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-secondary); }
.sources li { margin-bottom: 4px; }
.sources a { color: inherit; }
.sources .note { font-size: 14px; line-height: 1.5; color: var(--ink-secondary); margin: 10px 0 0; }

/* ---------- Related articles ---------- */
.related { max-width: 1000px; margin: 4em auto 0; }
.related h2 { font-family: var(--font-heading); font-weight: 600; font-size: 30px; margin: 0 0 18px; text-align: center; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.card { display: block; background: var(--cactus-tint); border: 1px solid var(--cactus-tint-line); border-radius: var(--radius-card); padding: 20px 22px; text-decoration: none; color: var(--ink); transition: border-color .2s, background-color .2s; }
.card:hover { background: var(--cactus-tint-hover); border-color: var(--cactus-soft); }
.card .k { font-family: var(--font-heading); font-weight: 600; font-size: 15px; color: #526047; margin: 0 0 4px; }
.card .t { font-family: var(--font-heading); font-weight: 600; font-size: 22px; line-height: 1.25; margin: 0 0 6px; }
.card .d { font-size: 16px; line-height: 1.5; color: #56604C; margin: 0; }

.cards-lg { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.cards-lg .card { padding: 26px 28px; }
.cards-lg .t { font-size: 26px; }
.cards-lg .d { font-size: 17px; }
.panel h3 + .timeline { margin-top: 4px; }

/* ---------- Maps (click to load) ---------- */
.map { margin: 2.4em 0; }
.map-frame { position: relative; aspect-ratio: 4 / 3; max-height: 460px; width: 100%; border: 1px solid var(--hairline); border-radius: var(--radius-card); overflow: hidden;
  background-color: var(--salt);
  background-image: repeating-linear-gradient(0deg, transparent 0 39px, rgba(138,154,123,.18) 39px 40px), repeating-linear-gradient(90deg, transparent 0 39px, rgba(138,154,123,.18) 39px 40px);
  display: grid; place-items: center; text-align: center; padding: 20px; }
.map-frame.is-loaded { padding: 0; }
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-frame .map-name { font-family: var(--font-heading); font-weight: 600; font-size: 26px; line-height: 1.2; margin: 0 0 4px; }
.map-frame .map-note { font-size: 15px; color: var(--ink-secondary); margin: 0 0 16px; }
.btn { display: inline-block; font-family: var(--font-body); font-size: 17px; line-height: 1.2; padding: 11px 18px; border-radius: var(--radius-button); border: 1px solid var(--cactus-deep); cursor: pointer; text-decoration: none; min-height: 44px; }
.btn-solid { background: var(--cactus-deep); color: #FDFBF8; }
.btn-solid:hover { background: #52604A; }
.btn-line { background: transparent; color: var(--cactus-deep); }
.btn-line:hover { background: rgba(138,154,123,.12); }
.btn:focus-visible { outline: 2px solid var(--cactus-deep); outline-offset: 3px; }
.map-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.map figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; }

/* ---------- Share bar ---------- */
.share { max-width: var(--measure); margin: 3em auto 0; padding: 22px 0 0; border-top: 1px solid var(--hairline); }
.share h2 { font-family: var(--font-heading); font-weight: 600; font-size: 24px; margin: 0 0 12px; }
.share ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.share a, .share button { font-size: 16px; padding: 0 14px; min-height: 44px; display: inline-flex; align-items: center; }
.share-status { font-size: 15px; color: var(--cactus-deep); margin: 10px 0 0; min-height: 1.4em; overflow-wrap: anywhere; }


.note-box { font-size: 16px; line-height: 1.6; color: var(--ink-secondary); border-top: 1px solid var(--hairline); padding-top: 14px; margin-top: 2em; }

/* ---------- Heat warning panel (Visit pages) ---------- */
.panel-warn { border-color: rgba(168,100,74,.45); background: #FCF6F2; }
.panel-warn h3 { color: var(--clay); }
.essentials { margin: 0; padding: 0; list-style: none; }
.essentials li { padding: 10px 0; border-top: 1px solid var(--hairline); font-size: 18px; line-height: 1.55; }
.essentials li:first-child { border-top: 0; padding-top: 0; }
.essentials strong { font-size: 19px; }

/* ---------- Diagrams and charts (original artwork) ---------- */
.diagram { margin: 2.4em 0; background: var(--salt); border: 1px solid var(--hairline); border-radius: var(--radius-card); padding: 22px 22px 16px; }
.diagram h3 { font-family: var(--font-heading); font-weight: 600; font-size: 24px; margin: 0 0 4px; }
.diagram .sub { font-size: 16px; color: var(--ink-secondary); margin: 0 0 14px; line-height: 1.5; }
.diagram svg { display: block; width: 100%; height: auto; }
.diagram svg text { font-family: var(--font-body); fill: var(--ink); }
.diagram svg .lbl-h { font-family: var(--font-heading); font-weight: 600; }
.diagram figcaption { font-size: 15px; margin-top: 10px; }
.diagram-wide { width: min(940px, 92vw); margin-left: calc(50% - min(470px, 46vw)); }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.bars li { display: grid; grid-template-columns: minmax(0, 12em) minmax(0, 1fr); gap: 12px; align-items: center; font-size: 16px; line-height: 1.3; }
.bars .bar { position: relative; height: 26px; background: rgba(138,154,123,.12); border-radius: 4px; }
.bars .fill { position: absolute; inset: 0 auto 0 0; background: var(--cactus-soft); border-radius: 4px; }
.bars .val { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); font-size: 15px; color: var(--ink); white-space: nowrap; }
.bars li.hl .fill { background: var(--clay); }
.bars li.hl .place { font-family: var(--font-heading); font-weight: 600; font-size: 18px; color: var(--clay); }
@media (max-width: 600px) { .bars li { grid-template-columns: minmax(0, 1fr); gap: 3px; } .diagram { padding: 18px 14px 12px; } }

/* ---------- Small figures and lightbox ---------- */
.figure-small { max-width: 460px; margin-left: auto; margin-right: auto; }
.figure-small img { mix-blend-mode: normal; border-radius: 8px; }
.zoom-link { display: block; cursor: zoom-in; border-radius: 8px; }
.zoom-link:focus-visible { outline: 2px solid var(--cactus-deep); outline-offset: 3px; }
dialog.lightbox { padding: 0; border: 0; background: transparent; max-width: 96vw; max-height: 94vh; overflow: visible; }
dialog.lightbox::backdrop { background: rgba(28, 24, 20, .86); }
dialog.lightbox img { display: block; max-width: 96vw; max-height: 88vh; width: auto; height: auto; border-radius: 6px; }
dialog.lightbox .lb-close { position: absolute; top: -48px; right: 0; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(253,251,248,.5); background: rgba(28,24,20,.6); color: #FDFBF8; font-size: 26px; line-height: 1; cursor: pointer; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 5em; background: var(--cactus-deep); color: #EEF0E8; }
.site-footer .inner { max-width: 1120px; margin: 0 auto; padding: 44px max(5vw, 20px) 36px; display: grid; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.site-footer .wordmark { color: #FDFBF8; font-size: 26px; }
.site-footer p { font-size: 16px; line-height: 1.6; margin: 8px 0 0; color: #E1E6D9; }
.site-footer h2 { font-family: var(--font-heading); font-weight: 600; font-size: 19px; margin: 0 0 8px; color: #FDFBF8; }
.site-footer ul { list-style: none; margin: 0; padding: 0; font-size: 16px; line-height: 2; }
.site-footer a { color: #F3F1EA; text-decoration-color: rgba(243,241,234,.45); }
.site-footer .legal { grid-column: 1 / -1; border-top: 1px solid rgba(243,241,234,.25); padding-top: 18px; font-size: 14px; color: #D6DECB; }

/* ---------- Narrow screens ---------- */
@media (max-width: 600px) {
  body { font-size: 19px; }
  .site-header .inner { padding-top: 16px; padding-bottom: 12px; }
  .site-nav ul { gap: 2px 12px; }
  .site-nav a { font-size: 16.5px; padding: 8px 0; }
  .crumbs { margin-top: 24px; }
  .dek { font-size: 20px; }
  .hero { margin-top: 30px; }
  .prose { margin-top: 40px; }
  .prose h2 { font-size: 29px; }
  .pull { font-size: 24px; padding-left: 18px; }
  .panel { padding: 22px 20px; }
  .facts div { grid-template-columns: minmax(0, 1fr); }
  .timeline li { grid-template-columns: minmax(0, 1fr); gap: 0; }
}

/* ---------- Small photo gallery (thumbnails open in the lightbox) ---------- */
.gallery { margin: 1.6em 0 2em; }
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.gallery-grid .zoom-link { aspect-ratio: 4 / 3; overflow: hidden; }
.gallery-grid .zoom-link img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; display: block; }
.gallery-grid .img-todo { aspect-ratio: 4 / 3; padding: 14px; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.gallery figcaption { font-size: 15px; line-height: 1.5; color: var(--ink-secondary); margin-top: 10px; }

/* ---------- Glossary ---------- */
.glossary { margin: 0 0 1.6em; }
.glossary dt { font-family: var(--font-heading); font-weight: 600; font-size: 22px; color: var(--cactus-deep); margin-top: 18px; }
.glossary dd { margin: 4px 0 0; }

/* ---------- Footer pages ---------- */
.page-updated { max-width: var(--measure); margin: 2.5em auto 0; font-size: 15px; color: var(--ink-secondary); }
.todo-inline { background: #FFF3C4; padding: 0 4px; border-radius: 3px; }
.btn-row { margin: 1.4em 0 0; text-align: center; }
.btn-row .btn { padding: 13px 26px; font-size: 18px; }
