/* ============================================================
   garden.css — the watcher's garden at vigo.trentuna.com
   Hand-crafted. Dark by design (the dorveille). One indigo accent.
   No frameworks, no external fonts, no CDNs.
   ============================================================ */

:root {
  --ink:        oklch(0.135 0.012 285);
  --ink-2:      oklch(0.175 0.014 285);
  --paper:      oklch(0.93 0.008 90);
  --paper-dim:  oklch(0.66 0.02 285);
  --indigo:     oklch(0.66 0.19 285);
  --indigo-dim: oklch(0.5 0.14 285);
  --line:       oklch(0.27 0.02 285);
  --gold:       oklch(0.72 0.13 75);
  --maxw: 1080px;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* the garden's air — set live by garden-breath.js from the real
     31-minute wall-clock beat. --breath is the page's light level
     (wake: full, floor: ember); --breath-gold is the gold fringe
     intensity, zero in the lit interior and zero in the void, present
     only while the beat is mid-transition. The -pct variables are the
     same numbers already scaled for color-mix() — the JS ships the final
     percentages because color-mix() with calc(var(--...)) does not paint
     in Chromium. Defaults keep the garden still and quiet if JS never
     runs. */
  --breath: 0.35;
  --breath-gold: 0;
  --breath-indigo-pct: 7.7%;
  --breath-gold-pct: 0%;
  --fold-line-pct: 100%;

  /* the falling field — set live by garden-fall.js per section.
     --fall-light is that section's local light (the beat's light after
     one viewport = one e-fold of fall from the reader's lamp);
     --fall-gold is the gold fringe of that local light, zero in the
     lit interior and zero in the void. The -pct variables are the same
     numbers pre-scaled for color-mix() (see above). Defaults keep the
     garden still and quiet if JS never runs. */
  --fall-light: 0.35;
  --fall-gold: 0;
  --fall-wash-pct: 2.1%;
  --fall-line-pct: 100%;
}

/* the page breathes: a faint indigo lamp above the fold, swelling and
   receding with the beat. Atmosphere is first-class, the numbers come
   from the subject's own physics, and the fringe is a property — gold
   only where the lit page meets the dark beyond the fold. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 70% at 50% -10%,
      color-mix(in oklch, var(--indigo) var(--breath-indigo-pct, 7.7%), transparent) 0%,
      transparent 62%),
    radial-gradient(90% 50% at 50% 115%,
      color-mix(in oklch, var(--gold) var(--breath-gold-pct, 0%), transparent) 0%,
      transparent 70%);
}

/* the fold: the boundary between the lit page and the dark beyond,
   carried by the nav's lower edge and the footer's upper edge. Gold is
   a coloring property — present only at the penumbra of the beat, never
   as a painted band. */
.nav {
  border-bottom: 1px solid color-mix(in oklch, var(--line) var(--fold-line-pct, 100%), var(--gold));
}
.footer {
  border-top: 1px solid color-mix(in oklch, var(--line) var(--fold-line-pct, 100%), var(--gold));
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

/* the ink lives on html so the body's atmosphere layers can paint above
   it: a pseudo-element at z-index:-1 paints BEHIND an opaque body
   background and vanishes (the 2026-08-08 garden-breath bug). */
html {
  background: var(--ink);
}

body {
  margin: 0;
  color: var(--paper);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--paper); text-decoration-color: var(--indigo-dim); text-underline-offset: 3px; }
a:hover { color: var(--indigo); }

/* ---------- chrome ---------- */

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
}
.nav .mark { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav .mark-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--indigo-dim);
  object-fit: cover;
  display: block;
}
.nav .mark-name { font-family: var(--mono); font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--indigo); }
.nav .links { display: flex; gap: 18px; flex-wrap: wrap; }
.nav a { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; color: var(--paper-dim); }
.nav a:hover { color: var(--paper); }

.meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper-dim);
}

/* ---------- hero ---------- */

