/* AntJanus — Cartographic sheet system.
   Map conventions used as the design grammar: brown contours for relief,
   blue for water and links, green for vegetation fills, red for the route,
   black for cultural features (text). Every page is one sheet in a series. */

:root {
  /* primitives — day chart */
  --paper-100: #faf7ef;
  --paper-200: #f2ede0;
  --paper-300: #e8e0cc;
  --paper-400: #d8ccb0;
  --ink-900: #1c1d1a;
  --ink-600: #4b4940;
  --brown-500: #a0703f;
  --brown-700: #7a4b1f;
  --blue-700: #1f5a85;
  --blue-200: #cfe0ea;
  --slate-700: #364f6a;
  --green-700: #3d6a2c;
  --green-100: #dfe6c9;
  --red-700: #b0341f;
  --tint-1: #e4e9d1;
  --tint-2: #dce3be;
  --tint-3: #e8dbb3;
  --tint-4: #efe3c6;
  --tint-5: #f9f3e6;
  --night-900: #111821;

  /* semantic */
  --bg: var(--paper-200);
  --bg-collar: var(--paper-300);
  --surface: var(--paper-100);
  --text: var(--ink-900);
  --text-muted: var(--ink-600);
  --rule: var(--paper-400);
  --neatline: var(--ink-900);
  --contour: var(--brown-500);
  --contour-index: var(--brown-700);
  --label: var(--brown-700);
  --link: var(--blue-700);
  --water: var(--blue-700);
  --water-fill: var(--blue-200);
  --survey: var(--slate-700);
  --veg: var(--green-700);
  --veg-fill: var(--green-100);
  --route: var(--red-700);
  --code-bg: var(--night-900);
  --code-text: #e6e1d3;
  --focus: var(--red-700);
  --shadow: 0 1px 0 rgba(60, 40, 10, .08), 0 8px 24px -12px rgba(60, 40, 10, .25);
  --photo-filter: sepia(.28) saturate(.85) contrast(1.02);

  --font-text: "Newsreader", "Iowan Old Style", Georgia, serif;
  --font-label: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --measure: 42rem;
  --page: 84rem;
  --gutter: clamp(1rem, 3vw, 2.5rem);
  --radius: 3px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e161d;
    --bg-collar: #0a1117;
    --surface: #152029;
    --text: #ece6d6;
    --text-muted: #b1b8b3;
    --rule: #2b3a45;
    --neatline: #c8bfa8;
    --contour: #6f5538;
    --contour-index: #c18b55;
    --label: #dcaa72;
    --link: #8cc4ea;
    --water: #6fb0dd;
    --water-fill: #12314a;
    --survey: #a5bfdc;
    --veg: #a6cb8c;
    --veg-fill: #1a2a22;
    --route: #ff8f73;
    --code-bg: #070b0f;
    --focus: #ffb199;
    --tint-1: #111c1d;
    --tint-2: #15231f;
    --tint-3: #1b2a26;
    --tint-4: #22322d;
    --tint-5: #2c3c35;
    --shadow: 0 1px 0 rgba(0, 0, 0, .4), 0 10px 28px -14px rgba(0, 0, 0, .8);
    --photo-filter: sepia(.2) saturate(.8) brightness(.9);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0e161d;
  --bg-collar: #0a1117;
  --surface: #152029;
  --text: #ece6d6;
  --text-muted: #b1b8b3;
  --rule: #2b3a45;
  --neatline: #c8bfa8;
  --contour: #6f5538;
  --contour-index: #c18b55;
  --label: #dcaa72;
  --link: #8cc4ea;
  --water: #6fb0dd;
  --water-fill: #12314a;
  --survey: #a5bfdc;
  --veg: #a6cb8c;
  --veg-fill: #1a2a22;
  --route: #ff8f73;
  --code-bg: #070b0f;
  --focus: #ffb199;
  --tint-1: #111c1d;
  --tint-2: #15231f;
  --tint-3: #1b2a26;
  --tint-4: #22322d;
  --tint-5: #2c3c35;
  --shadow: 0 1px 0 rgba(0, 0, 0, .4), 0 10px 28px -14px rgba(0, 0, 0, .8);
  --photo-filter: sepia(.2) saturate(.8) brightness(.9);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 1.125rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3, h4 { font-family: var(--font-text); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 50; background: var(--text); color: var(--bg); padding: .6rem 1rem; font-family: var(--font-label); font-size: 1.05rem; }
.skip:focus { top: 1rem; }

/* map lettering: tracked condensed caps */
.label, .eyebrow {
  font-family: var(--font-label);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .9375rem;
  color: var(--label);
}
.mono { font-family: var(--font-mono); font-size: .875rem; letter-spacing: 0; }
.muted { color: var(--text-muted); }
.water-label { font-style: italic; color: var(--water); }

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

/* ---------- collar (header) ---------- */
.collar { background: var(--bg-collar); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 30; }
.collar-bar { display: flex; align-items: center; gap: 1.25rem; min-height: 4.25rem; }
.mark { display: inline-flex; align-items: center; gap: .7rem; color: var(--text); text-decoration: none; margin-right: auto; }
.mark svg { width: 38px; height: 38px; flex: none; }
.mark-words { display: flex; flex-direction: column; line-height: 1.05; }
.mark-name { font-family: var(--font-label); font-weight: 700; font-size: 1.35rem; letter-spacing: .2em; text-transform: uppercase; }
.mark-sub { font-family: var(--font-label); font-size: .875rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; }
.primary-nav a {
  display: flex; align-items: baseline; gap: .4rem; padding: .7rem .7rem; min-height: 44px;
  font-family: var(--font-label); font-weight: 600; font-size: 1.1rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text); text-decoration: none; border-bottom: 2px solid transparent;
}
.primary-nav a .ref { font-family: var(--font-mono); font-size: .8125rem; letter-spacing: 0; color: var(--label); font-weight: 500; }
.primary-nav a:hover { border-bottom-color: var(--contour); }
.primary-nav a[aria-current="page"] { border-bottom: 2px dashed var(--route); }
.primary-nav a[aria-current="page"] .ref::before { content: "● "; color: var(--route); }
.icon-btn {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; min-width: 44px; padding: .4rem .8rem;
  background: transparent; color: var(--text); border: 1px solid var(--rule); border-radius: 999px;
  font-family: var(--font-label); font-size: 1rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; cursor: pointer;
}
.icon-btn:hover { border-color: var(--contour-index); }
.icon-btn svg { width: 18px; height: 18px; }
.menu-btn { display: none; }
.coord-strip {
  display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; justify-content: space-between;
  border-top: 1px solid var(--rule); padding-block: .3rem; font-family: var(--font-mono); font-size: .8125rem; color: var(--text-muted);
}

