/* AI Pay marketing site (v4). Tokens and the glass / liquid material come from brand.css
 * (the product's own stylesheet); this file lays out the static parts of the page: the header,
 * the hero in its static state, and the introduction (how → wallet → developers → questions →
 * contact → closing → footer). The scroll-driven scenes, the hero's glass state and the film
 * are in acts.css.
 * One hue. System fonts. Headings light-to-medium with tight tracking. Money to six decimals.
 * Order: type → buttons → header → hero meter → mock-UI parts → how → wallet → developers →
 * questions → contact → closing → footer → breakpoints → preferences. */

:root {
  --font:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang TC", system-ui,
    sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 40px);
  --step: 54px; /* one receipt pill slot */
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 104px;
  scroll-padding-bottom: 24px;
}
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--page);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
/* The product canvas: a soft blue glow in the top-right corner over pale sky.
 * Fixed, so glass always has the same light behind it. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at 90% 0, var(--canvas-light), transparent 60%), var(--page);
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p,
ul,
ol,
figure,
fieldset {
  margin: 0;
  padding: 0;
}
ul,
ol {
  list-style: none;
}
fieldset {
  border: 0;
  min-width: 0;
}
svg {
  display: block;
}
a {
  color: var(--link);
}
code,
pre {
  font-family: var(--mono);
}
:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
}
/* Plain links get a soft corner on the focus ring; zero specificity, so pills stay pills. */
:where(a:focus-visible, button:focus-visible, summary:focus-visible) {
  border-radius: 8px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 50;
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--on-accent);
  background: var(--accent);
  font-size: 15px;
  font-weight: 560;
  text-decoration: none;
}
.skip:focus {
  top: 12px;
}
.wrap {
  width: min(1120px, 100% - 2 * var(--gutter));
  margin-inline: auto;
}
.center {
  text-align: center;
}
.ico {
  flex: none;
  width: 18px;
  height: 18px;
}
/* Keeps a short run together: the product name never breaks at its hyphen. */
.nb {
  white-space: nowrap;
}

/* ── Type ────────────────────────────────────────────────────────────────── */
.eyebrow {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
h1 {
  max-width: 15em;
  font-size: clamp(2.5rem, 1.15rem + 5.6vw, 4.75rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.04;
  text-wrap: balance;
}
.h-line {
  display: block;
}
.h-accent {
  color: var(--link);
}
.title {
  font-size: clamp(1.9rem, 1.15rem + 2.9vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.12;
  text-wrap: balance;
}
.lede {
  max-width: 30em;
  margin-top: 20px;
  color: var(--muted-strong);
  font-size: clamp(1.0625rem, 0.95rem + 0.5vw, 1.3125rem);
  line-height: 1.5;
}
.lede-sm {
  max-width: 31em;
  margin-top: 16px;
  color: var(--muted-strong);
}
/* No stranded last words: the short texts are balanced ("pretty" alone still leaves one-word
 * last lines, and does nothing for Han text); only the longer FAQ answers use "pretty". */
.lede,
.lede-sm,
.cta-note,
.wallet-unit,
.aside,
.step-text,
.step-cap,
.note,
.dev-fact,
.code-cap,
.qa-q,
.panel-title,
.foot-note {
  text-wrap: balance;
}
.qa-a {
  text-wrap: pretty;
}

/* ── Buttons and links ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 560;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.2s var(--motion-ease);
  -webkit-tap-highlight-color: transparent;
}
.btn.liquid-button {
  color: var(--on-accent);
}
.btn.liquid-button:hover {
  --liquid-body: color-mix(in srgb, var(--accent-hover) var(--glass-tint), transparent);
}
.btn:not(.liquid-button):hover {
  --liquid-body: color-mix(in srgb, var(--surface) 86%, transparent);
}
.btn:active {
  transform: scale(0.975);
}
.btn-lg {
  min-height: 56px;
  padding: 14px 28px;
  font-size: 17px;
}
.btn-lg .ico {
  width: 20px;
  height: 20px;
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 4px;
  color: var(--link);
  font-size: 16px;
  font-weight: 550;
  text-decoration: none;
}
.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 22px;
  margin-top: 28px;
}
.cta-start {
  justify-content: flex-start;
}
.cta-stack {
  display: grid;
  justify-items: center;
  margin-top: 28px;
}
.cta-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}
.cta-stack .text-link {
  margin-top: 4px;
}
.text-link .ico {
  width: 16px;
  height: 16px;
}

/* ── Header: the product's floating glass bar ────────────────────────────── */
.site-header {
  position: sticky;
  top: 12px;
  z-index: 40;
  width: min(1120px, 100% - 2 * var(--gutter) + 16px);
  margin: 12px auto 0;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 8px 10px 8px 16px;
  border-radius: 999px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  font-size: 26px;
  font-weight: 520;
  letter-spacing: -1.5px;
  line-height: 1;
  text-decoration: none;
}
/* The wordmark (inline SVG, viewBox 980.1 × 300.8). Its height follows .brand's font-size, so every
 * breakpoint that resizes the old text wordmark resizes this one. Letters take --ink; the gradient band
 * keeps its own colours. The white band under it is paper on a light ground and is switched off on a
 * dark one (the letters already have the band's gap cut out; white on white letters would smear). */
.aipay-logo {
  display: block;
  flex: none;
  width: auto;
  height: 1em;
  aspect-ratio: 980.1 / 300.8;
  translate: 0 0.09em; /* the "y" hangs below the line: centre the capitals, not the box */
  color: var(--ink);
  overflow: visible;
}
.aipay-logo-band {
  fill: #fff;
}
html.over-top .site-header .aipay-logo-band {
  fill: none;
}
@media (prefers-color-scheme: dark) {
  .aipay-logo-band {
    fill: none;
  }
}
.brand-sm {
  font-size: 21px;
  letter-spacing: -1.1px;
}
.beta-chip {
  padding: 1px 8px;
  border: 1px solid color-mix(in srgb, var(--warning) 38%, transparent);
  border-radius: 999px;
  color: var(--warning);
  background: var(--warning-soft);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
}
.beta-lg {
  display: inline-block;
  padding: 3px 12px;
  font-size: 13px;
}
.topbar-links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}
.topbar-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted-strong);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}
.topbar-link:hover {
  color: var(--ink);
}
.topbar-links .btn {
  margin-left: 6px;
}
/* "Sign up free": the last word is dropped on small phones (see below). The label is two
 * flex items, so the gap is closed and the space inside the span is kept. */
