/* Field Ops demo. Every colour, size and radius is a token from tokens.css (MASTER.md is the source).
   Class prefixes: st- the stage, o- the office screen, p- the phone, g- the guide bar, u- shared pieces.
   The prefixes exist because unprefixed names (.next, .sec, .me) collided in the drawings. */

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 var(--t-16)/1.45 var(--body); font-variant-numeric: tabular-nums; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
a { color: var(--teal); text-underline-offset: 3px; }
img { max-width: 100%; }
::selection { background: var(--mint); color: var(--ink); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.o-hero :focus-visible, .p-top :focus-visible { outline-color: var(--white); }
.g-bar :focus-visible { outline-color: var(--mint); }

.u-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: var(--s-16); background: var(--white); padding: var(--s-12) var(--s-16); border-radius: var(--r-ctl); z-index: 10; }
.skip:focus { left: var(--s-16); }

html:not(.js) .stage { display: none; }
html.js .fallback { display: none; }
.fallback { max-width: 900px; margin: 0 auto; padding: var(--s-20); display: flex; flex-direction: column; gap: var(--s-16); }

/* ---------- shared pieces ---------- */
.u-ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.u-amt { margin-left: auto; text-align: right; white-space: nowrap; }
.u-why { font-size: var(--t-14); color: var(--ink-2); }

.u-tick { width: 24px; height: 24px; flex: none; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; }
.u-tick .u-ic { width: 14px; height: 14px; stroke-width: 2.6; }
.is-done > .u-tick { background: var(--teal); border-color: var(--teal); color: var(--white); }

.u-btn { min-height: var(--ctl); padding: 0 18px; border-radius: var(--r-ctl); display: inline-flex; align-items: center; justify-content: center; gap: var(--s-8); font-weight: 600; font-size: var(--t-15); white-space: nowrap; background: var(--teal); color: var(--white); border: 1px solid var(--teal); text-decoration: none; transition: background var(--quick), border-color var(--quick); }
.u-btn:active { background: var(--teal-d); border-color: var(--teal-d); }
.u-btn.is-off, .u-btn--quiet[aria-disabled="true"] { background: var(--tint); border-color: var(--rule); color: var(--ink-2); cursor: not-allowed; }
.u-btn--quiet { background: var(--white); color: var(--teal); border-color: var(--rule); }
.u-btn--quiet:active { background: var(--wash); border-color: var(--rule); }
.u-btn--quiet.is-next { background: var(--wash); border: 2px solid var(--teal); }
.u-btn--big { min-height: var(--ctl-touch); width: 100%; }
@media (hover: hover) {
  .u-btn:hover { background: var(--teal-d); border-color: var(--teal-d); }
  .u-btn--quiet:hover { background: var(--wash); border-color: var(--rule); }
  .u-btn.is-off:hover, .u-btn--quiet[aria-disabled="true"]:hover { background: var(--tint); border-color: var(--rule); }
}

.u-av { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: var(--t-14); background: var(--mint); color: var(--teal-d); }
.u-av--office { background: var(--teal); color: var(--white); }
.u-av--customer { background: var(--tint); color: var(--ink); }

/* Motion is opt-in: these rules exist only for a visitor who has not asked for less, so with
   reduced motion every change simply shows in its finished state. */
