/* Catppuccin Mocha, inherited from the DynamicDiff renders */
:root {
  --bg: #1e1e2e;
  --bg-raised: #181825;
  --surface: #313244;
  --text: #cdd6f4;
  --muted: #a6adc8;
  --accent: #fab387;
  --link: #89b4fa;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
  /* DynamicDiff render palette: delete / add / modify-old / modify-new. The
     last two are the accent and link colours the site already uses. */
  --diff-del: #f38ba8;
  --diff-add: #a6e3a1;
  --diff-old: var(--accent);
  --diff-new: var(--link);
  --morph-font: var(--serif);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img, video, model-viewer { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.2; }

.site-header {
  display: flex; flex-wrap: wrap; gap: 1rem;
  align-items: baseline; justify-content: space-between;
  padding: 1.2rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid var(--surface);
}
.wordmark { font-family: var(--serif); font-size: 1.4rem; color: var(--text); }
.wordmark-sub { display: block; font-size: .8rem; color: var(--muted); }
.site-header nav { display: flex; gap: 1.2rem; }
.site-header nav a { color: var(--muted); }
.site-header nav a:hover { color: var(--accent); text-decoration: none; }

main { min-height: 70vh; }
.site-footer {
  padding: 2rem clamp(1rem, 4vw, 3rem);
  border-top: 1px solid var(--surface);
  color: var(--muted); font-size: .85rem;
}

/* Home: the garden is the page, and the page scrolls only to walk it. The
   canvas is fixed to the viewport; #garden-scroll supplies the height, one
   viewport-ish per stop, and garden.js reads scroll position off it. Nothing
   else lives here — the footer would be a wall at the end of the walk. */
body.home main { min-height: 0; }
body.home .site-footer { display: none; }
/* The scroll bar is the machinery, not the work: the overlay says what scroll
   does, and a track climbing the edge of a garden gives away that it is a page. */
body.home { scrollbar-width: none; }
body.home::-webkit-scrollbar { display: none; }
body.home .site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 3;
  background: rgba(24, 24, 37, .58);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 0;
}
.garden-overlay {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 2;
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem 1.5rem;
  justify-content: space-between;
  padding: 1rem clamp(1rem, 4vw, 3rem) 1.1rem;
  pointer-events: none;
  background: linear-gradient(0deg, rgba(24, 24, 37, .55), transparent);
}
.garden-status { min-width: 0; }
.garden-caption {
  margin: 0; font-family: var(--serif); font-size: 1.05rem;
  color: #fff; text-shadow: 0 1px 8px rgba(20, 30, 50, .6);
}
.garden-hint {
  margin: .1rem 0 0; font-size: .8rem; color: rgba(255, 255, 255, .78);
  text-shadow: 0 1px 8px rgba(20, 30, 50, .6);
}
/* Only ever visible with ?orient — the artist turning a sculpture with the
   arrow keys, reading off the value to keep. Click copies it. */