.topbar-links .btn {
  gap: 0;
}
.btn-more {
  white-space: pre;
}
.topbar-contact {
  gap: 7px;
}
.topbar-contact .ico {
  width: 17px;
  height: 17px;
  color: var(--link);
}

/* ── Hero, static state (no glass canvas): copy and meter, stacked ───────────
 * The glass state (html.has-glass) is in acts.css. */
.act-hero {
  padding: clamp(36px, 5.4vw, 72px) 0 clamp(36px, 5vw, 64px);
  text-align: center;
}
.act-hero .act-pin {
  display: grid;
  justify-items: center;
  width: min(1120px, 100% - 2 * var(--gutter));
  margin-inline: auto;
}
.hero-copy {
  display: grid;
  justify-items: center;
  justify-self: stretch;
  min-width: 0;
}
.glass-stage,
.hero-apps,
.hero-flag {
  display: none;
}

/* The meter: a glass wallet card, and receipts that slide out from under it. */
.meter {
  position: relative;
  isolation: isolate;
  width: min(100%, 640px);
  margin-top: clamp(32px, 3.6vw, 44px);
  text-align: left;
}
.wallet {
  position: relative;
  z-index: 1;
  /* The balance is sized from this card's inner width (cqw below), so it fits at any width. */
  container-type: inline-size;
  padding: 16px clamp(20px, 5vw, 36px) 26px;
  /* The product wallet card: canvas light in the top-right corner of the glass. */
  background:
    radial-gradient(ellipse at 100% 0%, var(--canvas-light), transparent 68%), var(--glass-panel-bg);
}
.wallet-top {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
}
.wallet-label {
  color: var(--muted-strong);
  font-size: 14px;
  white-space: nowrap;
}
.sim-flag {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.sim-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.ctl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 14px 8px 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
  font-weight: 550;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.2s var(--motion-ease);
  -webkit-tap-highlight-color: transparent;
}
.ctl:active {
  transform: scale(0.975);
}
.ctl .ico {
  width: 16px;
  height: 16px;
  color: var(--link);
}
.ctl-label,
.ctl .ico {
  display: none;
}
.ctl[data-state="running"] :is(.ico-pause, [data-when="running"]),
.ctl[data-state="paused"] :is(.ico-play, [data-when="paused"]),
.ctl[data-state="done"] :is(.ico-play, [data-when="done"]),
.ctl[data-state="manual"] :is(.ico-play, [data-when="manual"]) {
  display: block;
}

