/* ZyroPay — layout concept: a settlement ledger. Generous paper sections, one dark
   "rail" band per page for the technical story, mono type wherever money or time is shown. */
:root {
  --paper: #f3f5f8;
  --surface: #ffffff;
  --sunk: #e9edf3;
  --ink: #0d1726;
  --ink-2: #3b4a5f;
  --muted: #66748a;
  --line: #d9e0ea;
  --accent: #2446e8;
  --accent-hover: #1a37c4;
  --accent-ink: #ffffff;
  --accent-soft: #e5eafd;
  --settled: #0a8467;
  --settled-soft: #daf2ea;
  --pending: #a35f00;
  --pending-soft: #fbeed8;
  --danger: #c4302b;
  --rail: #0b1424;
  --rail-2: #131f33;
  --rail-line: #24324a;
  --rail-ink: #e6ecf5;
  --rail-muted: #8d9ab0;
  --rail-accent: #8ea0ff;

  --f-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --f-body: "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --s-xs: .8125rem;
  --s-sm: .9375rem;
  --s-md: 1.0625rem;
  --s-lg: 1.25rem;
  --s-xl: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --s-2xl: clamp(2rem, 1.4rem + 2.4vw, 3rem);
  --s-3xl: clamp(2.5rem, 1.6rem + 4vw, 4.5rem);

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgb(13 23 38 / .06), 0 12px 32px -12px rgb(13 23 38 / .18);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0a111c; --surface: #111a28; --sunk: #0d1522; --ink: #e8edf4; --ink-2: #b6c1d0;
    --muted: #8592a6; --line: #223047; --accent: #7088ff; --accent-hover: #93a5ff; --accent-ink: #0a111c;
    --accent-soft: #19234a; --settled: #3cc8a0; --settled-soft: #0f2d26; --pending: #f0b35a;
    --pending-soft: #33260f; --danger: #ff7b72; --rail: #060b13; --rail-2: #0e1726; --rail-line: #1f2b40;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 12px 32px -12px rgb(0 0 0 / .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0a111c; --surface: #111a28; --sunk: #0d1522; --ink: #e8edf4; --ink-2: #b6c1d0;
  --muted: #8592a6; --line: #223047; --accent: #7088ff; --accent-hover: #93a5ff; --accent-ink: #0a111c;
  --accent-soft: #19234a; --settled: #3cc8a0; --settled-soft: #0f2d26; --pending: #f0b35a;
  --pending-soft: #33260f; --danger: #ff7b72; --rail: #060b13; --rail-2: #0e1726; --rail-line: #1f2b40;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 12px 32px -12px rgb(0 0 0 / .6);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 var(--s-md)/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--f-display); color: var(--ink); line-height: 1.08; letter-spacing: -.02em; margin: 0; text-wrap: balance; font-weight: 700; }
h1 { font-size: var(--s-3xl); letter-spacing: -.035em; }
h2 { font-size: var(--s-2xl); letter-spacing: -.03em; }
h3 { font-size: var(--s-lg); letter-spacing: -.01em; line-height: 1.25; }
p { margin: 0; }
code, kbd, .mono { font-family: var(--f-mono); font-size: .9em; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--ink); color: var(--paper); padding: .5rem 1rem; border-radius: var(--radius-sm); z-index: 100; }
.skip:focus { left: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(4rem, 3rem + 5vw, 7.5rem); }
.section--tight { padding-block: clamp(3rem, 2rem + 3vw, 5rem); }
.section--sunk { background: var(--sunk); }
.stack { display: grid; gap: 1rem; }
.stack-lg { display: grid; gap: 2rem; }
.stack > *, .stack-lg > * { min-width: 0; }

.eyebrow {
  font: 600 var(--s-xs)/1 var(--f-mono); text-transform: uppercase; letter-spacing: .12em;
  color: var(--accent); display: inline-flex; align-items: center; gap: .5rem;
}
.eyebrow::before { content: ""; width: .5rem; height: .5rem; border-radius: 2px; background: currentColor; }
.lede { font-size: var(--s-lg); color: var(--ink-2); max-width: 38rem; line-height: 1.55; }
.muted { color: var(--muted); }
.section-head { display: grid; gap: 1rem; max-width: 44rem; margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem); }
.section-head p { color: var(--ink-2); font-size: var(--s-lg); }

