/* The living garden (garden-live.js). Loaded beside final-form.css, whose type and masthead it shares. */
.lg {
  --lg-night: var(--bc-night);
  --lg-night-2: var(--bc-night-2);
  --lg-ink: var(--bc-ink);
  --lg-muted: var(--bc-muted);
  --lg-line: var(--bc-line);
  --lg-warm: var(--bc-warm);
  --lg-cool: var(--bc-cool);
  --lg-evidence: var(--bc-green);
  --lg-part: var(--bc-clay);
  --lg-veil: var(--bc-lilac);
  margin-block: clamp(1.5rem, 4vw, 3rem) 4rem;
}

.lg-header { max-width: 48rem; }
.lg-header h1 { font-size: clamp(2.3rem, 5.4vw, 4.2rem); letter-spacing: -.04em; }
.lg-lede { margin-top: 1rem; font: 1.2rem/1.45 var(--serif); }
.lg-dates { margin-top: .8rem; color: var(--muted); font-size: .92rem; }
.lg-dark { font-size: .84em; font-weight: 700; letter-spacing: .07em; }
.lg-veil { color: var(--lg-veil); font-size: .8em; font-weight: 700; letter-spacing: .07em; }

.lg-figure {
  margin-top: 1.75rem;
  border-radius: .8rem;
  overflow: hidden;
  color: var(--lg-ink);
  background: radial-gradient(circle at 50% 40%, var(--lg-night-2) 0, var(--lg-night) 68%);
}
.lg-svg { display: block; width: 100%; height: auto; }

