/* ============================================================================
   quad/quad.css — THE QUADRANGLE design system
   The site as a survey sheet. Palette and graphic system lifted from the USGS
   quad itself (tater-heap-topo.jpg): printed sheet, contour sepia, hydrology
   blue, vegetation wash, section-line red as the datum accent. Shared by
   index.html, modular/, rebuild/, collections/ and systems/. Page CSS holds layout deltas only.

   This sheet REPLACES kit/tokens.css as the site's token contract (Ben's call,
   2026-07-05 — the parchment-editorial skin read too close to the poetry work).
   The kit's JS mechanics live on; a small block below aliases the token names
   specimens/specimen.css expects.
   ========================================================================== */

:root {
  /* ── the sheet ── */
  --sheet:      #F8F5EA;
  --sheet-2:    #F1EDDC;
  --ink:        #241A10;
  --ink-soft:   rgba(36, 26, 16, 0.70);
  --ink-faint:  rgba(36, 26, 16, 0.48);
  --rule:       rgba(36, 26, 16, 0.24);

  /* ── the map's own layer colors ── */
  --contour:    #A05A2C;            /* contour sepia                          */
  --hydro:      #26637F;            /* hydrology blue — links                 */
  --hydro-wash: #E6EDF1;
  --veg-wash:   #EAF0DB;
  --datum:      #C0311C;            /* section-line red — grids, ticks, nos.  */

  /* ── type ── */
  --landform: "Source Serif 4", Georgia, serif;          /* letterspaced caps only */
  --label:    "Barlow Condensed", "Arial Narrow", sans-serif;
  --body:     "Barlow", "Helvetica Neue", Arial, sans-serif;
  --mono:     "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --measure: 1160px;
  --gutter: max(5vw, 22px);
  --frame: 12px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* ── kit-compat aliases (specimens/specimen.css reads these) ── */
  --paper-2: var(--sheet-2);
  --accent: var(--datum);
  --radius-sm: 0; --radius-md: 0;
  --sp-2: 8px; --sp-3: 12px;
  --dur: 0.3s; --dur-fast: 0.18s;
  --shadow-sm: none;
}

/* ── the sheet at night — a class for a band, or data-sheet="night" on <html>
     for a whole page (systems/). Same components, night inks. ── */
.night,
[data-sheet="night"] {
  --sheet:      #10120C;
  --sheet-2:    #181A12;
  --ink:        #E9E4D0;
  --ink-soft:   rgba(233, 228, 208, 0.74);
  --ink-faint:  rgba(233, 228, 208, 0.50);
  --rule:       rgba(233, 228, 208, 0.20);
  --contour:    #A3BE7E;            /* low phosphor                            */
  --hydro:      #8FB8CE;
  --datum:      #F5A623;            /* the hot note after dark                 */
  --veg-wash:   #181A12;
  --hydro-wash: #181A12;
  background: var(--sheet);
  color: var(--ink);
}

/* ── base ── */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--sheet); color: var(--ink);
  font-family: var(--body); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--hydro); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--datum); outline-offset: 3px; }
p { margin: 0 0 16px; max-width: 62ch; }
img { max-width: 100%; }

.inner { max-width: var(--measure); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: fixed; top: 16px; left: 16px; z-index: 300;
  padding: 8px 14px; background: var(--ink); color: var(--sheet);
  font-family: var(--label); text-transform: uppercase; letter-spacing: 0.1em;
  font-size: 14px; transform: translateY(-300%);
  transition: transform 0.18s var(--ease);
}
.skip-link:focus { transform: none; }

/* ── the neatline: the fixed sheet frame ── */
.neatline {
  position: fixed; inset: var(--frame); z-index: 200; pointer-events: none;
  border: 1px solid var(--ink);
}
.neatline::before, .neatline::after {
  content: ""; position: absolute; width: 14px; height: 14px;
  border: 0 solid var(--ink);
}
.neatline::before { top: -1px; left: -1px; border-top-width: 3px; border-left-width: 3px; }
.neatline::after  { bottom: -1px; right: -1px; border-bottom-width: 3px; border-right-width: 3px; }

