/* ==========================================================================
   ENGENIUS, site stylesheet
   Field manual: stratigraphy textbook × punk zine × engineer's notebook,
   wired for a real navigable website with a few old-web manners.
   Tokens ported from the Design Language field manual (vol. 01).
   ========================================================================== */

:root {
  /* Strata, the geological lifecycle, top to bottom */
  --raw:       oklch(0.78 0.045 78);
  --topsoil:   oklch(0.65 0.085 70);
  --mid:       oklch(0.46 0.06  55);
  --bedrock:   oklch(0.24 0.025 50);

  /* Ink & paper, the field notebook */
  --paper:     oklch(0.97 0.012 85);
  --paper-2:   oklch(0.94 0.018 85);
  --paper-3:   oklch(0.90 0.022 82);
  --bone:      oklch(0.99 0.005 90);
  --ink:       oklch(0.18 0.018 50);
  --ink-2:     oklch(0.38 0.020 55);
  --ink-3:     oklch(0.58 0.018 60);
  --rule:      oklch(0.86 0.025 80);
  --rule-hard: oklch(0.72 0.030 75);

  /* Accents, the rebellious colors, used sparingly */
  --gate-ochre:  oklch(0.72 0.16 75);
  --oxide-rust:  oklch(0.55 0.18 38);
  --verdigris:   oklch(0.58 0.08 175);
  --safety:      oklch(0.85 0.18 95);

  /* Old-web functional link colors, the one concession, tuned warm */
  --link:         oklch(0.45 0.15 255);
  --link-visited: oklch(0.42 0.13 305);
  --link-hover:   oklch(0.55 0.18 38);

  /* Type, editorial serif · humanist sans · industrial label · typewriter */
  --display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans:    "Commissioner", system-ui, sans-serif;
  --label:   "Saira Condensed", "Commissioner", sans-serif;
  --data:    "Courier Prime", ui-monospace, Menlo, monospace;

  --shell: 1200px;
  --gutter: clamp(20px, 5vw, 56px);
}

/* Bedrock mode, the konami-code night-at-the-dig-site dark theme */
:root[data-theme="bedrock"] {
  --paper:     oklch(0.19 0.014 55);
  --paper-2:   oklch(0.23 0.018 52);
  --paper-3:   oklch(0.27 0.020 50);
  --bone:      oklch(0.25 0.018 52);
  --ink:       oklch(0.93 0.018 82);
  --ink-2:     oklch(0.76 0.020 74);
  --ink-3:     oklch(0.60 0.020 68);
  --rule:      oklch(0.34 0.020 55);
  --rule-hard: oklch(0.46 0.028 58);
  --link:         oklch(0.72 0.11 235);
  --link-visited: oklch(0.72 0.10 300);
  --link-hover:   oklch(0.70 0.15 45);
  --gate-ochre:  oklch(0.78 0.15 78);
}

* { box-sizing: border-box; }

html {
  background: var(--paper);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0.005em;
  background:
    radial-gradient(circle at 1px 1px, oklch(0.74 0.03 75 / 0.30) 1px, transparent 1.4px) 0 0 / 30px 30px,
    var(--paper);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .35s ease, color .35s ease;
}
:root[data-theme="bedrock"] body {
  background:
    radial-gradient(circle at 1px 1px, oklch(0.5 0.02 75 / 0.22) 1px, transparent 1.4px) 0 0 / 30px 30px,
    var(--paper);
}

img { max-width: 100%; display: block; }

/* ── Links: the old-web concession ─────────────────────────────────────── */
a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:visited { color: var(--link-visited); }
a:hover { color: var(--link-hover); }
/* Chrome links (nav, buttons, cards) opt out of blue */
.nav a, .btn, .footer-dir a, .card-link, .u-plain, .u-plain a { text-decoration: none; }
/* The brand lockup must never inherit the visited-link purple */
.brand, .brand:link, .brand:visited { color: var(--ink); }

::selection { background: var(--safety); color: var(--ink); }

