/* NeuralShop site styles. Tokens are documented in design/website/DESIGN.md. */

:root {
  color-scheme: light dark;

  --bg: #f6f5f1;
  --surface: #ffffff;
  --surface-2: #efeee8;
  --line: #dedcd3;
  --line-strong: #c9c6bb;
  --ink: #15171c;
  --ink-2: #474c56;
  --ink-3: #636871;
  --accent: #0e6e5c;
  --accent-hover: #0a5a4b;
  --accent-ink: #ffffff;
  --accent-soft: #e1efea;
  --accent-soft-ink: #0a5546;
  --focus: #0e6e5c;
  --pending-bg: #fbefd2;
  --pending-ink: #6f4500;
  --success-bg: #e0f2e6;
  --success-ink: #0b6237;
  --error-bg: #fbe7e4;
  --error-ink: #a01f17;
  --neutral-bg: #ebeae4;
  --neutral-ink: #474c56;
  --header-bg: rgb(255 255 255 / 0.82);
  --shadow-1: 0 1px 2px rgb(21 23 28 / 0.06), 0 4px 12px rgb(21 23 28 / 0.05);
  --shadow-2: 0 2px 4px rgb(21 23 28 / 0.06), 0 12px 32px rgb(21 23 28 / 0.08);

  --s-25: 2px;
  --s-50: 4px;
  --s-75: 8px;
  --s-100: 12px;
  --s-200: 16px;
  --s-300: 24px;
  --s-400: 32px;
  --s-500: 40px;
  --s-600: 48px;
  --s-700: 64px;
  --s-800: 80px;
  --s-900: 96px;

  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 8px;
  --r-xl: 12px;
  --r-2xl: 16px;
  --r-3xl: 24px;
  --r-full: 9999px;

  --font: system-ui, -apple-system, "Segoe UI", "Noto Sans", "Ubuntu", "Cantarell", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 300ms;
  --dur: 500ms;
  --container: 1120px;
  --measure: 65ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #181818;
    --surface: #1f1f1f;
    --surface-2: #272727;
    --line: #313131;
    --line-strong: #474747;
    --ink: #f2f1ec;
    --ink-2: #c4c2bb;
    --ink-3: #a3a19a;
    --accent: #5cc8ad;
    --accent-hover: #7ad4bd;
    --accent-ink: #0b1f1a;
    --accent-soft: #1d3a33;
    --accent-soft-ink: #9fe3d1;
    --focus: #7ad4bd;
    --pending-bg: #3a2e12;
    --pending-ink: #f3cf7d;
    --success-bg: #173523;
    --success-ink: #8edcab;
    --error-bg: #401b18;
    --error-ink: #f5a59c;
    --neutral-bg: #272727;
    --neutral-ink: #c4c2bb;
    --header-bg: rgb(31 31 31 / 0.82);
    --shadow-1: 0 1px 2px rgb(0 0 0 / 0.4), 0 4px 12px rgb(0 0 0 / 0.25);
    --shadow-2: 0 2px 4px rgb(0 0 0 / 0.4), 0 12px 32px rgb(0 0 0 / 0.35);
  }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: var(--s-900); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
