/* ==========================================================================
   BlackHills.org · site.css
   Design: "modern museum journal", the owner's Figma redesign, adopted
   2026-11-05 (LOG #0100). It replaces Direction A, "Field notebook" (#0010).
   One stylesheet for every page. System fonts only; no external files.
   Light and dark follow the reader's system setting; the header's Dark mode
   button (assets/js/site.js) can override it with data-theme on <html>.
   Left out on the owner's call: Figma's towns map, Print button and header
   utility line. Desktop sizes: the owner's #0096 block near the end.
   Owner, 2026-11-05 (#0102): no tiny labels (0.8rem or more) and no giant
   headings (page titles about 52px, article h2 about 30px on desktop); the
   Sources list number sits in the margin so each source reads as one line.
   ========================================================================== */

:root {
  color-scheme: light;
  --paper: #f0e8d9;
  --paper-deep: #e3d8c5;
  --ink: #281f18;
  --muted: #6f6354;
  --rule: #a99b86;
  --rust: #8d2f21;
  --forest: #293128;
  --acid: #d2cf55;
  --gold: #b0842c;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
    Georgia, serif;
  --sans: Inter, "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --page: 90rem;
  --measure: 46rem;
  --gutter: clamp(1.25rem, 4vw, 4.5rem);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #22231e;
  --paper-deep: #2b2c25;
  --ink: #eee5d8;
  --muted: #b8aea0;
  --rule: #68665b;
  --rust: #d77c5f;
  --forest: #171b17;
  --acid: #d5d25d;
  --gold: #d0a74d;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #22231e;
    --paper-deep: #2b2c25;
    --ink: #eee5d8;
    --muted: #b8aea0;
    --rule: #68665b;
    --rust: #d77c5f;
    --forest: #171b17;
    --acid: #d5d25d;
    --gold: #d0a74d;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 20rem;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(color-mix(in srgb, var(--muted) 15%, transparent) 0.6px, transparent 0.6px);
  background-size: 5px 5px;
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.7;
  overflow-wrap: break-word;
}

a {
  color: inherit;
  text-decoration-color: color-mix(in srgb, currentColor 42%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--rust);
  text-decoration-color: currentColor;
}

button,
input {
  font: inherit;
}

img,
svg {
  max-width: 100%;
}

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

.skip {
  position: fixed;
  z-index: 100;
  top: -10rem;
  left: 1rem;
  padding: 0.65rem 1rem;
  color: #fff;
  background: var(--rust);
  font: 700 0.8rem var(--sans);
}

.skip:focus {
  top: 1rem;
}

/* Header */

.site-header {
  position: relative;
  z-index: 20;
  padding: 0 var(--gutter);
}

.site-header > .wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  max-width: var(--page);
  margin: 0 auto;
}

.wordmark {
  grid-column: 1 / -1;
  display: flex;
  gap: clamp(0.8rem, 2vw, 2.5rem);
  align-items: baseline;
  justify-content: center;
  min-width: 0;
  padding: 1.2rem 0 1rem;
  color: var(--ink);
  text-decoration: none;
}

.wordmark:hover {
  color: var(--ink);
}

.wordmark img {
  align-self: center;
  width: 2.2rem;
  height: 2.6rem;
}