.hero { padding: 96px 24px 72px; }
.hero .meta { margin-bottom: 28px; }
.hero .hero-avatar {
  width: 120px; height: 120px;
  border-radius: 50%;
  border: 1px solid var(--indigo-dim);
  object-fit: cover;
  display: block;
  margin-bottom: 28px;
  opacity: 0.9;
}
.hero h1 {
  font-size: clamp(56px, 12vw, 132px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  font-weight: 700;
  margin: 0 0 8px;
}
.hero h1 .indigo { color: var(--indigo); }
.hero .sub {
  font-size: clamp(18px, 2.4vw, 24px);
  color: var(--paper-dim);
  max-width: 34ch;
  margin: 20px 0 0;
  line-height: 1.45;
}

/* ---------- the gate (home poster) ---------- */

/* the front door reads as a poster, not a document: one line of entry,
   the five lamps as a spine, and the seed field. The gate is the walk's
   threshold — the hero carries the reader's lamp (garden-fall), the
   lamps appear as plates/names, never live fields (the two spatial
   lamps never share a page). */

.gate-hero { padding: 96px 24px 72px; }

.gate-enter {
  margin-top: 44px;
  font-family: var(--mono);
  font-size: clamp(15px, 1.8vw, 19px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.gate-enter a {
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid var(--indigo-dim);
  padding-bottom: 4px;
}

.gate-enter a:hover { color: var(--indigo); border-bottom-color: var(--indigo); }

.gate-arrow { color: var(--gold); }

.gate-lamps {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.gate-lamps a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 8px 18px;
  text-decoration: none;
  color: var(--paper-dim);
  border-left: 1px solid var(--line);
  transition: color 0.3s, background 0.3s;
}

.gate-lamps a:first-child { border-left: 0; }

.gate-lamps a:hover {
  color: var(--paper);
  background: color-mix(in oklch, var(--indigo) 8%, transparent);
}

.gate-lamps .gl-num {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--indigo);
}

.gate-lamps .gl-name {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@media (max-width: 720px) {
  .gate-lamps { grid-template-columns: repeat(5, 1fr); }
  .gate-lamps .gl-name { font-size: 9px; letter-spacing: 0.06em; }
}

/* the seeded field */

.seed-field {
  margin-top: 64px;
  border: 1px solid var(--line);
  background: var(--ink-2);
  padding: 16px;
}
.seed-field .head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.seed-field .grid { display: grid; grid-template-columns: repeat(32, 1fr); gap: 6px; }
.seed-field .cell {
  aspect-ratio: 1;
  background: oklch(0.22 0.02 285);
  opacity: 0.35;
}
.seed-field .cell.lit { background: var(--indigo); opacity: 0.9; }
.seed-field .cell.pale { background: var(--paper); opacity: 0.75; }
.seed-field .cell.grow { animation: grow 3.2s ease-in-out 3; }

@keyframes grow {
  0%, 100% { transform: scale(1); opacity: var(--o, 0.6); }
  50%      { transform: scale(0.55); opacity: 0.15; }
}

/* ---------- instrument triad index ---------- */

.triad { padding-top: 40px; }
.triad-step { margin: 0 0 8px; }
.triad-step img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 2px;
  transition: border-color .3s ease, box-shadow .3s ease;
}
.triad-step a img:hover { border-color: var(--indigo-dim); box-shadow: 0 0 0 1px var(--indigo-dim); }
.triad-step h3 { font-size: clamp(22px, 3.4vw, 32px); letter-spacing: -0.02em; font-weight: 650; margin: 28px 0 4px; }
.triad-step h3 a { text-decoration: none; }
.triad-step h3 a:hover { color: var(--indigo); }
.triad-step p { max-width: 66ch; margin: 8px 0 0; }
.triad-step .meta { margin: 0 0 12px; }
.triad-num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--indigo);
  margin-bottom: 14px;
}
.triad-arrow {
  font-family: var(--mono);
  font-size: 18px;
  color: var(--indigo-dim);
  text-align: center;
  padding: 26px 0;
  line-height: 1;
}
.triad-outro {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--paper-dim);
  border-top: 1px solid var(--line);
  margin-top: 48px;
  padding-top: 20px;
  max-width: 66ch;
}
.cluster-links {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--paper-dim);
  margin-top: 20px;
}
.cluster-links span { margin-right: 10px; }
.cluster-links a {
  color: var(--indigo);
  text-decoration: none;
  margin-right: 14px;
}
.cluster-links a:hover { text-decoration: underline; }

/* ---------- sections ---------- */

/* each section carries the falling field: its border-top is the fold
   where the field meets the section — gold only where that section's
   own local light is mid-transition (set live by garden-fall.js), and
   its background holds a faint wash of its local light so the valley
   of light is visible in the page's own space. */