@media (prefers-reduced-motion: no-preference) {
  .is-new { animation: arrive var(--arrive) var(--ease); }
  .st-link.is-drawing #link-line { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw var(--draw) var(--ease) forwards; }
  .st-link.is-drawing #link-head { animation: appear var(--quick) var(--draw) both; }
  .st-link.is-drawing + .st-sent { animation: appear var(--quick) var(--arrive) both; }
  .st-mean.is-new { animation: lit 1400ms var(--ease); }
  .u-btn:active, .g-btn:active { transform: scale(.98); }
  .is-press { transform: scale(.97); transition: transform var(--quick) var(--ease); }
  .st-cur { transition: transform var(--cur-ms, 600ms) cubic-bezier(.3, .6, .2, 1); }
  .st-cur.is-jump, .st-cur.is-following { transition: none; }
  .st-cur-mouse, .st-cur-touch { transition: transform 120ms var(--ease); }
  .u-btn.is-off:active, .u-btn--quiet[aria-disabled="true"]:active { transform: none; }
}
@keyframes arrive { from { opacity: 0; transform: translateY(-6px); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes appear { from { opacity: 0; } }
@keyframes lit { from { background: var(--wash); border-color: var(--teal); } }

/* ---------- the page ---------- */
.top { max-width: 1240px; margin: 0 auto; padding: 18px max(20px, env(safe-area-inset-right)) 14px max(20px, env(safe-area-inset-left)); display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px var(--s-16); }
.top h1 { font: 600 var(--t-22)/1.2 var(--dis); letter-spacing: -.02em; }
.top p { color: var(--ink-2); font-size: var(--t-15); }
.top-narrow { display: none; }

/* ---------- the stage, wide: both screens side by side ---------- */
.stage { --dev-h: clamp(520px, calc(100vh - 250px), 600px); position: relative; max-width: 1240px; margin: 0 auto; padding: 0 max(20px, env(safe-area-inset-right)) var(--s-24) max(20px, env(safe-area-inset-left)); display: grid; grid-template-columns: minmax(0, 1fr) 296px; column-gap: 60px; row-gap: var(--s-16); }
.st-switch, .st-mean { display: none; }
.st-office, .st-phone { display: flex; flex-direction: column; gap: var(--s-8); min-width: 0; }
.st-lab { font-size: var(--t-14); font-weight: 500; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.st-lab b { font-weight: 600; color: var(--ink); }
.stage[data-you="office"] .st-office .st-lab::before, .stage[data-you="phone"] .st-phone .st-lab::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.st-note { grid-column: 1 / -1; font-size: var(--t-14); color: var(--ink-2); }
.st-note-by { display: none; }

.st-link { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 3; }
.st-link path { fill: none; stroke: var(--teal); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.st-link circle { fill: var(--teal); }
.st-sent { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); z-index: 4; pointer-events: none; background: var(--teal); color: var(--white); font-weight: 600; font-size: var(--t-14); border-radius: 999px; padding: 3px 10px; }

/* ---------- the office screen ---------- */
.o-win { container: office / inline-size; height: var(--dev-h); background: var(--white); border-radius: var(--r-win); overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 1px 2px var(--shadow-near), 0 18px 40px -12px var(--shadow-far); }
.o-nav { flex: none; min-height: 54px; display: flex; align-items: stretch; flex-wrap: wrap; gap: 0 var(--s-12); padding: 0 var(--s-28); border-bottom: 1px solid var(--hair); }
.o-brand { align-self: center; margin-right: var(--s-12); font: 600 var(--t-18) var(--dis); letter-spacing: -.02em; }
.o-nav-a { min-height: 54px; min-width: var(--ctl); display: flex; align-items: center; justify-content: center; padding: 3px 6px 0; border-bottom: 3px solid transparent; font-weight: 500; font-size: var(--t-15); color: var(--ink-2); text-decoration: none; }
.o-nav-a.is-cur { color: var(--teal-d); border-bottom-color: var(--teal); font-weight: 600; }
.o-nav-a.is-off { cursor: not-allowed; }
.o-nav-why { align-self: center; margin-left: var(--s-8); font-size: var(--t-14); color: var(--ink-2); }
.o-who { align-self: center; margin-left: auto; font-size: var(--t-15); color: var(--ink-2); }
@media (hover: hover) { a.o-nav-a:hover { color: var(--teal-d); } }

.o-body { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; scrollbar-width: thin; scrollbar-color: var(--rule) transparent; }
.o-hero { flex: none; background: var(--teal); color: var(--white); padding: var(--s-20) var(--s-28); }
.o-hero--slim { padding-block: var(--s-16); }
.o-say { font: 600 var(--t-40)/1.08 var(--dis); letter-spacing: -.03em; text-wrap: balance; }
.o-say--slim { font-size: var(--t-28); }
.o-sub { margin-top: var(--s-8); color: var(--on-teal-2); }
.o-sub b { color: var(--white); font-weight: 600; }

.o-stops { --fill: 0%; position: relative; display: grid; grid-template-columns: repeat(5, 1fr); margin-top: var(--s-20); }
.o-stops--1 { --fill: 20%; }
.o-stops--2 { --fill: 40%; }
.o-stops--3 { --fill: 60%; }
.o-stops--4 { --fill: 80%; }
.o-stops::before { content: ""; position: absolute; left: 7px; right: calc(20% - 7px); top: 6px; height: 3px; border-radius: 2px; background: var(--on-teal-line); }
.o-stops::after { content: ""; position: absolute; left: 7px; width: var(--fill); top: 6px; height: 3px; border-radius: 2px; background: var(--mint); }
.o-stops li { position: relative; z-index: 1; display: flex; flex-direction: column; gap: var(--s-8); font-size: var(--t-14); font-weight: 500; color: var(--on-teal-2); }
.o-stops li::before { content: ""; width: 15px; height: 15px; border-radius: 50%; background: var(--teal); border: 3px solid var(--on-teal-ring); }
.o-stops .is-done::before { background: var(--mint); border-color: var(--mint); }
.o-stops .is-now { color: var(--white); font-weight: 600; }
.o-stops .is-now::before { background: var(--white); border-color: var(--mint); outline: 5px solid var(--mint-ring); }

.o-low { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: var(--s-28); padding: 18px var(--s-28) var(--s-20); }
.o-low h3 { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; font: 600 var(--t-18) var(--dis); letter-spacing: -.02em; }
.o-item { display: flex; align-items: center; gap: var(--s-12); min-height: 44px; padding-block: 5px; border-bottom: 1px solid var(--hair); font-size: var(--t-15); }
.o-item-name { min-width: 0; }
.o-item small { margin-left: var(--s-8); font-size: var(--t-14); color: var(--ink-2); white-space: nowrap; }
.o-item.is-lit { background: var(--wash); border-radius: var(--r-ctl); border-bottom-color: transparent; margin-inline: -10px; padding-inline: 10px; }
.o-item.is-lit small { color: var(--teal-d); font-weight: 600; }
.o-total { display: flex; padding: 10px 0; font-weight: 600; font-size: var(--t-15); border-bottom: 1px solid var(--hair); }
.o-act { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-8) 14px; padding-top: 14px; }
.o-sent { font-weight: 600; color: var(--teal-d); }
.o-links { display: flex; flex-wrap: wrap; gap: var(--s-8) var(--s-20); margin-top: 10px; font-size: var(--t-15); }
.o-links a { min-height: var(--ctl); display: inline-flex; align-items: center; }
.o-signed { display: flex; align-items: center; gap: var(--s-12); margin-top: var(--s-12); font-size: var(--t-15); color: var(--ink-2); }
.o-signed img { height: 44px; width: auto; border-bottom: 1px solid var(--rule); }

.o-now { display: inline-flex; align-items: center; gap: 7px; font: 500 var(--t-14) var(--body); letter-spacing: 0; color: var(--ink-2); }
.o-now::before { content: ""; width: 8px; height: 8px; margin-inline: 4px; border-radius: 50%; background: var(--live); outline: 4px solid var(--wash); }
.o-event { display: flex; gap: 10px; padding: 9px 10px; margin-inline: -10px; border-radius: var(--r-ctl); }
.o-event p { font-size: var(--t-15); line-height: 1.3; min-width: 0; }
.o-event small { display: block; margin-top: 1px; font-size: var(--t-14); color: var(--ink-2); }
.o-event.is-lit { background: var(--wash); }
.o-event.is-lit small { color: var(--teal-d); font-weight: 600; }
.o-empty { font-size: var(--t-15); color: var(--ink-2); }

/* lists */
.o-list { padding: 6px var(--s-28) var(--s-24); }
.o-row { display: grid; grid-template-columns: minmax(0, 2.3fr) minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, .8fr) minmax(0, .7fr); align-items: center; gap: var(--s-16); min-height: 62px; padding: var(--s-8) 10px; margin-inline: -10px; border-bottom: 1px solid var(--hair); font-size: var(--t-15); color: var(--ink); text-decoration: none; }
.o-row--head { min-height: 0; padding-block: 10px; font-size: var(--t-14); font-weight: 600; color: var(--ink-2); border-bottom-color: var(--rule); }
.o-row b { display: block; font-weight: 600; }
.o-row small { font-size: var(--t-14); color: var(--ink-2); }
.o-row.is-you { background: var(--wash); }
.o-mini { display: flex; gap: 4px; margin-bottom: 5px; }
.o-mini i { width: 18px; height: 4px; border-radius: 2px; background: var(--hair); }
.o-mini i.is-on { background: var(--teal); }
@media (hover: hover) { a.o-row:hover { background: var(--tint); } a.o-row.is-you:hover { background: var(--wash); } }

/* a quote or an invoice as a document */
.o-docwrap { display: flex; flex-direction: column; gap: var(--s-12); padding: var(--s-12) var(--s-28) var(--s-28); }
.o-docwrap .o-links { margin-top: 0; }
.o-doc { max-width: 560px; display: flex; flex-direction: column; gap: var(--s-16); padding: var(--s-24); border: 1px solid var(--rule); border-radius: var(--s-4); background: var(--white); }
.o-doc-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-8) var(--s-16); padding-bottom: var(--s-12); border-bottom: 2px solid var(--ink); }
.o-doc-head strong { font-weight: 600; }
.o-doc-facts { display: grid; gap: var(--s-4); font-size: var(--t-15); }
.o-doc-facts div { display: flex; gap: var(--s-12); }
.o-doc-facts dt { width: 44px; flex: none; color: var(--ink-2); }
.o-doc-table { width: 100%; border-collapse: collapse; font-size: var(--t-15); }
.o-doc-table th, .o-doc-table td { padding: var(--s-8) 0; border-bottom: 1px solid var(--hair); text-align: left; font-weight: 400; }
.o-doc-table .u-amt { text-align: right; }
.o-doc-table thead th { font-size: var(--t-14); font-weight: 600; color: var(--ink-2); }
.o-doc-sum th, .o-doc-sum td { font-weight: 600; border-bottom: 0; }
.o-doc-note { font-size: var(--t-14); color: var(--ink-2); }