.brand-name {
  font-size: clamp(2rem, 3.4vw, 3rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.brand-subtitle {
  font: 0.85rem/1.2 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.25em;
  white-space: nowrap;
}

.nav-full {
  min-width: 0;
  border-top: 4px double var(--ink);
}

.nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-full ul {
  display: flex;
  gap: clamp(0.7rem, 1.65vw, 1.6rem);
  align-items: center;
  min-height: 3.1rem;
  overflow-x: auto;
  font: 0.85rem/1.2 var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.045em;
  scrollbar-width: none;
}

.nav-full ul::-webkit-scrollbar {
  display: none;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.nav a:hover,
.nav a[aria-current="true"],
.nav a[aria-current="page"] {
  color: var(--rust);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.nav-connections {
  padding-left: 1rem;
  border-left: 1px solid var(--rule);
}

.nav-menu {
  position: relative;
  align-self: stretch;
  border-top: 4px double var(--ink);
  font: 0.8rem var(--mono);
  text-transform: uppercase;
}

.nav-menu summary {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  height: 100%;
  min-height: 3.1rem;
  padding: 0 1.15rem;
  border-left: 1px solid var(--rule);
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}

.nav-menu summary::-webkit-details-marker {
  display: none;
}

.nav-menu .chev {
  width: 0.8rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.nav-menu[open] .chev {
  transform: rotate(180deg);
}

.nav-menu nav {
  position: absolute;
  top: calc(100% + 1px);
  right: 0;
  width: min(35rem, 90vw);
  padding: 0.8rem;
  border: 1px solid #5f5d53;
  color: #eee6d8;
  background: #292a23;
  box-shadow: 0 1.5rem 4rem rgb(22 18 14 / 28%);
}

.nav-menu ul {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.nav-menu li {
  border-bottom: 1px solid #525249;
}

.nav-menu a {
  display: flex;
  align-items: center;
  min-height: 3.2rem;
  padding: 0.65rem 0.8rem;
  color: #eee6d8;
  font: 400 1.05rem var(--serif);
  text-transform: none;
}

.nav-menu a:hover {
  color: var(--acid);
  background: #34352c;
}

.header-actions {
  display: flex;
  gap: 1rem;
  align-self: stretch;
  border-top: 4px double var(--ink);
}

.header-actions button {
  padding: 0 0 0 1rem;
  border: 0;
  border-left: 1px solid var(--rule);
  color: var(--ink);
  background: transparent;
  font: 0.8rem var(--mono);
  text-transform: uppercase;
  cursor: pointer;
}

/* Shared page framing */

main {
  display: block;
  padding: 0 var(--gutter);
}

.page,
.index-page,
.home {
  max-width: var(--page);
  margin: 0 auto;
}

.page {
  max-width: var(--measure);
  padding: clamp(2rem, 6vw, 5rem) 0 clamp(5rem, 10vw, 9rem);
}

.breadcrumb {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: clamp(3rem, 7vw, 6rem);
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--rule);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.6rem;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font: 0.8rem/1.5 var(--mono);
  text-transform: uppercase;
  list-style: none;
}

.breadcrumb li + li::before {
  margin-right: 0.6rem;
  content: "›";
}

.kicker,
.block-title {
  margin: 0 0 1.3rem;
  font: 0.8rem/1.4 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.13em;
}

.kicker {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  color: var(--muted);
}

.kicker::before {
  width: 2rem;
  height: 2px;
  background: var(--gold);
  content: "";
}

h1 {
  max-width: 68rem;
  margin: 0 0 clamp(1.5rem, 3vw, 2.5rem);
  font-size: clamp(2.4rem, 4.5vw, 3.6rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.prose {
  font-size: clamp(1.08rem, 1rem + 0.3vw, 1.25rem);
  line-height: 1.78;
  text-wrap: pretty;
}

.prose > p:first-child {
  margin-top: 0;
  font-size: 1.12em;
  line-height: 1.55;
}

.prose > p:first-child::first-letter {
  float: left;
  margin: 0.15em 0.12em 0 0;
  color: var(--rust);
  font-size: 3.4em;
  line-height: 0.72;
}

.prose p {
  margin: 0 0 1.35em;
}

.prose h2 {
  margin: 2.3em 0 0.7em;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.015em;
  scroll-margin-top: 2rem;
  text-wrap: balance;
}

.prose h3 {
  margin: 2em 0 0.55em;
  font-size: 1.25em;
  font-weight: 400;
  line-height: 1.1;
}

.prose ul,
.prose ol {
  margin: 0 0 1.5em;
  padding-left: 1.35em;
}

.prose li {
  margin: 0.5em 0;
}

.prose blockquote {
  margin: 2.5em -7vw;
  padding: 1.2em 7vw;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  color: var(--rust);
  font-size: 1.25em;
  line-height: 1.3;
}

/* Images and planned imagery */

.figure {
  margin: 3.5rem 0;
}

.figure img,
.figure svg {
  display: block;
  width: 100%;
  height: auto;
}

/* Whole photo, never cropped (owner, #0104): as wide as the column allows, but
   no wider than the photo itself and no taller than 42rem; centered. Figma's
   rule cut tall photos to 42rem with object-fit: cover. --w and --h are the
   photo's own size, which build_dist.py copies from the img's width and height
   so the box has its final size before the photo loads (no jumping). Without
   them the photo fills the column, still uncropped. */
.figure-photo img {
  width: min(100%, calc(var(--w, 100000) * 1px), calc(42rem * var(--w, 100000) / var(--h, 1)));
  height: auto;
  margin: 0 auto;
  border: 1px solid var(--rule);
  /* full color (owner, 2026-11-10, LOG #0118); was saturate(0.82) sepia(0.04) */
}

.figure-archive img {
  filter: grayscale(1) sepia(0.12) contrast(0.96);
}

.figure-panel > img,
.figure-panel > svg {
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid var(--rule);
  background: var(--paper-deep);
}

.placeholder {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: clamp(18rem, 45vw, 34rem);
  padding: 2rem;
  overflow: hidden;
  border: 1px solid var(--rule);
  background:
    linear-gradient(135deg, transparent 48%, color-mix(in srgb, var(--rule) 40%, transparent) 49%, transparent 51%),
    radial-gradient(ellipse at center, color-mix(in srgb, var(--forest) 22%, transparent), transparent 60%),
    var(--paper-deep);
  text-align: center;
}

.placeholder::before {
  position: absolute;
  width: 34%;
  height: 65%;
  border: 1px solid var(--muted);
  border-radius: 50%;
  content: "";
  opacity: 0.35;
  transform: rotate(-15deg);
}

.placeholder-label,
.placeholder-file {
  position: relative;
}

.placeholder-label {
  padding: 0.4rem 0.7rem;
  color: #eee8dc;
  background: var(--forest);
  font: 0.8rem var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.placeholder-file {
  margin-top: 0.7rem;
  color: var(--muted);
  font: 0.8rem var(--mono);
}

.figure figcaption {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.8rem;
  color: var(--muted);
  font: 0.9rem/1.5 var(--sans);
}

.figure .credit {
  font: 0.8rem var(--mono);
}

/* Article end matter */

.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.65rem 1.5rem;
  margin: 2.5rem 0;
  padding: 1.5rem;
  border: 1px solid var(--rule);
  background: var(--paper-deep);
  font: 0.9rem/1.5 var(--sans);
}

.facts dt {
  color: var(--muted);
  font: 700 0.8rem var(--mono);
  text-transform: uppercase;
}

.facts dd {
  margin: 0;
}

.end-blocks {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  margin-top: 6rem;
}

.block {
  padding-top: 1.2rem;
  border-top: 4px double var(--rule);
}

.block-connected {
  padding: 2rem;
  border-top: 0;
  color: #eee7da;
  background: var(--forest);
}

.block-connected .block-title {
  color: var(--acid);
}

.connected-list,
.block-list,
.credits-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.connected-list li {
  display: grid;
  gap: 0.3rem;
  padding: 1rem 0;
  border-bottom: 1px solid #5d625a;
}

.connected-list li:last-child {
  border-bottom: 0;
}

.block-connected a {
  color: #fff8ec;
}

.entry-note {
  color: var(--muted);
  font: 0.92rem/1.55 var(--sans);
}

.block-connected .entry-note {
  color: #bdb9ae;
}

.sources {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font: 0.9rem/1.55 var(--sans);
  list-style: none;
  counter-reset: sources;
}

.sources li {
  padding: 0.85rem 0 0.85rem 3.2rem; /* number in the left margin; text flows as one paragraph */
  border-bottom: 1px solid var(--rule);
  counter-increment: sources;
}

.sources li::before {
  display: inline-block;
  width: 3.2rem;
  margin-left: -3.2rem;
  color: var(--muted);
  font: 0.8rem var(--mono);
  content: counter(sources, decimal-leading-zero);
}

.credits-list,
.block-list {
  display: grid;
  gap: 0.65rem;
  color: var(--muted);
  font: 0.9rem/1.5 var(--sans);
}

.last-reviewed {
  margin: 0;
  color: var(--muted);
  font: 0.8rem var(--mono);
  text-transform: uppercase;
}

/* Homepage */

.home-hero {
  display: grid;
  grid-template-columns: 1.25fr 0.5fr;
  gap: clamp(3rem, 8vw, 9rem);
  align-items: center;
  min-height: 0; /* was 44rem, sized for Figma's giant title (#0102) */
  padding: clamp(2.5rem, 5vw, 4.5rem) 2vw;
  border-bottom: 1px solid var(--rule);
}

.home-hero h1 {
  margin-bottom: 1.5rem;
  font-size: clamp(2.6rem, 5vw, 4.2rem);
}

.home-hero .lede {
  max-width: 46rem;
  margin: 0;
  font: clamp(1.1rem, 1rem + 0.25vw, 1.3rem)/1.7 var(--sans);
}

.home-emblem {
  margin: 0;
}

.home-emblem img {
  display: block;
  max-height: 34rem;
  margin: auto;
}

.home-emblem figcaption {
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font: 0.8rem/1.5 var(--mono);
}

.home-visuals {
  display: grid;
  /* Column widths follow the three photos' shapes (1800x1200, 1600x2404,
     1800x1143), so all three show whole at one height (owner, #0104).
     Change them if the photos change. */
  grid-template-columns: 1.5fr 0.666fr 1.575fr;
  align-items: start;
  gap: 0.75rem;
  padding: 0.75rem 0 0;
  border-bottom: 1px solid var(--rule);
}

.home-visual {
  margin: 0;
}

.home-visual > a {
  display: block;
  overflow: hidden;
  background: var(--paper-deep);
}

.home-visual img {
  width: 100%;
  height: auto;
  /* full color (owner, 2026-11-10, LOG #0118); was saturate(0.78) sepia(0.06) */
  transition: filter 250ms ease, transform 600ms ease;
}

.home-visual a:hover img {
  transform: scale(1.015);
}

.home-visual figcaption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0.25rem 1.2rem;
  color: var(--muted);
  font: 0.8rem/1.4 var(--mono);
  text-transform: uppercase;
}

.home-visual figcaption b {
  color: var(--ink);
  font-weight: 500;
}

.home-section {
  padding: clamp(4rem, 8vw, 8rem) 2vw;
  border-bottom: 1px solid var(--rule);
}

.home-section > .block-title {
  margin-bottom: 1rem;
}

.home-section > .lede {
  max-width: 42rem;
  margin: 0 0 2.5rem;
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  line-height: 1.25;
}

.contents {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 4vw;
  margin: 0;
  padding: 0;
  border-top: 4px double var(--ink);
  list-style: none;
  counter-reset: contents;
}

.contents li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 1rem;
  min-height: 10rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
  counter-increment: contents;
}

.contents li::before {
  color: var(--muted);
  font: 0.8rem var(--mono);
  content: counter(contents, decimal-leading-zero);
}

.entry {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.entry-title {
  font-size: clamp(1.2rem, 1.8vw, 1.6rem);
  line-height: 1;
  text-decoration: none;
}

.threads {
  margin: 0;
  padding: 0;
  border-top: 4px double var(--ink);
  list-style: none;
}

.thread {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 4vw;
  padding: 2rem 0;
  border-bottom: 1px solid var(--rule);
}

.thread-title {
  margin: 0;
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  font-weight: 400;
  line-height: 1.08;
}

.thread-title a {
  text-decoration: none;
}

.route {
  display: flex;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font: 0.8rem/1.45 var(--mono);
  list-style: none;
}

.route li {
  position: relative;
  flex: 1;
  padding: 1.4rem 0.6rem 0 0;
  border-top: 1px solid var(--rule);
}

.route li::before {
  position: absolute;
  top: -0.25rem;
  left: 0;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--rust);
  content: "";
}

.more-link {
  margin: 2rem 0 0;
  font: 0.8rem var(--mono);
  text-transform: uppercase;
}

/* Section indexes */

.index-page {
  padding: clamp(3rem, 7vw, 7rem) 2vw clamp(6rem, 10vw, 10rem);
}

.index-page > .breadcrumb {
  margin-bottom: 5rem;
}

.index-page > h1 {
  max-width: 70rem;
}

.intro {
  max-width: 58rem;
  margin-bottom: clamp(4rem, 8vw, 8rem);
  font-size: clamp(1.08rem, 1rem + 0.3vw, 1.25rem);
  line-height: 1.7;
}

.intro > p:first-child {
  font-size: 1.12em;
}

.page-list {
  margin: 0;
  padding: 0;
  border-top: 4px double var(--ink);
  list-style: none;
}

.page-list li {
  display: grid;
  grid-template-columns: minmax(14rem, 0.8fr) 1.2fr;
  gap: 4vw;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--rule);
}

.page-list .entry-title {
  font-size: clamp(1.15rem, 1.7vw, 1.5rem);
}

.groups {
  display: grid;
  gap: 5rem;
}

.group-head {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4vw;
  align-items: end;
  padding-bottom: 1rem;
  border-bottom: 4px double var(--ink);
}

.group-head h2 {
  margin: 0;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  font-weight: 400;
  line-height: 1.1;
}

.group-head p {
  margin: 0;
  color: var(--muted);
  font: 0.9rem/1.55 var(--sans);
}

/* Search */

.search-dialog {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: #eee7da;
  background: #24251f;
}

.search-dialog::backdrop {
  background: rgb(0 0 0 / 55%);
}

.search-shell {
  width: min(58rem, 88vw);
  margin: clamp(3rem, 9vh, 7rem) auto;
}

.search-topline {
  display: flex;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid #626158;
  font: 0.8rem var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.search-close {
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

#site-search {
  width: 100%;
  margin-top: 2rem;
  padding: 1rem 0;
  border: 0;
  border-bottom: 2px solid var(--acid);
  outline: 0;
  color: #fff9ee;
  background: transparent;
  font: clamp(1.6rem, 3vw, 2.4rem)/1.1 var(--serif);
  letter-spacing: -0.04em;
}

#site-search::placeholder {
  color: #77776e;
}

.search-status {
  margin: 1rem 0 2rem;
  color: #aaa89e;
  font: 0.8rem var(--mono);
}

.search-results {
  border-top: 4px double #77766c;
}

.search-results a {
  display: grid;
  grid-template-columns: 8rem 1fr 1.2fr;
  gap: 1.5rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid #55554d;
  color: #eee7da;
  text-decoration: none;
}

.search-results a > span {
  color: #aaa89e;
  font: 0.8rem var(--mono);
  text-transform: uppercase;
}

.search-results strong {
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1.1;
}

.search-results p {
  margin: 0;
  color: #aaa89e;
  font: 0.85rem/1.5 var(--sans);
}

/* Footer. The build puts the footer menu (owner, 2026-11-11) at the end of .wrap:
   on desktop the legal note and copyright line sit on the left and the menu's three
   lists beside them; on tablets and phones the menu goes below them. */

.site-footer {
  padding: 4rem var(--gutter) 6rem;
  color: #e9e1d5;
  background: #222820;
  font: 0.85rem/1.65 var(--sans);
}

.site-footer .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.6fr);
  grid-template-rows: auto 1fr;
  gap: 1.2rem 4vw;
  align-items: start;
  max-width: var(--page);
  margin: 0 auto;
}

.site-footer p {
  max-width: 46rem;
  margin: 0;
}

.site-footer a {
  color: #f0a587;
}

.site-footer a:hover {
  color: var(--acid);
}

.site-footer a:focus-visible {
  outline-color: var(--acid);
}

.footer-menu {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr) minmax(0, 1.5fr);
  gap: 2rem 3rem;
  padding-left: 2.5rem;
  border-left: 1px solid #555d53;
}

.footer-menu h2 {
  margin: 0 0 0.9rem;
  color: #aaa89e;
  font: 600 0.8rem/1.3 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-menu ul {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-menu a {
  text-decoration: none;
}

.footer-menu a:hover {
  text-decoration: underline;
}

.footer-note {
  display: block;
  margin-bottom: 0.5rem;
  color: #aaa89e;
}

.publisher {
  padding-left: 2rem;
  border-left: 1px solid #555d53;
}

@media (max-width: 70rem) {
  .site-header > .wrap {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .nav-full {
    display: none;
  }

  .nav-menu {
    grid-column: 1;
    width: max-content;
  }

  .header-actions {
    grid-column: 2;
  }

  .contents {
    column-gap: 2.5rem;
  }

  .site-footer .wrap {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
  }

  .footer-menu {
    grid-column: auto;
    grid-row: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 1rem;
    padding: 2rem 0 0;
    border-top: 1px solid #555d53;
    border-left: 0;
  }
}

@media (max-width: 48rem) {
  body {
    font-size: 1.05rem;
  }

  .site-header {
    padding: 0 1rem;
  }

  /* The subtitle gets its own line under the name, so it isn't cut off (#0100). */
  .wordmark {
    flex-wrap: wrap;
    gap: 0.45rem 0.55rem;
    justify-content: flex-start;
    overflow: hidden;
  }

  .wordmark img {
    display: none;
  }

  .brand-name {
    font-size: 2rem;
  }

  .brand-subtitle {
    flex-basis: 100%;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
  }

  .nav-menu summary {
    padding: 0 0.7rem 0 0;
    border-left: 0;
  }

  .nav-menu nav {
    position: fixed;
    top: 9.2rem; /* below the menu button, now that the subtitle has its own line */
    right: 1rem;
    left: 1rem;
    width: auto;
    max-height: 68vh;
    overflow-y: auto;
  }

  .nav-menu ul {
    grid-template-columns: 1fr;
  }

  .header-actions {
    gap: 0.55rem;
  }

  .header-actions button {
    padding-left: 0.55rem;
    font-size: 0.72rem;
  }

  main {
    padding: 0 1rem;
  }

  .breadcrumb {
    display: block;
  }

  h1 {
    font-size: clamp(2.1rem, 9vw, 2.6rem);
  }

  .prose h2 {
    font-size: 1.6rem;
  }

  .prose blockquote {
    margin-right: 0;
    margin-left: 0;
    padding-right: 0;
    padding-left: 0;
  }

  .home-hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 5rem 0;
  }

  .home-hero h1 {
    font-size: clamp(2.4rem, 11vw, 3rem);
  }

  .home-emblem {
    width: 55%;
    margin: auto;
  }

  .home-section {
    padding: 4.5rem 0;
  }

  .home-visuals {
    grid-template-columns: 0.666fr 1.575fr; /* the second row's two photo shapes */
  }

  .home-visual-primary {
    grid-column: 1 / -1;
  }

  .home-visual figcaption {
    display: block;
  }

  .home-visual figcaption span {
    display: block;
  }

  .contents,
  .thread,
  .page-list li,
  .group-head,
  .site-footer .wrap {
    grid-template-columns: 1fr;
  }

  .contents li {
    min-height: 0;
  }

  .thread {
    gap: 1.5rem;
  }

  .route {
    overflow-x: auto;
  }

  .route li {
    min-width: 8rem;
  }

  .index-page {
    padding-right: 0;
    padding-left: 0;
  }

  .search-results a {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  #site-search {
    font-size: 1.6rem;
  }

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

  .footer-menu {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.8rem;
  }

  .publisher {
    padding: 1rem 0 0;
    border-top: 1px solid #555d53;
    border-left: 0;
  }
}

/* Desktop only (wider than 1120px) -----------------------------------------
   Owner, 2026-11-03 (LOG #0096), kept for the new design on 2026-11-05 (#0100):
   on desktop every text size 10% smaller (article text 20px -> 18px) and the
   text column 846px. Font sizes are in rem, so one root size scales them all.
   The page frame keeps Figma's 1440px. Media queries use the browser's 16px,
   so this breakpoint doesn't move with the smaller root size, and it starts
   just above Figma's 70rem tablet breakpoint so the two never overlap. */
@media (min-width: 70.01rem) {
  html {
    font-size: 90%;
  }

  :root {
    --measure: 846px;
    --page: 1440px;
  }
}

@media print {
  :root {
    --paper: #fff;
    --ink: #111;
    --muted: #444;
  }

  .site-header,
  .site-footer,
  .search-dialog {
    display: none !important;
  }

  body {
    background: white;
    font-size: 11pt;
  }

  main {
    padding: 0;
  }

  .page {
    max-width: none;
    padding: 0;
  }

  .breadcrumb {
    margin-bottom: 2rem;
  }

  h1 {
    font-size: 38pt;
  }

  .prose {
    font-size: 11pt;
  }

  .prose h2 {
    break-after: avoid;
    font-size: 22pt;
  }

  .block-connected {
    color: #111;
    background: #eee;
  }

  .block-connected a,
  .block-connected .entry-note,
  .block-connected .block-title {
    color: #111;
  }

  a {
    color: #111;
  }
}

/* Graphics round (owner, 2026-11-10, LOG #0116/#0117) ------------------- */

/* Section indexes: each entry shows its page's first photo, whole (never
   cropped, #0104), in the list's second column; below it on phones. */
.page-list .entry-thumb {
  display: block;
  align-self: center;
  justify-self: start;
}

.page-list .entry-thumb img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 11rem;
  border: 1px solid var(--rule);
}

.page-list .entry-thumb img.archive {
  filter: grayscale(1) sepia(0.12) contrast(0.96);
}

/* Old maps open full size */
.figure-map a {
  display: block;
  cursor: zoom-in;
}

/* Home: three flowers from the companion field guide */
.home-flowers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.6rem, 2vw, 1.4rem);
  align-items: end;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.home-flowers figure {
  margin: 0;
}

.home-flowers img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
}