@media (max-width: 1020px) {
  .primary-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--bg-collar); border-bottom: 1px solid var(--rule); }
  .primary-nav.open { display: block; }
  .primary-nav ul { flex-direction: column; padding: .5rem var(--gutter) 1rem; }
  .primary-nav a { font-size: 1.25rem; justify-content: space-between; border-bottom: 1px solid var(--rule); }
  .menu-btn { display: inline-flex; }
  .theme-text { display: none; }
  .coord-strip .hide-sm { display: none; }
}

/* ---------- sheet frame (neatline + graticule ticks) ---------- */
.sheet { position: relative; margin: clamp(1rem, 3vw, 2.25rem) auto; max-width: var(--page); padding: 0 var(--gutter); }
.frame {
  position: relative;
  border: 1.5px solid var(--neatline);
  outline: 1px solid var(--neatline);
  outline-offset: 5px;
  background:
    repeating-linear-gradient(90deg, var(--neatline) 0 1px, transparent 1px 80px) top left / 100% 7px no-repeat,
    repeating-linear-gradient(90deg, var(--neatline) 0 1px, transparent 1px 80px) bottom left / 100% 7px no-repeat,
    repeating-linear-gradient(0deg, var(--neatline) 0 1px, transparent 1px 80px) top left / 7px 100% no-repeat,
    repeating-linear-gradient(0deg, var(--neatline) 0 1px, transparent 1px 80px) top right / 7px 100% no-repeat,
    var(--surface);
  padding: clamp(1.25rem, 3.5vw, 3rem);
}
.corner { position: absolute; font-family: var(--font-mono); font-size: .8125rem; color: var(--text-muted); background: var(--bg); padding: 0 .4rem; line-height: 1; }
.corner.tl { top: -1.35rem; left: 0; }
.corner.tr { top: -1.35rem; right: 0; }
.corner.bl { bottom: -1.35rem; left: 0; }
.corner.br { bottom: -1.35rem; right: 0; }

/* ---------- title block (page header) ---------- */
.title-block { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.title-block h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 500; letter-spacing: -.025em; margin: .6rem 0 1rem; }
.title-block .lede { font-size: clamp(1.2rem, 2vw, 1.4rem); line-height: 1.5; color: var(--text-muted); max-width: 38rem; }
.sheet-no { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.sheet-no .pill { border: 1px solid var(--contour-index); color: var(--label); padding: .1rem .55rem; border-radius: 999px; }
@media (max-width: 820px) { .title-block { grid-template-columns: 1fr; } }

/* locator inset */
.locator { margin: 0; }
.locator .inset-frame { border: 1px solid var(--neatline); background: var(--tint-1); padding: 0; position: relative; }
.locator svg { width: 100%; height: auto; display: block; }
.locator figcaption { display: flex; justify-content: space-between; gap: 1rem; margin-top: .5rem; font-family: var(--font-label); font-size: .9375rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }

/* terrain svg classes */
.terrain .h1 { fill: var(--tint-1); }
.terrain .h2 { fill: var(--tint-2); }
.terrain .h3 { fill: var(--tint-3); }
.terrain .h4 { fill: var(--tint-4); }
.terrain .h5 { fill: var(--tint-5); }
.terrain .base { fill: var(--tint-1); }
.terrain .c { fill: none; stroke: var(--contour); stroke-width: .9; opacity: .8; }
.terrain .ci { fill: none; stroke: var(--contour-index); stroke-width: 1.9; }
.terrain .grid line { stroke: var(--survey); stroke-width: .8; opacity: .35; }
.terrain .grid text { fill: var(--survey); font-family: var(--font-mono); font-size: 15px; }
.terrain .river { fill: none; stroke: var(--water); stroke-width: 4; stroke-linecap: round; opacity: .85; }
.terrain .river-thin { fill: none; stroke: var(--water); stroke-width: 2; stroke-linecap: round; opacity: .85; }
.terrain .lake { fill: var(--water-fill); stroke: var(--water); stroke-width: 1.5; }
.terrain .trail { fill: none; stroke: var(--route); stroke-width: 3; stroke-dasharray: 10 7; stroke-linecap: round; }
.terrain .elev { fill: var(--contour-index); font-family: var(--font-mono); font-size: 14px; }
.terrain .water-text { fill: var(--water); font-family: var(--font-text); font-style: italic; font-size: 22px; letter-spacing: .08em; }
.terrain .here { fill: var(--route); }
.terrain .here-ring { fill: none; stroke: var(--route); stroke-width: 4; }
.terrain .region-link { cursor: pointer; }
.terrain .summit { fill: var(--text); }
.terrain .lbl-name { fill: var(--text); font-family: var(--font-label); font-weight: 700; font-size: 30px; letter-spacing: .16em; text-transform: uppercase; paint-order: stroke; stroke: var(--tint-5); stroke-width: 9px; stroke-linejoin: round; }
.terrain .lbl-sub { fill: var(--label); font-family: var(--font-label); font-weight: 600; font-size: 20px; letter-spacing: .12em; text-transform: uppercase; paint-order: stroke; stroke: var(--tint-5); stroke-width: 7px; stroke-linejoin: round; }
.terrain .marker circle { fill: var(--text); stroke: var(--surface); stroke-width: 3; }
.terrain .marker text { fill: var(--surface); font-family: var(--font-label); font-weight: 700; font-size: 30px; text-anchor: middle; dominant-baseline: central; }
.terrain .region-link:hover .lbl-name, .terrain .region-link:focus-visible .lbl-name { fill: var(--route); }
.terrain .region-link:hover .marker circle, .terrain .region-link:focus-visible .marker circle { fill: var(--route); }
.terrain .region-link:focus-visible { outline: none; }
.terrain .region-link:focus-visible .focus-ring { stroke: var(--focus); stroke-width: 4; fill: none; }

/* ---------- home hero ---------- */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: end; }
.hero-grid h1 { font-size: clamp(2.6rem, 6.4vw, 5.25rem); font-weight: 500; line-height: 1.02; letter-spacing: -.03em; margin: 1rem 0 1.25rem; }
.hero-grid h1 em { font-style: italic; color: var(--water); font-weight: 400; }
.hero-sub { font-size: clamp(1.2rem, 2vw, 1.375rem); color: var(--text-muted); max-width: 36rem; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; margin-top: 1.75rem; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 48px; padding: .6rem 1.3rem;
  font-family: var(--font-label); font-weight: 700; font-size: 1.15rem; letter-spacing: .1em; text-transform: uppercase; text-decoration: none;
  border-radius: var(--radius); border: 1.5px solid var(--text); cursor: pointer; transition: transform .15s ease, background-color .15s ease;
}
.btn-primary { background: var(--text); color: var(--surface); }
.btn-primary:hover { background: var(--survey); border-color: var(--survey); }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--bg); }
.link-secondary { font-family: var(--font-label); font-weight: 700; font-size: 1.15rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text); text-decoration: underline; text-decoration-color: var(--route); text-decoration-thickness: 2px; text-underline-offset: .3em; min-height: 44px; display: inline-flex; align-items: center; }
.link-tertiary { font-family: var(--font-label); font-weight: 600; font-size: 1.1rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.link-tertiary:hover { color: var(--link); }

.photo-inset { margin: 0; position: relative; }
.photo-inset .photo {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden; border: 1.5px solid var(--neatline);
  background: linear-gradient(160deg, var(--tint-3), var(--tint-1));
}
.photo-inset img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 30%; filter: var(--photo-filter); }
.photo-inset .crosshair { position: absolute; inset: 0; pointer-events: none; }
.photo-inset .crosshair::before, .photo-inset .crosshair::after { content: ""; position: absolute; background: rgba(255, 255, 255, .7); }
.photo-inset .crosshair::before { left: 50%; top: 8%; bottom: 8%; width: 1px; }
.photo-inset .crosshair::after { top: 50%; left: 8%; right: 8%; height: 1px; }
.photo-inset figcaption { display: flex; justify-content: space-between; margin-top: .5rem; font-family: var(--font-label); font-size: .9375rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }

.benchmarks { list-style: none; padding: 0; margin: 1.75rem 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.benchmarks li { background: var(--surface); padding: .9rem 1rem; }
.benchmarks .bm-fig { display: flex; align-items: center; gap: .45rem; font-family: var(--font-text); font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.benchmarks .bm-fig svg { width: 16px; height: 16px; flex: none; }
.benchmarks .bm-lbl { font-family: var(--font-label); font-weight: 600; font-size: .9375rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .photo-inset .photo { aspect-ratio: 16 / 11; }
}

/* the big sheet map */
.site-map { margin-top: clamp(2rem, 5vw, 3.5rem); }
.map-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem; }
.map-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 500; }
.map-body { display: grid; grid-template-columns: minmax(0, 1fr) 17rem; gap: 0; border: 1.5px solid var(--neatline); }
.map-canvas { position: relative; background: var(--tint-1); border-right: 1.5px solid var(--neatline); }
.map-canvas svg { width: 100%; height: auto; display: block; }
.legend { padding: 1.25rem 1.25rem 1.5rem; background: var(--surface); }
.legend h3 { font-family: var(--font-label); font-weight: 700; font-size: 1.15rem; letter-spacing: .2em; text-transform: uppercase; border-bottom: 1.5px solid var(--neatline); padding-bottom: .4rem; margin-bottom: .75rem; }
.legend dl { margin: 0; display: grid; grid-template-columns: 2.4rem 1fr; gap: .55rem .75rem; align-items: center; }
.legend dt { display: flex; justify-content: center; }
.legend dt svg { width: 34px; height: 20px; overflow: visible; }
.legend dd { margin: 0; font-size: 1rem; line-height: 1.35; }
.scale-bar { margin-top: 1.25rem; }
.scale-bar .bar { display: grid; grid-template-columns: repeat(4, 1fr); height: 10px; border: 1px solid var(--text); }
.scale-bar .bar span:nth-child(odd) { background: var(--text); }
.scale-bar .ticks { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: .8125rem; color: var(--text-muted); margin-top: .25rem; }
.scale-bar .cap { font-family: var(--font-label); font-size: .9375rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.map-key { display: none; }
@media (max-width: 960px) {
  .map-body { grid-template-columns: 1fr; }
  .map-canvas { border-right: 0; border-bottom: 1.5px solid var(--neatline); }
}
@media (max-width: 720px) {
  .terrain .lbl { display: none; }
  .terrain .marker { transform-box: fill-box; transform-origin: center; transform: scale(1.7); }
  .terrain .elev, .terrain .water-text, .terrain .grid text { display: none; }
  .map-key { display: block; list-style: none; margin: 0; padding: .75rem 1rem; background: var(--surface); border-bottom: 1.5px solid var(--neatline); counter-reset: key; }
  .map-key li { display: flex; gap: .75rem; align-items: baseline; padding: .45rem 0; border-bottom: 1px dotted var(--rule); }
  .map-key li:last-child { border-bottom: 0; }
  .map-key .num { flex: none; display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--text); color: var(--surface); font-family: var(--font-label); font-weight: 700; font-size: 1rem; }
  .map-key a { font-family: var(--font-label); font-weight: 700; font-size: 1.15rem; letter-spacing: .08em; text-transform: uppercase; }
}

/* ---------- regions (sections) ---------- */
.region { padding: clamp(2.5rem, 6vw, 4.5rem) 0; position: relative; }
.region + .region { border-top: 0; }
.contour-rule { display: block; width: 100%; height: 26px; color: var(--contour); }
.region-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem 2rem; align-items: end; margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }
.region-head .eyebrow { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.region-head .eyebrow svg { width: 18px; height: 18px; }
.region-head h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 500; letter-spacing: -.02em; margin-top: .35rem; grid-column: 1; }
.region-head p { grid-column: 1; margin: .25rem 0 0; color: var(--text-muted); font-size: 1.2rem; max-width: 40rem; }
.region-head .more { grid-column: 2; grid-row: 1 / span 3; align-self: end; }
.more { font-family: var(--font-label); font-weight: 700; font-size: 1.1rem; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; display: inline-flex; min-height: 44px; align-items: center; gap: .35rem; }
.more:hover { text-decoration: underline; }
@media (max-width: 640px) { .region-head { grid-template-columns: 1fr; } .region-head .more { grid-column: 1; grid-row: auto; } }