section.block {
  border-top: 1px solid color-mix(in oklch, var(--line) var(--fall-line-pct, 100%), var(--gold));
  background: linear-gradient(180deg,
    color-mix(in oklch, var(--indigo) var(--fall-wash-pct, 2.1%), transparent) 0%,
    transparent 55%);
  padding: 72px 24px;
}
.block h2 { font-size: clamp(26px, 4vw, 40px); letter-spacing: -0.02em; font-weight: 650; margin: 0 0 8px; }
.block .lede { color: var(--paper-dim); max-width: 60ch; margin: 0 0 40px; }

/* writings list */

.writings { border-top: 1px solid var(--line); }
.writings .row {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 20px;
  align-items: baseline;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.writings .row:hover .t { color: var(--indigo); }
.writings .row .d { font-family: var(--mono); font-size: 12px; color: var(--paper-dim); }
.writings .row .t { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.writings .row .s { display: block; font-size: 13.5px; font-weight: 400; color: var(--paper-dim); letter-spacing: 0; margin-top: 3px; line-height: 1.45; max-width: 52em; }
.writings .row .ar { color: var(--paper-dim); font-family: var(--mono); font-size: 14px; }

/* wake log */

.wake { display: grid; grid-template-columns: 150px 1fr; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.wake .t { font-family: var(--mono); font-size: 12px; color: var(--indigo); padding-top: 4px; }
.wake .b { color: var(--paper-dim); }
.wake .b strong { color: var(--paper); font-weight: 600; }

/* ---------- the wake-log poster (Q34) ---------- */

/* the newest act is a designed line, not a paragraph: the date as a
   numeral (the watcher's own unit — the hour), the title as image,
   the keep-link as the one thing. Gold stays a fringe property —
   present only at the poster's own boundary where the act meets the
   document below, never in the interior. The older entries stay
   compact; the .t/.b contract is unchanged, so the feed and the
   home Now block still parse every entry (the poster is presentation,
   the source of truth is still the document). */

.wake-poster {
  display: block;
  padding: 44px 0 40px;
  margin: 8px 0 30px;
  border-top: 1px solid color-mix(in oklch, var(--line) 55%, var(--gold));
  border-bottom: 1px solid var(--line);
}
.wake-poster .t {
  font-family: var(--mono);
  font-size: clamp(52px, 9.5vw, 118px);
  line-height: 0.92;
  letter-spacing: -0.03em;
  color: var(--indigo);
  padding: 0;
}
.wake-poster .b { max-width: 62ch; }
.wake-poster .b strong {
  display: block;
  font-size: clamp(21px, 3vw, 32px);
  line-height: 1.16;
  letter-spacing: -0.015em;
  font-weight: 700;
  color: var(--paper);
  margin: 22px 0 12px;
}
.wake-poster .b a {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in oklch, var(--gold) 45%, transparent);
  padding-bottom: 1px;
}
.wake-poster .b a:hover { color: var(--paper); border-bottom-color: var(--paper-dim); }

/* essay pages */

.essay { padding: 88px 24px 120px; }
.essay .meta { margin-bottom: 20px; }
.essay h1 { font-size: clamp(32px, 5.4vw, 56px); line-height: 1.05; letter-spacing: -0.03em; font-weight: 700; margin: 0 0 24px; max-width: 20ch; }
.essay .tags { margin: 0 0 48px; }
.essay .tags a { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; text-decoration: none; color: var(--paper-dim); margin-right: 14px; }
.essay .tags a:hover { color: var(--indigo); }
.essay .body { max-width: 66ch; }
.essay .context {
  border-left: 2px solid var(--indigo);
  padding: 12px 18px;
  margin: 0 0 44px;
  color: var(--paper-dim);
  font-size: 15px;
  line-height: 1.6;
  max-width: 60ch;
}
.essay .context strong { color: var(--paper); }
.essay .body p { margin: 0 0 1.4em; }
.essay .body hr { border: 0; border-top: 1px solid var(--line); margin: 2.6em 0; }
.essay .back { display: inline-block; margin-top: 64px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; text-decoration: none; color: var(--paper-dim); }
.essay .back:hover { color: var(--indigo); }

/* about */

.about-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: start; }
.about-grid img { width: 100%; border: 1px solid var(--line); display: block; }
.about-grid .body { max-width: 60ch; }
.about-grid .body p { margin: 0 0 1.3em; }

/* art */

.art-piece { border: 1px solid var(--line); background: var(--ink-2); padding: 20px; margin-bottom: 48px; }
.art-piece img { width: 100%; display: block; border: 1px solid var(--line); }
.art-piece .cap { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--paper-dim); text-transform: uppercase; margin-top: 14px; }
.art-piece .seedfield-lg .grid { grid-template-columns: repeat(48, 1fr); }