/* ── margin instruments (decorative; hidden from AT and small screens) ── */
.elev {
  position: fixed; right: calc(var(--frame) + 10px); top: 50%; z-index: 210;
  transform: translateY(-50%);
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em;
  color: var(--ink-soft); text-align: right; line-height: 1.5;
  background: var(--sheet); padding: 6px 8px; border: 1px solid var(--rule);
}
.elev b { display: block; font-weight: 500; color: var(--datum); font-size: 14px; }

.scalebar {
  position: fixed; left: calc(var(--frame) + 14px); bottom: calc(var(--frame) + 10px);
  z-index: 210; width: 150px;
  font-family: var(--mono); font-size: 10px; color: var(--ink-soft);
  background: var(--sheet); padding: 5px 7px; border: 1px solid var(--rule);
}
.scalebar .track {
  height: 5px; margin-top: 3px; border: 1px solid var(--ink);
  background: repeating-linear-gradient(90deg, transparent 0 24%, var(--rule) 24% 25%);
  position: relative;
}
.scalebar .fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--datum); }
@media (max-width: 900px) { .elev, .scalebar { display: none; } }

/* ── title block (nav) ── */
.titleblock {
  position: sticky; top: 0; z-index: 100;
  background: var(--sheet);
  border-bottom: 3px double var(--ink);
  padding: 10px var(--gutter) 8px;
  display: flex; align-items: baseline; gap: 22px; flex-wrap: wrap;
}
.titleblock .quad {
  font-family: var(--label); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.18em; font-size: 16px; color: var(--ink); margin-right: auto;
}
.titleblock .quad small {
  display: block; font-weight: 500; letter-spacing: 0.22em; font-size: 10.5px;
  color: var(--ink-soft);
}
.titleblock a:not(.quad) {
  font-family: var(--label); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.14em; font-size: 13.5px; color: var(--ink-soft);
}
.titleblock a:not(.quad):hover { color: var(--datum); text-decoration: none; }

/* ── section machinery ── */
section { padding: clamp(48px, 9vh, 110px) 0; position: relative; }
/* the title block is sticky, so an anchored section must stop clear of it */
section[id] { scroll-margin-top: calc(var(--nav-h, 58px) + 18px); }
.sechead { display: flex; align-items: baseline; gap: 14px; margin-bottom: clamp(22px, 4vh, 44px); }
.sechead .no { font-family: var(--mono); font-size: 13px; color: var(--datum); }
.sechead h1, .sechead h2 {
  font-family: var(--label); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0;
}
.sechead::after { content: ""; flex: 1; height: 1px; background: var(--ink); align-self: center; }

/* landform caps — the map's own "W E S T" register */
.landform {
  font-family: var(--landform); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.42em; text-indent: 0.42em;
}

.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.7s ease, transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

.btn {
  display: inline-block;
  font-family: var(--label); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.12em; font-size: 14px;
  border: 1px solid var(--ink); color: var(--ink); background: var(--sheet);
  padding: 10px 20px; cursor: pointer;
}
.btn--solid { background: var(--ink); color: var(--sheet); }
.btn:hover { border-color: var(--datum); color: var(--datum); text-decoration: none; }
.btn--solid:hover { background: var(--datum); border-color: var(--datum); color: var(--sheet); }

.placeholder {
  font-family: var(--mono); font-size: 0.92rem; color: var(--ink-faint);
  border: 1px dashed var(--rule); padding: 3px 10px; white-space: nowrap;
}

