/* SEEDHOUSE stylesheet.
   Fixed chrome: paper + ink + Archivo. Everything brand-shaped arrives via
   CSS custom properties set by the seed runtime; the :root block below bakes
   the house seed (71ada1) so the first paint is composed before JS runs. */

/* ------------------------------------------------------------ tokens --- */
:root {
  --paper: #f5f5f2;
  --ink: #111111;
  --line: rgba(17, 17, 17, 0.16);
  --line-soft: rgba(17, 17, 17, 0.08);
  --wash: #ebebe5;
  --font-ui: "Archivo", system-ui, sans-serif;

  /* Seeded tokens, baked at the house seed for pre-JS paint. */
  --accent: #8a2333;
  --accent-rgb: 138 35 51;
  --font-display: "DM Serif Display", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --w-display: 400;
  --w-body: 400;
  --w-body-bold: 700;
  --track-display: 0em;
  --lh-display: 1.05;
  --fs-h1: clamp(43.25px, 6.007vw, 86.5px);
  --fs-pull: clamp(33.29px, 4.203vw, 60.53px);
  --fs-h2: clamp(31.42px, 3.636vw, 52.36px);
  --fs-h3: clamp(22.71px, 2.103vw, 30.28px);
  --sp-section: clamp(65.93px, 7.63vw, 109.88px);
  --sp-block: clamp(28px, 3.205vw, 46.15px);
  --r-btn: 2px;
  --r-card: 0px;
  --r-chip: 999px;
  --r-field: 2px;
  --r-plate: 0px;

  /* Easing shelf: every motion on this page uses one of these four. */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in: cubic-bezier(0.55, 0.06, 0.68, 0.19);
  --ease-swift: cubic-bezier(0.7, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.44, 1);
}