h1, h2, h3, h4 { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
::selection { background: var(--accent-soft); color: var(--accent-soft-ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: var(--r-sm); }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
.num, .amount, time { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.actions-row { margin-top: var(--s-300); }
.mt-200 { margin-top: var(--s-200); }
.measure-narrow { max-width: 52ch; }

/* Text styles (landing-page-design B1) */
.heading-1 { font-size: 60px; line-height: 60px; font-weight: 600; letter-spacing: -0.03em; }
.heading-2 { font-size: 48px; line-height: 48px; font-weight: 600; letter-spacing: -0.025em; }
.heading-3 { font-size: 36px; line-height: 40px; font-weight: 600; letter-spacing: -0.02em; }
.heading-4 { font-size: 30px; line-height: 36px; font-weight: 600; letter-spacing: -0.02em; }
.heading-5 { font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -0.01em; }
.heading-6 { font-size: 20px; line-height: 28px; font-weight: 600; }
.title-1 { font-size: 20px; line-height: 28px; font-weight: 500; }
.title-2 { font-size: 18px; line-height: 28px; font-weight: 500; }
.title-3 { font-size: 16px; line-height: 24px; font-weight: 500; }
.title-4 { font-size: 14px; line-height: 20px; font-weight: 500; }
.body-1 { font-size: 16px; line-height: 24px; font-weight: 600; }
.body-3 { font-size: 16px; line-height: 24px; font-weight: 400; }
.body-4 { font-size: 14px; line-height: 20px; font-weight: 600; }
.body-6 { font-size: 14px; line-height: 20px; font-weight: 400; }
.caption-1 { font-size: 14px; line-height: 20px; font-weight: 500; }
.caption-2 { font-size: 14px; line-height: 20px; font-weight: 400; }
.caption-3 { font-size: 12px; line-height: 16px; font-weight: 600; }
.caption-5 { font-size: 12px; line-height: 16px; font-weight: 400; }
.muted { color: var(--ink-2); }
.subtle { color: var(--ink-3); }

/* Layout */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--s-200); }
.container--narrow { max-width: 560px; }
.container--text { max-width: 760px; }
.stack > * + * { margin-top: var(--s-200); }
.stack-sm > * + * { margin-top: var(--s-75); }
.stack-lg > * + * { margin-top: var(--s-300); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--s-100); align-items: center; }
.main { padding-block: var(--s-400) var(--s-700); }
.section { padding-block: var(--s-700); }
.section + .section { border-top: 1px solid var(--line); }
.section__head { max-width: 680px; margin-bottom: var(--s-400); }
.section__head > * + * { margin-top: var(--s-75); }
.page-title { margin-bottom: var(--s-300); }
.page-title > * + * { margin-top: var(--s-75); }
.back-link { display: inline-flex; align-items: center; gap: var(--s-75); min-height: 44px; color: var(--ink-2); text-decoration: none; }
.back-link:hover { color: var(--ink); text-decoration: underline; }
.back-link .icon { transform: rotate(180deg); }

@media (min-width: 640px) {
  .container { padding-inline: var(--s-300); }
}
@media (min-width: 1024px) {
  .container { padding-inline: var(--s-400); }
  .main { padding-block: var(--s-600) var(--s-800); }
  .section { padding-block: var(--s-900); }
}

/* Skip link */
.skip-link {
  position: absolute;
  left: var(--s-200);
  top: var(--s-200);
  z-index: 100;
  padding: var(--s-100) var(--s-200);
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--r-lg);
  transform: translateY(-200%);
  transition: transform var(--dur-fast) var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* Icons */
.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--lg { width: 24px; height: 24px; }
.icon--xl { width: 32px; height: 32px; stroke-width: 1.5; }