/* ---------- plates (cards) ---------- */
.plates { display: grid; gap: clamp(1rem, 2.5vw, 1.75rem); grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.plates.two { grid-template-columns: repeat(auto-fill, minmax(min(100%, 26rem), 1fr)); }
.plate { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--rule); box-shadow: var(--shadow); transition: border-color .15s ease, transform .15s ease; }
.plate:hover { border-color: var(--contour-index); }
.plate:focus-within { border-color: var(--contour-index); }
.plate .fig { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 1px solid var(--rule); background:
  repeating-radial-gradient(circle at var(--ox, 30%) var(--oy, 40%), transparent 0 14px, color-mix(in srgb, var(--contour) 35%, transparent) 14px 15px), var(--tint-2); }
.plate .fig img { width: 100%; height: 100%; object-fit: cover; filter: var(--photo-filter); transition: filter .2s ease; }
.plate:hover .fig img { filter: none; }
.plate .plate-no { position: absolute; top: .6rem; left: .6rem; background: var(--surface); color: var(--text); font-family: var(--font-mono); font-size: .8125rem; padding: .15rem .45rem; border: 1px solid var(--rule); }
.plate .body { padding: 1.1rem 1.2rem 1.25rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.plate .meta { display: flex; flex-wrap: wrap; gap: .25rem .9rem; align-items: center; font-family: var(--font-label); font-weight: 600; font-size: .9375rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.plate .meta .sym { display: inline-flex; align-items: center; gap: .35rem; color: var(--label); }
.plate .meta svg { width: 16px; height: 16px; }
.plate h3 { font-size: 1.45rem; font-weight: 600; line-height: 1.2; }
.plate h3 a { color: var(--text); text-decoration: none; }
.plate h3 a::after { content: ""; position: absolute; inset: 0; }
.plate h3 a:hover { text-decoration: underline; text-decoration-color: var(--route); }
.plate h3 a:focus-visible { outline: none; }
.plate:has(h3 a:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.plate .desc { color: var(--text-muted); font-size: 1.0625rem; line-height: 1.55; margin: 0; }
.plate .foot { margin-top: auto; padding-top: .35rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.plate .ext { position: relative; z-index: 2; }
.chip { display: inline-flex; align-items: center; padding: .1rem .55rem; border: 1px solid var(--rule); border-radius: 999px; font-family: var(--font-mono); font-size: .8125rem; color: var(--text-muted); background: var(--bg); }
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .05rem .5rem; border-radius: 2px; font-family: var(--font-label); font-weight: 700; font-size: .875rem; letter-spacing: .12em; text-transform: uppercase; }
.badge.new { background: var(--route); color: var(--surface); }
.badge.updated { border: 1.5px solid var(--water); color: var(--water); }
.badge.soon { border: 1.5px dashed var(--text-muted); color: var(--text-muted); }

/* gazetteer (list rows) */
.gazetteer { border-top: 1.5px solid var(--neatline); }
.gaz-row { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr) auto; gap: .25rem 1.5rem; align-items: baseline; padding: 1rem 0; border-bottom: 1px dotted var(--contour); position: relative; }
.gaz-row .when { font-family: var(--font-mono); font-size: .875rem; color: var(--text-muted); }
.gaz-row h3 { font-size: 1.35rem; font-weight: 600; }
.gaz-row h3 a { color: var(--text); text-decoration: none; }
.gaz-row h3 a::after { content: ""; position: absolute; inset: 0; }
.gaz-row h3 a:hover { color: var(--link); text-decoration: underline; }
.gaz-row p { margin: .25rem 0 0; color: var(--text-muted); font-size: 1.0625rem; }
.gaz-row .ref { font-family: var(--font-mono); font-size: .8125rem; color: var(--label); white-space: nowrap; }
@media (max-width: 640px) { .gaz-row { grid-template-columns: 1fr; } .gaz-row .ref { display: none; } }

/* route (sequential waypoints) */
.route { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2.5vw, 2rem); position: relative; counter-reset: wp; }
.route::before { content: ""; position: absolute; top: 1.2rem; left: 1.2rem; right: 1.2rem; border-top: 3px dashed var(--route); }
.route > li { position: relative; padding-top: 3.2rem; }
.route > li::before {
  counter-increment: wp; content: counter(wp);
  position: absolute; top: 0; left: 0; width: 2.4rem; height: 2.4rem; display: grid; place-items: center;
  background: var(--surface); border: 3px solid var(--route); border-radius: 50%;
  font-family: var(--font-label); font-weight: 700; font-size: 1.2rem; color: var(--text);
}
.route > li.unsurveyed::before { border-style: dashed; border-color: var(--text-muted); color: var(--text-muted); }
@media (max-width: 860px) {
  .route { grid-template-columns: 1fr; }
  .route::before { top: 1.2rem; bottom: 1.2rem; left: 1.2rem; right: auto; border-top: 0; border-left: 3px dashed var(--route); }
  .route > li { padding-top: 0; padding-left: 3.6rem; }
}
.route.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) { .route.five { grid-template-columns: 1fr; } .route.five::before { top: 1.2rem; bottom: 1.2rem; left: 1.2rem; right: auto; border-top: 0; border-left: 3px dashed var(--route); } .route.five > li { padding-top: 0; padding-left: 3.6rem; } }

/* points of interest */
.poi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.poi { background: var(--surface); padding: 1.4rem 1.3rem; position: relative; display: flex; flex-direction: column; gap: .5rem; }
.poi .sym { width: 40px; height: 40px; color: var(--label); }
.poi h3 { font-size: 1.35rem; }
.poi h3 a { color: var(--text); text-decoration: none; }
.poi h3 a::after { content: ""; position: absolute; inset: 0; }
.poi h3 a:hover { text-decoration: underline; text-decoration-color: var(--route); }
.poi p { margin: 0; color: var(--text-muted); font-size: 1.0625rem; }
.poi:hover { background: var(--bg); }