/* ── Layout shell ──────────────────────────────────────────────────────── */
.shell { max-width: var(--shell); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.shell-wide { max-width: 1340px; }
.section { padding: clamp(56px, 8vw, 104px) 0; border-top: 1px solid var(--rule-hard); }
.section-flush { border-top: none; }
.section-ink { background: var(--bedrock); color: var(--paper); border-color: var(--bedrock); }
.section-ink a { color: oklch(0.78 0.11 235); }

.eyebrow {
  font-family: var(--label);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 0;
  border-top: 2px solid var(--oxide-rust);
}
.eyebrow.rust { color: var(--oxide-rust); }

.sec-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin: 0 0 18px;
  text-wrap: balance;
}
.sec-title em { font-style: italic; color: var(--oxide-rust); }
.lede {
  font-family: var(--display);
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.42;
  color: var(--ink-2);
  max-width: 60ch;
  margin: 0;
  font-weight: 400;
}
.lede em { font-style: italic; color: var(--ink); }

.prose { max-width: 68ch; }
.prose p { margin: 0 0 1.1em; }
.prose p:last-child { margin-bottom: 0; }

.small-cap {
  font-family: var(--label);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.data { font-family: var(--data); font-size: 0.86em; letter-spacing: 0; }

/* ── Caution stripe, the punk-zine motif ─────────────────────────────── */
.caution {
  height: 16px;
  background: repeating-linear-gradient(135deg, var(--ink) 0 16px, var(--safety) 16px 32px);
}
.caution.thin { height: 9px; }
.caution.rust { background: repeating-linear-gradient(135deg, var(--ink) 0 16px, var(--oxide-rust) 16px 32px); }

/* ── Top navigation ───────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in oklch, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px) saturate(1.1);
  border-bottom: 1px solid var(--ink);
}
.nav-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 62px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  flex-shrink: 0;
}
.brand svg { width: 26px; height: 26px; display: block; }
.brand .wm {
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: 25px;
  letter-spacing: -0.03em;
  line-height: 1;
}
/* Domain suffix, the ".me" is treated as the brand's "promise" (see Brand Book §02a) */
.brand .wm .tld { color: var(--oxide-rust); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  font-family: var(--label);
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav-links a {
  color: var(--ink-2);
  padding: 7px 12px;
  border-radius: 2px;
  position: relative;
  transition: color .12s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 2px;
  height: 2px;
  background: var(--oxide-rust);
}
.nav-cta { margin-left: 8px; }
.nav-toggle {
  display: none;
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--rule-hard);
  border-radius: 2px;
  width: 40px; height: 36px;
  cursor: pointer;
  color: var(--ink);
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 20px; height: 20px; }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  padding: 11px 18px;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .08s ease, background-color .12s, color .12s, box-shadow .12s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn.primary:hover { background: #000; }
:root[data-theme="bedrock"] .btn.primary { background: var(--gate-ochre); color: var(--bedrock); border-color: var(--gate-ochre); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btn.subtle { background: var(--paper-2); color: var(--ink); border-color: var(--rule-hard); }
.btn.subtle:hover { border-color: var(--ink); }
.btn.rust { background: var(--oxide-rust); color: var(--bone); border-color: var(--oxide-rust); }
.btn.rust:hover { background: oklch(0.48 0.18 38); }
.btn.stamp {
  background: var(--safety); color: var(--ink); border: 1px solid var(--ink);
  font-family: var(--display); font-style: italic; font-weight: 500; font-size: 15px;
  transform: rotate(-1.2deg);
}
.btn.stamp:hover { transform: rotate(-1.2deg) translateY(-1px); box-shadow: 3px 3px 0 var(--ink); }
.btn.lg { font-size: 15.5px; padding: 15px 26px; }
.btn .kbd {
  font-family: var(--data); font-size: 11px; opacity: 0.7;
  border: 1px solid currentColor; border-radius: 2px; padding: 1px 5px;
}

/* ── Download control ─────────────────────────────────────────────────── */
.download { display: inline-flex; flex-direction: column; gap: 8px; }
.download-row { display: inline-flex; align-items: stretch; gap: 0; }
.download-main {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--ink); color: var(--paper);
  border: 1px solid var(--ink);
  padding: 14px 22px;
  border-radius: 2px 0 0 2px;
  cursor: pointer;
  text-align: left;
  transition: background-color .12s;
}
.download-main:hover { background: #000; }
:root[data-theme="bedrock"] .download-main { background: var(--gate-ochre); color: var(--bedrock); border-color: var(--gate-ochre); }
.download-main svg { width: 26px; height: 26px; flex-shrink: 0; }
.download-main .dl-lines { display: flex; flex-direction: column; gap: 2px; }
.download-main .dl-top { font-family: var(--sans); font-weight: 600; font-size: 15px; line-height: 1.1; }
.download-main .dl-sub { font-family: var(--data); font-size: 11px; opacity: 0.72; letter-spacing: 0; }
.download-menu-btn {
  background: var(--ink); color: var(--paper);
  border: 1px solid var(--ink); border-left: 1px solid oklch(0.4 0.02 60);
  border-radius: 0 2px 2px 0;
  padding: 0 14px;
  cursor: pointer;
  display: inline-flex; align-items: center;
}
:root[data-theme="bedrock"] .download-menu-btn { background: var(--gate-ochre); color: var(--bedrock); border-color: var(--gate-ochre); }
.download-menu-btn svg { width: 16px; height: 16px; transition: transform .18s; }
.download-menu-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.download-caption {
  font-family: var(--label); font-weight: 600; font-size: 11.5px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3);
  display: flex; align-items: center; gap: 8px;
}
.download-caption .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--verdigris); }
.download-menu {
  position: relative;
}
.download-list {
  position: absolute;
  z-index: 40;
  margin-top: 6px;
  min-width: 260px;
  background: var(--bone);
  border: 1px solid var(--ink);
  box-shadow: 6px 6px 0 oklch(0.2 0.02 60 / 0.18);
  padding: 6px;
  display: none;
}
.download-list.open { display: block; }
.download-list a {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 9px 12px;
  color: var(--ink);
  text-decoration: none;
  border-radius: 2px;
}
.download-list a:hover { background: var(--paper-2); }
.download-list a .os { font-weight: 600; font-size: 14px; }
.download-list a .meta { font-family: var(--data); font-size: 11px; color: var(--ink-3); }
.download-list .grp {
  font-family: var(--label); font-weight: 600; font-size: 10.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-3); padding: 8px 12px 4px;
}

