/* Home page only. Loaded after site.css. Every colour, space, radius, shadow and duration comes from css/tokens.css.
   Order: hero map · stage band · walkthrough (layout, panel, beats, motion, phone, static) · record · dial ·
   getting started · questions · beyond sales. The walkthrough's behaviour lives in js/walkthrough.js. */

/* Each stage sets the two colours its parts read. */
[data-stage="finding"] { --stage-tint: var(--color-stage-finding); --stage-mark: var(--color-stage-finding-mark); }
[data-stage="winning"] { --stage-tint: var(--color-stage-winning); --stage-mark: var(--color-stage-winning-mark); }
[data-stage="keeping"] { --stage-tint: var(--color-stage-keeping); --stage-mark: var(--color-stage-keeping-mark); }

/* Section heads a size up from the inner pages: 40px at desktop, with tighter tracking. */
.page-home .h2 { font-size: clamp(28px, 1.1rem + 2vw, var(--text-h1-size)); line-height: 1.12; letter-spacing: var(--text-h1-ls); max-width: 26ch; }
/* Home bands: the steel tint, a step stronger than the grey band, on the record and getting started */
.page-home .section--tint { background: var(--color-surface-tint); }
.page-home .section .sub { font-size: var(--text-lead-size); line-height: var(--text-lead-lh); margin-top: var(--space-4); max-width: 58ch; }

/* ---------- 1. Hero ---------- */
.hero--map { padding-block: var(--space-12) var(--space-16); }
@media (min-width: 900px) { .hero--map { padding-block: var(--space-16); } }
.hero-split { display: grid; gap: var(--space-8); grid-template-columns: minmax(0, 1fr); align-items: center; }
/* even columns, so the text carries as much weight as the diagram */
@media (min-width: 980px) { .hero-split { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-12); align-items: start; } }
.hero-title {
    font-size: clamp(var(--text-h1-size), 1.5rem + 4.6vw, calc(var(--text-display-size) * 1.36));
    line-height: 1; letter-spacing: -0.03em; max-width: 15ch; text-wrap: balance;
}
/* Top-align: trim the headline's leading above its capitals so they line up with the diagram's top edge,
   and give the trimmed space back below it so both columns still end level. */
@supports (text-box: trim-start cap alphabetic) {
    .hero-title { text-box: trim-start cap alphabetic; padding-bottom: 0.2em; }
}
/* Split layout below the max width: size the headline to its column so it stays on two lines. */
@media (min-width: 980px) and (max-width: 1239px) { .hero-title { font-size: min(6.4vw, calc(var(--text-display-size) * 1.36)); } }
/* the lede runs to about the headline's width, a block under it rather than a strip */
.hero-copy .lede { color: var(--color-ink); max-width: 42ch; }
.hero-copy .ctas .text-link { display: inline-flex; align-items: center; min-height: 44px; }

/* The diagram: You → the Orchestrator → specialists by stage → the shared-context floor they all stand on. */
/* A diagram on the page, not a card of cards: no outer frame. */
.hero-map {
    display: grid; justify-items: stretch;
    font-size: var(--text-small-size); line-height: var(--text-small-lh);
}
.hm-name { font-weight: 600; color: var(--color-ink); font-size: var(--text-body-size); line-height: var(--text-body-lh); }
.hm-roles { font-size: var(--text-small-size); line-height: var(--text-small-lh); color: var(--color-ink-muted); }
/* You: a plain box in ink (1px), the same width as the Orchestrator's; the 2px brand border stays the Orchestrator's
   alone. Both boxes put the name and its roles on one row, wrapping only when the column is narrow. */
.hm-you {
    border: 1px solid var(--color-ink); border-radius: var(--radius-md); padding: var(--space-2) var(--space-3);
    background: var(--color-surface);
}
.hm-head, .hm-orch { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 0 var(--space-3); text-align: center; }

.hm-wire { position: relative; justify-self: center; width: 2px; height: var(--space-8); background: var(--color-rule); }
.hm-wire span { position: absolute; left: -3px; top: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--color-brand); opacity: 0; }

.hm-orch {
    border: 2px solid var(--color-brand); border-radius: var(--radius-md); padding: var(--space-2) var(--space-3);
    background: var(--color-surface); box-shadow: var(--shadow-frame);
}
.hm-orch .hm-name { color: var(--color-brand-text); }

.hm-fan { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); height: var(--space-4); }
.hm-fan span { position: relative; justify-self: center; width: 2px; height: 100%; background: var(--color-rule); }
/* Pulses for the one-time animation (hidden at rest): the Orchestrator's hand-off down each fan wire, and the shared
   context feeding up each stage's floor rule. */
.hm-fan span::after, .hm-stage::before { content: ""; position: absolute; width: 8px; height: 8px; border-radius: 50%; opacity: 0; pointer-events: none; }
.hm-fan span::after { left: -3px; top: -4px; background: var(--stage-mark); z-index: 1; }

