/* First payment, with confidence — tiun onboarding concept.
   The product follows tiun's own light look (white surfaces, black pill actions, violet bolt).
   Prototype controls use a white, mono look with a blue accent (never the product's violet), so they never read as product.
   Tokens are design choices for this concept, not extracted tiun tokens. */

@font-face {
  font-family: "Geist";
  src: url("../fonts/geist-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/geist-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #f4f4f5;
  --line: #e7e7ea;
  --line-2: #d6d6db;
  --text: #0a0a0a;
  --text-2: #55555f;
  --text-3: #6e6e78;
  --action: #0a0a0a;
  --on-action: #ffffff;

  --brand: #8b5cf6;
  --brand-ink: #6d28d9;
  --brand-tint: #f3effe;
  --brand-line: #ddd0fd;

  --ok: #15803d;
  --ok-mid: #22c55e;
  --ok-tint: #ecfdf3;
  --ok-line: #bbf7d0;
  --warn: #b45309;
  --warn-tint: #fff7ed;
  --bad: #b91c1c;
  --bad-mid: #ef4444;
  --bad-tint: #fef2f2;
  --bad-line: #fecaca;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --radius: 12px;
  --radius-lg: 18px;
  --pill: 999px;
  /* Layered shadows: a tight contact shadow plus a soft ambient one. */
  --shadow: 0 1px 2px rgba(10, 10, 10, 0.04), 0 2px 6px -1px rgba(10, 10, 10, 0.03), 0 10px 24px -8px rgba(10, 10, 10, 0.06);
  --shadow-lg: 0 1px 2px rgba(10, 10, 10, 0.05), 0 8px 20px -6px rgba(10, 10, 10, 0.1), 0 24px 48px -12px rgba(10, 10, 10, 0.14);
  --shadow-hover: 0 1px 2px rgba(10, 10, 10, 0.08), 0 6px 16px -4px rgba(10, 10, 10, 0.18);
  --focus: 0 0 0 2px var(--surface), 0 0 0 4px var(--brand);
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* Motion: feedback is fast, state changes medium, view changes slow. Celebrations stay under 1.2s. */
  --dur-instant: 120ms;
  --dur-fast: 180ms;
  --dur-med: 280ms;
  --dur-slow: 480ms;
  --dur-celebrate: 950ms;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);        /* arrivals */
  --ease-exit: cubic-bezier(0.4, 0, 1, 1);      /* departures */
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1); /* travel across a known distance */
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --spring-soft: cubic-bezier(0.34, 1.25, 0.64, 1);

  /* Prototype controls */
  --proto-bg: #ffffff;
  --proto-panel: #f6f6f8;
  --proto-line: #e4e4e8;
  --proto-text: #18181b;
  --proto-text-2: #5b5b66;
  --proto-accent: #2563eb;
  --proto-accent-tint: #eef3ff;
  --proto-on-accent: #ffffff;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.55 var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 56px; /* room for the prototype bar */
}
a { color: var(--text); text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--text); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
h1, h2, h3 { margin: 0; line-height: 1.2; text-wrap: balance; font-weight: 600; letter-spacing: -0.02em; }
h1 { font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.25rem); letter-spacing: -0.035em; }
h2 { font-size: 1.0625rem; }
h3 { font-size: 0.9375rem; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
code, pre { font-family: var(--mono); font-size: 0.8125rem; }
strong { font-weight: 600; }
svg.i { width: 16px; height: 16px; flex: none; vertical-align: -3px; }
.num { font-family: var(--mono); font-size: 0.9em; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--s4); top: -100px; z-index: 100;
  background: var(--action); color: var(--on-action); padding: var(--s2) var(--s4); border-radius: var(--pill);
}
.skip-link:focus { top: var(--s2); }
[tabindex="-1"]:focus { box-shadow: none; }
.hint { color: var(--text-3); font-size: 0.875rem; }
.hint svg.i { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.hint--note { margin-top: var(--s3); padding: var(--s3) var(--s4); background: var(--surface-2); border-radius: var(--radius); color: var(--text-2); animation: fade-up var(--dur-med) var(--ease); }
.lede { color: var(--text-2); font-size: 1.0625rem; }
.eyebrow { font-size: 0.8125rem; font-weight: 500; color: var(--brand-ink); }
.eyebrow--ok { color: var(--ok); }

/* ================================================================ Buttons and small parts */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 40px; padding: 0 var(--s5); border-radius: var(--pill); border: 1px solid transparent;
  font: 500 0.9375rem/1 var(--font); text-decoration: none; cursor: pointer;
  position: relative;
  transition: transform var(--dur-fast) var(--ease), background-color var(--dur-fast), box-shadow var(--dur-fast) var(--ease), border-color var(--dur-fast), color var(--dur-fast);
}
/* Hover depth: the button lifts 1px and a layered shadow fades in beneath it (opacity only). */
.btn::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: var(--shadow-hover); opacity: 0; pointer-events: none; transition: opacity var(--dur-fast) var(--ease); }
.btn--primary:hover:not(:disabled), .btn--secondary:hover:not(:disabled) { transform: translateY(-1px); }
.btn--primary:hover:not(:disabled)::after, .btn--secondary:hover:not(:disabled)::after { opacity: 1; }
.btn:active:not(:disabled) { transform: scale(0.97); transition-duration: var(--dur-instant); }
.btn:active:not(:disabled)::after { opacity: 0.35; }
.btn:disabled { cursor: not-allowed; opacity: 0.6; }
.btn svg.i { transition: transform var(--dur-med) var(--ease); }
.btn:hover:not(:disabled) svg.i:last-child { transform: translateX(2px); }
.btn--primary { background: var(--action); color: var(--on-action); }
.btn--primary:hover:not(:disabled) { background: #26262b; }
.btn--secondary { background: var(--surface); color: var(--text); border-color: var(--line-2); }
.btn--secondary:hover:not(:disabled) { border-color: var(--text-3); }
.btn--ghost { background: transparent; color: var(--text-2); padding: 0 var(--s3); }
.btn--ghost:hover { color: var(--text); background: var(--surface-2); }
.btn--lg { min-height: 48px; padding: 0 var(--s6); font-size: 1rem; }
.btn--sm { min-height: 32px; padding: 0 var(--s4); font-size: 0.8125rem; }
.btn--block { width: 100%; }
.linkish {
  display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none;
  color: var(--text-2); font: inherit; font-size: 0.875rem; cursor: pointer; text-decoration: underline;
  text-decoration-color: var(--line-2); text-underline-offset: 3px;
  transition: color var(--dur-fast), text-decoration-color var(--dur-fast), box-shadow var(--dur-fast) var(--ease);
}
.linkish:hover { color: var(--text); text-decoration-color: var(--text); }

.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--pill);
  font-size: 0.75rem; font-weight: 600; white-space: nowrap;
}
.pill svg.i { width: 13px; height: 13px; }
.pill--sandbox { background: var(--brand-tint); color: var(--brand-ink); border: 1px solid var(--brand-line); }

.chip {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: var(--pill);
  background: var(--surface-2); color: var(--text-2); font-size: 0.75rem; font-weight: 500; white-space: nowrap;
}
.chip--ok { background: var(--ok-tint); color: var(--ok); }
.chip--bad { background: var(--bad-tint); color: var(--bad); }
.chip--brand { background: var(--brand-tint); color: var(--brand-ink); }

.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 0.75rem; color: var(--text-3); }
.tag svg.i { width: 12px; height: 12px; }
.tag--you { color: var(--brand-ink); }
.tag { animation: tag-in var(--dur-med) var(--ease); }

.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; font-size: 1.125rem; letter-spacing: -0.03em; }
.logo__mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; }
.logo__mark svg.i { width: 15px; height: 15px; fill: #fff; stroke: none; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: var(--s5); box-shadow: var(--shadow); margin: 0; min-width: 0;
}
fieldset.card { border: 1px solid var(--line); }
.card__head { display: grid; gap: 4px; margin-bottom: var(--s4); }
.card__head h2 { display: flex; align-items: center; gap: var(--s2); }
.card__label, .card__legend { display: block; font-weight: 600; font-size: 1.0625rem; margin-bottom: var(--s3); padding: 0; letter-spacing: -0.01em; }
.card--flush { padding: 0; overflow: hidden; }
.card--success { border-color: var(--ok-line); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }
.actions--inline { margin-top: var(--s4); }
.actions--center { justify-content: center; }

.banner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  padding: var(--s3) var(--s4); background: var(--warn-tint); border-radius: var(--radius); color: var(--warn); font-size: 0.875rem;
  margin-bottom: var(--s4);
}

.toast {
  position: fixed; top: var(--s4); left: 50%; z-index: 60; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: var(--s2); padding: 10px var(--s5);
  background: var(--action); color: var(--on-action); border-radius: var(--pill); font-size: 0.875rem; font-weight: 500;
  box-shadow: var(--shadow-lg); animation: toast 2.8s var(--ease) both;
}
.toast svg.i { color: var(--ok-mid); }

/* ================================================================ Forms */

label { font-weight: 500; font-size: 0.875rem; }
input[type="text"], input[type="email"], input[type="number"], select, textarea {
  width: 100%; min-height: 42px; padding: 9px 14px; border: 1px solid var(--line-2); border-radius: var(--radius);
  background: var(--surface); color: var(--text); font: inherit; font-size: 0.9375rem;
  transition: border-color var(--dur-fast), box-shadow var(--dur-med) var(--ease);
}
textarea { resize: vertical; line-height: 1.5; }
select { appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2355555f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
input:hover, select:hover, textarea:hover { border-color: var(--text-3); }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.16); border-radius: var(--radius); }
input[readonly] { background: var(--surface-2); color: var(--text-2); }
[aria-invalid="true"] { border-color: var(--bad-mid) !important; }
.field-error { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--bad); font-size: 0.8125rem; animation: fade-up var(--dur-med) var(--ease); }
.field-error svg.i { width: 14px; height: 14px; }