/* ── Stamps ───────────────────────────────────────────────────────────── */
.pst { position: relative; display: inline-block; font-family: var(--display); line-height: 1; color: var(--bedrock); }
.ink-rust  { color: var(--oxide-rust); }
.ink-verd  { color: var(--verdigris); }
.ink-bed   { color: var(--bedrock); }
.ink-ochre { color: var(--gate-ochre); }
:root[data-theme="bedrock"] .ink-bed { color: var(--ink); }

.ink-worn, .ink-worn-2, .ink-worn-3 { -webkit-mask-repeat: repeat; mask-repeat: repeat; -webkit-mask-size: 260px 220px; mask-size: 260px 220px; }
.ink-worn {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='220'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='0.09 0.11' numOctaves='3' seed='11' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.4 2.35'/></filter><rect width='260' height='220' filter='url(%23g)'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='220'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='0.09 0.11' numOctaves='3' seed='11' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.4 2.35'/></filter><rect width='260' height='220' filter='url(%23g)'/></svg>");
}
.ink-worn-2 {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='220'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='0.14 0.16' numOctaves='2' seed='4' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -3.2 2.9'/></filter><rect width='260' height='220' filter='url(%23g)'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='220'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='0.14 0.16' numOctaves='2' seed='4' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -3.2 2.9'/></filter><rect width='260' height='220' filter='url(%23g)'/></svg>");
}
.ink-worn-3 {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='220'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='0.055 0.075' numOctaves='2' seed='9' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -3.0 2.62'/></filter><rect width='260' height='220' filter='url(%23g)'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='220'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='0.055 0.075' numOctaves='2' seed='9' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -3.0 2.62'/></filter><rect width='260' height='220' filter='url(%23g)'/></svg>");
}

/* Boxed rubber stamp */
.pst-box {
  border: 3px double currentColor;
  padding: 11px 22px 9px;
  font-style: italic; font-weight: 500; font-size: 30px;
  opacity: 0.92; white-space: nowrap;
}
.pst-box.caps {
  font-style: normal; font-family: var(--label); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em; font-size: 26px;
}