.hm-team { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); }
.hm-stage {
    position: relative; display: grid; gap: var(--space-2); align-content: start;
    background: var(--stage-tint); border-top: 3px solid var(--stage-mark); border-radius: var(--radius-sm);
    padding: var(--space-3);
}
/* each stage stands on the floor: a short rule from its foot to the shared context */
.hm-stage::after { content: ""; position: absolute; left: 50%; bottom: calc(-1 * var(--space-4)); width: 2px; height: var(--space-4); background: var(--color-rule); }
/* context rising into a stage takes that stage's marker colour; above the stage's floor rule, not under it */
.hm-stage::before { left: calc(50% - 3px); bottom: calc(-1 * var(--space-4) - 4px); background: var(--stage-mark); z-index: 1; }
.hm-stage-name { font-weight: 600; color: var(--color-ink); }
.chip {
    position: relative; display: block; min-height: 32px;
    padding: var(--space-1) var(--space-2); border: 1px solid var(--color-rule); border-radius: var(--radius-sm);
    background: var(--color-surface); color: var(--color-ink); text-decoration: none; font-weight: 600;
}
a.chip:hover { border-color: var(--stage-mark); }
a.chip::after { content: "\2193"; position: absolute; right: var(--space-2); top: var(--space-1); color: var(--color-ink-muted); font-weight: 400; }
/* the ring the animation lights on the specialist the ask is routed to */
.chip::before { content: ""; position: absolute; inset: -1px; border-radius: var(--radius-sm); box-shadow: 0 0 0 2px var(--stage-mark); opacity: 0; pointer-events: none; }

.hm-floor { margin-top: var(--space-4); border-top: 2px solid var(--color-ink); background: var(--color-surface-alt); border-radius: 0 0 var(--radius-sm) var(--radius-sm); padding: var(--space-3) var(--space-4); display: grid; gap: var(--space-2); }
.hm-floor-name { font-weight: 600; color: var(--color-ink); margin-right: var(--space-2); }
.hm-floor-what { color: var(--color-ink-muted); }

/* Phones: the compact diagram (under 300px tall). Roles go; each stage is one row, its word then its chips. */
@media (max-width: 599px) {
    .hero-map { gap: 0; }
    .hm-roles { display: none; }
    .hm-you { padding: var(--space-1) var(--space-3); }
    .hm-wire { height: var(--space-3); }
    .hm-orch { padding: var(--space-1) var(--space-3); }
    .hm-fan { display: none; }
    .hm-team { grid-template-columns: minmax(0, 1fr); gap: var(--space-1); margin-top: var(--space-2); }
    .hm-stage { grid-template-columns: 64px repeat(3, auto); justify-content: start; align-items: center; gap: var(--space-1) var(--space-2); padding: var(--space-1) var(--space-2); border-top-width: 2px; }
    .hm-stage::after, .hm-stage::before { display: none; }
    .hm-stage-name { font-size: var(--text-label-size); }
    .chip { min-height: 0; padding: 0 var(--space-1); font-size: var(--text-label-size); line-height: 24px; }
    /* a 44px-tall hit area without changing how the chip looks */
    a.chip::after { content: ""; position: absolute; left: -4px; right: -4px; top: -10px; bottom: -10px; }
    .hm-floor { margin-top: var(--space-2); padding: var(--space-2); grid-template-columns: auto minmax(0, 1fr); align-items: center; }
    .hm-floor-what { font-size: var(--text-label-size); }
}

/* The one-time animation (html.hero-play, set before paint unless reduced motion is on). 2.8s in all, transform
   and opacity only, never loops. Without it, or under reduced motion, the final frame shows. */
@keyframes hm-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes hm-travel { 0% { opacity: 0; transform: translateY(0); } 15% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; transform: translateY(var(--space-8)); } }
@keyframes hm-nudge { 0%, 100% { transform: none; } 50% { transform: scale(1.02); } }
@keyframes hm-glow { 0%, 100% { opacity: 0; } 30%, 70% { opacity: 1; } }
@keyframes hm-down { 0% { opacity: 0; transform: none; } 20%, 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(var(--space-4)); } }
@keyframes hm-up { 0% { opacity: 0; transform: none; } 20%, 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(calc(-1 * var(--space-4))); } }
/* You → the Orchestrator → down to one stage, while the shared context feeds up into the same stage → one
   specialist there lights. The route is picked at random on each load by the inline script after the hero map
   (.is-route on one fan wire and its stage, .is-hit on one of that stage's chips). */
.hero-play .hm-you { animation: hm-in var(--motion-enter) var(--ease-out) both; }
.hero-play .hm-wire span { animation: hm-travel 600ms ease-in-out 450ms both; }
.hero-play .hm-orch { animation: hm-nudge 400ms ease-in-out 1000ms both; }
.hero-play .hm-fan span.is-route::after { animation: hm-down 500ms ease-in-out 1250ms both; }
.hero-play .hm-stage.is-route::before { animation: hm-up 500ms ease-in-out 1350ms both; }
.hero-play .chip.is-hit::before { animation: hm-glow 900ms ease-in-out 1700ms both; }