/* ------------------------------------------------------------- reset --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: var(--w-body);
  font-size: clamp(16px, 15.4px + 0.15vw, 17.5px);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: none;
}
h1, h2, h3, h4, blockquote, p, dl, dd, figure, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
a { color: inherit; }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.92em; }

::selection { background: var(--accent); color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}
.site-foot :focus-visible { outline-color: var(--paper); }

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 30;
  background: var(--ink); color: var(--paper);
  padding: 10px 16px; text-decoration: none;
  font-family: var(--font-ui); font-size: 13px;
  transition: top 0.25s var(--ease-out);
}
.skip-link:focus { top: 12px; }

.wrap { max-width: 1300px; margin-inline: auto; padding-inline: clamp(20px, 4.6vw, 68px); }

[hidden] { display: none !important; }

/* ------------------------------------------------------------ header --- */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: rgba(245, 245, 242, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.head-row {
  display: flex; align-items: center; gap: clamp(14px, 3vw, 40px);
  min-height: 64px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.brand-word, .foot-word {
  font-family: var(--font-ui); font-weight: 700;
  letter-spacing: 0.14em; font-size: 15px;
}
.head-mark svg, .foot-mark svg { width: 26px; height: 26px; }
.head-mark svg .mk-guides { display: none; }

.site-nav {
  display: flex; gap: clamp(12px, 2vw, 26px);
  margin-inline: auto;
}
.site-nav a {
  font-family: var(--font-ui); font-size: 13px; font-weight: 500;
  letter-spacing: 0.04em; text-decoration: none;
  padding-block: 6px;
  background-image: linear-gradient(var(--ink), var(--ink));
  background-repeat: no-repeat;
  background-size: 0% 1.5px;
  background-position: left calc(100% - 2px);
  transition: background-size 0.32s var(--ease-swift);
}
.site-nav a:hover { background-size: 100% 1.5px; }

.head-tools { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; }
.seed-chip {
  font-family: var(--font-ui); font-size: 12px; font-weight: 500;
  letter-spacing: 0.08em;
  border: 1px solid var(--line);
  border-radius: var(--r-chip);
  padding: 6px 12px;
  white-space: nowrap;
  transition: border-color 0.3s var(--ease-swift);
}
.seed-digits, .seed-inline {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.05em;
  transition: color 0.3s var(--ease-swift);
}
.sd { display: inline-block; min-width: 0.62em; text-align: center;
  transition: transform 0.16s var(--ease-swift), opacity 0.16s var(--ease-swift); }
.sd.tick { transform: translateY(-0.14em); opacity: 0.3; }

/* ----------------------------------------------------------- buttons --- */
.btn {
  font-family: var(--font-ui); font-weight: 600; font-size: 14px;
  letter-spacing: 0.02em;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink); color: var(--paper);
  padding: 14px 26px;
  border-radius: var(--r-btn);
  transition: background-color 0.34s var(--ease-swift), transform 0.34s var(--ease-spring);
}
.btn-primary:hover { background: var(--accent); transform: translateY(-2px); }
.btn-primary:active { transform: translateY(0); transition-duration: 0.12s; }
.btn-mint {
  border: 1.5px solid var(--ink);
  padding: 8px 16px;
  border-radius: var(--r-btn);
  font-size: 13px;
  transition: color 0.3s var(--ease-swift), border-color 0.3s var(--ease-swift), box-shadow 0.3s var(--ease-out);
}
.btn-mint:hover { color: var(--accent); border-color: var(--accent); box-shadow: 3px 3px 0 rgba(var(--accent-rgb) / 0.25); }
.btn-ghost {
  padding: 14px 8px;
  font-weight: 500;
  border-bottom: 1.5px solid var(--line);
  border-radius: 0;
  transition: border-color 0.3s var(--ease-swift);
}
.btn-ghost .ghost-arrow { display: inline-block; transition: transform 0.34s var(--ease-spring); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-ghost:hover .ghost-arrow { transform: translateX(5px); }
.btn-wear {
  margin-top: 18px;
  font-size: 13px; font-weight: 600;
  padding: 9px 16px;
  border-radius: var(--r-btn);
  border: 1px solid var(--line);
  background: transparent;
  transition: background-color 0.3s var(--ease-swift), border-color 0.3s var(--ease-swift);
}
.btn-wear:hover { background: rgba(var(--accent-rgb) / 0.08); border-color: var(--accent); }

/* -------------------------------------------------------------- hero --- */
.hero { padding-block: clamp(48px, 7vw, 104px) var(--sp-section); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 88px);
  align-items: center;
}
.eyebrow {
  font-family: var(--font-ui); font-size: 12px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(17, 17, 17, 0.62);
  margin-bottom: clamp(18px, 2.4vw, 30px);
  text-wrap: balance;
}
h1 {
  font-family: var(--font-display); font-weight: var(--w-display);
  font-size: var(--fs-h1);
  line-height: var(--lh-display);
  letter-spacing: var(--track-display);
  text-wrap: balance;
  max-width: 16ch;
}
.hero-sub {
  margin-top: clamp(20px, 2.6vw, 32px);
  font-size: clamp(17px, 1.32vw, 19px);
  max-width: 52ch;
  text-wrap: pretty;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; margin-top: clamp(24px, 3vw, 40px); }
.hero-visit {
  margin-top: clamp(22px, 2.8vw, 36px);
  font-family: var(--font-ui); font-size: 13px;
  letter-spacing: 0.02em;
  color: rgba(17, 17, 17, 0.66);
  border-left: 2px solid var(--accent);
  padding-left: 14px;
  max-width: 46ch;
  text-wrap: balance;
  transition: border-color 0.3s var(--ease-swift);
}

.mark-stage { display: grid; justify-items: center; gap: 16px; }
.mark-plinth {
  width: min(100%, 380px);
  aspect-ratio: 1;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-plate);
  padding: clamp(28px, 3.4vw, 48px);
  position: relative;
}
.mark-plinth svg { width: 100%; height: auto; color: var(--ink); --mk-accent: var(--accent); --mk-paper: var(--paper); }
.mark-plinth .mk-guides { opacity: 0.14; }
.mark-plate {
  font-family: var(--font-ui); font-size: 12px; letter-spacing: 0.06em;
  color: rgba(17, 17, 17, 0.6);
  border: 1px solid var(--line);
  border-radius: var(--r-chip);
  padding: 6px 14px;
}