/* the office screen when its own window is narrow: a phone, or a small laptop */
@container office (max-width: 640px) {
  .o-nav { gap: 0 var(--s-4); padding-inline: var(--s-16); }
  .o-who { display: none; }
  .o-nav-why { flex-basis: 100%; margin-left: 0; padding-bottom: var(--s-8); }
  .o-hero { padding: var(--s-16); }
  .o-say { font-size: var(--t-28); }
  .o-say--slim { font-size: var(--t-22); }
  .o-sub { font-size: var(--t-15); }
  .o-low { grid-template-columns: minmax(0, 1fr); gap: var(--s-20); padding: var(--s-16); }
  .o-item small { display: block; margin-left: 0; }
  .o-list, .o-docwrap { padding-inline: var(--s-16); }
  .o-doc { padding: var(--s-16); }
  .o-row--head { display: none; }
  .o-row { grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-4) var(--s-12); padding-block: var(--s-12); }
  .o-row-main { grid-column: 1; }
  .o-row .u-amt { grid-column: 2; grid-row: 1; align-self: start; font-weight: 600; }
  .o-row-where { grid-column: 1 / -1; }
  .o-row-x { grid-column: 1 / -1; font-size: var(--t-14); color: var(--ink-2); }
  .o-row-x:empty { display: none; }
  .o-row-x[data-l]::before { content: attr(data-l) ": "; }
}