/* ---------- 2. Stage band: one track, read top to bottom ---------- */
/* A continuous three-colour rule runs down the left; each stage is a row: its name, its work, its two workflows. */
.stage-band { display: grid; grid-template-columns: minmax(0, 1fr); margin-top: var(--space-8); border-top: 2px solid var(--color-ink); }
.stage {
    display: grid; gap: var(--space-1) var(--space-8); align-items: baseline;
    border-bottom: 1px solid var(--color-rule); padding: var(--space-4) 0 var(--space-4) var(--space-6);
    box-shadow: inset 4px 0 0 var(--stage-mark); /* the page's one bar device: the stage marker */
    background: var(--stage-tint); padding-right: var(--space-4);
}
.stage-name { font-size: var(--text-h3-size); line-height: var(--text-h3-lh); }
.stage-tasks { color: var(--color-ink); }
@media (min-width: 820px) {
    .stage { grid-template-columns: 140px minmax(0, 1fr) minmax(0, 380px); padding-block: var(--space-6); }
    .stage-links { justify-content: flex-end; }
}
.stage-links { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-6); font-weight: 600; }
.stage-links a { display: inline-flex; align-items: center; min-height: 40px; color: var(--color-brand-text); text-decoration-color: var(--color-border); text-decoration-thickness: 1px; }
.stage-links a::after { content: "\2193"; margin-left: var(--space-1); font-weight: 400; }
.stage-links a:hover { text-decoration-color: var(--stage-mark); text-decoration-thickness: 2px; }

/* ---------- 3. Walkthrough ---------- */
.walk-section { padding-bottom: var(--space-12); }
.no-js .walk-hint, .walk-static .walk-hint { display: none; }
/* Rhythm: a tighter step out of the walkthrough's long scroll, more air before the closing band. */
@media (min-width: 900px) {
    .walk-section { padding-bottom: var(--space-12); }
    .page-home #questions { padding-bottom: var(--space-24); }
}
.walk-intro { max-width: 64ch; }
.walk-skip { margin-top: var(--space-3); }
.walk { position: relative; margin-top: var(--space-8); }
.walk-bar { display: none; }

/* commentary: the stage word, the title, then the job, the split, and where you step in */
.walk-notes { display: grid; gap: var(--space-3); align-content: start; max-width: 44ch; }
.walk-stage { display: inline-flex; align-items: center; gap: var(--space-2); justify-self: start; font-weight: 600; font-size: var(--text-small-size); line-height: var(--text-small-lh); color: var(--color-ink); }
.walk-stage::before { content: ""; width: var(--space-4); height: 3px; background: var(--stage-mark); }
.walk-title { font-size: 24px; line-height: 30px; }
.walk-title:focus { outline: none; }
.walk-title:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 4px; }
.walk-notes p { color: var(--color-ink-muted); }
.walk-notes p:not([class]) { color: var(--color-ink); font-size: 18px; line-height: 28px; }
.walk-notes :is(.walk-job, .walk-stepin) { color: var(--color-ink); }
.walk-notes .walk-job { font-size: var(--text-lead-size); line-height: var(--text-lead-lh); }
.walk-label { display: block; font-size: var(--text-small-size); line-height: var(--text-small-lh); font-weight: 600; color: var(--color-ink-muted); margin-bottom: var(--space-1); }
/* Notes of a track that isn't playing step back: title and job in muted ink (still >= 4.5:1), stage marker faded.
   No opacity on text. */
.js:not(.walk-static) .walk-track:not(.is-current) .walk-notes :is(.walk-title, .walk-job, .walk-stepin, .walk-stage, p:not([class])) { color: var(--color-ink-muted); }
.js:not(.walk-static) .walk-track:not(.is-current) .walk-stage::before { opacity: .35; }
/* The echo: the exchange in focus, repeated large beside the panel (desktop playback only; js fills it) */
.walk-echo { display: none; }
@media (min-width: 820px) {
    .js:not(.walk-static) .walk-track.is-current .walk-echo:not(:empty) {
        display: grid; gap: var(--space-1); margin-top: var(--space-4);
        padding: var(--space-3) 0 var(--space-3) var(--space-4); box-shadow: inset 3px 0 0 var(--stage-mark);
    }
}
.walk-notes .walk-echo-who { font: var(--text-label-weight) var(--text-label-size)/var(--text-label-lh) var(--text-label-font); letter-spacing: var(--text-label-ls); color: var(--color-ink-muted); }
.walk-notes .walk-echo-line { font-size: 22px; line-height: 30px; font-weight: 600; color: var(--color-ink); }
/* "Skip the walkthrough": one outlined button at the end of the tracks column. Sticky to the viewport bottom, so it
   shows in one place (level with the panel's foot) from the moment the walkthrough comes into view until its end,
   then scrolls away with it. The wrapper lets clicks through to anything under its empty width. */
.walk-out-wrap { position: sticky; bottom: var(--space-4); z-index: 2; margin-top: var(--space-6); pointer-events: none; }
.walk-out-wrap .walk-out { pointer-events: auto; background: var(--color-surface); border-color: var(--color-brand); box-shadow: var(--shadow-frame); }
.walk-out-wrap .walk-out:hover { background: var(--color-surface-tint); }
.walk-echo.is-new { animation: beat-in var(--motion-enter) var(--ease-out) both; }

/* The panel: a fixed-height simulated chat. Header row 1: the stage track and "Illustrative"; row 2: the workflow,
   its stepper and replay. The header's controls are real buttons in the tab order; only the thread is aria-hidden
   (the static transcript carries the text). */