/* Header: compact floating bar */
.site-header { position: sticky; top: var(--s-100); z-index: 50; padding-inline: var(--s-100); }
.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-100);
  max-width: var(--container);
  margin: var(--s-100) auto 0;
  padding: var(--s-50) var(--s-50) var(--s-50) var(--s-100);
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
}
.logo { display: inline-flex; align-items: center; gap: var(--s-75); min-height: 44px; text-decoration: none; color: var(--ink); font-size: 18px; line-height: 28px; font-weight: 600; letter-spacing: -0.01em; }
.logo__mark { width: 28px; height: 28px; border-radius: var(--r-lg); background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.logo__mark svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.site-nav { display: flex; align-items: center; gap: var(--s-50); }
.site-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: var(--s-75) var(--s-100);
  border-radius: var(--r-xl);
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.site-nav__link:hover { background: var(--surface-2); color: var(--ink); }
.site-nav__link[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
.site-nav .btn { border-radius: var(--r-xl); }
@media (max-width: 359px) {
  .logo__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Buttons */
.btn {
  --btn-bg: var(--surface);
  --btn-ink: var(--ink);
  --btn-line: var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-75);
  min-height: 44px;
  padding: var(--s-75) var(--s-100);
  border: 1px solid var(--btn-line);
  border-radius: var(--r-xl);
  background: var(--btn-bg);
  color: var(--btn-ink);
  font: inherit;
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--primary { --btn-bg: var(--accent); --btn-ink: var(--accent-ink); --btn-line: var(--accent); }
.btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn--ghost { --btn-bg: transparent; --btn-line: transparent; color: var(--ink-2); }
.btn--ghost:hover { color: var(--ink); }
.btn--danger { --btn-ink: var(--error-ink); }
.btn--sm { min-height: 44px; padding: var(--s-75) var(--s-100); font-size: 14px; line-height: 20px; }
.btn--lg { min-height: 48px; padding: var(--s-100) var(--s-300); font-size: 18px; line-height: 24px; }
.btn--block { display: flex; width: 100%; }
.btn[aria-disabled="true"], .btn:disabled {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--ink-3);
  cursor: not-allowed;
  transform: none;
}
.btn .icon { width: 20px; height: 20px; }
.link-btn { display: inline-flex; align-items: center; gap: var(--s-50); min-height: 44px; color: var(--accent); font-weight: 600; text-decoration: none; }
.link-btn:hover { text-decoration: underline; }
@media (prefers-color-scheme: dark) { .link-btn { color: var(--accent); } }

/* Cards and surfaces */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  padding: var(--s-300);
}
.card--flush { padding: 0; overflow: hidden; }
.card__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-75) var(--s-200); margin-bottom: var(--s-200); }
.divider { border: 0; border-top: 1px dashed var(--line-strong); margin: var(--s-200) 0; }

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s-50);
  padding: var(--s-25) var(--s-75);
  border-radius: var(--r-full);
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--neutral-bg);
  color: var(--neutral-ink);
}
.badge .icon { width: 14px; height: 14px; stroke-width: 2; }
.badge--pending { background: var(--pending-bg); color: var(--pending-ink); }
.badge--paid, .badge--done { background: var(--success-bg); color: var(--success-ink); }
.badge--failed, .badge--canceled, .badge--expired, .badge--error { background: var(--error-bg); color: var(--error-ink); }
.badge--source { background: transparent; border: 1px solid var(--line); color: var(--ink-2); font-weight: 500; }

/* Alerts */
.alert {
  display: flex;
  gap: var(--s-100);
  align-items: flex-start;
  padding: var(--s-200);
  border-radius: var(--r-xl);
  background: var(--neutral-bg);
  color: var(--ink);
}
.alert > .icon { margin-top: var(--s-25); color: var(--neutral-ink); }
.alert__body > * + * { margin-top: var(--s-50); }
.alert--info { background: var(--accent-soft); }
.alert--info > .icon { color: var(--accent-soft-ink); }
.alert--error { background: var(--error-bg); }
.alert--error > .icon, .alert--error .alert__title { color: var(--error-ink); }
.alert--pending { background: var(--pending-bg); }
.alert--pending > .icon, .alert--pending .alert__title { color: var(--pending-ink); }
.alert--success { background: var(--success-bg); }
.alert--success > .icon, .alert--success .alert__title { color: var(--success-ink); }