/* ── legend rows (services; symbol = a map-legend line sample) ── */
.legend-band { background: var(--veg-wash); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.legend-row {
  display: grid; grid-template-columns: 110px minmax(200px, 0.9fr) 2fr;
  gap: 20px; align-items: baseline;
  padding: 20px 0; border-top: 1px solid var(--rule);
}
.legend-row:last-of-type { border-bottom: 1px solid var(--rule); }
.legend-row .sym { position: relative; top: -0.35em; height: 0; }
.legend-row .sym i { display: block; }
.sym--solid i  { border-top: 3px solid var(--contour); }
.sym--dashed i { border-top: 3px dashed var(--contour); }
.sym--double i { border-top: 1px solid var(--contour); border-bottom: 1px solid var(--contour); height: 5px; }
.sym--dotted i { border-top: 3px dotted var(--contour); }
.legend-row h3 {
  font-family: var(--label); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; font-size: 1.1rem; margin: 0;
}
.legend-row p { margin: 0; font-size: 1rem; color: var(--ink-soft); }
@media (max-width: 820px) {
  .legend-row { grid-template-columns: 64px 1fr; }
  .legend-row p { grid-column: 2; }
}

/* ── survey plates (the work) ── */
.layers { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 34px; }
.layers .lab {
  font-family: var(--label); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.14em; font-size: 12.5px; color: var(--ink-faint);
  align-self: center; margin-right: 4px;
}
.layer-btn {
  font-family: var(--label); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.1em; font-size: 13px;
  border: 1px solid var(--rule); border-radius: 999px;
  background: var(--sheet); color: var(--ink-soft);
  padding: 7px 17px; cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.layer-btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--sheet); }
.layer-btn:hover { border-color: var(--datum); color: var(--datum); }
.layer-btn[aria-pressed="true"]:hover { color: var(--sheet); }
@media (prefers-reduced-motion: reduce) { .layer-btn { transition: none; } }

.group { margin-bottom: clamp(36px, 6vh, 64px); }
.group[hidden] { display: none; }
.group > h3 {
  font-size: clamp(1.15rem, 2.4vw, 1.5rem); font-weight: 600; margin: 0 0 26px;
  display: flex; align-items: center; gap: 18px; color: var(--ink-soft);
}
/* the trailing line is a contour, not a ruler — one gentle period every 64px.
   (Sepia is baked into the data URI; this band is day-sheet only.) */
.group > h3::after {
  content: ""; flex: 1; height: 12px; opacity: 0.7;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='12' viewBox='0 0 64 12'%3E%3Cpath d='M0 6 Q16 1 32 6 T64 6' fill='none' stroke='%23A05A2C' stroke-width='1.2'/%3E%3C/svg%3E") repeat-x center / 64px 12px;
}

/* The plates hang on the sheet rather than sitting in boxes: no card border,
   no instrument header — the image leads, the words follow under it. The middle
   column drops a little so a row reads as a scatter, not a table. */
