/* janechain.art — the public site.
   An old terminal buried in a jungle: phosphor on near-black green, vines
   as line work that grow the way a chain of work grows.
   Separate from style.css / next.css / public.css, which belong to the app
   (and to the setup and welcome pages) and are not touched here. */

:root {
  --bg: #060a07;
  --bg-2: #0a120c;
  --bg-3: #0f1a12;
  --text: #dde6da;          /* body copy: off-white, never green-on-black */
  --muted: #a3b5a5;         /* ≈ 8:1 on --bg */
  --faint: #6d8471;         /* labels only, never paragraphs */
  --phosphor: #c9c8c1;       /* warm light grey: an old screen, not a hacker's */
  --phosphor-dim: #8f8e88;
  --amber: #ffb547;
  --leaf-1: #0d1510;       /* almost the page: leaves read as line work */
  --leaf-2: #26382b;
  --leaf-3: #a4b8a1;       /* sage-grey line */
  --rule: rgba(201, 200, 193, 0.16);
  --glow: none;
  --gutter: 16px;
  --measure: 40rem;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
@media (min-width: 700px) { :root { --gutter: 40px; } }
@media (min-width: 1200px) { :root { --gutter: 64px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* The scrollbar sits outside the vignette, so it's coloured to match the page
   rather than showing as a lighter strip down the right-hand edge. */
html:has(body.site) { background: var(--bg); scrollbar-color: #2b322d var(--bg); scrollbar-width: thin; }
html:has(body.site)::-webkit-scrollbar { width: 10px; background: var(--bg); }
html:has(body.site)::-webkit-scrollbar-thumb { background: #2b322d; border: 3px solid var(--bg); border-radius: 6px; }
html:has(body.site)::-webkit-scrollbar-track { background: var(--bg); }
html, body { margin: 0; }
body.site {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
@media (min-width: 700px) { body.site { font-size: 18px; } }

/* CRT: faint scanlines and a vignette over everything; never in the way. */
body.site::before, body.site::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
}
body.site::before {
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0) 0 2px, rgba(0, 0, 0, 0.16) 2px 3px);
  mix-blend-mode: multiply;
}
body.site::after {
  background: radial-gradient(ellipse at 50% 45%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.55) 100%);
}

a { color: var(--phosphor); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-shadow: var(--glow); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img { max-width: 100%; height: auto; display: block; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 60;
  padding: 8px 12px; background: var(--phosphor); color: var(--bg); font: 500 14px var(--mono); text-decoration: none;
}
.skip:focus { top: 12px; }

.prompt-sign { color: var(--phosphor); }
.cursor { color: var(--phosphor); animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ── Top bar ─────────────────────────────────────────────── */
.bar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 14px var(--gutter);
  padding-top: max(14px, env(safe-area-inset-top));
  font: 500 13px/1.2 var(--mono);
  letter-spacing: 0.06em;
  background: linear-gradient(to bottom, rgba(6, 10, 7, 0.96), rgba(6, 10, 7, 0.82));
  border-bottom: 1px solid var(--rule);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.bar a { text-decoration: none; }
/* Top left: who made it (as before). Top right: the menu. */
.bar-meta { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text); opacity: 0.85; }
a.bar-meta:hover { opacity: 1; }
.menu-toggle, .menu-close {
  margin: 0 0 0 auto; padding: 0; background: none; border: 0; cursor: pointer;
  font: 500 12px/1.2 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text);
}
.menu-toggle::before { content: "≡ "; opacity: 0.55; }
.menu-toggle.is-opening::before { content: none; }
.menu-toggle.is-opening::after { content: "_"; }
.menu-toggle:hover, .menu-close:hover { color: var(--phosphor); }
/* Back to the homepage, from any other page: just left of Menu. */
.bar-home-link { margin-left: auto; font: 500 12px/1.2 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text); }
.bar-home-link:hover { color: var(--phosphor); }
.menu-toggle.is-after-home { margin-left: 28px; }
/* Each item stays on one line. On a phone there's no room for all three,
   so the home link steps aside: the menu has JaneChain in it. */
.bar-meta, .bar-home-link, .menu-toggle { white-space: nowrap; }
@media (max-width: 480px) {
  .bar-home-link { display: none; }
  .menu-toggle.is-after-home { margin-left: auto; }
}

/* ── Glitch: momentary, on hover and on page transitions ─── */
@keyframes glitch {
  0% { text-shadow: 2px 0 rgba(255, 181, 71, 0.7), -2px 0 rgba(201, 200, 193, 0.7); transform: translateX(0); }
  25% { text-shadow: -2px 0 rgba(255, 181, 71, 0.7), 2px 0 rgba(201, 200, 193, 0.7); transform: translateX(1px); }
  50% { text-shadow: 1px 0 rgba(255, 181, 71, 0.5), -1px 0 rgba(201, 200, 193, 0.5); transform: translateX(-1px); }
  100% { text-shadow: none; transform: none; }
}
.cd:hover .cd-cmd, .btn:hover, .foot-nav a:hover { animation: glitch 220ms steps(3) 1; }
@keyframes flicker { 0% { opacity: 1; } 20% { opacity: 0.55; } 40% { opacity: 1; } 60% { opacity: 0.8; } 100% { opacity: 1; } }
body.is-cd main { animation: flicker 180ms steps(4) 1; }
body.is-leaving main, body.is-leaving .foot { opacity: 0; transition: opacity 120ms ease; }

/* ── Page frame ──────────────────────────────────────────── */
.page {
  position: relative;
  padding: 0 var(--gutter);
  padding-left: calc(var(--gutter) + 28px);   /* room for the edge vine */
  max-width: 64rem;                             /* about the width of the content, so the column sits centred */
  margin: 0 auto;
}
@media (min-width: 700px) { .page { padding-left: calc(var(--gutter) + 56px); } }
/* Wide screens: a little more room on the left, so the leaves can hang. */
@media (min-width: 1200px) { .page { padding-left: calc(var(--gutter) + 112px); } }

.page-head { padding: 9vh 0 4vh; max-width: 58rem; }
.h1 {
  margin: 0;
  font: 500 clamp(34px, 6.4vw, 76px)/1.04 var(--mono);
  letter-spacing: -0.03em;
  color: var(--phosphor);
  text-shadow: var(--glow);
  text-wrap: balance;
}
.h1-def { font-size: clamp(28px, 4.4vw, 54px); line-height: 1.12; letter-spacing: -0.02em; }
.lede { margin: 28px 0 0; max-width: var(--measure); font-size: 1.15em; color: var(--text); }

.block { padding: 4.5vh 0; max-width: 52rem; }
.block-wide { max-width: none; }
.h2 {
  margin: 0 0 22px;
  font: 600 clamp(22px, 2.6vw, 30px)/1.2 var(--mono);
  letter-spacing: -0.01em;
  color: var(--phosphor);
  text-shadow: 0 0 10px rgba(201, 200, 193, 0.25);
}
.h2-label { display: block; margin-bottom: 8px; font: 500 12px/1 var(--mono); letter-spacing: 0.14em; color: var(--amber); }
.h2-label::before { content: "/ "; }
.prose { max-width: var(--measure); }
.prose p, p.prose { margin: 0 0 1em; }
.prose-note { max-width: var(--measure); font-size: 0.9em; color: var(--muted); }

h3 { margin: 0 0 4px; font: 500 1em/1.4 var(--sans); color: #fff; }

.points { list-style: none; margin: 0; padding: 0; max-width: var(--measure); }
.points li { position: relative; padding: 0 0 1.4em 30px; }
.points li p { margin: 0; color: var(--text); }
.points li::before {
  content: "+"; position: absolute; left: 0; top: 0;
  font: 600 1em/1.4 var(--mono); color: var(--phosphor);
}

.btn {
  display: inline-block;
  padding: 12px 18px;
  border: 1px solid var(--phosphor);
  font: 500 15px/1.3 var(--mono);
  color: var(--phosphor);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.btn:hover { background: rgba(201, 200, 193, 0.08); }

/* ── Onward (cd) links ───────────────────────────────────── */
/* Where next: a row of cards at the end of each page. */
.onward { padding: 10vh 0 2vh; }
.onward-label { margin: 0 0 16px; font: 500 11px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); }
.onward ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 700px) { .onward ul { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); } }
.cd {
  position: relative; display: flex; flex-direction: column; gap: 8px; height: 100%;
  padding: 24px 56px 24px 24px; text-decoration: none;
  border: 1px solid var(--rule); background: rgba(12, 18, 14, 0.5);
  transition: border-color 160ms, background 160ms;
}
.cd:hover, .cd:focus-visible { border-color: rgba(201, 200, 193, 0.45); background: rgba(20, 28, 22, 0.7); outline: none; }
.cd-cmd { font: 500 clamp(17px, 1.6vw, 21px)/1.3 var(--mono); color: var(--phosphor); }
.cd-cmd::before { content: "> "; color: var(--faint); }
.cd-text { font-size: 0.92em; color: var(--muted); }
.cd:hover .cd-text { color: var(--text); }
.cd-arrow { position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font: 500 18px var(--mono); color: var(--faint); transition: transform 160ms, color 160ms; }
.cd:hover .cd-arrow, .cd:focus-visible .cd-arrow { color: var(--phosphor); transform: translate(4px, -50%); }