/* ---------- buttons ---------- */
.btn {
  --b-bg: var(--accent); --b-fg: var(--accent-ink); --b-bd: var(--accent);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 2.875rem; padding: .7rem 1.25rem; border-radius: 999px;
  background: var(--b-bg); color: var(--b-fg); border: 1px solid var(--b-bd);
  font: 600 var(--s-sm)/1 var(--f-body); text-decoration: none; cursor: pointer;
  transition: background .15s, transform .15s, border-color .15s, color .15s;
}
.btn:hover { --b-bg: var(--accent-hover); --b-bd: var(--accent-hover); color: var(--b-fg); }
.btn:active { transform: translateY(1px); }
.btn--ghost { --b-bg: transparent; --b-fg: var(--ink); --b-bd: var(--line); }
.btn--ghost:hover { --b-bg: var(--surface); --b-bd: var(--ink-2); --b-fg: var(--ink); }
.btn--rail { --b-bg: transparent; --b-fg: var(--rail-ink); --b-bd: var(--rail-line); }
.btn--rail:hover { --b-bg: var(--rail-2); --b-bd: var(--rail-muted); --b-fg: var(--rail-ink); }
.btn--sm { min-height: 2.375rem; padding: .5rem 1rem; }
.btn svg { width: 1rem; height: 1rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.link-arrow { font-weight: 600; text-decoration: none; display: inline-flex; gap: .35rem; align-items: center; }
.link-arrow::after { content: "→"; transition: transform .15s; }
.link-arrow:hover::after { transform: translateX(3px); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; gap: 1.5rem; min-height: 4.25rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); font: 700 1.3rem/1 var(--f-display); letter-spacing: -.03em; }
.brand:hover { color: var(--ink); }
.brand svg { width: 1.75rem; height: 1.75rem; flex: none; }
.nav-links { display: flex; align-items: center; gap: .25rem; margin: 0 0 0 auto; padding: 0; list-style: none; }
.nav-links a { display: block; padding: .5rem .8rem; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: var(--s-sm); }
.nav-links a:hover { color: var(--ink); background: var(--sunk); }
.nav-links a[aria-current="page"] { color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.nav-cta { display: flex; gap: .5rem; align-items: center; }
.nav-toggle {
  display: none; margin-left: auto; width: 2.75rem; height: 2.75rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 1.1rem; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform .2s, background .2s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 920px) {
  .nav-toggle { display: inline-flex; }
  .nav-menu {
    position: fixed; inset: calc(4.25rem + env(safe-area-inset-top, 0px)) 0 0 0; background: var(--paper);
    padding: 1.5rem var(--gutter) calc(2rem + env(safe-area-inset-bottom, 0px));
    display: flex; flex-direction: column; gap: 1.5rem; overflow-y: auto;
    border-top: 1px solid var(--line);
  }
  .nav-menu:not(.is-open) { display: none; }
  .nav-links { flex-direction: column; align-items: stretch; margin: 0; gap: 0; }
  .nav-links a { font: 600 1.5rem/1.2 var(--f-display); padding: .9rem 0; border-radius: 0; border-bottom: 1px solid var(--line); color: var(--ink); }
  .nav-links a:hover, .nav-links a[aria-current="page"] { background: none; box-shadow: none; color: var(--accent); }
  .nav-cta { flex-direction: column; align-items: stretch; }
  .nav-cta .btn { min-height: 3.25rem; }
  body.nav-open { overflow: hidden; }
}
@media (min-width: 921px) {
  .nav-menu { display: flex; align-items: center; gap: 1.5rem; flex: 1; }
}

/* ---------- hero ---------- */
.hero { padding-block: clamp(3rem, 2rem + 4vw, 6rem) clamp(4rem, 3rem + 4vw, 7rem); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px; opacity: .45;
  mask-image: radial-gradient(ellipse 70% 60% at 75% 40%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 75% 40%, #000 0%, transparent 75%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(2.5rem, 2rem + 3vw, 5rem); align-items: center; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { margin-top: 1.5rem; }
.hero .btn-row { margin-top: 2rem; }
.rails { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: 2.25rem; padding: 0; list-style: none; font: 500 var(--s-xs)/1.4 var(--f-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.rails li { display: inline-flex; align-items: center; gap: .45rem; }
.rails li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--settled); }
@media (max-width: 860px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }

/* payment receipt card in hero */
.receipt {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow);
  padding: 1.5rem; max-width: 26rem; width: 100%; justify-self: center; position: relative;
}
.receipt-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.merchant { display: flex; gap: .75rem; align-items: center; }
.merchant-logo { width: 2.5rem; height: 2.5rem; border-radius: 10px; background: var(--ink); color: var(--paper); display: grid; place-items: center; font: 700 1rem/1 var(--f-display); }
.merchant b { display: block; font-size: var(--s-sm); }
.merchant small { color: var(--muted); font-size: var(--s-xs); }
.amount { font: 600 2.5rem/1 var(--f-mono); letter-spacing: -.04em; margin-top: 1.5rem; font-variant-numeric: tabular-nums; }
.amount small { font-size: 1rem; color: var(--muted); letter-spacing: 0; margin-left: .25rem; }
.ref { margin-top: .4rem; color: var(--muted); font: 400 var(--s-xs)/1.4 var(--f-mono); }
.timeline { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 0; border-top: 1px dashed var(--line); padding-top: 1.25rem; }
.timeline li { display: grid; grid-template-columns: 1.25rem 1fr auto; gap: .75rem; align-items: start; position: relative; padding-bottom: 1rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: calc(.625rem - 1px); top: 1.3rem; bottom: .1rem; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.dot { width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--settled-soft); border: 2px solid var(--settled); display: grid; place-items: center; margin-top: .1rem; }
.dot::after { content: ""; width: .4rem; height: .4rem; border-radius: 50%; background: var(--settled); }
.timeline b { font-size: var(--s-sm); font-weight: 600; display: block; line-height: 1.4; }
.timeline span { font-size: var(--s-xs); color: var(--muted); }
.timeline time { font: 500 var(--s-xs)/1.6 var(--f-mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.receipt-foot { margin-top: 1.25rem; display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; padding: .85rem 1rem; border-radius: 10px; background: var(--settled-soft); color: var(--settled); font: 600 var(--s-sm)/1.2 var(--f-body); }
.receipt-foot .mono { font-weight: 600; }
@media (prefers-reduced-motion: no-preference) {
  .timeline li { animation: step-in .5s cubic-bezier(.2,.7,.2,1) both; }
  .timeline li:nth-child(2) { animation-delay: .35s; }
  .timeline li:nth-child(3) { animation-delay: .7s; }
  .timeline li:nth-child(4) { animation-delay: 1.05s; }
  .receipt-foot { animation: step-in .5s 1.4s cubic-bezier(.2,.7,.2,1) both; }
  @keyframes step-in { from { opacity: .25; transform: translateY(4px); } to { opacity: 1; transform: none; } }
}

/* ---------- pills ---------- */
.pill { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .6rem; border-radius: 999px; font: 600 .75rem/1.4 var(--f-body); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill--settled { background: var(--settled-soft); color: var(--settled); }
.pill--pending { background: var(--pending-soft); color: var(--pending); }
.pill--neutral { background: var(--sunk); color: var(--ink-2); }

/* ---------- ledger stats ---------- */
.ledger { border-block: 1px solid var(--line); background: var(--surface); }
.ledger-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ledger-item { padding: 1.75rem clamp(1rem, 2vw, 1.75rem); border-left: 1px solid var(--line); display: grid; gap: .35rem; }
.ledger-item:first-child { border-left: 0; padding-left: 0; }
.ledger-item b { font: 600 var(--s-xl)/1.1 var(--f-mono); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ledger-item span { color: var(--muted); font-size: var(--s-sm); }
@media (max-width: 760px) {
  .ledger-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ledger-item { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .ledger-item:nth-child(-n+2) { border-top: 0; }
  .ledger-item:nth-child(even) { padding-left: 1rem; border-left: 1px solid var(--line); }
}

/* ---------- features grid ---------- */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.feature { background: var(--surface); padding: clamp(1.5rem, 1rem + 1.5vw, 2.25rem); display: grid; gap: .75rem; align-content: start; }
.feature-icon { width: 2.5rem; height: 2.5rem; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: .5rem; }
.feature-icon svg { width: 1.25rem; height: 1.25rem; }
.feature p { color: var(--ink-2); font-size: var(--s-sm); }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .features { grid-template-columns: minmax(0, 1fr); } }

/* ---------- split layouts ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 1.5rem + 4vw, 5rem); align-items: center; }
.split--flip > :first-child { order: 2; }
.split .copy { display: grid; gap: 1.25rem; align-content: start; }
.split .copy > p { color: var(--ink-2); }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } .split--flip > :first-child { order: 0; } }
.checks { list-style: none; padding: 0; margin: .25rem 0 0; display: grid; gap: .75rem; }
.checks li { display: grid; grid-template-columns: 1.25rem 1fr; gap: .75rem; color: var(--ink-2); font-size: var(--s-sm); }
.checks li::before { content: ""; width: 1.25rem; height: 1.25rem; border-radius: 50%; margin-top: .1rem; background: var(--settled-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.5 2.5L14 7.5' fill='none' stroke='%230a8467' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; }
.checks b { color: var(--ink); font-weight: 600; }

/* ---------- flow diagram ---------- */
.flow-figure { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1rem, 2vw, 2rem); }
.flow-scroll { overflow-x: auto; }
.flow-scroll svg { display: block; min-width: 720px; width: 100%; height: auto; color: var(--ink); }
.flow-figure figcaption { margin-top: 1rem; color: var(--muted); font-size: var(--s-sm); max-width: 50rem; }
.flow-box { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; }
.flow-box--accent { fill: var(--accent-soft); stroke: var(--accent); }
.flow-box--settled { fill: var(--settled-soft); stroke: var(--settled); }
.flow-title { font: 600 14px var(--f-body); fill: var(--ink); }
.flow-sub { font: 400 11.5px var(--f-mono); fill: var(--muted); }
.flow-label { font: 500 11.5px var(--f-mono); fill: var(--ink-2); }
.flow-line { stroke: var(--ink-2); stroke-width: 1.5; fill: none; }
.flow-line--accent { stroke: var(--accent); stroke-width: 2; }
.flow-line--dash { stroke-dasharray: 5 5; }
.flow-step { fill: var(--ink); }
.flow-step-n { font: 700 11px var(--f-mono); fill: var(--paper); }

/* ---------- dashboard mock ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-head b { font-size: var(--s-sm); }
.panel-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.panel-kpis div { padding: 1rem 1.25rem; border-left: 1px solid var(--line); }
.panel-kpis div:first-child { border-left: 0; }
.panel-kpis small { display: block; color: var(--muted); font-size: .75rem; }
.panel-kpis b { font: 600 1.15rem/1.4 var(--f-mono); font-variant-numeric: tabular-nums; }
.spark { display: block; width: 100%; height: 28px; margin-top: .35rem; color: var(--accent); }
.table-scroll { overflow-x: auto; }
.txn { width: 100%; border-collapse: collapse; font-size: var(--s-xs); min-width: 30rem; }
.txn th { text-align: left; font-weight: 600; color: var(--muted); padding: .7rem 1.25rem; border-bottom: 1px solid var(--line); text-transform: uppercase; letter-spacing: .06em; font-size: .6875rem; }
.txn td { padding: .7rem 1.25rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.txn tr:last-child td { border-bottom: 0; }
.txn .num { text-align: right; font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.txn td.mono { color: var(--muted); }
@media (max-width: 500px) { .panel-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .panel-kpis div:nth-child(3) { display: none; } }

/* ---------- payment links ---------- */
.links-visual { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: end; }
.chat { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); padding: 1.25rem; display: grid; gap: .75rem; max-width: 22rem; }
.chat-meta { font: 500 .75rem/1 var(--f-mono); color: var(--muted); text-align: center; }
.bubble { background: var(--sunk); border-radius: 18px 18px 18px 4px; padding: .85rem 1rem; font-size: var(--s-sm); color: var(--ink); }
.bubble a { word-break: break-all; font-family: var(--f-mono); font-size: .8125rem; }
.bubble--me { background: var(--accent); color: var(--accent-ink); justify-self: end; border-radius: 18px 18px 4px 18px; }
.qr-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1rem; box-shadow: var(--shadow); display: grid; gap: .5rem; justify-items: center; }
.qr-card canvas { width: 120px; height: 120px; image-rendering: pixelated; }
.qr-card small { font: 500 .6875rem/1 var(--f-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.channels { display: flex; flex-wrap: wrap; gap: .5rem; }
@media (max-width: 520px) { .links-visual { grid-template-columns: minmax(0, 1fr); } .qr-card { justify-self: start; } }

/* ---------- dark rail band (developers) ---------- */
.rail { background: var(--rail); color: var(--rail-ink); }
.rail h2, .rail h3 { color: #fff; }
.rail .eyebrow { color: var(--rail-accent); }
.rail .section-head p, .rail p { color: var(--rail-muted); }
.rail a:not(.btn) { color: var(--rail-accent); }
.rail-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 1.5rem + 3vw, 4rem); align-items: start; }
@media (max-width: 900px) { .rail-grid { grid-template-columns: minmax(0, 1fr); } }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.5rem; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 2.25rem 1fr; gap: 1rem; counter-increment: step; }
.steps li::before { content: counter(step, decimal-leading-zero); font: 600 .8125rem/2.25rem var(--f-mono); width: 2.25rem; height: 2.25rem; text-align: center; border-radius: 8px; border: 1px solid var(--rail-line); color: var(--rail-accent); }
.steps b { display: block; color: #fff; font-weight: 600; margin-bottom: .2rem; }
.steps p { font-size: var(--s-sm); }
.sdks { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; }
.sdk { font: 500 .8125rem/1 var(--f-mono); padding: .55rem .8rem; border-radius: 999px; border: 1px solid var(--rail-line); color: var(--rail-ink); }

.code { background: var(--rail-2); border: 1px solid var(--rail-line); border-radius: var(--radius); overflow: hidden; min-width: 0; }
.code-tabs { display: flex; gap: .25rem; padding: .5rem; border-bottom: 1px solid var(--rail-line); overflow-x: auto; scrollbar-width: none; }
.code-tabs::-webkit-scrollbar { display: none; }
.code-tab { font: 500 .8125rem/1 var(--f-mono); color: var(--rail-muted); background: none; border: 0; padding: .55rem .8rem; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.code-tab:hover { color: var(--rail-ink); }
.code-tab[aria-selected="true"] { color: #fff; background: var(--rail-line); }
.code-body { position: relative; }
.code pre { margin: 0; padding: 1.25rem; overflow-x: auto; font: 400 .8125rem/1.7 var(--f-mono); color: #cfd8e6; tab-size: 2; }
.code .copy { position: absolute; top: .6rem; right: .6rem; font: 500 .75rem/1 var(--f-body); color: var(--rail-muted); background: var(--rail); border: 1px solid var(--rail-line); border-radius: 6px; padding: .4rem .6rem; cursor: pointer; }
.code .copy:hover { color: #fff; }
.tk-k { color: #ff9eb5; } .tk-s { color: #a8e6a3; } .tk-c { color: #6c7a91; font-style: italic; } .tk-f { color: #8ea0ff; } .tk-n { color: #f6c177; }

/* ---------- IBAN card ---------- */
.iban-card {
  background: linear-gradient(145deg, var(--rail-2), var(--rail)); color: var(--rail-ink);
  border-radius: 20px; padding: 1.75rem; display: grid; gap: 1.5rem; box-shadow: var(--shadow);
  max-width: 28rem; width: 100%; border: 1px solid var(--rail-line);
}
.iban-card .row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.iban-card small { display: block; color: var(--rail-muted); font: 500 .6875rem/1.4 var(--f-mono); text-transform: uppercase; letter-spacing: .1em; }
.iban-card .iban { font: 500 clamp(1rem, .85rem + .7vw, 1.3rem)/1.3 var(--f-mono); letter-spacing: .04em; color: #fff; word-break: break-word; }
.iban-card .bal { font: 600 1.75rem/1 var(--f-mono); color: #fff; font-variant-numeric: tabular-nums; }
.iban-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; border-top: 1px solid var(--rail-line); padding-top: 1.25rem; }
.iban-meta b { font: 500 .875rem/1.4 var(--f-mono); color: #fff; }
.chip-tag { font: 600 .6875rem/1 var(--f-mono); padding: .35rem .55rem; border-radius: 6px; background: var(--rail-line); color: var(--rail-ink); letter-spacing: .06em; }

/* ---------- coverage ---------- */
.coverage { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 12.5rem), 1fr)); gap: .5rem; list-style: none; padding: 0; margin: 0; }
.coverage li { display: flex; align-items: center; gap: .6rem; padding: .7rem .85rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: var(--s-sm); }
.coverage .cc { font: 600 .6875rem/1 var(--f-mono); color: var(--muted); width: 1.5rem; }
.coverage .rail-tag { white-space: nowrap; margin-left: auto; font: 500 .625rem/1 var(--f-mono); color: var(--settled); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--accent); color: var(--accent-ink); border-radius: 24px; padding: clamp(2rem, 1.5rem + 3vw, 4rem); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: center; position: relative; overflow: hidden; }
.cta-band h2 { color: var(--accent-ink); }
.cta-band p { color: var(--accent-ink); opacity: .85; margin-top: .75rem; max-width: 34rem; }
.cta-band .btn { --b-bg: var(--accent-ink); --b-fg: var(--accent); --b-bd: var(--accent-ink); }
.cta-band .btn:hover { --b-bg: transparent; --b-fg: var(--accent-ink); }
.cta-band .btn--ghost { --b-bg: transparent; --b-fg: var(--accent-ink); --b-bd: color-mix(in srgb, var(--accent-ink) 45%, transparent); }
.cta-band .btn--ghost:hover { --b-bd: var(--accent-ink); }
@media (max-width: 760px) { .cta-band { grid-template-columns: minmax(0, 1fr); } }

/* ---------- page header (inner pages) ---------- */
.page-head { padding-block: clamp(3rem, 2rem + 4vw, 5.5rem) clamp(2rem, 1.5rem + 2vw, 3.5rem); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2.25rem, 1.6rem + 3vw, 3.75rem); max-width: 18ch; margin-top: 1rem; }
.page-head .lede { margin-top: 1.25rem; }
.crumbs { font: 500 var(--s-xs)/1 var(--f-mono); color: var(--muted); display: flex; gap: .5rem; flex-wrap: wrap; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }

/* ---------- cards / generic grids ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-3, .grid-2 { grid-template-columns: minmax(0, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; display: grid; gap: .6rem; align-content: start; }
.card p { color: var(--ink-2); font-size: var(--s-sm); }
.card .k { font: 600 var(--s-xs)/1 var(--f-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
a.card { text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
a.card:hover { border-color: var(--accent); transform: translateY(-2px); color: inherit; }
a.card .link-arrow { color: var(--accent); margin-top: .5rem; }

.ref-table { width: 100%; border-collapse: collapse; font-size: var(--s-sm); background: var(--surface); }
.ref-table th, .ref-table td { text-align: left; padding: .8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.ref-table th { font: 600 .6875rem/1.4 var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: var(--sunk); }
.ref-table td:first-child { font-family: var(--f-mono); font-size: .8125rem; white-space: nowrap; color: var(--ink); }
.ref-table td { color: var(--ink-2); }
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
.table-wrap .ref-table tr:last-child td { border-bottom: 0; }
.method { font: 700 .6875rem/1 var(--f-mono); padding: .25rem .45rem; border-radius: 4px; margin-right: .4rem; }
.method--post { background: var(--accent-soft); color: var(--accent); }
.method--get { background: var(--settled-soft); color: var(--settled); }

/* ---------- FAQ ---------- */
.faq-layout { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: clamp(2rem, 4vw, 4rem); align-items: start; }
.faq-nav { position: sticky; top: calc(5.5rem + env(safe-area-inset-top, 0px)); display: grid; gap: .25rem; }
.faq-nav a { color: var(--ink-2); text-decoration: none; padding: .45rem .75rem; border-radius: 8px; font-size: var(--s-sm); }
.faq-nav a:hover { background: var(--sunk); color: var(--ink); }
.faq-search { width: 100%; margin-bottom: 2rem; }
.faq-group { margin-bottom: 3rem; }
.faq-group h2 { font-size: var(--s-xl); margin-bottom: 1rem; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 1rem; padding: 1.15rem 0; font-weight: 600; font-size: var(--s-md); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font: 400 1.5rem/1 var(--f-mono); color: var(--accent); transition: transform .2s; flex: none; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .answer { padding: 0 0 1.25rem; color: var(--ink-2); max-width: 44rem; display: grid; gap: .75rem; }
.faq-empty { color: var(--muted); padding: 2rem 0; }
@media (max-width: 820px) { .faq-layout { grid-template-columns: minmax(0, 1fr); } .faq-nav { position: static; display: flex; flex-wrap: wrap; } }

/* ---------- forms ---------- */
.form-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); gap: clamp(2rem, 4vw, 4rem); align-items: start; }
@media (max-width: 900px) { .form-layout { grid-template-columns: minmax(0, 1fr); } }
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: clamp(1.25rem, 1rem + 2vw, 2.5rem); }
.form { display: grid; gap: 1.25rem; }
.form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 1.25rem; }
.form legend { font: 700 var(--s-lg)/1.2 var(--f-display); padding: 0; margin-bottom: 1.25rem; letter-spacing: -.01em; }
.form fieldset + fieldset { border-top: 1px solid var(--line); padding-top: 2rem; margin-top: .75rem; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: minmax(0, 1fr); } }
.field { display: grid; gap: .4rem; min-width: 0; }
.field label, .field .label { font-weight: 600; font-size: var(--s-sm); }
.field .opt { color: var(--muted); font-weight: 400; }
.field .hint { font-size: var(--s-xs); color: var(--muted); }
.input, .field input[type="text"], .field input[type="email"], .field input[type="tel"], .field input[type="url"], .field input[type="search"], .field select, .field textarea {
  width: 100%; font: 400 1rem/1.4 var(--f-body); color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: 10px; padding: .75rem .9rem; min-height: 3rem;
  transition: border-color .15s, box-shadow .15s, background .15s; appearance: none; -webkit-appearance: none;
}
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 8l5 5 5-5' fill='none' stroke='%2366748a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .75rem center; background-size: 1.1rem; padding-right: 2.5rem; }
.field textarea { min-height: 8rem; resize: vertical; }
.input:hover, .field input:hover, .field select:hover, .field textarea:hover { border-color: var(--muted); }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-soft); }
.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea { border-color: var(--danger); }
.field .error { font-size: var(--s-xs); color: var(--danger); font-weight: 500; }
.choices { display: flex; flex-wrap: wrap; gap: .5rem; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.choice span { display: inline-flex; align-items: center; min-height: 2.5rem; padding: .5rem .95rem; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); font-size: var(--s-sm); font-weight: 500; color: var(--ink-2); transition: all .15s; }
.choice input:hover + span { border-color: var(--muted); }
.choice input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.check { display: grid; grid-template-columns: 1.25rem 1fr; gap: .75rem; font-size: var(--s-sm); color: var(--ink-2); align-items: start; }
.check input { width: 1.25rem; height: 1.25rem; margin: .1rem 0 0; accent-color: var(--accent); }
.form-foot { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.form-foot small { color: var(--muted); font-size: var(--s-xs); max-width: 26rem; }
.form-status { border-radius: 12px; padding: 1rem 1.15rem; font-size: var(--s-sm); }
.form-status--error { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.form-success { text-align: left; display: grid; gap: 1rem; padding: 1rem 0; }
.form-success .tick { width: 3rem; height: 3rem; border-radius: 50%; background: var(--settled-soft); color: var(--settled); display: grid; place-items: center; }
.form-success .tick svg { width: 1.5rem; height: 1.5rem; }
.form-success .ref { font-size: var(--s-sm); }
.btn[aria-busy="true"] { opacity: .7; pointer-events: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.contact-aside { display: grid; gap: 1.5rem; }
.contact-aside .card { gap: .4rem; }
.copy-line { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.copy-line .mono { font-size: var(--s-sm); color: var(--ink); user-select: all; }
.copy-btn { font: 500 .75rem/1 var(--f-body); border: 1px solid var(--line); background: var(--paper); color: var(--ink-2); border-radius: 6px; padding: .35rem .55rem; cursor: pointer; }
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- legal pages ---------- */
.legal-layout { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.legal-toc { position: sticky; top: calc(5.5rem + env(safe-area-inset-top, 0px)); display: grid; gap: .15rem; font-size: var(--s-sm); }
.legal-toc b { font: 600 .6875rem/1 var(--f-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: .75rem; }
.legal-toc a { color: var(--ink-2); text-decoration: none; padding: .35rem 0; border-left: 2px solid var(--line); padding-left: .85rem; }
.legal-toc a:hover { color: var(--accent); border-left-color: var(--accent); }
.legal-doc { max-width: 44rem; counter-reset: clause; }
.legal-doc h2 { font-size: var(--s-xl); margin: 3rem 0 1rem; counter-increment: clause; display: flex; gap: .75rem; scroll-margin-top: 6rem; }
.legal-doc h2::before { content: counter(clause) "."; color: var(--accent); font-family: var(--f-mono); font-size: .8em; padding-top: .15em; }
.legal-doc h2:first-of-type { margin-top: 0; }
.legal-doc h3 { font-size: var(--s-md); margin: 1.75rem 0 .5rem; }
.legal-doc p, .legal-doc li { color: var(--ink-2); }
.legal-doc p + p { margin-top: 1rem; }
.legal-doc ul, .legal-doc ol { padding-left: 1.25rem; display: grid; gap: .5rem; margin: 1rem 0; }
.legal-doc .table-wrap { margin: 1.25rem 0; }
.legal-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; font: 500 var(--s-xs)/1.4 var(--f-mono); color: var(--muted); margin-top: 1.5rem; }
.notice { background: var(--pending-soft); color: var(--ink); border-radius: 12px; padding: 1rem 1.15rem; font-size: var(--s-sm); margin-bottom: 2.5rem; border: 1px solid color-mix(in srgb, var(--pending) 30%, transparent); }
.notice b { color: var(--pending); }
@media (max-width: 860px) { .legal-layout { grid-template-columns: minmax(0, 1fr); } .legal-toc { position: static; } }

/* ---------- about ---------- */
.principles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.principle { padding: 2rem 2rem 2rem 0; border-bottom: 1px solid var(--line); display: grid; gap: .6rem; }
.principle:nth-child(even) { padding-left: 2rem; padding-right: 0; border-left: 1px solid var(--line); }
.principle p { color: var(--ink-2); }
@media (max-width: 700px) { .principles { grid-template-columns: minmax(0, 1fr); } .principle, .principle:nth-child(even) { padding: 1.75rem 0; border-left: 0; } }
.entities { display: grid; gap: 1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .entities { grid-template-columns: minmax(0, 1fr); } }

/* ---------- footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding-block: 4rem 2rem; margin-top: 0; font-size: var(--s-sm); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr)); gap: 2.5rem 2rem; }
.footer-brand { display: grid; gap: 1rem; align-content: start; }
.footer-brand p { color: var(--ink-2); max-width: 22rem; }
.footer-col h4 { font: 600 .6875rem/1 var(--f-mono); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 1rem; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.footer-col a { color: var(--ink-2); text-decoration: none; }
.footer-col a:hover { color: var(--accent); }
.socials { display: flex; gap: .5rem; }
.socials a { width: 2.25rem; height: 2.25rem; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-2); }
.socials a:hover { color: var(--accent); border-color: var(--accent); }
.socials svg { width: 1rem; height: 1rem; }
.footer-legal { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); display: grid; gap: 1rem; color: var(--muted); font-size: var(--s-xs); line-height: 1.6; }
.footer-legal p { max-width: 62rem; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: center; }
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; list-style: none; padding: 0; margin: 0; }
.footer-bottom a { color: var(--muted); }
.theme-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; gap: 2px; }
.theme-switch button { border: 0; background: none; color: var(--muted); font: 500 .75rem/1 var(--f-body); padding: .4rem .7rem; border-radius: 999px; cursor: pointer; }
.theme-switch button[aria-pressed="true"] { background: var(--sunk); color: var(--ink); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-brand { grid-column: 1 / -1; } }

/* ---------- cookie banner ---------- */
.cookie {
  position: fixed; z-index: 80; left: 1rem; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  max-width: 34rem; margin-inline: auto; background: var(--ink); color: var(--paper);
  border-radius: 16px; padding: 1.15rem 1.25rem; display: grid; gap: 1rem; box-shadow: 0 20px 50px -20px rgb(0 0 0 / .5);
  font-size: var(--s-sm);
}
.cookie a { color: inherit; }
.cookie .btn-row { gap: .5rem; }
.cookie .btn { --b-bg: var(--paper); --b-fg: var(--ink); --b-bd: var(--paper); min-height: 2.5rem; }
.cookie .btn--ghost { --b-bg: transparent; --b-fg: var(--paper); --b-bd: color-mix(in srgb, var(--paper) 35%, transparent); }

/* ---------- 404 ---------- */
.notfound { min-height: 60vh; display: grid; align-content: center; gap: 1.25rem; padding-block: 5rem; }
.notfound .code-big { font: 600 clamp(4rem, 3rem + 6vw, 8rem)/1 var(--f-mono); color: var(--accent); letter-spacing: -.06em; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* steps outside the dark rail */
.steps--light { gap: 1rem; }
.steps--light li::before { border-color: var(--line); color: var(--accent); background: var(--paper); }
.steps--light b { color: var(--ink); }
.steps--light p { color: var(--muted); }

/* hosted checkout mock (home) */
.bank-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; }
.bank { font-size: var(--s-xs); font-weight: 500; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink-2); }
.bank.is-on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.legend-opt { font: 400 var(--s-sm)/1 var(--f-body); color: var(--muted); letter-spacing: 0; }
.form fieldset > .hint { font-size: var(--s-xs); color: var(--muted); }