.walk-panel {
    display: flex; flex-direction: column;
    background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-frame); overflow: hidden;
    font-size: var(--text-small-size); line-height: var(--text-small-lh);
}
.wp-head { background: var(--stage-tint); border-bottom: 1px solid var(--color-rule); padding: var(--space-3) var(--space-4); display: grid; gap: var(--space-2); }
.wp-row { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.wp-row--1 { justify-content: space-between; }
.stage-track { display: flex; }
/* "Illustrative example": a quiet caption under the panel thread, the static transcripts and the record */
.walk-caption { font-size: 13px; line-height: 20px; color: var(--color-ink-muted); }
.wp-foot { padding: var(--space-2) var(--space-4); text-align: right; border-top: 1px solid var(--color-rule); }
.walk-static .walk-caption { padding: var(--space-2) var(--space-4); text-align: right; border-top: 1px solid var(--color-rule); }
/* rounded ends without overflow: hidden, which would clip the focus ring */
.stage-track > :first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.stage-track > :last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.stage-track > * {
    font: 400 var(--text-label-size)/var(--text-label-lh) var(--font-sans); color: var(--color-ink-muted);
    background: var(--stage-tint); border: 0; padding: var(--space-1) var(--space-3); cursor: pointer;
    box-shadow: inset 0 -3px 0 transparent; min-height: 28px;
}
.stage-track > * + * { border-left: 1px solid transparent; }
/* the header stays quiet: only the current stage keeps its tint; the others show theirs on hover or focus */
.stage-track > :not(.is-current) { background: transparent; }
.stage-track button:not(.is-current):is(:hover, :focus-visible) { background: var(--stage-tint); color: var(--color-ink); }
.stage-track button.is-current { color: var(--color-ink); font-weight: 600; box-shadow: inset 0 -3px 0 var(--stage-mark); }
.stage-track > span { cursor: default; display: inline-flex; align-items: center; }
/* the stage's two workflows: the one showing in ink with its stage mark; the other a small outlined button that
   plays it in this panel */
.wp-flows { display: flex; align-items: center; gap: var(--space-2); min-width: 0; flex: 0 1 auto; }
.wp-flows button { min-width: 0; }
.wp-flows button span { overflow: hidden; text-overflow: ellipsis; } /* only on the narrowest phones */
.wp-flows button {
    font: 600 13px/18px var(--font-sans); white-space: nowrap; cursor: pointer; border-radius: var(--radius-sm);
    display: inline-flex; align-items: center; gap: var(--space-1); min-height: 28px; padding: var(--space-1) var(--space-2);
    color: var(--color-brand-text); background: var(--color-surface); border: 1px solid var(--color-border);
}
.wp-flows button:hover { border-color: var(--stage-mark); }
.wp-flows button svg { width: 10px; height: 10px; flex: none; }
.wp-flows button[aria-current="true"] {
    color: var(--color-ink); background: transparent; border-color: transparent; padding-inline: 0; cursor: default;
    font-size: var(--text-small-size);
}
/* row 3: the steps of the workflow showing; a workflow without steps keeps the row, so the thread doesn't jump */
.wp-row--3 { min-height: 26px; margin-left: calc(-1 * var(--space-2)); }
.wp-flows button[aria-current="true"] svg { display: none; }
.stepper { display: flex; gap: var(--space-1); min-width: 0; overflow: hidden; }
.stepper button {
    font: 400 13px/18px var(--font-sans); color: var(--color-ink-muted); background: transparent; border: 0;
    padding: var(--space-1) var(--space-2); border-radius: var(--radius-sm); cursor: pointer; white-space: nowrap;
}
.stepper button:hover { color: var(--color-ink); background: var(--color-surface); }
.stepper button[aria-current="step"] { color: var(--color-ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--stage-mark); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.wp-replay {
    margin-left: auto; display: inline-flex; align-items: center; gap: var(--space-1);
    font: 600 13px/18px var(--font-sans); color: var(--color-brand-text); background: var(--color-surface);
    border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: var(--space-1) var(--space-2); cursor: pointer; white-space: nowrap;
}
.wp-replay[aria-disabled="true"] { color: var(--color-ink-muted); border-color: var(--color-rule); cursor: default; }
.wp-replay svg { width: 14px; height: 14px; }
/* The thread fills from the top. Once the beats outgrow it, js hides the oldest whole (.is-clipped) until the
   newest fit, still top-anchored, so spare room falls at the bottom where the next beat lands. */
.wp-thread {
    flex: 1; min-height: 0; overflow: hidden; position: relative;
    display: flex; flex-direction: column; justify-content: flex-start; gap: var(--space-4);
    padding: var(--space-4) var(--space-6) var(--space-6);
    transition: opacity var(--motion-switch) linear;
}
.wp-thread.is-switching { opacity: 0; }
.wp-thread .is-clipped { display: none; }
/* a card shown compact keeps its lead line; the rest waits for the full card */
.pbeat.is-compact :is(.card-rows, .card-small, .card-text, .decide-tag, .src) { display: none; }
.pbeat.is-compact :is(.card-text, .card-small).is-kept { display: block; } /* its closing question, when the next line answers it */
/* Focus: the exchange in focus (.is-now: the newest beat, and its founder line when it is a reply) stays in full
   ink; older beats recede to muted ink (no opacity, still >= 4.5:1). The founder line in focus takes the stage
   tint, the card in focus the stronger outline, and its key row (.is-key / .is-watch) the stage marker. */
.wp-thread .pbeat:not(.is-now) :is(.beat-msg, .card-lead, .card-rows li, .card-text, .decide-tag) { color: var(--color-ink-muted); }
.wp-thread .pbeat:not(.is-now) .card-rows .is-watch { background: transparent; border-top-color: var(--color-rule); padding-inline: 0; }
.wp-thread .pbeat.is-now.beat--you .beat-msg { background: var(--stage-tint); border-color: var(--stage-mark); }
.wp-thread .pbeat.is-now .card { border-color: var(--color-border); }
.wp-thread .pbeat.is-now .card-rows :is(.is-key, .is-watch) { font-weight: 600; box-shadow: inset 3px 0 0 var(--stage-mark); padding-left: var(--space-3); }

/* ---------- Beats: shared by the panel and the static transcript ---------- */
.beat { display: grid; gap: var(--space-1); justify-items: start; flex: none; }
.beat-who { font: var(--text-label-weight) var(--text-label-size)/var(--text-label-lh) var(--text-label-font); letter-spacing: var(--text-label-ls); color: var(--color-ink-muted); }
.beat--you { justify-items: end; }
.beat-msg { max-width: 85%; background: var(--color-surface-alt); border: 1px solid var(--color-rule); border-radius: var(--radius-md); padding: var(--space-2) var(--space-3); font-size: 15px; line-height: 23px; }
.beat-day { justify-self: stretch; display: flex; align-items: center; gap: var(--space-3); font: var(--text-label-weight) var(--text-label-size)/var(--text-label-lh) var(--text-label-font); letter-spacing: var(--text-label-ls); color: var(--color-ink-muted); margin-block: var(--space-2); }
.beat-day::before, .beat-day::after { content: ""; flex: 1; height: 1px; background: var(--color-rule); }
.beat-seen { font: var(--text-label-weight) var(--text-label-size)/var(--text-label-lh) var(--text-label-font); color: var(--color-ink-muted); }
.card {
    width: min(100%, 94%); background: var(--color-surface); border: 1px solid var(--color-rule); border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4); display: grid; gap: var(--space-2);
}
.card-lead { font-weight: 600; font-size: 15px; line-height: 23px; color: var(--color-ink); }
.card-rows { display: grid; }
.card-rows li { padding: 6px 0; border-top: 1px solid var(--color-rule); color: var(--color-ink); }
.card-rows li b { font-weight: 600; }
.card-rows .is-more { color: var(--color-ink-muted); }
.card-rows .is-key { color: var(--color-ink); }
.card-rows .is-watch { background: var(--color-surface-tint); padding-inline: var(--space-2); border-top-color: var(--color-surface-tint); }
.card-rows .is-watch + .is-watch { border-top-color: var(--color-surface); }
.src { display: inline-block; margin-left: var(--space-1); font-size: var(--text-small-size); line-height: var(--text-small-lh); color: var(--color-ink-muted); }
.card-rows--compare li { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: var(--space-3); }
.card-rows--compare span { color: var(--color-ink-muted); }
@media (min-width: 600px) { .card-rows--compare li { grid-template-columns: 80px 84px 88px minmax(0, 1fr); } .card-rows--compare span:nth-child(3) { color: var(--color-ink); font-weight: 600; } }
.card-small { color: var(--color-ink-muted); }
.card-text { color: var(--color-ink); }
.decide-tag { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2); margin-top: var(--space-1); color: var(--color-ink); }
.decide-tag-label { font: var(--text-label-weight) var(--text-label-size)/var(--text-label-lh) var(--text-label-font); letter-spacing: var(--text-label-ls); color: var(--color-decide); background: var(--color-decide-wash); border-radius: var(--radius-sm); padding: 2px var(--space-2); }