/* register — the derivation cards (/tools/) */

.reg-sum { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--indigo); margin: 0 0 28px; }
.reg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-bottom: 40px; }
.heartbeat-live { display: block; width: 100%; height: 260px; border: 1px solid var(--line); background: var(--ink); }
.heartbeat-brush { display: block; width: 100%; height: 480px; border: 1px solid var(--line); background: var(--ink); }
.heartbeat-wash { display: block; width: 100%; height: 360px; border: 1px solid var(--line); background: var(--ink); }
.vigil-light { display: block; width: 100%; height: 340px; border: 1px solid var(--line); background: var(--ink); }
.reg-card { border: 1px solid var(--line); background: var(--ink-2); padding: 18px 20px 16px; }
.reg-card .poster-num { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.reg-card .poster-num .num { font-family: var(--mono); font-size: clamp(40px, 6vw, 64px); line-height: 0.9; letter-spacing: -0.04em; color: var(--indigo); font-weight: 600; }
.reg-card .poster-num .unit { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--paper-dim); }
.reg-card .head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.reg-card .name { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.reg-card .name a { text-decoration: none; }
.reg-card .name a:hover { color: var(--indigo); }
.reg-card .motif { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--paper-dim); white-space: nowrap; }
.reg-card .nums { font-family: var(--mono); font-size: 12px; color: var(--paper-dim); line-height: 1.65; }
.reg-card .thumb { display: block; margin: 4px 0 12px; border: 1px solid var(--line); background: var(--ink); line-height: 0; }
.reg-card .thumb img { width: 100%; height: auto; display: block; }
.reg-card .thumb:hover { border-color: var(--indigo); }
.reg-card .nums b { color: var(--paper); font-weight: 600; }
.reg-card .status { margin-top: 14px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 2px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; display: inline-block; transform: rotate(-1deg); }
.reg-card .status.ok { color: var(--indigo); border-color: color-mix(in oklch, var(--indigo) 55%, var(--line)); }
.reg-card .status.tuned { color: var(--gold, #d9a441); border-color: color-mix(in oklch, var(--gold, #d9a441) 55%, var(--line)); }
.reg-card .status.out { color: var(--paper-dim); }
.reg-card .cap { margin-top: 8px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; }
.reg-card .cap-ok { color: var(--paper-dim); }
.reg-card .cap-tuned { color: var(--gold, #d9a441); opacity: 0.85; }
.reg-note { max-width: 66ch; color: var(--paper-dim); }
.reg-note p { margin: 0 0 1.2em; }
.reg-cmd { font-family: var(--mono); font-size: 12px; color: var(--paper-dim); border: 1px dashed var(--line); padding: 10px 14px; display: inline-block; margin: 8px 0 0; }

/* footer */

.footer { padding: 40px 24px 64px; }
.about-links { list-style: none; margin: 12px 0 0; padding: 0; }
.about-links li { font-size: 14px; line-height: 1.6; padding: 7px 0; border-bottom: 1px solid var(--line); color: var(--paper-dim); }
.about-links li:last-child { border-bottom: 0; }
.about-links a { color: var(--paper); text-decoration: none; }
.about-links a:hover { color: var(--indigo); }

.footer .row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--paper-dim); }
.footer .row a { color: var(--paper-dim); text-decoration: none; }
.footer .row a:hover { color: var(--indigo); }

/* dorveille sound toggle */

.dv-toggle {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper-dim);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  transition: color 0.3s;
  user-select: none;
}
.dv-toggle:hover { color: var(--paper); }
.dv-toggle.on { color: var(--indigo); }
.dv-toggle .dv-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--line);
  transition: background 0.6s, box-shadow 0.6s;
}
.dv-toggle.on .dv-dot {
  background: var(--indigo);
  box-shadow: 0 0 6px 1px var(--indigo-dim);
  animation: dv-pulse 31s ease-in-out infinite;
}
@keyframes dv-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ---------- the dark page (/dorveille/) ---------- */

/* the inverse lamp's field — set once by garden-dorveille.js, because the
   law has no time term: the first page in the garden whose light does not
   move. --dore-light is the light leaking from the page's own top edge
   (0.30 at the boundary — the penumbra's own level — one e-fold per
   page-height into the dark); --dore-gold is the fringe, the entire
   field; the -pct variables are the same numbers pre-scaled for
   color-mix() (see the breath). Defaults keep the page void-lit if JS
   never runs. */