/* Forms */
.field > * + * { margin-top: var(--s-75); }
.label { display: block; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink); }
.hint { font-size: 14px; line-height: 20px; color: var(--ink-3); }
.input {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: var(--s-100) var(--s-200);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xl);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  line-height: 24px;
  font-variant-numeric: tabular-nums;
  caret-color: var(--accent);
  transition: border-color var(--dur-fast) var(--ease);
}
.input::placeholder { color: var(--ink-3); }
.input:hover { border-color: var(--ink-3); }
.input:focus-visible { border-color: var(--focus); outline-offset: 0; border-radius: var(--r-xl); }
.input-affix { position: relative; }
.input-affix .input { padding-right: var(--s-700); }
.input-affix__unit { position: absolute; right: var(--s-200); top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.input:user-invalid { border-color: var(--error-ink); }
.field__error { display: none; font-size: 14px; line-height: 20px; color: var(--error-ink); }
.field:has(.input:user-invalid) .field__error { display: block; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; }

/* Choice chips (amount presets) */
.chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-75); }
.chips > .choice:last-child { grid-column: span 2; }
@media (min-width: 560px) { .chips { grid-template-columns: repeat(5, minmax(0, 1fr)); } .chips > .choice:last-child { grid-column: auto; } }
.choice { position: relative; display: block; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: var(--s-75) var(--s-100);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xl);
  background: var(--surface);
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.choice:hover .chip { border-color: var(--ink-3); }
.choice input:checked + .chip { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-soft-ink); box-shadow: inset 0 0 0 1px var(--accent); }
.choice input:focus-visible + .chip, .choice input:focus-visible + .method { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Payment method cards */
.methods { display: grid; gap: var(--s-75); }
.method {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--s-100);
  min-height: 64px;
  padding: var(--s-100) var(--s-200);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xl);
  background: var(--surface);
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.method__icon { width: 40px; height: 40px; border-radius: var(--r-lg); background: var(--surface-2); color: var(--ink-2); display: grid; place-items: center; }
.method__text { min-width: 0; }
.method__name { display: block; font-size: 16px; line-height: 24px; font-weight: 500; }
.method__note { display: block; font-size: 14px; line-height: 20px; color: var(--ink-3); }
.method__fee { font-size: 14px; line-height: 20px; font-weight: 600; white-space: nowrap; color: var(--ink-2); }
.method__fee--free { color: var(--success-ink); }
.choice:hover .method { border-color: var(--ink-3); }
.choice input:checked + .method { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--surface); }
.choice input:checked + .method .method__icon { background: var(--accent-soft); color: var(--accent-soft-ink); }

/* Receipt (balance, invoice, quote) */
.receipt {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  padding: var(--s-300);
  box-shadow: var(--shadow-1);
}
.receipt__row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-200); padding-block: var(--s-50); }
.receipt__row dt { color: var(--ink-2); }
.receipt__row dd { font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; }
.receipt__row--total { padding-top: var(--s-100); }
.receipt__row--total dt { color: var(--ink); font-weight: 600; }
.receipt__row--total dd { font-size: 20px; line-height: 28px; font-weight: 600; }
.balance { font-size: 48px; line-height: 48px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.balance__cents { color: var(--ink-3); }
@media (min-width: 640px) { .balance { font-size: 60px; line-height: 60px; } }

/* Tables that collapse to rows on mobile */
.table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
.table caption { text-align: left; }
.table th { text-align: left; font-weight: 500; color: var(--ink-3); padding: var(--s-100) var(--s-200); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: var(--s-100) var(--s-200); border-bottom: 1px solid var(--line); vertical-align: middle; font-variant-numeric: tabular-nums; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .ta-right { text-align: right; }
@media (max-width: 639px) {
  .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table, .table tbody, .table tr, .table td { display: block; }
  .table tr { display: grid; grid-template-columns: 1fr auto; gap: var(--s-50) var(--s-100); padding: var(--s-100) var(--s-200); border-bottom: 1px solid var(--line); }
  .table tbody tr:last-child { border-bottom: 0; }
  .table td { padding: 0; border: 0; }
  .table .ta-right { text-align: right; }
  .table td[data-col="date"] { grid-column: 1; color: var(--ink-3); font-size: 12px; line-height: 16px; }
  .table td[data-col="status"] { grid-column: 2; grid-row: 1; justify-self: end; }
  .table td[data-col="title"], .table td[data-col="method"] { grid-column: 1; font-weight: 500; font-size: 16px; line-height: 24px; }
  .table td[data-col="amount"] { grid-column: 2; font-weight: 600; font-size: 16px; line-height: 24px; }
  .table td[data-col="source"], .table td[data-col="qty"] { grid-column: 1; color: var(--ink-3); }
}

/* Empty state */
.empty { display: grid; justify-items: start; gap: var(--s-75); padding: var(--s-400) var(--s-300); }

/* Skeleton (used only where the backend renders a placeholder before data) */
.skeleton { display: block; height: 16px; border-radius: var(--r-md); background: var(--surface-2); animation: skeleton 1600ms var(--ease) infinite alternate; }
@keyframes skeleton { from { opacity: 1; } to { opacity: 0.45; } }

/* Hero */
.hero { padding-block: var(--s-500) var(--s-700); }
.hero__grid { display: grid; gap: var(--s-600); align-items: center; }
.hero__title { max-width: 680px; font-size: 36px; line-height: 40px; font-weight: 600; letter-spacing: -0.025em; }
.hero__lead { max-width: 680px; margin-top: var(--s-200); color: var(--ink-2); font-size: 18px; line-height: 28px; }
.hero__actions { margin-top: var(--s-400); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-100) var(--s-300); }
.hero__proof { margin-top: var(--s-300); display: flex; flex-wrap: wrap; gap: var(--s-75) var(--s-200); color: var(--ink-2); font-size: 14px; line-height: 20px; }
.hero__proof li { display: inline-flex; align-items: center; gap: var(--s-75); }
.hero__proof .icon { color: var(--accent); }
.br-desktop { display: none; }
@media (min-width: 1024px) {
  .hero { padding-block: var(--s-800) var(--s-700); }
  .hero__grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: var(--s-700); }
  .hero__title { font-size: 48px; line-height: 48px; letter-spacing: -0.025em; }
  .br-desktop { display: inline; }
}
@media (min-width: 640px) and (max-width: 1023px) {
  .hero__title { font-size: 48px; line-height: 48px; letter-spacing: -0.025em; }
}