/* Diagonal over-print, the loud one */
.pst-diag {
  border: 5px double currentColor; padding: 7px 26px 5px;
  font-style: italic; font-weight: 500; font-size: 52px;
  text-transform: uppercase; letter-spacing: 0.01em;
  opacity: 0.92; white-space: nowrap;
}
.pst-diag.sm { font-size: 34px; border-width: 4px; padding: 6px 20px 4px; }

/* Circular postmark, curved text set on an SVG arc */
.pst-round { width: 168px; height: 168px; opacity: 0.9; }
.pst-round svg { width: 100%; height: 100%; display: block; overflow: visible; }

/* Oval seal, "approved"-style */
.pst-oval {
  border: 3px solid currentColor; border-radius: 50%;
  padding: 17px 42px; text-align: center;
  opacity: 0.92; white-space: nowrap;
}
.pst-oval::before {
  content: ""; position: absolute; inset: 5px;
  border: 1.5px solid currentColor; border-radius: 50%; pointer-events: none;
}
.pst-oval .a { font-family: var(--label); font-weight: 600; text-transform: uppercase; letter-spacing: 0.28em; font-size: 14px; display: block; }
.pst-oval .b { font-style: italic; font-weight: 500; font-size: 34px; display: block; margin-top: -1px; }

.tilt-l { transform: rotate(-3deg); }
.tilt-r { transform: rotate(2.5deg); }
.tilt-l-hard { transform: rotate(-6deg); }
.tilt-r-hard { transform: rotate(5deg); }

/* ── Tier badges & format chips ───────────────────────────────────────── */
.tier {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--label); font-weight: 600; font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 3px 9px 2px; border-radius: 999px;
}
.tier::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tier.raw { background: oklch(0.92 0.04 78); color: oklch(0.45 0.07 70); }
.tier.top { background: oklch(0.92 0.05 75); color: var(--topsoil); }
.tier.mid { background: oklch(0.88 0.04 65); color: var(--mid); }
.tier.bed { background: var(--bedrock); color: var(--paper); }
.tier.bed::before { background: var(--gate-ochre); }
:root[data-theme="bedrock"] .tier.raw { background: oklch(0.3 0.03 72); color: oklch(0.82 0.06 78); }
:root[data-theme="bedrock"] .tier.top { background: oklch(0.32 0.04 72); color: oklch(0.82 0.09 74); }
:root[data-theme="bedrock"] .tier.mid { background: oklch(0.34 0.04 62); color: oklch(0.80 0.07 62); }

.fmt {
  display: inline-block; font-family: var(--data); font-size: 11px;
  padding: 2px 8px; border: 1px solid currentColor; border-radius: 2px;
  color: var(--ink-2);
}

/* ── Field note, pinned/taped paper card ─────────────────────────────── */
.field-note {
  position: relative;
  padding: 26px 30px 22px;
  background: oklch(0.96 0.05 88);
  border: 1px solid oklch(0.55 0.06 70);
  box-shadow: 5px 6px 0 oklch(0.55 0.08 60 / 0.3);
  transform: rotate(-0.5deg);
  color: oklch(0.2 0.02 55);
}
:root[data-theme="bedrock"] .field-note { background: oklch(0.3 0.03 78); border-color: oklch(0.5 0.05 72); color: oklch(0.92 0.03 82); }
.field-note::before {
  content: "";
  position: absolute; inset: 14px 20px;
  background-image: repeating-linear-gradient(0deg, transparent 0 23px, oklch(0.55 0.06 60 / 0.16) 23px 24px);
  pointer-events: none;
}
.field-note .pin {
  position: absolute; top: -8px; left: 30px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--oxide-rust);
  box-shadow: inset -2px -2px 0 oklch(0.4 0.16 35), 0 2px 4px oklch(0.3 0.1 30 / 0.4);
}
.field-note .tape {
  position: absolute; top: -9px; right: 40px;
  width: 84px; height: 18px;
  background: oklch(0.84 0.13 88 / 0.7);
  border: 1px dashed oklch(0.5 0.08 60 / 0.5);
  transform: rotate(4deg);
}
.field-note h4 {
  position: relative;
  font-family: var(--display); font-style: italic; font-weight: 500;
  font-size: 21px; margin: 0 0 10px; letter-spacing: -0.01em;
}
.field-note p { position: relative; margin: 0 0 8px; font-family: var(--display); font-size: 16px; line-height: 1.5; }
.field-note em { font-style: italic; color: var(--oxide-rust); }
.field-note .byline {
  position: relative; margin-top: 12px;
  font-family: var(--data); font-size: 11px; color: var(--ink-3);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}