.plates {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(30px, 4vw, 52px) clamp(22px, 2.6vw, 34px); align-items: start;
}
@media (min-width: 981px) {
  /* the middle column of every row drops, so each row reads as a scatter */
  .plates > .plate:nth-child(3n + 2) { margin-top: clamp(22px, 4.4vw, 58px); }
}
@media (max-width: 980px) { .plates { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .plates { grid-template-columns: 1fr; } }

.plate { border: 0; background: none; display: flex; flex-direction: column; gap: 14px; }
.plate__shot {
  position: relative; aspect-ratio: 16 / 10; background: var(--sheet-2);
  overflow: hidden; border-radius: 20px;
  box-shadow: 0 10px 30px rgba(36, 26, 16, 0.13);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.plate:hover .plate__shot, .plate:focus-within .plate__shot {
  transform: translateY(-6px); box-shadow: 0 24px 48px rgba(36, 26, 16, 0.2);
}
@media (prefers-reduced-motion: reduce) {
  .plate__shot { transition: none; }
  .plate:hover .plate__shot, .plate:focus-within .plate__shot { transform: none; }
}
.plate__shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* a plate still waiting on its photograph — dashed, unshadowed, honest */
.plate__shot--empty {
  display: grid; place-items: center; text-align: center; padding: 14px;
  box-shadow: none; border: 1px dashed var(--rule); background: var(--sheet-2);
}
.plate:hover .plate__shot--empty, .plate:focus-within .plate__shot--empty {
  transform: none; box-shadow: none;
}
.fid {
  position: absolute; inset: 8px; pointer-events: none;
  background:
    linear-gradient(var(--ink) 0 0) left top    / 12px 1px,
    linear-gradient(var(--ink) 0 0) left top    / 1px 12px,
    linear-gradient(var(--ink) 0 0) right top   / 12px 1px,
    linear-gradient(var(--ink) 0 0) right top   / 1px 12px,
    linear-gradient(var(--ink) 0 0) left bottom / 12px 1px,
    linear-gradient(var(--ink) 0 0) left bottom / 1px 12px,
    linear-gradient(var(--ink) 0 0) right bottom/ 12px 1px,
    linear-gradient(var(--ink) 0 0) right bottom/ 1px 12px;
  background-repeat: no-repeat;
}
.cross {
  position: absolute; left: 50%; top: 50%; width: 18px; height: 18px;
  transform: translate(-50%, -50%); pointer-events: none; opacity: 0.65;
  background:
    linear-gradient(var(--datum) 0 0) center / 100% 1px,
    linear-gradient(var(--datum) 0 0) center / 1px 100%;
  background-repeat: no-repeat;
}
.pending {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-soft);
}
.plate__shot .pending { transform: translateY(26px); }
.plate__body { padding: 0 2px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.plate__body h3 { font-family: var(--label); font-weight: 600; font-size: 1.24rem; letter-spacing: 0.02em; margin: 0; }
.plate__body h3 a { color: var(--ink); }
.plate__body h3 a:hover { color: var(--datum); text-decoration: none; }
.plate__body p { margin: 0; font-size: 0.98rem; color: var(--ink-soft); }
.plate__body .credit { font-size: 0.88rem; color: var(--ink-faint); }
/* one quiet line, not a data block — place · domain */
.plate__meta {
  margin-top: auto; padding-top: 9px;
  font-size: 0.88rem; color: var(--ink-faint);
}
.plate__meta a { color: var(--hydro); }
.plate__meta .sep { margin: 0 7px; opacity: 0.5; }

/* ── the shot slider — more than one view of a site ──────────────────────
   A scroll-snap track inside the plate's frame. It works with no JS at all
   (the track just scrolls); quad.js adds the arrows' behaviour and lights the
   dots, and marks .is-single when there is only one shot, which hides the
   chrome. Adding a second <img> is all it takes to turn a plate into a slider. */
.shots__track {
  display: flex; height: 100%;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none; -ms-overflow-style: none;
}
.shots__track::-webkit-scrollbar { display: none; }
.shots__track > img {
  flex: 0 0 100%; width: 100%; height: 100%;
  object-fit: cover; display: block; scroll-snap-align: center;
}
.shots__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  border: 0; padding: 0; line-height: 1;
  background: rgba(248, 245, 234, 0.86); color: var(--ink);
  font-family: var(--body); font-size: 17px;
  box-shadow: 0 2px 10px rgba(36, 26, 16, 0.22);
  /* legible at rest — a touch visitor has no hover to reveal them */
  opacity: 0.6; transition: opacity 0.25s var(--ease), background 0.2s var(--ease);
}
.shots__nav--prev { left: 10px; }
.shots__nav--next { right: 10px; }
[data-shots]:hover .shots__nav, [data-shots]:focus-within .shots__nav { opacity: 1; }
.shots__nav:hover { background: var(--sheet); color: var(--datum); }
.shots__nav:focus-visible { opacity: 1; }
.shots__dots {
  position: absolute; left: 50%; bottom: 11px; transform: translateX(-50%);
  display: flex; gap: 6px; pointer-events: none;
}
.shots__dots i {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(248, 245, 234, 0.6);
  box-shadow: 0 1px 3px rgba(36, 26, 16, 0.4);
  transition: background 0.25s var(--ease);
}
.shots__dots i.on { background: var(--sheet); }
[data-shots].is-single .shots__nav, [data-shots].is-single .shots__dots { display: none; }
@media (prefers-reduced-motion: reduce) {
  .shots__nav, .shots__dots i { transition: none; }
  .shots__nav { opacity: 1; }
}

/* a live specimen inside a plate: the frame chrome comes from the plate */
.plate .specimen { border: 0; box-shadow: none; background: transparent; }
.plate .specimen .specimen__stage { background: var(--sheet-2); }

/* ── stations (the instruments) ── */
.station {
  display: grid; grid-template-columns: 190px 1fr; gap: 18px;
  padding: 18px 0; border-top: 1px solid var(--rule); align-items: baseline;
}
.station:last-of-type { border-bottom: 1px solid var(--rule); }
.station .id { font-family: var(--mono); font-size: 12.5px; color: var(--contour); letter-spacing: 0.06em; }
.station .id .tri { display: inline-block; margin-right: 8px; }
.station--hot .id { color: var(--datum); }
.station p { margin: 0; color: var(--ink-soft); font-size: 1.02rem; }
@media (max-width: 700px) { .station { grid-template-columns: 1fr; gap: 6px; } }

/* ── instrument panel (systems/ charts and frames) ── */
.panel { border: 1px solid var(--rule); background: var(--sheet-2); padding: clamp(14px, 2.5vw, 22px); }
.panel__head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 14px; flex-wrap: wrap;
  border-bottom: 1px solid var(--rule); padding-bottom: 10px; margin-bottom: 12px;
}
.panel__head .k { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; color: var(--datum); }
.panel__foot {
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  border-top: 1px solid var(--rule); padding-top: 9px; margin-top: 12px;
  font-family: var(--mono); font-size: 11px; color: var(--ink-soft);
}
.panel .axis { font-family: var(--label); font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; font-size: 11.5px; color: var(--ink-soft); margin: 10px 2px 2px; }
.provenance { font-family: var(--mono); font-size: 11.5px; color: var(--ink-soft); margin-top: 10px; }

