/* Signal page. Hero: rings pulse from a glass sphere; a dot orbits; source chips light their ring.
   Below the hero: an instrument panel (scope, channel log, level meters, spec sheet). */
:root {
  --bg: #000E11; --panel: #122626; --ink: #FFFFFF; --muted: #A7BCBE; --line: #1F3A3C;
  --teal: #5EEAD4; --gold: #E0B45A;
  --lk-bg: var(--bg); --lk-panel: var(--panel); --lk-ink: var(--ink); --lk-muted: var(--muted); --lk-line: var(--line);
  --lk-main: var(--teal); --lk-on-main: var(--bg); --lk-link: var(--teal); --lk-focus: var(--teal); --lk-accent: var(--teal);
  --lk-font-display: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
  --lk-font-body: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --lk-radius: 4px; --lk-max: 1120px; --lk-gutter: 16px;
  --sg-gut: 16px;
  --sg-h: min(calc(100svh - var(--lk-bar)), 806px);
}
@media (min-width: 1200px) { :root { --sg-gut: 24px; } }
html { color-scheme: dark; }
body { font-size: 17px; line-height: 1.6; }
code { font: 500 0.88em/1.4 var(--lk-font-mono); }
::selection { background: var(--teal); color: var(--bg); }

/* ---------- Hero ---------- */
.sg-hero { position: relative; overflow: hidden; height: var(--sg-h); min-height: 640px; background: var(--bg); }
.sg-art { position: absolute; inset: 0; overflow: hidden; container-type: size; }
.sg-scene { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: max(100cqw, calc(100cqh * 1.7866)); height: max(100cqh, calc(100cqw / 1.7866)); container-type: inline-size; }
.sg-rings { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sg-ring { fill: none; stroke-width: 2px; vector-effect: non-scaling-stroke; opacity: 0.7; transform-box: fill-box; transform-origin: center; transition: opacity 0.24s ease-out, stroke-width 0.24s ease-out; }
/* rings run behind the text column, held back to 0.45 across the left 45% */
.sg-scrim { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 14, 17, 0.55) 0, rgba(0, 14, 17, 0.55) 42%, rgba(0, 14, 17, 0) 54%); pointer-events: none; }
.sg-sphere { position: absolute; left: 50%; top: 50%; width: 15.49%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  /* glass sphere drawn in CSS: dark core, teal rim upper-left, warm gold glow lower-right, specular dot; shadows in cqw so they scale with the scene */
  background: radial-gradient(circle at 30% 22%, rgba(214, 255, 248, 0.55) 0, rgba(94, 234, 212, 0) 9%),
    radial-gradient(circle at 34% 28%, rgba(224, 180, 90, 0) 50%, rgba(224, 180, 90, 0.5) 63%, rgba(253, 233, 160, 0.95) 76%),
    radial-gradient(circle at 66% 72%, rgba(94, 234, 212, 0) 52%, rgba(17, 108, 140, 0.55) 64%, rgba(94, 234, 212, 0.9) 78%),
    radial-gradient(circle at 44% 44%, #020F14 0, #052633 58%, #0A3A44 100%);
  box-shadow: inset 0 0 0.5cqw rgba(94, 234, 212, 0.35), 0 0 3.6cqw rgba(224, 180, 90, 0.2), -0.8cqw -0.8cqw 2.6cqw rgba(94, 234, 212, 0.14); z-index: 4; }
.sg-dot { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; z-index: 4;
  background: radial-gradient(circle at 35% 30%, #FDE9A0 0, #5EEAD4 38%, #E0B45A 100%); box-shadow: 0 0 10px rgba(94, 234, 212, 0.45); }
.sg-pre .sg-sphere, .sg-pre .sg-ring, .sg-pre .sg-dot { opacity: 0; }

/* chip lighting: CSS only (works with JavaScript off); !important so it also beats the running pulse */
.sg-hero:has(.sg-chip:is(:hover, :focus-visible)) .sg-ring, .sg-hero[data-lit] .sg-ring { opacity: 0.35 !important; }
.sg-hero:has(.sg-chip[data-ring="3"]:is(:hover, :focus-visible)) .sg-ring-3, .sg-hero[data-lit="3"] .sg-ring-3,
.sg-hero:has(.sg-chip[data-ring="4"]:is(:hover, :focus-visible)) .sg-ring-4, .sg-hero[data-lit="4"] .sg-ring-4,
.sg-hero:has(.sg-chip[data-ring="5"]:is(:hover, :focus-visible)) .sg-ring-5, .sg-hero[data-lit="5"] .sg-ring-5,
.sg-hero:has(.sg-chip[data-ring="6"]:is(:hover, :focus-visible)) .sg-ring-6, .sg-hero[data-lit="6"] .sg-ring-6 { opacity: 1 !important; stroke-width: 3px; }

.sg-copy { position: absolute; z-index: 5; left: 9%; top: 30%; width: 600px; max-width: 52%; }
.sg-h1 { font-family: var(--lk-font-display); color: var(--ink); }
.sg-name { display: block; font: 700 20px/1.2 var(--lk-font-display); letter-spacing: 0.02em; margin-bottom: 34px; }
.sg-headline { display: block; font: 700 clamp(40px, 3.6vw, 56px)/1.05 var(--lk-font-display); letter-spacing: -0.01em; }
.sg-one { margin-top: 18px; max-width: 23.5em; font: 500 20px/1.45 var(--lk-font-display); color: var(--ink); }
.sg-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 28px; }
.sg-btn { padding: 14px 26px; border: 0; border-radius: 3px; background: var(--ink); color: var(--bg); font: 500 17px/1.2 var(--lk-font-display); }
.sg-btn:hover { background: var(--teal); }
.sg-btn:focus-visible, .sg-chip:focus-visible, .sg-pause:focus-visible { border-radius: 3px; outline: 2px solid var(--teal); outline-offset: 3px; }
.sg-link { font: 500 17px/1.2 var(--lk-font-display); color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.sg-link:hover { color: var(--teal); }
.sg-status { flex-basis: 100%; min-height: 0; font-size: 14px; }
.sg-status:empty { display: none; }

.sg-chips { position: absolute; z-index: 5; right: 9%; top: 34%; display: flex; flex-direction: column; align-items: flex-end; }
.sg-cap { font: 400 13px/1.3 var(--lk-font-body); color: var(--muted); margin-bottom: 12px; text-align: right; }
.sg-chip-list { list-style: none; display: flex; flex-direction: column; align-items: flex-end; gap: 15px; }
.sg-chip { padding: 8px 14px 8px 30px; border: 1.5px solid rgba(255, 255, 255, 0.6); border-radius: 2px; position: relative; font-family: var(--lk-font-mono) !important; letter-spacing: 0.04em; background: rgba(0, 14, 17, 0.6); color: var(--ink); font: 500 15px/1.3 var(--lk-font-display); transition: border-color 0.24s ease-out; }
.sg-chip:hover, .sg-chip:focus-visible, .sg-chip[aria-pressed="true"] { border-color: var(--teal); }
.sg-pause { position: absolute; z-index: 5; left: 9%; bottom: 24px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 3px; background: rgba(0, 14, 17, 0.72); color: var(--ink); font: 400 14px/1.3 var(--lk-font-body); }
.sg-pause:hover { border-color: var(--teal); }

.sg-chip::before { content: ""; position: absolute; left: 10px; top: 50%; width: 12px; height: 2px; background: var(--teal); }
.sg-chip[aria-pressed="true"] { background: rgba(94, 234, 212, 0.14); }

/* =====================================================================
   Below the hero: an instrument panel. Graticules, channel colours, mono readouts,
   live traces on canvas (signal.js), static SVG traces as the no-JS state.
   ===================================================================== */
:root {
  --screen: #020A0B; --chassis: #061416; --grat: rgba(94, 234, 212, 0.13); --grat2: rgba(94, 234, 212, 0.3);
  --c1: #5EEAD4; --c2: #E0B45A; --c3: #8EC5FF; --c4: #F59AD6; --c5: #B6F36B;
  --lk-dock-bg: #5EEAD4; --lk-dock-ink: #000E11;
}
main { counter-reset: sg; }
.sg-hero { z-index: 1; }

/* Layout */
.sg-wrap { width: 100%; max-width: calc(1240px + 2 * var(--sg-gut)); margin-inline: auto; padding-inline: var(--sg-gut); }
.sg-sec { padding-block: clamp(56px, 8vw, 120px); scroll-margin-top: 16px; }
.sg-sec p { max-width: 68ch; }
.sg-sec p + p { margin-top: 1em; }

/* Section label: [01] NAME, then a tick ruler */
.sg-eye, .sg-sec p.sg-eye { counter-increment: sg; display: flex; align-items: center; gap: 14px; max-width: none; margin: 0 0 22px; font: 600 13px/1 var(--lk-font-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--teal); }
.sg-eye::before { content: "[" counter(sg, decimal-leading-zero) "]"; color: var(--gold); letter-spacing: 0.04em; }
.sg-eye::after { content: ""; flex: 1; max-width: 360px; height: 9px; background: repeating-linear-gradient(90deg, var(--grat2) 0 1px, transparent 1px 12px) bottom / 100% 5px no-repeat, linear-gradient(var(--grat2), var(--grat2)) bottom / 100% 1px no-repeat; }

/* Type scale */
.sg-h2 { font: 800 clamp(40px, 6.2vw, 92px)/0.94 var(--lk-font-display); letter-spacing: -0.035em; margin-bottom: 28px; text-wrap: balance; max-width: 15ch; }
.sg-panel .sg-h2, #what .sg-h2, #why .sg-h2 { font-size: clamp(32px, 3.6vw, 54px); max-width: 14ch; }
.sg-h3 { font: 700 13px/1.2 var(--lk-font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-bottom: 18px; }
.sg-lede { font-size: 18px; line-height: 1.6; color: var(--muted); max-width: 60ch; margin-bottom: 40px; }
@media (min-width: 1001px) { .sg-lede { margin-left: 34%; } }
.sg-list { list-style: none; }
.sg-list li { position: relative; padding-left: 26px; max-width: 64ch; }
.sg-list li + li { margin-top: 12px; }
.sg-list li::before { content: ""; position: absolute; left: 0; top: 0.78em; width: 14px; height: 2px; background: var(--teal); }

/* Buttons */
.sg-btn { transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s; }
.sg-btn:hover { transform: translateY(-1px); }
.sg-btn:active { transform: translateY(1px); }
.sg-btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.sg-btn--line { background: transparent; color: var(--ink); border: 1.5px solid var(--muted); padding: 11px 18px; font: 500 14px/1.2 var(--lk-font-mono); letter-spacing: 0.02em; }
.sg-btn--line:hover { background: transparent; border-color: var(--teal); color: var(--teal); }

/* reveals: transform only; content is visible unless JS arms them */
.sg-anim .sg-rv { transform: translateY(24px); transition: transform 0.7s cubic-bezier(.2,.8,.2,1); transition-delay: var(--d, 0ms); }
.sg-anim .sg-rv.in { transform: none; }

/* ---------- Try: the scope ---------- */
.sg-try { border-top: 1px solid var(--line); background: #02161A; }
.sg-tool { position: relative; padding: 0 22px 22px; background: var(--chassis); border: 1px solid #23474A; border-radius: 6px; box-shadow: 0 30px 80px -40px rgba(94, 234, 212, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05); }
.sg-bezel { display: flex; align-items: center; gap: 14px; margin: 0 -22px 22px; padding: 12px 22px; border-bottom: 1px solid #23474A; font: 600 12px/1 var(--lk-font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.sg-bz-name { color: var(--ink); }
.sg-bz-name::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 10px; border-radius: 50%; background: #3B5557; vertical-align: 0; transition: background 0.3s, box-shadow 0.3s; }
.sg-tool.is-live .sg-bz-name::before { background: var(--c5); box-shadow: 0 0 10px var(--c5); }
.sg-bz-sp { flex: 1; height: 1px; background: repeating-linear-gradient(90deg, #23474A 0 6px, transparent 6px 10px); }
.sg-tool-in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 22px; align-items: stretch; }
.sg-tool-in > * { min-width: 0; }
.sg-form, .sg-result { padding: 22px; background: #081D20; border: 1px solid #1B3B3E; border-radius: 4px; }
.sg-lab { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; font: 600 15px/1.2 var(--lk-font-display); color: var(--ink); }
.sg-lab--type { font: 600 12px/1 var(--lk-font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.sg-n { display: inline-block; padding: 3px 6px 2px; border-radius: 2px; background: var(--cc, var(--teal)); color: var(--bg); font: 700 11px/1 var(--lk-font-mono); letter-spacing: 0.06em; }
.sg-ch1 { --cc: var(--c1); } .sg-ch2 { --cc: var(--c2); } .sg-ch3 { --cc: var(--c3); } .sg-ch4 { --cc: var(--c4); } .sg-ch5 { --cc: var(--c5); }
.sg-in { width: 100%; min-width: 0; min-height: 46px; padding: 10px 14px; background: var(--screen); color: var(--ink); border: 1px solid #23474A; border-radius: 3px; font: 400 16px/1.3 var(--lk-font-body); transition: border-color 0.2s, box-shadow 0.2s; }
.sg-fields .sg-in { border-left: 4px solid color-mix(in srgb, var(--cc) 45%, #23474A); font-family: var(--lk-font-mono); font-size: 15px; }
.sg-in:hover { border-color: var(--muted); }
.sg-in:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-color: var(--teal); }
.sg-fields .sg-in:not(:placeholder-shown) { border-color: #2C5558; border-left-color: var(--cc); box-shadow: -6px 0 18px -10px var(--cc); }
.sg-fields { list-style: none; margin: 20px 0; display: grid; gap: 14px; }
.sg-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.sg-result { display: flex; flex-direction: column; }

.sg-screen { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 3px; border: 1px solid #1B3B3E;
  background-color: var(--screen);
  background-image:
    linear-gradient(var(--grat2), var(--grat2)), linear-gradient(var(--grat2), var(--grat2)),
    linear-gradient(var(--grat) 1px, transparent 1px), linear-gradient(90deg, var(--grat) 1px, transparent 1px);
  background-size: 100% 1px, 1px 100%, 100% 10%, 10% 100%;
  background-position: 0 50%, 50% 0, 0 0, 0 0;
  background-repeat: no-repeat, no-repeat, repeat, repeat;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.75); }
.sg-flat, .sg-scope { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.sg-flat path { fill: none; stroke-width: 1.5px; vector-effect: non-scaling-stroke; stroke-linejoin: round; opacity: 0.5; }
.sg-lane1 { stroke: var(--c1); } .sg-lane2 { stroke: var(--c2); } .sg-lane3 { stroke: var(--c3); } .sg-lane4 { stroke: var(--c4); } .sg-lane5 { stroke: var(--c5); }
.sg-js .sg-flat { display: none; }
.sg-scr-tl, .sg-scr-tr { position: absolute; top: 8px; padding: 3px 6px; background: rgba(2, 10, 11, 0.85); font: 600 11px/1 var(--lk-font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.sg-scr-tl { left: 8px; color: var(--c1); }
.sg-scr-tr { right: 8px; }
.sg-readrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0; }
.sg-count { color: var(--muted); font: 500 13px/1.3 var(--lk-font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.sg-count strong { color: var(--gold); font: 700 26px/1 var(--lk-font-mono); margin-right: 4px; vertical-align: -3px; }
.sg-run { padding: 7px 12px; border: 1.5px solid var(--muted); border-radius: 2px; background: transparent; color: var(--ink); font: 600 12px/1 var(--lk-font-mono); letter-spacing: 0.12em; text-transform: uppercase; }
.sg-run:hover { border-color: var(--teal); color: var(--teal); }
.sg-run[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--bg); }
.sg-run:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.sg-plan { flex: 1; margin: 0 0 14px; padding: 14px 16px; background: var(--screen); border: 1px solid #1B3B3E; border-left: 3px solid var(--gold); border-radius: 3px; font: 400 13.5px/1.65 var(--lk-font-mono); color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 260px; overflow: auto; }
.sg-plan:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
#sg-copy { background: var(--teal); color: var(--bg); font-weight: 600; }
#sg-copy:hover { background: var(--ink); }
#sg-copy.is-done { background: var(--gold); }
#sg-copy:disabled { background: #23474A; color: var(--ink); transform: none; }

.sg-tiles { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; margin-top: 22px; background: #1B3B3E; border: 1px solid #1B3B3E; border-radius: 3px; overflow: hidden; }
.sg-tile { position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 120px; padding: 16px 14px 14px; background: #081D20; transition: background 0.3s; }
.sg-tile::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--cc); opacity: 0.3; transition: opacity 0.3s; }
.sg-tile.on { background: color-mix(in srgb, var(--cc) 8%, #081D20); }
.sg-tile.on::before { opacity: 1; }
.sg-t-step { font: 600 11px/1.2 var(--lk-font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.sg-t-ev { font: 500 14px/1.35 var(--lk-font-mono); color: var(--muted); overflow-wrap: anywhere; }
.sg-tile.on .sg-t-ev { color: var(--cc); }
.sg-t-cnt { margin-top: auto; font: 400 12px/1 var(--lk-font-mono); color: var(--muted); }

/* ---------- What / why ---------- */
.sg-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 28px; align-items: stretch; }
.sg-span7 { grid-column: span 7; } .sg-span5 { grid-column: span 5; } .sg-span6 { grid-column: span 6; }
.sg-panel { position: relative; padding: 36px; background: var(--panel); border: 1px solid #1F4144; border-radius: 4px; }
#what { padding: 36px 0; background: none; border: 0; }
#what > p:nth-of-type(2) { font: 500 clamp(21px, 1.9vw, 27px)/1.4 var(--lk-font-display); color: var(--ink); max-width: 30ch; }
#what > p:nth-of-type(3) { color: var(--muted); max-width: 56ch; margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
#why { border-color: rgba(224, 180, 90, 0.45); background: #13241F; }
#why .sg-eye { color: var(--gold); }
#why > p:nth-of-type(2) { font: 600 clamp(19px, 1.6vw, 23px)/1.4 var(--lk-font-display); color: var(--ink); }
.sg-why-tr { display: block; width: 100%; height: 150px; margin-top: 28px; background-color: var(--screen); background-image: linear-gradient(var(--grat) 1px, transparent 1px), linear-gradient(90deg, var(--grat) 1px, transparent 1px); background-size: 100% 25%, 10% 100%; border: 1px solid #1F4144; border-radius: 3px; }
.sg-why-tr path { fill: none; stroke-width: 2px; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.sg-wn { stroke: var(--gold); opacity: 0.85; }
.sg-wc { stroke: var(--teal); filter: drop-shadow(0 0 4px rgba(94, 234, 212, 0.7)); }
.sg-wm { stroke: var(--ink); stroke-width: 1px; vector-effect: non-scaling-stroke; stroke-dasharray: 4 4; opacity: 0.6; }
.sg-why-key, #why p.sg-why-key { display: flex; justify-content: space-between; margin-top: 10px; font: 600 12px/1 var(--lk-font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.sg-why-key span + span { color: var(--teal); }

/* ---------- Items: channel log ---------- */
#items { border-top: 1px solid var(--line); }
.lk-filters { gap: 12px 24px; padding: 14px; margin-bottom: 8px; background: var(--chassis); border: 1px solid #1B3B3E; border-radius: 4px; }
.lk-filter-group { gap: 0; }
.lk-filter-label { color: var(--gold); margin-right: 12px; }
.lk-filter { min-height: 38px; margin-left: -1px; border-radius: 0; border-color: #2C5558; font: 500 13px/1 var(--lk-font-mono); letter-spacing: 0.02em; transition: background 0.2s, color 0.2s; }
.lk-filter-label + .lk-filter { border-radius: 3px 0 0 3px; }
.lk-filter:last-child { border-radius: 0 3px 3px 0; }
.lk-filter[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: var(--bg); font-weight: 700; position: relative; }
.lk-filter:hover { border-color: var(--teal); position: relative; }
.lk-filter:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; position: relative; z-index: 1; }
.lk-filter-count { font-family: var(--lk-font-mono); color: var(--muted); }
.lk-items { counter-reset: cat; border-top: 0; }
.lk-cat { counter-increment: cat; display: flex; align-items: center; gap: 16px; padding: 48px 0 14px; font: 800 clamp(22px, 2.4vw, 34px)/1.05 var(--lk-font-display); letter-spacing: -0.02em; text-transform: none; color: var(--ink); }
.lk-cat::before { content: "CH" counter(cat); flex: none; padding: 5px 7px 4px; border-radius: 2px; background: var(--c1); color: var(--bg); font: 700 12px/1 var(--lk-font-mono); letter-spacing: 0.08em; }
.lk-cat:has(+ [data-category="acquisition-tracking"])::before { background: var(--c2); }
.lk-cat:has(+ [data-category="replay-and-experiments"])::before { background: var(--c3); }
.lk-cat:has(+ [data-category="kpis-and-reporting"])::before { background: var(--c4); }
.lk-cat::after { content: ""; flex: 1; height: 9px; min-width: 40px; background: repeating-linear-gradient(90deg, var(--grat2) 0 1px, transparent 1px 10px) bottom / 100% 5px no-repeat, linear-gradient(var(--grat2), var(--grat2)) bottom / 100% 1px no-repeat; }
.lk-item { position: relative; grid-template-columns: 5.5rem minmax(0, 1fr) auto auto; padding: 13px 10px 13px 0; border-bottom: 1px solid var(--line); transition: background 0.2s; }
.lk-item:hover { background: linear-gradient(90deg, rgba(94, 234, 212, 0.08), transparent 70%); }
.lk-item .lk-id { padding-left: 14px; font-family: var(--lk-font-mono); color: var(--muted); box-shadow: inset 2px 0 0 #2C5558; transition: box-shadow 0.2s; }
.lk-item:hover .lk-id { box-shadow: inset 4px 0 0 var(--teal); color: var(--ink); }
.lk-item .lk-title { font: 500 18px/1.35 var(--lk-font-display); color: var(--ink); }
.lk-item .lk-who, .lk-item .lk-when { padding: 4px 8px; border-radius: 2px; font: 600 12px/1.2 var(--lk-font-mono); letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.lk-item[data-who="agent"] .lk-who { color: var(--teal); background: rgba(94, 234, 212, 0.1); box-shadow: inset 2px 0 0 var(--teal); }
.lk-item[data-who="founder"] .lk-who { color: var(--bg); background: var(--gold); }
.lk-item .lk-when { color: var(--muted); border: 1px solid #2C5558; }

/* ---------- When: level meters ---------- */
#when { border-top: 1px solid var(--line); }
.sg-bars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; align-items: end; margin: 0; padding: 28px 24px 0; background-color: var(--screen); background-image: linear-gradient(var(--grat) 1px, transparent 1px); background-size: 100% 40px; border: 1px solid #1B3B3E; border-radius: 4px; }
.sg-bars .lk-phase { display: flex; flex-direction: column; padding: 0; border: 0; border-radius: 0; background: none; }
.sg-bars .lk-phase + .lk-phase { border-left: 1px dashed #1F4144; }
.sg-stand { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 14px; padding-inline: 14px; border-bottom: 2px solid var(--muted); }
.sg-bars strong { font: 700 clamp(36px, 4.4vw, 64px)/1 var(--lk-font-mono); letter-spacing: -0.04em; color: var(--ink); font-variant-numeric: tabular-nums; transition: color 0.2s; }
.sg-bar { display: block; width: min(100%, 140px); height: var(--h, 120px); min-height: 6px; background: repeating-linear-gradient(0deg, var(--teal) 0 7px, transparent 7px 10px); filter: drop-shadow(0 0 8px rgba(94, 234, 212, 0.4)); transform-origin: bottom; transition: transform 0.9s cubic-bezier(.2,.8,.2,1); transition-delay: var(--d, 0ms); }
.sg-week .sg-bar { background: repeating-linear-gradient(0deg, var(--gold) 0 7px, transparent 7px 10px); filter: drop-shadow(0 0 8px rgba(224, 180, 90, 0.5)); }
.sg-bars .lk-phase:hover strong { color: var(--teal); }
.sg-bars .sg-step-l { margin: 0; padding: 12px 6px 16px; min-height: 3.2em; font: 600 12px/1.3 var(--lk-font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); text-align: center; }

/* ---------- Agent / you: two channels ---------- */
#agent { grid-column: span 7; border-top: 3px solid var(--teal); }
#you { grid-column: span 5; border-top: 3px solid var(--gold); }
#you .sg-eye { color: var(--gold); }
.sg-bullet::before { content: none; }
#agent .sg-list, #you .sg-list { counter-reset: row; }
#agent .sg-list li, #you .sg-list li { counter-increment: row; max-width: none; margin: 0; padding: 13px 8px 13px 50px; border-top: 1px solid var(--line); transition: background 0.2s; }
#agent .sg-list li::before, #you .sg-list li::before { content: counter(row, decimal-leading-zero); left: 6px; top: 13px; width: auto; height: auto; background: none; font: 700 13px/1.6 var(--lk-font-mono); color: var(--teal); }
#you .sg-list li::before { color: var(--gold); }
#agent .sg-list li:hover, #you .sg-list li:hover { background: rgba(255, 255, 255, 0.035); }

/* ---------- Money: spec sheet ---------- */
#money { border-top: 1px solid var(--line); }
.sg-money .lk-table-wrap { background: var(--chassis); border: 1px solid #1B3B3E; border-radius: 4px; }
.sg-money .lk-money th { background: #081D20; border-bottom: 2px solid var(--gold); }
@media (min-width: 761px) { .sg-money .lk-money th { font: 600 12px/1.2 var(--lk-font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); } }
.sg-money .lk-money tbody tr { transition: background 0.2s; }
.sg-money .lk-money tbody tr:hover { background: rgba(94, 234, 212, 0.06); }
.sg-money .lk-money td:first-child { font: 800 19px/1.2 var(--lk-font-display); color: var(--ink); }
.sg-money .lk-money td:nth-child(3) { box-shadow: inset 2px 0 0 rgba(224, 180, 90, 0.6); padding-left: 18px; }
.sg-money .lk-money td:nth-child(5) { font-family: var(--lk-font-mono); font-size: 13px; color: var(--muted); white-space: nowrap; }

/* ---------- End: the plate as a scope screen ---------- */
#end { padding-bottom: 0; }
.sg-end { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 0; align-items: center; }
.sg-plate { position: relative; display: block; grid-column: 1; grid-row: 1; }
.sg-plate img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; transition: transform 1.2s cubic-bezier(.2,.8,.2,1); }
.sg-plate::after { content: ""; position: absolute; inset: 0; border-radius: 4px; pointer-events: none; border: 1px solid #23474A; background-image: linear-gradient(var(--grat) 1px, transparent 1px), linear-gradient(90deg, var(--grat) 1px, transparent 1px); background-size: 100% 12.5%, 10% 100%; }
.sg-anim .sg-plate:not(.in) img { transform: scale(1.05); }
.sg-end-text { position: relative; z-index: 1; grid-column: 2; grid-row: 1; margin-left: -64px; padding: 36px; background: var(--panel); border: 1px solid #1F4144; border-top: 3px solid var(--c5); border-radius: 4px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8); }
.sg-end-text .sg-h2 { font-size: clamp(32px, 3.4vw, 50px); }
#end .sg-list li::before { width: 8px; height: 8px; top: 0.58em; border-radius: 50%; background: var(--c5); box-shadow: 0 0 8px var(--c5); }

/* ---------- Run ---------- */
#run { border-top: 1px solid var(--line); margin-top: clamp(56px, 8vw, 120px); }
.sg-prompt { margin-bottom: 40px; max-width: 900px; }
.sg-prompt .lk-prompt-text { padding: 20px 22px 20px 48px; position: relative; background: var(--screen); border: 1px solid #23474A; border-left: 3px solid var(--teal); border-radius: 3px; font: 500 16px/1.55 var(--lk-font-mono); color: var(--ink); }
.sg-prompt .lk-prompt-text::before { content: ">"; position: absolute; left: 20px; top: 20px; color: var(--teal); font-weight: 700; }
.sg-prompt .sg-btn { background: var(--teal); color: var(--bg); font-weight: 600; }
.sg-prompt .sg-btn:hover { background: var(--ink); }
.sg-run-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 28px; }
.sg-run-grid > div { padding: 28px; background: var(--chassis); border: 1px solid #1B3B3E; border-radius: 4px; }
.sg-run-grid .sg-list li::before { background: var(--gold); }
.sg-files code { display: block; color: var(--teal); font: 500 0.88em/1.4 var(--lk-font-mono); }
.sg-note { margin-top: 16px; font-size: 15px; color: var(--muted); }
.lk-run-note { margin-top: 20px; font: 500 13px/1.4 var(--lk-font-mono); color: var(--muted); }

/* ---------- Terms ---------- */
#terms { border-top: 1px solid var(--line); }
.sg-az { display: flex; flex-wrap: wrap; gap: 0; width: fit-content; max-width: 100%; margin-bottom: 28px; border: 1px solid #23474A; border-radius: 3px; background: var(--chassis); }
.sg-az a { display: grid; place-items: center; width: 38px; height: 38px; border-right: 1px solid #1B3B3E; color: var(--ink); font: 600 14px/1 var(--lk-font-mono); text-decoration: none; transition: background 0.2s, color 0.2s; }
.sg-az a:last-child { border-right: 0; }
.sg-az a:hover { background: var(--teal); color: var(--bg); }
.sg-az a:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; }
.lk-terms { gap: 0 56px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.lk-terms > div { position: relative; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 4px 20px; padding: 16px 0; border-top: 1px solid var(--line); transition: background 0.2s; }
.lk-terms > div:hover { background: linear-gradient(90deg, rgba(94, 234, 212, 0.06), transparent); }
.lk-terms dt { font: 700 17px/1.3 var(--lk-font-display); color: var(--ink); scroll-margin-top: 80px; }
.lk-terms dt::first-letter { color: var(--teal); }
.lk-terms dd { margin: 0; color: var(--muted); font-size: 15.5px; }

/* ---------- Next: input and output jacks ---------- */
#next { border-top: 1px solid var(--line); }
.lk-next { gap: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid #1B3B3E; border-radius: 4px; background: var(--chassis); }
.lk-next > div { position: relative; padding: 36px 36px 36px 96px; min-height: 180px; }
.lk-next > div + div { border-left: 1px solid #1B3B3E; }
.lk-next > div::before { content: ""; position: absolute; left: 32px; top: 36px; width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--muted); box-shadow: inset 0 0 0 6px var(--chassis), inset 0 0 0 14px #23474A; }
.lk-next > div:last-child::before { border-color: var(--teal); box-shadow: inset 0 0 0 6px var(--chassis), inset 0 0 0 14px var(--teal), 0 0 16px rgba(94, 234, 212, 0.35); }
.lk-next h3 { color: var(--gold); }
.lk-next p { font: 600 clamp(20px, 2vw, 26px)/1.3 var(--lk-font-display); max-width: 18em; }

/* ---------- Phones and narrow screens ---------- */
@media (max-width: 1000px) {
  :root { --sg-gut: 16px; }
  body { font-size: 16px; line-height: 1.55; }
  .sg-hero { display: flex; flex-direction: column; height: auto; min-height: 0; }
  .sg-copy { position: static; order: 1; width: auto; max-width: none; padding: 20px var(--sg-gut) 0; }
  .sg-name { margin-bottom: 14px; }
  .sg-headline { font-size: 34px; line-height: 1.08; }
  .sg-one { font-size: 17px; margin-top: 14px; max-width: none; }
  .sg-actions { flex-direction: column; align-items: stretch; gap: 16px; margin-top: 22px; }
  .sg-btn { width: 100%; text-align: center; }
  .sg-row .sg-btn--line { width: auto; flex: 1; }
  .sg-link { align-self: flex-start; }
  .sg-art { order: 2; position: relative; inset: auto; width: 100%; height: 100vw; margin-top: 24px; }
  .sg-scene { width: 155.08vw; height: 86.8vw; }
  .sg-scrim { display: none; }
  .sg-dot { width: 12px; height: 12px; margin: -6px 0 0 -6px; }
  .sg-chips { position: static; order: 3; align-items: stretch; padding: 8px var(--sg-gut) 0; }
  .sg-cap { text-align: left; }
  .sg-chip-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: stretch; }
  .sg-chip { width: 100%; text-align: left; }
  .sg-pause { position: static; order: 4; align-self: flex-start; margin: 14px var(--sg-gut) 32px; }
  .sg-sec { padding-block: 48px; }
  .sg-h2 { font-size: clamp(36px, 10vw, 56px); }
  .sg-tool { padding: 0 12px 12px; }
  .sg-bezel { margin: 0 -12px 12px; padding: 10px 12px; font-size: 11px; }
  .sg-bz-spec { display: none; }
  .sg-tool-in { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .sg-form, .sg-result { padding: 16px; }
  .sg-result { order: -1; }
  .sg-screen { aspect-ratio: 4 / 3; }
  .sg-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 12px; }
  .sg-tile { min-height: 100px; }
  .sg-tile:last-child { grid-column: span 2; }
  .sg-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .sg-span7, .sg-span5, .sg-span6, #agent, #you { grid-column: auto; }
  #what { padding: 48px 0 24px; }
  .sg-panel { padding: 24px 20px; }
  #you { margin-top: 16px; }
  .sg-grid > #agent { margin-top: 48px; }
  .sg-grid > #you { margin-bottom: 16px; }
  .lk-cat { padding-top: 32px; gap: 12px; }
  .lk-item { grid-template-columns: 4.5rem auto minmax(0, 1fr); row-gap: 8px; column-gap: 8px; }
  .lk-item .lk-id { grid-row: span 2; }
  .lk-item .lk-title { grid-column: 2 / -1; }
  .lk-item .lk-who { grid-column: 2; justify-self: start; display: inline-block; }
  .lk-item .lk-when { grid-column: 3; justify-self: start; display: inline-block; }
  .sg-bars { padding: 20px 8px 0; }
  .sg-stand { padding-inline: 6px; }
  .sg-bar { height: min(var(--h, 120px), 140px); }
  .sg-bars .sg-step-l { font-size: 10.5px; letter-spacing: 0.06em; }
  .sg-end { grid-template-columns: minmax(0, 1fr); }
  .sg-end-text { grid-column: 1; grid-row: 2; margin: -32px 12px 0; padding: 24px 20px; }
  .sg-run-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .sg-run-grid > div { padding: 20px; }
  .sg-prompt .lk-prompt-text { font-size: 14px; padding: 16px 16px 16px 38px; }
  .sg-prompt .lk-prompt-text::before { left: 16px; top: 16px; }
  .lk-terms > div { grid-template-columns: minmax(0, 1fr); }
  .lk-next { grid-template-columns: minmax(0, 1fr); }
  .lk-next > div { padding: 28px 20px 28px 84px; min-height: 0; }
  .lk-next > div::before { left: 22px; top: 28px; }
  .lk-next > div + div { border-left: 0; border-top: 1px solid #1B3B3E; }
}
@media (max-width: 640px) { .sg-az { position: static; } .sg-az a { width: 32px; height: 34px; } .lk-filter-group { row-gap: 6px; } }

@media (prefers-reduced-motion: reduce) {
  .sg-pause { display: none; }
  .sg-ring, .sg-chip { transition: none; }
  .sg-anim .sg-rv { transform: none; transition: none; }
  .sg-bar, .sg-plate img, .sg-btn, .sg-tile { transition: none; }
}
.lk-reduced .sg-pause { display: none; }