/* Motion for beats in the panel (js adds the classes; only transform and opacity move). */
@keyframes beat-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes dot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.pbeat.is-enter [data-anim] { animation: beat-in var(--motion-enter) var(--ease-out) both; animation-delay: calc(var(--i, 0) * var(--motion-stagger)); }
.pbeat .typing { display: none; }
.pbeat.is-typing .typing { display: inline-flex; gap: 4px; background: var(--color-surface-alt); border: 1px solid var(--color-rule); border-radius: var(--radius-md); padding: var(--space-2) var(--space-3); }
.pbeat.is-typing .typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--color-ink-muted); animation: dot 900ms infinite; }
.pbeat.is-typing .typing i:nth-child(2) { animation-delay: 150ms; }
.pbeat.is-typing .typing i:nth-child(3) { animation-delay: 300ms; }
.pbeat.is-typing .beat-msg, .pbeat.is-typing .beat-seen { display: none; }
.pbeat.is-leaving { opacity: 0; transition: opacity var(--motion-rewind) linear; position: absolute; left: var(--space-6); right: var(--space-6); } /* out of the flow, so fit() measures only the beats that stay */

/* ---------- Walkthrough: playback layout (js on, not static) ---------- */
/* a stage's second workflow plays in its track's panel: its own article stays in the reading order for screen
   readers, out of sight; its notes show (as an aria-hidden copy inside the track) while it plays */