/* ── note box + numbered specs (method / asides) ── */
.notebox {
  border: 2px solid var(--ink); padding: clamp(20px, 4vw, 36px);
  margin: 30px 0 40px; max-width: 760px; background: var(--sheet);
}
.notebox .k { font-family: var(--mono); font-size: 12px; color: var(--datum); display: block; margin-bottom: 10px; }
.notebox blockquote {
  margin: 0; font-family: var(--landform); font-weight: 600;
  font-size: clamp(1.4rem, 3.2vw, 2rem); line-height: 1.3; letter-spacing: 0.01em;
}
.notebox p { margin: 0; font-size: 1.02rem; }

.spec {
  display: grid; grid-template-columns: 46px minmax(170px, 0.7fr) 2fr;
  gap: 16px; padding: 16px 0; border-top: 1px solid var(--rule); align-items: baseline;
}
.spec:last-of-type { border-bottom: 1px solid var(--rule); }
.spec .n { font-family: var(--mono); font-size: 13px; color: var(--datum); }
.spec h3 { font-family: var(--label); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; font-size: 1.05rem; margin: 0; }
.spec p { margin: 0; font-size: 1rem; color: var(--ink-soft); }
@media (max-width: 700px) { .spec { grid-template-columns: 46px 1fr; } .spec p { grid-column: 2; } }

/* ── contact band (down at the creek) ── */
.contact { background: var(--hydro-wash); border-top: 1px solid var(--hydro); }
.contact .sechead .no { color: var(--hydro); }
.contact .sechead::after { background: var(--hydro); }

footer { padding: 36px 0 56px; border-top: 3px double var(--ink); }
footer .inner { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: baseline; }
footer p { margin: 0; font-family: var(--label); font-size: 0.95rem; letter-spacing: 0.03em; color: var(--ink-soft); }