.fields { display: grid; gap: var(--s4); }
.fields__pair, .fields--grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
.field { display: grid; gap: 6px; align-content: start; }
.field--wide { grid-column: 1 / -1; }
.field__top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s2); }
.field .hint { font-size: 0.8125rem; }

.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.choice {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: var(--s3); align-items: start;
  padding: var(--s4); border: 1px solid var(--line-2); border-radius: var(--radius); cursor: pointer;
  transition: border-color var(--dur-fast), background-color var(--dur-fast), box-shadow var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.choice:hover { border-color: var(--text-3); transform: translateY(-1px); }
.choice:active { transform: scale(0.99); transition-duration: var(--dur-instant); }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice__icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); transition: background-color var(--dur-fast), color var(--dur-fast); }
.choice__text { display: grid; gap: 2px; }
.choice__text span { color: var(--text-3); font-size: 0.8125rem; font-weight: 400; }
.choice__radio { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-2); transition: border-color var(--dur-fast); }
.choice__radio::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--text); transform: scale(0); transition: transform var(--dur-med) var(--spring); }
.choice:has(input:checked) { border-color: var(--text); background: var(--surface-2); }
.choice:has(input:checked) .choice__icon { background: var(--action); color: var(--on-action); }
.choice:has(input:checked) .choice__radio { border-color: var(--text); }
.choice:has(input:checked) .choice__radio::after { transform: none; }
/* A choice that was just picked: the dot springs in and the icon pops (the radio re-renders, so this is a keyframe). */
.choice.is-picked .choice__radio::after { animation: dot-in var(--dur-med) var(--spring) both; }
.choice.is-picked .choice__icon { animation: pop-soft var(--dur-med) var(--spring) both; }
.choice:has(input:focus-visible) { box-shadow: var(--focus); }

.check { position: relative; display: inline-flex; align-items: center; gap: var(--s2); cursor: pointer; margin-top: var(--s2); }
/* The native checkbox stays in place for clicks, focus and validation; the box beside it draws its tick. */
.check input { position: absolute; left: 0; top: 50%; width: 18px; height: 18px; margin: -9px 0 0; opacity: 0; cursor: pointer; }
.check__box {
  display: grid; place-items: center; width: 18px; height: 18px; flex: none; border: 1.5px solid var(--line-2); border-radius: 5px; background: var(--surface);
  transition: background-color var(--dur-fast), border-color var(--dur-fast), box-shadow var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.check__box svg { width: 12px; height: 12px; fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 16; stroke-dashoffset: 16; transition: stroke-dashoffset var(--dur-med) var(--ease) 40ms; }
.check:hover .check__box { border-color: var(--text-3); }
.check:active .check__box { transform: scale(0.88); }
.check input:checked + .check__box { background: var(--action); border-color: var(--action); }
.check input:checked + .check__box svg { stroke-dashoffset: 0; }
.check input:focus-visible + .check__box { box-shadow: var(--focus); }
.check input[aria-invalid="true"] + .check__box { border-color: var(--bad-mid); }

.inline-form { display: flex; gap: var(--s2); margin-top: var(--s3); }
.inline-form input { flex: 1; }

/* ================================================================ Welcome */

.welcome { max-width: 760px; margin: 0 auto; padding: var(--s8) var(--s4) var(--s7); display: grid; gap: var(--s4); justify-items: center; text-align: center; }
.welcome > .banner { width: 100%; text-align: left; }
.welcome__mark { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--brand); color: #fff; box-shadow: 0 8px 24px rgba(139, 92, 246, 0.35); }
.welcome__mark svg.i { width: 26px; height: 26px; fill: #fff; stroke: none; }
.welcome .lede { max-width: 48ch; }
.welcome__sub { margin-top: var(--s5); font-size: 1rem; }
.welcome__cta { display: grid; gap: var(--s2); justify-items: center; margin-top: var(--s4); }

/* The choice page is wider so the three ways to start sit side by side; the hero keeps its measure. */
.welcome--choose { max-width: 1088px; }
.welcome--choose .welcome__scene { max-width: 728px; }

/* Three ways to start, read as one set: same anatomy, same height, actions on one baseline. */
/* Each card spans five shared rows (icon, title, text, detail, action) through subgrid, so the rows line up across cards. */
.starts { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--s4); row-gap: 0; margin-top: var(--s4); text-align: left; }
.start {
  position: relative; display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: var(--s3); justify-items: start;
  padding: var(--s5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.start > p { align-self: start; }
.start h2 { font-size: 1.125rem; }
.start p { color: var(--text-2); font-size: 0.9375rem; }
.start--rec { border-color: var(--brand-line); box-shadow: 0 0 0 4px var(--brand-tint), var(--shadow); }
.start .chip { position: absolute; top: var(--s4); right: var(--s4); }
.start__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); color: var(--text-2); }
.start--rec .start__icon { background: var(--brand-tint); color: var(--brand-ink); }
/* Every card ends on its action, pinned to the bottom so the three buttons line up. */
.start .btn { align-self: end; margin-top: var(--s2); width: 100%; justify-content: center; }
/* One detail slot per card, at the same place: a hairline, a small label, one line. */
.start__meta, .start .start__logos { justify-self: stretch; align-self: start; display: grid; gap: 6px; margin-top: var(--s1); padding-top: var(--s3); border-top: 1px solid var(--line); }
.start .start__value--note { display: block; font-weight: 400; color: var(--text-2); }
.start__meta .hint, .start .start__logos > .hint { font-size: 0.75rem; color: var(--text-3); }
.start .start__value { display: flex; align-items: center; gap: 6px; min-height: 28px; color: var(--text); font-size: 0.875rem; font-weight: 500; }
.start__value svg.i { color: var(--text-3); }
/* In the card, agent logos are a compact row of marks; names stay for screen readers and on hover. */
.start .start__logos .logos { gap: 6px; }
.start .start__logos .logos li:not(.logos__more) { width: 28px; height: 28px; padding: 0; justify-content: center; }
.start .start__logos .logos li:not(.logos__more) span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.start .start__logos .logos__more { font-size: 0.8125rem; padding-left: 4px; }
@media (max-width: 880px) {
  .starts { grid-template-columns: minmax(0, 1fr); row-gap: var(--s4); }
  .start { grid-row: auto; grid-template-rows: none; }
  .start .btn { width: auto; }
}

/* Coding agents: brand marks, logo row, picker */
svg.brand { width: 18px; height: 18px; flex: none; }
.start__logos { display: grid; gap: var(--s2); }
.start__logos > .hint { font-size: 0.8125rem; }
.logos { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.logos li { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 8px; border: 1px solid var(--line); border-radius: var(--pill); background: var(--surface); font-size: 0.8125rem; font-weight: 500; color: var(--text); }
.logos svg.brand { width: 14px; height: 14px; }
.logos .logos__more { padding: 0 2px; border: 0; background: none; font-weight: 400; color: var(--text-3); }
.agent-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); margin-top: var(--s3); }
.agent-opt { display: flex; align-items: center; gap: var(--s3); padding: var(--s3); text-align: left; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease); }
.agent-opt:hover:not(:disabled) { border-color: var(--text-3); }
.agent-opt[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-tint); }
.agent-opt:disabled { cursor: default; opacity: 0.6; }
.agent-opt svg.brand { width: 22px; height: 22px; }
.agent-opt span { display: grid; }
.agent-opt strong { font-size: 0.9375rem; font-weight: 600; }
.agent-opt small { font-size: 0.75rem; color: var(--text-3); }