/* ---------------------------------------------------------- sections --- */
.section { padding-block: var(--sp-section); }
.sec-head {
  display: flex; align-items: baseline; gap: 18px;
  margin-bottom: var(--sp-block);
}
.sec-no {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px; font-weight: 600;
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: var(--r-chip);
  padding: 4px 10px;
  transition: color 0.3s var(--ease-swift);
}
h2 {
  font-family: var(--font-display); font-weight: var(--w-display);
  font-size: var(--fs-h2);
  line-height: 1.12;
  letter-spacing: var(--track-display);
  text-wrap: balance;
}
h3 {
  font-family: var(--font-display); font-weight: var(--w-display);
  font-size: var(--fs-h3); line-height: 1.2;
  letter-spacing: var(--track-display);
  text-wrap: balance;
}
.sec-intro { max-width: 62ch; text-wrap: pretty; margin-bottom: var(--sp-block); }

/* --------------------------------------------------------- manifesto --- */
.manifesto { border-top: 1px solid var(--line); }
.manifesto-body { max-width: 1060px; }
.lede {
  font-size: clamp(19px, 1.66vw, 24px);
  line-height: 1.5;
  max-width: 34em;
  text-wrap: pretty;
}
.prose-cols {
  margin-top: var(--sp-block);
  columns: 2; column-gap: clamp(28px, 4vw, 64px);
}
.prose-cols p {
  break-inside: avoid;
  max-width: 38em;
  text-wrap: pretty;
}
.prose-cols p + p { margin-top: 1.2em; }
.pull {
  margin-block: var(--sp-block);
  padding-block: clamp(18px, 2.4vw, 30px);
  border-top: 2px solid var(--accent);
  border-bottom: 1px solid var(--line);
  transition: border-color 0.3s var(--ease-swift);
}
.pull p {
  font-family: var(--font-display); font-weight: var(--w-display);
  font-size: var(--fs-pull);
  line-height: 1.16;
  letter-spacing: var(--track-display);
  text-wrap: balance;
  max-width: 22ch;
}

/* --------------------------------------------------------------- lab --- */
.lab {
  background: var(--wash);
  border-block: 1px solid var(--line);
}
.lab-lead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(24px, 3.4vw, 56px);
  align-items: start;
  margin-bottom: var(--sp-block);
}
.lab-lead .sec-intro { margin-bottom: 0; }
.lab-console {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  padding: clamp(18px, 2.4vw, 28px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}
.console-label {
  font-family: var(--font-ui); font-size: 12px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
}
.console-field {
  display: inline-flex; align-items: center;
  border: 1.5px solid var(--ink);
  border-radius: var(--r-field);
  background: var(--paper);
  padding-left: 12px;
  transition: border-color 0.3s var(--ease-swift), box-shadow 0.3s var(--ease-out);
}
.console-field:focus-within { border-color: var(--accent); box-shadow: 3px 3px 0 rgba(var(--accent-rgb) / 0.2); }
.console-hash { font-family: ui-monospace, Menlo, monospace; opacity: 0.45; font-size: 18px; }
#seed-input {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: clamp(20px, 2vw, 26px);
  letter-spacing: 0.18em;
  width: 9.5ch;
  border: 0; background: transparent;
  padding: 10px 12px 10px 6px;
}
#seed-input:focus { outline: none; }
.console-hint {
  flex-basis: 100%;
  font-family: var(--font-ui); font-size: 12.5px;
  color: rgba(17, 17, 17, 0.55);
  margin-top: 2px;
  max-width: 72ch;
}

/* pipeline */
.pipeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  counter-reset: stage;
  margin-bottom: var(--sp-block);
}
.stage {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 18px 18px 16px;
  position: relative;
  display: flex; flex-direction: column; gap: 12px;
}
.stage:not(:first-child)::before {
  content: "";
  position: absolute; left: -12px; top: 50%;
  width: 10px; height: 10px;
  border-top: 2px solid var(--ink);
  border-right: 2px solid var(--ink);
  transform: translateY(-50%) rotate(45deg);
  opacity: 0.5;
}
.stage-title {
  font-family: var(--font-ui); font-size: 12px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  display: flex; align-items: center; gap: 8px;
}
.stage-no {
  font-family: ui-monospace, Menlo, monospace;
  color: var(--accent);
  font-size: 11px;
  text-transform: none;
  transition: color 0.3s var(--ease-swift);
}
.stage-note {
  font-family: var(--font-ui); font-size: 12px; line-height: 1.5;
  color: rgba(17, 17, 17, 0.55);
  margin-top: auto;
}
.stage-seed { display: flex; gap: 6px; margin-block: auto; }
.stage-seed .cell {
  flex: 1; aspect-ratio: 0.86;
  display: grid; place-items: center;
  border: 1.5px solid var(--ink);
  border-radius: var(--r-field);
  font-family: ui-monospace, Menlo, monospace;
  font-size: clamp(18px, 1.5vw, 24px); font-weight: 600;
}
.bit-grid {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px;
  margin-block: auto;
}
.bit {
  aspect-ratio: 1;
  border: 1px solid var(--ink);
  border-radius: 1px;
  transition: background-color 0.3s var(--ease-swift);
}
.bit.on { background: var(--ink); }
.stream { display: grid; gap: 6px; }
.stream li {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11.5px;
  display: grid; grid-template-columns: 84px 1fr; gap: 8px;
  align-items: baseline;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 5px;
}
.stream .u { opacity: 0.55; white-space: nowrap; }
.stream .landed { text-align: right; }
.stream .landed { font-weight: 600; color: var(--accent); transition: color 0.3s var(--ease-swift); }