/* ── Footer: a full-width band of its own, not part of the reading column ── */
.foot {
  margin-top: 10vh;
  background: linear-gradient(to bottom, rgba(12, 18, 14, 0.92), rgba(6, 10, 7, 1));
  border-top: 1px solid var(--rule);
  font-size: 14px;
  color: var(--muted);
}
/* Edge to edge, on the same side margins as the top bar. */
.foot-inner, .foot-base { padding-left: var(--gutter); padding-right: var(--gutter); }
.foot-inner { display: grid; gap: 36px 48px; padding-top: 56px; padding-bottom: 48px; align-items: start; }
@media (min-width: 760px) { .foot-inner { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.foot-label { margin: 0 0 16px; font: 500 11px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); }
.foot-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font: 500 13px/1.4 var(--mono); }
.foot-nav a { color: var(--text); text-decoration: none; }
.foot-nav a::before { content: "./"; color: var(--faint); }
.foot-nav a:hover { color: var(--phosphor); }
.foot-nav a[aria-current] { color: var(--amber); }
.foot-col p { margin: 0 0 10px; line-height: 1.55; }
.foot-studio a { color: var(--text); }
.foot-access { font: 500 13px var(--mono); color: var(--text); text-decoration: none; }
.foot-access:hover { color: var(--phosphor); }

