/* The public landing page (templates/landing/page.html): a Trail Signposts signpost into
   the feedback loop. Tokens from tokens.css; the footer, fields and buttons from area.css.
   The example sidebar cards reuse the sidebar's class names with the same values as
   ac/sidebar.css (scoped there to #ac-sidebar, here to .ld-sb). One breakpoint (47.99rem).
   Motion: the plates settle onto the post on load, a followed plate flares its destination heading,
   and the demo plays one example as the reader scrolls (--p, set by js/landing.js). No inline styles (CSP). */.ld {
  --ld-max: 100rem;
  --ld-gutter: clamp(1rem, 5vw, 5rem);
  --ld-pad: max(var(--ld-gutter), calc((100% - var(--ld-max)) / 2 + var(--ld-gutter)));
  --ld-hl: rgba(255, 204, 0, 0.3);
  --ld-hl-on: rgba(255, 204, 0, 0.62);
  --ld-shadow-ex: 0 1px 2px rgba(26, 26, 26, 0.06), 0 16px 32px -20px rgba(26, 26, 26, 0.35);
}
html:has(> body.ld) { scrollbar-color: var(--ac-scrollbar) var(--ac-ground); }
.ld main { display: block; }
.ld main:focus { outline: none; }
.ld-wrap { width: 100%; max-width: var(--ld-max); margin-inline: auto; padding-inline: var(--ld-gutter); }
.ld code { overflow-wrap: anywhere; }
/* file paths, ids and command arguments never split (not even at a hyphen) */
.ld .ld-nb, .ld-page-path, .ld-ex-cap code, .ld-sb .ac-body code { white-space: nowrap; }

/* ---- the top bar ---- */
.ld-bar {
  display: flex; align-items: center; gap: 1rem; min-height: var(--ac-rail-h);
  padding: 0 calc(var(--ld-pad) - 0.625rem) 0 calc(var(--ld-pad) - 0.25rem);
  background: var(--ac-white); border-bottom: 2px solid var(--ac-ink);
}
.ld-bar-tools { display: flex; align-items: center; gap: 0.25rem; }
.ld-signin {
  display: inline-flex; align-items: center; min-height: 2.25rem; padding: 0 0.625rem; border-radius: 5px;
  font: 600 1rem/1 var(--ac-sign); letter-spacing: 0.01em;
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px;
}
.ld-signin:hover, .ld-bar .ac-lang-rail button:hover { background: var(--ac-hover); }

/* ---- the first viewport: the name and the signpost ---- */
.ld-hero { background: var(--ac-ground); }
/* No full-height centring: the next section's heading and sign peek in below, so the story reads on. */
.ld-hero-in {
  max-width: var(--ld-max); margin-inline: auto;
  padding: clamp(2rem, 7vh, 5rem) var(--ld-gutter) clamp(2rem, 6vh, 4.5rem);
  display: grid; grid-template-columns: minmax(0, 45fr) minmax(0, 55fr); column-gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}
/* the name fills its column: sized to the column (container units), not the viewport */
.ld-lead { container-type: inline-size; }
.ld-name { font: 700 clamp(4.75rem, 31cqi, 11.75rem)/0.8 var(--ac-sign); letter-spacing: -0.012em; margin-left: -0.045em; }
.ld-tagline {
  margin-top: clamp(1.75rem, 3vw, 2.75rem); max-width: 15em;
  font: 600 clamp(1.5rem, 2.55vw, 2.375rem)/1.08 var(--ac-sign); letter-spacing: 0.005em; text-wrap: balance;
}
.ld-offer { margin-top: clamp(1.5rem, 2.4vh, 2rem); max-width: 29em; font: 400 clamp(1.0625rem, 1.4vw, 1.3125rem)/1.5 var(--ac-ui); color: var(--ac-quote-ink); }

/* a tall post: room above the first plate, and air between the plates */
.ld-sign { position: relative; padding-top: clamp(2.25rem, 5vh, 3.5rem); }
.ld-post {
  position: absolute; left: 1.125rem; top: 0; bottom: 2.75rem; width: 1.75rem;
  background: var(--ac-ink); border-radius: 3px 3px 0 0;
}
.ld-post::after {
  content: ""; position: absolute; left: -0.875rem; right: -0.875rem; bottom: 0; height: 6px;
  background: var(--ac-ink); border-radius: 2px;
}
.ld-sign nav { position: relative; }
.ld-plates { list-style: none; margin: 0; padding: 0 0 clamp(2rem, 4vh, 3rem); display: flex; flex-direction: column; align-items: flex-start; gap: clamp(0.875rem, 2vh, 1.375rem); }
.ld-plates > li { max-width: 100%; }
.ld-plates > li:last-child { margin-top: clamp(0.5rem, 1.5vh, 1rem); }