/* Hero product preview: a receipt that prints in once */
.preview { position: relative; max-width: 420px; width: 100%; justify-self: center; }
.preview .receipt { box-shadow: var(--shadow-2); }
.preview__label { margin-bottom: var(--s-100); }
.preview__list > li { display: grid; grid-template-columns: 1fr auto; gap: var(--s-25) var(--s-100); padding-block: var(--s-100); border-top: 1px solid var(--line); }
.preview__list > li:first-child { border-top: 0; }
@media (prefers-reduced-motion: no-preference) {
  .preview .receipt { animation: print-in 900ms var(--ease) both; }
}
@keyframes print-in {
  from { opacity: 0; transform: translateY(24px); clip-path: inset(0 0 100% 0 round 16px); }
  to { opacity: 1; transform: none; clip-path: inset(0 0 0 0 round 16px); }
}

/* How it works: a ledger line */
.steps { display: grid; gap: var(--s-300); counter-reset: step; }
.step { position: relative; padding-left: var(--s-700); }
.step__num {
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--r-full);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  display: grid;
  place-items: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 21px;
  top: 52px;
  bottom: calc(var(--s-300) * -1 + 8px);
  border-left: 1px dashed var(--line-strong);
}
.step > * + * { margin-top: var(--s-50); }
@media (min-width: 1024px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-400); }
  .step { padding-left: 0; padding-top: var(--s-700); }
  .step:not(:last-child)::after { left: 56px; right: calc(var(--s-400) * -1 + 12px); top: 21px; bottom: auto; border-left: 0; border-top: 1px dashed var(--line-strong); }
}

/* Tagline reveal (landing-page-design B11), CSS scroll-driven, JS-free */
.tagline { padding-block: var(--s-800); }
.tagline__text { max-width: 760px; font-size: 30px; line-height: 36px; font-weight: 600; letter-spacing: -0.02em; }
.tagline__text .w { color: var(--ink); }
@media (min-width: 1024px) {
  .tagline { padding-block: var(--s-900); }
  .tagline__text { font-size: 48px; line-height: 48px; letter-spacing: -0.025em; }
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .tagline__text .w {
      color: color-mix(in srgb, var(--ink) 30%, transparent);
      animation: word-on linear both;
      animation-timeline: view();
      animation-range: entry calc(var(--i) * 4% + 20%) entry calc(var(--i) * 4% + 34%);
    }
  }
}
@keyframes word-on { to { color: var(--ink); } }

/* Categories as an editorial list */
.cats { display: grid; border-top: 1px solid var(--line); }
.cat { display: grid; grid-template-columns: auto 1fr; gap: var(--s-75) var(--s-200); padding-block: var(--s-300); border-bottom: 1px solid var(--line); align-items: start; }
.cat__icon { width: 48px; height: 48px; border-radius: var(--r-xl); background: var(--accent-soft); color: var(--accent-soft-ink); display: grid; place-items: center; grid-row: span 2; }
.cat__tags { grid-column: 2; display: flex; flex-wrap: wrap; gap: var(--s-50); }
.tag { display: inline-flex; padding: var(--s-25) var(--s-75); border: 1px solid var(--line); border-radius: var(--r-full); font-size: 12px; line-height: 16px; font-weight: 500; color: var(--ink-2); }
@media (min-width: 1024px) {
  .cat { grid-template-columns: 48px minmax(0, 320px) 1fr; align-items: center; }
  .cat__icon { grid-row: auto; }
  .cat__tags { grid-column: 3; justify-content: flex-end; }
}