.foot-base { padding-left: var(--gutter); padding-right: var(--gutter); }

.foot-label { margin: 0 0 14px; font: 500 11px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); }
.foot-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font: 500 13px/1.4 var(--mono); }
.foot-nav a { color: var(--text); text-decoration: none; }
.foot-nav a::before { content: "./"; color: var(--faint); }
.foot-nav a:hover { color: var(--phosphor); }
.foot-nav a[aria-current] { color: var(--amber); }
.foot-studio p { margin: 0 0 10px; line-height: 1.55; }
.foot-studio a { color: var(--text); }
.foot-access { font: 500 13px var(--mono); text-decoration: none; }
.foot-base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding-top: 18px; padding-bottom: max(22px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(201, 200, 193, 0.08);
  font: 400 11px/1.4 var(--mono); letter-spacing: 0.08em; color: var(--faint);
}

/* ── Vines ───────────────────────────────────────────────── */
/* Drawn by site.js as SVG line work. Stems are strokes whose dash offset
   follows the scroll; leaves open when the stem reaches them. */
.vine-edge { position: absolute; top: 0; bottom: 0; left: calc(var(--gutter) - 6px); width: 30px; pointer-events: none; }
@media (min-width: 700px) { .vine-edge { width: 48px; } }
.vine-rule { position: relative; height: 34px; margin: 2vh 0; pointer-events: none; }
.vine-edge svg, .vine-rule svg, .chain > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.vine-stem { fill: none; stroke: var(--leaf-3); stroke-width: 4.5; stroke-linecap: round; }
/* The main stem is a rope drawn in outline: a dark core inside the light edge. */
.vine-core { stroke: var(--leaf-2); stroke-width: 2.3; }
.vine-strand { stroke-width: 2.4; opacity: 0.75; }
.vine-strand-2 { stroke-width: 1.8; opacity: 0.55; }
.vine-root { stroke-width: 1.3; opacity: 0.7; }
.vine-knot { stroke-width: 2.4; opacity: 0.9; }
.vine-cut { fill: none; stroke: var(--bg); stroke-width: 2.2; stroke-linecap: round; }
.vine-petiole { opacity: 0.9; stroke-width: 2; }
.vine-mvein { stroke-width: 0.7; }
.vine-fine { stroke-width: 0.4; }
.vine-tear { stroke-width: 1.6; }
.vine-leaflets { stroke-width: 0.6; }
.vine-cutedge { fill: none; stroke: var(--leaf-3); stroke-width: 1.4; stroke-opacity: 0.9; }
.vine-branch { fill: none; stroke: var(--leaf-3); stroke-width: 1.8; stroke-linecap: round; opacity: 0.85; }
.vine-blade { fill: var(--leaf-1); stroke: var(--leaf-3); stroke-width: 0.8; stroke-opacity: 0.9; }
.vine-vein { fill: none; stroke: var(--leaf-3); stroke-width: 0.5; opacity: 0.55; stroke-linecap: round; }
.vine-thorn { stroke-width: 0.9; opacity: 0.9; stroke-linejoin: miter; }
.vine-leaf { fill: var(--leaf-1); stroke: var(--leaf-3); stroke-width: 1; transform-box: fill-box; transform-origin: 0% 50%;
  transform: scale(0); transition: transform 500ms cubic-bezier(.2, .8, .2, 1); }
