/* ─── The demo library: one look for every demo (16 Nov 2026, v2) ───────────────────────────────────────────────
   Shared by the website, the prospect map and report, and the client portal: realistic things that move or send
   (texts, emails, letters, a van, proposals, payments, reviews…), never abstract particles. Everything is scoped to
   .smd and smd-* so a demo never leans on, or fights, the page's own stylesheet. Device screens are warm, light and
   generic (no makers' logos); around them the page is charcoal, ivory and gold.

   What a built demo looks like (demos.js makes all of it; the demo file only builds inside .smd-stage):
     .smd                                   the element the page wrote (data-demo, data-title="off", data-steps="off")
       p.smd-title                          the scenario in one line (api.context; hidden by data-title="off")
       .smd-body                            narrow: one column · wide (.smd-wide: room for the steps beside it): two
         .smd-dev > .smd-stage + .smd-echoes   the device, and "the other phone" floating over its top corner
         .smd-ctx > ol.smd-steps + .smd-stepper + p.smd-out   the numbered steps, a compact stepper, the outcome
         .smd-foot                          "Example" · sound · ↻ Replay
   Classes a demo can use (demos.js builds the frames for you with api.phone(), api.browser(), api.laptop(),
   api.tablet()):
     frames      .smd-phone > .smd-screen (.smd-status, .smd-home) · .smd-browser > .smd-bar + .smd-page ·
                 .smd-laptop > .smd-lid > .smd-screen + .smd-base · .smd-tablet > .smd-screen
     messages    .smd-apphead · .smd-thread > .smd-thread-in + .smd-thread-end · .smd-bub.is-in / .is-out ·
                 .smd-typing · .smd-day · .smd-meta · .smd-sys · .smd-note (what the system did) · .smd-card(.is-dark)
                 · .smd-compose > .smd-chips > .smd-chip + .smd-input > .smd-send(.is-on) · .smd-ic · .smd-av
                 A thread becomes scrollable (inside the phone) once the demo has finished.
     paper       .smd-paper (a sheet: letters, proposals) · .smd-sign (a signature line)
     buttons     .smd-btn (.is-gold, .is-dark) · .smd-pill
     lines       .smd-wire (a fine gold connector, SVG stroke) · .smd-wire.is-dashed
     taps        .smd-tap (api.onTap adds it) · .smd-offer + .smd-ring + .smd-tip (api.offer) · .smd-hint · .smd-press
     helpers     .smd-sr (screen-reader only) · .smd-num (tabular figures) · .smd-gold (gold text) · [hidden]
   Motion rules (storyboard §3): only transform, opacity and clip-path move; no blur on anything that moves or
   overlaps (near-opaque fills instead); shadows are fixed, never animated. */