/* Conversation with the agent */
.agent-says { display: flex; align-items: flex-start; gap: var(--s2); color: var(--text-2); font-size: 0.9375rem; }
.agent-says svg.brand { margin-top: 2px; }
.bubble { justify-self: end; max-width: 52ch; margin-left: auto; padding: var(--s2) var(--s3); border-radius: 14px 14px 4px 14px; background: var(--surface-2); color: var(--text); font-size: 0.9375rem; }
.composer { display: grid; gap: var(--s2); padding: var(--s3); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.composer:focus-within { border-color: var(--brand); box-shadow: var(--focus); }
.composer__head { display: flex; align-items: center; gap: var(--s2); font-size: 0.875rem; }
.composer__head .chip { margin-left: auto; }
.composer__fixed { font-size: 0.9375rem; color: var(--text-3); }
.composer textarea { border: 0; padding: 0; min-height: 0; background: none; box-shadow: none; resize: vertical; }
.composer textarea:focus { outline: none; box-shadow: none; }
.draft__env { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }

/* tiun sign-in and consent, drawn as a small browser window */
.consent { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.consent:focus { outline: none; }
.consent:focus-visible { box-shadow: var(--focus); }
.consent__bar { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s3); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.consent__body { display: grid; gap: var(--s3); padding: var(--s5); }
.consent__logos { display: flex; align-items: center; gap: var(--s2); color: var(--text-3); }
.consent__logos svg.brand { width: 28px; height: 28px; }
.consent__group { border: 0; padding: 0; margin: 0; display: grid; gap: var(--s2); }
.consent__list { margin: 0; padding-left: 1.1em; display: grid; gap: 4px; color: var(--text-2); font-size: 0.875rem; }

/* Code the agent proposes */
.code--diff { border-radius: var(--radius); background: #111113; color: #a1a1aa; overflow: hidden; }
.code--diff pre { padding-right: var(--s4); border-radius: 0; }
.code__name { display: flex; align-items: center; gap: 6px; padding: var(--s2) var(--s3); font-family: var(--mono); font-size: 0.8125rem; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.code__name span { margin-left: auto; color: var(--ok-mid); }
.diff-add { display: block; color: #86efac; background: rgba(34, 197, 94, 0.1); }

/* The sandbox switch flips on when it is activated. */
.switch { display: inline-flex; align-items: center; gap: var(--s3); padding: 8px 16px 8px 8px; border-radius: var(--pill); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.switch__track { position: relative; width: 44px; height: 26px; border-radius: var(--pill); background: var(--brand); }
.switch__knob { position: absolute; top: 3px; left: 21px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); }
.switch__label { font-weight: 600; font-size: 0.9375rem; color: var(--brand-ink); }
.switch--flip .switch__track { animation: switch-track 0.5s 0.35s var(--ease) both; }
.switch--flip .switch__knob { animation: switch-knob 0.5s 0.35s var(--spring) both; }
.switch--flip .switch__label { animation: switch-label 0.5s 0.35s var(--ease) both; }

.facts { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); margin-top: var(--s3); text-align: left; }
.facts li { display: grid; gap: 4px; align-content: start; padding: var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.facts li > span:last-child { color: var(--text-3); font-size: 0.8125rem; }

.path { width: 100%; display: grid; gap: var(--s2); text-align: left; position: relative; }
.path__item {
  display: grid; grid-template-columns: 28px 36px 1fr; gap: var(--s3); align-items: center;
  padding: var(--s3) var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.path__no { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-2); font-size: 0.8125rem; font-weight: 600; color: var(--text-2); }
.path__icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); }
.path__text { display: grid; gap: 1px; }
.path__text span { color: var(--text-3); font-size: 0.8125rem; }
.path__item.is-done .path__no { background: var(--ok-mid); border-color: var(--ok-mid); color: #fff; }

/* ================================================================ Onboarding shell */

.ob__top {
  position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s5);
  padding: var(--s3) var(--s5); background: rgba(250, 250, 250, 0.86); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.ob__right { display: flex; align-items: center; gap: var(--s3); }
.ob__tour { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--pill); background: var(--surface); font: 500 0.8125rem var(--font); color: var(--text-2); cursor: pointer; }
.ob__tour:hover { color: var(--text); border-color: var(--text-3); }
.ob__exit { font-size: 0.875rem; color: var(--text-2); text-decoration: none; }
.ob__exit:hover { color: var(--text); }
.ob__switch { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; font: inherit; font-size: 0.875rem; cursor: pointer; }
/* Other ways to set up, under the primary action: a quiet label, then a secondary and a tertiary button. */
.welcome__alt { display: grid; justify-items: center; gap: var(--s3); margin-top: var(--s3); padding-top: var(--s5); border-top: 1px solid var(--line); width: min(100%, 420px); }
.welcome__or { font-size: 0.8125rem; color: var(--text-3); }
.welcome__alt-row { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s2); }
/* Back to the setup in progress: top left of the page, as a back control usually sits. */
.welcome__back { justify-self: stretch; display: flex; align-items: center; flex-wrap: wrap; gap: var(--s2) var(--s3); margin-top: calc(-1 * var(--s5)); margin-bottom: var(--s4); text-align: left; }
.btn--back svg.i { transform: scaleX(-1); }
.btn--back:hover:not(:disabled) svg.i { transform: scaleX(-1) translateX(2px); }
.ob__main { max-width: 680px; margin: 0 auto; padding: var(--s7) var(--s4) var(--s7); }

.stepper { position: relative; max-width: 560px; justify-self: center; width: 100%; }
.stepper ol { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); }
.stepper__track { position: absolute; left: 12.5%; right: 12.5%; top: 13px; height: 2px; background: var(--line); border-radius: 2px; }
/* The progress line scales (transform only) and app.js replays it from where it was when a step completes. */
.stepper__fill { display: block; height: 100%; background: var(--text); border-radius: 2px; transform-origin: left; transition: transform var(--dur-slow) var(--spring-soft); }
.stepper__item a, .stepper__item > span { display: grid; justify-items: center; gap: 4px; text-decoration: none; color: var(--text-3); font-size: 0.75rem; font-weight: 500; white-space: nowrap; }
.stepper__dot {
  position: relative; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--surface); border: 1.5px solid var(--line-2); font-size: 0.75rem; font-weight: 600; color: var(--text-3);
  transition: background-color var(--dur-med), border-color var(--dur-med), transform var(--dur-med) var(--spring);
}
.stepper__dot svg.i { width: 14px; height: 14px; stroke-width: 2.5; }
.stepper__item.is-done .stepper__dot { background: var(--text); border-color: var(--text); color: #fff; }
.stepper__item.is-open .stepper__dot { border-color: var(--text); color: var(--text); }
.stepper__item.is-active .stepper__dot { transform: scale(1.12); box-shadow: 0 0 0 4px var(--brand-tint); }
.stepper__item.is-active a { color: var(--text); }
/* A step that was just completed: its dot springs and the tick draws. */
.stepper__item.is-new .stepper__dot { animation: dot-done var(--dur-slow) var(--spring) both; }
.stepper__item.is-new .stepper__dot svg path { stroke-dasharray: 24; animation: draw-24 var(--dur-med) 160ms var(--ease) both; }
.stepper__item a:hover { color: var(--text); }

.intro { display: grid; gap: var(--s4); justify-items: center; text-align: center; }
.intro .lede { max-width: 46ch; }
.intro__art { width: 100%; margin: var(--s3) 0; }
/* One column of label / answer rows, read top to bottom. */
.intro__facts {
  width: 100%; margin: 0; text-align: left; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden;
}
.intro__facts > div { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: var(--s4); padding: var(--s4) var(--s5); }
.intro__facts > div + div { border-top: 1px solid var(--line); }
.intro__facts dt { display: flex; align-items: flex-start; gap: 8px; font-size: 0.8125rem; font-weight: 600; color: var(--text-2); padding-top: 1px; }
.intro__facts dt svg.i { width: 16px; height: 16px; color: var(--text-3); margin-top: 1px; }
.intro__facts dd { margin: 0; font-size: 0.9375rem; line-height: 1.55; }
.intro__facts .is-trust { background: var(--brand-tint); }
.intro__facts .is-trust dt, .intro__facts .is-trust dt svg.i { color: var(--brand-ink); }
.intro__facts .is-care dt svg.i { color: var(--warn); }
.intro__cta { display: grid; gap: var(--s3); justify-items: center; margin-top: var(--s3); }
.intro__cta .hint { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--s2); }

/* Names the guided setup as tiun onboarding, apart from the dashboard. */
.ob-label { display: inline-flex; align-items: center; gap: 6px; letter-spacing: 0.01em; }
.ob-label svg.i { width: 13px; height: 13px; fill: currentColor; stroke: none; }
.ob__brand { display: flex; align-items: center; gap: var(--s3); }
.ob__tag { padding-left: var(--s3); border-left: 1px solid var(--line-2); font-size: 0.875rem; font-weight: 500; color: var(--text-2); }

.task { display: grid; gap: var(--s4); }
.task__head { display: grid; gap: var(--s2); justify-items: start; margin-bottom: var(--s2); }
.task__lede { color: var(--text-2); font-size: 1.0625rem; }

/* ================================================================ Step illustrations (looping, decorative) */

.art {
  position: relative; display: flex; align-items: center; justify-content: center; gap: var(--s4);
  height: 190px; padding: var(--s5); border-radius: var(--radius-lg); overflow: hidden;
  background: radial-gradient(120% 120% at 50% 0%, var(--brand-tint) 0%, var(--surface) 70%); border: 1px solid var(--line);
}
/* Ambient light drifts slowly behind the picture over a faint grain; both sit under the content. */
.art::before {
  content: ""; position: absolute; inset: -30%; pointer-events: none;
  background: radial-gradient(30% 30% at 35% 40%, rgba(139, 92, 246, 0.12), transparent 70%), radial-gradient(26% 26% at 68% 62%, rgba(34, 197, 94, 0.07), transparent 70%);
  animation: drift 16s var(--ease-in-out) infinite alternate;
}
.art::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.07; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* Hover parallax: layers lean toward the pointer by depth. app.js sets --px/--py; `translate` composes with the loops' transforms. */
.art > * { position: relative; z-index: 1; translate: calc(var(--px, 0) * var(--depth, 1) * 1px) calc(var(--py, 0) * var(--depth, 1) * 1px); transition: translate var(--dur-slow) var(--ease); }




/* ================================================================ Step 2: offer */

.draft__from { display: flex; align-items: center; gap: 6px; color: var(--brand-ink); font-size: 0.875rem; font-weight: 500; margin-bottom: var(--s4); }
.careful { display: flex; gap: var(--s3); margin-top: var(--s5); padding: var(--s4); border-radius: var(--radius); background: var(--warn-tint); color: #7c2d12; font-size: 0.875rem; }
.careful > svg.i { margin-top: 2px; color: var(--warn); }
.drafting { display: grid; gap: var(--s3); }
.drafting__label { display: flex; align-items: center; gap: 6px; color: var(--brand-ink); font-weight: 500; }
.drafting__label svg.i { animation: spin 1.6s linear infinite; }
/* Text being produced arrives word by word. */
.words > span { display: inline-block; }
.is-entering .words > span { animation: word-in var(--dur-med) calc(var(--i) * 45ms + 120ms) var(--ease) both; }
/* Without view transitions the created offer lands with a little depth. */
.is-entering .created.rise { animation-name: land; }
.shimmer { display: block; height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--surface-2) 0%, var(--brand-tint) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: shimmer 1.1s linear infinite; }
.created { display: grid; grid-template-columns: auto 1fr; gap: var(--s4); align-items: center; }
.created h2 { font-size: 1.25rem; margin-top: 2px; }
.price { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; }
.price small { font-size: 0.875rem; color: var(--text-3); font-weight: 400; }
.suggestions { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--s4); }
.suggestion { display: flex; flex-direction: column; gap: var(--s2); }
.suggestion h2 { font-size: 1.0625rem; }
.suggestion .hint { flex: 1; }
.suggestion .btn { margin-top: var(--s2); }

/* ================================================================ Step 3: connect */