/* Six-decimal balance. Tabular digits; each digit becomes an odometer reel in JS. */
.balance {
  --lh: 1.1;
  margin-top: 4px;
  font-size: clamp(2.75rem, 14.6vw, 6.25rem);
  /* Ten glyphs are about 5.3em wide; 17.6% of the card's inner width keeps them inside it. */
  font-size: min(17.6cqw, 6.25rem);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.05em;
  line-height: var(--lh);
  white-space: nowrap;
}
.odo-frac {
  position: relative;
  display: inline-block;
}
/* The decimal ruler: one tick per place, the sixth in the action colour. */
.odo-frac::after,
.odo-frac::before {
  content: "";
  position: absolute;
  left: 0.025em;
  right: 0.025em;
  bottom: -0.06em;
  height: 0.085em;
  min-height: 5px;
  pointer-events: none;
  background:
    linear-gradient(
      to right,
      transparent calc(50% - 0.5px),
      var(--border-strong) calc(50% - 0.5px) calc(50% + 0.5px),
      transparent calc(50% + 0.5px)
    )
    0 0 / calc(100% / 6) 100% repeat-x;
  border-top: 1px solid var(--border-strong);
}
.odo-frac::before {
  left: auto;
  width: calc((100% - 0.05em) / 6);
  height: 0.16em;
  min-height: 9px;
  bottom: calc(-0.06em - 0.075em);
  border-top: 0;
  background: linear-gradient(
    to right,
    transparent calc(50% - 1px),
    var(--accent) calc(50% - 1px) calc(50% + 1px),
    transparent calc(50% + 1px)
  );
}
.reel {
  position: relative;
  display: inline-block;
}
.reel-size {
  visibility: hidden;
}
/* The window is clipped to one digit height and fades digits at its edges; it is
 * absolutely positioned, so the reel keeps the baseline of its hidden sizing digit. */
.reel-win {
  position: absolute;
  inset: 0 -0.1em;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 2%,
    #000 24%,
    #000 76%,
    transparent 98%
  );
  mask-image: linear-gradient(to bottom, transparent 2%, #000 24%, #000 76%, transparent 98%);
}
.reel-strip {
  position: absolute;
  top: 0;
  left: 0.1em;
  display: flex;
  flex-direction: column;
  width: calc(100% - 0.2em);
  transform: translateY(calc(var(--i, 10) * -100% / 30));
  transition: transform var(--dur, 0.7s) var(--motion-ease) var(--delay, 0s);
}
.reel-strip > span {
  display: block;
  flex: none;
  height: calc(var(--lh) * 1em);
}
.reel-strip.no-anim {
  transition: none;
}
.wallet-unit {
  margin-top: 20px;
  color: var(--muted);
  font-size: 13.5px;
}

/* Receipt tape: two liquid pills; a new one slides out from under the glass card. */
.tape {
  position: relative;
  z-index: 0;
  width: min(100% - 48px, 440px);
  height: calc(2 * var(--step));
  margin: 2px auto 0;
}
.rc {
  position: absolute;
  inset: 0 0 auto;
  height: var(--step);
  padding-top: 8px;
  transform: translateY(calc(var(--slot) * var(--step)));
  transition:
    transform 0.8s var(--motion-ease),
    opacity 0.35s linear;
}
.rc:nth-child(1) {
  --slot: 0;
}
.rc:nth-child(2) {
  --slot: 1;
}
.rc.is-pre {
  transition: none;
}
/* The receipt that leaves fades faster than it travels: it is gone before it reaches the
 * caption under the tape. */