/* ---------- the phone ---------- */
.p-frame { height: var(--dev-h); background: var(--ink); border-radius: var(--r-phone); padding: 9px; box-shadow: 0 1px 2px var(--shadow-near), 0 18px 40px -12px var(--shadow-far); }
.p-screen { height: 100%; border-radius: 31px; overflow: hidden; background: var(--teal); display: flex; flex-direction: column; }
.p-bar { flex: none; height: 30px; display: flex; align-items: center; justify-content: space-between; padding: 4px 22px 0; font-size: var(--t-14); font-weight: 600; color: var(--white); }
.p-batt { position: relative; width: 22px; height: 11px; border: 1.5px solid currentColor; border-radius: 3px; opacity: .85; }
.p-batt::after { content: ""; position: absolute; inset: 1.5px 6px 1.5px 1.5px; border-radius: 1px; background: currentColor; }
.p-top { flex: none; padding: 2px 18px var(--s-16); color: var(--white); }
.p-back { min-height: var(--ctl); display: inline-flex; align-items: center; gap: var(--s-4); margin-left: -6px; padding-right: var(--s-8); font-weight: 500; font-size: var(--t-15); color: var(--on-teal-2); }
.p-say { font: 600 var(--t-32)/1.1 var(--body); letter-spacing: -.03em; }
.p-say--words { font-family: var(--dis); font-size: var(--t-28); padding-top: var(--s-8); }
.p-sub { margin-top: 6px; font-size: var(--t-15); color: var(--on-teal-2); }
.p-sheet { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; padding: 10px 6px 14px; background: var(--white); border-radius: var(--r-sheet) var(--r-sheet) 0 0; scrollbar-width: thin; scrollbar-color: var(--rule) transparent; }
.p-empty { padding: var(--s-20) 14px; font-size: var(--t-15); color: var(--ink-2); }