.subs { display: grid; gap: 0; position: relative; }
.sub { position: relative; display: grid; grid-template-columns: 32px 1fr; gap: var(--s4); padding-bottom: var(--s5); }
.sub:not(:last-child)::before, .sub:not(:last-child)::after { content: ""; position: absolute; left: 15px; top: 36px; bottom: 4px; width: 2px; background: var(--line); border-radius: 2px; }
/* The line to the next sub-step fills downward when this one completes. */
.sub:not(:last-child)::after { background: var(--text); transform: scaleY(0); transform-origin: top; }
.sub--done:not(:last-child)::after { transform: none; }
.sub--fresh.sub--done:not(:last-child)::after { animation: line-down var(--dur-slow) 120ms var(--ease-in-out) both; }
.sub__marker { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--line-2); font-weight: 600; font-size: 0.875rem; color: var(--text-3); }
.sub__marker svg.i { width: 15px; height: 15px; stroke-width: 2.5; }
.sub--open .sub__marker { border-color: var(--text); color: var(--text); box-shadow: 0 0 0 4px var(--brand-tint); }
.sub--done .sub__marker { background: var(--text); border-color: var(--text); color: #fff; }
/* A sub-step that just changed: its marker pops and its new content fades up. */
.sub--fresh.sub--done .sub__marker { animation: pop var(--dur-med) var(--spring) both; }
.sub--fresh.sub--open .sub__marker { animation: pop-soft var(--dur-med) 120ms var(--spring) both; }
.sub--fresh .sub__body > :not(h2):not(.qhead) { animation: fade-up var(--dur-med) 80ms var(--ease) both; }
.sub__body { min-width: 0; padding: var(--s4) var(--s5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); display: grid; gap: var(--s2); }
.sub__body > p { color: var(--text-2); font-size: 0.9375rem; }
.sub--locked .sub__body { background: transparent; box-shadow: none; border-style: dashed; }
.sub--locked h2 { color: var(--text-3); }
.sub--done .sub__body { padding-block: var(--s3); }
.sub p code { font-size: 0.8125rem; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }

.tabs { position: relative; display: inline-flex; gap: 2px; padding: 3px; margin-top: var(--s2); border-radius: var(--pill); background: var(--surface-2); justify-self: start; }
.tabs button { height: 30px; padding: 0 12px; white-space: nowrap; border: 0; border-radius: var(--pill); background: transparent; font: 500 0.8125rem var(--font); color: var(--text-2); cursor: pointer; position: relative; z-index: 1; transition: color var(--dur-fast), box-shadow var(--dur-fast) var(--ease); }
.tabs button:hover, .tabs button[aria-pressed="true"] { color: var(--text); }
/* The selected pill slides between tabs (FLIP in app.js); it sits under the labels. */
.pill-slide { position: absolute; top: 0; left: 0; z-index: 0; pointer-events: none; transform-origin: 0 0; transition: transform var(--dur-med) var(--ease); }
.tabs .pill-slide { border-radius: var(--pill); background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }

.code { position: relative; margin-top: var(--s2); }
.code pre { margin: 0; padding: var(--s4); padding-right: 96px; border-radius: var(--radius); background: #111113; color: #e4e4e7; line-height: 1.6; white-space: pre-wrap; word-break: break-word; overflow: auto; }
.code__copy { position: absolute; top: 10px; right: 10px; background: #26262b; color: #fff; border-color: #3a3a40; }
.code__copy:hover:not(:disabled) { border-color: #6b6b74; }
.code__copy.is-copied { background: var(--ok); border-color: var(--ok); }
/* Copy morphs into Copied (and back): the previous face fades off the new one and the tick draws. Hidden at rest. */
.code__copy::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; background: var(--ok); opacity: 0; pointer-events: none; }
.code__copy.is-copied::before { background: #26262b; }
.code__copy.is-fresh::before { animation: face-off var(--dur-med) var(--ease) both; }
.code__copy.is-copied.is-fresh svg.i path { stroke-dasharray: 24; animation: draw-24 var(--dur-med) 80ms var(--ease) both; }
.hl-ok { color: #86efac; }
.hl-bad { color: #fca5a5; text-decoration: underline wavy #f87171; text-underline-offset: 3px; }

.site-saved { display: flex; align-items: center; gap: var(--s2); }
.site-saved .linkish { margin-left: auto; }

.checks { display: grid; gap: var(--s2); margin-top: var(--s2); }
.check-row { display: grid; grid-template-columns: 24px 24px 1fr; align-items: center; gap: var(--s3); padding: 10px var(--s3); border-radius: var(--radius); background: var(--surface-2); font-size: 0.9375rem; color: var(--text-2); }
.check-row strong { color: var(--text); }
.check-row__icon { color: var(--text-3); display: grid; place-items: center; }
.check-row__mark { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px dashed var(--line-2); }
.check-row__mark svg.i { width: 13px; height: 13px; stroke-width: 3; }
.check-row--checking .check-row__mark { border: 0; }
.check-row { position: relative; isolation: isolate; overflow: hidden; }
/* Checking: rows light up in turn across the check's wait, each with a highlight travelling across it. */
.check-row--checking { animation: row-on var(--dur-fast) calc(var(--i) * var(--sweep)) var(--ease) both; }
.check-row--checking .spinner { animation: spin 0.7s linear infinite, fade-in var(--dur-fast) calc(var(--i) * var(--sweep)) both; }
.check-row--checking::after {
  content: ""; position: absolute; inset: 0; z-index: -1; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.14), transparent);
  animation: sweep var(--sweep) calc(var(--i) * var(--sweep)) var(--ease-in-out) both;
}
.check-row--ok .check-row__mark { border: 0; background: var(--ok-mid); color: #fff; }
.check-row--bad .check-row__mark { border: 0; background: var(--bad-mid); color: #fff; }
/* Results resolve one by one; a failing row tints in rather than flashing. */
.check-row--bad::after { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--bad-tint); }
.check-row.is-fresh .check-row__mark { animation: pop var(--dur-med) calc(var(--i) * 260ms) var(--spring) both; }
.check-row.is-fresh.check-row--bad::after { animation: fade-in var(--dur-slow) calc(var(--i) * 260ms) var(--ease) both; }
.check-row--skip .check-row__mark { border-style: solid; color: var(--text-3); }

.result { display: grid; grid-template-columns: auto 1fr; gap: var(--s3); margin-top: var(--s3); padding: var(--s4); border-radius: var(--radius); font-size: 0.9375rem; }
.result > svg.i { width: 20px; height: 20px; margin-top: 1px; }
.result h3 { margin-bottom: 4px; }
.result p + p { margin-top: 6px; }
.result--ok { background: var(--ok-tint); color: #14532d; }
.result--bad { background: var(--bad-tint); color: #7f1d1d; }
.result--bad > svg.i { color: var(--bad); }
.result--info { background: var(--brand-tint); color: #4c1d95; }
/* The verdict arrives once the rows have resolved; a failure adds one small shake. */
.result.is-fresh { animation: fade-up var(--dur-med) 800ms var(--ease) both; }
.result.is-fresh .checkmark circle { animation-delay: 800ms; }
.result.is-fresh .checkmark path { animation-delay: 1040ms; }
.result--bad.is-fresh { animation: fade-up var(--dur-med) 800ms var(--ease) both, shake 0.4s 1060ms var(--ease); }
.result--info.is-fresh { animation-delay: 0ms; }

/* ================================================================ Step 4: checkout */

.browser { border: 1px solid var(--line-2); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-lg); }
.browser__bar { display: flex; align-items: center; gap: var(--s3); padding: 10px var(--s4); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.browser__dots { display: flex; gap: 6px; }
.browser__dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.browser__url { flex: 1; display: flex; align-items: center; gap: 6px; height: 26px; padding: 0 12px; border-radius: var(--pill); background: var(--surface); color: var(--text-3); font-size: 0.75rem; }
.browser__url svg.i { width: 12px; height: 12px; }
.checkout { display: grid; grid-template-columns: 1fr 1fr; min-height: 300px; }
.checkout__summary { padding: var(--s6) var(--s5); display: grid; gap: var(--s2); align-content: start; background: linear-gradient(180deg, var(--brand-tint), var(--surface)); }
.checkout__summary h2 { font-size: 1.125rem; }
.checkout__pay { padding: var(--s6) var(--s5); border-left: 1px solid var(--line); }
.pay-form { display: grid; gap: 6px; }
.pay-form input, .pay-form select { margin-bottom: var(--s2); }
.pay-form .btn { margin-top: var(--s2); }
/* Paying: the button fills like a progress bar over the payment's wait (clip-path keeps the round ends). */
.btn--progress:disabled { opacity: 1; cursor: progress; }
.btn--progress::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: rgba(255, 255, 255, 0.16);
  clip-path: inset(0 100% 0 0 round 999px); animation: progress var(--t, 1.3s) var(--ease-in-out) forwards;
}
/* On success the checkout lifts slightly and stays lifted (`translate`, so the entrance transform is untouched). */
.browser.is-paid { translate: 0 -3px; }
.browser.is-paid.is-fresh { animation: lift var(--dur-slow) 200ms var(--ease) both; }
/* Decorative sandbox card: floats in the order summary, glows while paying, shakes on decline. */
.paycard { padding-top: var(--s4); perspective: 800px; justify-self: center; width: min(100%, 260px); }
.paycard__face {
  position: relative; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 1fr auto; gap: var(--s2);
  aspect-ratio: 1.586; padding: 16px 18px; border-radius: 14px; color: #fff; overflow: hidden;
  background: radial-gradient(120% 140% at 0% 0%, #a78bfa 0%, var(--brand) 38%, #4c1d95 100%);
  box-shadow: 0 18px 36px -14px rgba(76, 29, 149, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transform: rotateX(8deg) rotateY(-12deg) rotateZ(-2deg); animation: paycard-float 5s ease-in-out infinite;
}
.paycard__face::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.22) 50%, transparent 65%); background-size: 250% 100%; animation: paycard-sheen 6s ease-in-out infinite; pointer-events: none; }
.paycard__chip { width: 34px; height: 25px; border-radius: 5px; background: linear-gradient(135deg, #fde68a, #d4a017); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); }
.paycard__brand { justify-self: end; display: inline-flex; align-items: center; gap: 4px; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.08em; opacity: 0.9; }
.paycard__brand svg.i { width: 13px; height: 13px; }
.paycard__num { grid-column: 1 / -1; align-self: end; font-size: 1rem; font-variant-numeric: tabular-nums; letter-spacing: 0.08em; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); white-space: nowrap; }
.paycard__meta { grid-column: 1 / -1; display: flex; justify-content: space-between; font-size: 0.625rem; letter-spacing: 0.1em; opacity: 0.8; }
.paycard--processing .paycard__face { animation: paycard-float 5s ease-in-out infinite, paycard-glow 1s ease-in-out infinite alternate; }
.paycard--declined .paycard__face { background: radial-gradient(120% 140% at 0% 0%, #a78bfa 0%, #7c3aed 38%, #3b0764 100%); }
.paycard--declined { animation: shake 0.45s var(--ease); }
.paycard--succeeded .paycard__face { transform: rotateX(0) rotateY(0) rotateZ(0); animation: none; transition: transform var(--dur-slow) var(--ease); }
@keyframes paycard-float {
  0%, 100% { transform: translateY(0) rotateX(8deg) rotateY(-12deg) rotateZ(-2deg); }
  50% { transform: translateY(-8px) rotateX(4deg) rotateY(-6deg) rotateZ(-1deg); }
}
@keyframes paycard-sheen { 0%, 60% { background-position: 150% 0; } 100% { background-position: -100% 0; } }
@keyframes paycard-glow { to { box-shadow: 0 18px 44px -10px rgba(139, 92, 246, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.25); } }
.declined { display: flex; gap: var(--s2); align-items: start; margin-bottom: var(--s3); padding: var(--s3); border-radius: var(--radius); background: var(--bad-tint); color: #7f1d1d; font-size: 0.875rem; }
.declined svg.i { color: var(--bad); margin-top: 2px; }
.paid { display: grid; justify-items: center; align-content: center; gap: var(--s2); height: 100%; text-align: center; }
.paid h3 { font-size: 1.125rem; margin-top: var(--s2); animation: fade-up 0.4s 0.5s var(--ease) both; }
.paid p { animation: fade-up 0.4s 0.6s var(--ease) both; }
.sandbox-line { display: flex; align-items: center; gap: var(--s2); justify-content: center; color: var(--text-3); font-size: 0.8125rem; }

.timeline { display: grid; gap: var(--s3); margin-top: var(--s3); position: relative; }
/* A line connects what happened, drawn while the items arrive. */
.timeline::before { content: ""; position: absolute; left: 15px; top: 16px; bottom: 16px; width: 2px; border-radius: 2px; background: var(--ok-line); transform-origin: top; }
.timeline.is-fresh::before { animation: line-down 2.2s 800ms var(--ease-in-out) both; }
.happened.appear { animation-delay: 450ms; }
.timeline li { display: grid; grid-template-columns: 32px 1fr; gap: var(--s3); align-items: center; animation: fade-up 0.6s var(--d) var(--ease) both; }
.timeline li > svg.i { position: relative; z-index: 1; width: 32px; height: 32px; padding: 7px; border-radius: 10px; background: var(--ok-tint); color: var(--ok); }
.timeline li span { color: var(--text-2); font-size: 0.875rem; }
.timeline li strong { display: block; color: var(--text); font-size: 0.9375rem; }

/* ================================================================ Done */

.done { display: grid; gap: var(--s4); justify-items: center; text-align: center; }
.done .lede { margin-bottom: var(--s2); }
.done > .card { width: 100%; text-align: left; }
.burst { position: relative; width: 96px; height: 96px; display: grid; place-items: center; }
/* One-shot confetti: pieces burst out, then fall and fade. Positions come from app.js; hidden at rest. */
.burst i { position: absolute; top: 50%; left: 50%; width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--brand)); opacity: 0; pointer-events: none; }
.burst i:nth-child(odd) { width: 5px; height: 11px; border-radius: 2px; }
.is-entering .burst i { animation: confetti var(--dur-celebrate) var(--t0, 240ms) both; }
.recap { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); text-align: left; }
.recap li { display: grid; grid-template-columns: auto 1fr; gap: var(--s3); align-items: start; padding: var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.recap li > span:last-child { display: grid; }
.recap li > span:last-child span { color: var(--text-3); font-size: 0.8125rem; }
.recap__icon { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ok-mid); color: #fff; }
.recap__icon svg.i { width: 13px; height: 13px; stroke-width: 3; }
/* Recap cards rise with a little depth, then their ticks pop. */
.is-entering .rise--depth { animation-name: rise-depth; }
.is-entering .recap .recap__icon { animation: pop var(--dur-med) calc(var(--d) + 220ms) var(--spring) both; }
.later { display: grid; }
.later li { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); padding: var(--s3) 0; border-top: 1px solid var(--line); font-size: 0.9375rem; }

/* Drawn check */
.checkmark { width: 44px; height: 44px; flex: none; }
.checkmark--sm { width: 34px; height: 34px; }
.checkmark--lg { width: 64px; height: 64px; }
.checkmark--xl { width: 88px; height: 88px; }
.checkmark circle { fill: var(--ok-mid); stroke: none; transform-origin: center; animation: pop 0.45s var(--spring) both; }
.checkmark path { fill: none; stroke: #fff; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; animation: draw 0.4s 0.25s var(--ease) both; }

.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.7s linear infinite; display: inline-block; opacity: 0.8; }
.check-row .spinner { color: var(--brand); }

/* ================================================================ Dashboard (light mock) */

.dash { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: calc(100vh - 72px); }
.side { position: sticky; top: 0; height: calc(100vh - 72px); display: flex; flex-direction: column; gap: var(--s5); padding: var(--s5) var(--s4); border-right: 1px solid var(--line); background: var(--surface); }
.side__biz { display: flex; align-items: center; gap: var(--s3); padding: var(--s2); border-radius: var(--radius); background: var(--surface-2); }
.side__biz strong { display: block; font-size: 0.875rem; }
.side__biz small { color: var(--text-3); font-size: 0.75rem; }
.side__avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--action); color: #fff; font-weight: 600; }
.side nav { position: relative; }
.side nav ul { display: grid; gap: 2px; }
.side .pill-slide { border-radius: 10px; background: var(--surface-2); }
.side nav a { display: flex; align-items: center; gap: var(--s3); padding: 8px var(--s3); border-radius: 10px; color: var(--text-2); text-decoration: none; font-size: 0.9375rem; font-weight: 500; position: relative; z-index: 1; transition: background-color var(--dur-fast), color var(--dur-fast), box-shadow var(--dur-fast) var(--ease); }
.side nav a:hover { background: var(--surface-2); color: var(--text); }
.side nav a[aria-current="page"] { color: var(--text); }
.side__env { margin-top: auto; display: grid; gap: 4px; justify-items: start; }
.side__env small { color: var(--text-3); font-size: 0.75rem; }
.dash__main { padding: var(--s6) var(--s6) var(--s7); display: grid; gap: var(--s4); align-content: start; max-width: 1040px; }
.dash__head { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); }
.setup { display: grid; grid-template-columns: auto 1fr auto; gap: var(--s4); align-items: center; }
.setup__text p { color: var(--text-2); font-size: 0.9375rem; margin-top: 2px; }
.setup__ok { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--ok-mid); color: #fff; }
.setup__ok svg.i { width: 24px; height: 24px; stroke-width: 2.5; }
.ring { position: relative; width: 56px; height: 56px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke: var(--line); stroke-width: 5; }
.ring .ring__fill { stroke: var(--text); stroke-linecap: round; animation: ring 1s 0.2s var(--ease) both; }
.ring span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 0.8125rem; font-weight: 600; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.tile { display: grid; gap: 4px; padding: var(--s5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.tile__label { color: var(--text-3); font-size: 0.8125rem; }
.tile__value { font-size: 1.75rem; font-weight: 600; letter-spacing: -0.03em; }
.tile--empty .tile__value { color: var(--line-2); }
.empty { display: grid; gap: var(--s3); justify-items: start; color: var(--text-2); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
th, td { padding: 12px var(--s4); text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--text-3); font-weight: 500; font-size: 0.8125rem; background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
.kv { display: grid; margin: var(--s3) 0 0; }
.kv__row { display: grid; grid-template-columns: 160px 1fr; gap: var(--s3); padding: 10px 0; border-top: 1px solid var(--line); }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; }
.center-page { min-height: 70vh; display: grid; place-content: center; justify-items: center; gap: var(--s4); text-align: center; padding: var(--s7) var(--s4); }

/* ================================================================ Walkthrough */

.tour { position: absolute; top: 0; left: 0; width: 100%; z-index: 70; pointer-events: none; }
.tour__spot {
  position: absolute; border-radius: 14px; pointer-events: none;
  box-shadow: 0 0 0 3px var(--brand), 0 0 0 9999px rgba(10, 10, 10, 0.42);
  /* The spotlight is kept between steps, so these glide it to the next target. */
  transition: top var(--dur-slow) var(--ease), left var(--dur-slow) var(--ease), width var(--dur-slow) var(--ease), height var(--dur-slow) var(--ease);
  animation: fade-in var(--dur-med) var(--ease);
}
.tour__pop {
  position: absolute; pointer-events: auto; display: grid; gap: 6px; padding: var(--s4) var(--s4) var(--s3);
  top: 0; left: 0; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); text-align: left;
  animation: fade-up var(--dur-med) var(--ease); transition: translate var(--dur-slow) var(--ease);
}
.tour__pop.is-still, .tour__pop.is-moving { animation: none; }
.tour__pop.is-moving > * { animation: fade-in var(--dur-med) 100ms var(--ease) both; }
/* The arrow points at the centre of the target. */
.tour__pop::before { content: ""; position: absolute; left: var(--arrow-x, 50%); width: 12px; height: 12px; border-radius: 2px; background: var(--surface); transform: translateX(-50%) rotate(45deg); }
.tour__pop--below::before { top: -5px; }
.tour__pop--above::before { bottom: -5px; }
.tour.is-leaving, .tour.is-leaving * { pointer-events: none !important; }
.tour.is-leaving > * { animation: fade-out var(--dur-fast) var(--ease-exit) forwards; }
.tour__pop p#tour-text { color: var(--text-2); font-size: 0.875rem; }
.tour__count { font-size: 0.75rem; font-weight: 600; color: var(--brand-ink); }
.tour__actions { display: flex; justify-content: flex-end; gap: var(--s2); margin-top: var(--s2); }
.tour__actions .btn--ghost { margin-right: auto; }

/* ================================================================ Environment switch */

.dash__tools { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.env-switch { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border: 1px solid var(--line); border-radius: var(--pill); background: var(--surface-2); }
.env-switch button {
  position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 30px; padding: 0 14px; border: 0; border-radius: var(--pill); background: none;
  font: 500 0.8125rem var(--font); color: var(--text-2); cursor: pointer; transition: color var(--dur-med);
}
.env-switch button:hover:not([aria-pressed="true"]) { color: var(--text); }
.env-switch button svg.i { width: 14px; height: 14px; }
.env-switch button[aria-pressed="true"] { color: #fff; }
.env-switch__thumb {
  position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: var(--pill);
  background: var(--brand); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform var(--dur-slow) var(--spring-soft), background-color var(--dur-med);
}
.env-switch[data-env="live"] .env-switch__thumb { transform: translateX(100%); background: var(--action); }
.pill--live { background: var(--action); color: #fff; border: 1px solid var(--action); }
.live-banner {
  display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4);
  border-radius: var(--radius); background: var(--action); color: #fff; font-size: 0.9375rem;
}
.live-banner p { flex: 1; }
.live-banner .btn { background: #fff; color: var(--text); }
.live-banner .btn:hover { background: var(--surface-2); }
.dash--live .side { background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%); }
.setup__note { grid-column: 1 / -1; margin-top: 0; }
@media (max-width: 720px) {
  .live-banner { flex-wrap: wrap; }
  .dash__head { flex-wrap: wrap; }
}

/* ================================================================ Help sidebar */

.help {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 75; width: min(380px, 100vw);
  display: flex; flex-direction: column; background: var(--surface);
  border-left: 1px solid var(--line); box-shadow: -16px 0 48px rgba(10, 10, 10, 0.08);
}
.help[hidden] { display: none; }
.help.is-opening { animation: help-in 0.4s var(--ease); }
.help.is-opening .help__faq details { animation: fade-up 0.35s calc(120ms + var(--d)) var(--ease) both; }
.help__head { position: relative; display: grid; gap: 4px; padding: var(--s5) var(--s7) var(--s4) var(--s5); border-bottom: 1px solid var(--line); }
.help__head h2 { font-size: 1.125rem; }
.help__close {
  position: absolute; top: var(--s4); right: var(--s4); display: grid; place-items: center; width: 32px; height: 32px;
  border: 1px solid var(--line-2); border-radius: 50%; background: var(--surface); color: var(--text-2); cursor: pointer;
  transition: color 0.15s, border-color 0.15s, transform 0.2s var(--ease);
}
.help__close:hover { color: var(--text); border-color: var(--text-3); transform: rotate(90deg); }
.help__body { flex: 1; overflow-y: auto; padding: var(--s4) var(--s5) var(--s8); display: grid; gap: var(--s5); align-content: start; }
.help__lede { color: var(--text-2); }
.help__faq details { border-bottom: 1px solid var(--line); }
.help__faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s3); padding: var(--s3) 0;
  list-style: none; font-weight: 500; cursor: pointer;
}
.help__faq summary::-webkit-details-marker { display: none; }
.help__faq summary svg.i { color: var(--text-3); transition: transform 0.25s var(--ease); }
.help__faq details[open] summary svg.i { transform: rotate(45deg); }
.help__faq details p { padding: 0 0 var(--s3); color: var(--text-2); font-size: 0.9375rem; animation: fade-up 0.25s var(--ease); }
.help h3 { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-3); }
.help__docs { display: grid; gap: var(--s2); margin-top: var(--s2); }
.help__docs a {
  display: flex; align-items: center; gap: var(--s2); padding: 10px var(--s3); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; font-weight: 500; font-size: 0.9375rem; transition: border-color 0.15s, transform 0.15s var(--ease);
}
.help__docs a:hover { border-color: var(--text-3); transform: translateX(2px); }
.help__docs small { margin-left: auto; color: var(--text-3); font-weight: 400; font-size: 0.75rem; }
.help__replay { justify-self: start; }
/* The answer a "?" opened: expanded, and lit briefly so the eye lands on it. */
.help__faq details.is-target { margin-inline: calc(var(--s2) * -1); padding-inline: var(--s2); border-radius: 8px; animation: help-target 1.8s 0.15s var(--ease) both; }
.help__faq details.is-target summary { color: var(--brand-ink); }

/* "?" beside a field or heading: opens Help at the answer about it. */
.qhelp {
  position: relative; flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; padding: 0;
  border: 0; border-radius: 50%; background: none; color: var(--text-3); cursor: pointer; vertical-align: middle;
  transition: color 0.15s, background-color 0.15s;
}
.qhelp::after { content: ""; position: absolute; inset: -6px; }
.qhelp svg.i { width: 16px; height: 16px; }
.qhelp:hover, .qhelp[aria-expanded="true"] { color: var(--brand-ink); background: var(--brand-tint); }
.qhelp:focus-visible { border-radius: 50%; }
.qlabel { display: inline-flex; align-items: center; gap: 4px; }
.qhead { display: flex; align-items: center; gap: 6px; }
.qhead > :first-child { margin: 0; }
.qhead .card__legend, .qhead .card__label { margin: 0; }
.qhead:has(.card__legend, .card__label) { margin-bottom: var(--s3); }
.sandbox-line .qhelp { margin-left: -4px; }
.ob__tour[aria-expanded="true"], .help-trigger[aria-expanded="true"] { background: var(--action); color: var(--on-action); border-color: var(--action); }
.ob__tour.is-new, .help-trigger.is-new { animation: nudge 1.1s 0.2s 3 var(--ease); }
/* On wide screens the dashboard makes room instead of being covered. */
@media (min-width: 1200px) {
  body.help-open .dash__main { margin-right: 380px; }
}

/* ================================================================ Prototype controls (not product) */

/* Always visible: a quiet one-line white bar across the bottom, apart from the product. */
.research-bar { position: relative; padding: var(--s2) 48px; background: #fde047; color: #422006; font-size: 0.875rem; text-align: center; text-wrap: balance; border-bottom: 1px solid #eab308; }
.research-bar[hidden] { display: none; }
.research-bar p { margin: 0; }
.research-bar__close { position: absolute; top: 50%; right: var(--s2); transform: translateY(-50%); display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: none; color: inherit; cursor: pointer; }
.research-bar__close:hover { background: rgba(66, 32, 6, 0.1); }
.research-bar__close:focus-visible { outline: 2px solid #422006; outline-offset: 0; }
.research-bar__close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.research-bar__link { padding: 0; border: 0; background: none; font: inherit; font-weight: 600; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; white-space: nowrap; }
.research-bar__link:hover { text-decoration-thickness: 2px; }
.research-bar__link:focus-visible { outline: 2px solid #422006; outline-offset: 2px; border-radius: 2px; }

.proto {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  display: flex; align-items: center; gap: var(--s3); height: 44px; padding: 0 var(--s4);
  background: var(--proto-bg); border-top: 1px solid var(--proto-line); box-shadow: 0 -6px 20px -12px rgba(10, 10, 10, 0.18);
  font-family: var(--mono); font-size: 0.6875rem; color: var(--proto-text-2);
  overflow-x: auto; white-space: nowrap; scrollbar-width: none;
}
.proto__tag { flex: none; display: inline-block; padding: 2px 8px; border-radius: var(--pill); background: var(--proto-accent-tint); color: var(--proto-accent); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.625rem; font-weight: 600; }
.proto__panel { flex: 1 0 auto; display: flex; align-items: center; gap: var(--s4); }
.proto__group { flex: none; display: flex; align-items: center; gap: var(--s1); }
.proto__credit { margin: 0 0 0 auto; flex: none; color: var(--proto-text-2); }
.proto__seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: 8px; background: var(--proto-panel); }
.proto__seg button, .proto__btn, .proto select {
  height: 26px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent; color: var(--proto-text-2); font: inherit; cursor: pointer;
}
.proto__seg button { height: 22px; }
.proto__seg button[aria-pressed="true"] { background: var(--proto-bg); color: var(--proto-text); font-weight: 600; box-shadow: 0 1px 2px rgba(10, 10, 10, 0.08), 0 0 0 1px var(--proto-line); }
.proto__btn { display: inline-flex; align-items: center; gap: 6px; }
.proto select { border: 1px solid var(--proto-line); background-color: var(--proto-bg); color: var(--proto-text); }
.proto__btn:hover, .proto__seg button:hover:not([aria-pressed="true"]), .proto select:hover { background-color: var(--proto-panel); color: var(--proto-text); }
.proto__btn svg.i { width: 12px; height: 12px; }
.proto__btn--strong { border: 1px solid var(--proto-line); color: var(--proto-text); font-weight: 600; }
.proto__btn--warn, .proto__btn--warn:hover { background: var(--proto-accent); color: var(--proto-on-accent); font-weight: 600; }
.proto__btn--warn:hover { filter: brightness(1.08); }
.proto__btn--cta, .proto__btn--cta:hover { height: 30px; padding: 0 14px; background: var(--proto-accent); color: var(--proto-on-accent); font-weight: 600; font-size: 0.75rem; box-shadow: 0 1px 2px rgba(37, 99, 235, 0.35); }
.proto__btn--cta:hover { filter: brightness(1.1); }
.proto select { min-height: 0; width: auto; padding-right: 24px; background-repeat: no-repeat; background-position: right 6px center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235b5b66' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
.proto :focus-visible, .proto-sheet :focus-visible { box-shadow: 0 0 0 2px var(--proto-bg), 0 0 0 4px var(--proto-accent); }
.proto__confirm { flex: none; display: flex; align-items: center; gap: var(--s2); padding-left: var(--s4); border-left: 1px solid var(--proto-line); color: var(--proto-text); }

.proto-sheet {
  width: min(820px, calc(100vw - 24px)); max-height: min(86vh, 900px); padding: 0; border: 1px solid var(--proto-line); border-radius: 16px;
  background: var(--proto-bg); color: var(--proto-text); font-size: 0.875rem; overflow: hidden; box-shadow: var(--shadow-lg);
}
.proto-sheet[open] { display: flex; flex-direction: column; animation: fade-up 0.3s var(--ease); }
.proto-sheet::backdrop { background: rgba(10, 10, 10, 0.35); }
.only {
  width: min(440px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--proto-line); border-radius: 16px;
  background: var(--proto-bg); color: var(--proto-text); box-shadow: var(--shadow-lg);
}
.only[open] { animation: fade-up 0.3s var(--ease); }
.only::backdrop { background: rgba(10, 10, 10, 0.35); }
.only__body { display: grid; justify-items: start; gap: var(--s3); padding: var(--s5) var(--s5) var(--s4); }
.only__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--proto-panel); color: var(--proto-text-2); }
.only__icon svg.i { width: 20px; height: 20px; }
.only h2 { font-size: 1.25rem; line-height: 1.25; letter-spacing: -0.015em; text-wrap: balance; }
.only p:not(.proto__tag) { color: var(--proto-text-2); font-size: 0.9375rem; line-height: 1.55; }
.only__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s2); padding: var(--s3) var(--s5) var(--s5); }
.only .proto__btn { height: 36px; padding: 0 var(--s4); font-family: var(--mono); font-size: 0.8125rem; }
.only :focus-visible { outline: none; box-shadow: 0 0 0 2px var(--proto-bg), 0 0 0 4px var(--proto-accent); }
@media (max-width: 420px) {
  .only__actions { flex-direction: column-reverse; }
  .only .proto__btn { justify-content: center; }
}
.sheet__head { position: relative; display: grid; gap: var(--s2); padding: var(--s5) var(--s5) var(--s3); }
.sheet__head h2 { font-size: 1.25rem; }
.sheet__head .proto__tag { justify-self: start; }
.sheet__close { position: absolute; top: var(--s4); right: var(--s4); font-family: var(--mono); font-size: 0.75rem; }
.sheet__tabs { display: flex; flex-wrap: wrap; gap: var(--s2); padding: 0 var(--s5) var(--s3); border-bottom: 1px solid var(--proto-line); font-family: var(--mono); font-size: 0.75rem; }
.sheet__tabs .proto__btn[aria-pressed="true"] { background: var(--proto-accent-tint); color: var(--proto-accent); font-weight: 600; }
.sheet__body { overflow-y: auto; padding: var(--s5); line-height: 1.6; }
.sheet__body > * + * { margin-top: var(--s3); }
.sheet__body h3 { margin-top: var(--s3); font-size: 0.9375rem; color: var(--proto-text); }
.sheet__body ul { list-style: disc; padding-left: 1.2rem; display: grid; gap: 4px; }
.sheet__body a { color: var(--proto-accent); }
.sheet__body table { font-size: 0.8125rem; }
.sheet__body th, .sheet__body td { border-color: var(--proto-line); padding: 10px 12px; }
.sheet__body th { background: var(--proto-panel); color: var(--proto-text-2); }
.sheet__body td.is-unseen { color: var(--proto-text-2); }
.sheet__note { padding: var(--s3); border-left: 2px solid var(--proto-accent); background: var(--proto-accent-tint); color: var(--proto-text-2); }

/* Research: a full-screen page in the prototype layer. */
.research {
  width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0;
  background: var(--proto-bg); color: var(--proto-text); font-size: 0.9375rem; overflow: hidden;
}
.research[open] { display: flex; flex-direction: column; animation: rs-in var(--dur-slow) var(--ease); }
.research::backdrop { background: var(--proto-bg); }
@keyframes rs-in { from { opacity: 0; transform: translateY(24px) scale(0.985); } }
.research :focus-visible { box-shadow: 0 0 0 2px var(--proto-bg), 0 0 0 4px var(--proto-accent); }
.rs-bar {
  display: flex; align-items: center; gap: var(--s3); flex: none; padding: var(--s3) var(--s5);
  border-bottom: 1px solid var(--proto-line); font-family: var(--mono); font-size: 0.75rem;
}
.rs-bar__title { color: var(--proto-text); font-weight: 600; }
.rs-bar__close { margin-left: auto; border: 1px solid var(--proto-line) !important; }
.rs-scroll { position: relative; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.rs { width: min(760px, 100%); margin: 0 auto; padding: var(--s6) var(--s5) var(--s8); line-height: 1.6; }
.rs h2, .rs h3, .rs h4 { color: var(--proto-text); text-wrap: balance; }
.rs a { color: var(--proto-accent); }
.rs-eyebrow, .rs-tag, .rs-who__label, .rs-tab { font-family: var(--mono); }
.rs-eyebrow { color: var(--proto-accent); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; }

.rs-hero { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: var(--s7); align-items: center; padding-bottom: var(--s6); }
.rs-hero h2 { margin-top: var(--s3); font-size: clamp(1.75rem, 3.4vw, 2.5rem); line-height: 1.12; letter-spacing: -0.03em; font-weight: 600; }
.rs-lead { margin-top: var(--s4); color: var(--proto-text-2); font-size: 1.0625rem; max-width: 42ch; }
.rs-photo { margin: 0; }
.rs-photo img { display: block; width: 100%; height: auto; border-radius: 20px; box-shadow: 0 0 0 1px var(--proto-line), 0 24px 48px -20px rgba(10, 10, 10, 0.3); }
.rs-photo figcaption { margin-top: var(--s2); color: var(--proto-text-2); font-family: var(--mono); font-size: 0.75rem; text-align: center; }

.rs-tabs { position: sticky; top: 0; z-index: 2; display: flex; gap: var(--s1); margin: 0 calc(var(--s2) * -1); padding: var(--s2); overflow-x: auto; background: var(--proto-bg); border-bottom: 1px solid var(--proto-line); scrollbar-width: none; }
.rs-tab { flex: none; height: 34px; padding: 0 var(--s3); border: 0; border-radius: var(--pill); background: transparent; color: var(--proto-text-2); font-size: 0.8125rem; cursor: pointer; }
.rs-tab:hover { background: var(--proto-panel); color: var(--proto-text); }
.rs-tab[aria-pressed="true"] { background: var(--proto-accent-tint); color: var(--proto-accent); font-weight: 600; }
.rs-panel { padding-top: var(--s6); }
.rs-panel[hidden] { display: none; }
.rs-kicker { margin-bottom: var(--s5); color: var(--proto-accent); font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; }
.rs-sec__intro { margin: calc(var(--s3) * -1) 0 var(--s5); max-width: 60ch; color: var(--proto-text-2); }
.rs-block .rs-sec__intro { margin: var(--s2) 0 var(--s4); }
.rs-fine { margin-top: var(--s5); color: var(--proto-text-2); font-size: 0.8125rem; max-width: 64ch; }

/* Big phrase, supporting text underneath. */
.rs-big { display: grid; }
.rs-big > li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: var(--s3); padding: var(--s6) 0; border-top: 1px solid var(--proto-line); }
.rs-big > li:first-child { border-top: 0; padding-top: 0; }
.rs-big__n { color: var(--proto-accent); font-family: var(--mono); font-size: 0.875rem; padding-top: 0.7rem; }
.rs-big h3 { font-size: clamp(1.5rem, 3vw, 2.125rem); line-height: 1.18; letter-spacing: -0.025em; font-weight: 600; max-width: 22ch; }
.rs-big--q h3 { font-size: clamp(1.25rem, 2.4vw, 1.625rem); line-height: 1.3; letter-spacing: -0.02em; max-width: 30ch; }
.rs-big__raised { margin-top: var(--s4); max-width: 60ch; color: var(--proto-text-2); font-size: 1.0625rem; }
.rs-big__do { margin-top: var(--s4); padding: var(--s3) var(--s4); border-left: 3px solid var(--proto-accent); background: var(--proto-accent-tint); border-radius: 0 10px 10px 0; max-width: 60ch; }
.rs-big__do .rs-who__label { color: var(--proto-accent); margin-bottom: 2px; }
.rs-big__raised .rs-who__label { margin-bottom: 2px; }
.rs-q__why { margin: var(--s3) 0 var(--s4); max-width: 60ch; color: var(--proto-text-2); font-size: 1.0625rem; }
.rs-probes { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s2); }
.rs-probes li { padding: 8px 14px; border-radius: var(--pill); background: var(--proto-panel); border: 1px solid var(--proto-line); font-size: 0.875rem; line-height: 1.4; }

.rs-statement { margin-top: var(--s6); padding-top: var(--s6); border-top: 1px solid var(--proto-line); }
.rs-statement h3 { font-size: clamp(1.5rem, 3vw, 2.125rem); line-height: 1.18; letter-spacing: -0.025em; font-weight: 600; max-width: 22ch; }
.rs-statement p { margin-top: var(--s4); max-width: 60ch; color: var(--proto-text-2); font-size: 1.0625rem; }

.rs-block { padding: var(--s5) 0; border-top: 1px solid var(--proto-line); }
.rs-block h4 { margin-bottom: var(--s2); font-size: 1.25rem; letter-spacing: -0.015em; }
.rs-block p { color: var(--proto-text-2); max-width: 64ch; }

.rs-bg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); margin-top: var(--s4); }
.rs-bg li { padding: var(--s4); background: var(--proto-panel); border-radius: 14px; }
.rs-bg p { margin-top: 4px; font-weight: 500; line-height: 1.45; }
.rs-callout { margin-top: var(--s4); padding: var(--s4) var(--s5); border-left: 3px solid var(--proto-accent); background: var(--proto-accent-tint); border-radius: 0 10px 10px 0; }
.rs-callout strong { color: var(--proto-text); }
.rs-callout--lead { margin: 0 0 var(--s6); max-width: 64ch; }

.rs-who__label { display: block; color: var(--proto-text-2); font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.06em; }
.rs-tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--pill); font-size: 0.6875rem; font-weight: 500; }
.rs-tag svg.i { width: 12px; height: 12px; }
.rs-tag--reported { background: var(--proto-accent-tint); color: var(--proto-accent); }
.rs-tag--assumed { background: var(--proto-panel); color: var(--proto-text-2); border: 1px solid var(--proto-line); }