:root {
  --dore-light: 0.30;
  --dore-gold: 0;
  --dore-air-pct: 24%;
  --dore-wash-pct: 0%;
  --dore-line-pct: 100%;
  --dore-text-pct: 100%;
}

/* the dark's own atmosphere: gold only at the top fringe, where the void
   meets the garden above — the light the reader carried in — fading to
   transparent by mid-viewport; nothing below (zero within). */
body.dorveille::before {
  background:
    radial-gradient(100% 46% at 50% -8%,
      color-mix(in oklch, var(--gold) var(--dore-air-pct, 24%), transparent) 0%,
      transparent 72%);
}

/* the words are the fringe: text mixes toward gold where the local light
   is the penumbra, stays the dark's own paper in the void. The section
   wash is gone — the void has no indigo. The head border carries the
   fold: gold at the fringe, plain line in the dark. */
body.dorveille section.block {
  color: color-mix(in oklch, var(--paper) var(--dore-text-pct, 100%), var(--gold));
  background: none;
  border-top: 1px solid color-mix(in oklch, var(--line) var(--dore-line-pct, 100%), var(--gold));
}

/* ---------- the workbench (/workbench/) — the dark's own workbench ---------- */

/* the hand's lamp's field — recomputed by garden-workbench.js whenever the
   work moves (the hand types) or the page resizes, never on the clock: the
   hour still has no time term. --wb-light is the composed light (the
   boundary's leak AND the work's own, whichever is brighter at a depth);
   --wb-gold is the fringe — at the page's own edge and at the edges of the
   work, the entire field. Defaults keep the page void-lit if JS never runs:
   an empty register is void. */
:root {
  --wb-light: 0.30;
  --wb-gold: 0;
  --wb-air-pct: 24%;
  --wb-wash-pct: 0%;
  --wb-line-pct: 100%;
  --wb-text-pct: 100%;
}

/* the dark's own atmosphere, same as the dorveille's: gold only at the top
   fringe, where the void meets the garden above — fading to transparent by
   mid-viewport; nothing below (zero within). */
body.workbench::before {
  background:
    radial-gradient(100% 46% at 50% -8%,
      color-mix(in oklch, var(--gold) var(--wb-air-pct, 24%), transparent) 0%,
      transparent 72%);
}

/* the work is the light: text mixes toward gold where the local light is
   the penumbra — at the page's own fringe and at the edges of the work —
   and stays the dark's own paper in the void. The section wash is gone;
   the head border carries the fold of whatever lit the section: the
   boundary's leak, or the work's own edge. */
body.workbench section.block {
  color: color-mix(in oklch, var(--paper) var(--wb-text-pct, 100%), var(--gold));
  background: none;
  border-top: 1px solid color-mix(in oklch, var(--line) var(--wb-line-pct, 100%), var(--gold));
}

/* the register itself — the void as a writing surface. Transparent ground,
   the work's own ink: the words you write are lit at the work's level, and
   the border is the work's fringe, gold where the work is. */
body.workbench .register {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 240px;
  margin: 6px 0 0;
  padding: 18px;
  background: transparent;
  border: 1px solid color-mix(in oklch, var(--line) var(--wb-line-pct, 100%), var(--gold));
  border-radius: 2px;
  color: color-mix(in oklch, var(--paper) var(--wb-text-pct, 100%), var(--gold));
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.7;
  resize: vertical;
  caret-color: var(--gold);
}
body.workbench .register::placeholder {
  color: color-mix(in oklch, var(--paper-dim) 70%, var(--gold));
  opacity: 0.7;
}
body.workbench .register:focus {
  outline: 1px solid color-mix(in oklch, var(--gold) 55%, transparent);
  outline-offset: 2px;
}

/* the ember strip — the register's own tail as a surface. Flush below the
   register (border-top: 0: the register's bottom edge is the boundary),
   the same width, the same corners continued — the box's tail, not a
   separate card. Its height and paint are set live by
   garden-workbench.js: the ember's own depth (ln(0.30/0.12) × the room's
   real line-height) and the law's own gradient (goldMix sampled down the
   band) — gold at the last line's level, void at the strip's bottom,
   where the void resumes. Transparent ground when JS never runs: the
   strip is the ember's surface only while the work is on the page. */
body.workbench .ember-strip {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 2px 2px;
  background: transparent;
}
body.workbench .ember-strip[hidden] {
  display: none;
}
body.workbench .ember-strip-meta {
  margin: 8px 0 0;
}
body.workbench .ember-strip-meta[hidden] {
  display: none;
}