/* Payment trust block */
.split { display: grid; gap: var(--s-500); }
@media (min-width: 1024px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-700); align-items: start; } }
.facts { display: grid; gap: var(--s-300); }
.fact { display: grid; grid-template-columns: auto 1fr; gap: var(--s-25) var(--s-200); }
.fact > .icon { grid-row: span 2; margin-top: var(--s-25); color: var(--accent); }
.paylist { display: grid; }
.paylist li { display: grid; grid-template-columns: auto 1fr auto; gap: var(--s-100); align-items: center; padding: var(--s-200) 0; border-bottom: 1px solid var(--line); }
.paylist li:last-child { border-bottom: 0; }

/* Channel and bot links */
.linkrow { display: grid; gap: var(--s-75); }
@media (min-width: 640px) { .linkrow { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.linkcard {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--s-100);
  min-height: 64px;
  padding: var(--s-100) var(--s-200);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  text-decoration: none;
  transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
}
.linkcard:hover { border-color: var(--ink-3); text-decoration: none; }
.linkcard__icon { width: 40px; height: 40px; border-radius: var(--r-lg); background: var(--surface-2); display: grid; place-items: center; color: var(--ink-2); }
.linkcard__label { display: block; font-size: 12px; line-height: 16px; color: var(--ink-3); }
.linkcard__value { display: block; font-weight: 600; overflow-wrap: anywhere; }
.linkcard > .icon { color: var(--ink-3); }

/* FAQ */
.faq { border-top: 1px solid var(--line); max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-200);
  min-height: 56px;
  padding-block: var(--s-200);
  cursor: pointer;
  list-style: none;
  font-size: 18px;
  line-height: 28px;
  font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { transition: transform var(--dur) var(--ease); color: var(--ink-3); }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq summary:focus-visible { outline-offset: 4px; }
.faq details > div { padding-bottom: var(--s-300); color: var(--ink-2); max-width: var(--measure); }

/* Final CTA */
.cta-final { text-align: left; }
.cta-final__box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3xl); padding: var(--s-500) var(--s-300); }
.cta-final__box > * + * { margin-top: var(--s-200); }
.cta-final .hero__actions { margin-top: var(--s-300); }
@media (min-width: 1024px) { .cta-final__box { padding: var(--s-700); } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: var(--s-500) var(--s-400); color: var(--ink-2); font-size: 14px; line-height: 20px; }
.site-footer__grid { display: grid; gap: var(--s-400); }
.site-footer h2 { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink); margin-bottom: var(--s-75); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.site-footer li a:hover { color: var(--ink); text-decoration: underline; }
.site-footer__legal { margin-top: var(--s-400); padding-top: var(--s-200); border-top: 1px solid var(--line); color: var(--ink-3); font-size: 12px; line-height: 16px; }
@media (min-width: 640px) { .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
@media (min-width: 640px) { .footer-compact { display: flex; flex-wrap: wrap; gap: var(--s-75) var(--s-300); } }

/* Auth pages */
.auth { min-height: calc(100vh - 220px); display: grid; align-content: start; padding-block: var(--s-500) var(--s-700); }
@media (min-width: 640px) { .auth { padding-block: var(--s-800); } }
.auth__card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3xl); padding: var(--s-300); box-shadow: var(--shadow-1); }
@media (min-width: 640px) { .auth__card { padding: var(--s-500); } }
.auth__card > * + * { margin-top: var(--s-300); }
.or { display: flex; align-items: center; gap: var(--s-100); color: var(--ink-3); font-size: 14px; line-height: 20px; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.privacy-note { display: flex; gap: var(--s-100); align-items: flex-start; color: var(--ink-2); font-size: 14px; line-height: 20px; }
.privacy-note .icon { color: var(--accent); margin-top: var(--s-25); }

/* Match code (bot login) */
.match {
  display: grid;
  justify-items: center;
  gap: var(--s-75);
  padding: var(--s-400) var(--s-300);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-2xl);
  background: var(--bg);
  text-align: center;
}
.match__code { font-size: 96px; line-height: 1; font-weight: 600; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; color: var(--ink); }
.timer { display: inline-flex; align-items: center; gap: var(--s-75); font-weight: 600; font-variant-numeric: tabular-nums; }