.stage-result { border: 1.5px solid var(--ink); }
.mini-brand { display: grid; gap: 10px; justify-items: start; }
.mini-brand svg { width: 64px; height: 64px; color: var(--ink); --mk-accent: var(--accent); --mk-paper: var(--paper); }
.mini-brand .mb-name {
  font-family: var(--font-display); font-weight: var(--w-display);
  font-size: 22px; letter-spacing: var(--track-display);
}
.mini-brand .mb-no {
  font-family: ui-monospace, Menlo, monospace; font-size: 12px;
  color: var(--accent);
  transition: color 0.3s var(--ease-swift);
}
.mini-brand .mb-rule { width: 64px; height: 3px; background: var(--accent); transition: background-color 0.3s var(--ease-swift); }

/* shelves */
.shelves-title {
  font-family: var(--font-ui); font-size: 13px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
}
.shelves-note {
  font-family: var(--font-ui); font-size: 13px;
  color: rgba(17, 17, 17, 0.55);
  margin: 6px 0 22px;
}
.mine-note {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  color: var(--accent);
  margin: -14px 0 22px;
  min-height: 1.2em;
  transition: color 0.3s var(--ease-swift);
}
.mine-note:empty { margin-block: 0 8px; }
.shelf { border-top: 1px solid var(--line); padding-block: 14px; display: grid; grid-template-columns: 180px 1fr; gap: 12px; align-items: start; }
.shelf h4 {
  font-family: var(--font-ui); font-size: 12px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding-top: 8px;
}
.shelf-count { opacity: 0.4; margin-left: 6px; font-weight: 500; }
.shelf-items { display: flex; flex-wrap: wrap; gap: 8px; }
.shelf-item {
  font-family: var(--font-ui); font-size: 12.5px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-chip);
  padding: 7px 13px;
  background: var(--paper);
  transition: border-color 0.28s var(--ease-swift), background-color 0.28s var(--ease-swift);
}
.shelf-item:hover { border-color: var(--ink); }
.shelf-item[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.shelf-item[aria-pressed="true"] .shelf-label { color: var(--accent); font-weight: 600; }
.shelf-dot { width: 13px; height: 13px; border-radius: 50%; }
.stance-glyph { display: inline-flex; gap: 3px; }
.stance-glyph i { width: 11px; height: 11px; border: 1.5px solid var(--ink); display: block; }
.shelf-glyph svg { width: 20px; height: 20px; color: var(--ink); --mk-accent: var(--ink); --mk-paper: var(--paper); }
.shelf-glyph svg .mk-guides { display: none; }
.shelf-sub { opacity: 0.5; font-family: ui-monospace, Menlo, monospace; font-size: 11px; }

/* plaque: certificate of growth + poster panel */
.lab-close {
  margin-top: var(--sp-block);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(24px, 3.4vw, 56px);
  align-items: start;
}
.plaque {
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: var(--r-plate);
  padding: clamp(20px, 2.6vw, 34px);
  position: relative;
}
.poster-panel {
  padding-top: 6px;
  display: grid; gap: 14px; justify-items: start;
  max-width: 46ch;
}
.poster-title {
  font-family: var(--font-ui); font-size: 13px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
}
.poster-panel p { font-size: 15px; text-wrap: pretty; }
.poster-sub { font-family: var(--font-ui); font-size: 13px; color: rgba(17, 17, 17, 0.6); }
.poster-note {
  font-family: var(--font-ui); font-size: 12.5px;
  color: rgba(17, 17, 17, 0.55);
  min-height: 1.2em;
}
@media (max-width: 1080px) {
  .lab-close { grid-template-columns: 1fr; }
}
.plaque::after {
  content: "";
  position: absolute; inset: 6px;
  border: 1px solid var(--line);
  border-radius: inherit;
  pointer-events: none;
}
.plaque-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 12px; margin-bottom: 14px;
  transition: border-color 0.3s var(--ease-swift);
}
.plaque-title {
  font-family: var(--font-ui); font-size: 12px; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
}
.plaque-no {
  font-family: ui-monospace, Menlo, monospace; font-size: 15px; font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  transition: color 0.3s var(--ease-swift);
}
.plaque-rows { display: grid; gap: 0; }
.plaque-row {
  display: grid; grid-template-columns: 34px 1fr 1fr; gap: 10px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px;
  padding-block: 7px;
  border-bottom: 1px dashed var(--line);
}
.plaque-row .pr-shelf { opacity: 0.55; }
.plaque-row .pr-landed { font-weight: 600; text-align: right; }
.plaque-foot {
  margin-top: 14px;
  font-family: var(--font-ui); font-size: 12px; line-height: 1.5;
  color: rgba(17, 17, 17, 0.6);
  display: flex; justify-content: space-between; align-items: end; gap: 16px;
}
.plaque-stamp svg { width: 38px; height: 38px; color: var(--accent); --mk-accent: var(--accent); --mk-paper: var(--paper); }
.plaque-stamp svg .mk-guides { display: none; }