/* A plate: the link carries the focus ring, the shape inside carries the arrow cut. */
.ld-plate { display: block; width: 100%; color: var(--ac-ink); text-decoration: none; border-radius: 2px; }
.ld-plate:focus-visible { outline: 3px solid var(--ac-ink); outline-offset: 4px; }
.ld-plate-shape {
  position: relative; display: flex; flex-direction: column; justify-content: center;
  min-height: clamp(4.5rem, 6vw, 5.5rem); padding: 0.875rem 4rem 0.875rem 1.75rem;
  background: var(--ac-yellow);
  clip-path: polygon(0 0, calc(100% - 2.625rem) 0, 100% 50%, calc(100% - 2.625rem) 100%, 0 100%);
}
/* the clamps that hold the plate to the post */
.ld-plate-shape::before, .ld-plate-shape::after {
  content: ""; position: absolute; left: 0.75rem; width: 1.375rem; height: 4px;
  background: rgba(26, 26, 26, 0.28); border-radius: 2px;
}
.ld-plate-shape::before { top: 0.5rem; }
.ld-plate-shape::after { bottom: 0.5rem; }
.ld-plate-to {
  display: flex; align-items: center; gap: 0.45em;
  font: 700 clamp(1.625rem, 2.35vw, 2.125rem)/1.05 var(--ac-sign); letter-spacing: 0.005em;
}
.ld-plate-arrow { width: 0.72em; height: 0.72em; stroke-width: 2.1; }
.ld-plate-sub { margin-top: 0.4rem; font: 500 clamp(0.9375rem, 1.15vw, 1.0625rem)/1.3 var(--ac-ui); }
.ld-plate:hover .ld-plate-to { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 0.14em; }
/* staggered plate lengths, as on a real post; long German labels simply grow the plate */
.ld-plates > li:nth-child(1) { min-width: min(37rem, 100%); }
.ld-plates > li:nth-child(2) { min-width: min(33rem, 89%); }
.ld-plates > li:nth-child(3) { min-width: min(35.5rem, 96%); }
.ld-plates > li:nth-child(4) { min-width: min(34.5rem, 93%); }
/* the primary plate: ink with yellow type */
.ld-plate-go .ld-plate-shape {
  min-height: clamp(5.25rem, 7vw, 6.75rem); padding-right: 4.75rem;
  background: var(--ac-ink); color: var(--ac-yellow);
  clip-path: polygon(0 0, calc(100% - 3.25rem) 0, 100% 50%, calc(100% - 3.25rem) 100%, 0 100%);
}
.ld-plate-go .ld-plate-shape::before, .ld-plate-go .ld-plate-shape::after { background: rgba(255, 204, 0, 0.45); }
.ld-plate-go .ld-plate-to { font-size: clamp(2rem, 3.2vw, 2.875rem); }
.ld-plate-go .ld-plate-sub { color: var(--ac-on-ink-mute); }
.ld-plate-go:hover .ld-plate-shape { background: var(--ac-ink-raised); }
.ld-plate-go:focus-visible { outline-color: var(--ac-ink); }

.ld-trail-line {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 0.625rem; padding-left: 0.25rem;
  font: 600 0.8125rem/1.2 var(--ac-sign); letter-spacing: 0.07em; text-transform: uppercase;
}
.ld-trail-line .ar-waymark { flex: none; }
.ld-dot { color: var(--ac-mute); }

/* The authored load moment: the plates settle onto the post, already visible. */
@media (prefers-reduced-motion: no-preference) {
  .ld-plates > li { transform-origin: 1.875rem 0.5rem; animation: ld-settle 1s var(--ac-ease) 0.12s both; }
  .ld-plates > li:nth-child(2) { animation-delay: 0.21s; }
  .ld-plates > li:nth-child(3) { animation-delay: 0.3s; }
  .ld-plates > li:nth-child(4) { animation-delay: 0.42s; }
}
@keyframes ld-settle {
  from { transform: translateY(-0.875rem) rotate(-3.5deg); }
  to { transform: none; }
}

/* ---- sections ---- */
.ld-section {
  padding-block: clamp(4rem, 8vw, 7rem) clamp(2.5rem, 4vw, 3.5rem);
  background: var(--ac-white); border-top: 1px solid var(--ac-rule);
}
.ld-h2 { font: 700 clamp(2.375rem, 4.4vw, 3.75rem)/1 var(--ac-sign); letter-spacing: 0.005em; }
.ld-h3 { margin-top: 2.25rem; font: 700 1.125rem/1.2 var(--ac-sign); }
.ld-lead-text { margin-top: 1.25rem; max-width: 36em; font: 400 clamp(1.0625rem, 1.3vw, 1.25rem)/1.55 var(--ac-ui); color: var(--ac-quote-ink); }
.ld-back-row { margin-top: clamp(3rem, 5vw, 4.5rem); }
.ld-back { display: inline-block; color: var(--ac-ink); text-decoration: none; }
.ld-back-shape {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.25rem; padding: 0 0.875rem 0 0.75rem;
  background: var(--ac-white); box-shadow: inset 0 0 0 1px var(--ac-edge); border-radius: 2px;
  font: 600 0.9375rem/1.1 var(--ac-sign); letter-spacing: 0.02em;
}
.ld-back:hover .ld-back-shape { background: var(--ac-hover); }