@property --t { syntax: "<integer>"; inherits: true; initial-value: 0; }
@property --m { syntax: "<integer>"; inherits: true; initial-value: 0; }
@property --sec { syntax: "<integer>"; inherits: true; initial-value: 0; }
.countdown { --start: 300; display: none; }
@supports (animation-timeline: view()) {
  .countdown {
    display: inline;
    animation: countdown calc(var(--start) * 1s) steps(var(--start), end) forwards;
    --m: max(0, calc((var(--t) - 30) / 60));
    --sec: calc(var(--t) - var(--m) * 60);
    counter-reset: m var(--m) s var(--sec);
  }
  .countdown::after { content: counter(m) ":" counter(s, decimal-leading-zero); }
  .countdown + .countdown-fallback { display: none; }
}
@keyframes countdown { from { --t: var(--start); } to { --t: 0; } }

.botlinks { display: grid; gap: var(--s-75); }

/* Status pages (pay return) */
.status-hero { display: grid; justify-items: start; gap: var(--s-200); }
.status-hero__icon { width: 64px; height: 64px; border-radius: var(--r-2xl); display: grid; place-items: center; }
.status-hero__icon .icon { width: 32px; height: 32px; stroke-width: 1.5; }
.status-hero--pending .status-hero__icon { background: var(--pending-bg); color: var(--pending-ink); }
.status-hero--paid .status-hero__icon { background: var(--success-bg); color: var(--success-ink); }
.status-hero--failed .status-hero__icon { background: var(--error-bg); color: var(--error-ink); }
.status-hero--neutral .status-hero__icon { background: var(--neutral-bg); color: var(--neutral-ink); }
@media (prefers-reduced-motion: no-preference) {
  .status-hero--pending .status-hero__icon .icon { animation: turn 2400ms var(--ease) infinite; }
}
@keyframes turn { 0%, 30% { transform: rotate(0); } 60%, 100% { transform: rotate(180deg); } }

/* Cabinet */
.cabinet-grid { display: grid; gap: var(--s-300); }
@media (min-width: 1024px) {
  .cabinet-grid { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
  .cabinet-grid__aside { position: sticky; top: var(--s-900); }
}
.greeting { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-100); margin-bottom: var(--s-300); }
.balance-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3xl); padding: var(--s-300); box-shadow: var(--shadow-1); }
.balance-card > * + * { margin-top: var(--s-200); }
@media (min-width: 640px) { .balance-card { padding: var(--s-400); } }
.panel-title { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-100); padding: var(--s-200) var(--s-200) var(--s-100); }
.panel-foot { padding: var(--s-100) var(--s-200) var(--s-200); border-top: 1px solid var(--line); }
.pager { display: flex; justify-content: space-between; gap: var(--s-75); }