/* --------------------------------------------------------- specimens --- */
.specimen {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(24px, 4vw, 72px);
  align-items: center;
  padding-block: var(--sp-block);
}
.specimen + .specimen { border-top: 1px solid var(--line); }
.specimen.flip .specimen-plate { order: 2; }
.specimen.flip .specimen-story { order: 1; }

.specimen-plate {
  /* Scoped identity: --sp-* custom props are set inline by the runtime
     from the specimen's own registered seed. */
  border: 1px solid var(--line);
  border-radius: var(--sp-r-card, 2px);
  background: var(--paper);
  padding: clamp(24px, 3vw, 40px);
  display: grid; gap: 14px; justify-items: center;
  text-align: center;
  box-shadow: 6px 6px 0 rgba(17, 17, 17, 0.05);
}
.sp-mark svg { width: clamp(84px, 9vw, 116px); height: auto; color: var(--ink); }
.sp-mark svg .mk-guides { opacity: 0.12; }
.sp-name {
  font-family: var(--sp-display, var(--font-ui));
  font-weight: var(--sp-dw, 600);
  font-size: clamp(26px, 2.6vw, 36px);
  line-height: 1.08;
  letter-spacing: var(--sp-track, 0);
  text-wrap: balance;
}
.sp-tag {
  font-family: var(--sp-body, var(--font-ui));
  font-size: 15px;
  color: rgba(17, 17, 17, 0.68);
}
.sp-tokens {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 7px;
  margin-top: 6px;
}
.sp-tokens li {
  font-family: var(--font-ui); font-size: 11px; font-weight: 500;
  letter-spacing: 0.05em;
  border: 1px solid var(--line);
  border-radius: var(--sp-r-chip, 999px);
  padding: 4px 10px;
  display: inline-flex; align-items: center; gap: 6px;
}
.sp-tokens .tk-dot { width: 10px; height: 10px; border-radius: 50%; }
.sp-tokens .tk-no { font-family: ui-monospace, Menlo, monospace; font-weight: 600; }

.specimen-story h3 { max-width: 16ch; }
.sp-kind {
  font-family: var(--font-ui); font-size: 12px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(17, 17, 17, 0.55);
  margin: 8px 0 16px;
}
.specimen-story > p:not(.sp-kind):not(.sp-reg) { max-width: 58ch; text-wrap: pretty; }
.sp-reg {
  margin-top: 14px;
  font-family: var(--font-ui); font-size: 13px;
  color: rgba(17, 17, 17, 0.6);
}
.sp-reg code { color: var(--accent); font-weight: 600; transition: color 0.3s var(--ease-swift); }