/* The note under a step: a proof line in the world's grammar (ground, drawn icon). */
.ld-private {
  display: flex; align-items: flex-start; gap: 0.625rem; margin-top: 2rem; max-width: 34em;
  padding: 0.75rem 0.875rem; background: var(--ac-ground); border-radius: 4px;
  font: 500 0.9375rem/1.45 var(--ac-ui);
}
.ld-private .ar-icon { margin-top: 0.1875rem; }
.ld-private b { font-weight: 600; }

/* ---- the problem, in prose at reading measure ---- */
.ld-problem { padding-top: clamp(1.75rem, 2.5vw, 2.25rem); }
.ld-prose p { max-width: 36em; margin-top: 1rem; font: 400 clamp(1.0625rem, 1.3vw, 1.25rem)/1.55 var(--ac-ui); color: var(--ac-quote-ink); text-wrap: pretty; }
.ld-prose .ld-h2 + p { margin-top: 1.125rem; }
.ld-prose p:last-child { color: var(--ac-ink); }

/* ---- examples: synthetic ---- */
.ld-ex-cap { margin-bottom: 0.5rem; font: 600 0.8125rem/1.3 var(--ac-ui); }
.ld-code {
  margin: 0; padding: 0.75rem 0.875rem; overflow-x: auto; background: var(--ac-ground); border-radius: 4px;
  font: 500 0.8125rem/1.55 var(--ac-mono); color: var(--ac-ink); tab-size: 2;
}
.ld-code code { font: inherit; background: none; padding: 0; overflow-wrap: normal; }
.ld-code-wrap { white-space: pre-wrap; }
.ld-code-wrap code { overflow-wrap: anywhere; }
.ld-code b { font-weight: 700; background: var(--ld-hl-on); box-decoration-break: clone; -webkit-box-decoration-break: clone; }

/* the document page, in the demo's window */
.ld-page-h { margin-bottom: 0.875rem !important; font: 400 1.25rem/1.2 var(--ac-doc); }
.ld-para { position: relative; max-width: 36em; font: 400 0.9375rem/1.65 var(--ac-doc); }
.ld-para + .ld-para { margin-top: 0.875rem; }
.ld-para mark { background: none; color: inherit; padding: 0.0625rem 0; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.ld-para mark.ld-hl-on { background: var(--ld-hl-on); text-decoration: underline 2px var(--ac-ink); text-underline-offset: 3px; }
/* a numbered margin mark: a 26x22 plate with a 1px stroke, pointing right at the passage */
.ld-mark {
  position: absolute; left: calc(-26px - 10px); top: 0.25rem; isolation: isolate;
  display: grid; place-items: center; width: 26px; height: 22px; padding-right: 6px;
  font: 700 13px/1 var(--ac-sign); font-variant-numeric: tabular-nums lining-nums; color: var(--ac-ink);
  background: var(--ac-ink); clip-path: polygon(0 0, 18px 0, 100% 50%, 18px 100%, 0 100%);
}
.ld-mark::before {
  content: ""; position: absolute; inset: 1px; z-index: -1; background: var(--ac-yellow);
  clip-path: polygon(0 0, calc(100% - 8.4px) 0, 100% 50%, calc(100% - 8.4px) 100%, 0 100%);
}
.ld-mark-on { background: var(--ac-yellow); color: var(--ac-yellow); }
.ld-mark-on::before { inset: 1.5px; background: var(--ac-ink); }
/* JSON lines wrap with a hanging indent under their key, so nothing scrolls sideways */
.ld-jl { display: block; white-space: pre-wrap; overflow-wrap: anywhere; padding-left: calc(var(--ld-i) + 2ch); text-indent: -2ch; }
.ld-i0 { --ld-i: 0ch; }
.ld-i1 { --ld-i: 2ch; }

/* ---- the demo: three steps beside one pinned stage, played by scrolling ----
   Each step's text stays pinned beside the stage while its section passes; the stage plays the
   example from --p (0 to 1, a third per step). Every moving part is an .ld-k: it eases from 0 to 1
   (--e) while --p runs from --a over --d, and back out (--u) from --b over --d2. Without script
   the demo is a plain layout: the steps in turn, the finished loop and both terminals beside them. */
.ld-demo {
  --ld-stage-h: min(46rem, calc(100vh - 3rem));
  --ld-stage-top: max(1.5rem, calc((100vh - var(--ld-stage-h)) / 2));
  padding-block: clamp(2rem, 4vw, 3rem) clamp(2.5rem, 4vw, 3.5rem);
  background: var(--ac-white); border-top: 1px solid var(--ac-rule);
}
.ld-demo-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: clamp(2rem, 4vw, 4.5rem); align-items: start; }
@media (scripting: enabled) { .ld-beats { padding-bottom: var(--ld-stage-h); } }
.ld-beat { min-height: 120vh; scroll-margin-top: var(--ld-stage-top); }
.ld-beat + .ld-beat { min-height: 130vh; }
.ld-beat:last-child { min-height: 170vh; }
/* arriving from the signpost lands with the push printed and the page coming in */
.ld-beat:first-child { scroll-margin-top: calc(var(--ld-stage-top) - 34vh); }
.ld-beat-in { position: sticky; top: var(--ld-stage-top); padding-block: clamp(1.5rem, 6vh, 4rem) 3rem; }
.ld-beat .ld-private { margin-top: 1.75rem; }