.rs-list { margin-top: var(--s1); list-style: disc; padding-left: 1.2rem; display: grid; gap: 2px; color: var(--proto-text-2); }

.rs-who { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.rs-who__card { border: 1px solid var(--proto-line); border-radius: 14px; background: var(--proto-bg); overflow: hidden; color: var(--proto-text); }
.rs-who__head { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--s3); align-items: start; padding: var(--s4) var(--s4) var(--s2); }
.rs-who__avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--proto-accent); color: var(--proto-on-accent); font-weight: 600; font-size: 0.875rem; }
.rs-who__avatar--open { background: var(--proto-bg); color: var(--proto-text-2); border: 1.5px dashed var(--line-2); }
.rs-who__avatar svg.i { width: 18px; height: 18px; }
.rs-who__head h4 { margin: 0; font-size: 1rem; }
.rs-who__head p { margin: 2px 0 0; color: var(--proto-text-2); font-size: 0.8125rem; line-height: 1.45; }
.rs-who__basis { padding: 0 var(--s4) var(--s2); }
.rs-who__facts { margin: 0; padding: 0 var(--s4) var(--s2); }
.rs-who__facts > div { padding: var(--s2) 0; border-top: 1px solid var(--proto-line); }
.rs-who__facts dd { margin: 2px 0 0; font-size: 0.875rem; line-height: 1.45; }