.home-flowers figcaption {
  margin-top: 0.4rem;
  color: var(--muted);
  font: 0.85rem/1.4 var(--sans);
}

/* Photos open full size in a new tab (owner, 2026-11-10, LOG #0120) */
.figure-photo a.figure-full {
  display: block;
  cursor: zoom-in;
}

/* Home: the 1875 survey's bird's-eye view under the opening (owner, 2026-11-10, LOG #0120) */
.home-map {
  margin: clamp(1.5rem, 4vw, 3rem) 0;
}

.home-map img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  cursor: zoom-in;
}

.home-map figcaption {
  margin-top: 0.6rem;
  color: var(--muted);
  font: 0.9rem/1.5 var(--sans);
}

/* Issues pages: the one marked block where the site states its position (owner, 2026-11-10, LOG #0121) */
.prose .stand {
  margin: 3rem 0 1rem;
  padding: 1.4em 1.5em 0.4em;
  border: 1px solid var(--rule);
  border-left: 4px solid var(--rust);
  background: var(--paper-deep);
}

.prose .stand h2 {
  margin: 0 0 0.8em;
  font: 600 0.8rem/1.3 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rust);
}

@media print {
  .prose .stand {
    background: none;
  }
}

/* New logo (owner, 2026-11-10, LOG #0120): satellite view with the rings of rock.
   Header mark is a small rounded square; the home emblem carries a color key. */