/* ── Generic card ─────────────────────────────────────────────────────── */
.card {
  background: var(--bone);
  border: 1px solid var(--rule-hard);
  padding: 24px 26px;
}
.card.hoverable { transition: border-color .12s, box-shadow .12s, transform .12s; }
.card.hoverable:hover { border-color: var(--ink); box-shadow: 5px 5px 0 oklch(0.2 0.02 60 / 0.12); }
.card h3 { font-family: var(--display); font-weight: 500; font-size: 22px; letter-spacing: -0.01em; margin: 0 0 8px; }
.card p { margin: 0; color: var(--ink-2); font-size: 15px; }
.card .kicker {
  font-family: var(--data); font-size: 11px; color: var(--ink-3);
  display: block; margin-bottom: 12px;
}

/* ── Treated photo, printed-in-a-zine duotone ────────────────────────── */
.photo {
  position: relative;
  border: 1px solid var(--ink);
  background: var(--paper-3);
  overflow: hidden;
}
.photo img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.06) brightness(1.02) sepia(0.32);
  mix-blend-mode: multiply;
}
.photo::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 1px 1px, oklch(0.2 0.02 60 / 0.35) 0.7px, transparent 1.3px) 0 0 / 4px 4px;
  mix-blend-mode: multiply;
  opacity: 0.35;
  pointer-events: none;
}
.photo .cap {
  position: absolute; left: 0; bottom: 0;
  font-family: var(--data); font-size: 11px; color: var(--paper);
  background: var(--ink); padding: 4px 10px;
  letter-spacing: 0;
}
:root[data-theme="bedrock"] .photo img { filter: grayscale(1) contrast(1.05) brightness(0.92) sepia(0.28); mix-blend-mode: screen; }

