/* App states: three rows of phones from three invented products (Loomhouse, Driftwave, Spoke), each with a live
   figure where the illustration goes. Self-sufficient: it needs only home/base.css for the page tokens, the nav and
   the footer. The phones sit straight on the page, no slab; in each row the phone in focus is at full strength and
   the others are a little dimmed. Inside a phone the type is Inter, so the screens read as someone else's product,
   and the screen's colours are its own tokens (--s-*), per product and per theme. The figure's plate is set to the
   screen colour (examples/app-states.js), so a figure sits on the screen with no box. Orange (--kl) appears only on
   a brand figure's hero part and on that screen's one primary button. */
::selection { background: color-mix(in srgb, var(--ink) 16%, transparent); }
.as { --kl: #f5821f; padding-top: 88px; }
.as-head h1 { font-weight: 500; font-size: 46px; line-height: 1.04; letter-spacing: -0.035em; }
.as-head p { margin-top: 20px; font-size: 20px; line-height: 1.5; letter-spacing: -0.012em; color: var(--soft); max-width: 46ch; }
.as-head p span { color: var(--ink); }
.as-sec { margin-top: 136px; }
.as-sec:first-of-type { margin-top: 88px; }
.as-sec-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: baseline; margin-bottom: 48px; }
.as-sec-head h2 { grid-column: 1 / span 5; font-size: 28px; line-height: 1.15; font-weight: 500; letter-spacing: -0.03em; }
.as-sec-head p { grid-column: 7 / span 6; font-size: 15px; line-height: 1.6; color: var(--soft); max-width: 52ch; }

/* the row: the phones straight on the page */
.as-row { display: flex; justify-content: center; align-items: flex-start; gap: 36px; }

/* the caption under a row: what and why on the left, the embed for the phone in focus on the right */
.as-cap { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); margin-top: 56px; align-items: start; }
.as-cap-t { grid-column: 1 / span 6; }
.as-cap .code { grid-column: 8 / span 5; margin-top: 0; }
.as-cap .what { font-size: 15px; line-height: 1.55; color: var(--ink); max-width: 56ch; }
.as-cap .why { margin-top: 8px; font-size: 15px; line-height: 1.6; color: var(--soft); max-width: 60ch; }
.fig-line { margin-top: 16px; font-size: 13px; color: var(--soft); display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.fig-line a { color: var(--soft); text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: 3px; }
.fig-line a:hover, .fig-line a[aria-current] { color: var(--ink); text-decoration-color: var(--ink); }
.fig-line span + a { margin-left: 8px; }
.fig-line span { font-size: 12px; color: var(--faint); }
.code { border-radius: 12px; overflow: hidden; background: var(--hover); }
.code-head { height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 6px 0 14px;
  font-size: 12px; color: var(--soft); }
.code-head b { font-weight: 500; color: var(--ink); margin-left: 4px; }
.copy { height: 26px; padding: 0 9px; display: inline-flex; align-items: center; gap: 5px; border: 0; border-radius: 999px; background: none; font-size: 12px; color: var(--soft); cursor: pointer; }
.copy:hover { background: var(--hover); color: var(--ink); }
.copy i { font-size: 13px; }
.code pre { padding: 2px 14px 14px; font: 400 11px/1.7 var(--mono); color: var(--soft); white-space: pre-wrap; overflow-wrap: anywhere; }
.as-end { margin-top: 96px; }
.as-end a { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--soft); }
.as-end a:hover { color: var(--ink); }