.js:not(.walk-static) .walk-track--alt { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.js .walk-track .walk-notes.is-off, .walk-static .walk-notes--alt { display: none; }
.js:not(.walk-static) .walk-static { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
/* The beat line sits at 55% of the viewport (LINE in walkthrough.js). The lead-in puts a track's first sentinel on
   that line just as the track's top reaches the header, so a workflow opens on its beat 1. */
.walk-beats { padding-top: calc(55vh - var(--size-header) - var(--space-4)); padding-top: calc(55svh - var(--size-header) - var(--space-4)); }
.walk-beat { height: var(--size-walk-beat); }
.walk-hold { height: 15vh; height: 15svh; }

@media (min-width: 820px) {
    .js:not(.walk-static) .walk { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: var(--space-12); }
    .js:not(.walk-static) .walk-tracks { grid-column: 1; grid-row: 1; }
    .js:not(.walk-static) .walk-stage-col { grid-column: 2; grid-row: 1; }
    .js:not(.walk-static) .walk-stage-col .walk-panel {
        position: sticky; top: calc(var(--size-header) + var(--space-4));
        height: calc(100vh - var(--size-header) - var(--space-8));
        height: calc(100svh - var(--size-header) - var(--space-8));
    }
    /* commentary and sentinels share one cell; the commentary sticks while the empty sentinels scroll past */
    .js:not(.walk-static) .walk-track { display: grid; }
    .js:not(.walk-static) .walk-notes, .js:not(.walk-static) .walk-play { grid-area: 1 / 1; }
    /* the notes sit about a fifth of the way down, level with the middle of the panel's thread */
    .js:not(.walk-static) .walk-notes { position: sticky; top: calc(var(--size-header) + var(--space-4)); align-self: start; z-index: 1; }
    .js:not(.walk-static) .walk-play .walk-panel { display: none; }
    /* clearance between workflows, at least the notes' sticky offset, so the outgoing notes release before the next arrive */
    .js:not(.walk-static) .walk-track ~ .walk-track { margin-top: calc(var(--size-header) + 16vh); margin-top: calc(var(--size-header) + 16svh); }
}

/* Phones: each workflow is its own track; the commentary scrolls away and that workflow's chat sticks under a slim bar. */
@media (max-width: 819px) {
    .js:not(.walk-static) .walk-stage-col { display: none; }
    .js:not(.walk-static) .walk-bar {
        display: flex; align-items: center; position: sticky; top: var(--size-header); z-index: 5; visibility: hidden;
        height: var(--size-walk-bar); margin-inline: calc(-1 * var(--space-4)); padding-inline: var(--space-4);
        background: var(--color-surface); border-bottom: 1px solid var(--color-rule);
        font-size: var(--text-small-size); line-height: var(--text-small-lh); font-weight: 600; color: var(--color-ink);
        gap: var(--space-3);
    }
    .walk-bar-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    /* the compact outlined version: a 28px button with a 40px hit area (the bar's height) */
    .walk-out--bar {
        position: relative; flex: none; display: inline-flex; align-items: center; min-height: 28px; white-space: nowrap;
        padding: 0 var(--space-2); border: 1px solid var(--color-brand); border-radius: var(--radius-sm);
        color: var(--color-brand-text); font-weight: 600; text-decoration: none;
    }
    .walk-out--bar::after { content: ""; position: absolute; inset: -6px 0; }
    .walk-out--bar:hover { background: var(--color-surface-tint); }
    /* the bar carries the skip link here, so the notes' copy (scrolled away above the chat) stays out */
    .js:not(.walk-static) .walk-out-wrap { display: none; }
    /* the chat is nearly a screen tall and sticks only while its track runs: the hold keeps it stuck until the last
       beat has crossed the beat line (55svh) and sat a while (about 15svh) */
    .walk-hold { height: calc(60vh - var(--size-walk-beat)); height: calc(60svh - var(--size-walk-beat)); }
    .js:not(.walk-static) .walk-play { display: grid; margin-top: var(--space-6); }
    .js:not(.walk-static) .walk-play > * { grid-area: 1 / 1; }
    .js:not(.walk-static) .walk-play .walk-panel {
        position: sticky; top: calc(var(--size-header) + var(--size-walk-bar) + var(--space-2)); align-self: start;
        /* one steady height while it's stuck; js fills it with the newest beats and older cards compact */
        height: calc(100vh - var(--size-header) - var(--size-walk-bar) - var(--space-4));
        height: calc(100svh - var(--size-header) - var(--size-walk-bar) - var(--space-4));
    }
    .wp-thread { padding: var(--space-3) var(--space-3) var(--space-4); }
    .wp-head { padding: var(--space-2) var(--space-3); }
    .stepper button { padding-inline: var(--space-1); }
    .wp-replay span { display: none; } /* replay keeps its icon */
    .wp-row--3 { display: none; } /* the slim bar names the step */
    .wp-row--2 { gap: var(--space-2); }
    .wp-flows { gap: var(--space-1); }
    .wp-flows button { position: relative; padding-inline: var(--space-1); }
    .wp-flows button::after { content: ""; position: absolute; inset: -8px -2px; }
    .wp-replay { min-width: 32px; min-height: 28px; justify-content: center; }
    /* 44px hit areas on the panel's controls without changing how they look */
    .stage-track { overflow: visible; }
    .stage-track button, .stepper button, .wp-replay { position: relative; }
    .stage-track button::after, .stepper button::after, .wp-replay::after { content: ""; position: absolute; inset: -8px -2px; }
    .wp-replay::after { inset: -8px -6px; } /* neighbours sit close on the left, so only replay widens sideways */
    .stepper { overflow: visible; }
    .beat-msg, .card-lead { font-size: var(--text-body-size); line-height: 24px; }
    .card { width: 100%; padding: var(--space-3); }
}
@media (max-width: 819px) { .js:not(.walk-static) .bar-on .walk-bar { visibility: visible; } }
@media (min-width: 600px) and (max-width: 819px) { .js:not(.walk-static) .walk-bar { margin-inline: calc(-1 * var(--space-6)); padding-inline: var(--space-6); } }

/* Static layout: no JS, reduced motion, or a viewport 640px tall or less. Every conversation shows in full. */
.no-js .walk-play, .no-js .walk-stage-col, .walk-static .walk-play, .walk-static .walk-stage-col { display: none; }
.walk-static-head { display: flex; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) var(--space-4); background: var(--color-surface-alt); border-bottom: 1px solid var(--color-rule); }
.walk-static-name { font-weight: 600; }
.walk-steps-static { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); padding: var(--space-2) var(--space-4); border-bottom: 1px solid var(--color-rule); color: var(--color-ink-muted); font-size: 13px; }
.walk-steps-static li + li::before { content: "\00B7"; margin-right: var(--space-4); }
.walk-transcript { display: grid; gap: var(--space-4); padding: var(--space-4) var(--space-6) var(--space-6); }
.no-js .walk-track, .walk-static .walk-track { display: grid; gap: var(--space-6); margin-bottom: var(--space-12); }
.no-js .walk-static, .walk-static .walk-static { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-frame); overflow: hidden; font-size: var(--text-small-size); line-height: var(--text-small-lh); }
@media (min-width: 820px) {
    .no-js .walk-track, .walk-static .walk-track { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-12); align-items: start; }
}
@media (max-width: 599px) { .walk-transcript { padding: var(--space-3); } }