.ld-stage { position: sticky; top: var(--ld-stage-top); height: var(--ld-stage-h); margin: 0; --p: 1; container-type: inline-size; }
@media (scripting: enabled) { .ld-stage { --p: 0; } }
.ld-k {
  --a: 0; --d: 0.05; --b: 2; --d2: 0.05;
  --t: clamp(0, (var(--p) - var(--a)) / var(--d), 1);
  --e: calc(1 - (1 - var(--t)) * (1 - var(--t)) * (1 - var(--t)));
  --u: clamp(0, (var(--p) - var(--b)) / var(--d2), 1);
}

/* the window: the reader as a reviewer sees it */
.ld-win {
  position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden;
  background: var(--ac-white); border: 1px solid var(--ac-rule); border-radius: 6px; box-shadow: var(--ld-shadow-ex);
}
.ld-win-rail {
  flex: none; display: flex; align-items: center; gap: 0.875rem; min-height: 2.75rem; padding: 0 0.875rem 0 1rem;
  background: var(--ac-yellow); border-bottom: 2px solid var(--ac-ink); font: 600 0.875rem/1 var(--ac-sign);
}
.ld-win-mark { display: inline-flex; align-items: center; gap: 0.5rem; font: 700 1.0625rem/1 var(--ac-sign); }
.ld-win-doc { font: 500 0.75rem/1 var(--ac-mono); white-space: nowrap; }
.ld-win-ver { margin-left: auto; display: grid; letter-spacing: 0.04em; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.ld-win-ver > span { grid-area: 1 / 1; justify-self: end; }
.ld-win-body { position: relative; flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) clamp(13rem, 36%, 25rem); }
.ld-win-page { min-width: 0; padding: 1.75rem 1.5rem 1.5rem 3.5rem; overflow: hidden; }
.ld-win-sb {
  display: flex; flex-direction: column; gap: 0.625rem; min-width: 0; padding: 0.75rem; overflow: hidden;
  background: var(--ac-ground); border-left: 1px solid var(--ac-rule);
}
.ld-win-page { position: relative; }
.ld-win-wait {
  position: absolute; left: 1.5rem; right: 1.5rem; top: 1.75rem; display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.625rem; background: var(--ac-ground); border-radius: 4px; font: 500 0.8125rem/1.35 var(--ac-ui);
}
/* the agent's addition: a small table, the document's own (serif, tabular figures, hairlines) */
.ld-added { overflow: hidden; }
.ld-tbl { margin: 0.875rem 0 0.25rem; border-collapse: collapse; font: 400 0.875rem/1.4 var(--ac-doc); font-variant-numeric: tabular-nums lining-nums; }
.ld-tbl th, .ld-tbl td { padding: 0.3125rem 1.5rem 0.3125rem 0; border-bottom: 1px solid var(--ac-rule); text-align: right; }
.ld-tbl th:first-child, .ld-tbl td:first-child { text-align: left; }
.ld-tbl th { font-weight: 600; border-bottom-color: var(--ac-ink); }
.ld-tbl tbody tr:first-child td { font-weight: 600; }
.ld-c2-foot { display: grid; }
.ld-c2-foot > * { grid-area: 1 / 1; align-self: start; }
.ld-toast {
  position: absolute; left: 50%; bottom: 1rem; z-index: 1; padding: 0.625rem 0.875rem; white-space: nowrap;
  background: var(--ac-ink); color: var(--ac-white); border-radius: 6px; box-shadow: 0 10px 24px -12px rgba(26, 26, 26, 0.6);
  font: 500 0.8125rem/1.3 var(--ac-ui);
}