/* ---------- the screen tokens, per product and theme (dark is the design; light matches it) ---------- */
.phone {
  --s-bg: #0a0a0b; --s-ink: #f7f8f8; --s-2: #d0d6e0; --s-3: #8a8f98; --s-4: #62666d; --s-line: #222327; --s-raise: #151618; --s-raise-2: #1d1e21;
  --s-frame: #2c2d32; --s-hi: rgba(255, 255, 255, .06); --s-shadow: 0 24px 60px -12px rgba(0, 0, 0, .7), 0 8px 18px -6px rgba(0, 0, 0, .5);
  --s-btn: #f0f0f1; --s-btn-ink: #0a0a0b; --s-hot-ink: #160b02; --s-scrim: rgba(0, 0, 0, .5);
  --ok: #4cb782; --warn: #f2c94c; --bad: #eb5757;
}
.phone.loom { --s-bg: #0d0c0b; --s-raise: #171614; --s-raise-2: #201e1b; --s-line: #262421; --s-2: #ddd6cc; --s-3: #948d84; --s-4: #6a645d; --s-frame: #302e2a; }
.phone.spoke { --s-bg: #0b0c0e; --s-raise: #14161a; --s-raise-2: #1c1f24; --s-line: #22252b; --s-2: #cfd6e2; --s-3: #8790a0; --s-4: #5f6673; --s-frame: #2b2e35; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .phone { --s-bg: #ffffff; --s-ink: #17171a; --s-2: #3c3c43; --s-3: #6e6e78; --s-4: #a0a0aa; --s-line: #ececef; --s-raise: #f4f4f6; --s-raise-2: #ebebee;
    --s-frame: #d6d6dc; --s-hi: rgba(255, 255, 255, .9); --s-shadow: 0 24px 50px -16px rgba(24, 24, 27, .22), 0 6px 14px -6px rgba(24, 24, 27, .12);
    --s-btn: #17171a; --s-btn-ink: #ffffff; --s-scrim: rgba(24, 24, 27, .28); --ok: #2f9e6a; --warn: #c7951a; --bad: #d64545; }
  :root:not([data-theme="dark"]) .phone.loom { --s-bg: #fdfcfa; --s-raise: #f5f3ef; --s-raise-2: #ece9e3; --s-line: #ebe8e2; --s-2: #403b35; --s-3: #736c63; --s-4: #a59e94; --s-frame: #dad6ce; --s-ink: #1b1916; }
  :root:not([data-theme="dark"]) .phone.spoke { --s-bg: #f6f7f9; --s-raise: #ffffff; --s-raise-2: #eaedf1; --s-line: #e1e4ea; --s-2: #3a404b; --s-3: #697180; --s-4: #9aa1ad; --s-frame: #d5d9e0; --s-ink: #15181d; }
}
:root[data-theme="light"] .phone { --s-bg: #ffffff; --s-ink: #17171a; --s-2: #3c3c43; --s-3: #6e6e78; --s-4: #a0a0aa; --s-line: #ececef; --s-raise: #f4f4f6; --s-raise-2: #ebebee;
  --s-frame: #d6d6dc; --s-hi: rgba(255, 255, 255, .9); --s-shadow: 0 24px 50px -16px rgba(24, 24, 27, .22), 0 6px 14px -6px rgba(24, 24, 27, .12);
  --s-btn: #17171a; --s-btn-ink: #ffffff; --s-scrim: rgba(24, 24, 27, .28); --ok: #2f9e6a; --warn: #c7951a; --bad: #d64545; }
:root[data-theme="light"] .phone.loom { --s-bg: #fdfcfa; --s-raise: #f5f3ef; --s-raise-2: #ece9e3; --s-line: #ebe8e2; --s-2: #403b35; --s-3: #736c63; --s-4: #a59e94; --s-frame: #dad6ce; --s-ink: #1b1916; }
:root[data-theme="light"] .phone.spoke { --s-bg: #f6f7f9; --s-raise: #ffffff; --s-raise-2: #eaedf1; --s-line: #e1e4ea; --s-2: #3a404b; --s-3: #697180; --s-4: #9aa1ad; --s-frame: #d5d9e0; --s-ink: #15181d; }

/* ---------- the phone: a hairline frame with a faint inner highlight; the ones out of focus dimmed ---------- */
.phone { position: relative; flex: none; width: 280px; height: 588px; overflow: hidden; display: flex; flex-direction: column; isolation: isolate;
  border: 1px solid var(--s-frame); border-radius: 46px; background: var(--s-bg); color: var(--s-ink); cursor: default;
  box-shadow: inset 0 1px 0 var(--s-hi), inset 0 0 0 1px var(--s-hi), var(--s-shadow);
  font: 400 13px/1.45 'Inter', system-ui, -apple-system, sans-serif; font-feature-settings: 'cv11', 'ss03'; letter-spacing: -0.006em;
  }
/* out of focus: the screen's contents dim, the frame and the island stay as hardware */
.phone > :not(.p-status, .home), .p-status > :not(.isl) { transition: opacity .35s cubic-bezier(.2, .7, .2, 1); }
.phone:not(.sel) > :not(.p-status, .home), .phone:not(.sel) .p-status > :not(.isl) { opacity: .5; }
.phone:not(.sel):hover > :not(.p-status, .home), .phone:not(.sel):hover .p-status > :not(.isl) { opacity: .8; }
.phone button { font: inherit; letter-spacing: inherit; color: inherit; }
.phone :focus-visible { outline: 1.5px solid var(--s-ink); outline-offset: 2px; border-radius: 999px; }
.phone .mono { font-family: var(--mono); font-size: 12px; }

/* status bar with the island */
.p-status { position: relative; z-index: 2; height: 46px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 4px 26px 0 30px; }
.p-status b { font-size: 14px; font-weight: 590; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.p-status .isl { position: absolute; left: 50%; top: 11px; width: 84px; height: 24px; margin-left: -42px; border-radius: 12px; background: #000; }
.p-status .sys { display: flex; align-items: center; gap: 4px; font-size: 14px; }
.p-status .sys i:last-child { font-size: 19px; }

/* bars: a large title, a centred nav, a search bar */
.p-large { position: relative; z-index: 2; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 8px 20px 10px; }
.p-large b { font-size: 28px; line-height: 34px; font-weight: 650; letter-spacing: -0.03em; }
.p-acts { display: inline-flex; gap: 14px; font-size: 20px; color: var(--s-2); }
.p-nav { position: relative; z-index: 2; height: 44px; flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 0 16px; font-size: 15px; }
.p-nav b { font-weight: 590; letter-spacing: -0.015em; }
.p-nav b.wm { font-size: 16px; font-weight: 650; letter-spacing: -0.04em; }
.p-nav > :first-child { justify-self: start; }
.p-nav > :last-child { justify-self: end; }
.p-nav .back { display: inline-flex; align-items: center; gap: 2px; color: var(--s-2); }
.p-nav .back i { font-size: 18px; }
.p-nav .back.off { opacity: .3; }
.p-nav .p-acts { font-size: 20px; }
.p-skip { font-size: 14px; color: var(--s-3); }
.p-searchbar { flex: none; display: flex; align-items: center; gap: 12px; padding: 4px 16px 0 16px; }
.p-field-s { flex: 1; height: 36px; display: flex; align-items: center; gap: 7px; padding: 0 10px; border-radius: 10px; background: var(--s-raise-2); font-size: 15px; color: var(--s-ink); }
.p-field-s i { font-size: 16px; color: var(--s-3); }
.p-field-s .end { margin-left: auto; font-size: 15px; color: var(--s-4); }
.p-cancel { font-size: 15px; color: var(--s-2); }

/* segmented control */
.p-seg { flex: none; margin: 2px 16px 0; height: 32px; padding: 2px; display: grid; grid-template-columns: 1fr 1fr; border-radius: 999px; background: var(--s-raise-2); font-size: 13px; }
.p-seg.three, .p-seg.pick { grid-template-columns: repeat(3, 1fr); }
.p-seg > * { display: flex; align-items: center; justify-content: center; border: 0; border-radius: 999px; background: none; color: var(--s-3); font-weight: 510; white-space: nowrap; }
.p-seg > .on { background: var(--s-bg); color: var(--s-ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .25), inset 0 0 0 1px var(--s-line); }
.p-seg em { font-style: normal; color: var(--s-4); margin-left: 4px; font-variant-numeric: tabular-nums; }
.p-seg.pick { margin: 16px 0 0; width: 100%; }
.p-seg.pick > * { cursor: pointer; transition: background .2s, color .2s; }
.p-seg.pick > :not(.on):hover { color: var(--s-ink); }

/* chips */
.p-chips { flex: none; height: 44px; display: flex; align-items: center; gap: 6px; padding: 0 16px; overflow: hidden; white-space: nowrap; }
.chip { height: 28px; flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 0 9px 0 11px; border-radius: 999px; background: var(--s-raise-2);
  font-size: 13px; font-weight: 510; color: var(--s-2); transition: opacity .2s, transform .2s; }
.chip i { font-size: 11px; color: var(--s-3); }
.chip.on { background: var(--s-ink); color: var(--s-bg); }
.chip.all { padding: 0 8px 0 10px; gap: 5px; background: none; box-shadow: inset 0 0 0 1px var(--s-line); }
.chip.all i { font-size: 14px; color: var(--s-2); }
.chip.all em { font-style: normal; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; display: grid; place-items: center; background: var(--s-ink); color: var(--s-bg); font-size: 11px; font-weight: 600; }
.chip.all em:empty { display: none; }
.chip.off { opacity: 0; transform: scale(.9); }
.p-chips .none { font-size: 13px; color: var(--s-3); }
.p-meta-row { flex: none; display: flex; justify-content: space-between; padding: 2px 20px 0; font-size: 12px; color: var(--s-3); font-variant-numeric: tabular-nums; }
.p-meta-row span:last-child { display: inline-flex; align-items: center; gap: 3px; }

/* the body: the figure, the heading, the line, the action */
.p-body { position: relative; z-index: 1; flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: safe center; padding: 0 24px 12px; text-align: center; }
.fig { position: relative; width: 100%; aspect-ratio: 5 / 4; flex: none; }
.fig .win { inset: 0; }
.fig .win :is(iframe, .kl-svg) { left: -15%; top: -15%; width: 130%; height: 130%; }
.p-h { margin-top: 10px; font-size: 18px; line-height: 1.25; font-weight: 590; letter-spacing: -0.022em; text-wrap: balance; }
.p-h.big { font-size: 22px; letter-spacing: -0.03em; }
.p-h.num { font-variant-numeric: tabular-nums; }
.p-line { margin-top: 6px; font-size: 14px; line-height: 1.45; color: var(--s-3); max-width: 28ch; text-wrap: pretty; }
.p-body > * { flex-shrink: 0; }
#pBag:has(.p-item:not([hidden])) .fig { width: auto; height: 150px; }
.p-body > .p-btn { margin-top: 18px; width: auto; min-width: 160px; }
.p-foot { position: relative; z-index: 2; flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 20px 26px; }

/* pills: the quiet primary (ink), the orange one (.hot, once per screen), the ghost, and plain text */
.p-btn { height: 44px; width: 100%; padding: 0 20px; border: 0; border-radius: 999px; background: var(--s-btn);
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 15px; font-weight: 590; letter-spacing: -0.012em; cursor: pointer; white-space: nowrap;
  transition: filter .15s, background .15s, color .15s; }
.phone .p-btn { color: var(--s-btn-ink); }
.p-btn:hover { filter: brightness(.92); }
.p-btn:active { filter: brightness(.85); }
.p-btn i { font-size: 16px; }
.phone .p-btn.hot { background: var(--kl); color: #fff; }
.p-btn.hot:hover { filter: brightness(1.07); }
.phone .p-btn.ghost { background: var(--s-raise-2); color: var(--s-ink); filter: none; }
.phone .p-btn.ghost:hover { background: var(--s-line); }
.phone .p-btn:disabled { background: var(--s-raise-2); color: var(--s-3); cursor: default; filter: none; }
.p-link { height: 32px; display: inline-flex; align-items: center; padding: 0 10px; border: 0; background: none; font-size: 14px; font-weight: 510; color: var(--s-3); cursor: pointer; border-radius: 999px; }
.p-link:hover { color: var(--s-ink); }
.p-link.quiet { cursor: default; }
.p-link.quiet:hover { color: var(--s-3); }

/* tab bar, and the home indicator under whatever sits at the foot */
.p-tabs { position: relative; z-index: 2; flex: none; display: flex; justify-content: space-around; padding: 7px 8px 30px; background: var(--s-bg); }
.p-tabs span { width: 52px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; font-weight: 510; letter-spacing: 0; color: var(--s-4); }
.p-tabs i { font-size: 23px; }
.p-tabs .on { color: var(--s-ink); }
.phone > .home { position: absolute; z-index: 6; left: 50%; bottom: 8px; width: 108px; height: 4px; margin-left: -54px; border-radius: 2px; background: var(--s-ink); opacity: .9; pointer-events: none; }
.p-foot:has(+ .p-tabs) { padding-bottom: 12px; }

/* rows: a bag item, a device, a date */
.p-item, .p-dev { width: 100%; margin-top: 16px; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--s-raise);
  text-align: left; }
.p-item .sw { width: 36px; height: 44px; flex: none; border-radius: 6px; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.p-item .it, .p-dev > span:not(.spin):not(.p-tag) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.p-item b, .p-dev b { font-size: 14px; font-weight: 590; letter-spacing: -0.012em; }
.p-item small, .p-dev small { font-size: 12px; color: var(--s-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-item .pr { font-size: 14px; font-weight: 510; font-variant-numeric: tabular-nums; }
.p-dev > i { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--s-raise-2); font-size: 18px; color: var(--s-2); }
.p-dev small.ok { color: var(--ok); }
.spin { width: 16px; height: 16px; flex: none; border-radius: 50%; border: 1.5px solid var(--s-line); border-top-color: var(--s-3); animation: spin 1s linear infinite; }
.spin.done { animation: none; border: 0; border-radius: 0; width: 16px; height: 16px; display: grid; place-items: center; color: var(--ok); }
.spin.done::after { content: ''; width: 9px; height: 5px; border: solid currentColor; border-width: 0 0 1.6px 1.6px; transform: translate(0, -1px) rotate(-45deg); }
@keyframes spin { to { transform: rotate(360deg); } }
.p-tag { height: 22px; padding: 0 9px; display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; background: var(--s-raise-2); font-size: 12px; font-weight: 510; color: var(--s-2); }
.p-tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--kl); }
.p-tag.ok::before { background: var(--ok); }
.p-body > .p-link { margin-top: 4px; }

/* lists: the receipt, the status rows */
.p-list { list-style: none; width: 100%; margin-top: 14px; text-align: left; font-size: 13px; }
.p-list li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; font-variant-numeric: tabular-nums; }
.p-list li.total { margin-top: 6px; }
.p-list li span:first-child { display: inline-flex; align-items: center; color: var(--s-2); }
.p-list li span:last-child { color: var(--s-3); white-space: nowrap; }
.p-list li.total span { color: var(--s-ink); font-weight: 590; }
.p-list .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 9px; background: var(--s-4); }
.p-list .dot.green { background: var(--ok); }
.p-list .dot.amber { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 22%, transparent); }
.p-note { margin-top: 10px; font-size: 12px; color: var(--s-3); }

/* the onboarding stepper: numbered steps with labels, a done step ticked, the phone's own step ringed */
.stepper { list-style: none; flex: none; display: grid; grid-template-columns: repeat(3, 1fr); padding: 6px 22px 0; counter-reset: st; }
.stepper li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; counter-increment: st; font-size: 12px; font-weight: 510; color: var(--s-4); }
.stepper i { position: relative; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--s-line);
  font-style: normal; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; transition: background .3s, color .3s, box-shadow .3s; }
.stepper i::after { content: counter(st); }
.stepper li.me { color: var(--s-ink); }
.stepper li.me i { box-shadow: inset 0 0 0 1.5px var(--s-ink); color: var(--s-ink); }
.stepper li.done { color: var(--s-2); }
.stepper li.done i { background: var(--s-ink); color: var(--s-bg); box-shadow: none; }
.stepper li.done i::after { content: ''; width: 9px; height: 5px; border: solid currentColor; border-width: 0 0 1.6px 1.6px; transform: translate(0, -1px) rotate(-45deg); }
.phone.drift .p-body { justify-content: flex-start; padding-top: 4px; }
.phone.drift .fig { width: auto; height: 156px; }
.phone.drift .p-foot { padding-bottom: 22px; gap: 0; }

/* the offline pill in the title bar */
.p-state { height: 26px; padding: 0 10px; display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; background: var(--s-raise-2); font-size: 12px; font-weight: 510; color: var(--s-2); white-space: nowrap; }
.p-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--bad); transition: background .3s; }
.p-state.ok i { background: var(--ok); }

/* charging: the progress line and three readings */
.p-prog { width: 100%; height: 4px; margin-top: 14px; background: var(--s-raise-2); border-radius: 2px; overflow: hidden; }
.p-prog i { display: block; height: 100%; width: calc(var(--p, 64) * 1%); background: var(--s-ink); border-radius: 2px; transition: width .6s cubic-bezier(.2, .7, .2, 1); }
.p-stats { width: 100%; margin-top: 14px; display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 16px; text-align: left; }
.p-stats dt { font-size: 11px; color: var(--s-3); }
.p-stats dd { margin-top: 1px; font-size: 15px; font-weight: 590; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

/* dots screens: the figure is large, cropped by the screen, faded at its foot, and the heading sits over its quiet part */
.phone.dots .fig { position: absolute; z-index: 0; left: -34%; width: 168%; top: 34px; aspect-ratio: 5 / 4;
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 52%, transparent 86%); mask-image: linear-gradient(to bottom, #000 0, #000 52%, transparent 86%); }
.phone.dots .fig .win :is(iframe, .kl-svg) { left: 0; top: 0; width: 100%; height: 100%; }
.phone.dots .p-body { justify-content: flex-end; align-items: flex-start; text-align: left; padding: 0 24px 16px; pointer-events: none; }
.phone.dots .p-body > * { pointer-events: auto; }
.phone.dots .p-body > .p-btn { width: 100%; }
.phone.dots .p-line { max-width: none; }
.phone.dots .p-h.num { font-size: 26px; letter-spacing: -0.035em; }
#pMaint .p-body { padding-bottom: 34px; }
.phone #pMaint .p-body > .p-btn, #pMaint .p-body > .p-btn { background: var(--s-raise-2); color: var(--s-ink); }

/* sheets, over a scrim */
.p-sheet { position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; background: var(--s-raise); border-radius: 28px 28px 0 0; box-shadow: 0 -1px 0 var(--s-line), 0 -18px 40px rgba(0, 0, 0, .28);
  padding: 10px 20px 30px; transform: translateY(102%); visibility: hidden; transition: transform .38s cubic-bezier(.2, .8, .2, 1), visibility 0s .38s; }
.open > .p-sheet { transform: none; visibility: visible; transition: transform .38s cubic-bezier(.2, .8, .2, 1), visibility 0s; }
.phone::before { content: ''; position: absolute; z-index: 4; inset: 0; background: var(--s-scrim); opacity: 0; pointer-events: none; transition: opacity .3s; }
.phone.open::before { opacity: 1; pointer-events: auto; }
.grab { display: block; width: 36px; height: 5px; margin: 0 auto 10px; border-radius: 3px; background: var(--s-4); opacity: .6; }
.p-sheet-head { display: flex; align-items: center; justify-content: space-between; font-size: 16px; font-weight: 590; letter-spacing: -0.015em; }
.p-x { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--s-raise-2); color: var(--s-3); cursor: pointer; margin-right: -4px; }
.phone .p-x { color: var(--s-3); }
.phone .p-x:hover { color: var(--s-ink); }
.p-menu { list-style: none; margin-top: 10px; }
.p-menu button { width: 100%; height: 48px; display: flex; align-items: center; gap: 12px; padding: 0 4px; border: 0; background: none;
  font-size: 15px; cursor: pointer; text-align: left; }
.p-menu button:hover { color: var(--s-2); }
.p-menu i { font-size: 20px; color: var(--s-3); }
.p-menu small { margin-left: auto; font-size: 12px; color: var(--s-3); }
.p-field { display: flex; align-items: baseline; gap: 10px; padding: 6px 0; font-size: 14px; }
.p-field > span:first-child { color: var(--s-3); width: 48px; flex: none; }
.p-draft { margin: 12px 0 18px; font-size: 14px; line-height: 1.5; color: var(--s-ink); min-height: 84px; }
.p-sheet .p-btn { margin-top: 4px; }
.p-sheet .p-list { margin-top: 8px; }

[hidden] { display: none !important; }
.swap { animation: swap .3s cubic-bezier(.2, .7, .2, 1); }
@keyframes swap { from { opacity: 0; transform: translateY(4px); } }

/* ---------- smaller screens ---------- */
@media (max-width: 1300px) {
  .as-row.four { display: grid; grid-template-columns: repeat(2, 280px); justify-content: center; gap: 40px 48px; }
  .as-cap-t { grid-column: 1 / -1; }
  .as-cap .code { grid-column: 1 / -1; margin-top: 20px; max-width: 640px; }
}
@media (max-width: 1000px) { .as-row.three { gap: 20px; } }
@media (max-width: 900px) {
  .as { padding-top: 56px; }
  .as-head h1 { font-size: 36px; }
  .as-head p { font-size: 17px; }
  .as-sec { margin-top: 96px; }
  .as-sec:first-of-type { margin-top: 64px; }
  .as-sec-head { display: block; margin-bottom: 28px; }
  .as-sec-head h2 { font-size: 24px; }
  .as-sec-head p { margin-top: 10px; }
}
@media (max-width: 960px) {
  /* the rows become sideways strips that snap a phone at a time */
  .as-row, .as-row.four, .as-row.three { display: flex; justify-content: flex-start; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
    margin-inline: calc(-1 * var(--gutter)); padding: 8px var(--gutter) 40px; scroll-padding-inline: var(--gutter); scrollbar-width: none; overscroll-behavior-x: contain; }
  .as-row::-webkit-scrollbar { display: none; }
  .as-row::after { content: ''; flex: none; width: 1px; }
  .phone { scroll-snap-align: start; }
  .as-cap { margin-top: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .swap { animation: none; }
  .spin { animation: none; }
  .p-sheet, .open > .p-sheet, .p-btn, .chip, .stepper i, .p-prog i, .phone > *, .p-status > *, .phone::before { transition: none; }
}
/* the gift's lid lifts above the box: give it head room */
#pGift .fig .win :is(iframe, .kl-svg) { left: -6%; top: -2%; width: 112%; height: 112%; }