.wordmark img {
  width: auto;
  height: 2.9rem;
  object-fit: contain;
}

.home-emblem-satellite img {
  width: 100%;
  height: auto;
  max-height: 34rem;
  object-fit: contain;
  border: 1px solid var(--rule);
  border-radius: 4px;
  cursor: zoom-in;
}

.band-key {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.9rem;
  margin: 0.6rem 0;
  padding: 0;
  list-style: none;
}

.band-key li {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.band-key .swatch {
  display: inline-block;
  width: 0.9rem;
  height: 0.9rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
}

.home-emblem .credit {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.72rem;
}

/* Issues pages: the "who asks for what" table (LOG #0121). Rows stack on phones. */
.prose table.who-asks {
  width: 100%;
  margin: 2.5rem 0;
  border-collapse: collapse;
  font: 0.92em/1.5 var(--sans);
}

.prose table.who-asks caption {
  margin-bottom: 0.8em;
  text-align: left;
  color: var(--muted);
  font-size: 0.9em;
}

.prose table.who-asks th,
.prose table.who-asks td {
  padding: 0.75em 0.9em 0.75em 0;
  border-top: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

.prose table.who-asks thead th {
  border-top: 0;
  color: var(--muted);
  font-size: 0.8em;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.prose table.who-asks tbody th {
  width: 34%;
  font-weight: 600;
}

@media (max-width: 40rem) {
  .prose table.who-asks thead {
    position: absolute;
    left: -999em;
  }

  .prose table.who-asks tr,
  .prose table.who-asks th,
  .prose table.who-asks td {
    display: block;
    width: auto;
  }

  .prose table.who-asks tbody th {
    width: auto;
    padding-bottom: 0.1em;
  }

  .prose table.who-asks td {
    border-top: 0;
    padding-top: 0;
  }
}

/* Accent photos (owner, 2026-11-10, LOG #0129): flowers and other small nature shots sit
   beside the text as a small side picture, never as a full-width block. The whole photo
   still shows (no cropping). Full-width figures and headings start below any accent. */
.prose .figure-accent {
  float: right;
  clear: right;
  width: 12rem;
  margin: 0.4rem 0 1.2rem 1.8rem;
}

.prose .figure-accent.figure-accent-wide {
  width: 16rem;
}

.prose .figure-accent img {
  width: 100%;
  border-radius: 3px;
}

.prose .figure-accent figcaption {
  margin-top: 0.45rem;
  font-size: 0.8rem;
  line-height: 1.4;
}

.prose .figure:not(.figure-accent),
.prose h2 {
  clear: both;
}

.prose::after {
  display: block;
  clear: both;
  content: "";
}

@media (max-width: 40rem) {
  .prose .figure-accent,
  .prose .figure-accent.figure-accent-wide {
    width: 42%;
    max-width: 11rem;
    margin-left: 1rem;
  }
}

@media print {
  .prose .figure-accent {
    width: 9rem;
  }
}

/* Home (owner, 2026-11-10, LOG #0129): the 1875 survey's bird's-eye print sits in the side
   column under the satellite view, as its older twin, not as a full-width block. The three
   flowers are a row of small pictures. */
.home-hero-side {
  display: grid;
  gap: 1.75rem;
  align-self: start;
}

.home-hero .home-map {
  margin: 0;
}

.home-hero .home-map figcaption {
  margin-top: 0.6rem;
  font: 0.8rem/1.5 var(--mono);
}

.home-flowers {
  display: flex;
  flex-wrap: wrap;
  grid-template-columns: none;
  gap: 1rem 1.4rem;
  align-items: flex-end;
}

.home-flowers img {
  width: auto;
  height: 8.5rem;
  border-radius: 3px;
}

@media (max-width: 70rem) {
  .home-hero-side {
    width: 62%;
    margin: auto;
  }

  .home-hero-side .home-emblem {
    width: auto;
  }
}

@media (max-width: 40rem) {
  .home-hero-side {
    width: 82%;
  }

  .home-flowers img {
    height: 6.5rem;
  }
}

.home-hero {
  align-items: start;
}

/* ==========================================================================
   Dense layout and section menu (owner, 2026-11-11)
   build_dist.py puts class="layout-dense" on <body> for the folders in its
   DENSE_SECTIONS set (wildlife first) and adds, built from the section's own
   index page: .section-menu-side (the menu as a sidebar, desktop),
   .section-menu-compact (the same list as a closed <details> under the
   breadcrumb, tablets and phones) and .section-pager (previous / next and
   "Back to all ... pages" after the article text). Everything below is keyed
   on .layout-dense or on those classes, so other sections don't change.
   Desktop: the menu stays in view on the left; photos float right beside the
   text, whole and smaller (a click shows them larger, site.js); less space
   above and between things; end blocks in columns. Text sizes stay as #0096
   set them; the text line is as long as before (about 860px).
   ========================================================================== */

.section-menu-side {
  display: none;
}

.section-menu ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.section-menu li a {
  display: block;
  border-left: 4px solid transparent;
  color: var(--ink);
  text-decoration: none;
}

.section-menu li a:hover {
  color: var(--rust);
  text-decoration: underline;
}

.section-menu li a[aria-current="page"] {
  border-left-color: var(--rust);
  background: var(--paper);
  font-weight: 700;
}

.section-menu-title {
  margin: 0;
  line-height: 1.2;
}

.section-menu-title a {
  text-decoration: none;
}

.section-menu-title a::after {
  color: var(--rust);
  content: " ›";
}

.section-menu-title a:hover {
  text-decoration: underline;
}

.section-menu-title a[aria-current="page"] {
  color: var(--rust);
}

.section-menu-group {
  margin: 0.9rem 0 0.3rem;
  color: var(--muted);
  font: 600 0.8rem/1.3 var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section-menu-extra {
  margin: 0.8rem 0 0;
  font: 0.85rem/1.45 var(--sans);
}

.section-menu-extra a[target="_blank"]::after {
  content: " ↗";
}

/* Tablets and phones: the menu is a closed box under the breadcrumb. */
.section-menu-compact {
  margin: 0 0 2rem;
  border: 1px solid var(--rule);
  border-left: 4px solid var(--rust);
  background: var(--paper-deep);
}

.section-menu-compact > summary {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  min-height: 3rem;
  padding: 0.55rem 1rem;
  font: 600 1rem/1.3 var(--sans);
  cursor: pointer;
  list-style: none;
}

.section-menu-compact > summary::-webkit-details-marker {
  display: none;
}

.section-menu-compact > summary::after {
  flex: none;
  color: var(--rust);
  font: 0.8rem var(--mono);
  text-transform: uppercase;
  content: "Open ▾";
}

.section-menu-compact[open] > summary::after {
  content: "Close ▴";
}

.section-menu-compact nav {
  padding: 0 0.75rem 0.9rem;
}

.section-menu-compact .section-menu-title {
  padding: 0.5rem 0.75rem 0.6rem;
  font-size: 1.15rem;
}

.section-menu-compact ul {
  border-top: 1px solid var(--rule);
}

.section-menu-compact li a {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid color-mix(in srgb, var(--rule) 55%, transparent);
  font-size: 1.05rem;
  line-height: 1.35;
}

.section-menu-compact .section-menu-extra {
  padding: 0 0.75rem;
}

/* Previous / next, after the article text (all widths) */
.section-pager {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 1rem 1.5rem;
  align-items: center;
  margin: 2.5rem 0 0;
  padding: 1rem 0;
  border-top: 4px double var(--ink);
  border-bottom: 1px solid var(--rule);
  clear: both;
}

.section-pager a {
  text-decoration: none;
}

.pager-prev,
.pager-next {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.pager-next {
  align-items: flex-end;
  text-align: right;
}

.pager-dir {
  color: var(--muted);
  font: 0.8rem var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.pager-prev .pager-dir::before {
  content: "← ";
}

.pager-next .pager-dir::after {
  content: " →";
}

.pager-title {
  font-size: 1.15rem;
  line-height: 1.25;
}

a:hover .pager-title {
  text-decoration: underline;
}

.pager-all {
  padding: 0.65rem 1.1rem;
  border: 1px solid var(--ink);
  font: 600 0.95rem/1.3 var(--sans);
  text-align: center;
}

.pager-all:hover {
  color: var(--paper);
  background: var(--ink);
}

/* Breadcrumb: the section link reads as a link (all widths). */
.layout-dense .breadcrumb {
  margin-bottom: 1.25rem;
}

.layout-dense .breadcrumb a {
  color: var(--rust);
  text-decoration: underline;
  text-decoration-color: currentColor;
}

/* Section index: the page list as cards straight under the h1 (all widths;
   1, 2 or 3 across by width), the introduction's text below it. Thumbnails
   show whole (#0104), centered in a box of one height. */
.layout-dense .index-page {
  padding-top: 1.5rem;
}

.layout-dense .index-page > .breadcrumb {
  margin-bottom: 1.25rem;
}

.layout-dense .index-page .intro {
  max-width: none;
  margin-bottom: 1.5rem;
}

.layout-dense .index-page .intro h1 {
  margin-bottom: 0;
}

.layout-dense .index-page .groups {
  gap: 2.5rem;
}

.layout-dense .index-page .page-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: 1.6rem 1.5rem;
  border-top: 0;
}

.layout-dense .index-page .page-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 9rem auto;
  gap: 0.7rem;
  align-content: start;
  padding: 0 0 1rem;
}

.layout-dense .page-list .entry {
  grid-row: 2;
  gap: 0.45rem;
}

.layout-dense .page-list .entry-title {
  font-size: 1.25rem;
  line-height: 1.2;
}

.layout-dense .page-list .entry-thumb {
  display: flex;
  grid-row: 1;
  align-items: center;
  align-self: stretch;
  justify-content: center;
  justify-self: stretch;
  overflow: hidden;
  border: 1px solid var(--rule);
  background: var(--paper-deep);
}

.layout-dense .page-list .entry-thumb img {
  max-width: 100%;
  max-height: 100%;
  border: 0;
}

/* An entry without a picture: its text moves up, no empty box. */
.layout-dense .index-page .page-list li:not(:has(.entry-thumb)) {
  grid-template-rows: auto;
}

.layout-dense .page-list li:not(:has(.entry-thumb)) .entry {
  grid-row: auto;
  padding-top: 0.8rem;
  border-top: 4px double var(--rule);
}

.layout-dense .intro-more {
  max-width: none;
  margin: 2.5rem 0 0;
  padding-top: 1.75rem;
  border-top: 4px double var(--ink);
}

@media (max-width: 70rem) {
  .layout-dense .page {
    padding-top: clamp(1.25rem, 4vw, 2.5rem);
  }
}

@media (max-width: 40rem) {
  .section-pager {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .pager-all {
    grid-column: 1 / -1;
    grid-row: 1;
  }
}

/* Desktop: sidebar menu, wider article area, photos beside the text. */
@media (min-width: 70.01rem) {
  .layout-dense main {
    display: grid;
    grid-template-columns: 16rem minmax(0, 66rem);
    column-gap: 3rem;
    align-items: start;
    justify-content: center;
  }

  .layout-dense main > .page,
  .layout-dense main > .index-page {
    grid-row: 1;
    grid-column: 2;
    width: 100%;
    max-width: none;
    margin: 0;
  }

  .layout-dense .page {
    padding: 1.5rem 0 3.5rem;
  }

  .layout-dense .index-page {
    padding: 1.5rem 0 3.5rem;
  }

  .layout-dense .section-menu-compact {
    display: none;
  }

  .layout-dense .section-menu-side {
    display: block;
    position: sticky;
    top: 1rem;
    grid-row: 1;
    grid-column: 1;
    max-height: calc(100vh - 2rem);
    margin-top: 1.5rem;
    padding: 0.9rem 0.9rem 1rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--rule);
    border-top: 4px solid var(--rust);
    background: var(--paper-deep);
  }

  .section-menu-label {
    margin: 0 0 0.3rem;
    color: var(--rust);
    font: 700 0.8rem/1.3 var(--mono);
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .section-menu-side .section-menu-title {
    margin-bottom: 0.7rem;
    font-size: 1.4rem;
  }

  .section-menu-side ul {
    border-top: 1px solid var(--rule);
  }

  .section-menu-side li a {
    padding: 0.42rem 0.5rem 0.42rem 0.65rem;
    border-bottom: 1px solid color-mix(in srgb, var(--rule) 55%, transparent);
    font-size: 1.05rem;
    line-height: 1.3;
  }

  .layout-dense .kicker {
    margin-bottom: 0.6rem;
  }

  .layout-dense .page h1 {
    margin-bottom: 1.1rem;
  }

  .layout-dense .prose {
    line-height: 1.7;
  }

  /* Text lines stay about as long as before (60rem, ~860px); the article is a
     little wider, so a photo beside the text reaches into that extra space and
     the lines beside it stay comfortable (about 65 characters). */
  .layout-dense .prose > *,
  .layout-dense .intro .prose,
  .layout-dense .intro-more .prose {
    max-width: 60rem;
  }

  .layout-dense .prose > .figure-photo:not(.figure-map) {
    max-width: none;
  }

  .layout-dense .prose p {
    margin-bottom: 1em;
  }

  .layout-dense .prose h2 {
    margin: 1.4em 0 0.5em;
    clear: none; /* a heading may sit beside the photo above it: no blank gap */
  }

  .layout-dense .prose h3 {
    margin: 1.3em 0 0.4em;
  }

  .layout-dense .prose ul,
  .layout-dense .prose ol {
    margin-bottom: 1.1em;
  }

  .layout-dense .prose blockquote,
  .layout-dense .prose .stand {
    display: flow-root; /* boxes narrow beside a photo instead of running under it */
  }

  .layout-dense .prose blockquote {
    margin: 1.5em 0;
    padding: 0.9em 0;
  }

  .layout-dense .prose .figure {
    margin: 1.75rem 0;
  }

  /* Documents and small maps (figure-panel) float like photos and open larger on a
     click (owner, 2026-11-11, LOG #0152); only the big old maps (figure-map) stay full width. */
  /* Page photos: floated right, at most 42% of the article, no wider than the
     photo itself and no taller than 24rem, so portraits come out narrower and
     the whole photo always shows (#0104). --w and --h come from build_dist.py. */
  .layout-dense .prose .figure-photo:not(.figure-accent):not(.figure-map) {
    float: right;
    clear: right;
    width: min(42%, calc(var(--w, 100000) * 1px), calc(24rem * var(--w, 100000) / var(--h, 1)));
    margin: 0.35rem 0 1rem 1.75rem;
  }

  .layout-dense .prose .figure-photo:not(.figure-accent):not(.figure-map) img {
    width: 100%;
  }

  .layout-dense .prose .figure-photo figcaption {
    margin-top: 0.5rem;
  }

  .layout-dense .prose .figure-accent {
    margin: 0.35rem 0 1rem 1.75rem;
  }

  /* End blocks: Connected and Sources in columns, small blocks side by side. */
  .layout-dense .end-blocks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem 2.5rem;
    margin-top: 2.5rem;
  }

  .layout-dense .end-blocks > * {
    grid-column: 1 / -1;
  }

  .layout-dense .end-blocks > .block:not(.block-connected):not(:has(.sources)) {
    grid-column: auto;
  }

  .layout-dense .block-connected {
    padding: 1.25rem 1.5rem 0.75rem;
  }

  .layout-dense .connected-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 2rem;
  }

  .layout-dense .connected-list li,
  .layout-dense .connected-list li:last-child {
    align-content: start;
    padding: 0.7rem 0;
    border-bottom: 1px solid #5d625a;
  }

  .layout-dense .sources {
    display: block;
    columns: 2;
    column-gap: 2.5rem;
  }

  .layout-dense .sources li {
    padding: 0.55rem 0 0.55rem 2.6rem;
    break-inside: avoid;
  }

  .layout-dense .sources li::before {
    width: 2.6rem;
    margin-left: -2.6rem;
  }
}

/* Photo viewer (site.js, all sections): a page photo opens larger over the page.
   Without JavaScript the photo link opens the file in a new tab, as before (#0120). */
html.lightbox-open {
  overflow: hidden;
}

.lightbox {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: auto;
  border: 0;
  color: #eee7da;
  background: rgb(18 17 14 / 97%);
}

.lightbox::backdrop {
  background: rgb(0 0 0 / 50%);
}

.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close {
  position: fixed;
  z-index: 1;
  top: 0.9rem;
  right: 0.9rem;
  min-height: 2.9rem;
  padding: 0.55rem 1.1rem;
  border: 2px solid #eee7da;
  border-radius: 4px;
  color: #fff;
  background: rgb(36 37 31 / 88%);
  font: 600 1.05rem/1 var(--sans);
  cursor: pointer;
}

.lightbox-close:hover {
  color: #1d1d18;
  background: var(--acid);
  border-color: var(--acid);
}

.lightbox-close:focus-visible {
  outline-color: var(--acid);
}

.lightbox-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  padding: 4.25rem 1rem 1.25rem;
}

/* Fitted to the window (never cropped, #0104), no larger than the photo itself.
   site.js sets --w and --h from the page photo's width and height. */
.lightbox-img {
  display: block;
  width: min(calc(100vw - 2rem), calc(var(--w, 1600) * 1px), calc((100vh - 10rem) * var(--w, 3) / var(--h, 2)));
  height: auto;
  background: #2b2c25;
  cursor: zoom-out;
}

@supports (height: 100dvh) {
  .lightbox-img {
    width: min(calc(100vw - 2rem), calc(var(--w, 1600) * 1px), calc((100dvh - 10rem) * var(--w, 3) / var(--h, 2)));
  }
}

.lightbox-caption {
  max-width: 60rem;
  margin-top: 0.8rem;
  color: #ddd5c8;
  font: 0.95rem/1.5 var(--sans);
  text-align: center;
}

.lightbox-caption span {
  display: block;
}

.lightbox-caption .credit {
  margin-top: 0.2rem;
  color: #b3ab9e;
  font: 0.8rem var(--mono);
}

.lightbox a {
  color: #f0a587;
}

.lightbox-more {
  margin: 0.6rem 0 0;
  font: 0.8rem var(--mono);
  text-transform: uppercase;
}

@media print {
  .section-menu-side,
  .section-menu-compact,
  .section-pager,
  .lightbox {
    display: none !important;
  }
}

/* A page whose text opens with a photo keeps its lead paragraph and drop capital
   (two Land and Water pages, LOG #0154). Same declarations as .prose > p:first-child. */
.prose > .figure:first-child + p {
  margin-top: 0;
  font-size: 1.12em;
  line-height: 1.55;
}

.prose > .figure:first-child + p::first-letter {
  float: left;
  margin: 0.15em 0.12em 0 0;
  color: var(--rust);
  font-size: 3.4em;
  line-height: 0.72;
}