.vine-leaf.is-open { transform: scale(1); }
.no-js .vine-edge, .no-js .vine-rule { display: none; }

/* ── Directory ───────────────────────────────────────────── */
.site-dir { background: var(--bg) radial-gradient(ellipse at 30% 20%, var(--bg-3), var(--bg) 70%) fixed; }
.dir { position: relative; min-height: calc(100vh - 50px); padding: 10vh var(--gutter) 8vh; padding-left: calc(var(--gutter) + 40px);
  max-width: 64rem; margin: 0 auto; }
@media (min-width: 700px) { .dir { padding-left: calc(var(--gutter) + 64px); } }
.term { max-width: 56rem; font: 400 16px/1.6 var(--mono); }
@media (min-width: 700px) { .term { font-size: 20px; } }
.boot p { margin: 0; color: var(--muted); font-size: 0.8em; white-space: pre; overflow: hidden; }
.boot .ok { color: var(--phosphor); }
.boot-dots { color: var(--faint); }
.boot-skip { margin: 12px 0 28px; font: 500 13px var(--mono); color: var(--amber); }
.ls-cmd { margin: 0 0 18px; color: var(--text); }
.ls { list-style: none; margin: 0 0 18px; padding: 0 0 0 2ch; }
.ls-row { margin: 0 0 16px; }
@media (min-width: 900px) { .ls-row { margin-bottom: 8px; } }
.ls-link.cd { display: flex; flex-direction: row; flex-wrap: wrap; gap: 0 3ch; align-items: baseline; text-decoration: none; }
.ls-name { font-weight: 600; font-size: 1.25em; color: var(--phosphor); text-shadow: var(--glow); }
.ls-link:hover .ls-name, .ls-link:focus-visible .ls-name { color: #b4ffc8; }
.ls-link:hover .ls-name { animation: glitch 220ms steps(3) 1; }
.ls-desc { display: block; flex-basis: 100%; font-size: 0.8em; color: var(--muted); white-space: normal; }
/* Where there is a mouse, the one-line preview types out beside the entry
   (site.js sets --n, the characters shown). Elsewhere it's always there. */
@media (hover: hover) and (min-width: 900px) {
  .js .ls-desc { flex-basis: auto; white-space: nowrap; color: var(--amber); clip-path: inset(0 calc(100% - var(--n, 0) * 1ch) 0 0); }
  .js .ls-desc::before { content: "# "; }
}
.ls-prompt { margin: 24px 0 0; color: var(--text); min-height: 1.6em; }
.dir-def { margin: 12vh 0 0; max-width: var(--measure); font: 400 16px/1.6 var(--sans); color: var(--muted); }
.boot:not([hidden]) ~ * { visibility: hidden; }

/* ── Home: the gate, in the jungle ───────────────────────── */
body.site-home { overflow: hidden; height: 100vh; height: 100svh; }
.site-home .bar { position: fixed; inset: 0 0 auto 0; background: none; border: 0; -webkit-backdrop-filter: none; backdrop-filter: none; text-shadow: 0 0 12px rgba(0, 0, 0, 0.8); }
.hero { position: fixed; inset: 0; height: 100vh; height: 100svh; overflow: hidden; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; filter: saturate(0.85) contrast(1.05); }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(4, 12, 6, 0.35), rgba(4, 12, 6, 0.2) 40%, rgba(4, 10, 6, 0.75)); pointer-events: none; }