.rs-foot { display: flex; justify-content: center; margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid var(--proto-line); font-family: var(--mono); font-size: 0.8125rem; }
.rs-foot .proto__btn { height: 40px; padding: 0 var(--s5); }

@media (max-width: 760px) {
  .rs { padding: var(--s5) var(--s4) var(--s7); }
  .rs-bar { padding: var(--s3) var(--s4); }
  .rs-hero { grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
  .rs-photo { width: min(240px, 70%); }
  .rs-bg, .rs-who { grid-template-columns: minmax(0, 1fr); }
  .rs-big > li { grid-template-columns: minmax(0, 1fr); gap: var(--s1); }
  .rs-big__n { padding-top: 0; }
}

/* ================================================================ Motion */

.is-entering .rise { animation: rise var(--dur-slow) var(--d, 0ms) var(--ease) both; }
.shake { animation: shake 0.4s var(--ease); }
/* Content that appears on a screen that is already showing (a result, the next action). */
.appear { animation: fade-up var(--dur-med) var(--ease) both; }

@keyframes help-target { from { background: var(--brand-tint); } to { background: transparent; } }
@keyframes help-in { from { transform: translateX(32px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes nudge { 0% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.55); } 100% { box-shadow: 0 0 0 10px rgba(139, 92, 246, 0); } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(0.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes draw { from { stroke-dashoffset: 40; } to { stroke-dashoffset: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes shake { 0%, 100% { transform: none; } 20% { transform: translateX(-4px); } 40% { transform: translateX(3px); } 60% { transform: translateX(-2px); } 80% { transform: translateX(1px); } }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, -12px); } 10%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -8px); } }
@keyframes ring { from { stroke-dashoffset: 138.2; } }
@keyframes confetti {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(0.4); animation-timing-function: cubic-bezier(0.15, 0.8, 0.3, 1); }
  45% { opacity: 1; transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) rotate(var(--r)); animation-timing-function: cubic-bezier(0.5, 0, 0.9, 0.6); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--x) * 1.15), calc(-50% + var(--y) + 46px)) rotate(calc(var(--r) * 2)); }
}
@keyframes fade-out { to { opacity: 0; } }
@keyframes tag-in { from { opacity: 0; transform: translateX(-4px); } to { opacity: 1; transform: none; } }
@keyframes rise-depth { from { opacity: 0; transform: translateY(14px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes land { from { opacity: 0; transform: translateY(10px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes word-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes pop-soft { 0% { transform: scale(0.8); } 60% { transform: scale(1.06); } 100% { transform: none; } }
@keyframes dot-in { from { transform: scale(0); } to { transform: none; } }
@keyframes dot-done { 0% { transform: scale(0.7); } 55% { transform: scale(1.15); } 100% { transform: none; } }
@keyframes draw-24 { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } }
@keyframes line-down { from { transform: scaleY(0); } }
@keyframes row-on { from { opacity: 0.45; } to { opacity: 1; } }
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes face-off { from { opacity: 1; } to { opacity: 0; } }
@keyframes progress { to { clip-path: inset(0 0 0 0 round 999px); } }
@keyframes lift { from { translate: 0 0; } }
@keyframes drift { from { transform: translate(-5%, -4%); } to { transform: translate(5%, 4%); } }
@keyframes switch-track { from { background: var(--line-2); } }
@keyframes switch-knob { from { left: 3px; } }
@keyframes switch-label { from { color: var(--text-3); } }

/* ================================================================ View transitions
   app.js crossfades between views where the browser supports it, never under reduced motion.
   The header, sidebar and prototype dock stay put; the step dots fly from the welcome list into the stepper;
   the offer card reshapes from prompt to draft to created; the pay button morphs into the success check. */

.ob__top { view-transition-name: ob-top; }
.side { view-transition-name: side; }
.proto { view-transition-name: proto; }
.stepper__item:nth-child(1) .stepper__dot, .path__item:nth-child(1) .path__no { view-transition-name: step-dot-1; }
.stepper__item:nth-child(2) .stepper__dot, .path__item:nth-child(2) .path__no { view-transition-name: step-dot-2; }
.stepper__item:nth-child(3) .stepper__dot, .path__item:nth-child(3) .path__no { view-transition-name: step-dot-3; }
.stepper__item:nth-child(4) .stepper__dot, .path__item:nth-child(4) .path__no { view-transition-name: step-dot-4; }
html[data-vt="back"] .path__no { view-transition-name: none; } /* the list rises in on the way back, so the dots don't fly */
.vt-offer { view-transition-name: offer-card; }
.vt-pay { view-transition-name: pay-mark; }
.checkmark.is-morphed circle { animation: none; }

::view-transition-group(*) { animation-duration: var(--dur-slow); animation-timing-function: var(--ease); }
::view-transition-old(root), ::view-transition-new(root) { mix-blend-mode: normal; }
::view-transition-old(root) { animation: vt-out var(--dur-fast) var(--ease-exit) both; }
::view-transition-new(root) { animation: vt-in var(--dur-fast) var(--ease) both; }
html[data-vt="back"]::view-transition-old(root) { animation-name: vt-out-back; }
::view-transition-group(offer-card) { overflow: clip; border-radius: var(--radius-lg); }
::view-transition-group(step-dot-2) { animation-delay: 30ms; }
::view-transition-group(step-dot-3) { animation-delay: 60ms; }
::view-transition-group(step-dot-4) { animation-delay: 90ms; }
@keyframes vt-out { to { opacity: 0; transform: translateX(-12px); } }
@keyframes vt-out-back { to { opacity: 0; transform: translateX(12px); } }
@keyframes vt-in { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .spinner, .drafting__label svg.i { animation: spin 1.6s linear infinite !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  .art > * { translate: none !important; }
}

/* ================================================================ Narrow screens */

@media (max-width: 1000px) {
  .ob__tour span { display: none; }
  .ob__tour { width: 32px; padding: 0; justify-content: center; }
}

@media (max-width: 860px) {
  .dash { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border-right: 0; border-bottom: 1px solid var(--line); }
  .side__biz { display: none; }
  .side nav { order: 3; flex: 1 1 100%; overflow-x: auto; }
  .side nav ul { display: flex; }
  .side nav a { white-space: nowrap; padding: 6px 10px; }
  .side__env { margin: 0 0 0 auto; grid-auto-flow: column; align-items: center; gap: var(--s2); }
  .dash__main { padding: var(--s5) var(--s4) var(--s7); }
  .setup { grid-template-columns: auto 1fr; }
  .setup .btn, .setup .chip { grid-column: 1 / -1; justify-self: start; }
}

@media (max-width: 720px) {
  body { font-size: 14.5px; }
  .ob__top { grid-template-columns: auto 1fr; gap: var(--s3); padding: var(--s3) var(--s4); }
  .ob__right { justify-self: end; gap: var(--s2); }
  .ob__right .pill, .ob__tour span, .ob__switch span { display: none; }
  .ob__tour { width: 32px; padding: 0; justify-content: center; }
  .stepper { grid-column: 1 / -1; grid-row: 2; }
  .stepper__item:not(.is-active) .stepper__label { visibility: hidden; }
  .ob__main { padding: var(--s5) var(--s4) var(--s7); }
  .welcome { padding-top: var(--s6); }
  .starts, .facts, .recap, .choices, .fields__pair, .fields--grid { grid-template-columns: minmax(0, 1fr); }
  .art { height: 160px; gap: var(--s2); padding: var(--s3); }
  .checkout { grid-template-columns: minmax(0, 1fr); }
  .paycard { width: min(100%, 220px); padding-top: var(--s3); }
  .checkout__pay { border-left: 0; border-top: 1px solid var(--line); }
  .checkout__summary, .checkout__pay { padding: var(--s5) var(--s4); }
  .sub { grid-template-columns: 28px 1fr; gap: var(--s3); }
  .sub__marker { width: 28px; height: 28px; }
  .sub:not(:last-child)::before, .sub:not(:last-child)::after { left: 13px; top: 32px; }
  .sub__body { padding: var(--s4); }
  .code pre { padding-right: var(--s4); padding-top: 52px; }
  .inline-form { flex-direction: column; }
  .proto__group--links { margin-left: 0; }
  .kv__row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .created { grid-template-columns: minmax(0, 1fr); justify-items: start; }
  .intro__facts > div { grid-template-columns: minmax(0, 1fr); gap: var(--s1); padding: var(--s4); }
}

@media (max-width: 600px) {
  .tiles { grid-template-columns: minmax(0, 1fr); }
}