/* Topup */
.topup-grid { display: grid; gap: var(--s-300); }
@media (min-width: 1024px) {
  .topup-grid { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
  .topup-grid__aside { position: sticky; top: var(--s-900); }
}
.step-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2xl); padding: var(--s-300); }
.step-block > legend, .step-block__title { float: left; width: 100%; margin-bottom: var(--s-200); }
.step-block > legend + * { clear: both; }
.step-block > * + * { margin-top: var(--s-200); }
.usdt-only { display: none; }
.topup-form:has(#m-usdt:checked) .usdt-only { display: block; }
.topup-form:has(#m-usdt:checked) .rub-only { display: none; }
.quote { display: none; }
.amount-custom { display: none; }
.topup-form:has(#a-custom:checked) .amount-custom { display: block; }
@supports not selector(:has(*)) {
  .amount-custom, .usdt-only, .quote--custom { display: block; }
}
.topup-form:has(#a-custom:checked) .quote--custom { display: block; }
.topup-form:has(#m-usdt:checked) .quote--usdt { display: block; }
.topup-form:has(#a-500:checked):has(#m-sbp:checked) .quote[data-amount="500"][data-method="sbp"],
.topup-form:has(#a-1000:checked):has(#m-sbp:checked) .quote[data-amount="1000"][data-method="sbp"],
.topup-form:has(#a-2000:checked):has(#m-sbp:checked) .quote[data-amount="2000"][data-method="sbp"],
.topup-form:has(#a-5000:checked):has(#m-sbp:checked) .quote[data-amount="5000"][data-method="sbp"] { display: block; }
.topup-form:has(#m-usdt:checked) .quote:not(.quote--usdt) { display: none; }
.choice input:disabled + .method { background: var(--surface-2); border-style: dashed; color: var(--ink-3); cursor: not-allowed; }
.choice input:disabled + .method .method__fee, .choice input:disabled + .method .method__note { color: var(--ink-3); }
.choice:has(input:disabled):hover .method { border-color: var(--line-strong); }

/* Legal */
.prose { max-width: var(--measure); color: var(--ink); }
.prose h2 { font-size: 24px; line-height: 32px; font-weight: 600; margin-top: var(--s-600); margin-bottom: var(--s-100); }
.prose h3 { font-size: 18px; line-height: 28px; font-weight: 600; margin-top: var(--s-300); margin-bottom: var(--s-75); }
.prose p, .prose ul, .prose ol { margin-bottom: var(--s-200); color: var(--ink-2); }
.prose li + li { margin-top: var(--s-50); }
.placeholder { padding: 0 var(--s-50); border-radius: var(--r-sm); background: var(--pending-bg); color: var(--pending-ink); font-weight: 500; }
.toc { display: flex; flex-wrap: wrap; gap: var(--s-75); padding: 0; margin: 0 0 var(--s-400); list-style: none; }
.toc a { display: inline-flex; align-items: center; min-height: 44px; padding: var(--s-75) var(--s-100); border: 1px solid var(--line); border-radius: var(--r-full); text-decoration: none; font-size: 14px; line-height: 20px; color: var(--ink-2); background: var(--surface); }
.toc a:hover { color: var(--ink); border-color: var(--ink-3); }
.legal-layout { display: grid; gap: var(--s-400); }
.legal-section { scroll-margin-top: var(--s-900); }

/* 404 */
.notfound { display: grid; gap: var(--s-300); justify-items: start; padding-block: var(--s-700) var(--s-900); }
.notfound__code { font-size: 96px; line-height: 1; font-weight: 600; letter-spacing: -0.04em; color: var(--ink-3); font-variant-numeric: tabular-nums; }
@media (min-width: 1024px) { .notfound__code { font-size: 128px; } }

/* States gallery */
.gallery { display: grid; gap: var(--s-300); }
@media (min-width: 1024px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.gallery__item > * + * { margin-top: var(--s-100); }
.demo-hover { background: var(--surface-2) !important; }
.demo-hover.btn--primary { background: var(--accent-hover) !important; border-color: var(--accent-hover) !important; }
.demo-focus { outline: 3px solid var(--focus); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; animation-iteration-count: 1 !important; }
  .countdown { animation: countdown calc(var(--start) * 1s) steps(var(--start), end) forwards !important; }
}

@media print {
  .site-header, .site-footer, .skip-link { display: none; }
}

.tagline__text .w[data-i="0"] { --i: 0; }
.tagline__text .w[data-i="1"] { --i: 1; }
.tagline__text .w[data-i="2"] { --i: 2; }
.tagline__text .w[data-i="3"] { --i: 3; }
.tagline__text .w[data-i="4"] { --i: 4; }
.tagline__text .w[data-i="5"] { --i: 5; }
.tagline__text .w[data-i="6"] { --i: 6; }
.tagline__text .w[data-i="7"] { --i: 7; }
.tagline__text .w[data-i="8"] { --i: 8; }
.tagline__text .w[data-i="9"] { --i: 9; }
.tagline__text .w[data-i="10"] { --i: 10; }
.tagline__text .w[data-i="11"] { --i: 11; }