.p-item { width: 100%; min-height: 62px; display: flex; align-items: center; gap: 10px; padding: var(--s-8); border-radius: var(--s-12); border: 2px solid transparent; }
.p-item .u-tick { width: 28px; height: 28px; }
.p-item b { display: block; font-weight: 500; font-size: var(--t-15); line-height: 1.25; }
.p-item small { display: block; font-size: var(--t-14); color: var(--ink-2); }
.p-item.is-done small { color: var(--teal-d); font-weight: 600; }
.p-item.is-next { background: var(--wash); border-color: var(--teal); }
.p-item[aria-disabled="true"] { cursor: default; }
.p-item:active:not([aria-disabled="true"]) { background: var(--wash); }
.p-why { padding: var(--s-4) 10px 0; }
.p-two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-8); padding: 10px var(--s-8) 0; }
.p-two .u-btn { min-height: var(--ctl-touch); padding: 0 var(--s-8); }
.p-signed { min-height: var(--ctl-touch); display: inline-flex; align-items: center; justify-content: center; gap: var(--s-8); font-weight: 600; color: var(--teal-d); }
.p-note { padding: var(--s-8) 10px 0; font-size: var(--t-14); color: var(--ink-2); }
.p-end { margin-top: auto; padding: 14px var(--s-8) 0; display: flex; flex-direction: column; gap: 6px; text-align: center; }
.p-finished { padding: var(--s-8); font-weight: 600; color: var(--teal-d); }

.p-job { width: 100%; display: flex; align-items: center; gap: var(--s-12); padding: 10px var(--s-8); border-radius: var(--s-12); border: 2px solid transparent; text-align: left; }
.p-job time { width: 62px; flex: none; font-weight: 600; font-size: var(--t-15); }
.p-job b { display: block; font-weight: 600; font-size: var(--t-15); line-height: 1.25; }
.p-job small { display: block; font-size: var(--t-14); color: var(--ink-2); }
.p-job .p-job-state { color: var(--teal-d); font-weight: 600; }
.p-job.is-next { background: var(--wash); border-color: var(--teal); }
button.p-job:active { background: var(--wash); }
.p-day { padding: var(--s-12) 10px var(--s-4); font: 600 var(--t-15) var(--body); color: var(--ink-2); }