/* ------------------------------------------------------------ studio --- */
.studio { background: var(--paper); border-top: 1px solid var(--line); }
.studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}
.studio-grid .sec-head { margin-bottom: 0; }
.studio-copy p + p { margin-top: 1.1em; max-width: 46ch; text-wrap: pretty; }
.studio-copy .lede { font-size: clamp(18px, 1.5vw, 22px); }
.studio-details { display: grid; gap: 0; border-top: 2px solid var(--ink); }
.studio-details > div {
  display: grid; grid-template-columns: 110px 1fr; gap: 12px;
  padding-block: 12px;
  border-bottom: 1px solid var(--line);
}
.studio-details dt {
  font-family: var(--font-ui); font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(17, 17, 17, 0.55);
  padding-top: 3px;
}
.studio-details dd { font-size: 15px; }
.studio-details a { text-decoration-color: var(--accent); text-underline-offset: 3px;
  transition: color 0.3s var(--ease-swift); }
.studio-details a:hover { color: var(--accent); }

/* ------------------------------------------------------------ footer --- */
.site-foot {
  background: var(--ink); color: var(--paper);
  padding-block: clamp(44px, 5vw, 72px) clamp(28px, 3vw, 44px);
}
.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 26px clamp(28px, 5vw, 80px);
  align-items: start;
}
.foot-brand { display: flex; align-items: center; gap: 12px; }
.foot-mark svg { width: 30px; height: 30px; color: var(--paper); --mk-accent: var(--paper); --mk-paper: var(--ink); }
.foot-mark svg .mk-guides { display: none; }
.foot-word { font-size: 17px; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: end; }
.foot-nav a {
  font-family: var(--font-ui); font-size: 13px;
  color: rgba(245, 245, 242, 0.75);
  text-decoration: none;
  transition: color 0.28s var(--ease-swift);
}
.foot-nav a:hover { color: var(--paper); }
.colophon {
  grid-column: 1 / -1;
  font-family: var(--font-ui); font-size: 13px;
  color: rgba(245, 245, 242, 0.66);
  border-top: 1px solid rgba(245, 245, 242, 0.18);
  padding-top: 20px;
  max-width: 72ch;
}
.fine {
  grid-column: 1 / -1;
  font-family: var(--font-ui); font-size: 11.5px;
  color: rgba(245, 245, 242, 0.4);
  max-width: 78ch;
}

/* ----------------------------------------------- mint choreography ----- */
/* Phase 1: molt. Brand surfaces exhale before the new identity lands. */
.brand-surface {
  transition: opacity 0.26s var(--ease-in), transform 0.26s var(--ease-in);
}
html.is-molting .brand-surface {
  opacity: 0;
  transform: translateY(10px);
}
/* Phase 2: growth. Surfaces re-enter staggered; marks redraw stroke by stroke. */
html.is-growing .brand-surface {
  transition: opacity 0.55s var(--ease-out) var(--d, 0s), transform 0.55s var(--ease-out) var(--d, 0s);
  opacity: 1;
  transform: none;
}
/* Mark redraw: strokes carry pathLength=1; runtime sets inline start values
   then releases them so these become the transition targets. */
.mk-stroke {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.8s var(--ease-out) var(--d, 0s);
}
.mk-fill {
  opacity: 1;
  transform: scale(1);
  transform-origin: 60px 60px;
  transition: opacity 0.45s var(--ease-out) var(--d, 0s), transform 0.6s var(--ease-spring) var(--d, 0s);
}
.mk-guides {
  opacity: 0.14;
  transition: opacity 0.5s var(--ease-swift);
}
html.is-growing .mark-plinth .mk-guides { opacity: 0.32; }