/* the terminals: the author's side, laid over the window */
.ld-term {
  position: absolute; z-index: 2; left: -1.75rem; bottom: 1.75rem; width: min(36rem, 82%);
  background: var(--ac-ink); color: var(--ac-white); border-radius: 6px; box-shadow: 0 18px 40px -18px rgba(26, 26, 26, 0.65);
  font: 500 0.8125rem/1.55 var(--ac-mono);
}
.ld-term-agent { right: calc(clamp(13rem, 36%, 25rem) + 1rem); width: auto; bottom: 1.25rem; }
.ld-term-bar {
  padding: 0.5rem 0.875rem; border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--ac-on-ink-mute); font: 600 0.75rem/1.2 var(--ac-sign); letter-spacing: 0.05em;
}
.ld-term-out { padding: 0.75rem 0.875rem 0.9375rem; }
.ld-term-out > * + * { margin-top: 0.3125rem; }
.ld-tl { white-space: pre-wrap; overflow-wrap: anywhere; }
.ld-tl code { font: inherit; background: none; padding: 0; color: inherit; }
.ld-ps { color: var(--ac-on-ink-mute); }
.ld-ask { font-weight: 700; }
/* a tool call: a small white plate before its name */
.ld-tool::before { content: ""; display: inline-block; width: 0.55em; height: 0.55em; margin-right: 0.65em; background: var(--ac-white); }
.ld-res { padding-left: 1.2em; color: var(--ac-on-ink-mute); }
.ld-res .ld-jl { padding-left: calc(var(--ld-i) + 2ch); }
/* the place the agent works on (file, line, the new text) is yellow, as every place is */
.ld-at { color: var(--ac-yellow); }
.ld-ln-t { color: var(--ac-white); font-weight: 700; }

/* the score: what moves, and when (--p) */
.ld-k-push { --a: -1; --d: 1; --b: 0.19; --d2: 0.06; opacity: calc(1 - var(--u)); transform: translateY(calc(var(--u) * var(--u) * 2.5rem)); }
.ld-k-l1 { --a: 0.025; --d: 0.03; }
.ld-k-l2 { --a: 0.055; --d: 0.03; }
.ld-k-l3 { --a: 0.1; --d: 0.03; }
.ld-k-l1, .ld-k-l2, .ld-k-l3, .ld-k-a1, .ld-k-a2, .ld-k-a3, .ld-k-a4, .ld-k-a4b, .ld-k-a5, .ld-k-a6, .ld-k-body {
  opacity: var(--e); transform: translateY(calc((1 - var(--e)) * 0.375rem));
}
/* a terminal line takes its room as it is printed, so the window grows with its output */
.ld-term-out > .ld-k { max-height: calc(var(--e) * 12em); margin-top: calc(var(--e) * 0.3125rem); overflow: hidden; }
.ld-k-doc { --a: 0.14; --d: 0.05; opacity: var(--e); }
.ld-k-wait { --a: 0.09; --d: 0.03; opacity: calc(1 - var(--e)); }
.ld-k-page { --a: 0.13; --d: 0.08; opacity: var(--e); transform: translateY(calc((1 - var(--e)) * 1.25rem)); }
.ld-k-toast { --a: 0.23; --d: 0.04; --b: 0.36; --d2: 0.04; opacity: calc(var(--e) * (1 - var(--u))); transform: translate(-50%, calc((1 - var(--e)) * 0.75rem)); }
.ld-k-c1 { --a: 0.37; --d: 0.06; }
.ld-k-sweep { --a: 0.43; --d: 0.065; }
.ld-k-c2 { --a: 0.5; --d: 0.05; }
.ld-k-body { --a: 0.55; --d: 0.05; }
.ld-k-act { --a: 0.585; --d: 0.04; --b: 0.93; --d2: 0.03; opacity: calc(var(--e) * (1 - var(--u))); }
.ld-k-agent { --a: 0.68; --d: 0.05; --b: 0.895; --d2: 0.05; opacity: calc(var(--e) * (1 - var(--u))); transform: translateY(calc((1 - var(--e)) * 2rem + var(--u) * var(--u) * 2.5rem)); }
.ld-k-a1 { --a: 0.71; --d: 0.025; }
.ld-k-a2 { --a: 0.735; --d: 0.025; }
.ld-k-a3 { --a: 0.755; --d: 0.03; }
.ld-k-a4 { --a: 0.785; --d: 0.025; }
.ld-k-a4b { --a: 0.805; --d: 0.03; }
.ld-k-a5 { --a: 0.83; --d: 0.025; }
.ld-k-a6 { --a: 0.855; --d: 0.025; }
/* the next version: the table opens under the paragraph */
.ld-k-table { --a: 0.905; --d: 0.05; max-height: calc(var(--e) * 14rem); opacity: var(--e); }
.ld-v1.ld-k-ver { --a: -1; --d: 1; --b: 0.905; --d2: 0.03; opacity: calc(1 - var(--u)); }
.ld-v2.ld-k-ver { --a: 0.905; --d: 0.03; opacity: var(--e); }
.ld-k-reply { --a: 0.93; --d: 0.04; max-height: calc(var(--e) * 10rem); margin-top: calc((var(--e) - 1) * 0.75rem); opacity: var(--e); overflow: hidden; }
/* the first card folds to its plate when the reply arrives, so the answered card has the room */
.ld-k-fold { --a: -1; --d: 1; --b: 0.92; --d2: 0.04; max-height: calc((1 - var(--u)) * 12rem); opacity: calc(1 - var(--u)); overflow: hidden; }
.ld-c1 .ac-quote.ld-k-fold { margin-bottom: calc((1 - var(--u)) * 0.75rem); }
.ld-c1 .ac-thread.ld-k-fold { padding-bottom: calc((1 - var(--u)) * 0.75rem); }
.ld-k-proof { --a: 0.955; --d: 0.03; opacity: var(--e); transform: translateY(calc((1 - var(--e)) * 0.375rem)); }
/* the cards come in from the margin side, the marks drop onto their passages */
.ac-group.ld-k { opacity: var(--e); transform: translateX(calc((1 - var(--e)) * 1.5rem)); }
.ld-mark.ld-k { opacity: var(--e); transform: scale(calc(0.6 + 0.4 * var(--e))); transform-origin: 100% 50%; }
/* the reviewer's highlights: the first fades in, the second is swept as it is selected */
mark.ld-hl1 { background: rgba(255, 204, 0, calc(0.3 * var(--e))); }
/* slice, not clone: one background across the line fragments, so the sweep runs line by line */
mark.ld-hl2 { background: linear-gradient(var(--ld-hl-on), var(--ld-hl-on)) no-repeat 0 0 / calc(var(--e) * 100%) 100%; box-decoration-break: slice; -webkit-box-decoration-break: slice; }
.ld-ul { text-decoration: underline 2px rgba(26, 26, 26, var(--e)); text-underline-offset: 3px; }