.p-sign { gap: 10px; padding: 14px; }
.p-pad { width: 100%; height: 130px; border: 1px dashed var(--line); border-radius: var(--s-12); background: var(--paper); color: var(--ink); font-family: var(--body); touch-action: none; cursor: crosshair; }
.p-typed { display: flex; flex-direction: column; gap: 6px; font-size: var(--t-14); font-weight: 500; }
.p-typed input { min-height: var(--ctl-touch); padding: 0 var(--s-12); border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--white); color: var(--ink); font: 400 var(--t-16) var(--body); }
.p-sign .p-two { padding: var(--s-4) 0 0; }
.p-sign .p-why { padding: 0; color: var(--danger); }

/* ---------- the guide bar ---------- */
.g-bar { grid-column: 1 / -1; min-height: 66px; display: flex; align-items: center; gap: 22px; padding: 10px var(--s-20) 10px 22px; border-radius: var(--r-bar); background: var(--ink); color: var(--white); }
.g-step { flex: none; display: flex; flex-direction: column; gap: 7px; font-size: var(--t-14); font-weight: 600; }
.g-dots { display: flex; gap: 5px; }
.g-dots i { width: 22px; height: 4px; border-radius: 2px; background: var(--on-ink-off); }
.g-dots i.is-on { background: var(--mint); }
.g-text { flex: 1; min-width: 0; }
.g-text b { font-weight: 600; }
.g-btns { flex: none; display: flex; gap: var(--s-8); }
.g-btn { min-height: var(--ctl); display: inline-flex; align-items: center; padding: 0 var(--s-16); border: 1px solid var(--on-ink-line); border-radius: var(--r-ctl); font-weight: 500; font-size: var(--t-15); color: var(--white); text-decoration: none; white-space: nowrap; }
.g-btn--main { background: var(--mint); border-color: var(--mint); color: var(--ink); font-weight: 600; }
.g-by { flex: none; padding-left: var(--s-20); border-left: 1px solid var(--on-ink-off); font-size: var(--t-14); line-height: 1.25; color: var(--on-ink-2); }
.g-by b { display: block; font-size: var(--t-15); font-weight: 600; letter-spacing: .04em; color: var(--white); }
@media (hover: hover) { .g-btn:hover { border-color: var(--white); } .g-btn--main:hover { border-color: var(--mint); background: var(--white); } }

/* ---------- playing by itself inside another page (embed.js, in a shadow root) ---------- */
:host { display: block; }
/* The host page's own type does not apply in here, so the stage sets its own. */
.stage.is-embedded, .e-foot { font: 400 var(--t-16)/1.45 var(--body); font-variant-numeric: tabular-nums; color: var(--ink); text-align: left; }
.stage.is-embedded { --dev-h: 560px; max-width: none; padding: 0; }
/* Nobody is being guided, so the parts that speak to a visitor are left out. */
.stage.is-auto .g-bar, .stage.is-auto .st-note, .stage.is-auto .o-nav-why, .stage.is-auto .st-switch { display: none; }
/* The pointer that does the pressing: a mouse arrow over the office, a touch point over the phone.
   The element itself is a point; the arrow's tip and the touch point's centre sit on it. */