/* ------------------------------------------------------------- guide --- */
.guide-hero { padding-block: clamp(44px, 6vw, 88px) clamp(24px, 4vw, 56px); }
.guide-hero .hero-sub { max-width: 62ch; }
.code {
  background: var(--ink);
  color: #e8e8e2;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px;
  line-height: 1.65;
  padding: 18px 22px;
  border-radius: var(--r-field);
  overflow-x: auto;
  margin: 0;
  max-width: 720px;
}
.code code { font-size: inherit; }
.g-step { padding-block: clamp(22px, 3vw, 36px); border-top: 1px solid var(--line); display: grid; gap: 14px; }
.g-step:first-of-type { border-top: 0; }
.g-step h3 { display: flex; align-items: baseline; gap: 12px; }
.g-no {
  font-family: ui-monospace, Menlo, monospace; font-size: 14px;
  color: var(--accent);
  transition: color 0.3s var(--ease-swift);
}
.g-step p { max-width: 62ch; text-wrap: pretty; }
.g-step-mark {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(24px, 3.4vw, 56px); align-items: start;
}
.g-step-mark > div { display: grid; gap: 14px; }
.g-mark-demo { display: grid; gap: 12px; justify-items: center; }
.g-mark-demo .mark-plinth { width: min(100%, 300px); background: var(--paper); }
.g-args { display: grid; gap: clamp(24px, 3vw, 40px); max-width: 860px; }
.g-arg { border-left: 2px solid var(--accent); padding-left: clamp(16px, 2vw, 28px); display: grid; gap: 12px;
  transition: border-color 0.3s var(--ease-swift); }
.g-arg p { max-width: 60ch; text-wrap: pretty; }
.g-gamut { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.g-swatch {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-ui); font-size: 11.5px;
  border: 1px solid var(--line);
  border-radius: var(--r-chip);
  padding: 5px 11px;
}
.g-swatch i { width: 12px; height: 12px; border-radius: 50%; display: block; }
.g-swatch b { font-weight: 600; }
.g-swatch u { text-decoration: none; opacity: 0.55; font-family: ui-monospace, Menlo, monospace; font-size: 10.5px; }
.g-swatch.active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.g-passes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 32px); }
.g-pass {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: clamp(18px, 2.2vw, 28px);
  display: grid; gap: 10px; align-content: start;
}
.g-pass:nth-child(2) { border-top: 3px solid var(--accent); margin-top: 26px; }
.g-pass:first-child { border-top: 3px solid var(--ink); }
.g-pass:last-child { border-top: 3px solid var(--line); margin-top: 52px; }
.g-pass p { font-size: 14.5px; text-wrap: pretty; }
@media (max-width: 940px) {
  .g-step-mark { grid-template-columns: 1fr; }
  .g-passes { grid-template-columns: 1fr; }
  .g-pass:nth-child(2), .g-pass:last-child { margin-top: 0; }
}

/* Invalid seed feedback on the console. */
@keyframes console-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  55% { transform: translateX(4px); }
  80% { transform: translateX(-2px); }
}
.lab-console.shake { animation: console-shake 0.32s var(--ease-swift); }

/* ------------------------------------------------------------ mobile --- */
@media (max-width: 1080px) {
  .lab-lead { grid-template-columns: 1fr; }
}
@media (max-width: 940px) {
  .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage:nth-child(3)::before { display: none; }
  .studio-grid { grid-template-columns: 1fr; }
  .specimen { grid-template-columns: 1fr; align-items: start; }
  .specimen.flip .specimen-plate { order: 0; }
  .specimen.flip .specimen-story { order: 0; }
  .prose-cols { columns: 1; }
}
@media (max-width: 760px) {
  .head-row { flex-wrap: wrap; row-gap: 0; padding-block: 10px; }
  .site-nav {
    order: 3; flex-basis: 100%;
    overflow-x: auto;
    margin-inline: 0;
    padding-block: 8px 2px;
    scrollbar-width: none;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .mark-stage { justify-items: start; }
  .mark-plinth { width: min(100%, 320px); }
  .hero { padding-top: 36px; }
  .pipeline { grid-template-columns: 1fr; }
  .stage:not(:first-child)::before {
    left: 22px; top: -12px;
    transform: rotate(135deg);
  }
  .shelf { grid-template-columns: 1fr; gap: 8px; }
  .shelf h4 { padding-top: 0; }
  .lab-console { align-items: stretch; }
  .lab-console .btn-primary { flex: 1; }
  .foot-grid { grid-template-columns: 1fr; }
  .foot-nav { justify-content: start; }
  .plaque-row { grid-template-columns: 26px 1fr; row-gap: 2px; }
  .plaque-row .pr-landed { grid-column: 2; text-align: left; }
}
@media (max-width: 420px) {
  .hero-cta .btn-primary { width: 100%; }
  .seed-chip { display: none; }
}

/* --------------------------------------------------- reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