/* ---------- 4. The record ---------- */
.record-split { display: grid; gap: var(--space-8); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 820px) { .record-split { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--space-12); align-items: end; } }
.record-notes { border-top: 2px solid var(--color-ink); margin-top: var(--space-8); }
.record-notes li { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: var(--space-3); padding: var(--space-4) 0; border-bottom: 1px solid var(--color-rule); }
.record-notes h3 { font-size: var(--text-body-size); line-height: var(--text-body-lh); grid-column: 2; }
.record-notes p { color: var(--color-ink); grid-column: 2; }
.record-notes .record-key { grid-row: 1 / span 2; background: var(--color-surface); }
.record-key { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: var(--radius-sm); background: var(--color-surface-tint); color: var(--color-brand-text); font: 600 12px/1 var(--font-sans); margin-top: 2px; }
.record-log { background: var(--color-surface); border-color: var(--color-border); box-shadow: var(--shadow-frame); }
.record-log .log-head { background: var(--color-surface-alt); }
.log-name { font-weight: 600; color: var(--color-ink); }
@media (max-width: 599px) { .record-log .src { display: block; margin-left: 0; } }
.record-log li { grid-template-columns: 22px minmax(0, 1fr); align-items: start; }
.record-log li.is-rule { font-weight: 600; }
.record-figure { margin: 0; }
.record-figure .walk-caption { margin-top: var(--space-2); text-align: right; }
.record-log .src { margin-left: var(--space-2); }

/* ---------- 5. You stay in charge: the dial ---------- */
/* The brake and the needle: the lever sets the limit, the needle runs up to it and never passes it (js/dial.js).
   Layout: heading, dial, then the three positions on phones; dial left, heading and positions right from 820px.
   Pinned (JS, motion, and a viewport at least 700px tall): .charge is a scroll track and .charge-pin holds the whole
   view still while the track scrolls by, so scrolling moves the lever a stop at a time with no empty screens.
   Otherwise: the final frame, and the section reads as a plain block. */
.charge-pin { display: grid; gap: var(--space-6); }
.charge-text { display: contents; }
.charge-head { order: -1; max-width: 60ch; }
.gauge-svg { display: block; width: 100%; max-width: 480px; margin: 0 auto; overflow: visible; }