.lg-heart { fill: url(#lg-heart); }
.lg-band { fill: url(#lg-hatch); }
.lg-svg pattern line { stroke: var(--lg-line); stroke-width: 1.3; }
.lg-guide { fill: none; stroke: var(--lg-line); stroke-width: 1; stroke-dasharray: 2 7; }
.lg-guide-rim { stroke-dasharray: none; }
.lg-guide-label, .lg-band-label { fill: var(--lg-muted); font: 12.5px var(--sans); paint-order: stroke; stroke: var(--lg-night); stroke-width: 4px; stroke-linejoin: round; }
.lg-centre { fill: var(--lg-warm); }

.lg-edge { fill: none; stroke: var(--lg-evidence); stroke-width: 1.1; opacity: .17; }
.lg-f-advances { stroke: var(--lg-warm); }
.lg-f-built-on, .lg-f-informs { stroke: var(--lg-cool); }
.lg-f-part-of { stroke: var(--lg-part); }
.lg-edge-veiled { stroke-dasharray: 2 5; }
.lg-f-veiled { stroke: var(--lg-veil); opacity: .5; }
.lg-edge-negative { stroke-dasharray: 8 5; }
#lg-direction path { fill: var(--lg-warm); opacity: .6; }

.lg-node text { fill: var(--lg-ink); font: 15px var(--sans); paint-order: stroke; stroke: var(--lg-night); stroke-width: 4.5px; stroke-linejoin: round; }
.lg-band-outer text { fill: var(--lg-muted); font-size: 13.5px; }
.lg-thesis text { fill: var(--lg-evidence); }
.lg-veiled text { fill: var(--lg-veil); font-style: italic; }
.lg-core { fill: var(--lg-warm); stroke: var(--lg-night); stroke-width: 1.5; }
.lg-core-outer { fill: var(--lg-cool); }
.lg-core-unlit { fill: var(--lg-night); stroke: var(--lg-muted); stroke-dasharray: 3 3; }
.lg-core-thesis { fill: var(--lg-evidence); }
.lg-core-veiled { fill: var(--lg-night); stroke: var(--lg-veil); stroke-dasharray: 1.5 3; }
.lg-glow { fill: url(#lg-halo); }
.lg-unread { fill: none; stroke: var(--lg-cool); stroke-width: 1.7; }
.lg-pulse { fill: none; stroke: var(--lg-warm); stroke-width: 1.3; transform-box: fill-box; transform-origin: center; animation: lg-pulse 3.4s ease-out infinite; }
@keyframes lg-pulse {
  0% { transform: scale(.75); opacity: .95; }
  100% { transform: scale(1.75); opacity: 0; }
}
a.lg-node { text-decoration: none; cursor: pointer; }
a.lg-node:hover text, a.lg-node:focus-visible text { text-decoration: underline; }
a.lg-node:focus-visible { outline: none; }
a.lg-node:focus-visible .lg-core { stroke: #fff; stroke-width: 3; }

.lg-figure figcaption { padding: clamp(1rem, 3vw, 2rem); border-top: 1px solid var(--lg-line); }
.lg-figure h2 { font-size: 1.35rem; letter-spacing: -.01em; }
.lg-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1rem 2rem; margin: 1rem 0 0; }
.lg-legend div { margin: 0; }
.lg-legend dt { font-weight: 700; font-size: .9rem; }
.lg-legend dd { margin: .2rem 0 0; color: var(--lg-muted); font-size: .9rem; }
.lg-fine { margin-top: 1.2rem; color: var(--lg-muted); font-size: .82rem; }

.lg-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 2rem 3rem; margin-top: 2.5rem; }
.lg-lists h3 { font-size: 1.45rem; }
.lg-note { margin-top: .3rem; color: var(--muted); font-size: .88rem; }
.lg-node-list, .lg-edge-list { margin: .9rem 0 0; padding: 0; list-style: none; }
.lg-node-list li, .lg-edge-list li { padding-block: .6rem; border-top: 1px solid var(--rule); font-size: .92rem; }
.lg-next { display: block; color: var(--muted); }
.lg-frame-link { white-space: nowrap; }
.lg-sources { margin-top: 2.5rem; }
.lg-sources summary { cursor: pointer; font: 1.2rem var(--serif); }

@media (max-width: 720px) {
  /* at this width the names are too small to read; the lists under the picture carry them */
  .lg-node text, .lg-guide-label, .lg-band-label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .lg-pulse { animation: none; transition: none; }
}

/* a project's own relationships, lit while it is pointed at or focused */
.lg-own { pointer-events: none; opacity: 0; transition: opacity .15s; }
.lg-own .lg-edge { opacity: .95; stroke-width: 1.8; }
.lg-node:hover .lg-own, .lg-node:focus-visible .lg-own { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .lg-own { transition: none; }
}

/* ── in the round (public/garden-3d.js) ─────────────────────────────────────────────────────────
   Without script or WebGL the stage stays hidden and the plan view is the picture. */
.lg3 { display: none; position: relative; }
.lg-figure.is-3d .lg3 { display: block; }
.lg-figure.is-3d .lg-svg { display: none; }
.lg3-canvas { width: 100%; aspect-ratio: 1.25; max-height: 86vh; }
.lg3-canvas canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
.lg3-labels { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.lg3-label {
  position: absolute; left: 0; top: 0; white-space: nowrap; pointer-events: auto;
  color: var(--lg-ink); font: .82rem var(--sans); text-decoration: none; text-shadow: 0 0 6px var(--lg-night), 0 0 2px var(--lg-night);
  opacity: 0; transition: color .15s;
}
.lg3-band-outer { color: var(--lg-muted); font-size: .76rem; }
.lg3-thesis { color: var(--lg-evidence); font-size: .9rem; }
.lg3-veiled { color: var(--lg-veil); font-style: italic; }
a.lg3-label:hover, a.lg3-label:focus-visible, .lg3-label.is-on { color: #fff; text-decoration: underline; }
.lg3-label.is-dim { color: var(--lg-line); }
.lg3-card {
  position: absolute; left: clamp(.6rem, 2vw, 1.4rem); bottom: clamp(.6rem, 2vw, 1.4rem); max-width: min(24rem, calc(100% - 1.2rem));
  padding: .8rem 1rem; border: 1px solid var(--lg-line); border-radius: .5rem;
  background: color-mix(in srgb, var(--lg-night) 88%, transparent); color: var(--lg-ink); font-size: .86rem;
}
.lg3-card strong { display: block; font: 1.1rem var(--serif); }
.lg3-card .lg-next { color: var(--lg-muted); }
.lg3-card .lg-veil { color: var(--lg-veil); }
.lg3-hint { position: absolute; right: clamp(.6rem, 2vw, 1.4rem); top: clamp(.6rem, 2vw, 1.2rem); max-width: 17rem; margin: 0; color: var(--lg-muted); font-size: .78rem; text-align: right; pointer-events: none; }
.lg-view-toggle {
  display: block; margin: .25rem auto 1rem; padding: .35rem .9rem; border: 1px solid var(--lg-line); border-radius: 2rem;
  background: none; color: var(--lg-ink); font: .82rem var(--sans); cursor: pointer;
}
.lg-view-toggle[hidden] { display: none; }
.lg-view-toggle:hover, .lg-view-toggle:focus-visible { border-color: var(--lg-ink); }
@media (max-width: 720px) {
  .lg3-canvas { aspect-ratio: .82; }
  /* too many names for this width: the thesis and the project in hand keep theirs, the lists carry the rest */
  .lg3-label { display: none; }
  .lg3-label.is-on, .lg3-thesis { display: block; }
  .lg3-hint { display: none; }
}

/* the site's own pages: open squares in the gap between the scale and the outer band */
.lg { --lg-page: var(--bc-ice); }
.lg-core-page { fill: var(--lg-night); stroke: var(--lg-page); stroke-width: 1.6; }
.lg-core-page.lg-core-veiled { stroke: var(--lg-veil); stroke-dasharray: 2 2; }
.lg-page text { fill: var(--lg-page); font-size: 13px; }
.lg-f-shows { stroke: var(--lg-page); }
.lg3-page { color: var(--lg-page); font-size: .76rem; }
.lg3-label.lg3-veiled.lg3-band-pages { display: none; }
.lg3-label.lg3-veiled.lg3-band-pages.is-on { display: block; }