/* a wide stage (large screens): the document and the terminals at reading size */
@container (min-width: 58rem) {
  .ld-win-page { padding: 2.25rem 2.5rem 2rem 4.5rem; }
  .ld-win-page .ld-page-h { font-size: 1.5rem; }
  .ld-win-page .ld-para { font-size: 1.0625rem; }
  .ld-win-page .ld-tbl { font-size: 0.9375rem; }
  .ld-term { font-size: 0.875rem; }
}
/* a narrow stage (tablets, small laptops): a slimmer page margin, the agent's terminal across */
@container (max-width: 40rem) {
  .ld-win-page { padding: 1.25rem 1rem 1rem 2.875rem; }
  .ld-term-agent { left: 0.75rem; right: 0.75rem; }
  .ld-c1 .ac-quote, .ld-c1 .ac-thread { display: none; }
  .ld-win-sb .ac-body code { font-size: 0.75em; }  /* paths stay whole in a narrow card */
}
/* short screens: the first card keeps its plate, so the answered one fits */
@media (max-height: 44rem) and (min-width: 48rem) {
  .ld-c1 .ac-quote, .ld-c1 .ac-thread { display: none; }
}
/* without script: no pinning; the steps read in turn beside the finished loop and its terminals */
@media (scripting: none) {
  .ld-beat, .ld-beat + .ld-beat, .ld-beat:last-child { min-height: 0; padding-bottom: 2.5rem; }
  .ld-beat-in { position: static; }
  .ld-stage { position: relative; top: auto; height: auto; }
  .ld-win { position: relative; height: var(--ld-stage-h); }
  .ld-term, .ld-term-agent { position: relative; left: auto; right: auto; bottom: auto; width: auto; margin-top: 1rem; }
  .ld-k-push, .ld-k-agent { --b: 2; }
}

/* ---- everything it takes ---- */
.ld-kinds { list-style: none; margin: 0.875rem 0 0; padding: 0; display: grid; gap: 0.75rem; }
.ld-kinds li { display: flex; align-items: center; gap: 0.625rem; font: 500 1.0625rem/1.3 var(--ac-ui); }
/* one reference band: three columns, each under a 2px ink rule (the rail's), no cards */
.ld-kit { padding-bottom: clamp(3.5rem, 6vw, 5.5rem); }
.ld-kit-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) minmax(0, 5fr); gap: 2.5rem clamp(1.5rem, 3vw, 3rem); margin-top: clamp(1.75rem, 3vw, 2.5rem); align-items: start; }
.ld-kit-col { margin: 0; padding-top: 1rem; border-top: 2px solid var(--ac-ink); }
.ld-kit-h { margin-bottom: 1rem; font: 700 1.25rem/1.2 var(--ac-sign); letter-spacing: 0.005em; }
.ld-kit-col .ld-kinds { margin-top: 0; }
.ld-kit-col .ld-ex-cap { margin-bottom: 0.375rem; }
.ld-kit-col .ld-code + .ld-ex-cap { margin-top: 1.25rem; }

/* Arrival: following a plate flares the destination heading, as a followed sidebar plate
   flares its passage (95% yellow settling to clear over 900ms). Off under reduced motion. */