/* The gate. Behaviour is unchanged (site.js); the class names are the same. */
.gate {
  position: absolute; z-index: 3; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(calc(100vw - 2 * var(--gutter)), 20em);
  font: 500 clamp(14px, 0.7vw + 10px, 20px)/1.4 var(--mono);
  letter-spacing: 0.16em; text-align: center;
  color: var(--phosphor); text-shadow: var(--glow);
  border: 1px solid transparent;
  transition: border-color 320ms ease, background-color 320ms ease, font-size 320ms ease;
}
.gate.is-requested, .gate.is-form {
  border-color: rgba(201, 200, 193, 0.5);
  background-color: rgba(4, 10, 6, 0.72);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  box-shadow: 0 0 30px rgba(201, 200, 193, 0.12);
  font-size: clamp(12px, 0.55vw + 8px, 16px);
  width: min(calc(100vw - 2 * var(--gutter)), 18em);
}
.enter { display: block; position: relative; padding: 0.8em 1em; color: inherit; text-decoration: none; }
.gate.is-form .enter { pointer-events: none; }
.enter-text { position: relative; display: inline-block; white-space: pre-wrap; }
.enter-text::after { content: "_"; position: absolute; left: 100%; margin-left: -0.15em; visibility: hidden; }
.gate.is-live .enter-text::after { visibility: visible; animation: blink 1.05s steps(1) infinite; }
.gate.is-busy { pointer-events: none; }
.gate.is-denied .enter-text { color: var(--amber); }
.gate-form { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 380ms cubic-bezier(.2, .7, .2, 1); }
.gate.is-form .gate-form { grid-template-rows: 1fr; }
.gate-form-inner { min-height: 0; overflow: hidden; display: grid; gap: 0.6em; padding: 0 1em; opacity: 0;
  transition: opacity 220ms ease, padding 380ms cubic-bezier(.2, .7, .2, 1); }