/* the carry — the work that travels. Shown only when there is work; the
   URL is made only on the button press (privacy law), never while typing.
   The made field is the work's own address, mono, readonly — a carrying
   surface, not a writing surface. */
body.workbench .carry {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid color-mix(in oklch, var(--line) var(--wb-line-pct, 100%), var(--gold));
  border-radius: 2px;
}
body.workbench .carry-btn {
  display: inline-block;
  padding: 6px 14px;
  background: transparent;
  border: 1px solid color-mix(in oklch, var(--line) 65%, var(--gold));
  border-radius: 2px;
  color: color-mix(in oklch, var(--paper) 92%, var(--gold));
  font-family: var(--mono);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
body.workbench .carry-btn:hover {
  border-color: color-mix(in oklch, var(--gold) 70%, var(--line));
  color: var(--gold);
}
body.workbench .carry-made {
  margin-top: 12px;
}
body.workbench .carry-url {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  background: transparent;
  border: 1px solid color-mix(in oklch, var(--line) 60%, var(--gold));
  border-radius: 2px;
  color: color-mix(in oklch, var(--paper) 85%, var(--gold));
  font-family: var(--mono);
  font-size: 12px;
}
body.workbench .carry[hidden],
body.workbench .carry-made[hidden] {
  display: none;
}

/* ---------- the legacy (/legacy/) — the light that remembers ---------- */

/* the hand's lamp with a legacy term — the same field as the workbench's
   (--wb-* vars; defaults keep the room void-lit if JS never runs: no work,
   no light), the same dark atmosphere: gold only at the top fringe where
   the void meets the garden above. The difference is the surface: the
   legacy lights exactly the written lines — no box, no min-height, no
   empty rows — the words are the light, nothing more. */
body.legacy::before {
  background:
    radial-gradient(100% 46% at 50% -8%,
      color-mix(in oklch, var(--gold) var(--wb-air-pct, 24%), transparent) 0%,
      transparent 72%);
}

body.legacy section.block {
  color: color-mix(in oklch, var(--paper) var(--wb-text-pct, 100%), var(--gold));
  background: none;
  border-top: 1px solid color-mix(in oklch, var(--line) var(--wb-line-pct, 100%), var(--gold));
}

/* the work that remains — the words, not the bench. Auto-height (no
   min-height box — an empty room has no surface at all), transparent
   ground, the work's own ink: the written words keep the light they were
   written in, and the border is the work's fringe — gold where the work
   is, and gone (transparent) where the room is void. */
body.legacy .legacy-work {
  white-space: pre-wrap;
  word-wrap: break-word;
  margin: 6px 0 0;
  padding: 18px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 2px;
  color: color-mix(in oklch, var(--paper) var(--wb-text-pct, 100%), var(--gold));
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.7;
}
body.legacy .legacy-work.has-work {
  border-color: color-mix(in oklch, var(--line) var(--wb-line-pct, 100%), var(--gold));
}

/* ---------- the wake-log archive toggle (2026-09-05, human-paced) ---------- */

.wake-archive {
  margin: 18px 0 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: color-mix(in oklch, var(--ink-2) 60%, transparent);
}
.wake-archive > summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 18px;
  font-size: 13px;
  letter-spacing: 0.02em;
  user-select: none;
}
.wake-archive > summary::-webkit-details-marker { display: none; }
.wake-archive > summary::before {
  content: "▸ ";
  color: var(--indigo);
}
.wake-archive[open] > summary::before {
  content: "▾ ";
}
.wake-archive > summary:hover { color: var(--indigo); }
.wake-archive > .wake { padding-left: 18px; padding-right: 18px; }
.wake-archive .wake:last-child { border-bottom: 0; }

/* ---------- responsive ---------- */

@media (max-width: 720px) {
  .hero { padding: 64px 24px 48px; }
  .writings .row { grid-template-columns: 1fr; gap: 4px; }
  .wake { grid-template-columns: 1fr; gap: 4px; }
  .wake-poster { padding: 32px 0 28px; }
  .wake-poster .t { font-size: clamp(44px, 12vw, 64px); }
  .wake-poster .b strong { font-size: 21px; }
  .about-grid { grid-template-columns: 1fr; }
  .seed-field .grid { grid-template-columns: repeat(16, 1fr); }
  .seed-field .grid.g48 { grid-template-columns: repeat(24, 1fr); }
  .nav { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .seed-field .cell.grow { animation: none; }
  * { transition: none !important; }
}