.gauge-fill-0 { stop-color: color-mix(in srgb, var(--color-brand) 22%, var(--color-surface)); }
.gauge-fill-1 { stop-color: color-mix(in srgb, var(--color-brand) 70%, var(--color-surface)); }
.gauge-fill-2 { stop-color: var(--color-navy); }
.gauge-face { fill: var(--color-surface-alt); }
.gauge-arc { fill: none; stroke: url(#gauge-fill); stroke-width: 28; }
.gauge-ticks line { stroke: var(--color-border); stroke-width: 2; stroke-linecap: round; }
.gauge-dividers line { stroke: var(--color-ink); stroke-width: 4; stroke-linecap: round; }
.gauge-nums text { font: var(--text-label-weight) 20px var(--font-mono); fill: var(--color-ink-muted); text-anchor: middle; }
.gauge-nums text.is-reached { fill: var(--color-brand-text); }
.gauge-nums text.is-current { fill: var(--color-ink); font-size: 26px; }

/* Only transform: rotate is animated, about the hub at (200, 200). */
.gauge-needle, .gauge-lever { transform-box: view-box; transform-origin: 200px 200px; }
.gauge-needle path { fill: var(--color-highlight); }
.gauge-lever-arm, .gauge-lever-grip, .gauge-lever-index { fill: var(--color-ink); }
.gauge-lever-collar { fill: var(--color-surface); stroke: var(--color-ink); stroke-width: 4; }
.gauge-hub { fill: var(--color-ink); }
.gauge-hub-cap { fill: var(--color-surface); }

.gauge-stops { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-1); }
/* Rows bleed into the gutter by their own padding, so the text stays on the heading's left edge while the current
   row's panel (the dial face's colour) reaches past it. The panel replaces rules between the rows. */
.gauge-pos { display: grid; gap: var(--space-1); padding: var(--space-3); margin-inline: calc(-1 * var(--space-3)); border-radius: var(--radius-md); transition: background-color var(--motion-enter) var(--ease-out); }
.gauge-pos.is-current { background: var(--color-surface-alt); }
.gauge-pos h3 { font-size: var(--text-h3-size); line-height: var(--text-h3-lh); }
.gauge-pos p { color: var(--color-ink); }
.gauge-pos :is(h3, p) { transition: color var(--motion-enter) var(--ease-out); }
.gauge-n { display: inline-block; min-width: 22px; padding: 4px 0; border-radius: var(--radius-sm); text-align: center; font: var(--text-label-weight) var(--text-label-size)/1 var(--text-label-font); color: var(--color-brand-text); margin-right: var(--space-2); vertical-align: 3px; }
/* The stop the lever is on: its counter is a solid ink tile, like the dark number on the dial. While the dial is
   playing (.has-current), the other positions recede to muted ink. */
.gauge-pos.is-current .gauge-n { background: var(--color-ink); color: var(--color-surface); }
.charge.has-current .gauge-pos:not(.is-current) :is(h3, p) { color: var(--color-ink-muted); }

@media (min-width: 820px) {
    /* Equal halves, the dial filling its half, so the dial carries as much weight as the text beside it. */
    .charge-pin { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-12); align-items: center; }
    .gauge-svg { max-width: none; }
    .charge-text { display: block; }
    .charge-head { margin-bottom: var(--space-8); }
}

/* Pinned. Track = the pinned view plus three stretches of scroll, one per stop. */
@media (min-height: 700px) {
    .hero-play .charge { height: calc(100vh - var(--size-header) + 105vh); height: calc(100svh - var(--size-header) + 105svh); }
    .hero-play .charge-pin {
        position: sticky; top: var(--size-header);
        height: calc(100vh - var(--size-header)); height: calc(100svh - var(--size-header));
        align-content: center; gap: var(--space-4);
    }
    .hero-play .gauge-needle, .hero-play .gauge-lever { will-change: transform; }
}
@media (min-height: 700px) and (max-width: 819px) {
    .hero-play .gauge-svg { max-width: 300px; }
    .hero-play .gauge-pos { padding-block: var(--space-2); }
}

/* ---------- 6. Getting started ---------- */
.start-steps { display: grid; grid-template-columns: minmax(0, 1fr); border-top: 2px solid var(--color-ink); margin-top: var(--space-8); }
.start-steps li { display: grid; gap: var(--space-2); align-content: start; padding: var(--space-6) 0; border-bottom: 1px solid var(--color-rule); }
.start-steps h3 { font-size: var(--text-h3-size); line-height: var(--text-h3-lh); }
.start-steps p { color: var(--color-ink); }
.start-num { font: var(--text-label-weight) 24px/32px var(--text-label-font); letter-spacing: var(--text-label-ls); color: var(--color-brand-text); }
@media (min-width: 820px) {
    .start-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .start-steps li { border-bottom: 0; border-right: 1px solid var(--color-rule); padding: var(--space-6); }
    .start-steps li:first-child { padding-left: 0; }
    .start-steps li:last-child { border-right: 0; padding-right: 0; }
}
.start-then { display: grid; gap: var(--space-6); margin-top: var(--space-8); }
@media (min-width: 820px) { .start-then { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: var(--space-12); } }
.start-ways { font-size: var(--text-lead-size); line-height: var(--text-lead-lh); color: var(--color-ink); }
.start-then-label { display: block; font-size: var(--text-small-size); line-height: var(--text-small-lh); font-weight: 600; color: var(--color-ink-muted); margin-bottom: var(--space-1); }
.start-or { color: var(--color-ink-muted); margin-inline: var(--space-2); }

/* ---------- 7. Questions ---------- */
.faq-split { display: grid; gap: var(--space-6); grid-template-columns: minmax(0, 1fr); }
.faq-side { display: grid; gap: var(--space-4); justify-items: start; align-content: start; }
.page-home .faq-list details p { color: var(--color-ink); }
@media (min-width: 820px) { .faq-split { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--space-12); } .faq-split .faq-list { margin-top: 0; } }

/* ---------- 8. Beyond sales ---------- */
.beyond { border-top: 1px solid var(--color-border); }
.beyond-row { display: grid; gap: var(--space-3); padding-block: var(--space-8); }
.beyond-row > p:first-child { color: var(--color-ink); max-width: 70ch; }
.beyond-links { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); }
@media (min-width: 820px) { .beyond-row { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--space-12); } }

@media (prefers-reduced-motion: reduce) {
    .hero-play * { animation: none !important; }
}