/* ── Footer ───────────────────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--ink); background: var(--bone); }
.footer-top {
  max-width: var(--shell); margin: 0 auto; padding: 48px var(--gutter) 36px;
  display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px;
}
.footer-brand .wm { font-family: var(--display); font-style: italic; font-size: 30px; letter-spacing: -0.03em; display: inline-flex; align-items: center; gap: 10px; }
.footer-brand .wm svg { width: 28px; height: 28px; }
.footer-brand p { margin: 14px 0 0; color: var(--ink-2); font-size: 14px; max-width: 34ch; }
.footer-dir h5 {
  font-family: var(--label); font-weight: 600; font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-3); margin: 0 0 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}
.footer-dir ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.footer-dir a { color: var(--link); font-size: 14px; }
.footer-dir a:hover { color: var(--link-hover); }
.footer-dir .ext::after { content: " ↗"; color: var(--ink-3); }

.daemon {
  max-width: var(--shell); margin: 0 auto; padding: 0 var(--gutter);
}
.daemon-inner {
  border: 1px solid var(--rule-hard);
  background: var(--paper-2);
  padding: 12px 16px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px;
  font-family: var(--data); font-size: 12px; color: var(--ink-2);
}
.daemon .pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--verdigris); color: var(--bone);
  padding: 2px 8px; border-radius: 2px;
  font-family: var(--label); font-weight: 600; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
}
.daemon .pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--bone); animation: blink 1.6s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .daemon .pill::before { animation: none; } }
.daemon b { color: var(--ink); font-weight: 400; }

.footer-bottom {
  border-top: 1px solid var(--rule);
  max-width: var(--shell); margin: 0 auto; padding: 18px var(--gutter);
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px;
  font-family: var(--label); font-weight: 600; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3);
}
.footer-bottom .rss {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--oxide-rust); color: var(--bone);
  padding: 2px 7px; border-radius: 2px; letter-spacing: 0.1em;
}
.footer-bottom .sep { color: var(--rule-hard); }
.footer-bottom a { color: var(--ink-2); }
.footer-bottom a:hover { color: var(--ink); }
.footer-bottom .right { margin-left: auto; display: inline-flex; gap: 18px; align-items: center; }

/* ── Strata break, full-bleed brown band (section divider) ───────────── */
.strata-break {
  background: var(--mid);
  color: var(--paper);
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  position: relative;
  overflow: hidden;
}
.strata-break.topsoil { background: var(--topsoil); }
.strata-break::before {
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(0deg, transparent 0 43px, oklch(1 0 0 / 0.05) 43px 44px);
  pointer-events: none;
}
.strata-break .sb-inner { position: relative; z-index: 1; padding: clamp(42px, 6vw, 70px) var(--gutter); }
.strata-break .sb-kicker {
  font-family: var(--data); font-size: 12px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--gate-ochre);
  margin: 0 0 18px; display: flex; align-items: center; gap: 10px;
}
.strata-break .sb-kicker::before { content: ""; width: 26px; border-top: 2px solid var(--gate-ochre); }
.strata-break .sb-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 28px 48px; align-items: end; }
.strata-break .sb-line {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(30px, 4.6vw, 54px); line-height: 1.03;
  letter-spacing: -0.015em; margin: 0; text-wrap: balance;
}
.strata-break .sb-line em { font-style: italic; color: var(--gate-ochre); }
.strata-break .sb-tags {
  display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center;
  font-family: var(--data); font-size: 12px; letter-spacing: 0.06em;
  text-transform: uppercase; color: oklch(0.9 0.03 82);
}
.strata-break .sb-tags .dot { color: var(--gate-ochre); }
.strata-break .sb-stamp-cell { display: flex; justify-content: flex-end; align-items: center; }
@media (max-width: 720px) { .strata-break .sb-stamp-cell { justify-content: flex-start; margin-top: 6px; } }
@media (max-width: 720px) {
  .strata-break .sb-grid { grid-template-columns: 1fr; align-items: start; }
}

/* Standalone centered field note (used as a section break) */
.field-note-wrap { max-width: 680px; margin: 0 auto; padding: clamp(44px, 6vw, 76px) var(--gutter); }

/* ── Marquee, one slow, tasteful ticker ──────────────────────────────── */
.marquee {
  overflow: hidden; white-space: nowrap;
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
  background: var(--ink); color: var(--paper);
  padding: 11px 0;
  font-family: var(--display); font-style: italic; font-size: 22px;
}
.marquee .track { display: inline-block; padding-left: 100%; animation: marquee 34s linear infinite; }
.marquee span { padding: 0 20px; }
.marquee .dot { color: var(--oxide-rust); }
.marquee em { color: var(--gate-ochre); font-style: italic; }
@keyframes marquee { to { transform: translateX(-100%); } }
.marquee:hover .track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .marquee .track { animation: none; padding-left: 0; }
}

/* ── Toast (konami feedback) ──────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%) translateY(20px);
  z-index: 200;
  background: var(--ink); color: var(--paper);
  border: 1px solid var(--gate-ochre);
  font-family: var(--data); font-size: 13px; letter-spacing: 0.1em;
  padding: 12px 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Utility ──────────────────────────────────────────────────────────── */
.stack-8 > * + * { margin-top: 8px; }
.stack-16 > * + * { margin-top: 16px; }
.stack-24 > * + * { margin-top: 24px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.muted { color: var(--ink-2); }
.center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper); padding: 10px 16px; z-index: 100;
  font-family: var(--label); text-transform: uppercase; letter-spacing: 0.12em; font-size: 12px;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav-links {
    position: absolute; top: 62px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--ink);
    padding: 8px var(--gutter) 16px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 4px; border-bottom: 1px solid var(--rule); }
  .nav-links a[aria-current="page"]::after { display: none; }
  .nav-cta { margin: 12px 0 0; }
  .nav-toggle { display: inline-flex; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom .right { margin-left: 0; width: 100%; }
}