:root {
  /* brand */
  --smd-bg: #0d0d0c;
  --smd-ivory: #f2ede3;
  --smd-muted: #bdb6a8;
  --smd-gold: #c8a46a;
  --smd-gold-hi: #e3c68f;
  --smd-gold-grad: linear-gradient(135deg, #c8a46a 0%, #e3c68f 100%);
  --smd-hair-d: rgba(242, 237, 227, .14);
  /* device screens and paper */
  --smd-screen: #f3f0e8;
  --smd-card: #fffdf8;
  --smd-paper: #fbf8f1;
  --smd-ink: #1d1a16;
  --smd-ink-2: #6c655a;
  --smd-ink-3: #9b9387;
  --smd-hair: #e2dcd0;
  --smd-them: #e6e1d6;
  --smd-me: #201d19;
  --smd-me-ink: #f6f1e7;
  --smd-alert: #b0553d;
  /* near-opaque fills for anything that floats over something else (never a blur) */
  --smd-float-l: rgba(255, 253, 248, .97);
  --smd-float-d: rgba(24, 22, 19, .94);
  /* type: the Next.js pages (prospect page, portal) self-host the fonts as --font-news / --font-geist-*; the website
     loads the same faces from Google Fonts by their plain names */
  --smd-serif: var(--font-news, "Newsreader"), "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --smd-sans: var(--font-geist-sans, "Geist"), "Geist", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --smd-mono: var(--font-geist-mono, "Geist Mono"), "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  /* motion: the same curves as demos.js (quart.out for entrances, power3.out for moves) */
  --smd-ease: cubic-bezier(.16, 1, .3, 1);
  --smd-ease-q: cubic-bezier(.25, 1, .5, 1);
  --smd-ease-3: cubic-bezier(.215, .61, .355, 1);
  --smd-shadow: 0 12px 26px -16px rgba(0, 0, 0, .5);
}

/* the hidden attribute always wins inside a demo (api.grow shows an item by removing it) */
.smd [hidden] { display: none !important; }

/* ── the demo: a title, the device with its steps beside or under it, and a quiet foot ── */
.smd { --smd-w: 320px; position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; min-width: 0; margin-inline: auto; overflow-x: clip; color: var(--smd-ivory); font: 400 14px/1.45 var(--smd-sans); text-align: left; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; isolation: isolate; }
.smd, .smd *, .smd *::before, .smd *::after { box-sizing: border-box; }
:where(.smd) :where(p, ol, ul, li, dl, dd, figure, blockquote, h3, h4, h5, h6) { margin: 0; padding: 0; }
:where(.smd) :where(ol, ul) { list-style: none; }
:where(.smd) :where(h3, h4, h5, h6) { font: inherit; letter-spacing: normal; text-wrap: initial; }
:where(.smd) img { display: block; max-width: 100%; height: auto; }
:where(.smd) button { font: inherit; color: inherit; letter-spacing: inherit; }
.smd-body { position: relative; display: grid; grid-template-columns: minmax(0, var(--smd-w)); justify-content: center; row-gap: 14px; width: 100%; min-width: 0; }
.smd.smd-wide.smd-has-ctx .smd-body { grid-template-columns: minmax(0, var(--smd-w)) minmax(0, 272px); column-gap: 28px; }
.smd-dev { position: relative; grid-column: 1; grid-row: 1; min-width: 0; }
/* the stage keeps its layout to itself: what moves inside never re-lays the page out. (Paint containment lives on the
   device screens, which clip anyway: on the stage it would clip the frames' shadows and the echoes.) */
.smd-stage { position: relative; width: 100%; contain: layout style; }
/* the one ambient glow: a faint warm light behind the device, never moving */
.smd-dev::before { content: ""; position: absolute; z-index: -1; inset: 6% -16%; background: radial-gradient(closest-side, rgba(200, 164, 106, .11), rgba(200, 164, 106, .03) 55%, transparent 75%); pointer-events: none; }
.smd.no-glow .smd-dev::before { display: none; }
.smd-fallback { display: none !important; }

/* before a demo builds, its room is kept, so nothing below it jumps when it does (iPhones have no scroll anchoring)
   and a #link lands where it should: an empty .smd holds a block as tall as the built demo will be at its width
   (percentages in padding follow the width). --smd-hold is the device plus the foot; the title and the narrow
   stepper are added on top (--smd-xt, --smd-xs), and they match the built sizes below exactly. A demo file can give
   its own with def.hold. */
.smd { --smd-xt: 62px; --smd-xs: 82px; }
.smd.smd-wide { --smd-xt: 38px; --smd-xs: 0px; }
.smd[data-title="off"] { --smd-xt: 0px; }
.smd[data-steps="off"] { --smd-xs: 0px; }
.smd:not(.smd-on):empty::before { content: ""; display: block; width: 1px; padding-top: calc(var(--smd-hold, 0px) + var(--smd-xt) + var(--smd-xs)); }
.smd[data-demo="journey"], .smd[data-demo="sms"], .smd[data-demo="email"], .smd[data-demo="reviews"], .smd[data-demo="booking"], .smd[data-demo="receptionist"], .smd[data-demo="ads"], .smd[data-demo="letter"] { --smd-hold: calc(min(100%, var(--smd-phone-w, 300px)) * 19.5 / 9 + 44px); }
.smd[data-demo="van"] { --smd-hold: calc(min(100%, 420px) * 440 / 420 + 44px); }
.smd[data-demo="payment"] { --smd-hold: calc(min(100%, 380px) * 536 / 380 + 44px); }
.smd[data-demo="chase"] { --smd-hold: calc(707px + min(45px, (380px - min(100%, 380px)) * .9)); }
.smd[data-demo="crm"] { --smd-hold: max(351px, min(371px, 351px + (560px - 100%) * 20)); }
.smd[data-demo="apps"], .smd[data-demo="advisory"] { --smd-hold: 382px; }
.smd[data-demo="report"] { --smd-hold: calc(min(100%, 640px) * .617 + 59px); }
@media (max-width: 700px) { .smd[data-demo="apps"], .smd[data-demo="advisory"], .smd[data-demo="report"] { --smd-hold: calc(min(100%, var(--smd-phone-w, 300px)) * 19.5 / 9 + 44px); } }
.smd[data-demo="website"] { --smd-hold: min(calc(min(100%, 620px) * .43 + 314px), calc(min(100%, 620px) * .24 + 405px)); }
.smd[data-demo="proposal"] { --smd-hold: calc(min(100%, 418px) * 1.4056 + 82px + 160vh); }
@media (prefers-reduced-motion: reduce) { .smd[data-demo="proposal"] { --smd-hold: calc(min(100%, 418px) * 1.4056 + 82px); } }

/* a section that holds a demo is always laid out (never skipped by the page's content-visibility), so the page never
   changes height under the reader when the demo builds (storyboard R8) */
.smd-host, .smd-host > .wrap > * { content-visibility: visible; }

/* ── the scenario: a title, 3–5 numbered steps that light in step with the demo, and the outcome (api.context) ──
   Everything is laid out from the first frame with room for every line, so nothing shifts. Wide: the steps are a list
   beside the device. Narrow: numbered dots under it, the current step in a fixed two-line box. */
.smd-title { width: min(100%, calc(var(--smd-w) + 300px)); min-height: 48px; margin: 0; font: 400 18px/24px var(--smd-serif); letter-spacing: -.01em; text-align: center; text-wrap: balance; color: inherit; }
.smd.smd-wide .smd-title { min-height: 24px; }
.smd[data-title="off"] .smd-title, .smd[data-steps="off"] .smd-ctx { display: none; }
.smd-ctx { grid-column: 1; grid-row: 2; min-width: 0; }
.smd.smd-wide .smd-ctx { grid-column: 2; grid-row: 1; align-self: end; padding-bottom: 6px; }
.smd-steps { display: grid; gap: 12px; }
.smd-s { display: grid; grid-template-columns: 14px 16px minmax(0, 1fr); column-gap: 8px; align-items: baseline; font: 400 13.5px/1.42 var(--smd-sans); letter-spacing: -.003em; opacity: .4; transition: opacity .35s var(--smd-ease-q); }
.smd-s.is-done { opacity: .7; }
.smd-s.is-on { opacity: 1; }
.smd-s > i { align-self: center; height: 1px; background: var(--smd-gold); transform: scaleX(0); transform-origin: 0 50%; transition: transform .45s var(--smd-ease-q); }
.smd-s.is-on > i { transform: none; }
.smd-sn { position: relative; font: 500 11px/1 var(--smd-mono); letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.smd-sn > span { transition: opacity .3s var(--smd-ease-q); }
.smd-sn::after { content: attr(data-n); position: absolute; left: 0; top: 0; color: var(--smd-gold-hi); opacity: 0; transition: opacity .3s var(--smd-ease-q); }
.smd-s.is-on .smd-sn > span { opacity: 0; }
.smd-s.is-on .smd-sn::after { opacity: 1; }
.smd-out { display: flex; align-items: baseline; gap: 9px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--smd-hair-d); color: var(--smd-gold-hi); font: 500 13.5px/1.42 var(--smd-sans); letter-spacing: -.003em; opacity: 0; transform: translateY(6px); transition: opacity .35s var(--smd-ease-q), transform .35s var(--smd-ease-q); }
.smd-out > svg { flex: none; width: 13px; height: 13px; transform: translateY(1px); }
.smd-ctx.is-out .smd-out { opacity: 1; transform: none; }
/* narrow: the list and the outcome stay for screen readers (read once, as static text); the stepper shows */
.smd:not(.smd-wide) .smd-steps, .smd:not(.smd-wide) .smd-out { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.smd-stepper { display: grid; grid-template-rows: 20px 38px; row-gap: 10px; width: 100%; }
.smd.smd-wide .smd-stepper { display: none; }
.smd-sp-row { display: flex; align-items: center; padding-inline: 2px; }
.smd-sp-dot { position: relative; flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid currentColor; font: 500 11px/1 var(--smd-mono); font-style: normal; font-variant-numeric: tabular-nums; opacity: .4; transition: opacity .35s var(--smd-ease-q); }
.smd-sp-dot::after { content: attr(data-n); position: absolute; inset: -1px; display: grid; place-items: center; border-radius: 50%; background: var(--smd-gold-hi); color: #1b140a; opacity: 0; transform: scale(.7); transition: opacity .3s var(--smd-ease-q), transform .35s var(--smd-ease-q); }
.smd-sp-dot.is-done { opacity: .7; }
.smd-sp-dot.is-on { opacity: 1; }
.smd-sp-dot.is-on::after { opacity: 1; transform: none; }
.smd-sp-seg { position: relative; flex: 1 1 0; height: 1px; margin-inline: 5px; background: currentColor; opacity: .25; }
.smd-sp-seg > b { position: absolute; inset: 0; background: var(--smd-gold-hi); transform: scaleX(0); transform-origin: 0 50%; transition: transform .5s var(--smd-ease-q); }
.smd-sp-seg.is-done { opacity: .9; }
.smd-sp-seg.is-done > b { transform: none; }
.smd-sp-cap { display: grid; align-items: start; font: 400 13px/19px var(--smd-sans); letter-spacing: -.003em; text-align: center; text-wrap: balance; }
.smd-sp-cap > span { grid-area: 1 / 1; opacity: 0; transform: translateY(3px); transition: opacity .12s ease-in, transform .12s ease-in; }
.smd-sp-cap > span.is-on { opacity: 1; transform: none; transition: opacity .28s var(--smd-ease-q) .12s, transform .28s var(--smd-ease-q) .12s; }
.smd-sp-cap > .smd-sp-out { color: var(--smd-gold-hi); font-weight: 500; }
.smd-sp-out > svg { display: inline-block; width: 12px; height: 12px; margin-right: 7px; vertical-align: -1px; }

/* ── "the other phone": a small card for the side that isn't on screen (api.echo). Wide: over the device's top-right
   corner, half on and half off. Narrow: centred over its top edge (the status bar and the app's header). ── */
/* a fixed box with nothing outside it: an echo arriving lays out only itself, never the page */
.smd-echoes { position: absolute; z-index: 6; left: 50%; top: 1.4%; width: min(240px, 88%); height: 250px; transform: translateX(-50%); pointer-events: none; contain: strict; }
.smd.smd-wide .smd-echoes { left: calc(100% - 120px); top: 7%; width: 240px; transform: none; }
.smd-echo { position: absolute; left: 0; right: 0; top: 0; display: grid; gap: 3px; padding: 10px 13px 11px; border-radius: 14px; font: 400 11.5px/1.36 var(--smd-sans); letter-spacing: -.003em; text-align: left; opacity: 0; }
.smd-echo.is-owner { background: var(--smd-float-d); color: var(--smd-ivory); box-shadow: inset 0 0 0 1px rgba(200, 164, 106, .45), 0 14px 26px -14px rgba(0, 0, 0, .75); }
.smd-echo.is-customer { background: var(--smd-float-l); color: var(--smd-ink); box-shadow: inset 0 0 0 1px rgba(29, 26, 22, .1), 0 14px 26px -14px rgba(0, 0, 0, .6); }
.smd-echo-h { display: flex; align-items: center; gap: 7px; font: 500 11px/1.25 var(--smd-mono); letter-spacing: .12em; text-transform: uppercase; }
.smd-echo-h::before { content: ""; flex: none; width: 5px; height: 5px; border-radius: 50%; background: var(--smd-gold); }
.smd-echo.is-owner .smd-echo-h { color: var(--smd-gold-hi); }
.smd-echo.is-customer .smd-echo-h { color: var(--smd-ink-2); }
.smd-echo-t { display: block; font: 600 12.5px/1.3 var(--smd-sans); letter-spacing: -.006em; }
.smd-echo-b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.smd-echo.is-owner .smd-echo-b { color: var(--smd-muted); }
.smd-echo.is-customer .smd-echo-b { color: var(--smd-ink-2); }
.smd-echo-m { font: 500 11px/1.3 var(--smd-sans); opacity: .75; }
/* ✓ and ★ in an echo's words are drawn, never a fallback font's glyph (the same on every device, and no font lookup) */
.smd-g { display: inline-block; width: .92em; height: .92em; vertical-align: -.12em; }
.smd-g.is-star { color: var(--smd-gold-hi); margin-right: .04em; }
.smd-echo.is-customer .smd-g.is-star { color: #c6943f; }

.smd-foot { grid-column: 1; grid-row: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 30px; }
.smd.smd-wide .smd-foot, .smd:not(.smd-has-ctx) .smd-foot { grid-row: 2; }
.smd-ex { display: inline-flex; align-items: center; gap: 9px; font: 500 11px/1 var(--smd-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--smd-muted); opacity: .78; }
.smd-ex::before { content: ""; width: 14px; height: 1px; background: var(--smd-gold); }
.smd-ctl { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }

.smd-replay { appearance: none; display: inline-flex; align-items: center; gap: 7px; height: 30px; margin: 0; padding: 0 12px 0 10px; border: 1px solid var(--smd-hair-d); border-radius: 999px; background: rgba(13, 13, 12, .55); color: var(--smd-muted); font: 500 11px/1 var(--smd-mono); letter-spacing: .12em; text-transform: uppercase; cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(3px); transition: opacity .6s var(--smd-ease), transform .6s var(--smd-ease), visibility 0s linear .6s, color .25s, border-color .25s; }
.smd-replay svg { width: 13px; height: 13px; flex: none; }
.smd[data-smd-state="done"] .smd-replay { opacity: 1; visibility: visible; transform: none; transition-delay: .45s, .45s, 0s, 0s, 0s; }
.smd-replay:hover { color: var(--smd-ivory); border-color: rgba(200, 164, 106, .55); }
.smd.is-reduced .smd-replay, .smd[data-smd-mode="scroll"] .smd-replay { display: none; }

/* sound: the page's own switch (<button class="smd-sound" data-smd-sound>), or a small speaker in each demo's foot
   when the page has none. Either one flips the same, remembered, site-wide setting. */
.smd-sound { appearance: none; display: inline-flex; align-items: center; gap: 8px; height: 34px; margin: 0; padding: 0 14px 0 11px; border: 1px solid var(--smd-hair-d); border-radius: 999px; background: rgba(242, 237, 227, .03); color: var(--smd-muted); font: 500 11px/1 var(--smd-mono); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; cursor: pointer; transition: color .25s, border-color .25s; }
.smd-sound svg { width: 16px; height: 16px; flex: none; }
.smd-sound:hover { color: var(--smd-ivory); border-color: rgba(200, 164, 106, .5); }
.smd-sound[aria-pressed="true"] { color: var(--smd-gold-hi); border-color: rgba(200, 164, 106, .55); background-color: rgba(200, 164, 106, .08); }
.smd-snd { appearance: none; display: inline-grid; place-items: center; width: 30px; height: 30px; margin: 0; padding: 0; border: 1px solid var(--smd-hair-d); border-radius: 50%; background: rgba(13, 13, 12, .55); color: var(--smd-muted); cursor: pointer; transition: color .25s, border-color .25s; }
.smd-snd svg { width: 15px; height: 15px; }
.smd-snd:hover { color: var(--smd-ivory); border-color: rgba(200, 164, 106, .55); }
.smd-snd[aria-pressed="true"] { color: var(--smd-gold-hi); border-color: rgba(200, 164, 106, .5); }
.smd-has-toggle .smd-snd { display: none; }
.smd-spk-on { display: none; }
[aria-pressed="true"] .smd-spk-on { display: inline; }
[aria-pressed="true"] .smd-spk-off { display: none; }
.smd-replay:focus-visible, .smd-snd:focus-visible, .smd-sound:focus-visible { outline: 2px solid var(--smd-gold-hi); outline-offset: 2px; }

/* a demo whose file isn't on the site yet: hidden on real pages, a calm placeholder on the review gallery */
.smd.is-missing { display: none; }
[data-smd-gallery] .smd.is-missing { display: flex; }
.smd-missing { display: grid; justify-items: center; gap: 10px; width: min(var(--smd-w, 320px), 100%); padding: 56px 24px; border: 1px dashed rgba(200, 164, 106, .35); border-radius: 20px; text-align: center; color: var(--smd-muted); }
.smd-missing b { font: 400 24px/1.2 var(--smd-serif); color: var(--smd-ivory); }
.smd-missing small { font: 500 11px/1.6 var(--smd-mono); letter-spacing: .1em; text-transform: uppercase; }

/* ── taps: gentle and optional. Hover/press use the separate translate/scale properties, so they never fight the
   transforms GSAP writes. The hint is its own ring (transform and opacity only), never a box-shadow. ── */
:where(.smd-tap) { position: relative; }
.smd-tap { cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: translate .45s var(--smd-ease), scale .2s var(--smd-ease); }
@media (hover: hover) and (pointer: fine) {
  .smd-tap:hover { translate: 0 -1px; }
  .smd-tap:not(.smd-offer):hover { outline: 1px solid rgba(200, 164, 106, .7); outline-offset: 2px; }
  .smd-offer:hover > .smd-ring { opacity: 1; transform: none; }
}
.smd-tap:focus-visible { outline: 2px solid var(--smd-gold); outline-offset: 3px; }
.smd-tap:active, .smd-press { scale: .97; transition-duration: .12s; }
.smd-ring { position: absolute; z-index: 3; inset: -4px; border-radius: inherit; border: 1.5px solid rgba(200, 164, 106, .92); opacity: 0; transform: scale(.96); pointer-events: none; transition: opacity .4s var(--smd-ease-q), transform .45s var(--smd-ease-q); }
.smd-ring.is-in { inset: 1px; }
.smd-ring::after { content: ""; position: absolute; inset: -1.5px; border-radius: inherit; border: 1.5px solid rgba(200, 164, 106, .5); opacity: 0; }
.smd-hint > .smd-ring { opacity: 1; transform: none; }
.smd-hint > .smd-ring::after { animation: smd-ping 1.1s var(--smd-ease-q) .2s 1 both; }
@keyframes smd-ping { 0% { opacity: .85; transform: scale(1); } 100% { opacity: 0; transform: scale(1.14); } }
.smd-tip { position: absolute; z-index: 8; left: 50%; bottom: calc(100% + 11px); padding: 6px 9px; border-radius: 7px; background: #1b1a17; color: var(--smd-gold-hi); font: 500 11px/1 var(--smd-mono); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; pointer-events: none; box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .65), 0 0 0 1px rgba(200, 164, 106, .3); opacity: 0; transform: translate(-50%, 4px); transition: opacity .4s var(--smd-ease-q), transform .4s var(--smd-ease-q); }
.smd-tip::after { content: ""; position: absolute; left: 50%; top: 100%; width: 7px; height: 7px; background: #1b1a17; box-shadow: 1px 1px 0 rgba(200, 164, 106, .3); transform: translate(-50%, -50%) rotate(45deg); }
.smd-tip.is-on { opacity: 1; transform: translate(-50%, 0); }
.smd-tip[data-at="bottom"] { bottom: auto; top: calc(100% + 11px); transform: translate(-50%, -4px); }
.smd-tip[data-at="bottom"]::after { top: 0; box-shadow: -1px -1px 0 rgba(200, 164, 106, .3); }
.smd-tip[data-at="bottom"].is-on { transform: translate(-50%, 0); }
.smd-tip[data-at="left"], .smd-tip[data-at="right"] { bottom: auto; top: 50%; }
.smd-tip[data-at="left"] { left: auto; right: calc(100% + 11px); transform: translate(4px, -50%); }
.smd-tip[data-at="right"] { left: calc(100% + 11px); transform: translate(-4px, -50%); }
.smd-tip[data-at="left"].is-on, .smd-tip[data-at="right"].is-on { transform: translate(0, -50%); }
.smd-tip[data-at="left"]::after { left: 100%; top: 50%; box-shadow: 1px -1px 0 rgba(200, 164, 106, .3); }
.smd-tip[data-at="right"]::after { left: 0; top: 50%; box-shadow: -1px 1px 0 rgba(200, 164, 106, .3); }

/* ── device frames: black with a fine gold edge, like the studio renders in demos/img ── */
.smd-phone { --pw: var(--smd-phone-w, 300px); position: relative; width: var(--pw); max-width: 100%; aspect-ratio: 9 / 19.5; margin-inline: auto; padding: calc(var(--pw) * .025); border-radius: calc(var(--pw) * .158); background: linear-gradient(150deg, #2c2a26 0%, #131311 20%, #0a0a09 58%, #1f1d1a 100%); box-shadow: 0 0 0 1px rgba(200, 164, 106, .42), inset 0 0 0 1px rgba(255, 255, 255, .06), inset 0 0 0 calc(var(--pw) * .012) #050505, 0 50px 100px -48px rgba(0, 0, 0, .95), 0 22px 44px -28px rgba(0, 0, 0, .75); }
.smd-phone::before { content: ""; position: absolute; right: -2.5px; top: 25%; width: 3px; height: 11.5%; border-radius: 0 3px 3px 0; background: linear-gradient(90deg, #15140f, #3b3426); box-shadow: 1px 0 0 rgba(200, 164, 106, .4); }
.smd-phone::after { content: ""; position: absolute; left: -2.5px; top: 19%; width: 3px; height: 5.5%; border-radius: 3px 0 0 3px; background: #24211b; box-shadow: -1px 0 0 rgba(200, 164, 106, .35), 0 calc(var(--pw) * .13) 0 #24211b, -1px calc(var(--pw) * .13) 0 rgba(200, 164, 106, .35); }
.smd-screen { position: relative; display: flex; flex-direction: column; height: 100%; overflow: hidden; background: var(--smd-screen); color: var(--smd-ink); font: 400 13.5px/1.38 var(--smd-sans); }
/* a device's screen is a world of its own: its size never depends on what's inside, and nothing inside it can make
   the page lay out or paint again (the strongest containment, safe because the frame fixes its size) */
.smd-phone > .smd-screen, .smd-tablet > .smd-screen, .smd-lid > .smd-screen { contain: strict; }
.smd-phone > .smd-screen { border-radius: calc(var(--pw) * .135); }
.smd-phone.is-dark > .smd-screen { background: #121210; color: var(--smd-ivory); }
.smd-status { flex: none; position: relative; z-index: 9; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; height: calc(var(--pw) * .15); padding: calc(var(--pw) * .01) calc(var(--pw) * .055) 0; font: 600 max(11.5px, calc(var(--pw) * .047))/1 var(--smd-sans); letter-spacing: -.01em; color: inherit; }
.smd-status-t { justify-self: center; font-variant-numeric: tabular-nums; }
.smd-island { width: calc(var(--pw) * .3); height: calc(var(--pw) * .086); border-radius: 999px; background: #050505; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04); }
.smd-status-r { justify-self: center; display: inline-flex; align-items: center; gap: calc(var(--pw) * .016); }
.smd-status-r svg { display: block; height: calc(var(--pw) * .036); width: auto; }
.smd-status-r .smd-bat { height: calc(var(--pw) * .04); }
.smd-home { position: absolute; z-index: 10; left: 50%; bottom: calc(var(--pw) * .022); width: 36%; height: 4px; border-radius: 4px; background: rgba(29, 26, 22, .82); transform: translateX(-50%); pointer-events: none; }
.smd-phone.is-dark .smd-home { background: rgba(242, 237, 227, .7); }

.smd-browser { display: flex; flex-direction: column; overflow: hidden; border-radius: 12px; background: var(--smd-card); color: var(--smd-ink); box-shadow: 0 0 0 1px rgba(200, 164, 106, .3), 0 40px 80px -42px rgba(0, 0, 0, .9), 0 16px 34px -24px rgba(0, 0, 0, .6); }
.smd-bar { flex: none; display: grid; grid-template-columns: 52px minmax(0, 1fr) 52px; align-items: center; gap: 10px; height: 32px; padding: 0 12px; background: #ebe6db; border-bottom: 1px solid var(--smd-hair); }
.smd-dots { display: inline-flex; gap: 6px; }
.smd-dots i { width: 9px; height: 9px; border-radius: 50%; background: #d3ccbe; }
.smd-url { justify-self: center; display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; height: 21px; padding: 0 12px; border-radius: 6px; background: #f7f4ee; color: var(--smd-ink-2); font: 500 11px/1 var(--smd-sans); white-space: nowrap; overflow: hidden; }
.smd-url span { overflow: hidden; text-overflow: ellipsis; }
.smd-url svg { width: 10px; height: 10px; flex: none; opacity: .7; }
.smd-page { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; background: var(--smd-card); }

.smd-laptop { --lw: var(--smd-laptop-w, 760px); width: var(--lw); max-width: 100%; margin-inline: auto; }
.smd-lid { position: relative; margin: 0 6.5%; aspect-ratio: 16 / 10; padding: 2.3% 2.3% 3%; border-radius: 16px 16px 5px 5px; background: linear-gradient(180deg, #1e1d1a 0%, #0f0f0e 100%); box-shadow: 0 0 0 1px rgba(200, 164, 106, .36), inset 0 0 0 1px rgba(255, 255, 255, .05); }
.smd-lid::before { content: ""; position: absolute; top: 1%; left: 50%; width: 6px; height: 6px; border-radius: 50%; background: #26241f; box-shadow: inset 0 0 0 1.5px #121210; transform: translateX(-50%); }
.smd-lid > .smd-screen { border-radius: 4px; }
.smd-base { position: relative; height: clamp(9px, 1.9vw, 15px); border-radius: 2px 2px 16px 16px / 2px 2px 11px 11px; background: linear-gradient(180deg, #37332c 0%, #1c1a17 42%, #0b0b0a 100%); box-shadow: 0 0 0 1px rgba(200, 164, 106, .3), 0 34px 60px -28px rgba(0, 0, 0, .95); }
.smd-base::before { content: ""; position: absolute; top: 0; left: 50%; width: 15%; height: 42%; border-radius: 0 0 7px 7px; background: #0e0e0d; transform: translateX(-50%); }

.smd-tablet { --tw: var(--smd-tablet-w, 560px); position: relative; width: var(--tw); max-width: 100%; aspect-ratio: 4 / 3; margin-inline: auto; padding: calc(var(--tw) * .032); border-radius: calc(var(--tw) * .058); background: linear-gradient(150deg, #2c2a26 0%, #121210 32%, #0b0b0a 66%, #1d1b18 100%); box-shadow: 0 0 0 1px rgba(200, 164, 106, .4), inset 0 0 0 1px rgba(255, 255, 255, .05), 0 50px 100px -50px rgba(0, 0, 0, .95); }
.smd-tablet.is-portrait { aspect-ratio: 3 / 4; }
.smd-tablet::before { content: ""; position: absolute; top: calc(var(--tw) * .013); left: 50%; width: 6px; height: 6px; border-radius: 50%; background: #26241f; transform: translateX(-50%); }
.smd-tablet > .smd-screen { border-radius: calc(var(--tw) * .028); }
.smd-tablet .smd-status { --pw: calc(var(--tw) * .55); height: 30px; grid-template-columns: auto minmax(0, 1fr) auto; padding: 0 16px; font-size: 12px; }
.smd-tablet .smd-status-t, .smd-tablet .smd-status-r { justify-self: start; }
.smd-tablet .smd-status-r { grid-column: 3; }

/* a demo designed at a fixed width, scaled down to fit (api.fit). The first child is a zero-height ruler that only
   ever changes when the width does. */
.smd-fit { position: relative; width: 100%; overflow: hidden; }
.smd-fit > .smd-fit-w { display: block; height: 0; }
.smd-fit > :not(.smd-fit-w) { transform-origin: 0 0; }

/* ── phone apps: a messages thread ── */
.smd-apphead { flex: none; display: grid; grid-template-columns: 26px minmax(0, 1fr) 26px; align-items: center; gap: 6px; padding: 2px 12px 9px; border-bottom: 1px solid var(--smd-hair); background: rgba(243, 240, 232, .97); color: var(--smd-ink); }
.smd-apphead > svg { width: 20px; height: 20px; color: #8a8276; }
.smd-apphead-who { display: grid; justify-items: center; gap: 3px; min-width: 0; text-align: center; }
.smd-apphead-who > span:first-child { margin-bottom: 5px; }   /* an avatar above the name: 8px clear of it */
.smd-apphead-who b { max-width: 100%; text-wrap: balance; font: 600 12.5px/1.2 var(--smd-sans); letter-spacing: -.005em; }
.smd-apphead-who small { font: 400 11px/1.2 var(--smd-sans); color: var(--smd-ink-2); font-variant-numeric: tabular-nums; }
.smd-av { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: radial-gradient(circle at 30% 25%, #34302a, #191714 70%); color: var(--smd-gold-hi); font: 500 17px/1 var(--smd-serif); box-shadow: inset 0 0 0 1px rgba(200, 164, 106, .55); }
/* a thread is top-anchored while it's short and bottom-anchored once it's full (the newest at the bottom, like a
   phone); once the demo has finished it scrolls inside the phone, so the whole conversation can be read */
.smd-thread { position: relative; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; padding: 0 12px; }
.smd-thread-in { flex: none; display: flex; flex-direction: column; padding: 10px 0 12px; }
.smd-thread-end { flex: 1 0 0; }
.smd-thread-in > * { flex: none; margin-top: 8px; }
.smd-thread-in > .smd-meta { margin-top: 3px; }
.smd-thread.is-scroll, [data-smd-scroll].is-scroll { overflow-y: auto; justify-content: flex-start; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.smd-thread.is-scroll::-webkit-scrollbar, [data-smd-scroll].is-scroll::-webkit-scrollbar { display: none; }
.smd-bub { position: relative; max-width: 80%; padding: 8px 12px 9px; border-radius: 18px; font: 400 13px/1.37 var(--smd-sans); letter-spacing: -.003em; overflow-wrap: anywhere; }
.smd-bub.is-in { align-self: flex-start; background: var(--smd-them); color: var(--smd-ink); border-bottom-left-radius: 6px; transform-origin: 0 100%; }
.smd-bub.is-out { align-self: flex-end; background: var(--smd-me); color: var(--smd-me-ink); border-bottom-right-radius: 6px; transform-origin: 100% 100%; }
.smd-typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 11px 13px; border-radius: 18px 18px 18px 6px; background: var(--smd-them); transform-origin: 0 100%; }
.smd-typing i { width: 6px; height: 6px; border-radius: 50%; background: #8f877a; animation: smd-dot 1.1s ease-in-out 3; }
.smd-typing i:nth-child(2) { animation-delay: .15s; }
.smd-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes smd-dot { 0%, 60%, 100% { opacity: .35; transform: none; } 30% { opacity: 1; transform: translateY(-2px); } }
.smd-day { align-self: center; padding: 2px 0; font: 400 11px/1.2 var(--smd-sans); color: var(--smd-ink-2); font-variant-numeric: tabular-nums; }
.smd-day b { font-weight: 600; }
.smd-meta { font: 500 11px/1.2 var(--smd-sans); color: var(--smd-ink-3); }
.smd-meta.is-out { align-self: flex-end; padding-right: 4px; }
.smd-meta.is-in { align-self: flex-start; padding-left: 4px; }
.smd-sys { align-self: center; display: inline-flex; align-items: center; gap: 9px; max-width: 100%; padding: 7px 13px 7px 8px; border: 1px solid var(--smd-hair); border-radius: 14px; background: var(--smd-card); color: var(--smd-ink); box-shadow: 0 8px 18px -14px rgba(0, 0, 0, .35); }
.smd-sys b { display: block; font: 600 11.5px/1.25 var(--smd-sans); }
.smd-sys small { display: block; font: 400 11px/1.25 var(--smd-sans); color: var(--smd-ink-2); }
/* what the system did, said quietly: charcoal and gold, so it never reads as part of the conversation */
.smd-note { align-self: center; display: inline-flex; align-items: center; gap: 7px; max-width: 100%; overflow: hidden; padding: 6px 11px 6px 9px; border-radius: 999px; background: #1c1a17; color: var(--smd-gold-hi); font: 500 11px/1.15 var(--smd-mono); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; font-variant-numeric: tabular-nums; box-shadow: 0 8px 18px -12px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(200, 164, 106, .25); }
.smd-note > i { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--smd-gold); }
.smd-note > svg { display: none; flex: none; width: 12px; height: 12px; }
.smd-note.is-done > i { display: none; }
.smd-note.is-done > svg { display: block; }
.smd-card { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--smd-hair); border-radius: 15px; background: var(--smd-card); color: var(--smd-ink); box-shadow: 0 12px 26px -18px rgba(0, 0, 0, .45); }
.smd-card b { display: block; font: 600 12.5px/1.25 var(--smd-sans); letter-spacing: -.005em; }
.smd-card small { display: block; margin-top: 2px; font: 400 11px/1.3 var(--smd-sans); color: var(--smd-ink-2); }
.smd-card.is-dark { border-color: rgba(200, 164, 106, .38); background: linear-gradient(180deg, #24221e 0%, #161512 100%); color: var(--smd-ivory); box-shadow: 0 10px 22px -16px rgba(0, 0, 0, .5); }
.smd-card.is-dark small { color: var(--smd-muted); }
.smd-ic { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; background: rgba(29, 26, 22, .07); color: var(--smd-ink-2); }
.smd-ic svg { width: 56%; height: 56%; }
.smd-ic.is-alert { background: rgba(176, 85, 61, .11); color: var(--smd-alert); }
.smd-ic.is-gold { background: rgba(200, 164, 106, .16); color: #a8814a; }
.smd-card .smd-ic { width: 36px; height: 36px; border-radius: 11px; }
.smd-card.is-dark .smd-ic { background: rgba(200, 164, 106, .15); color: var(--smd-gold-hi); }
.smd-compose { flex: none; display: grid; padding: 8px 10px calc(var(--pw, 300px) * .085); border-top: 1px solid var(--smd-hair); background: rgba(243, 240, 232, .97); }
.smd-chips { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.smd-chip { appearance: none; margin: 0; padding: 7px 12px; border: 1px solid rgba(29, 26, 22, .16); border-radius: 999px; background: var(--smd-card); color: var(--smd-ink); font: 500 12.5px/1.2 var(--smd-sans); white-space: nowrap; cursor: pointer; box-shadow: 0 6px 14px -10px rgba(0, 0, 0, .4); }
.smd-input { display: grid; grid-template-columns: minmax(0, 1fr) 28px; align-items: center; gap: 8px; height: 34px; padding: 0 3px 0 14px; border: 1px solid var(--smd-hair); border-radius: 999px; background: var(--smd-card); color: var(--smd-ink-3); font: 400 12.5px/1 var(--smd-sans); }
.smd-input > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.smd-input > .is-typed { color: var(--smd-ink); }
.smd-send { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #d9d3c7; color: #fff; }
.smd-send svg { width: 14px; height: 14px; }
.smd-send.is-on { background: var(--smd-me); color: var(--smd-gold-hi); }

/* ── a phone notification (api.banner): slides down from the top edge, newest on top, older ones pushed down ── */
.smd-bns { position: absolute; z-index: 8; left: 7px; right: 7px; top: calc(var(--pw, 300px) * .13); pointer-events: none; }
.smd-bn { position: absolute; left: 0; right: 0; top: 0; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 9px; align-items: start; padding: 9px 12px 10px 9px; border-radius: 16px; background: var(--smd-float-l); color: var(--smd-ink); text-align: left; box-shadow: 0 12px 24px -14px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(29, 26, 22, .07); transform: translateY(-140%); }
.smd-bn.is-dark { background: var(--smd-float-d); color: var(--smd-ivory); box-shadow: 0 12px 24px -14px rgba(0, 0, 0, .7), inset 0 0 0 1px rgba(200, 164, 106, .35); }
.smd-bn-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: #1d1b18; color: var(--smd-gold-hi); font: 500 14px/1 var(--smd-serif); }
.smd-bn-ic svg { width: 17px; height: 17px; }
.smd-bn-ic.is-light { background: #e9e3d7; color: #6c655a; }
.smd-bn-tx { display: grid; gap: 1px; min-width: 0; }
.smd-bn-h { display: flex; justify-content: space-between; gap: 8px; font: 500 11px/1.3 var(--smd-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--smd-ink-3); }
.smd-bn.is-dark .smd-bn-h { color: var(--smd-muted); }
.smd-bn-tx > b { font: 600 12px/1.3 var(--smd-sans); letter-spacing: -.005em; }
.smd-bn-b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font: 400 11.5px/1.36 var(--smd-sans); color: var(--smd-ink-2); }
.smd-bn.is-dark .smd-bn-b { color: var(--smd-muted); }

/* ── typed text (api.type): the whole text is laid out from the first frame and what isn't typed yet is clear, so
   nothing reflows; the caret sits between the two and takes no room ── */
.smd-untyped { color: transparent; }
/* typing shows whole words, the newest fading in (16 Nov: no per-letter jumps) */
@keyframes smd-tw { from { opacity: 0; } }
.smd-tw { animation: smd-tw .15s cubic-bezier(.33, 1, .68, 1) both; }
.smd-caret { position: relative; font-style: normal; }
.smd-caret::after { content: ""; position: absolute; left: -.75px; top: 0; bottom: 0; width: 1.5px; border-radius: 1px; background: #a8814a; opacity: 0; }
.smd-caret.is-on::after { opacity: 1; }
/* numbers that count (api.count): fixed width, right-aligned, tabular figures */
.smd-cnt { font-variant-numeric: tabular-nums; text-align: right; }
:where(span, b, strong, em, i, small, a).smd-cnt { display: inline-block; }
/* a status that changes words (api.pill): every label is stacked in one cell, so the pill is always as wide as its
   widest label and never changes size */
.smd-plw { display: inline-grid; }
.smd-plw > .smd-pl { grid-area: 1 / 1; }
.smd-plw > .smd-pl:not(.is-on) { opacity: 0; visibility: hidden; }

/* ── paper, buttons and lines ── */
.smd-paper { position: relative; background: var(--smd-paper); color: var(--smd-ink); border-radius: 3px; box-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 30px 60px -34px rgba(0, 0, 0, .85), 0 10px 24px -16px rgba(0, 0, 0, .55); }
.smd-sign { display: grid; gap: 4px; padding-top: 6px; border-top: 1px solid rgba(29, 26, 22, .35); font: 500 11px/1.2 var(--smd-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--smd-ink-2); }
.smd-btn { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; margin: 0; padding: 0 16px; border: 1px solid var(--smd-hair); border-radius: 10px; background: var(--smd-card); color: var(--smd-ink); font: 600 13px/1.1 var(--smd-sans); letter-spacing: -.005em; white-space: nowrap; cursor: pointer; }
.smd-btn.is-gold { border-color: transparent; background: var(--smd-gold-grad); color: #1a130b; box-shadow: 0 10px 22px -12px rgba(200, 164, 106, .7), inset 0 1px 0 rgba(255, 255, 255, .35); }
.smd-btn.is-dark { border-color: transparent; background: var(--smd-me); color: var(--smd-me-ink); }
.smd-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; background: rgba(29, 26, 22, .06); color: var(--smd-ink-2); font: 500 11px/1.1 var(--smd-mono); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.smd-pill.is-gold { background: rgba(200, 164, 106, .16); color: #8f6a36; }
.smd-wire { fill: none; stroke: var(--smd-gold); stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; opacity: .85; vector-effect: non-scaling-stroke; }
.smd-wire.is-dashed { stroke-dasharray: 3 5; opacity: .6; }

/* ── helpers ── */
.smd-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.smd-num { font-variant-numeric: tabular-nums; }
.smd-gold { color: var(--smd-gold-hi); }
.smd-frozen *, .smd-frozen *::before, .smd-frozen *::after { animation-play-state: paused !important; }

/* light pages: the words round the demo in dark ink */
.smd.is-light { color: var(--smd-ink); }
.smd.is-light .smd-ex { color: var(--smd-ink-2); }
.smd.is-light .smd-out, .smd.is-light .smd-sp-out { color: #8f6a36; }
.smd.is-light .smd-out { border-top-color: rgba(29, 26, 22, .12); }
.smd.is-light .smd-replay, .smd.is-light .smd-snd { border-color: rgba(29, 26, 22, .16); background: rgba(255, 255, 255, .6); color: var(--smd-ink-2); }

/* @journey-css ── The journey (demo-journey.js, and the home page's hero phone): Sarah's day on her own phone.
   Sized in em from the handset (font-size = 4.36% of the phone's width), so the same rules serve the library's 300px
   phone and the hero's 196–290px one. --jr-sb is the status bar's height (the host sets it). Everything is laid out
   from the first frame; the script only moves things with transform, opacity and clip-path. */
.smd-journey { --jr-sb: calc(var(--pw, 300px) * .15); --jr-q: cubic-bezier(.25, 1, .5, 1); position: absolute; inset: 0; z-index: 1; overflow: hidden; font-size: calc(var(--pw, 300px) * .0436); line-height: 1.36; letter-spacing: -.003em; color: #1d1a16; text-align: left; contain: strict; }
.smd-journey *, .smd-journey *::before, .smd-journey *::after { box-sizing: border-box; }
.smd-journey :where(p, b, small, span) { margin: 0; }
.smd-journey-em { position: absolute; left: 0; top: 0; width: 1px; height: 1em; visibility: hidden; pointer-events: none; }
/* a little stack: every state of a label in one cell, the current one showing (no size change, ever) */
.smd-journey-x { display: inline-grid; justify-items: center; align-items: center; }
.smd-journey-x > * { grid-area: 1 / 1; opacity: 0; transition: opacity .12s ease-in; }
.smd-journey-x > .is-on { opacity: 1; transition: opacity .28s var(--jr-q) .15s; }

/* the call: Sarah rings, Sophie answers, live captions */
.smd-journey-call { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; padding: calc(var(--jr-sb) + 1.15em) 1.15em 1.9em; color: #f2ede3; text-align: center; background: radial-gradient(120% 70% at 50% 16%, #4a4031 0%, #2a251e 44%, #141311 100%); }
.smd-journey-st { font: 500 max(11px, .74em)/1.3 var(--smd-mono, ui-monospace, monospace); letter-spacing: .12em; text-transform: uppercase; color: rgba(242, 237, 227, .62); }
.smd-journey-st > .is-b { color: #e3c68f; }
.smd-journey-nm { display: block; margin-top: .42em; font: 400 1.58em/1.12 var(--smd-serif, Georgia, serif); letter-spacing: -.012em; text-wrap: balance; }
.smd-journey-no { display: block; margin-top: .3em; font-size: max(11px, .82em); color: rgba(242, 237, 227, .6); font-variant-numeric: tabular-nums; }
.smd-journey-av { position: relative; display: grid; place-items: center; width: 3.9em; height: 3.9em; margin-top: 1.05em; }
.smd-journey-av > i { position: absolute; inset: -.45em; border-radius: 50%; border: 1px solid rgba(227, 198, 143, .3); }
.smd-journey-av > i + i { inset: -.95em; border-color: rgba(227, 198, 143, .14); }
.smd-journey-av > span { position: relative; display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: radial-gradient(circle at 30% 25%, #4b4335, #221f1a 72%); box-shadow: inset 0 0 0 1px rgba(200, 164, 106, .5); color: #e3c68f; font: 400 1.6em/1 var(--smd-serif, Georgia, serif); }
.smd-journey-pill { margin-top: 1.05em; padding: .32em .78em; border-radius: 999px; background: rgba(200, 164, 106, .17); box-shadow: inset 0 0 0 1px rgba(200, 164, 106, .38); color: #e3c68f; font: 500 max(11px, .7em)/1.2 var(--smd-mono, ui-monospace, monospace); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; font-variant-numeric: tabular-nums; opacity: 0; }
.smd-journey-cap { width: 100%; margin-top: .9em; opacity: 0; }
.smd-journey-cap > small { display: flex; align-items: center; justify-content: center; gap: .5em; font: 500 max(11px, .66em)/1.2 var(--smd-mono, ui-monospace, monospace); letter-spacing: .12em; text-transform: uppercase; color: rgba(242, 237, 227, .5); }
.smd-journey-cap > small::before { content: ""; width: .55em; height: .55em; border-radius: 50%; background: #e3c68f; }
.smd-journey-box { position: relative; margin-top: .45em; padding: .55em .75em .6em; border-radius: .9em; background: rgba(8, 7, 6, .42); box-shadow: inset 0 0 0 1px rgba(242, 237, 227, .08); text-align: left; }
.smd-journey-win { position: relative; height: calc(2 * 1.36 * max(11px, .9em)); overflow: hidden; }
.smd-journey-lines { position: relative; font-size: max(11px, .9em); line-height: 1.36; }
.smd-journey-u { margin: 0; }
.smd-journey-u > b { opacity: 0; transition: opacity .15s cubic-bezier(.33,1,.68,1); margin-right: .35em; font: 600 max(11px, .78em)/1 var(--smd-sans, system-ui, sans-serif); letter-spacing: .02em; text-transform: uppercase; color: rgba(242, 237, 227, .7); }
.smd-journey-u.is-s > b { color: #e3c68f; }
.smd-journey-u > span { opacity: 0; transition: opacity .15s cubic-bezier(.33,1,.68,1); }
.smd-journey-u > span.on, .smd-journey-u.on > b { opacity: 1; }
.smd-journey-ask { display: flex; flex-wrap: wrap; justify-content: center; gap: .36em; width: 100%; margin-top: .75em; }
.smd-journey-ask > small { flex: 0 0 100%; font: 500 max(11px, .64em)/1.2 var(--smd-mono, ui-monospace, monospace); letter-spacing: .12em; text-transform: uppercase; color: rgba(242, 237, 227, .5); opacity: 0; }
.smd-journey-ask > span { padding: .28em .62em; border-radius: 999px; background: rgba(242, 237, 227, .07); box-shadow: inset 0 0 0 1px rgba(242, 237, 227, .14); font-size: max(11px, .72em); line-height: 1.25; white-space: nowrap; opacity: 0; }
.smd-journey-ask > span > i { display: inline-block; width: .95em; height: .95em; vertical-align: -.14em; color: #e3c68f; }
.smd-journey-ask > span > i > svg { display: block; width: 100%; height: 100%; }
.smd-journey-btns { display: flex; align-items: center; justify-content: center; gap: 1.5em; margin-top: auto; opacity: .38; }
.smd-journey-btns > i { display: grid; place-items: center; width: 2.6em; height: 2.6em; border-radius: 50%; background: rgba(242, 237, 227, .12); }
.smd-journey-btns > i.is-end { width: 3em; height: 3em; background: #b0553d; }
.smd-journey-btns svg { width: 1.15em; height: 1.15em; }
.smd-journey-btns > i.is-end svg { transform: rotate(135deg); }

/* her messages: Hartwell's verified business line */
.smd-journey-app { position: absolute; inset: 0; display: flex; flex-direction: column; padding-top: var(--jr-sb); background: #f3f0e8; opacity: 0; visibility: hidden; }
.smd-journey-head { flex: none; display: grid; grid-template-columns: 1.6em minmax(0, 1fr) 1.6em; align-items: center; gap: .3em; padding: .05em .75em .55em; border-bottom: 1px solid #e2dcd0; background: #f3f0e8; }
.smd-journey-head > svg { width: 1.35em; height: 1.35em; color: #8a8276; }
.smd-journey-who { display: grid; justify-items: center; gap: .18em; min-width: 0; text-align: center; }
.smd-journey-who > i { display: grid; place-items: center; width: 2.15em; height: 2.15em; border-radius: 50%; background: radial-gradient(circle at 30% 25%, #34302a, #191714 70%); color: #e3c68f; font: 500 1.02em/1 var(--smd-serif, Georgia, serif); font-style: normal; box-shadow: inset 0 0 0 1px rgba(200, 164, 106, .55); }
.smd-journey-who > b { display: inline-flex; align-items: center; gap: .25em; max-width: 100%; font-size: max(11px, .9em); font-weight: 600; line-height: 1.2; letter-spacing: -.005em; white-space: nowrap; }
.smd-journey-who > b > svg { flex: none; width: 1em; height: 1em; color: #a8814a; }
.smd-journey-th { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.smd-journey-cmp { flex: none; display: grid; grid-template-columns: 1.6em minmax(0, 1fr); align-items: center; gap: .5em; padding: .5em .75em 2.05em; border-top: 1px solid #e2dcd0; background: #f3f0e8; }
.smd-journey-cmp > svg { width: 1.3em; height: 1.3em; color: #a8814a; }
.smd-journey-cmp > span { display: flex; align-items: center; height: 2.2em; padding: 0 .85em; border-radius: 999px; background: #fffdf8; box-shadow: inset 0 0 0 1px #e2dcd0; font-size: max(11px, .86em); color: #9b9387; }
.smd-journey-th.is-scroll { overflow-y: auto; scrollbar-width: none; }
.smd-journey-th.is-scroll::-webkit-scrollbar { display: none; }
.smd-journey-in { position: absolute; left: .8em; right: .8em; top: 0; display: flex; flex-direction: column; padding-bottom: .7em; }
.smd-journey-th.is-scroll > .smd-journey-in { position: relative; left: auto; right: auto; margin: 0 .8em; transform: none !important; }
.smd-journey-in > * { flex: none; margin-top: .55em; opacity: 0; }
.smd-journey-day { align-self: center; font-size: max(11px, .74em); line-height: 1.2; color: #6c655a; font-variant-numeric: tabular-nums; }
.smd-journey-day > b { font-weight: 600; }
.smd-journey-b { align-self: flex-start; max-width: 86%; padding: .5em .75em .55em; border-radius: 1.2em 1.2em 1.2em .38em; background: #e6e1d6; font-size: max(11px, .88em); line-height: 1.32; overflow-wrap: anywhere; }
.smd-journey-b > p + p { margin-top: .35em; }
.smd-journey-card { display: grid; grid-template-columns: 2.3em minmax(0, 1fr); align-items: center; gap: .15em .6em; margin: .45em 0 .4em; padding: .5em .55em; border-radius: .85em; background: #fffdf8; box-shadow: inset 0 0 0 1px rgba(29, 26, 22, .08); }
.smd-journey-card > i { grid-row: span 2; display: grid; place-items: center; width: 2.3em; height: 2.3em; border-radius: .6em; background: #1d1b18; color: #e3c68f; font-style: normal; }
.smd-journey-card > i > svg { width: 1.15em; height: 1.15em; }
.smd-journey-card > b { min-width: 0; font-size: max(11px, .92em); font-weight: 600; line-height: 1.2; }
.smd-journey-card > small { min-width: 0; font-size: max(11px, .8em); line-height: 1.2; color: #8a8276; overflow-wrap: anywhere; }
.smd-journey-pay { grid-column: 1 / -1; display: grid; margin-top: .35em; }
.smd-journey-pay > span { display: flex; align-items: center; justify-content: center; gap: .35em; height: 2.15em; border-radius: .6em; font-size: max(11px, .92em); font-weight: 600; }
.smd-journey-pay > .is-a { background: #201d19; color: #f6f1e7; }
.smd-journey-pay > .is-b { background: rgba(200, 164, 106, .2); color: #7d5c2c; box-shadow: inset 0 0 0 1px rgba(168, 129, 74, .35); }
.smd-journey-pay svg { width: 1em; height: 1em; }
.smd-journey-trk { grid-template-columns: 3.1em minmax(0, 1fr); }
.smd-journey-trk > i { width: 3.1em; height: 3.1em; overflow: hidden; background: #ebe5d8; }
.smd-journey-trk > i > svg { width: 100%; height: 100%; }
.smd-journey-trk > .smd-journey-x { grid-row: span 2; justify-items: start; }
.smd-journey-trk > .smd-journey-x > span { display: grid; gap: .12em; }
.smd-journey-trk > .smd-journey-x b { font-size: max(11px, .92em); font-weight: 600; line-height: 1.2; }
.smd-journey-trk > .smd-journey-x small { font-size: max(11px, .8em); line-height: 1.2; color: #8a8276; }
.smd-journey-trk > .smd-journey-x > .is-b b { color: #7d5c2c; }
.smd-journey-inv { align-self: flex-start; display: grid; gap: .3em; width: 86%; padding: .6em .75em .65em; border-radius: 1em; background: #fffdf8; box-shadow: inset 0 0 0 1px rgba(29, 26, 22, .08), 0 .6em 1.2em -1em rgba(0, 0, 0, .4); font-size: max(11px, .88em); line-height: 1.25; }
.smd-journey-inv > small { font: 500 max(11px, .78em)/1.2 var(--smd-mono, ui-monospace, monospace); letter-spacing: .08em; text-transform: uppercase; color: #8a8276; }
.smd-journey-inv > p { display: flex; justify-content: space-between; gap: .6em; font-variant-numeric: tabular-nums; }
.smd-journey-inv > p > span:last-child { white-space: nowrap; }
.smd-journey-inv > p.is-paid { padding-top: .35em; border-top: 1px solid #e2dcd0; font-weight: 600; color: #7d5c2c; }
.smd-journey-inv > p.is-paid svg { display: inline-block; width: .95em; height: .95em; margin-left: .1em; vertical-align: -.12em; }
.smd-journey-inv > em { font-size: max(11px, .84em); font-style: normal; color: #8a8276; }
.smd-journey-rv { display: grid; gap: .35em; margin-top: .5em; }
.smd-journey-rv > span { display: flex; align-items: center; justify-content: center; gap: .4em; height: 2.1em; border-radius: .6em; background: #fffdf8; box-shadow: inset 0 0 0 1px rgba(29, 26, 22, .1); font-size: max(11px, .92em); font-weight: 600; white-space: nowrap; }
.smd-journey-rv svg { width: 1em; height: 1em; color: #c6943f; }
/* the live map: grows out of the Track card */
.smd-journey-map { position: absolute; left: .8em; right: .8em; bottom: .7em; height: 60%; overflow: hidden; border-radius: 1em; background: #ebe5d8; box-shadow: inset 0 0 0 1px rgba(29, 26, 22, .1); visibility: hidden; }
.smd-journey-mapin > svg { position: absolute; left: 0; top: 0; width: 100%; height: calc(100% - 2.2em); }
.smd-journey-mapin { position: absolute; inset: 0; }
.smd-journey-van { position: absolute; left: 0; top: 0; width: 1.7em; height: 1.7em; margin: -.85em 0 0 -.85em; border-radius: 50%; display: grid; place-items: center; background: #1d1b18; color: #e3c68f; box-shadow: 0 0 0 .22em rgba(255, 253, 248, .9), 0 .3em .7em -.2em rgba(0, 0, 0, .5); }
.smd-journey-van > svg { width: 1em; height: 1em; }
.smd-journey-eta { position: absolute; left: .6em; top: .6em; padding: .3em .6em; border-radius: 999px; background: #1d1b18; color: #f2ede3; font: 600 max(11px, .78em)/1.2 var(--smd-sans, system-ui, sans-serif); white-space: nowrap; font-variant-numeric: tabular-nums; }
.smd-journey-eta::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(135deg, #c8a46a, #e3c68f); opacity: 0; transition: opacity .3s var(--jr-q); }
.smd-journey-eta.is-gold::before { opacity: 1; }
.smd-journey-eta > .smd-journey-x { position: relative; }
.smd-journey-eta > .smd-journey-x > :last-child { color: #1b140a; }
.smd-journey-mf { position: absolute; left: 0; right: 0; bottom: 0; height: 2.2em; display: flex; align-items: center; gap: .35em; padding: 0 .6em; background: #fffdf8; border-top: 1px solid rgba(29, 26, 22, .08); color: #6c655a; white-space: nowrap; overflow: hidden; }
.smd-journey-mf > * { font-size: max(11px, .78em); }
.smd-journey-mf > b { color: #1d1a16; font-weight: 600; }
/* the pay sheet, the mail banner */
.smd-journey-dim { position: absolute; inset: 0; background: rgba(20, 18, 15, .3); opacity: 0; visibility: hidden; }
.smd-journey-sheet { position: absolute; left: 0; right: 0; bottom: 0; display: grid; gap: .5em; padding: .65em 1.05em 2.1em; border-radius: 1.3em 1.3em 0 0; background: #fffdf8; box-shadow: 0 -1.2em 2em -1.4em rgba(0, 0, 0, .45); transform: translateY(104%); visibility: hidden; }
.smd-journey-sheet > i { justify-self: center; width: 2.6em; height: .28em; border-radius: 1em; background: #d9d3c7; }
.smd-journey-sheet > p { display: grid; grid-template-columns: 1.9em minmax(0, 1fr); align-items: center; gap: .55em; padding-bottom: .55em; border-bottom: 1px solid #e2dcd0; }
.smd-journey-sheet > p > i { display: grid; place-items: center; width: 1.9em; height: 1.9em; border-radius: 50%; background: #1d1b18; color: #e3c68f; font: 500 max(11px, .95em)/1 var(--smd-serif, Georgia, serif); font-style: normal; }
.smd-journey-sheet > p > span { display: grid; gap: .1em; min-width: 0; }
.smd-journey-sheet > p b { font-size: max(11px, .88em); font-weight: 600; line-height: 1.2; }
.smd-journey-sheet > p small { font-size: max(11px, .78em); line-height: 1.2; color: #8a8276; }
.smd-journey-amt { font: 400 2em/1 var(--smd-serif, Georgia, serif); letter-spacing: -.02em; font-variant-numeric: lining-nums; }
.smd-journey-sbtn { display: grid; }
.smd-journey-sbtn > span { display: flex; align-items: center; justify-content: center; gap: .4em; height: 2.6em; border-radius: .75em; font-size: max(11px, .95em); font-weight: 600; }
.smd-journey-sbtn > .is-a { background: #201d19; color: #f6f1e7; }
.smd-journey-sbtn > .is-b { background: linear-gradient(135deg, #c8a46a, #e3c68f); color: #1b140a; }
.smd-journey-sbtn svg { width: 1.05em; height: 1.05em; }
.smd-journey-bn { position: absolute; z-index: 3; left: .55em; right: .55em; top: calc(var(--jr-sb) - .15em); display: grid; grid-template-columns: 2.2em minmax(0, 1fr); gap: .6em; align-items: center; padding: .6em .8em .65em .6em; border-radius: 1.15em; background: rgba(255, 253, 248, .97); box-shadow: 0 .9em 1.6em -1em rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(29, 26, 22, .07); transform: translateY(calc(-100% - var(--jr-sb))); visibility: hidden; }
.smd-journey-bn > i { display: grid; place-items: center; width: 2.2em; height: 2.2em; border-radius: .55em; background: #1d1b18; color: #e3c68f; }
.smd-journey-bn > i > svg { width: 1.2em; height: 1.2em; }
.smd-journey-bn > span { display: grid; gap: .05em; min-width: 0; }
.smd-journey-bn small { display: flex; justify-content: space-between; font: 500 max(11px, .66em)/1.3 var(--smd-mono, ui-monospace, monospace); letter-spacing: .08em; text-transform: uppercase; color: #9b9387; }
.smd-journey-bn b { font-size: max(11px, .84em); font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; }
.smd-journey-bn em { font-size: max(11px, .8em); font-style: normal; line-height: 1.25; color: #6c655a; }
@media (prefers-reduced-motion: reduce) { .smd-journey-x > *, .smd-journey-u > span, .smd-journey-eta::before { transition: none !important; } }
/* @journey-css-end */

/* phones: a slightly smaller handset on the narrowest screens, so the page never scrolls sideways */
@media (max-width: 360px) {
  .smd { --smd-phone-w: 272px; }
  .smd-foot { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .smd-tap, .smd-tip, .smd-replay, .smd-ring, .smd-s, .smd-s > i, .smd-sn > span, .smd-sn::after, .smd-out, .smd-sp-dot, .smd-sp-dot::after, .smd-sp-seg > b, .smd-sp-cap > span { transition: none !important; }
  .smd-hint > .smd-ring::after { animation: none; }
  .smd-typing i { animation: none; opacity: .6; }
}

/* ═══ @ios-kit (16 Nov, v3): every device screen at native-iOS fidelity ══════════════════════════════════════════
   Sam (16 Nov, on the journey): "not clean… not super modern… blocks broken re numbers". Inside a phone, tablet or
   browser it is a real app now: SF Pro (Inter where SF isn't installed), a real type scale (17/15/13/11 pt at the
   phone's scale), tabular figures everywhere, iOS greys and hairlines, no beige, no mono caps. The brand's gold stays
   an accent only (merchant marks, the odd highlight). Outgoing bubbles and primary buttons are deep charcoal (#1c1c1e,
   the premium choice against the dark site, and it keeps the gold accent the only colour); incoming are #e9e9eb.
   Everything below overrides the rules above by order only, so a demo's own rules (one class deeper) still win. ── */
:root {
  --smd-ios: -apple-system, "SF Pro Text", "SF Pro Display", BlinkMacSystemFont, "Inter", system-ui, "Segoe UI", Roboto, sans-serif;
  --smd-screen: #f2f2f7;
  --smd-card: #ffffff;
  --smd-ink: #0b0b0c;
  --smd-ink-2: #6e6e73;
  --smd-ink-3: #a1a1a6;
  --smd-hair: #e3e3e8;
  --smd-them: #e9e9eb;
  --smd-me: #1c1c1e;
  --smd-me-ink: #ffffff;
  --smd-ok: #1f7a37;
  --smd-ok-bg: #e8f6ec;
  --smd-blue: #007aff;
  --smd-float-l: rgba(247, 247, 249, .97);
  --smd-float-d: rgba(30, 30, 32, .96);
  --smd-spring: cubic-bezier(.3, 1.3, .55, 1);
}
/* inside a device: the system font for everything (the site's own faces stay outside), tabular figures */
.smd-screen, .smd-browser, .smd-bns, .smd-echo {
  --smd-sans: var(--smd-ios); --smd-mono: var(--smd-ios);
  font-family: var(--smd-ios); font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
/* the phone's type scale, at its own size (a 390 pt iPhone drawn --pw wide): 17 body, 15 sub, 13 foot, 11 caption */
.smd-phone { --t17: max(12px, calc(var(--pw) * .0436)); --t15: max(11.5px, calc(var(--pw) * .0385)); --t13: max(11.5px, calc(var(--pw) * .0337)); --t11: max(11px, calc(var(--pw) * .0287)); }
/* figures line up wherever they're figures (times, prices, totals, counts); prose keeps Inter's own spacing */
.smd-status-t, .smd-day, .smd-meta, .smd-pill, .smd-bn-h, .smd-echo-h, .smd-input, .smd-btn, .smd-chip, .smd-cnt, .smd-num { font-variant-numeric: tabular-nums; }
.smd-phone.is-dark > .smd-screen { background: #000; color: #fff; }
.smd-phone.is-dark .smd-home { background: rgba(255, 255, 255, .78); }
.smd-home { height: 4.5px; width: 35%; background: rgba(0, 0, 0, .86); }
.smd-status { font-weight: 600; letter-spacing: -.02em; }

/* messages: a white thread, an iOS navigation bar, bubbles with tails (only the last of a group has one) */
.smd-screen:has(> .smd-thread), .smd-screen:has(> .smd-apphead) { background: #fff; }
.smd-apphead { background: rgba(249, 249, 249, .97); border-bottom: 1px solid rgba(60, 60, 67, .16); padding-bottom: 8px; }
.smd-apphead > svg { color: var(--smd-blue); }
.smd-apphead-who b { font: 500 var(--t13, 10.5px)/1.2 var(--smd-ios); letter-spacing: -.01em; }
.smd-apphead-who small { font: 400 var(--t11, 9px)/1.2 var(--smd-ios); color: var(--smd-ink-2); }
.smd-av { background: linear-gradient(160deg, #2c2c2e, #0b0b0c); color: var(--smd-gold-hi); font: 600 15px/1 var(--smd-ios); letter-spacing: -.01em; box-shadow: inset 0 0 0 1px rgba(200, 164, 106, .45); }
.smd-thread { --smd-tail-bg: #fff; background: #fff; }
.smd-thread-in > * { margin-top: 6px; }
.smd-bub { max-width: 78%; padding: 7px 12px 8px; border-radius: 18px; font: 400 var(--t17, 13px)/1.3 var(--smd-ios); letter-spacing: -.012em; }
.smd-bub.is-in { background: var(--smd-them); color: #000; }
.smd-screen .smd-bub.is-in { border-bottom-left-radius: 18px; }
.smd-bub.is-out { background: var(--smd-me); color: var(--smd-me-ink); }
.smd-screen .smd-bub.is-out { border-bottom-right-radius: 18px; }
/* tails: only inside a phone's screen (a white thread), never on the dark page */
.smd-screen .smd-bub::before, .smd-screen .smd-bub::after { content: ""; position: absolute; bottom: 0; height: 18px; pointer-events: none; }
.smd-screen .smd-bub.is-in::before { left: -6px; width: 18px; background: var(--smd-them); border-bottom-right-radius: 15px 13px; }
.smd-screen .smd-bub.is-in::after { left: -24px; width: 24px; background: var(--smd-tail-bg, #fff); border-bottom-right-radius: 9px; }
.smd-screen .smd-bub.is-out::before { right: -6px; width: 18px; background: var(--smd-me); border-bottom-left-radius: 15px 13px; }
.smd-screen .smd-bub.is-out::after { right: -24px; width: 24px; background: var(--smd-tail-bg, #fff); border-bottom-left-radius: 9px; }
.smd-bub.is-in:has(+ .smd-bub.is-in)::before, .smd-bub.is-in:has(+ .smd-bub.is-in)::after,
.smd-bub.is-out:has(+ .smd-bub.is-out)::before, .smd-bub.is-out:has(+ .smd-bub.is-out)::after { display: none; }
.smd-typing { background: var(--smd-them); border-radius: 18px; }
.smd-typing i { background: #8e8e93; }
.smd-day { font: 500 var(--t11, 9.5px)/1.25 var(--smd-ios); color: #8a8a8e; letter-spacing: 0; }
.smd-day b { font-weight: 600; }
.smd-meta { font: 500 var(--t11, 9.5px)/1.2 var(--smd-ios); color: #8a8a8e; }
/* what the system did: one quiet line in sentence case (never mono caps) */
.smd-note { gap: 6px; padding: 5px 11px 5px 9px; font-variant-numeric: normal; background: #1c1c1e; color: #f5f5f7; font: 500 var(--t11, 10px)/1.2 var(--smd-ios); letter-spacing: -.003em; text-transform: none; box-shadow: 0 6px 14px -10px rgba(0, 0, 0, .55); }
.smd-note > i { width: 6px; height: 6px; background: var(--smd-gold-hi); }
.smd-note > svg { color: var(--smd-gold-hi); }
.smd-sys, .smd-card { border-color: rgba(60, 60, 67, .12); background: #fff; color: #000; box-shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 8px 20px -14px rgba(0, 0, 0, .28); }
.smd-card { border-radius: 16px; }
.smd-card b, .smd-sys b { font-family: var(--smd-ios); font-weight: 600; letter-spacing: -.01em; }
.smd-card small, .smd-sys small { color: var(--smd-ink-2); }
.smd-card.is-dark { border-color: rgba(255, 255, 255, .08); background: #1c1c1e; color: #fff; box-shadow: 0 10px 22px -16px rgba(0, 0, 0, .6); }
.smd-card.is-dark small { color: rgba(235, 235, 245, .6); }
.smd-ic { background: #f2f2f7; color: #3c3c43; }
.smd-card .smd-ic { border-radius: 10px; }
.smd-ic.is-gold, .smd-card.is-dark .smd-ic { background: linear-gradient(160deg, #2c2c2e, #0b0b0c); color: var(--smd-gold-hi); }
.smd-ic.is-alert { background: #ffecea; color: #d70015; }
.smd-compose { background: rgba(249, 249, 249, .97); border-top: 1px solid rgba(60, 60, 67, .12); }
.smd-chip { border-color: rgba(60, 60, 67, .18); background: #fff; color: #000; font: 600 var(--t15, 12px)/1.2 var(--smd-ios); letter-spacing: -.01em; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.smd-input { border-color: #d1d1d6; background: #fff; color: #a1a1a6; font: 400 var(--t15, 12px)/1 var(--smd-ios); }
.smd-input > .is-typed { color: #000; }
.smd-send { background: #d1d1d6; }
.smd-send.is-on { background: var(--smd-me); color: #fff; }
/* buttons and pills: iOS weights, sentence case */
.smd-btn { min-height: 40px; border-radius: 12px; border-color: rgba(60, 60, 67, .16); background: #fff; color: #000; font: 600 13px/1.1 var(--smd-ios); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.smd-btn.is-dark { background: var(--smd-me); color: #fff; }
.smd-pill { padding: 3px 8px; background: #f2f2f7; color: #3c3c43; font: 600 11px/1.2 var(--smd-ios); letter-spacing: -.003em; text-transform: none; }
.smd-pill.is-gold { background: rgba(200, 164, 106, .18); color: #7a5a26; }
.smd-num, .smd-cnt { font-variant-numeric: tabular-nums; white-space: nowrap; }
/* a price, a time or a total never wraps or splits */
.smd-price, .smd-amt { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* a notification (api.banner): iOS glass, an app icon, the app's name in sentence case, "now" in grey; it springs in.
   Parked well above the screen (never a sliver showing over the status bar) */
.smd-bns { left: 2.4%; right: 2.4%; top: calc(var(--pw, 300px) * .145); }
.smd-bn { grid-template-columns: 2.55em minmax(0, 1fr); gap: .7em; align-items: center; padding: .8em .95em .85em .8em; border-radius: 1.55em; background: rgba(245, 245, 247, .985); color: #000; font-size: var(--t15, 11.5px); box-shadow: 0 .9em 2em -.7em rgba(0, 0, 0, .36), 0 0 0 .5px rgba(0, 0, 0, .08); transform: translateY(calc(-100% - 80px)); }
.smd-bn.is-dark { background: rgba(30, 30, 32, .98); color: #fff; box-shadow: 0 .9em 2em -.7em rgba(0, 0, 0, .7), inset 0 0 0 .5px rgba(255, 255, 255, .12); }
.smd-bn-ic { width: 2.55em; height: 2.55em; border-radius: .6em; background: linear-gradient(160deg, #2c2c2e, #0b0b0c); color: var(--smd-gold-hi); font: 600 1.05em/1 var(--smd-ios); box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .12); }
.smd-bn-ic svg { width: 58%; height: 58%; }
.smd-bn-ic.is-mail { background: linear-gradient(180deg, #2a9cff, #0a64e8); color: #fff; }
.smd-bn-ic.is-messages, .smd-bn-ic.is-sms, .smd-bn-ic.is-calls, .smd-bn-ic.is-phone { background: linear-gradient(180deg, #67e36c, #2cb84c); color: #fff; }
.smd-bn-ic.is-calendar { background: #fff; color: #ff3b30; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .14); }
.smd-bn-ic.is-star { background: linear-gradient(160deg, #e3c68f, #b98d4c); color: #fff; }
.smd-bn-ic.is-map { background: linear-gradient(180deg, #8bd38f, #3fae5a); color: #fff; }
.smd-bn-ic.is-light { background: #fff; color: #3c3c43; }
.smd-bn-tx { gap: .08em; }
.smd-bn-h { align-items: baseline; font: 500 max(11px, .86em)/1.25 var(--smd-ios); letter-spacing: -.003em; text-transform: none; color: #6e6e73; }
.smd-bn-h > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.smd-bn-h > span:last-child { flex: none; color: #8a8a8e; font-weight: 400; }
.smd-bn.is-dark .smd-bn-h { color: rgba(235, 235, 245, .6); }
.smd-bn-tx > b { font: 600 1em/1.28 var(--smd-ios); letter-spacing: -.012em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.smd-bn-b { font: 400 1em/1.3 var(--smd-ios); letter-spacing: -.008em; color: inherit; }
.smd-bn.is-dark .smd-bn-b { color: rgba(255, 255, 255, .92); }

/* the owner's side (api.echo): a real notification on Dan's phone (dark glass, a gold app tile), never mono caps */
.smd-echo { gap: 2px; padding: 11px 14px 12px; border-radius: 18px; font: 400 12px/1.35 var(--smd-ios); letter-spacing: -.006em; }
.smd-echo.is-owner { background: rgba(28, 28, 30, .97); color: #fff; box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .14), 0 0 0 1px rgba(200, 164, 106, .3), 0 20px 36px -18px rgba(0, 0, 0, .85); }
.smd-echo.is-customer { background: rgba(247, 247, 249, .98); color: #000; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .1), 0 20px 36px -18px rgba(0, 0, 0, .7); }
.smd-echo-h { gap: 7px; margin-bottom: 2px; font: 500 11px/1.25 var(--smd-ios); letter-spacing: 0; text-transform: none; }
.smd-echo-h::before { width: 16px; height: 16px; border-radius: 4.5px; background: linear-gradient(160deg, #e3c68f, #b98d4c); box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .25); }
.smd-echo.is-owner .smd-echo-h { color: rgba(235, 235, 245, .62); }
.smd-echo.is-customer .smd-echo-h { color: #6e6e73; }
.smd-echo-t { font: 600 13px/1.3 var(--smd-ios); letter-spacing: -.012em; }
.smd-echo.is-owner .smd-echo-b { color: rgba(235, 235, 245, .8); }
.smd-echo.is-customer .smd-echo-b { color: #3c3c43; }
.smd-echo-m { font: 500 11px/1.3 var(--smd-ios); }
/* on a phone the other phone's card is always centred over the device, whole and on screen */
@media (max-width: 600px) {
  .smd .smd-echoes, .smd.smd-wide .smd-echoes, .smd.smd-on .smd-echoes, .smd.smd-on.smd-wide .smd-echoes { left: 50% !important; right: auto !important; width: min(250px, 90%) !important; transform: translateX(-50%) !important; }
}

/* taps: the tip in sentence case */
.smd-tip { padding: 6px 10px; border-radius: 9px; background: #1c1c1e; color: #fff; font: 600 11px/1 var(--smd-ios); letter-spacing: -.003em; text-transform: none; box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .6), 0 0 0 1px rgba(200, 164, 106, .35); }
.smd-tip::after { background: #1c1c1e; }

/* a browser: Safari's light chrome */
.smd-bar { background: #f6f6f8; border-bottom-color: rgba(60, 60, 67, .12); }
.smd-dots i { background: #d1d1d6; }
.smd-url { background: #ececf0; color: #3c3c43; font: 500 11px/1 var(--smd-ios); }

/* ── the journey (and the new-lead demo, which mounts it), at the same fidelity ── */
.smd-journey { letter-spacing: -.01em; color: #000; font-family: var(--smd-ios); }
/* tabular figures only on figures: Inter's tabular set spaces hyphens out ("Call - out"), so never on prose */
.smd-journey-no, .smd-journey-pill, .smd-journey-day, .smd-journey-eta, .smd-journey-bn small > span:last-child { font-variant-numeric: tabular-nums; }
/* the call: iOS's call screen. Graphite, a big name, a quiet subtitle, glass captions, round buttons */
.smd-journey-call { padding-top: calc(var(--jr-sb) + 1.6em); color: #fff; background: radial-gradient(140% 75% at 50% 4%, #4a4a4f 0%, #26262a 42%, #0e0e10 100%); }
.smd-journey-st { font: 400 max(11px, .9em)/1.3 var(--smd-ios); letter-spacing: -.005em; text-transform: none; color: rgba(235, 235, 245, .62); }
.smd-journey-st > .is-b { color: rgba(235, 235, 245, .7); }
.smd-journey-nm { margin-top: .22em; font: 400 1.82em/1.08 var(--smd-ios); letter-spacing: -.028em; }
.smd-journey-no { margin-top: .32em; font-size: max(11px, .9em); color: rgba(235, 235, 245, .6); }
.smd-journey-av { width: 4.1em; height: 4.1em; margin-top: 1.1em; }
.smd-journey-av > i { border-color: rgba(255, 255, 255, .16); }
.smd-journey-av > i + i { border-color: rgba(255, 255, 255, .07); }
.smd-journey-av > span { background: linear-gradient(160deg, #3a3a3e, #121214); box-shadow: inset 0 0 0 1px rgba(200, 164, 106, .5); color: #e3c68f; font: 600 1.55em/1 var(--smd-ios); letter-spacing: -.02em; }
.smd-journey-pill { margin-top: 1em; padding: .38em .85em; background: rgba(255, 255, 255, .14); box-shadow: none; color: #fff; font: 500 max(11px, .78em)/1.2 var(--smd-ios); letter-spacing: -.003em; text-transform: none; }
.smd-journey-cap { margin-top: 1em; }
.smd-journey-cap > small { gap: .45em; font: 500 max(11px, .74em)/1.2 var(--smd-ios); letter-spacing: -.003em; text-transform: none; color: rgba(235, 235, 245, .6); }
.smd-journey-cap > small::before { width: .5em; height: .5em; background: #30d158; }
.smd-journey-box { margin-top: .5em; padding: .65em .85em .7em; border-radius: 1.05em; background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .14); }
.smd-journey-u > b { margin-right: .4em; font: 600 max(11px, .82em)/1 var(--smd-ios); letter-spacing: -.003em; text-transform: none; color: rgba(235, 235, 245, .6); }
.smd-journey-u.is-s > b { color: #e3c68f; }
.smd-journey-ask { gap: .4em; margin-top: .85em; }
.smd-journey-ask > small { font: 500 max(11px, .74em)/1.2 var(--smd-ios); letter-spacing: -.003em; text-transform: none; color: rgba(235, 235, 245, .6); }
.smd-journey-ask > span { padding: .34em .7em; background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .16); font-size: max(11px, .76em); font-weight: 500; }
.smd-journey-ask > span > i { color: #30d158; font-weight: 700; }
.smd-journey-btns { gap: 1.6em; opacity: 1; }
.smd-journey-btns > i { width: 2.85em; height: 2.85em; background: rgba(255, 255, 255, .16); color: #fff; }
.smd-journey-btns > i.is-end { width: 3.15em; height: 3.15em; background: #ff3b30; }
.smd-journey-btns svg { width: 1.2em; height: 1.2em; }
/* her messages: white, an iOS bar, grey bubbles with tails, rich link cards */
.smd-journey-app { background: #fff; color: #000; }
.smd-journey-head { padding: .1em .75em .6em; border-bottom: 1px solid rgba(60, 60, 67, .14); background: rgba(249, 249, 249, .98); }
.smd-journey-head > svg { color: #007aff; }
.smd-journey-who { gap: 8px; }
.smd-journey-who > i { width: 2.3em; height: 2.3em; background: linear-gradient(160deg, #3a3a3e, #0b0b0c); color: #e3c68f; font: 600 1em/1 var(--smd-ios); box-shadow: inset 0 0 0 1px rgba(200, 164, 106, .45); }
.smd-journey-who > b { font-size: max(11px, .78em); font-weight: 500; letter-spacing: -.005em; }
.smd-journey-who > b > svg { color: #c8a46a; }
.smd-journey-cmp { grid-template-columns: 1.95em minmax(0, 1fr); gap: .55em; border-top: 0; background: #fff; }
.smd-journey-cmp > svg { box-sizing: content-box; width: 1.05em; height: 1.05em; padding: .45em; border-radius: 50%; background: #e9e9eb; color: #8a8a8e; }
.smd-journey-cmp > span { height: 2.25em; padding: 0 .9em; background: #fff; box-shadow: inset 0 0 0 1px #d1d1d6; font-size: max(11px, .9em); color: #a1a1a6; }
.smd-journey-in > * { margin-top: .5em; }
.smd-journey-day { margin-top: .9em; font-size: max(11px, .7em); font-weight: 500; color: #8a8a8e; }
.smd-journey-day > b { font-weight: 600; }
.smd-journey-b { position: relative; max-width: 80%; padding: .48em max(10.5px, .8em) .52em; border-radius: 1.3em; background: #e9e9eb; color: #000; font-size: max(11px, .95em); line-height: 1.3; letter-spacing: -.012em; }
.smd-journey-b::before, .smd-journey-b::after { content: ""; position: absolute; bottom: 0; height: 1.3em; pointer-events: none; }
.smd-journey-b::before { left: -.42em; width: 1.3em; background: #e9e9eb; border-bottom-right-radius: 1.1em .95em; }
.smd-journey-b::after { left: -1.7em; width: 1.7em; background: #fff; border-bottom-right-radius: .66em; }
/* a group: consecutive pieces from the same sender, 2 px apart; only the last bubble has a tail */
.smd-journey-g { align-self: stretch; display: flex; flex-direction: column; align-items: flex-start; gap: .16em; }
.smd-journey-g > .smd-journey-b:not(:last-child)::before, .smd-journey-g > .smd-journey-b:not(:last-child)::after { display: none; }
/* a rich link (iOS's link preview, made for paying): who it's from, what for and how much, one button */
.smd-journey-lk { display: grid; width: 86%; overflow: hidden; border: 1px solid rgba(60, 60, 67, .14); border-radius: 1.15em; background: #fff; box-shadow: 0 .5em 1.2em -.9em rgba(0, 0, 0, .35); font-size: max(11px, .95em); }
.smd-journey-lk-h { display: grid; grid-template-columns: 2.15em minmax(0, 1fr) auto; align-items: center; gap: .6em; padding: .62em max(10.5px, .75em); background: #f6f6f8; border-bottom: 1px solid rgba(60, 60, 67, .1); }
.smd-journey-lk-h > i { display: grid; place-items: center; width: 2.15em; height: 2.15em; border-radius: .55em; background: linear-gradient(160deg, #3a3a3e, #0b0b0c); color: #e3c68f; font: 600 1em/1 var(--smd-ios); font-style: normal; box-shadow: inset 0 0 0 1px rgba(200, 164, 106, .4); }
.smd-journey-lk-h > span { display: grid; gap: .1em; min-width: 0; }
.smd-journey-lk-h b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: max(11px, .86em); font-weight: 600; line-height: 1.2; letter-spacing: -.01em; }
.smd-journey-lk-h small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: max(11px, .74em); line-height: 1.2; color: #8a8a8e; }
.smd-journey-lk-h > svg { width: .95em; height: .95em; color: #8a8a8e; }
.smd-journey-lk-r { display: flex; align-items: center; justify-content: space-between; gap: .6em; padding: .7em max(10.5px, .8em) .6em; }
.smd-journey-lk-r > span { display: grid; gap: .12em; min-width: 0; }
.smd-journey-lk-r > span > b { font-size: max(11px, .88em); font-weight: 600; line-height: 1.2; }
.smd-journey-lk-r > span > small { font-size: max(11px, .76em); line-height: 1.25; color: #8a8a8e; }
.smd-journey-lk-amt { flex: none; font-size: 1.32em; font-weight: 600; line-height: 1; letter-spacing: -.025em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.smd-journey-lk > .smd-journey-pay { display: grid; justify-items: stretch; margin: 0 max(10.5px, .7em) .7em; }
.smd-journey-lk > .smd-journey-pay > span { width: 100%; }
.smd-journey-pay > span { gap: .4em; height: 2.35em; border-radius: .72em; font-size: max(11px, .9em); font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.smd-journey-pay > .is-a { background: #000; color: #fff; }
.smd-journey-pay > .is-b { background: #e8f6ec; color: #1f7a37; box-shadow: none; }
.smd-journey-pay svg { width: 1.05em; height: 1.05em; }
/* the tracking link: a map preview on top, who and when underneath */
.smd-journey-lk.smd-journey-trk { grid-template-columns: minmax(0, 1fr); }
.smd-journey-lk.smd-journey-trk > i { grid-row: auto; display: block; width: auto; height: 5.4em; border-radius: 0; overflow: hidden; background: #eef0ea; border-bottom: 1px solid rgba(60, 60, 67, .1); }
.smd-journey-lk.smd-journey-trk > i > svg { display: block; width: 100%; height: 100%; }
.smd-journey-lk.smd-journey-trk > .smd-journey-x { grid-row: auto; justify-items: start; padding: .6em .8em .68em; }
.smd-journey-lk.smd-journey-trk > .smd-journey-x > span { display: grid; gap: .12em; }
.smd-journey-lk.smd-journey-trk .smd-journey-x b { font-size: max(11px, .88em); font-weight: 600; line-height: 1.2; }
.smd-journey-lk.smd-journey-trk .smd-journey-x small { font-size: max(11px, .76em); line-height: 1.2; color: #8a8a8e; }
.smd-journey-lk.smd-journey-trk .smd-journey-x > .is-b b { color: #1f7a37; }
/* the invoice: a receipt card with hairlines and a clear total */
.smd-journey-inv { width: 86%; gap: 0; padding: 0; overflow: hidden; border: 1px solid rgba(60, 60, 67, .14); border-radius: 1.15em; background: #fff; box-shadow: 0 .5em 1.2em -.9em rgba(0, 0, 0, .35); font-size: max(11px, .95em); line-height: 1.25; }
.smd-journey-inv > p.smd-journey-lk-h { display: grid; justify-content: stretch; margin: 0 0 .2em; padding: .62em .75em; font-size: 1em; border-top: 0; }
.smd-journey-inv > p { font-variant-numeric: normal; }
.smd-journey-inv > p:not(.smd-journey-lk-h) { display: flex; justify-content: space-between; gap: .6em; margin: 0 .8em; padding: .42em 0; font-size: max(11px, .86em); border-bottom: 1px solid rgba(60, 60, 67, .1); }
.smd-journey-inv > p > span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.smd-journey-inv > p.is-paid { padding: .55em 0 .5em; border-top: 0; border-bottom: 0; font-size: max(11px, .95em); font-weight: 600; color: #000; }
.smd-journey-inv > p.is-paid > span:last-child { display: inline-flex; align-items: center; gap: .3em; color: #1f7a37; }
.smd-journey-inv > p.is-paid svg { width: 1em; height: 1em; }
.smd-journey-inv > em { display: block; padding: .5em .8em .6em; background: #f6f6f8; border-top: 1px solid rgba(60, 60, 67, .1); font-size: max(11px, .76em); font-style: normal; color: #8a8a8e; }
/* the review links: one grouped card, a row each */
.smd-journey-rv { width: 86%; gap: 0; margin-top: 0; overflow: hidden; border: 1px solid rgba(60, 60, 67, .14); border-radius: 1.15em; background: #fff; box-shadow: 0 .5em 1.2em -.9em rgba(0, 0, 0, .35); }
.smd-journey-rv > span { justify-content: flex-start; gap: .55em; height: 2.55em; padding: 0 .85em; border-radius: 0; background: transparent; box-shadow: none; font-size: max(11px, .88em); font-weight: 600; letter-spacing: -.01em; }
.smd-journey-rv > span + span { box-shadow: inset 0 1px 0 rgba(60, 60, 67, .1); }
.smd-journey-rv > span::after { content: "\203A"; margin-left: auto; font-size: 1.3em; font-weight: 400; line-height: 1; color: #c7c7cc; }
.smd-journey-rv svg { color: #e0a83a; }
/* the live map */
.smd-journey-map { border-radius: 1.15em; background: #eef0ea; box-shadow: inset 0 0 0 1px rgba(60, 60, 67, .14); }
.smd-journey-van { background: #000; color: #fff; box-shadow: 0 0 0 .22em #fff, 0 .3em .7em -.2em rgba(0, 0, 0, .5); }
.smd-journey-eta { padding: .34em .7em; background: #000; color: #fff; font: 600 max(11px, .8em)/1.2 var(--smd-ios); }
.smd-journey-mf { background: #fff; border-top: 1px solid rgba(60, 60, 67, .1); color: #6e6e73; }
.smd-journey-mf > b { color: #000; }
/* the pay sheet: like Apple Pay. Merchant, what it's for, the card, the total, one big black button; the confirm
   tick pops in (scale and opacity only) */
/* no dimming veil behind the pay sheet (Sam: "a grey layer"): the sheet lifts on its own shadow */
.smd-journey-dim { display: none; }
.smd-journey-sheet { gap: 0; padding: .5em 1.1em 2.15em; border-radius: 1.6em 1.6em 0 0; background: #fff; box-shadow: 0 -1em 2.4em -1.4em rgba(0, 0, 0, .5); }
.smd-journey-sheet > i { margin-bottom: .55em; width: 2.6em; height: .3em; background: #d1d1d6; }
.smd-journey-sheet > p { grid-template-columns: 2.3em minmax(0, 1fr); gap: .65em; padding-bottom: .7em; border-bottom: 1px solid rgba(60, 60, 67, .12); }
.smd-journey-sheet > p > i { width: 2.3em; height: 2.3em; border-radius: .6em; background: linear-gradient(160deg, #3a3a3e, #0b0b0c); color: #e3c68f; font: 600 1em/1 var(--smd-ios); box-shadow: inset 0 0 0 1px rgba(200, 164, 106, .4); }
.smd-journey-sheet > p b { font-size: max(11px, .9em); letter-spacing: -.01em; }
.smd-journey-sheet > p small { font-size: max(11px, .76em); color: #8a8a8e; }
.smd-journey-sl { display: grid; }
.smd-journey-sl > span { display: grid; grid-template-columns: 3.6em minmax(0, 1fr); align-items: baseline; gap: .6em; padding: .55em 0; border-bottom: 1px solid rgba(60, 60, 67, .12); font-size: max(11px, .86em); line-height: 1.25; }
.smd-journey-sl em { font-style: normal; color: #8a8a8e; }
.smd-journey-sl b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.smd-journey-tot { display: flex; align-items: baseline; justify-content: space-between; gap: .6em; padding: .7em 0 .8em; }
.smd-journey-tot > em { min-width: 0; font-size: max(11px, .86em); font-style: normal; color: #6e6e73; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.smd-journey-amt { flex: none; font: 600 1.7em/1 var(--smd-ios); letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.smd-journey-sbtn { justify-items: stretch; }
.smd-journey-sbtn > span { gap: .45em; height: 2.75em; border-radius: .8em; font-size: max(11px, .98em); font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
/* one black button whose words change (no grey dip while they crossfade) */
.smd-journey-sbtn { border-radius: .8em; background: #000; }
.smd-journey-sbtn > .is-a, .smd-journey-sbtn > .is-b { background: transparent; color: #fff; }
.smd-journey-sbtn > .is-b > svg { box-sizing: content-box; width: .85em; height: .85em; padding: .2em; border-radius: 50%; background: #30d158; color: #fff; transform: scale(.4); opacity: 0; transition: transform .45s var(--smd-spring) .12s, opacity .2s linear .12s; }
.smd-journey-sbtn > .is-b.is-on > svg { transform: none; opacity: 1; }
/* her Mail banner: iOS glass, parked well above the screen */
.smd-journey-bn { left: .5em; right: .5em; top: calc(var(--jr-sb) - .1em); grid-template-columns: 2.45em minmax(0, 1fr); gap: .65em; padding: .72em .9em .78em .72em; border-radius: 1.4em; background: rgba(245, 245, 247, .985); box-shadow: 0 .9em 2em -.8em rgba(0, 0, 0, .38), 0 0 0 .5px rgba(0, 0, 0, .08); }
.smd-journey-bn > i { width: 2.45em; height: 2.45em; border-radius: .58em; background: linear-gradient(180deg, #2a9cff, #0a64e8); color: #fff; }
.smd-journey-bn > i > svg { width: 1.35em; height: 1.35em; }
.smd-journey-bn > span { gap: .06em; }
.smd-journey-bn small { align-items: baseline; font: 500 max(11px, .76em)/1.3 var(--smd-ios); letter-spacing: -.003em; text-transform: none; color: #6e6e73; }
.smd-journey-bn small > span:last-child { color: #8a8a8e; font-weight: 400; }
.smd-journey-bn b { font-size: max(11px, .88em); font-weight: 600; letter-spacing: -.012em; text-overflow: ellipsis; }
.smd-journey-bn em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: max(11px, .86em); color: #000; }
@media (prefers-reduced-motion: reduce) { .smd-journey-sbtn > .is-b > svg { transition: none; } }
/* the payment demo: once the dark till fills Dan's phone, the strip behind the status bar goes dark with it (a fade,
   after the till has grown), so no light band is left above it */
.smd-payment-p1 > .smd-screen::before { content: ""; position: absolute; z-index: 8; left: 0; right: 0; top: 0; height: calc(var(--pw, 300px) * .16); background: #141311; opacity: 0; transition: opacity .2s linear; pointer-events: none; }
.smd-payment-p1 > .smd-screen:has(.smd-payment-b[style*="visibility: visible"])::before { opacity: 1; transition-delay: .32s; }
.smd-payment-p1 > .smd-screen:has(.smd-payment-b[style*="visibility: visible"]) > .smd-status { color: #fff; transition: color 0s linear .4s; }
/* the reviews demo's thread: white, like Messages (and the bubbles' tails are cut against white) */
.smd-reviews-th { background: #fff; }
/* the whole phone always fits between the site's header and the steps (Sam, 16 Nov: the top was under the header):
   sized from the height there is. Narrow: the header (~56px), the step rail and its caption or end card (126px) sit round it (the foot, "Example" and Replay, may sit below the fold). Wide: the steps are beside it, so only the header and the foot. Everything inside a
   phone is sized from --pw, so it simply scales. A demo scrolled to lands below the header. */
.smd { --smd-phone-w: min(300px, calc(100vw - 48px), max(220px, calc((100vh - 196px) * 9 / 19.5))); scroll-margin-top: 64px; scroll-margin-bottom: -44px; }
.smd.smd-wide { --smd-phone-w: min(300px, max(240px, calc((100vh - 170px) * 9 / 19.5))); }
@supports (height: 100svh) {
  .smd { --smd-phone-w: min(300px, calc(100vw - 48px), max(220px, calc((100svh - 196px) * 9 / 19.5))); }
  .smd.smd-wide { --smd-phone-w: min(300px, max(240px, calc((100svh - 170px) * 9 / 19.5))); }
}
/* the other phone's card in a clear spot, the same on every screen: a short banner over the handset's own status area
   (never over the steps beside it, the site's header or the message being read), held, then gone */
.smd .smd-echoes, .smd.smd-on .smd-echoes, .smd.smd-wide .smd-echoes, .smd.smd-on.smd-wide .smd-echoes { left: 50% !important; right: auto !important; top: calc(min(100%, var(--smd-phone-w, 300px)) * .035) !important; width: min(250px, 86%) !important; transform: translateX(-50%) !important; }
.smd .smd-echo-b { -webkit-line-clamp: 2; }
/* no old-school type anywhere in a demo (Sam, 16 Nov: "no old school text"): the frame round every demo (step
   numbers, the stepper, "Example", Replay, sound, the title) in a modern sans, sentence case, tabular figures; and no
   serif inside a phone (a paper letter or a printed proposal keeps its own type) */
.smd-phone > .smd-screen { --smd-serif: var(--smd-ios); --serif: var(--smd-ios); --mono: var(--smd-ios); }
.smd-title { font: 600 18px/24px var(--smd-ios); letter-spacing: -.02em; }
.smd-s { font-family: var(--smd-ios); letter-spacing: -.006em; }
.smd-sn { font: 600 11.5px/1 var(--smd-ios); letter-spacing: 0; font-variant-numeric: tabular-nums; }
.smd-sp-dot { font: 600 11px/1 var(--smd-ios); letter-spacing: 0; font-variant-numeric: tabular-nums; }
.smd-sp-cap { font-family: var(--smd-ios); letter-spacing: -.006em; }
.smd-out { font-family: var(--smd-ios); letter-spacing: -.006em; }
.smd-ex { gap: 8px; font: 500 12px/1 var(--smd-ios); letter-spacing: 0; text-transform: none; }
.smd-replay, .smd-sound { font: 500 12px/1 var(--smd-ios); letter-spacing: 0; text-transform: none; }
.smd-missing small { font: 500 12px/1.5 var(--smd-ios); letter-spacing: 0; text-transform: none; }
.smd-sign { font: 500 11px/1.25 var(--smd-ios); letter-spacing: 0; text-transform: none; }

/* the end card (api.context({ end }) or the runtime's own words for each demo): three plain lines, shown with the
   outcome. Wide: under the outcome, beside the device. Narrow: it takes the stepper's place, in a box kept from the
   first frame (so nothing moves when it arrives). */
.smd-end { display: grid; gap: 6px; margin: 0; font: 400 13px/1.4 var(--smd-ios); letter-spacing: -.006em; color: inherit; opacity: 0; transform: translateY(6px); transition: opacity .4s var(--smd-ease-q) .25s, transform .4s var(--smd-ease-q) .25s; }
.smd-end > p { margin: 0; color: var(--smd-muted); }
.smd-end > p > b { font-weight: 600; color: var(--smd-ivory); }
.smd-end > p.is-pkg { display: inline-flex; align-items: center; justify-self: start; gap: 7px; margin-top: 2px; padding: 5px 11px; border-radius: 999px; background: rgba(200, 164, 106, .13); box-shadow: inset 0 0 0 1px rgba(200, 164, 106, .35); color: var(--smd-gold-hi); font-weight: 500; }
.smd-ctx.is-out .smd-end { opacity: 1; transform: none; }
.smd.smd-wide .smd-end { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--smd-hair-d); }
.smd:not(.smd-wide) .smd-ctx.has-end { display: grid; min-height: 112px; }
.smd:not(.smd-wide) .smd-ctx.has-end > .smd-stepper, .smd:not(.smd-wide) .smd-ctx.has-end > .smd-end { grid-area: 1 / 1; }
.smd:not(.smd-wide) .smd-end { align-self: start; gap: 4px; font-size: 12.5px; line-height: 1.38; text-align: center; justify-items: center; }
.smd:not(.smd-wide) .smd-end > p.is-pkg { justify-self: center; padding: 4px 10px; }
.smd:not(.smd-wide) .smd-ctx.has-end > .smd-stepper { transition: opacity .25s var(--smd-ease-q); }
.smd:not(.smd-wide) .smd-ctx.has-end.is-out > .smd-stepper { opacity: 0; }
.smd { --smd-xs: 126px; }
.smd.smd-wide { --smd-xs: 0px; }
.smd[data-steps="off"] { --smd-xs: 0px; }
.smd.is-light .smd-end > p { color: var(--smd-ink-2); }
.smd.is-light .smd-end > p > b { color: var(--smd-ink); }
.smd.is-light .smd-end > p.is-pkg { color: #7a5a26; }
@media (prefers-reduced-motion: reduce) { .smd-end, .smd-ctx.has-end > .smd-stepper { transition: none !important; } }
/* the detail under each step: what was asked for and what happened, as the phone shows it (Sam, 16 Nov) */
.smd-sd { display: block; margin-top: 3px; font: 400 12.5px/1.4 var(--smd-ios); letter-spacing: -.003em; color: var(--smd-muted); }
.smd-sd .smd-g { display: inline-block; width: .95em; height: .95em; vertical-align: -.12em; color: #30d158; }
.smd-sd .smd-g.is-star { color: var(--smd-gold-hi); }
.smd-s.is-on .smd-sd { color: var(--smd-ivory); opacity: .78; }
.smd-stepper { grid-template-rows: 20px 76px; }
.smd-sp-cap .smd-sd { margin-top: 2px; font-size: 12px; }
.smd.is-light .smd-sd { color: var(--smd-ink-2); }

/* nothing touches (Sam, 16 Nov): 8–10px between bubbles, cards and buttons in every thread */
.smd-thread-in > * { margin-top: 10px; }
.smd-screen .smd-bub + .smd-bub { margin-top: 8px; }
.smd-journey-in > * { margin-top: .8em; }
.smd-journey-g { gap: .62em; }
/* the key words the customer reads are a size up */
.smd-journey-b { font-size: 1em; }
/* (16 Nov, super audit) the journey at every size: never under 11px, 8–12px between things, 10px inside every box, no
   ellipses (long names wrap), the Mail banner below the status bar */
.smd-journey { font-size: max(11px, calc(var(--pw, 300px) * .0436)); }
.smd-journey-cap > small { margin-bottom: 8px; }
.smd-journey-box { margin-top: 0; padding: .65em max(10.5px, .85em) .7em; }
.smd-journey-ask { gap: 8px; }
.smd-journey-ask > span { padding: .4em max(10px, .75em); }
.smd-journey-g { gap: max(8px, .62em); }
.smd-journey-in > * { margin-top: max(10px, .8em); }
.smd-journey-lk-h b, .smd-journey-lk-h small { white-space: normal; overflow: visible; text-overflow: clip; }
.smd-journey-bn { top: calc(var(--jr-sb) + 4px); }
.smd-journey-bn b, .smd-journey-bn em { white-space: normal; overflow: visible; text-overflow: clip; }
.smd-journey-pay > span { padding: 0 max(10.5px, .8em); }
.smd-journey-mf { padding: 0 max(10.5px, .8em); }
.smd-journey-eta { padding: .4em max(10px, .8em); }
.smd-journey-inv > em { padding: .5em max(10.5px, .8em) .6em; }
.smd-journey-inv > p:not(.smd-journey-lk-h) { margin: 0 max(10.5px, .8em); }
/* the demo's own controls are full tap targets on phones (44px), and a tip shows whole (never half-faded over words) */
@media (max-width: 699.98px) { .smd-replay { height: 44px; padding: 0 16px 0 14px; } .smd-snd { width: 44px; height: 44px; } }
.smd-tip { transition: none; }
/* notifications: below the status bar, whole (never clamped or cut with an ellipsis) */
.smd-bns { top: calc(var(--pw, 300px) * .155 + 2px); }
.smd-bn-b { display: block; -webkit-line-clamp: none !important; overflow: visible; }
.smd-bn-tx > b, .smd-bn-h > span:first-child { white-space: normal; overflow: visible; text-overflow: clip; }
/* the phone always fits between the site's header and its step captions, with the demo's title above it when it has
   one (and the demos page's sticky row of links): never under 180px wide (its words never under 11px) */
.smd { --smd-chrome: 196px; --smd-phone-w: min(300px, calc(100vw - 48px), max(180px, calc((100svh - var(--smd-chrome) - var(--smd-xtra, 0px)) * 9 / 19.5))); }   /* --smd-xtra: a demo whose captions run longer */
.smd:not([data-title="off"]):has(> .smd-title) { --smd-chrome: 256px; }
.smdg-demo .smd { --smd-chrome: 240px; }
.smdg-demo .smd:not([data-title="off"]):has(> .smd-title) { --smd-chrome: 300px; }
.smd.smd-wide { --smd-phone-w: min(300px, max(240px, calc((100svh - var(--smd-chrome) + 26px) * 9 / 19.5))); }
/* the call's avatar never squashes; the smallest phones (an iPhone SE): the journey's cards use the thread's full width,
   long labels wrap instead of running off */
.smd-journey-av, .smd-journey-nm, .smd-journey-st, .smd-journey-no, .smd-journey-cap, .smd-journey-ask { flex: none; }
.smd-journey-ask > span { white-space: normal; }
.smd-journey-sl b { white-space: normal; overflow: visible; text-overflow: clip; }
@media (max-width: 699.98px) and (max-height: 720px) {
  .smd-journey-lk, .smd-journey-inv, .smd-journey-rv { width: 100%; }
  .smd-journey-lk-h { grid-template-columns: 2.15em minmax(0, 1fr); }
  .smd-journey-lk-h > svg { display: none; }
  .smd-journey-lk-r { flex-wrap: wrap; }
}
/* short screens (an iPhone SE): the step captions take two lines, so the phone can be bigger */
@media (max-height: 720px) and (max-width: 699.98px) {
  .smd { --smd-chrome: 160px; --smd-xs: 74px; }   /* 56px header + 14px gap + a three-line caption (87px) fit (16 Nov) */
  .smd:not([data-title="off"]):has(> .smd-title) { --smd-chrome: 204px; }
  .smdg-demo .smd { --smd-chrome: 194px; }
  .smdg-demo .smd:not([data-title="off"]):has(> .smd-title) { --smd-chrome: 248px; }
  .smd-stepper { grid-template-rows: 18px 50px; }
  .smd-sp-cap .smd-sd { display: none; }
  .smd:not(.smd-wide) .smd-ctx.has-end { min-height: 74px; }
}
.smd-pill { padding: 4px 10px; }
/* phones: the step dots sit within the handset's width (16 Nov), never out past its edges or the screen's */
@media (max-width: 699.98px) { .smd-sp-row { box-sizing: border-box; width: min(100%, var(--smd-phone-w, 300px)); margin-inline: auto; } }
/* the shared signature (SMDemos.signatureSvg): ink with a little pressure, drawn by its dash */
.smd-sig { display: block; width: 100%; height: auto; overflow: visible; }
.smd-sig path { fill: none; stroke: #1a1a2e; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 1; }
.smd-sig-u { stroke-width: 2.7; opacity: .26; }
.smd-sig-p { stroke-width: 1.45; }
/* the other phone's card is never wider than the phone it sits over */
.smd .smd-echoes, .smd.smd-on .smd-echoes, .smd.smd-wide .smd-echoes, .smd.smd-on.smd-wide .smd-echoes { width: min(250px, calc(min(100%, var(--smd-phone-w, 300px)) - 28px)) !important; }
/* @ios-kit-end */