/* margin notes (three-up collar at bottom of home) */
.margins { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2.5vw, 1.75rem); }
.margin-note { border: 1px solid var(--rule); background: var(--surface); padding: 1.4rem 1.4rem 1.6rem; }
.margin-note h3 { font-family: var(--font-label); font-weight: 700; font-size: 1.2rem; letter-spacing: .18em; text-transform: uppercase; border-bottom: 1.5px solid var(--neatline); padding-bottom: .45rem; margin-bottom: .8rem; }
.margin-note ul { list-style: none; margin: 0; padding: 0; }
.margin-note li { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px dotted var(--rule); }
.margin-note li:last-child { border-bottom: 0; }
.margin-note li a { font-weight: 600; }
.margin-note li span { font-family: var(--font-mono); font-size: .8125rem; color: var(--text-muted); align-self: center; }
.margin-note.night { background: var(--code-bg); color: #ece6d6; border-color: var(--code-bg); }
.margin-note.night h3 { border-color: #c8bfa8; }
.margin-note.night p { color: #cfc8b6; }
.margin-note.night .btn { border-color: #ece6d6; color: #0e161d; background: #ece6d6; }
.margin-note.night .btn:hover { background: #ffb199; border-color: #ffb199; }
@media (max-width: 900px) { .margins { grid-template-columns: 1fr; } }

/* strip / callout band */
.strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; padding: 1.25rem 1.5rem; border: 1.5px solid var(--neatline); background: var(--veg-fill); }
.strip p { margin: 0; font-size: 1.2rem; max-width: 44rem; }

/* jump bar */
.jump { position: sticky; top: 6.1rem; z-index: 20; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(6px); border-block: 1px solid var(--rule); }
.jump ul { list-style: none; margin: 0; padding: .35rem 0; display: flex; gap: .35rem; overflow-x: auto; scrollbar-width: thin; }
.jump a { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: .2rem .8rem; white-space: nowrap; font-family: var(--font-label); font-weight: 600; font-size: 1.05rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text); text-decoration: none; border-radius: 999px; }
.jump a:hover { background: var(--surface); }
.jump .n { font-family: var(--font-mono); font-size: .8125rem; color: var(--label); }
.jump .jlabel { font-family: var(--font-label); font-weight: 700; font-size: .9375rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); align-self: center; padding-right: .4rem; }

/* featured survey (projects) */
.survey { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); border: 1.5px solid var(--neatline); background: var(--surface); }
.survey .copy { padding: clamp(1.25rem, 3vw, 2.5rem); }
.survey h3 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 500; margin: .4rem 0 .8rem; }
.survey .img { border-left: 1.5px solid var(--neatline); min-height: 18rem; background: var(--night-900); }
.survey .img img { width: 100%; height: 100%; object-fit: cover; }
.statline { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin: 1.25rem 0; }
.statline div { background: var(--surface); padding: .7rem .9rem; }
.statline b { display: block; font-size: 1.9rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.1; }
.statline span { font-family: var(--font-label); font-weight: 600; font-size: .9375rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }
@media (max-width: 820px) { .survey { grid-template-columns: 1fr; } .survey .img { border-left: 0; border-top: 1.5px solid var(--neatline); } }