.rc.is-out {
  opacity: 0;
  transition:
    transform 0.8s var(--motion-ease),
    opacity 0.14s linear;
}
.rc-face {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: calc(var(--step) - 8px);
  padding: 0 18px 0 14px;
  font-size: 15px;
  line-height: 1.2;
}
.rc-tick {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--link);
}
.rc-app {
  overflow: hidden;
  font-weight: 560;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rc-amt {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  font-weight: 560;
  white-space: nowrap;
}
.meter-cap {
  margin-top: 14px;
  color: var(--muted);
  font-size: 14.5px;
  text-align: center;
}

/* ── Sections ────────────────────────────────────────────────────────────── */
.section {
  padding: clamp(44px, 6vw, 84px) 0;
}

/* Small parts shared by the mock UI: the "Simulated" flag (.sim-flag, above), status
 * chips (the product's badge recipe), the thin spend bar and the sample-app chip. */
.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--success);
  background: var(--success-soft);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
  white-space: nowrap;
}
.status.is-paused {
  border-color: var(--warning);
  color: var(--warning);
  background: var(--warning-soft);
}
.status.is-revoked {
  border-color: var(--danger);
  color: var(--danger);
  background: var(--danger-soft);
}
.limit-bar {
  display: block;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-strong);
}
.limit-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transform: scaleX(var(--used, 0.3));
  transform-origin: left center;
}
.chip-app {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid var(--glass-line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--glass-input-bg);
  font-size: 15px;
  font-weight: 560;
  white-space: nowrap;
}
.chip-tag {
  padding: 1px 7px;
  border-radius: 999px;
  color: var(--muted-strong);
  background: var(--surface-strong);
  font-family: var(--font);
  font-size: 11.5px;
  font-weight: 550;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* ── How it works: three numbered steps, one specimen each ───────────────── */
.steps {
  display: grid;
  gap: 40px 24px;
  max-width: 560px;
  margin: clamp(32px, 4.5vw, 56px) auto 0;
}
.step {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
}
.step-text {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  color: var(--ink);
  font-size: 1.0625rem;
  line-height: 1.45;
}
.step-n {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-top: -3px;
  border: 1px solid var(--selection-border);
  border-radius: 50%;
  color: var(--selection-ink);
  background: var(--selection-solid);
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.step-cap {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
}
.specimen {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  min-width: 0;
  padding: 52px 22px 26px;
  border-radius: var(--radius-panel);
  text-align: center;
}
.specimen > .sim-flag {
  position: absolute;
  top: 16px;
  right: 20px;
  margin: 0;
}
.aside {
  max-width: 44em;
  margin: clamp(28px, 4vw, 44px) auto 0;
  color: var(--muted);
  font-size: 15px;
}

/* Step 1 — not a mock: the button is the real way in. */
.spec-signin {
  padding-top: 30px;
  padding-bottom: 30px;
}
.spec-signin .brand-symbol {
  width: 48px;
  height: 48px;
  border-radius: 16px;
}
.spec-signin .brand-symbol svg {
  width: 26px;
  height: 26px;
}
.spec-title {
  font-size: 1.1875rem;
  font-weight: 520;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.spec-signin .btn {
  max-width: 100%;
  min-height: 48px;
  margin-top: 8px;
}

/* Step 2 — the consent card. It is a real form driven by three checkboxes, so it works
 * without JavaScript: allow → (pause ⇄ resume) → revoke → reset. The inputs come first in
 * .consent-foot; everything after them reacts through sibling selectors. */
.consent {
  align-content: start;
  justify-items: stretch;
  gap: 0;
  text-align: left;
}
.consent-title {
  font-size: 1.1875rem;
  font-weight: 520;
  letter-spacing: -0.02em;
  line-height: 1.3;
  text-wrap: balance;
}
/* Once allowed, the question gives way to the app's name; the status chip says the rest. */
.consent-done,
.consent:has(#c-allow:checked) .consent-ask {
  display: none;
}
.consent:has(#c-allow:checked) .consent-done {
  display: inline;
}
.limit-list {
  display: grid;
  margin-top: 16px;
  border-top: 1px solid var(--glass-line);
}
.limit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 50px;
  padding: 6px 0;
  border-bottom: 1px solid var(--glass-line);
  font-size: 15px;
}
.limit-name {
  color: var(--muted-strong);
}
.limit-val {
  font-variant-numeric: tabular-nums;
  font-weight: 560;
}
.limit-chips {
  display: grid;
  grid-template-columns: repeat(3, minmax(50px, 1fr));
  gap: 6px;
}
.limit-chips label {
  display: grid;
  place-items: center;
  min-height: 38px;
  padding: 0 8px;
  border: 1px solid var(--glass-line);
  border-radius: 12px;
  background: var(--glass-input-bg);
  color: var(--ink);
  font-size: 14.5px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease;
}
.limit-chips input:checked + label {
  border-color: var(--selection-border);
  color: var(--selection-ink);
  background: var(--selection-solid);
  font-weight: 560;
}
/* The limits are chosen before allowing; afterwards the card only shows them. */
.consent:has(#c-allow:checked) .limit-chips label {
  pointer-events: none;
}
.consent:has(#c-allow:checked) .limit-chips input:not(:checked) {
  display: none;
}
.consent:has(#c-allow:checked) .limit-chips input:not(:checked) + label {
  opacity: 0.42;
}
.limit-chips input:focus-visible + label,
#c-allow:focus-visible ~ .consent-allow,
#c-pause:focus-visible ~ .consent-live [for="c-pause"],
#c-revoke:focus-visible ~ .consent-live [for="c-revoke"] {
  outline: 2px solid var(--link);
  outline-offset: 3px;
}
.consent-foot {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 48px;
  margin-top: 18px;
}
/* The simulated "Allow" is tinted, not solid: solid blue on this page always means sign-up. */
.consent-allow {
  --liquid-body: color-mix(in srgb, var(--selection-solid) 88%, transparent);
  width: 100%;
  min-height: 48px;
  color: var(--selection-ink);
  font-size: 16px;
}
.btn.consent-allow:hover {
  --liquid-body: var(--selection-solid);
}
.consent-live {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}
.consent-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
  font-weight: 560;
  white-space: nowrap;
}
.consent-ctl {
  display: inline-flex;
  gap: 8px;
  margin-left: auto;
}
.mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 560;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.2s var(--motion-ease);
  -webkit-tap-highlight-color: transparent;
}
.mini:hover {
  --liquid-body: color-mix(in srgb, var(--surface) 86%, transparent);
}
.mini:active {
  transform: scale(0.975);
}
/* Asking: only "Allow". */
#c-allow:not(:checked) ~ .consent-live,
#c-allow:not(:checked) ~ :is(#c-pause, #c-revoke),
#c-allow:checked,
#c-allow:checked ~ .consent-allow {
  display: none;
}
/* Allowed: one status chip at a time; "Pause" turns into "Resume". */
.consent .status,
.mini-label[data-when="on"],
.consent-reset,
#c-pause:checked ~ .consent-live .mini-label[data-when="off"] {
  display: none;
}
#c-allow:checked ~ .consent-live .is-active,
#c-pause:checked ~ .consent-live .is-paused,
#c-revoke:checked ~ .consent-live .is-revoked {
  display: inline-flex;
}
#c-pause:checked ~ .consent-live .mini-label[data-when="on"] {
  display: inline;
}
#c-pause:checked ~ .consent-live .is-active,
#c-revoke:checked ~ .consent-live :is(.is-active, .is-paused) {
  display: none;
}
/* Revoked: the controls give way to "Start again" (a plain form reset). */
#c-revoke:checked,
#c-revoke:checked ~ .consent-live label,
#c-revoke:checked ~ .consent-live .rc-tick,
.consent-foot:has(#c-revoke:checked) #c-pause {
  display: none;
}
#c-revoke:checked ~ .consent-live .consent-reset {
  display: inline-flex;
}
#c-revoke:checked ~ .consent-live .consent-word {
  display: none;
}