.ld-step .ld-h2 { width: fit-content; margin-inline: -0.12em; padding-inline: 0.12em; border-radius: 4px; }
@media (prefers-reduced-motion: no-preference) {
  .ld-step:target .ld-h2 { animation: ld-flare 0.9s var(--ac-ease) both; }
}
@keyframes ld-flare {
  from { background-color: rgba(255, 204, 0, 0.95); }
  to { background-color: rgba(255, 204, 0, 0); }
}

/* request access */
.ld-access { background: var(--ac-ground); }
.ld-access-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2.5rem 4rem; align-items: center; }
.ld-access-plate { display: inline-block; width: auto; min-width: min(30rem, 100%); }
.ld-already { margin-top: 1rem; padding-left: 0.25rem; font: 500 1rem/1.4 var(--ac-ui); }
.ld-access .ld-back-shape { background: var(--ac-white); }

.ld-foot { padding-bottom: 1.5rem; }
.ld-foot .ar-foot { margin-top: 0; }

/* ---- the example sidebar: the sidebar's own classes and values (ac/sidebar.css) ---- */
.ld-sb { font: 400 0.9375rem/1.5 var(--ac-ui); color: var(--ac-ink); }
.ld-sb .ac-group { background: var(--ac-white); box-shadow: var(--ac-shadow-card); border-radius: 6px; padding: 0 0 0.25rem; }
.ld-sb .ac-group.ac-focused { box-shadow: var(--ac-shadow-focus); }
.ld-sb .ac-plate { width: calc(100% - 0.875rem); margin: 0.75rem 0 0.625rem; }
.ld-sb .ac-plate-shape {
  display: flex; align-items: center; gap: 0.625rem; min-height: 2.25rem; padding: 0 0.875rem 0 1.625rem;
  background: var(--ac-yellow); clip-path: polygon(1.125rem 0, 100% 0, 100% 100%, 1.125rem 100%, 0 50%);
}
.ld-sb .ac-plate-num { min-width: 1.5rem; font: 700 1.375rem/1 var(--ac-sign); font-variant-numeric: tabular-nums lining-nums; }
.ld-sb .ac-plate-dest { font: 600 0.9375rem/1.1 var(--ac-sign); letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ld-sb .ac-quote { margin: 0 1rem 0.75rem 1.5rem; padding: 0; font: 400 0.875rem/1.5 var(--ac-doc); color: var(--ac-quote-ink); overflow-wrap: anywhere; }
.ld-sb .ac-quote q { quotes: "\201C" "\201D" "\2018" "\2019"; }
.ld-sb .ac-quote q:lang(de) { quotes: "\00AB" "\00BB" "\2039" "\203A"; }
.ld-sb .ac-quote q::before { content: open-quote; display: inline-block; width: 0.5em; margin-left: -0.5em; }
.ld-sb .ac-quote q::after { content: close-quote; }
.ld-sb .ac-thread { padding: 0 1rem 0.75rem; }
.ld-sb .ac-comments { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.ld-sb .ac-comment + .ac-comment { box-shadow: inset 1px 0 0 var(--ac-rule); margin-left: 0.75rem; padding-left: 0.75rem; }
.ld-sb .ac-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; min-height: 1.5rem; margin-bottom: 0.1875rem; }
.ld-sb .ac-author { font-size: 0.875rem; font-weight: 600; }
.ld-sb .ac-meta time { color: var(--ac-mute); font-size: 0.8125rem; font-variant-numeric: tabular-nums lining-nums; }
.ld-sb .ac-via {
  display: inline-flex; align-items: center; min-height: 1.25rem; padding: 0.1875rem 0.5rem; border-radius: 3px;
  background: var(--ac-ink); color: var(--ac-white); font: 600 0.6875rem/1 var(--ac-sign); letter-spacing: 0.07em; text-transform: uppercase;
}
.ld-sb .ac-body { font-size: 0.9375rem; line-height: 1.5; overflow-wrap: anywhere; }
.ld-sb .ac-body code { font-size: 0.875em; }
.ld-sb .ac-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.375rem; margin-top: 0.75rem; }
.ld-sb .ac-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem; min-height: 2.25rem;
  padding: 0.5rem 0.875rem; border-radius: 5px; font: 600 0.8125rem/1 var(--ac-ui);
}
.ld-sb .ac-primary { background: var(--ac-ink); color: var(--ac-white); }
.ld-sb .ac-quiet { padding-inline: 0.625rem; color: var(--ac-mute); font-weight: 500; }
.ld-sb .ac-waiting {
  display: inline-flex; align-items: center; gap: 0.5rem; margin-left: auto;
  font: 600 0.75rem/1 var(--ac-sign); letter-spacing: 0.08em; text-transform: uppercase;
}
.ld-sb .ac-proof {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0.75rem 0 0.25rem; padding: 0.5rem 0.625rem;
  background: var(--ac-ground); border-radius: 4px; font: 500 0.8125rem/1.35 var(--ac-ui);
}
.ld-sb .ac-proof-text { flex: 1; min-width: 8rem; font-weight: 600; }
.ld-sb .ac-link { font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* ---- one breakpoint ---- */
@media (max-width: 47.99rem) {
  .ld-bar { padding: 0 0.25rem 0 0.75rem; }
  .ld-signin, .ld-back-shape { min-height: 2.75rem; }
  .ld-hero-in { display: block; padding: 1.75rem var(--ld-gutter) 2rem; }
  .ld-name { font-size: 31cqi; }
  .ld-tagline { margin-top: 1.25rem; }
  .ld-offer { margin-top: 1rem; }
  .ld-sign { margin-top: 2.25rem; padding-top: 2rem; }
  .ld-plates { align-items: stretch; gap: 0.75rem; }
  .ld-plates > li:nth-child(n) { min-width: 0; width: 100%; }
  .ld-plates > li:last-child { margin-top: 0.25rem; }
  .ld-plate-shape { min-height: 4.5rem; padding: 1rem 3rem 1rem 1.75rem; clip-path: polygon(0 0, calc(100% - 2rem) 0, 100% 50%, calc(100% - 2rem) 100%, 0 100%); }
  .ld-plate-to { font-size: 1.5rem; }
  .ld-plate-sub { font-size: 0.9375rem; }
  .ld-plate-go .ld-plate-shape { min-height: 5.25rem; padding-right: 3.25rem; clip-path: polygon(0 0, calc(100% - 2.25rem) 0, 100% 50%, calc(100% - 2.25rem) 100%, 0 100%); }
  .ld-plate-go .ld-plate-to { font-size: 1.875rem; }


  .ld-access-in { grid-template-columns: minmax(0, 1fr); }
  .ld-sb .ac-btn { min-height: 2.75rem; }
  .ld-access-plate { display: block; }

  /* the demo: the stage pinned on top, each step's text pinned under it */
  .ld-demo { --ld-stage-h: min(30rem, 56svh); --ld-stage-top: 0.5rem; }
  .ld-demo-grid { display: flex; flex-direction: column; align-items: stretch; }
  .ld-stage { order: -1; z-index: 3; margin-top: 1.5rem; }
  .ld-stage::before { content: ""; position: absolute; z-index: -1; inset: -0.5rem calc(-1 * var(--ld-gutter)) -1rem; background: var(--ac-white); }
  .ld-beats { padding-bottom: 0 !important; }
  .ld-beat, .ld-beat + .ld-beat { min-height: 95svh; }
  .ld-beat:last-child { min-height: 130svh; }
  .ld-beat { scroll-margin-top: calc(var(--ld-stage-top) + var(--ld-stage-h) + 1rem); }
  .ld-beat-in { top: calc(var(--ld-stage-top) + var(--ld-stage-h) + 1rem); padding-block: 0 2.5rem; }
  .ld-beat .ld-lead-text { margin-top: 0.75rem; }
  .ld-beat .ld-private { margin-top: 1rem; }
  .ld-win-rail { gap: 0.625rem; padding: 0 0.625rem 0 0.75rem; }
  .ld-win-doc { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .ld-win-body { display: block; }
  .ld-win-page { padding: 1rem 1rem 1rem 2.875rem; }
  .ld-tbl { margin-top: 0.5rem; font-size: 0.8125rem; }
  .ld-tbl th, .ld-tbl td { padding-block: 0.1875rem; }
  /* when the reply arrives the question folds away, so the new table shows above the sheet */
  .ld-win-sb .ld-k-body { --b: 0.92; --d2: 0.03; max-height: calc((1 - var(--u)) * 8rem); opacity: calc(var(--e) * (1 - var(--u))); overflow: hidden; }
  .ld-win-sb .ld-reply { box-shadow: none; margin-left: 0; padding-left: 0; }
  /* the sidebar is a bottom sheet on phones, as in the reader: the comment being made */
  .ld-win-sb { position: absolute; left: 0; right: 0; bottom: 0; padding: 0.5rem; background: none; border-left: 0; }
  .ld-win-sb .ac-group.ld-c2 { box-shadow: var(--ac-shadow-focus), 0 -8px 20px -14px rgba(26, 26, 26, 0.5); }
  /* one passage on a phone: the one being commented, above its card */
  .ld-win-sb .ld-c1, .ld-win-page .ld-page-h, .ld-win-page .ld-p1, .ld-win-page .ld-p3, .ld-win-sb .ac-quote { display: none; }
  .ld-toast { bottom: auto; top: 3.5rem; }
  .ld-term, .ld-term-agent { left: 0.5rem; right: 0.5rem; bottom: 0.5rem; width: auto; }
  .ld-win-wait { left: 1rem; right: 1rem; top: 1.25rem; }
  .ld-kit-grid { grid-template-columns: minmax(0, 1fr); }
}