/* ---------- about ---------- */
.profile-chart { border: 1.5px solid var(--neatline); background: var(--surface); padding: 1rem 1rem .5rem; }
.profile-chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.profile-chart .ground { fill: var(--tint-3); stroke: var(--contour-index); stroke-width: 2.5; }
.profile-chart .ground-hatch { fill: url(#hatch); opacity: .5; }
.profile-chart .axis line { stroke: var(--rule); }
.profile-chart .axis text { fill: var(--text-muted); font-family: var(--font-mono); font-size: 14px; }
.profile-chart .co text { fill: var(--text); font-family: var(--font-label); font-weight: 700; font-size: 16px; letter-spacing: .08em; text-transform: uppercase; }
.profile-chart .co line { stroke: var(--text); stroke-width: 1; stroke-dasharray: 3 3; }
.profile-chart .co circle { fill: var(--route); stroke: var(--surface); stroke-width: 2; }
.profile-chart .phase text { fill: var(--label); font-family: var(--font-label); font-weight: 600; font-size: 16px; letter-spacing: .12em; text-transform: uppercase; }
.phases { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin-top: 1.5rem; }
.phase-card { background: var(--surface); padding: 1.2rem 1.2rem 1.4rem; }
.phase-card h3 { font-size: 1.35rem; margin: .3rem 0 .5rem; }
.phase-card p { font-size: 1.0625rem; color: var(--text-muted); }
.phase-card ul { margin: 0; padding-left: 1.1rem; font-size: 1rem; }
.phase-card li { margin-bottom: .4rem; }
@media (max-width: 1000px) { .phases { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .phases { grid-template-columns: 1fr; } }
details.history > summary { list-style: none; cursor: pointer; display: inline-flex; min-height: 48px; align-items: center; gap: .6rem; padding: .5rem 1.1rem; border: 1.5px solid var(--text); border-radius: var(--radius); font-family: var(--font-label); font-weight: 700; font-size: 1.1rem; letter-spacing: .1em; text-transform: uppercase; }
details.history > summary::-webkit-details-marker { display: none; }
details.history > summary::after { content: "+"; font-family: var(--font-mono); }
details.history[open] > summary::after { content: "−"; }
.bullets { margin: 1rem 0 0; padding-left: 1.2rem; }
.bullets li { margin-bottom: .6rem; }

.night-panel { background: var(--code-bg); color: #ece6d6; border: 1.5px solid var(--neatline); padding: clamp(1.5rem, 4vw, 3rem); position: relative; overflow: hidden; }
.night-panel .eyebrow { color: #dcaa72; }
.night-panel h2 { color: #f4efe3; }
.night-panel p, .night-panel li { color: #cfc8b6; }
.night-panel a { color: #8cc4ea; }
.night-panel .bg-contours { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .22; pointer-events: none; }
.night-panel .bg-contours .c, .night-panel .bg-contours .ci { fill: none; stroke: #c18b55; }
.night-panel .bg-contours .ci { stroke-width: 1.6; }
.night-panel > * { position: relative; }
.proverbs { list-style: none; margin: 1.5rem 0 0; padding: 0; counter-reset: pv; }
.proverbs li { counter-increment: pv; display: grid; grid-template-columns: 3rem 1fr; gap: 1rem; padding: .9rem 0; border-top: 1px dotted #4a5a66; font-size: clamp(1.3rem, 2.4vw, 1.7rem); font-style: italic; line-height: 1.35; color: #f4efe3 !important; }
.proverbs li::before { content: counter(pv, decimal-leading-zero); font-family: var(--font-mono); font-style: normal; font-size: .875rem; color: #dcaa72; padding-top: .5rem; }
.cap-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: #2b3a45; border: 1px solid #2b3a45; margin-top: 1.5rem; }
.capability { background: #0d141b; padding: 1.3rem; }
.capability h3 { color: #f4efe3; font-size: 1.35rem; margin-bottom: .35rem; }
.capability p { font-size: 1.0625rem; }
.capability ul { list-style: none; margin: .5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.capability li { font-family: var(--font-mono); font-size: .8125rem; color: #ece6d6 !important; border: 1px solid #3c4d59; padding: .15rem .5rem; border-radius: 999px; }
@media (max-width: 760px) { .cap-grid { grid-template-columns: 1fr; } }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.facts { list-style: none; margin: 0; padding: 0; }
.facts li { padding: 1rem 0; border-bottom: 1px dotted var(--contour); }
.facts h3 { font-size: 1.3rem; margin-bottom: .2rem; }
.facts p { margin: 0; color: var(--text-muted); }

/* ---------- article ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 60; background: transparent; }
.progress span { display: block; height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--route) 0 10px, transparent 10px 15px); }
.progress-pct { position: fixed; bottom: 12px; right: 12px; z-index: 60; font-family: var(--font-mono); font-size: .8125rem; background: var(--surface); color: var(--text); border: 1px solid var(--rule); padding: .05rem .4rem; }
.article-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(1.25rem, 3vw, 2.5rem); align-items: center; }
.article-hero .plate-fig { margin: 0; }
.article-hero .plate-fig .img { border: 1.5px solid var(--neatline); background: var(--tint-2); overflow: hidden; }
.article-hero .plate-fig img { width: 100%; height: auto; filter: var(--photo-filter); }
.article-hero .plate-fig figcaption { display: flex; justify-content: space-between; margin-top: .5rem; font-family: var(--font-label); font-size: .9375rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.cartouche .crumbs { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-family: var(--font-label); font-weight: 600; font-size: 1rem; letter-spacing: .12em; text-transform: uppercase; }
.cartouche .crumbs span { color: var(--label); }
.cartouche h1 { font-size: clamp(2.3rem, 5vw, 4rem); font-weight: 500; letter-spacing: -.02em; line-height: 1.05; margin: .6rem 0 .9rem; }
.cartouche p { font-size: clamp(1.15rem, 2vw, 1.35rem); color: var(--text-muted); margin: 0 0 1rem; }
.cartouche .meta { font-family: var(--font-mono); font-size: .875rem; color: var(--text-muted); display: flex; gap: .4rem 1.25rem; flex-wrap: wrap; }
@media (max-width: 860px) { .article-hero { grid-template-columns: 1fr; } }
.article-layout { display: grid; grid-template-columns: 15rem minmax(0, 1fr) 13rem; gap: clamp(1.5rem, 3vw, 3rem); margin-top: clamp(2rem, 4vw, 3rem); }
.toc { position: sticky; top: 7rem; align-self: start; }
.toc h2, .aside-card h2 { font-family: var(--font-label); font-weight: 700; font-size: 1rem; letter-spacing: .2em; text-transform: uppercase; color: var(--text-muted); margin-bottom: .75rem; }
.toc ol { list-style: none; margin: 0; padding: 0 0 0 .2rem; position: relative; }
.toc ol::before { content: ""; position: absolute; left: .78rem; top: .9rem; bottom: .9rem; border-left: 2px dashed var(--contour); }
.toc li { position: relative; }
.toc a { display: grid; grid-template-columns: 1.6rem 1fr; gap: .6rem; align-items: start; padding: .4rem 0; text-decoration: none; color: var(--text-muted); font-size: 1rem; line-height: 1.35; min-height: 44px; }
.toc a .wp { width: 1.2rem; height: 1.2rem; margin-top: .1rem; border-radius: 50%; background: var(--surface); border: 2px solid var(--contour); position: relative; z-index: 1; }
.toc a:hover { color: var(--text); }
.toc a[aria-current="true"] { color: var(--text); font-weight: 600; }
.toc a[aria-current="true"] .wp { background: var(--route); border-color: var(--route); }
.toc-mobile { display: none; border: 1.5px solid var(--neatline); background: var(--surface); margin-bottom: 1.5rem; }
.toc-mobile summary { cursor: pointer; padding: .8rem 1rem; min-height: 48px; font-family: var(--font-label); font-weight: 700; font-size: 1.05rem; letter-spacing: .14em; text-transform: uppercase; }
.toc-mobile ol { margin: 0; padding: 0 1rem 1rem 2.4rem; }
.toc-mobile li { padding: .3rem 0; }
.aside-card { position: sticky; top: 7rem; align-self: start; font-size: 1rem; }
.aside-card dl { margin: 0 0 1.25rem; }
.aside-card dt { font-family: var(--font-label); font-weight: 600; font-size: .9375rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); margin-top: .7rem; }
.aside-card dd { margin: 0; }
.prose { max-width: var(--measure); font-size: 1.1875rem; line-height: 1.7; }
.prose > * + * { margin-top: 1.1em; }
.prose p { margin: 0; }
.prose h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); font-weight: 500; margin-top: 2.4em; padding-top: .9rem; border-top: 1px solid var(--rule); display: flex; gap: .8rem; align-items: baseline; scroll-margin-top: 7rem; }
.prose h2 .wpn { font-family: var(--font-mono); font-size: .875rem; color: var(--label); font-weight: 500; }
.prose ol, .prose ul { padding-left: 1.4rem; }
.prose li + li { margin-top: .35rem; }
.prose code { font-family: var(--font-mono); font-size: .86em; background: var(--bg); border: 1px solid var(--rule); padding: .05em .3em; border-radius: 2px; }
.prose blockquote { margin: 1.6em 0; padding: 1rem 1.2rem 1rem 3.4rem; border: 1px solid var(--rule); background: var(--bg); position: relative; }
.prose blockquote p { margin: 0; }
.prose blockquote::before { position: absolute; left: .9rem; top: 1rem; width: 1.7rem; height: 1.7rem; display: grid; place-items: center; font-family: var(--font-label); font-weight: 700; font-size: 1rem; }
.prose blockquote.note::before { content: "i"; border: 2px solid var(--survey); color: var(--survey); border-radius: 50%; font-style: italic; }
.prose blockquote.why { border-left: 4px solid var(--contour-index); }
.prose blockquote.why::before { content: ""; width: 0; height: 0; border-left: .85rem solid transparent; border-right: .85rem solid transparent; border-bottom: 1.4rem solid var(--contour-index); top: 1.1rem; }
.prose blockquote.ask { border: 1.5px dashed var(--water); background: color-mix(in srgb, var(--water-fill) 45%, var(--surface)); }
.prose blockquote.ask::before { content: "?"; background: var(--water); color: var(--surface); border-radius: 50%; }
.prose blockquote.skill { border: 1.5px solid var(--veg); background: var(--veg-fill); }
.prose blockquote.skill::before { content: "★"; color: var(--veg); font-size: 1.3rem; }
.co-label { font-family: var(--font-label); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .95rem; margin-right: .4rem; }
.codeblock { margin: 1.8em 0; border: 1.5px solid var(--neatline); background: var(--code-bg); max-width: calc(var(--measure) + 6rem); }
.codeblock .code-head { display: flex; justify-content: space-between; align-items: center; padding: .3rem .4rem .3rem 1rem; border-bottom: 1px solid #2b3a45; font-family: var(--font-mono); font-size: .8125rem; color: #b8c1bd; }
.copy-btn { min-height: 36px; min-width: 44px; padding: .25rem .8rem; background: transparent; border: 1px solid #4a5a66; color: #ece6d6; border-radius: 2px; font-family: var(--font-label); font-weight: 600; font-size: .95rem; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }
.copy-btn:hover { border-color: #dcaa72; }
.codeblock pre { margin: 0; padding: 1rem 1.1rem; overflow-x: auto; font-family: var(--font-mono); font-size: .875rem; line-height: 1.65; color: var(--code-text); tab-size: 2; }
.codeblock code { background: none; border: 0; padding: 0; font-size: inherit; }
.tk-k { color: #ff9e7a; } .tk-s { color: #a6cb8c; } .tk-c { color: #8e9a95; font-style: italic; } .tk-f { color: #8cc4ea; } .tk-t { color: #e6c07b; }
.filed { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1.5px solid var(--neatline); }
.filed a.chip { text-decoration: none; }
.filed a.chip:hover { border-color: var(--contour-index); color: var(--text); }
.share { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.share .btn { font-size: 1rem; min-height: 44px; padding: .4rem 1rem; }
@media (max-width: 1180px) { .article-layout { grid-template-columns: 14rem minmax(0, 1fr); } .aside-card { display: none; } }
@media (max-width: 900px) { .article-layout { grid-template-columns: minmax(0, 1fr); } .toc { display: none; } .toc-mobile { display: block; } }

/* newsletter */
.signal { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem 2.5rem; align-items: center; border: 1.5px solid var(--neatline); background: color-mix(in srgb, var(--water-fill) 50%, var(--surface)); padding: clamp(1.25rem, 3vw, 2.25rem); }
.signal h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 500; }
.signal p { margin: .5rem 0 0; color: var(--text-muted); }
.sub-form { display: flex; flex-wrap: wrap; gap: .6rem; }
.sub-form input[type="email"] { flex: 1 1 14rem; min-height: 48px; padding: .5rem .9rem; font: inherit; font-size: 1.0625rem; color: var(--text); background: var(--surface); border: 1.5px solid var(--text-muted); border-radius: var(--radius); }
.sub-form input[type="email"]:focus-visible { border-color: var(--focus); }
.sub-form .consent { flex-basis: 100%; display: flex; gap: .5rem; align-items: flex-start; font-size: 1rem; color: var(--text-muted); }
.sub-form .consent input { width: 20px; height: 20px; margin-top: .25rem; }
.form-status { flex-basis: 100%; font-size: 1rem; min-height: 1.4em; margin: 0; }
.form-status.ok { color: var(--veg); font-weight: 600; }
.form-status.err { color: var(--route); font-weight: 600; }
@media (max-width: 760px) { .signal { grid-template-columns: 1fr; } }

/* ---------- patterns ---------- */
.three-ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--rule); border: 1.5px solid var(--neatline); }
.three-ways > div { background: var(--surface); padding: 1.2rem 1.3rem; }
.three-ways h3 { font-size: 1.35rem; display: flex; gap: .5rem; align-items: center; }
.three-ways h3 svg { width: 22px; height: 22px; color: var(--label); }
.three-ways p { margin: .35rem 0 0; color: var(--text-muted); font-size: 1.0625rem; }
.three-ways .foot { grid-column: 1 / -1; background: var(--bg); font-size: 1.0625rem; }
@media (max-width: 820px) { .three-ways { grid-template-columns: 1fr; } }
.finder { display: grid; gap: 1rem; margin: 2rem 0 1.5rem; }
.search-field { position: relative; }
.search-field svg { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--text-muted); }
.search-field input { width: 100%; min-height: 52px; padding: .6rem 1rem .6rem 2.8rem; font: inherit; font-size: 1.0625rem; color: var(--text); background: var(--surface); border: 1.5px solid var(--neatline); border-radius: var(--radius); }
.filter-row { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: center; justify-content: space-between; }
.pills { display: flex; flex-wrap: wrap; gap: .4rem; }
.pill-btn { min-height: 44px; padding: .3rem 1rem; background: var(--surface); color: var(--text); border: 1px solid var(--rule); border-radius: 999px; font-family: var(--font-label); font-weight: 600; font-size: 1.05rem; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; display: inline-flex; align-items: center; gap: .45rem; }
.pill-btn svg { width: 16px; height: 16px; color: var(--label); }
.pill-btn:hover { border-color: var(--contour-index); }
.pill-btn[aria-pressed="true"] { background: var(--text); color: var(--surface); border-color: var(--text); }
.pill-btn[aria-pressed="true"] svg { color: var(--surface); }
.count-row { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; font-size: 1.0625rem; }
.count-row select { min-height: 44px; font: inherit; font-size: 1rem; color: var(--text); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: .3rem .6rem; }
.text-btn { background: none; border: 0; color: var(--link); font: inherit; text-decoration: underline; cursor: pointer; min-height: 44px; padding: 0 .3rem; }
.pattern-plate .fig { aspect-ratio: 16 / 8; display: grid; place-items: center; }
.pattern-plate .fig svg { width: 58%; height: auto; color: var(--text); }
.pattern-plate .fig .glyph-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.empty { border: 1.5px dashed var(--text-muted); padding: 2.5rem 1.5rem; text-align: center; }
.empty h2 { font-size: 1.6rem; margin: .8rem 0 .4rem; }
.empty svg { width: 90px; height: 60px; color: var(--text-muted); margin: 0 auto; }

/* pattern detail */
.uses { columns: 2; column-gap: 2rem; margin: .75rem 0 0; padding-left: 1.2rem; }
.uses li { margin-bottom: .35rem; break-inside: avoid; }
@media (max-width: 600px) { .uses { columns: 1; } }
.panes { border: 1.5px solid var(--neatline); background: var(--surface); margin-top: 2rem; }
.pane-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; padding: .5rem; border-bottom: 1.5px solid var(--neatline); background: var(--bg); }
.pane-tabs { display: flex; flex-wrap: wrap; gap: .25rem; }
.pane-tabs [role="tab"] { min-height: 44px; padding: .3rem 1rem; background: transparent; border: 1px solid transparent; color: var(--text); font-family: var(--font-label); font-weight: 600; font-size: 1.05rem; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; border-radius: var(--radius); }
.pane-tabs [role="tab"]:hover { border-color: var(--rule); }
.pane-tabs [role="tab"][aria-selected="true"] { background: var(--text); color: var(--surface); }
.pane-actions { display: flex; gap: .4rem; }
.pane-actions .btn { min-height: 44px; font-size: 1rem; padding: .3rem .9rem; }
.pane { padding: clamp(1rem, 3vw, 2rem); }
.pane[hidden] { display: none; }
.pane pre { margin: 0; background: var(--code-bg); color: var(--code-text); padding: 1rem 1.1rem; overflow-x: auto; font-family: var(--font-mono); font-size: .875rem; line-height: 1.6; border: 1px solid var(--neatline); }
.pane .note { font-size: 1.0625rem; color: var(--text-muted); margin-bottom: 1rem; }
.prompt-text { max-width: var(--measure); font-size: 1.125rem; }
.prompt-text p { margin-bottom: 1em; }

/* the demo pattern itself, rendered against site tokens */
.hss-caption { font-size: 1.0625rem; color: var(--text-muted); margin: 0 0 .75rem; }
.hss-strip { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; grid-template-columns: 1fr; margin-bottom: 1.75rem; }
@media (min-width: 21rem) { .hss-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 52rem) { .hss-strip.report { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.hss-strip.filter { grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr)); margin-bottom: .75rem; }
.hss-tile { background: var(--surface); padding: .9rem 1rem; display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.hss-label { font-family: var(--font-mono); font-size: .8125rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); overflow-wrap: anywhere; }
.hss-fig { font-family: var(--font-text); font-size: 1.75rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.15; }
.hss-fig.missing { color: var(--text-muted); font-weight: 400; }
.hss-unit { font-size: 1rem; color: var(--text-muted); }
button.hss-tile { font: inherit; color: var(--text); text-align: left; border: 0; cursor: pointer; min-height: 44px; }
button.hss-tile:hover { background: var(--bg); }
button.hss-tile[aria-pressed="true"] { background: color-mix(in srgb, var(--survey) 16%, var(--surface)); box-shadow: inset 0 -3px 0 var(--route); }
.hss-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.hss-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem .9rem; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); font-size: 1.0625rem; }
.hss-list li[hidden] { display: none; }
.hss-status { font-size: 1rem; color: var(--text-muted); margin: .75rem 0 0; }

/* ---------- footer ---------- */
.site-foot { margin-top: clamp(2rem, 5vw, 4rem); background: var(--bg-collar); border-top: 1.5px solid var(--neatline); }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.4fr; gap: 2rem; padding: clamp(2rem, 4vw, 3rem) 0; }
.foot-grid h2 { font-family: var(--font-label); font-weight: 700; font-size: 1.05rem; letter-spacing: .2em; text-transform: uppercase; margin-bottom: .8rem; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li a { display: inline-flex; min-height: 40px; align-items: center; color: var(--text); text-decoration: none; }
.foot-grid li a:hover { color: var(--link); text-decoration: underline; }
.foot-grid p { color: var(--text-muted); font-size: 1.0625rem; }
.foot-base { border-top: 1px solid var(--rule); padding: 1rem 0 1.5rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; font-family: var(--font-mono); font-size: .8125rem; color: var(--text-muted); }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .foot-grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; padding-top: .4rem; position: relative; }
@media (max-width: 420px) { .collar .mark-sub { display: none; } }
[hidden] { display: none !important; }
.pill-btn svg { width: 28px; height: 14px; }
.pattern-plate .fig svg { width: 42%; color: var(--survey); }
.strip .sym { width: 28px; height: 28px; display: inline-block; vertical-align: -6px; margin-right: .5rem; color: var(--route); }
/* Optional paper grain (assets/paper-grain.webp, see meta.json). Absent file = plain paper colour. */
:root:not([data-theme="dark"]) body { background-image: url("assets/paper-grain.webp"); background-size: 800px; background-blend-mode: multiply; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body { background-image: none; } }

/* gallery article */
.prose .prose-plate { margin: 1.6em 0; }
.prose .prose-plate .img { border: 1.5px solid var(--neatline); background: var(--tint-2); overflow: hidden; }
.prose .prose-plate img { display: block; width: 100%; height: auto; filter: var(--photo-filter); }
.prose .prose-plate figcaption { display: flex; justify-content: space-between; gap: 1rem; margin-top: .5rem; font-family: var(--font-label); font-size: .9375rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted, inherit); }
.prose blockquote p + p { margin-top: .75rem; }
.prose code { overflow-wrap: anywhere; }
.prose > * + p { margin-top: 1.1em; }