/* Step 3 — app → model request → receipt. */
.spec-flow {
  gap: 8px;
}
.spec-flow > :not(.sim-flag) {
  transition: opacity 0.3s ease;
}
/* Paused or revoked in step 2: no new requests, so the flow dims. */
.steps:has(:is(#c-pause, #c-revoke):checked) .spec-flow > :not(.sim-flag) {
  opacity: 0.38;
}
.flow-arrow {
  color: var(--border-strong);
}
.chip-model {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 8px;
  max-width: 100%;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
  color: var(--muted-strong);
  font-size: 12.5px;
}
.slip {
  display: grid;
  gap: 10px;
  justify-items: center;
  width: min(100%, 280px);
}
.slip-id {
  color: var(--muted);
  font-size: 12.5px;
}

/* ── See every request: the wallet and its apps, beside the receipts — one of them opened ── */
.duo {
  display: grid;
  gap: 24px;
  margin-top: clamp(32px, 4.5vw, 56px);
}
.panel {
  min-width: 0;
  padding: clamp(20px, 3vw, 32px);
}
.panel-top {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 32px;
}
.panel-title {
  font-size: 1.375rem;
  font-weight: 520;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.ledger {
  background:
    radial-gradient(ellipse at 100% 0%, var(--canvas-light), transparent 62%), var(--glass-panel-bg);
}
.panel-balance {
  margin-top: 2px;
  font-size: clamp(2.375rem, 1.5rem + 3.4vw, 3.5rem);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.045em;
  line-height: 1.12;
  white-space: nowrap;
}
.ledger .wallet-unit {
  margin-top: 8px;
}
.panel-h {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--glass-line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.apps {
  display: grid;
  gap: 16px;
  margin-top: 14px;
}
.app-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 12px;
}
.app-name {
  overflow: hidden;
  font-size: 16px;
  font-weight: 560;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-spend {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}
.app-spend b {
  color: var(--ink);
  font-weight: 560;
}
.app-row .limit-bar {
  grid-column: 1 / -1;
  margin-top: 2px;
}
.app-row:nth-child(1) {
  --used: 0.428;
}
.app-row:nth-child(2) {
  --used: 0.083;
}
.app-row:nth-child(3) {
  --used: 0.654;
}
.app-row:has(.is-paused) .limit-fill {
  background: var(--held);
}
.receipts {
  display: grid;
  gap: 2px;
  margin: 12px -10px 0;
}
.rcpt {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0 10px;
  min-height: 52px;
  padding: 7px 10px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.3;
}
.rcpt .rc-tick {
  grid-row: 1 / span 2;
}
.rcpt-app {
  overflow: hidden;
  font-weight: 560;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rcpt-model {
  grid-area: 2 / 2;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rcpt-amt {
  grid-area: 1 / 3 / span 2;
  font-variant-numeric: tabular-nums;
  font-weight: 560;
  white-space: nowrap;
}
/* The first receipt is opened in place: its row and its fields share one tinted frame. */
.rcpt-open {
  margin-bottom: 6px;
  padding-bottom: 10px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--selection-solid) 46%, transparent);
  box-shadow: inset 0 0 0 1px var(--selection-border);
}
.fields {
  margin: 2px 10px 0;
  padding: 2px 14px;
  border: 1px solid var(--glass-line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.45;
}
.field {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 16px;
  padding: 9px 0;
}
.field + .field {
  border-top: 1px dashed var(--glass-line);
}
.field dt {
  color: var(--muted);
}
.field dd {
  margin: 0 0 0 auto;
  color: var(--ink);
  text-align: right;
  white-space: nowrap;
}
.field-eq {
  color: var(--link);
  font-weight: 600;
}
.panel-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}
/* Two plain sentences under the panels: one about the balance, one about the receipts. */
.notes {
  display: grid;
  gap: 14px 24px;
  margin-top: 22px;
}
.note {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  /* Lines up with the text inside the panel above it. */
  padding-inline: clamp(4px, 3vw, 32px);
  color: var(--muted-strong);
  font-size: 15px;
  line-height: 1.45;
}
.note .ico {
  box-sizing: border-box;
  width: 34px;
  height: 34px;
  padding: 8px;
  border-radius: 50%;
  color: var(--selection-ink);
  background: var(--selection-solid);
}
.note-glyph {
  display: grid;
  place-items: center;
  padding: 0 0 2px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
}

/* For developers: one glass sheet, copy beside the product's dark code block. */
.dev {
  display: grid;
  align-items: center;
  gap: 32px;
  padding: clamp(24px, 4.5vw, 56px);
}
.dev .title {
  font-size: clamp(1.75rem, 1.1rem + 2.3vw, 2.625rem);
}
.code-block {
  min-width: 0;
  padding: 22px 24px;
  overflow-x: auto;
  border: 1px solid rgb(255 255 255 / 7%);
  border-radius: 20px;
  color: #f2f4f7;
  /* Scroll hint: a soft light at the right edge while there is more code to the right. The first
   * layer travels with the code and covers the light once the end is reached (or nothing overflows). */
  background:
    linear-gradient(to left, #202327 45%, rgb(32 35 39 / 0%)) right / 40px 100% no-repeat local,
    linear-gradient(to left, rgb(255 255 255 / 20%), rgb(255 255 255 / 0%)) right / 16px 100%
    no-repeat scroll,
    #202327;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 8%),
    0 18px 40px -26px rgb(14 52 92 / 55%);
  font-size: 13.5px;
  line-height: 1.75;
}
.code-block pre {
  margin: 0;
}
/* One CLI command per block, so a long one can wrap on a phone (see below) instead of scrolling. */
.cmd {
  display: block;
}
.tok-k {
  color: #49b5fe;
}
.tok-s {
  color: #f0c583;
}
.tok-p {
  color: #a0d5f5;
}
.tok-c {
  color: #aab2ba;
}

.code-stack {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.code-cli {
  padding-block: 16px;
}
.code-cap {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
}
.code-cap code {
  padding: 1px 6px;
  border-radius: 6px;
  color: var(--ink);
  background: var(--surface-strong);
  font-size: 12.5px;
}
.dev-facts {
  display: grid;
  gap: 6px;
  max-width: 31em;
  margin-top: 14px;
}
.dev-fact {
  position: relative;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14.5px;
}
.dev-fact::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.dev-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
  margin-top: 8px;
}

/* ── Questions: one glass sheet, native <details> rows, hairlines between ── */
.faq {
  width: min(100%, 800px);
  margin: clamp(28px, 4vw, 48px) auto 0;
  padding: 6px clamp(18px, 3vw, 30px);
}
.qa + .qa {
  border-top: 1px solid var(--glass-line);
}
.qa summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 66px;
  margin-inline: -12px;
  padding: 14px 12px;
  border-radius: 14px;
  font-size: 1.125rem;
  font-weight: 520;
  letter-spacing: -0.012em;
  line-height: 1.35;
  list-style: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.qa summary::-webkit-details-marker {
  display: none;
}
.qa summary:focus-visible {
  outline-offset: -3px;
  border-radius: 14px;
}
.qa summary:hover .qa-q {
  color: var(--link);
}
.qa-ico {
  width: 20px;
  height: 20px;
  color: var(--link);
  transition: transform 0.35s var(--motion-ease);
}
.qa[open] .qa-ico {
  transform: rotate(45deg);
}
.qa-a {
  max-width: 40em;
  padding: 0 36px 22px 0;
  color: var(--muted-strong);
  font-size: 16px;
}

/* ── Contact: the address is the loudest thing in the block ──────────────── */
.contact {
  padding-block: 0;
}
.contact-card {
  display: grid;
  justify-items: center;
  width: min(100%, 800px);
  margin-inline: auto;
  gap: clamp(18px, 2.4vw, 26px);
  padding: clamp(32px, 5vw, 60px) clamp(16px, 4vw, 48px);
  background:
    radial-gradient(ellipse at 50% 120%, var(--canvas-light), transparent 70%),
    var(--glass-panel-wash), var(--glass-panel-bg);
  text-align: center;
}
.contact-title {
  color: var(--muted-strong);
  font-size: clamp(1.1875rem, 1rem + 0.8vw, 1.5rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.mail-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42em;
  max-width: 100%;
  min-height: 2.1em;
  padding: 0.42em 0.95em 0.46em 0.8em;
  color: var(--ink);
  font-size: clamp(1.375rem, 0.4rem + 5vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.15;
  text-decoration: none;
  transition: transform 0.2s var(--motion-ease);
  -webkit-tap-highlight-color: transparent;
}
.mail-pill .ico {
  width: 0.8em;
  height: 0.8em;
  color: var(--link);
}
.mail-pill:hover {
  --liquid-body: color-mix(in srgb, var(--surface) 90%, transparent);
}
.mail-pill:hover .mail-addr {
  text-decoration: underline;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.16em;
}
.mail-pill:active {
  transform: scale(0.985);
}

/* Closing. */
.closing-inner {
  display: grid;
  justify-items: center;
  text-align: center;
}
.closing .title {
  margin-top: 18px;
}
.closing-more {
  margin-top: 10px;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
  padding: 28px 0 44px;
  border-top: 1px solid var(--glass-line);
}
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 22px;
  margin-left: auto;
}
.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted-strong);
  font-size: 14.5px;
  text-decoration: none;
}
.foot-links a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.foot-contact {
  flex-basis: 100%;
}
.foot-contact a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--link);
  font-size: 15.5px;
  font-weight: 560;
  text-decoration: none;
}
.foot-contact a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.foot-note {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 13px;
}

/* ── Wider screens ───────────────────────────────────────────────────────── */
@media (min-width: 900px) {
  /* Hero in two columns: the copy on the left, the whole meter beside it — so the balance,
   * both receipts and the caption are on the first screen even on a short laptop. */
  html:not(.has-glass, .glass-soon) .act-hero {
    padding-block: clamp(36px, 4.4vw, 64px) clamp(40px, 4.4vw, 64px);
    text-align: left;
  }
  html:not(.has-glass, .glass-soon) .act-hero .act-pin {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.84fr);
    /* Copy and meter are centred against each other. */
    align-items: center;
    column-gap: clamp(36px, 4.6vw, 64px);
    justify-items: start;
  }
  html:not(.has-glass, .glass-soon) .hero-copy {
    justify-items: start;
  }
  html:not(.has-glass, .glass-soon) .hero-copy > h1 {
    font-size: clamp(2.375rem, 0.4rem + 3.7vw, 3.5rem);
  }
  /* Button and "See how it works" side by side; the beta line directly under the button. */
  html:not(.has-glass, .glass-soon) .hero-copy > .cta-stack {
    grid-template-columns: auto auto;
    align-items: center;
    justify-content: start;
    justify-items: start;
    column-gap: 20px;
  }
  html:not(.has-glass, .glass-soon) .cta-stack .cta-note {
    grid-area: 2 / 1 / auto / -1;
  }
  html:not(.has-glass, .glass-soon) .cta-stack .text-link {
    grid-area: 1 / 2;
    margin-top: 0;
  }
  html:not(.has-glass, .glass-soon) .act-hero .meter {
    grid-column: 2;
    width: 100%;
    margin-top: 0;
  }
  /* Browsers without container units: a viewport-based size that fits the narrower card. */
  .balance {
    font-size: clamp(3rem, 5.2vw, 4.6rem);
    font-size: min(17.6cqw, 6.25rem);
  }
}
@media (min-width: 940px) {
  /* Three columns; the rows (sentence / specimen / caption) line up through subgrid. */
  .steps {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.22fr) minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    gap: 0 16px;
    max-width: none;
  }
  .step {
    grid-row: span 3;
    grid-template-rows: subgrid;
    gap: 0;
  }
  .step > .specimen {
    grid-row: 2;
    margin-top: 18px;
    padding-inline: 16px;
  }
  .step-cap {
    grid-row: 3;
    margin-top: 12px;
    padding-inline: 6px;
  }
  .spec-signin .btn {
    padding-inline: 14px;
  }
  .duo,
  .notes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  /* Copy beside code. The code size steps up with the column so that the longest line
   * (50 characters, about 0.6em each) always fits without scrolling. */
  .dev {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    gap: 32px;
  }
  .dev .title {
    font-size: 2.125rem;
  }
  .code-block {
    padding: 16px;
    font-size: 12px;
  }
  .code-cli {
    padding-block: 13px;
  }
}
@media (min-width: 1000px) {
  .dev {
    gap: 40px;
  }
  .code-block {
    padding: 18px 20px;
    font-size: 12.5px;
  }
  .code-cli {
    padding-block: 14px;
  }
}
@media (min-width: 1100px) {
  .steps {
    column-gap: 24px;
  }
  .step > .specimen {
    padding-inline: 22px;
  }
  .spec-signin .btn {
    padding-inline: 20px;
  }
}
@media (min-width: 1200px) {
  .dev {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
    gap: 56px;
  }
  .dev .title {
    font-size: 2.625rem;
  }
  .code-block {
    padding: 22px 24px;
    font-size: 13.5px;
  }
  .code-cli {
    padding-block: 16px;
  }
}
@media (min-width: 560px) and (max-width: 939.98px), (min-width: 1160px) {
  /* Where the receipts panel is wide enough, rows go on one line: app · model id · charge. */
  .rcpt {
    grid-template-columns: 18px minmax(0, 1fr) auto auto;
    min-height: 46px;
  }
  .rcpt .rc-tick,
  .rcpt-model,
  .rcpt-amt {
    grid-area: auto;
  }
  .rcpt-amt {
    min-width: 6.4em;
    text-align: right;
  }
}