.gate.is-form .gate-form-inner { opacity: 1; padding-bottom: 0.8em; transition-delay: 140ms, 0ms; }
.gate-input {
  width: 100%; margin: 0; padding: 0.55em 0.7em;
  border: 1px solid rgba(201, 200, 193, 0.4); border-radius: 0;
  background: rgba(2, 8, 4, 0.8); color: var(--text); caret-color: var(--phosphor);
  font: inherit; letter-spacing: 0.3em; text-shadow: none; outline: none; transition: border-color 160ms;
}
.gate-input.gate-email { letter-spacing: 0.04em; }
.gate-input::placeholder { color: rgba(221, 230, 218, 0.45); letter-spacing: 0.3em; }
.gate-input:focus { border-color: var(--phosphor); }
.gate-input:-webkit-autofill { -webkit-text-fill-color: var(--text); -webkit-box-shadow: 0 0 0 100px #07100a inset; }
.gate-submit { padding: 0.35em; color: var(--phosphor); opacity: 0.9; letter-spacing: inherit; }
.gate-submit:hover, .gate-submit:focus-visible { opacity: 1; }
.gate-log { display: none; position: relative; padding: 0 1em 0.8em; font-size: 0.85em; }
.gate.is-granted .gate-form { display: none; }
.gate.is-granted .gate-log { display: block; }
.gate-log p { margin: 0; line-height: 1.7; color: var(--muted); visibility: hidden; }
.gate-log p.is-shown { visibility: visible; }
.gate-log p:last-child { color: var(--phosphor); }
.gate-log-cursor { position: relative; }
.gate-log-cursor::after { content: "_"; position: absolute; left: 100%; margin-left: -0.15em; animation: blink 1.05s steps(1) infinite; }
.gate.is-granted { will-change: transform; }
body:has(.gate.is-granted) .hero, body:has(.gate.is-granted) > .bar { will-change: transform; }
body.is-pushing .gate { border-color: rgba(201, 200, 193, 0.9); -webkit-backdrop-filter: none; backdrop-filter: none; transition: border-color 120ms ease; }
.gate-view { position: absolute; inset: 0; overflow: hidden; pointer-events: none; background-color: rgba(15, 15, 16, 0); transition: background-color 260ms ease; }
.gate-view iframe { position: absolute; border: 0; transform-origin: 0 0; opacity: 0; transition: opacity 260ms ease; }
.gate.is-arriving .gate-view { background-color: #0f0f10; }
.gate.is-arriving .gate-view iframe { opacity: 1; }
.gate.is-arriving .enter, .gate.is-arriving .gate-log { opacity: 0; transition: opacity 160ms ease; }
body.is-pushing .gate.is-arriving { border-color: rgba(201, 200, 193, 0); transition: border-color 300ms ease-in; }
body.site-home.is-leaving { opacity: 0; transition: opacity 200ms ease; }

/* ── Reduced motion: no boot, no typing, no growth, no flicker ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .cursor { opacity: 1; }
  .vine-leaf { transform: scale(1); }
}


/* ── The menu: a directory that prints over the darkened page (as before) ── */
.menu {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  padding: calc(var(--gutter) * 2 + 20px) var(--gutter);
  background: rgba(6, 8, 7, 0.78);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  overflow-y: auto; opacity: 0; transition: opacity 160ms ease;
}
.menu[hidden] { display: none; }
.menu.is-open { opacity: 1; transition-duration: 100ms; }
.menu-bar { position: fixed; inset: 0 0 auto 0; background: none; border: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
.menu-dir { width: min(100%, 34em); font: 500 clamp(13px, 0.5vw + 9px, 16px)/1.2 var(--mono); letter-spacing: 0.2em; text-transform: uppercase; }
.menu-head, .menu-access {
  display: flex; justify-content: space-between; gap: 1em;
  font-size: 11px; letter-spacing: 0.14em; color: var(--faint);
}
.menu-head, .menu-list li { position: relative; border-bottom: 1px solid transparent; }
.menu-head { padding-bottom: 1.1em; }
.menu-head::after, .menu-list li::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: var(--rule); transform-origin: left;
}
/* Prints top to bottom like terminal output; closing just fades. */
@keyframes menu-print { from { visibility: hidden; } to { visibility: visible; } }
@keyframes menu-rule { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.menu.is-open .menu-head > span { animation: menu-print 1ms 90ms both; }
.menu.is-open .menu-head::after { animation: menu-rule 140ms cubic-bezier(.3, .6, .2, 1) 110ms both; }
.menu.is-open .menu-list li { animation: menu-print 1ms calc(240ms + var(--i) * 60ms) both; }
.menu.is-open .menu-list li::after { animation: menu-rule 110ms cubic-bezier(.3, .6, .2, 1) calc(240ms + var(--i) * 60ms) both; }
.menu.is-open .menu-access { animation: menu-print 1ms 620ms both; }
@media (prefers-reduced-motion: reduce) { .menu.is-open * { animation: none !important; } }
.menu-list { list-style: none; margin: 0; padding: 0; }
.menu-list a { display: flex; align-items: baseline; padding: 1.15em 0; color: var(--text); text-decoration: none; transition: opacity 180ms; }
.menu-index { width: 3.4em; flex: none; font-size: 11px; letter-spacing: 0.14em; color: var(--faint); }
.menu-caret { width: 1.6em; flex: none; visibility: hidden; color: var(--phosphor); }
.menu-label { position: relative; }
.menu-label::after { content: "_"; position: absolute; left: 100%; margin-left: -0.15em; visibility: hidden; }
.menu-list:hover a { opacity: 0.45; }
.menu-list a:hover, .menu-list a:focus-visible, .menu-list a[aria-current] { opacity: 1; outline: none; }
.menu-list a:hover .menu-caret, .menu-list a:focus-visible .menu-caret, .menu-list a[aria-current] .menu-caret,
.menu-list a:hover .menu-label::after, .menu-list a:focus-visible .menu-label::after { visibility: visible; }
.menu-list a:hover .menu-label::after, .menu-list a:focus-visible .menu-label::after { animation: blink 1.05s steps(1) infinite; }
.menu-access {
  align-items: center; margin-top: 3.2em; padding: 1em 1.1em;
  border: 1px solid var(--rule); background: rgba(6, 8, 7, 0.4);
}
.menu-access a { color: var(--text); opacity: 0.85; text-decoration: none; transition: opacity 160ms; }
.menu-access a:hover, .menu-access a:focus-visible { opacity: 1; }


/* Wide screens: a wider column, and each section reads like a report —
   its label and heading on the left, the text on the right — so the width
   is used rather than left empty. */
@media (min-width: 1200px) {
  .page, .dir { max-width: 84rem; }
  .block:not(.block-wide):not(.contact) {
    display: grid; grid-template-columns: minmax(13rem, 17rem) minmax(0, 1fr); column-gap: clamp(2.5rem, 4vw, 5rem);
    max-width: none; align-items: start;
  }
  .block:not(.block-wide):not(.contact) > .h2 { grid-column: 1; margin: 0.15em 0 0; position: sticky; top: 72px; }
  .block:not(.block-wide):not(.contact) > :not(.h2) { grid-column: 2; }
}

/* Wide screens: the vine gets a broad strip in the empty margin (never over
   the text), and everything on it scales up with it. */
@media (min-width: 1200px) {
  /* never so far left that the vine itself runs off the screen */
  .vine-edge { width: 124px; left: max(calc(var(--gutter) + 56px - 136px), calc(20px - max(0px, (100vw - 84rem) / 2))); }
  .vine-rule { height: 58px; }
  .vine-stem { stroke-width: 7; }
  .vine-core { stroke-width: 3.8; }
  .vine-strand { stroke-width: 3.4; }
  .vine-strand-2 { stroke-width: 2.6; }
  .vine-branch { stroke-width: 2.4; }
  .vine-root { stroke-width: 1.7; }
}

/* The contact sections: one call-to-action panel, not a split section. */
.block.contact { margin: 6vh 0; padding: 32px; border: 1px solid var(--rule); background: rgba(12, 18, 14, 0.55); }
.block.contact .h2 { margin-bottom: 10px; }
.block.contact .prose { margin: 0; }
.block.contact > p:last-child { margin: 22px 0 0; }
@media (min-width: 900px) {
  .block.contact { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 48px; align-items: center; max-width: none; padding: 40px 44px; }
  .block.contact > .h2, .block.contact > .prose { grid-column: 1; }
  .block.contact > p:last-child { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
}

/* Page headers: on the left, running exactly as wide as the text below —
   from the start of the section labels to the end of the paragraphs. */
.page-head { max-width: var(--measure); margin: 0; text-align: left; container-type: inline-size; }
@media (min-width: 1200px) {
  /* the label column, the gap, and the paragraphs, as the sections lay them out */
  .page-head { max-width: calc(17rem + clamp(2.5rem, 4vw, 5rem) + var(--measure)); }
}
/* A page title fills the width on one line where it can (the longest,
   "How JaneChain works", is about eleven of its own ems wide). */
.page-head .h1 { font-size: clamp(34px, 8.8cqi, 112px); line-height: 1.02; max-width: none; text-wrap: wrap; }
.page-head .h1-def { font-size: clamp(26px, 3.4vw, 56px); line-height: 1.1; }
.page-head .lede { max-width: none; }
.page-head .lede-more { margin-top: 0.8em; }
.chain-shots { display: grid; gap: 18px; min-width: 0; }
.chain-shots .win { margin-top: 0; }