.st-cur { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 6; pointer-events: none; transform: translate(var(--x, 0px), var(--y, 0px)); }
.st-cur-mouse { position: absolute; left: -3px; top: -2px; width: 26px; height: 26px; overflow: visible; fill: var(--white); stroke: var(--ink); stroke-width: 1.3; stroke-linejoin: round; transform-origin: 3px 2px; }
.st-cur-touch { position: absolute; left: -17px; top: -17px; width: 34px; height: 34px; border-radius: 50%; background: var(--touch); border: 2px solid var(--ink); outline: 2px solid var(--white); }
.st-cur[data-kind="mouse"] .st-cur-touch, .st-cur[data-kind="touch"] .st-cur-mouse { display: none; }
.st-cur.is-down .st-cur-mouse, .st-cur.is-down .st-cur-touch { transform: scale(.82); }
/* The button the demo is about to press. */
.is-press { outline: 3px solid var(--teal); outline-offset: 2px; }
.o-hero .is-press, .p-top .is-press { outline-color: var(--white); }
.e-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-16); margin-top: var(--s-12); }
.e-label { font-size: var(--t-14); color: var(--ink-2); }
.e-toggle { flex: none; min-height: var(--ctl); min-width: var(--ctl); padding: 0 var(--s-12); border-radius: var(--r-ctl); font-weight: 600; font-size: var(--t-15); color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- one screen at a time: tablets and phones ---------- */
@media (max-width: 999.98px) {
  .top-wide { display: none; }
  .top-narrow { display: block; }
  .stage { display: flex; flex-direction: column; gap: var(--s-12); padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
  .st-lab, .st-link, .st-sent { display: none; }

  .st-switch { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); padding: var(--s-4); border-radius: var(--s-12); background: var(--tint); }
  .st-switch button { min-height: var(--ctl); border: 1px solid transparent; border-radius: 9px; text-align: center; font-weight: 600; font-size: var(--t-15); color: var(--ink-2); }
  .st-switch button[aria-pressed="true"] { background: var(--white); border-color: var(--rule); color: var(--ink); }

  .st-mean { display: flex; align-items: center; gap: 10px; width: 100%; min-height: var(--ctl-touch); padding: var(--s-8) var(--s-12); border: 1px solid var(--rule); border-radius: var(--s-12); background: var(--white); font-size: var(--t-15); text-align: left; }
  .st-mean-lab { flex: none; font-weight: 600; color: var(--teal-d); }
  .st-mean-say { flex: 1; min-width: 0; }
  .st-mean-go { flex: none; font-weight: 600; color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }

  .stage[data-device="office"] .st-phone, .stage[data-device="phone"] .st-office { display: none; }
  .o-win { height: auto; min-height: 380px; }
  .o-body { overflow: visible; }
  .p-frame { height: auto; width: 100%; max-width: 380px; margin-inline: auto; }
  .p-screen { height: auto; min-height: 540px; }

  .g-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; flex-wrap: wrap; gap: var(--s-8) var(--s-16); border-radius: var(--r-bar) var(--r-bar) 0 0; padding: var(--s-12) max(16px, env(safe-area-inset-right)) calc(var(--s-12) + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
  .g-step { flex-direction: row; align-items: center; gap: 10px; }
  .g-btns { margin-left: auto; }
  .g-text { order: 3; flex-basis: 100%; }
  .g-by { display: none; }
  .st-note-by { display: inline; }
}

@media (max-width: 999.98px) {
  .stage.is-auto { padding-bottom: 0; }
  .stage.is-auto .p-screen { min-height: 560px; }
  /* The office's line is one or two lines long; room for two keeps everything below it still. */
  .stage.is-auto .st-mean { min-height: 62px; }
  .stage.is-auto .st-mean-go { display: none; }
}

/* a real phone: the demo's phone drops its frame and fills the width, so nothing needs a scroll to reach */
@media (max-width: 520px) {
  .top { padding-block: 14px 10px; }
  .top p { display: none; }
  .p-frame { max-width: none; padding: 0; border-radius: var(--r-win); background: none; }
  .p-screen { min-height: 0; border-radius: var(--r-win); }
  .p-bar { display: none; }
  .p-top { padding-top: var(--s-8); }
  .g-dots { display: none; }
}