/* ── Phones: keep blur to the header bar and the small pills ─────────────── */
@media (max-width: 720px) {
  .wallet.glass-blur {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background:
      radial-gradient(ellipse at 100% 0%, var(--canvas-light), transparent 68%), var(--surface);
  }
  .topbar {
    min-height: 58px;
    padding: 6px 8px 6px 12px;
  }
  .brand {
    font-size: 23px;
    letter-spacing: -1.3px;
  }
  .brand .brand-symbol {
    width: 32px;
    height: 32px;
    border-radius: 11px;
  }
  /* Brand, contact (as a mail icon), language switch and the one primary button stay;
   * Docs and Sign in are in the footer and behind the button. */
  .topbar-link.is-wide {
    display: none;
  }
  .topbar-contact {
    padding-inline: 12px;
  }
  .topbar-contact .ico {
    width: 21px;
    height: 21px;
  }
  .topbar-label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .foot-links {
    margin-left: 0;
  }
  /* A shorter page: the hero button already is step 1, and one closed receipt is enough. */
  .spec-signin,
  .receipts > .rcpt:nth-child(n + 3) {
    display: none;
  }
}
@media (max-width: 600px) {
  /* On a phone the three CLI commands are the developer story; the SDK sample is in the docs. */
  .code-block:not(.code-cli) {
    display: none;
  }
  /* A command that does not fit wraps at a space, with its continuation indented. */
  .code-cli pre {
    white-space: pre-wrap;
  }
  .cmd {
    padding-left: 2ch;
    text-indent: -2ch;
  }
}
@media (max-width: 520px) {
  .code-block {
    padding: 16px 18px;
    font-size: 12.5px;
  }
  .topbar-link {
    padding-inline: 10px;
  }
  .cta-row .btn-lg,
  .cta-stack .btn-lg {
    min-width: min(100%, 260px);
  }
  .dev .btn-lg {
    width: 100%;
    padding-inline: 18px;
    white-space: normal;
    text-align: center;
  }
  .qa-a {
    padding-right: 0;
  }
}
@media (max-width: 480px) {
  /* Receipt fields: label above value, so no row wraps on its own. */
  .field {
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    padding: 8px 0;
  }
  .field dd {
    margin-left: 0;
    text-align: left;
  }
}
@media (max-width: 460px) {
  /* Phone top bar: the button says just "Sign up" — the word "free" only appears where the
   * Beta chip that qualifies it has room to stay beside it. */
  .btn-more {
    display: none;
  }
}
@media (max-width: 420px) {
  .topbar .beta-chip {
    display: none;
  }
  .topbar-links .btn {
    margin-left: 2px;
    padding-inline: 16px;
  }
}
@media (max-width: 380px) {
  /* Room for the app name and the model id: the tick goes. */
  .rcpt {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .rcpt .rc-tick {
    display: none;
  }
  .rcpt-model {
    grid-area: 2 / 1;
  }
  .rcpt-amt {
    grid-area: 1 / 2 / span 2;
  }
}
@media (max-width: 360px) {
  /* The meter's top row (label · Simulated · control) has to fit 248px. */
  .wallet-top {
    gap: 8px;
  }
  .wallet-label {
    font-size: 13px;
  }
  .wallet .sim-flag {
    gap: 6px;
    font-size: 11.5px;
  }
  .ctl {
    gap: 4px;
    padding: 8px 10px 8px 8px;
    font-size: 12.5px;
  }
  .topbar {
    gap: 6px;
    padding-left: 10px;
  }
  .brand {
    gap: 8px;
  }
  .topbar-contact {
    padding-inline: 9px;
  }
  .topbar-links .btn {
    padding-inline: 14px;
  }
  .consent-ctl {
    margin-left: 0;
  }
  /* Each "No …" line of the developer heading stays on one line. */
  .dev .title {
    font-size: 1.625rem;
  }
  .mail-pill .ico {
    display: none;
  }
  .mail-pill {
    padding-inline: 0.8em;
  }
}
@media (max-width: 340px) {
  /* The smallest phones: a slightly smaller wordmark leaves the top bar some slack. */
  .brand {
    font-size: 21px;
    letter-spacing: -1.1px;
  }
  .topbar-link {
    padding-inline: 8px;
  }
  .topbar-contact {
    padding-inline: 9px;
  }
  .dev .title {
    font-size: 1.5rem;
  }
}

/* ── Preferences ─────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
@media (prefers-reduced-transparency: reduce), (forced-colors: active) {
  .wallet,
  .ledger,
  .contact-card {
    background: var(--surface);
  }
  .wallet.glass-blur {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
@media (forced-colors: active) {
  .limit-chips input:checked + label,
  .rcpt-open {
    outline: 2px solid Highlight;
  }
  .limit-fill,
  .sim-dot {
    background: Highlight;
  }
  .status,
  .step-n {
    border-color: CanvasText;
  }
}