.garden-orient {
  margin-top: .35rem; pointer-events: auto; cursor: copy;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .75rem;
  padding: .2rem .5rem; border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(24, 24, 37, .7); color: #fff;
}
.garden-orient[hidden] { display: none; }
.garden-orient.is-copied { border-color: #8fd6a0; color: #8fd6a0; }

.garden-actions { display: flex; gap: .5rem; pointer-events: auto; }
.garden-btn {
  font: inherit; font-size: .82rem; cursor: pointer;
  padding: .45rem .85rem; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(24, 24, 37, .55); color: #fff;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.garden-btn:hover, .garden-btn:focus-visible { border-color: #fff; }
.garden-btn[hidden] { display: none; }
.garden-btn.is-primary { background: rgba(255, 255, 255, .92); color: #1f2733; border-color: transparent; }
.garden-btn kbd {
  font: inherit; font-size: .7rem; margin-left: .35rem; padding: 0 .3rem;
  border: 1px solid rgba(255, 255, 255, .45); border-radius: 3px;
}

/* The verdict pair: ♥ and ✕ in one small frame, exclusive, anonymous, and
   private — it only ever shows your own verdict back to you, so a lit glyph
   is a quiet tint, not a counter. The heart's ♡/♥ swap is done by likes.js;
   min-width keeps the frame from shifting when it swaps. */
.vote-pair { display: inline-flex; align-items: center; gap: .1rem; }
.vote-pair.garden-btn { padding: .2rem .35rem; cursor: default; }
.vote-btn {
  font: inherit; font-size: .95rem; line-height: 1; cursor: pointer;
  min-width: 1.9em; padding: .3rem 0; text-align: center;
  border: none; border-radius: 999px; background: transparent; color: inherit;
}
.vote-btn:hover, .vote-btn:focus-visible { background: rgba(255, 255, 255, .12); }
.vote-btn[aria-pressed="true"][data-vote="like"] {
  color: var(--diff-del); background: rgba(243, 139, 168, .16);
}
.vote-btn[aria-pressed="true"][data-vote="reject"] {
  color: #fff; background: rgba(255, 255, 255, .2);
}
/* Standalone (sonnet footer) frame: bordered like a quiet control. */
.sonnet-footer .vote-pair {
  margin-left: 1.25rem; padding: .15rem .3rem;
  border: 1px solid var(--surface); border-radius: 999px; color: var(--text);
}
.sonnet-footer .vote-btn:hover, .sonnet-footer .vote-btn:focus-visible {
  background: rgba(255, 255, 255, .07);
}
.sonnet-footer .vote-btn[aria-pressed="true"][data-vote="reject"] {
  color: var(--text); background: rgba(205, 214, 244, .16);
}
.vote-pair[hidden] { display: none; }

/* The whole poem, on P. The sign in the world carries only the lines of the
   sculpture you are standing at; this is where you see them in place. */
.garden-poem {
  position: fixed; z-index: 4; right: clamp(.75rem, 3vw, 2rem);
  top: 50%; transform: translateY(-50%);
  width: min(26rem, calc(100vw - 1.5rem)); max-height: 74vh;
  display: flex; flex-direction: column;
  background: rgba(18, 20, 30, .88); color: #f3f1ea;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .16); border-radius: 8px;
  box-shadow: 0 18px 60px rgba(10, 14, 24, .45);
}
.garden-poem[hidden] { display: none; }
.garden-poem-head {
  display: flex; align-items: flex-start; gap: .75rem;
  padding: .8rem 1rem .5rem; border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.garden-poem-title { margin: 0; font-family: var(--serif); font-size: .95rem; }
.garden-poem-close {
  margin-left: auto; flex: 0 0 auto; cursor: pointer;
  width: 1.6rem; height: 1.6rem; line-height: 1; font-size: 1.1rem;
  border: 0; border-radius: 50%; background: transparent; color: inherit;
}
.garden-poem-close:hover { background: rgba(255, 255, 255, .12); }
.garden-poem-body { overflow-y: auto; padding: .8rem 1rem; }
.garden-poem-line {
  margin: 0; font-family: var(--serif); font-size: .95rem; line-height: 1.5;
  transition: color .25s ease, opacity .25s ease;
}
.garden-poem-line.is-elsewhere { color: rgba(243, 241, 234, .38); }
.garden-poem-line.is-here { color: #fff; }
.garden-poem-foot {
  margin: 0; padding: .55rem 1rem .7rem; font-size: .72rem;
  color: rgba(243, 241, 234, .55); border-top: 1px solid rgba(255, 255, 255, .12);
}
@media (max-width: 640px) {
  .garden-poem {
    right: 0; left: 0; top: auto; bottom: 0; transform: none;
    width: auto; max-height: 62vh; border-radius: 8px 8px 0 0;
  }
}
.garden-noscript {
  position: fixed; inset: 0; z-index: 5; display: grid; place-content: center;
  text-align: center; background: var(--bg); padding: 2rem;
}

.field-section { padding: 1rem clamp(1rem, 4vw, 3rem) 3rem; }
.field-section > h1 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); margin-bottom: .2rem; }
.field-section > h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: .2rem; }
.field-note { color: var(--muted); max-width: 44rem; margin-top: 0; }

/* The field: one tile per poem in the book. Waiting tiles speak Shakespeare;
   carved tiles show their artwork. Still — the motion lives in the garden. */
.field {
  display: grid; gap: .55rem;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
}
.tile {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 16 / 9; border-radius: 5px;
  border: 1px solid var(--surface); background: var(--bg-raised);
  padding: .5rem .6rem; color: var(--muted);
}
.tile-roman {
  position: absolute; right: .5rem; bottom: .3rem;
  font-family: var(--serif); font-size: .75rem; color: var(--muted); opacity: .7;
}
.tile-text {
  display: block; font-family: var(--serif); font-size: .78rem; line-height: 1.35;
  color: var(--muted); overflow: hidden; max-height: 4em;
}
.tile-waiting:hover { border-color: var(--muted); }
.tile-carved { padding: 0; border-color: var(--accent); }
.tile-carved img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: .85; transition: opacity .2s, transform .3s;
}
.tile-carved:hover img { opacity: 1; transform: scale(1.04); }
.tile-carved .tile-roman {
  color: var(--accent); opacity: 1; text-shadow: 0 1px 4px rgba(0,0,0,.8);
}
.tile-carved .tile-line {
  position: absolute; left: .5rem; right: 2.2rem; bottom: .3rem;
  font-family: var(--serif); font-size: .72rem; color: var(--text);
  text-shadow: 0 1px 4px rgba(0,0,0,.9);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tile-carved:hover { text-decoration: none; }

.sonnet-grid-section { padding: 1rem clamp(1rem, 4vw, 3rem) 3rem; }
.part-section { margin: 2.5rem 0; }
.part-opener { max-width: 40rem; margin-bottom: 1.2rem; }
.part-opener h3 {
  font-size: 1.8rem; margin: 0;
  color: var(--accent);
}
.part-name {
  margin: 0; font-size: .8rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: .15em;
}
.part-blurb { margin: .5rem 0 0; color: var(--muted); font-family: var(--serif); font-size: 1.05rem; }
.part-empty { color: var(--surface); font-family: var(--serif); font-style: italic; }
.sonnet-grid {
  display: grid; gap: 1.2rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.sonnet-card {
  background: var(--bg-raised); border: 1px solid var(--surface);
  border-radius: 8px; overflow: hidden; display: block; color: var(--text);
  transition: transform .15s ease, border-color .15s ease;
}
.sonnet-card:hover { transform: translateY(-3px); border-color: var(--accent); text-decoration: none; }
.sonnet-card img { display: block; width: 100%; aspect-ratio: 1344 / 768; object-fit: cover; }
.card-roman { display: block; padding: .6rem .8rem 0; font-family: var(--serif); font-size: 1.2rem; color: var(--accent); }
.card-line { display: block; padding: 0 .8rem .8rem; font-size: .85rem; color: var(--muted); }

/* Sonnet page */
.sonnet { max-width: 62rem; margin: 0 auto; padding: 2rem clamp(1rem, 4vw, 3rem) 4rem; }
.part-label { color: var(--accent); font-family: var(--serif); margin-bottom: .2rem; }
.sonnet-header h1 { font-size: clamp(1.5rem, 4vw, 2.4rem); margin: 0 0 .5rem; }
.arrow { color: var(--muted); }
.prevnext { display: flex; justify-content: space-between; font-size: .9rem; }
.prevnext .next { margin-left: auto; }

.texts { display: grid; gap: 2rem; margin: 2.5rem 0; }
@media (min-width: 900px) { .texts { grid-template-columns: 1fr 1fr; } }
.poem h2 { font-size: 1rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.poem pre {
  font-family: var(--serif); font-size: 1.05rem; line-height: 1.7;
  white-space: pre; margin: 0; tab-size: 5;
  overflow-x: auto;
}

/* The scrubbable transbliteration. Colours are the DynamicDiff render palette,
   so the live diff and the video agree about what a change looks like. Nothing
   here animates via @keyframes: morph.js writes one custom property, --p, per
   frame and every value below is derived from it in calc(). */
.morph { margin: 3rem 0; }
.morph h2 { font-size: 1rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.morph-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.morph-counter {
  font-family: var(--serif); font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: var(--accent); margin: 0; font-variant-numeric: tabular-nums;
}
.morph-note { color: var(--muted); font-size: .9rem; max-width: 44rem; margin: .2rem 0 1rem; }
/* Height is set per step by morph.js, so the body breathes with the poem
   instead of reserving its final size as dead space. */
.morph-body { position: relative; transition: min-height .45s ease; }
.morph-stage, .morph-plain {
  font-family: var(--morph-font); font-size: clamp(.9rem, 2.6vw, 1.18rem);
  line-height: 1.7; white-space: pre; margin: 0; tab-size: 5; overflow-x: auto;
}

/* On touch screens the stage is not a scrub surface — the slider does that —
   so horizontal panning stays free for reading long draft lines. */
@media (pointer: coarse) {
  .morph-stage { touch-action: auto; cursor: default; }
}
/* The stage is decoration stacked over the real text; .morph-plain is what a
   reader selects, and it always holds exactly one draft. */
.morph-stage {
  position: absolute; inset: 0; opacity: 0;
  touch-action: pan-y; cursor: ew-resize;
}
.morph.is-morphing .morph-stage { opacity: 1; user-select: none; }
.morph.is-morphing .morph-plain { opacity: 0; }
.morph-plain { transition: opacity .18s ease; }

/* Indentation is padding here, not tab characters, so it can animate — a step
   that only re-indents the poem should read as rows sliding sideways. */
.morph-stage .row {
  display: block; overflow: hidden;
  height: calc(var(--lh, 1.79em) * var(--h, 1));
  padding-inline-start: calc(
    var(--tabw, 2.2em) * (var(--ia) + (var(--ib) - var(--ia)) * var(--p, 0)));
}
.morph-stage .row-del {
  --h: clamp(0, 1 - var(--p, 0) * 2, 1);
  color: var(--diff-del); opacity: clamp(0, 1 - var(--p, 0) * 2, 1);
  text-shadow: 0 0 14px rgba(243, 139, 168, .55);
}
.morph-stage .row-ins {
  --h: clamp(0, var(--p, 0) * 2 - 1, 1);
  color: var(--diff-add); opacity: clamp(0, var(--p, 0) * 2 - 1, 1);
  text-shadow: 0 0 14px rgba(166, 227, 161, .5);
}
/* Old and new occupy one grid cell so they crossfade in place without reflow.
   The glow is what makes a change findable in a full poem at a glance. */
.morph-stage .ch {
  display: inline-grid; vertical-align: top; overflow: hidden;
  /* The cell breathes from the old text's width to the new one's, so the
     line reflows with the language instead of holding a hole open. */
  inline-size: calc(var(--wo, auto) * (1 - var(--p, 0)) + var(--wn, auto) * var(--p, 0));
}
.morph-stage .ch > * { grid-area: 1 / 1; justify-self: start; }
.morph-stage .ch .o {
  color: var(--diff-old); opacity: clamp(0, 1 - var(--p, 0) * 2, 1);
  text-shadow: 0 0 12px rgba(250, 179, 135, .55);
}
.morph-stage .ch .n {
  color: var(--diff-new); opacity: clamp(0, var(--p, 0) * 2 - 1, 1);
  text-shadow: 0 0 12px rgba(137, 180, 250, .55);
}
.morph-stage .ch.is-del .o { color: var(--diff-del); text-shadow: 0 0 12px rgba(243, 139, 168, .55); }
.morph-stage .ch.is-ins .n { color: var(--diff-add); text-shadow: 0 0 12px rgba(166, 227, 161, .5); }

.morph-controls { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; }
.morph-play {
  background: var(--surface); color: var(--text); border: 0; border-radius: 4px;
  padding: .4rem 1rem; font: inherit; font-size: .9rem; cursor: pointer;
}
.morph-play:hover { background: var(--accent); color: var(--bg); }
.morph-range { flex: 1 1 12rem; accent-color: var(--accent); }
.morph-status { color: var(--muted); font-size: .85rem; margin: 0; }
.render-note { margin-top: 3rem; color: var(--muted); }
.render-note summary { cursor: pointer; color: var(--link); }
.morph-cause {
  margin: .6rem 0 0; padding-left: .8rem; font-size: .85rem; color: var(--muted);
  border-left: 2px solid var(--diff-del);
}

/* The return path: where the images edited the poem instead of the reverse. */
.feedback { margin-top: 3rem; }
.feedback h2 { font-size: 1rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.feedback-list { list-style: none; margin: 0 0 1rem; padding: 0; }
.feedback-list li { margin-bottom: .6rem; font-family: var(--serif); }
.fb-kind {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .7rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--diff-del); margin-right: .5rem;
}
.fb-gone { color: var(--diff-del); text-decoration: line-through; text-decoration-thickness: 1px; }
.fb-arrow { color: var(--muted); margin: 0 .3rem; }
.fb-note { display: block; font-family: var(--sans); font-size: .85rem; color: var(--muted); }
.feedback-note { color: var(--muted); font-size: .9rem; max-width: 44rem; }

.slot-count { color: var(--muted); font-size: .8rem; margin: .6rem 0 1rem; }

/* Images denoise into existence as they scroll into view (reveal.js). */
.denoise-holder { position: relative; }
.denoise-holder img { display: block; }
.denoise {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border-radius: 6px; transition: opacity .3s ease;
}

.line-gallery { margin-top: 3rem; }
.line-figure { margin: 0 0 3rem; }
.line-text {
  font-family: var(--serif); font-size: 1.3rem; margin-bottom: .8rem;
  color: var(--text);
}
.line-text pre {
  font-family: inherit; font-size: inherit; color: inherit;
  margin: 0; white-space: pre; tab-size: 5; overflow-x: auto;
  line-height: 1.5;
}
.line-figure img { border-radius: 6px; display: block; }
.prompt-details { margin-top: .5rem; font-size: .85rem; color: var(--muted); }
.prompt-details summary { cursor: pointer; color: var(--link); }
.prompt-details dl { display: grid; grid-template-columns: auto 1fr; gap: .2rem .8rem; margin: .6rem 0 0; }
.prompt-details dt { color: var(--accent); }
.prompt-details dd { margin: 0; }
.prompt-details .prompt-text, .prompt-details .run-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .8rem; line-height: 1.5; color: var(--text);
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* The two vocabularies FLUX was handed, one row per section so the pair can be
   read across. Laid out as a grid rather than left to the table algorithm: the
   column split is a third to two thirds, which is the proportion of the prompts
   themselves — CLIP is given the short one, T5 the long one — and auto table
   layout would size the columns by their contents instead. */
.prompt-dicts {
  display: grid; grid-template-columns: auto 1fr 2fr; gap: .35rem 1.2rem;
  width: 100%; margin-top: 1rem; padding-top: .8rem;
  border-top: 1px solid var(--surface); border-collapse: collapse; text-align: left;
}
.prompt-dicts thead, .prompt-dicts tbody, .prompt-dicts tr { display: contents; }
.prompt-dicts th, .prompt-dicts td { font-weight: normal; text-align: left; }
.prompt-dicts thead th {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .75rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--accent); padding-bottom: .2rem;
}
.prompt-dicts .encoder-note {
  text-transform: none; letter-spacing: 0; color: var(--muted); font-size: .8em;
}
.prompt-dicts tbody th { color: var(--muted); font-size: .75rem; padding-top: .15rem; }
.prompt-dicts td { color: var(--text); }

/* Too narrow for three columns: give each section its own block and name the
   encoder on the cell, since the column heading is no longer above it. */
@media (max-width: 40rem) {
  .prompt-dicts { display: block; }
  .prompt-dicts thead { display: none; }
  .prompt-dicts tbody, .prompt-dicts tr, .prompt-dicts th, .prompt-dicts td { display: block; }
  .prompt-dicts tr { margin-top: .7rem; }
  .prompt-dicts td:not(:empty)::before {
    content: attr(data-encoder) " ";
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .7rem; letter-spacing: .06em; color: var(--accent); margin-right: .35rem;
  }
}

.drift-list { list-style: none; margin: 0; padding: 0; }
.drift-list li { margin-bottom: .2rem; }
.drift-label {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .7rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); margin-right: .4rem;
}
/* A substantive divergence is the poem and the prompt actually disagreeing —
   worth the accent. Symbolizing and anchor edits are systematic, so they stay
   quiet. */
.drift-substantive { color: var(--text); }
.drift-substantive .drift-label { color: var(--diff-new); }

.models { margin-top: 3rem; }
.model-figure { margin: 0 0 2rem; }
model-viewer { width: 100%; height: 480px; background: var(--bg-raised); border-radius: 6px; }
.model-figure figcaption { color: var(--muted); font-size: .9rem; margin-top: .4rem; }

.video-block { margin-top: 3rem; }
.video-block video {
  display: block; margin: 0 auto;
  max-width: 100%; max-height: 85vh; border-radius: 6px;
  background: var(--bg-raised);
}
.video-note { color: var(--muted); font-size: .9rem; }

.sonnet-footer { margin-top: 3rem; font-family: var(--serif); font-size: 1.1rem; }

/* Prose pages */
.prose { max-width: 44rem; margin: 0 auto; padding: 2rem clamp(1rem, 4vw, 3rem) 4rem; }
.prose h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.specs { display: grid; grid-template-columns: auto 1fr; gap: .3rem 1rem; }
.specs dt { color: var(--accent); font-family: var(--serif); }
.specs dd { margin: 0; }
.ledger { margin-bottom: 2rem; }
.ledger-note { color: var(--muted); font-size: .9rem; }
.ledger-table { width: 100%; border-collapse: collapse; font-size: .85rem; display: block; overflow-x: auto; }
.ledger-table th, .ledger-table td { text-align: left; padding: .35rem .8rem .35rem 0; border-bottom: 1px solid var(--surface); }
.ledger-table th { color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .06em; font-size: .75rem; }
.ledger-table .run-id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; }

/* Garden — an overcast-bright day inside a dark site. The daylight palette
   lives in garden.js; here only the DOM that floats over the canvas. */
.garden-shell { position: relative; }
/* Fixed: the page scrolls, the view does not — scroll position is the walk.
   pan-y hands vertical swipes to the page (walking) and keeps horizontal ones
   for garden.js (looking around). */
#garden-canvas { position: fixed; inset: 0; z-index: 1; overflow: hidden; }
#garden-canvas canvas { display: block; touch-action: pan-y; }
#garden-loading {
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-content: center; gap: .2rem; text-align: center;
  background: #dfeefb; color: #4a5568;
  transition: opacity .4s ease;
}
#garden-loading.is-gone { opacity: 0; pointer-events: none; }
.garden-loading-mark { font-family: var(--serif); font-size: 1.7rem; margin: 0; color: #1f2733; }
.garden-placeholder { text-align: center; padding: 6rem 1rem; }
/* Exactly two labels exist: a hover tip and an arrival label. Light chips —
   they sit on daylight, not on the site's dark ground. */
.garden-tip, .garden-arrival {
  background: rgba(255, 255, 255, .92); color: #1f2733;
  padding: .3rem .75rem; border-radius: 999px;
  font-family: var(--serif); font-size: .85rem; white-space: nowrap;
  box-shadow: 0 2px 12px rgba(30, 40, 60, .2);
  pointer-events: none;
}
.garden-arrival { font-size: .95rem; }

/* The sonnet modal: the real sonnet page in an iframe over the dimmed garden. */
.sonnet-modal { position: fixed; inset: 0; z-index: 50; }
.sonnet-modal[hidden] { display: none; }
.sonnet-modal-backdrop { position: absolute; inset: 0; background: rgba(10, 12, 20, .55); }
.sonnet-modal-sheet {
  position: absolute; inset: max(1.5vh, 12px);
  background: var(--bg); border: 1px solid var(--surface); border-radius: 10px;
  overflow: hidden; box-shadow: 0 12px 60px rgba(0, 0, 0, .5);
}
.sonnet-modal-frame { width: 100%; height: 100%; border: 0; display: block; background: var(--bg); }
.sonnet-modal-close {
  position: absolute; top: .6rem; right: .9rem; z-index: 2;
  width: 2.3rem; height: 2.3rem; border-radius: 50%;
  border: 1px solid var(--surface); background: var(--bg-raised); color: var(--text);
  font-size: 1.25rem; line-height: 1; cursor: pointer;
}
/* The button is fixed to the sheet while the frame's content scrolls under it,
   so a gutter in the header alone cannot keep content out from behind it. Give
   it its own ground and a shadow so whatever passes beneath stays legible. */
.sonnet-modal-close { box-shadow: 0 2px 12px rgba(0, 0, 0, .45); }
.sonnet-modal-close:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 640px) {
  .sonnet-modal-sheet { inset: 0; border: 0; border-radius: 0; }
}
body.modal-open { overflow: hidden; }

/* Scoped to one line: the garden opened this page on the sculpture you tapped.
   Keyed on the attribute rather than on .embed, so a ?line= URL copied out of
   the modal reproduces the same view as an ordinary page.

   No reordering is needed. Source order is header → texts → video → gallery →
   feedback → models → footer, so folding away everything but the one figure and
   its sculpture already leaves the line, then its sculpture, then the way out. */
html[data-scope-line] .texts,
html[data-scope-line] .video-block,
html[data-scope-line] .feedback,
html[data-scope-line] .prevnext,
html[data-scope-line] .line-gallery > h2,
html[data-scope-line] .models > h2 { display: none; }
/* Hidden wholesale, revealed one at a time. The pre-paint script sets the
   attribute, so the folded state is what paints first; scope.js then marks the
   subject. Doing it the other way round would show all six for a frame. */
html[data-scope-line] .line-figure,
html[data-scope-line] .model-figure { display: none; }
html[data-scope-line] .line-figure.is-scoped,
html[data-scope-line] .model-figure.is-scoped:not([hidden]) { display: block; }
html[data-scope-line] .line-figure.is-scoped { margin-bottom: 1.5rem; }
/* The scoped line leads the page, so it is set larger — but it keeps the poem's
   tab indentation, which is part of the work, and `white-space: pre` will not
   wrap it. On a narrow screen a long indented line scrolls out of its own box.
   Scale with the viewport so the whole line stays on screen instead. */
html[data-scope-line] .line-figure.is-scoped .line-text {
  font-size: clamp(1rem, 3.6vw, 1.45rem);
}
html[data-scope-line] .line-figure.is-scoped .line-text pre { tab-size: 3; }
html[data-scope-line] .line-figure.is-scoped img { width: 100%; }
/* Controls that only mean anything once scope.js is running. */
.line-nav, .scope-expand { display: none; }
html[data-scope-line] .line-figure.is-scoped .line-nav {
  display: flex; justify-content: space-between; gap: 1rem;
  font-family: var(--serif); font-size: .95rem; margin-top: 1.5rem;
}
html[data-scope-line] .line-figure.is-scoped .line-nav .next { margin-left: auto; text-align: right; }
html[data-scope-line] .line-figure.is-scoped .scope-expand:not([hidden]) {
  display: block; margin-top: 1.25rem; padding: .5rem 0;
  background: none; border: 0; border-top: 1px solid var(--surface);
  width: 100%; text-align: left;
  font: inherit; color: var(--link); cursor: pointer;
}
html[data-scope-line] .line-figure.is-scoped .scope-expand:hover { color: var(--accent); }

/* Embed mode: this document is inside the garden's modal iframe (set by the
   pre-paint check in base.html). The chrome belongs to the page around it. */
html.embed .site-header, html.embed .site-footer { display: none; }
html.embed main { min-height: 0; }
/* The sheet already insets itself and the site chrome is gone, so the standalone
   page's breathing room reads as dead space here. */
html.embed .sonnet { padding-top: 1.25rem; padding-bottom: 2.5rem; }
/* Clear the close button, which floats over this document's top-right corner. */
html.embed .sonnet-header { padding-right: 3.4rem; }
/* 480px is most of a phone's modal. The standalone page keeps its full height. */
html.embed model-viewer { height: min(46vh, 480px); }
/* The parent's scroll is the walk through the garden; reaching the end of this
   frame must not start walking. */
html.embed body { overscroll-behavior: contain; }

/* Motion is opt-out everywhere. The scrubber still exposes every draft and
   every diff colour under reduce — colour is not motion — it simply stops
   easing between them, and morph.js hides the play button. */
@media (prefers-reduced-motion: reduce) {
  .sonnet-card { transition: none; }
  #garden-loading { transition: none; }
  .morph-plain { transition: none; }
  .morph-play { display: none; }
}
