/* ==========================================================================
   Ostra Pay — design tokens
   Ink backgrounds, warm pearl text, one champagne accent. Colour is used sparingly;
   hierarchy comes from type, spacing and hairlines.
   ========================================================================== */
:root {
  --bg: #090b0f;
  --bg-2: #0c0f14;
  --surface: #0f1319;
  --surface-2: #141920;
  --surface-3: #1a2028;
  --line: rgba(236, 232, 225, 0.07);
  --line-2: rgba(236, 232, 225, 0.12);
  --line-3: rgba(236, 232, 225, 0.22);

  --text: #ece8e1;
  --muted: #a3a09a;
  --dim: #6f6d69;

  --pearl: #ede6da;        /* primary action */
  --pearl-hi: #f7f2ea;
  --ink: #0b0e13;          /* text on pearl */
  --gold: #c9b48c;         /* champagne accent: kickers, focus, key numbers */
  --gold-soft: rgba(201, 180, 140, 0.14);

  --ok: #9cc7b2;
  --warn: #dcbc7c;
  --bad: #de9585;

  --nacre: linear-gradient(115deg, #efe9df 0%, #dde6e4 28%, #e8dfe8 52%, #f1e7d6 76%, #e3e9ec 100%);

  --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;

  --r-sm: 8px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(0.22, 0.7, 0.2, 1);
  --shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.75);

  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  background:
    radial-gradient(1100px 520px at 70% -120px, rgba(201, 180, 140, 0.07), transparent 70%),
    radial-gradient(900px 500px at 0% 0%, rgba(120, 150, 170, 0.05), transparent 70%),
    var(--bg);
  background-repeat: no-repeat;
}
/* Fine film grain — keeps large dark areas from looking flat. Plain alpha (no blend mode) so it
   composites cheaply instead of re-blending the whole viewport every animation frame. */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: 0.5;
  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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 1.5px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--pearl); color: var(--ink); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--pearl); color: var(--ink); padding: 10px 14px; border-radius: var(--r-sm);
}
.skip:focus { top: 12px; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.mono { font-family: var(--mono); font-feature-settings: 'zero' 1, 'tnum' 1; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ==========================================================================
   Buttons, chips, inputs
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 46px; padding: 0 22px; border-radius: 999px;
  font: 500 15px/1 var(--sans); letter-spacing: -0.005em; white-space: nowrap;
  transition: background 0.25s var(--ease), border-color 0.25s, color 0.25s, transform 0.2s var(--ease), opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.38; pointer-events: none; }
.btn svg { width: 16px; height: 16px; }
.btn--sm { height: 36px; padding: 0 16px; font-size: 14px; }
.btn--lg { height: 54px; padding: 0 28px; font-size: 15.5px; }
.btn--block { width: 100%; }
.btn--primary { background: var(--pearl); color: var(--ink); }
.btn--primary:hover { background: var(--pearl-hi); }
.btn--ghost { background: transparent; border: 1px solid var(--line-2); color: var(--text); }
.btn--ghost:hover { border-color: var(--line-3); background: rgba(236, 232, 225, 0.03); }
.btn .arrow { transition: transform 0.3s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

.link { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 4px; transition: text-decoration-color 0.2s; }
.link:hover { text-decoration-color: var(--text); }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 14px; border-radius: 999px;
  background: transparent; border: 1px solid var(--line-2);
  color: var(--muted); font-size: 13.5px; font-weight: 500; white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.chip:hover { color: var(--text); border-color: var(--line-3); }
.chip[aria-pressed='true'], .chip.is-on { background: var(--text); color: var(--ink); border-color: var(--text); }
.chip img { width: 18px; height: 18px; border-radius: 50%; }
.chip__count { opacity: 0.5; font-size: 12px; font-family: var(--mono); }

.kicker {
  display: inline-flex; align-items: center; gap: 12px; margin-bottom: 20px;
  font: 500 11.5px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold);
}
.kicker::before { content: ''; width: 18px; height: 1px; background: currentColor; opacity: 0.7; }

.tag {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px 7px 10px; border-radius: 999px; border: 1px solid var(--line-2);
  font-size: 13px; color: var(--muted);
}
.tag__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(156, 199, 178, 0.15); }

.label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; font-weight: 500; }

.input {
  width: 100%; height: 50px; padding: 0 16px;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r);
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.input::placeholder { color: var(--dim); }
.input:focus { border-color: rgba(201, 180, 140, 0.55); box-shadow: 0 0 0 4px rgba(201, 180, 140, 0.08); }
.input.is-bad { border-color: rgba(222, 149, 133, 0.6); }
.input--mono { font-family: var(--mono); font-size: 13.5px; }

select.input {
  appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='m1 1.5 5 5 5-5' stroke='%23a3a09a' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
}

/* Ostra's own dropdown (js/select.js) */
.xselect { position: relative; }
.xselect__btn {
  width: 100%; height: 50px; padding: 0 14px 0 10px; display: flex; align-items: center; gap: 10px; text-align: left;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r); transition: border-color 0.2s, box-shadow 0.2s;
}
.xselect__btn:hover { border-color: var(--line-3); }
.xselect.is-open .xselect__btn, .xselect__btn:focus-visible { outline: none; border-color: rgba(198, 180, 255, 0.55); box-shadow: 0 0 0 4px rgba(198, 180, 255, 0.08); }
.xselect__btn > svg { flex: none; width: 16px; height: 16px; margin-left: auto; color: var(--muted); transition: transform 0.3s var(--ease); }
.xselect.is-open .xselect__btn > svg { transform: rotate(180deg); }
.xselect__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.xselect__code {
  flex: none; display: inline-grid; place-items: center; min-width: 34px; height: 24px; padding: 0 6px; border-radius: 7px;
  font: 500 11px/1 var(--mono); letter-spacing: 0.08em; color: var(--gold); background: rgba(198, 180, 255, 0.1); border: 1px solid rgba(198, 180, 255, 0.18);
}
.xselect__pop {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: max(100%, 320px);
  padding: 8px; border-radius: 18px; background: rgba(16, 18, 26, 0.96); border: 1px solid var(--line-2);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  box-shadow: 0 30px 80px -24px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(198, 180, 255, 0.05) inset;
  opacity: 0; transform: translate3d(0, -6px, 0) scale(0.98); transform-origin: top right;
  transition: opacity 0.18s ease, transform 0.25s var(--ease);
}
.xselect.is-open .xselect__pop { opacity: 1; transform: none; }
.xselect__search { position: relative; margin-bottom: 6px; }
.xselect__search svg { position: absolute; left: 12px; top: 50%; width: 15px; height: 15px; transform: translateY(-50%); color: var(--dim); }
.xselect__search input {
  width: 100%; height: 42px; padding: 0 12px 0 36px; border-radius: 12px; outline: none;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); font-size: 14.5px;
}
.xselect__search input:focus { border-color: rgba(198, 180, 255, 0.4); }
.xselect__list { position: relative; list-style: none; margin: 0; padding: 0; max-height: min(360px, 52vh); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-3) transparent; }
.xselect__opt { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; cursor: pointer; font-size: 14.5px; color: var(--muted); }
.xselect__opt.is-active { background: rgba(198, 180, 255, 0.09); color: var(--text); }
.xselect__opt[aria-selected="true"] { color: var(--text); }
.xselect__opt > svg { flex: none; width: 16px; height: 16px; margin-left: auto; color: var(--gold); }
.xselect__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xselect__empty { padding: 14px 10px; font-size: 14px; color: var(--dim); }
@media (max-width: 560px) { .xselect__pop { width: 100%; } }

.note {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--r);
  background: rgba(236, 232, 225, 0.025); border: 1px solid var(--line);
  font-size: 13.5px; color: var(--muted); line-height: 1.5;
}
.note svg { flex: none; width: 17px; height: 17px; margin-top: 1px; }
.note--warn { border-color: rgba(220, 188, 124, 0.25); color: #e3d2ad; }
.note--bad { border-color: rgba(222, 149, 133, 0.28); color: #eab8ad; }
.note--ok { border-color: rgba(156, 199, 178, 0.25); color: #c4ddd1; }

.spinner {
  width: 15px; height: 15px; border-radius: 50%;
  border: 1.5px solid currentColor; border-right-color: transparent;
  animation: spin 0.7s linear infinite; display: inline-block; vertical-align: -3px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
  background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%);
  background-size: 200% 100%; animation: shimmer 1.6s linear infinite; border-radius: var(--r-sm);
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ==========================================================================
   Nav
   ========================================================================== */
.nav {
  position: sticky; top: 0; z-index: 50;
  transition: background 0.35s, border-color 0.35s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(9, 11, 15, 0.78);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom-color: var(--line);
}
.nav__inner {
  width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto;
  height: 72px; display: flex; align-items: center; gap: 28px;
}
.brand { display: inline-flex; align-items: center; color: var(--text); }
.brand .wm { font-size: 34px; transform: translateY(-2px); }

/* The wordmark: the ring-and-pearl mark is the O of "Ostra". Sized to Instrument Serif's O: 0.74em tall with a
   0.01em overshoot below the baseline, so it works at any font size. */
.wm { display: inline-flex; align-items: baseline; font-family: var(--serif); font-weight: 400; font-style: normal; line-height: 1; letter-spacing: -0.012em; white-space: nowrap; }
.wm__o { flex: none; width: 0.75em; height: 0.75em; margin-right: 0.04em; position: relative; top: 0.019em; overflow: visible; color: var(--wm-ring, #b08cff); }
.wm__rest { display: inline-flex; }
.wm__rest i { font-style: normal; display: inline-block; }
.nav__links { display: flex; gap: 30px; margin-left: auto; }
.nav__links a {
  position: relative; padding: 6px 0; font-size: 14.5px; color: var(--muted); transition: color 0.2s;
}
.nav__links a:hover { color: var(--text); }
.nav__links a.is-active { color: var(--text); }
.nav__links a.is-active::after {
  content: ''; position: absolute; left: 50%; bottom: -6px; width: 4px; height: 4px; margin-left: -2px;
  border-radius: 50%; background: var(--gold);
}
.nav__cta { margin-left: 6px; }
.nav__burger { display: none; width: 42px; height: 42px; border-radius: 12px; margin-left: auto; position: relative; }
.nav__burger span {
  position: absolute; left: 12px; right: 12px; height: 1.5px; border-radius: 2px; background: var(--text);
  transition: transform 0.3s var(--ease);
}
.nav__burger span:first-child { top: 17px; }
.nav__burger span:last-child { top: 24px; }
.nav__burger[aria-expanded='true'] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav__burger[aria-expanded='true'] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

.drawer {
  position: fixed; inset: 72px 0 auto 0; z-index: 49;
  display: grid; gap: 0; padding: 8px var(--gutter) 24px;
  background: rgba(9, 11, 15, 0.97); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line);
}
.drawer[hidden] { display: none; }
@media (min-width: 861px) { .drawer { display: none; } }
.drawer a { padding: 16px 2px; font: 400 30px/1.1 var(--serif); border-bottom: 1px solid var(--line); }
.drawer .btn { margin-top: 18px; }

@media (max-width: 860px) {
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: block; }
}

/* ==========================================================================
   Type + layout
   ========================================================================== */
main { display: block; outline: none; min-height: 70vh; }
.section { padding: clamp(80px, 11vw, 150px) 0; position: relative; }
.section--flush { padding-top: 0; }
.section__head { max-width: 720px; margin-bottom: clamp(40px, 5vw, 64px); }
.section__head--center { margin-inline: auto; text-align: center; }
.section__head--center .kicker::after { content: ''; width: 18px; height: 1px; background: currentColor; opacity: 0.7; }
.section__head .lede { margin-top: 18px; }

.h1, .h2, .h3 { margin: 0; font-weight: 400; }
.h1, .h2 { font-family: var(--serif); letter-spacing: -0.015em; }
.h1 { font-size: clamp(54px, 8.4vw, 116px); line-height: 0.94; }
.h2 { font-size: clamp(40px, 5.6vw, 72px); line-height: 0.98; }
.h3 { font-family: var(--sans); font-size: clamp(20px, 2vw, 24px); line-height: 1.25; letter-spacing: -0.02em; font-weight: 500; }
.h1 em, .h2 em { font-style: italic; color: var(--gold); }
.lede { font-size: clamp(16.5px, 1.5vw, 18.5px); line-height: 1.6; color: var(--muted); max-width: 540px; margin: 26px 0 0; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg);
}
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ==========================================================================
   The card
   ========================================================================== */
.card-stage { perspective: 1600px; position: relative; }
.pcard {
  --rx: 0deg; --ry: 0deg; --flip: 0deg; --mx: 50%; --my: 50%; --shine: 0;
  position: relative; width: var(--card-w, 420px); aspect-ratio: 1.586; border-radius: calc(var(--card-w, 420px) * 0.048);
  transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(calc(var(--ry) + var(--flip)));
  transition: transform 0.8s var(--ease);
  cursor: pointer; user-select: none; -webkit-user-select: none;
  font-size: calc(var(--card-w, 420px) / 26);
}
.pcard.is-tracking { transition: transform 0.15s linear; }
.pcard.is-flipped { --flip: 180deg; }
.pcard__face {
  position: absolute; inset: 0; border-radius: inherit; overflow: hidden;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 1px 0 rgba(255, 255, 255, 0.14) inset,
    0 40px 80px -30px rgba(0, 0, 0, 0.85),
    0 16px 30px -16px rgba(0, 0, 0, 0.6);
}
.pcard__back { transform: rotateY(180deg); }

/* The Ostra Card — four designs. Each sets the face, the fine linework and the sheen that follows the pointer;
   the ring-and-pearl art itself is an SVG layer (.pcard__art) drawn by card.js. */
.pcard__lines, .pcard__foil, .pcard__art { position: absolute; inset: 0; pointer-events: none; }
.pcard__art { width: 100%; height: 100%; }

/* Dark purple (Virtual): deep amethyst, the ring tone-on-tone in lighter violet, a cool pearlescent sheen */
.pcard--violet .pcard__face {
  --card-ring: #b99bff;
  background:
    radial-gradient(90% 120% at 0% 100%, rgba(8, 1, 26, 0.7), transparent 62%),
    radial-gradient(130% 140% at 84% 4%, #4b1ea3 0%, #2e0f70 36%, #1b0747 68%, #11042e 100%);
  color: #f1ecff;
}
/* Dark blue: midnight navy, the ring in blue */
.pcard--midnight .pcard__face {
  --card-ring: #a9c4ff;
  background:
    radial-gradient(90% 120% at 0% 100%, rgba(2, 6, 22, 0.7), transparent 62%),
    radial-gradient(130% 140% at 84% 4%, #1f4394 0%, #11295f 38%, #0a1839 70%, #060e25 100%);
  color: #eaf0ff;
}
/* Gray: graphite, the ring in brushed silver */
.pcard--graphite .pcard__face {
  --card-ring: #dfe2e7;
  background:
    radial-gradient(90% 120% at 0% 100%, rgba(8, 9, 11, 0.6), transparent 62%),
    radial-gradient(130% 140% at 84% 4%, #5f646d 0%, #3c4048 38%, #26292f 70%, #1a1c20 100%);
  color: #f2f3f5;
}
.pcard--violet .pcard__lines, .pcard--midnight .pcard__lines, .pcard--graphite .pcard__lines {
  background: repeating-radial-gradient(circle at 82% 30%, transparent 0 7px, rgba(255, 255, 255, 0.05) 7px 8px);
  -webkit-mask-image: radial-gradient(75% 95% at 82% 30%, #000 35%, transparent 80%);
          mask-image: radial-gradient(75% 95% at 82% 30%, #000 35%, transparent 80%);
}
.pcard--violet .pcard__foil, .pcard--midnight .pcard__foil, .pcard--graphite .pcard__foil {
  inset: -25%;
  background: conic-gradient(from 200deg at var(--mx) var(--my), transparent 0deg, rgba(200, 170, 255, 0.36) 50deg, rgba(140, 190, 255, 0.36) 110deg, transparent 170deg, transparent 360deg);
  mix-blend-mode: soft-light; filter: blur(18px);
  opacity: calc(0.22 + var(--shine) * 0.7); transition: opacity 0.5s;
}
.pcard--graphite .pcard__foil { background: conic-gradient(from 200deg at var(--mx) var(--my), transparent 0deg, rgba(255, 255, 255, 0.34) 60deg, rgba(200, 210, 230, 0.3) 120deg, transparent 170deg, transparent 360deg); }

/* White (Platinum): bright porcelain with a whisper of nacre, and the violet ring with its pearl */
.pcard--pearl .pcard__face {
  --card-ring: #7b3ff0;
  background:
    radial-gradient(120% 140% at 84% 0%, #ffffff 0%, #faf9f7 40%, #efedea 78%, #e6e4e1 100%);
  color: #18141f;
}
.pcard--pearl .pcard__lines {
  opacity: 0.9;
  background: repeating-radial-gradient(circle at 87% 21%, transparent 0 6px, rgba(60, 40, 110, 0.05) 6px 7px);
}
.pcard--pearl .pcard__foil {
  inset: -30%;
  background: conic-gradient(from 210deg at 50% 50%, #f3eee6, #dfe6ec, #ebe3f0, #f1ebe0, #e2e8ee, #f3eee6);
  mix-blend-mode: multiply; opacity: calc(0.14 + var(--shine) * 0.2); filter: blur(24px);
  transform: translate(calc((var(--mx) - 50%) * 0.4), calc((var(--my) - 50%) * 0.4)) rotate(calc(var(--ry) * 3));
  transition: opacity 0.5s;
}

.pcard__glare {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.16) 48%, transparent 62%);
  background-size: 260% 100%; background-position: calc(100% - var(--mx)) 0;
  opacity: var(--shine); transition: opacity 0.5s;
}
.pcard__content {
  position: absolute; inset: 0; padding: 7.5% 7.5% 7%;
  display: grid; grid-template-rows: auto 1fr auto auto; transform: translateZ(24px);
}
.pcard__top { display: flex; align-items: center; justify-content: space-between; }
.pcard__logo { display: inline-flex; font-size: 1.7em; }
.pcard__logo .wm__o { color: var(--card-ring, currentColor); }
.pcard__tier { font: 500 0.56em/1 var(--mono); letter-spacing: 0.22em; text-transform: uppercase; opacity: 0.65; }
.pcard__mid { display: flex; align-items: center; gap: 0.9em; align-self: center; }
.pcard__chip { width: 2.5em; height: 1.95em; }
.pcard__nfc { width: 1.2em; height: 1.2em; opacity: 0.6; }
.pcard__number { font: 400 1.12em/1 var(--mono); letter-spacing: 0.12em; margin-bottom: 0.9em; display: flex; gap: 0.75em; }
.pcard__bottom { display: flex; align-items: flex-end; justify-content: space-between; }
.pcard__meta { display: grid; gap: 0.35em; }
.pcard__meta small { font: 500 0.46em/1 var(--mono); letter-spacing: 0.2em; opacity: 0.5; text-transform: uppercase; }
.pcard__meta span { font: 400 0.68em/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
.pcard__network { font: 400 italic 1.1em/1 var(--serif); opacity: 0.8; }

.pcard__stripe { position: absolute; left: 0; right: 0; top: 13%; height: 19%; background: #07090d; }
.pcard--pearl .pcard__stripe { background: #2a2e36; }
.pcard--violet .pcard__stripe { background: #0c0222; }
.pcard--midnight .pcard__stripe { background: #030817; }
.pcard--graphite .pcard__stripe { background: #0d0e10; }
.pcard__sign {
  position: absolute; left: 7.5%; right: 30%; top: 42%; height: 15%; border-radius: 0.25em;
  background: repeating-linear-gradient(45deg, rgba(245, 242, 236, 0.92) 0 6px, rgba(228, 224, 216, 0.92) 6px 12px);
}
.pcard__cvv {
  position: absolute; right: 7.5%; top: 42%; height: 15%; width: 18%; border-radius: 0.25em;
  display: grid; place-items: center; background: #f6f3ee; color: #111; font: 500 0.8em/1 var(--mono); letter-spacing: 0.15em;
}
.pcard__backnote { position: absolute; left: 7.5%; right: 7.5%; bottom: 9%; font-size: 0.52em; line-height: 1.5; opacity: 0.6; }

.card-shadow {
  position: absolute; left: 12%; right: 12%; bottom: -44px; height: 50px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.75), transparent); filter: blur(8px); pointer-events: none;
}
.card-hint { margin: 16px 0 0; font-size: 12.5px; color: var(--dim); text-align: center; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { position: relative; padding: clamp(48px, 7vw, 96px) 0 clamp(72px, 9vw, 120px); overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.08fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero .h1 { margin-top: 28px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.hero__stats {
  display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: clamp(24px, 5vw, 56px);
  margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); max-width: 540px;
}
.hero__stats b { display: block; font: 400 34px/1 var(--serif); letter-spacing: -0.01em; }
.hero__stats span { display: block; margin-top: 8px; font-size: 13px; color: var(--dim); }
.hero__visual { position: relative; display: grid; justify-items: center; }
.hero__visual .card-stage { --card-w: min(420px, 78vw); }
.hero__cardwrap { position: relative; }
.hero__backcard { position: absolute; z-index: 0; pointer-events: none; transform: translate(16%, -15%) rotate(9deg) scale(0.92); filter: brightness(0.72) saturate(0.9); }
.hero__frontcard { position: relative; z-index: 1; animation: floaty 9s ease-in-out infinite; }
@keyframes floaty { 50% { transform: translateY(-10px); } }

.tier-toggle {
  display: inline-flex; padding: 3px; border-radius: 999px; margin-top: 64px;
  border: 1px solid var(--line-2); position: relative; z-index: 2;
}
.tier-toggle button {
  height: 34px; padding: 0 18px; border-radius: 999px; font-size: 13.5px; font-weight: 500; color: var(--muted);
  transition: background 0.3s var(--ease), color 0.3s;
}
.tier-toggle button[aria-pressed='true'] { background: var(--text); color: var(--ink); }

.float-chip {
  position: absolute; z-index: 3;
  display: flex; align-items: center; gap: 12px;
  padding: 11px 16px 11px 11px; border-radius: 14px;
  background: rgba(15, 19, 25, 0.86); border: 1px solid var(--line-2);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow); font-size: 13px; line-height: 1.3; white-space: nowrap;
}
.float-chip b { display: block; font-weight: 500; font-size: 13.5px; }
.float-chip small { color: var(--dim); font-size: 12px; }
.float-chip__icon {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none;
  background: var(--surface-3); color: var(--text);
}
.float-chip__icon svg { width: 16px; height: 16px; }
.float-chip__amt { margin-left: 8px; font: 500 13.5px/1 var(--mono); }
.float-chip--a { left: -16%; top: -16%; }
.float-chip--b { right: -12%; bottom: -14%; }
.float-chip--a .float-chip__amt { color: var(--ok); }

@media (max-width: 1180px) {
  .float-chip--a { left: -6%; }
  .float-chip--b { right: -4%; }
}
@media (max-width: 980px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__visual { margin-top: 56px; }
  .float-chip--a { left: -2%; top: -15%; }
  .float-chip--b { right: -2%; bottom: -15%; }
}
@media (max-width: 520px) {
  .float-chip { padding: 8px 12px 8px 8px; font-size: 12px; }
  .float-chip__icon { width: 28px; height: 28px; }
  .float-chip small { display: none; }
  .hero__stats b { font-size: 28px; }
}

/* ==========================================================================
   Top-up calculator
   ========================================================================== */
.calc-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.calc { padding: clamp(22px, 3vw, 34px); }
.calc__amount { display: flex; align-items: baseline; gap: 4px; margin: 6px 0 20px; }
.calc__amount span { font: 400 clamp(44px, 5vw, 60px)/1 var(--serif); color: var(--dim); }
.calc__amount input {
  width: 100%; min-width: 0; background: none; border: 0; outline: none; padding: 0;
  font: 400 clamp(44px, 5vw, 60px)/1 var(--serif); letter-spacing: -0.01em;
}
.range {
  -webkit-appearance: none; appearance: none; width: 100%; height: 2px; border-radius: 2px; outline: none;
  background: linear-gradient(90deg, var(--text) var(--fill, 20%), var(--line-2) var(--fill, 20%));
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--pearl);
  border: 0; box-shadow: 0 0 0 6px rgba(236, 232, 225, 0.08); cursor: grab;
}
.range::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%; background: var(--pearl); border: 0;
  box-shadow: 0 0 0 6px rgba(236, 232, 225, 0.08); cursor: grab;
}
.range-labels { display: flex; justify-content: space-between; margin-top: 12px; font: 12px/1 var(--mono); color: var(--dim); }
.coin-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 22px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.toggle-row b { font-weight: 500; }
.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--line-2); transition: background 0.25s; pointer-events: none; }
.switch span::after {
  content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--muted); transition: transform 0.3s var(--ease), background 0.25s;
}
.switch input:checked + span { background: var(--pearl); border-color: var(--pearl); }
.switch input:checked + span::after { transform: translateX(18px); background: var(--ink); }
.switch input:focus-visible + span { outline: 1.5px solid var(--gold); outline-offset: 3px; }

.breakdown { display: grid; gap: 11px; padding: 18px 0; border-top: 1px solid var(--line); font-size: 14px; margin: 0; }
.breakdown div { display: flex; justify-content: space-between; gap: 12px; }
.breakdown dt { color: var(--muted); }
.breakdown dd { margin: 0; font-family: var(--mono); font-size: 13.5px; }
.calc__result {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 18px 20px; margin: 4px 0 18px; border-radius: var(--r);
  background: var(--bg-2); border: 1px solid var(--line-2);
}
.calc__result small { display: block; color: var(--muted); font-size: 12.5px; margin-bottom: 6px; }
.calc__result b { font: 400 clamp(22px, 2.6vw, 28px)/1.1 var(--mono); letter-spacing: -0.02em; word-break: break-all; font-weight: 400; }
.calc__result img { width: 36px; height: 36px; border-radius: 50%; }
.fineprint { font-size: 12.5px; color: var(--dim); margin: 12px 0 0; text-align: center; }

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

/* ==========================================================================
   Features
   ========================================================================== */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; }
.tile { position: relative; padding: clamp(24px, 3vw, 36px); background: var(--bg); min-height: 300px; display: flex; flex-direction: column; overflow: hidden; }
.tile h3 { margin: auto 0 8px; font: 500 20px/1.25 var(--sans); letter-spacing: -0.02em; }
.tile p { margin: 0; color: var(--muted); font-size: 14.5px; max-width: 380px; }
.tile--4 { grid-column: span 4; }
.tile--3 { grid-column: span 3; }
.tile--2 { grid-column: span 2; }
.tile__art { position: relative; flex: 1; min-height: 150px; margin-bottom: 24px; }

.wallet-art { display: grid; place-items: center; height: 100%; }
.wallet-art__phone {
  width: 150px; height: 188px; border-radius: 28px; border: 1px solid var(--line-2);
  background: linear-gradient(180deg, var(--surface-2), var(--bg-2)); position: relative; padding: 14px; box-shadow: var(--shadow);
}
.wallet-art__phone .mini { height: 70px; border-radius: 10px; margin-bottom: -44px; position: relative; box-shadow: 0 10px 20px -8px rgba(0, 0, 0, 0.8); }
.wallet-art__phone .mini:nth-child(1) { background: linear-gradient(135deg, #2a3140, #0f131b); }
.wallet-art__phone .mini:nth-child(2) { background: linear-gradient(135deg, #3a352c, #16140f); }
.wallet-art__phone .mini:nth-child(3) { background: var(--nacre); margin-bottom: 0; }
.wallet-art__ring { position: absolute; width: 230px; height: 230px; border-radius: 50%; border: 1px solid var(--line-2); animation: ring 4s ease-out infinite; }
.wallet-art__ring:nth-child(2) { animation-delay: 1.33s; }
.wallet-art__ring:nth-child(3) { animation-delay: 2.66s; }
@keyframes ring { from { transform: scale(0.55); opacity: 1; } to { transform: scale(1.3); opacity: 0; } }

.freeze-art { display: grid; place-items: center; height: 100%; }
.freeze-art__btn {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 14px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line-2); font-weight: 500; font-size: 14px;
}
.freeze-art__btn svg { width: 18px; height: 18px; color: var(--muted); }

.reveal-art { display: grid; place-items: center; height: 100%; }
.reveal-art__num {
  font: 400 clamp(17px, 2vw, 22px)/1 var(--mono); letter-spacing: 0.08em; padding: 18px 22px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line-2); position: relative;
}
.reveal-art__num span { transition: filter 0.5s, opacity 0.5s; }
.reveal-art__num .blur { filter: blur(6px); opacity: 0.5; }
.tile:hover .reveal-art__num .blur { filter: blur(0); opacity: 1; }
.reveal-art__timer { position: absolute; left: 14px; right: 14px; bottom: -1px; height: 1px; background: var(--gold); transform-origin: left; transform: scaleX(0); }
.tile:hover .reveal-art__timer { transform: scaleX(1); transition: transform 3s linear; }

.globe-art { position: relative; }
.globe-art i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: var(--text); animation: blink 3.4s ease-in-out infinite; }
@keyframes blink { 0%, 100% { opacity: 0.12; } 50% { opacity: 0.9; } }

.bank-art { display: grid; place-items: center; height: 100%; }
.bank-art__big { font: 400 clamp(88px, 10vw, 128px)/1 var(--serif); font-style: italic; color: var(--gold); }

@media (max-width: 900px) {
  .tile--4, .tile--3, .tile--2 { grid-column: span 6; }
  .tile { min-height: 250px; }
}

/* ==========================================================================
   Token
   ========================================================================== */
.token-band {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center;
  padding: clamp(28px, 5vw, 64px); border-radius: var(--r-xl); border: 1px solid var(--line-2);
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(201, 180, 140, 0.1), transparent 60%),
    var(--surface);
}
.token-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: t; }
.token-steps li { display: grid; grid-template-columns: 36px 1fr; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); }
.token-steps li:first-child { border-top: 0; padding-top: 0; }
.token-steps li::before { counter-increment: t; content: '0' counter(t); font: 500 12px/1.9 var(--mono); color: var(--gold); }
.token-steps b { display: block; font-weight: 500; margin-bottom: 4px; }
.token-steps span { color: var(--muted); font-size: 14.5px; }
.ca {
  display: flex; align-items: center; gap: 10px; margin-top: 28px; padding: 8px 8px 8px 16px; border-radius: 999px;
  border: 1px solid var(--line-2); max-width: 520px;
}
.ca small { font: 500 11px/1 var(--mono); letter-spacing: 0.14em; color: var(--dim); }
.ca code { flex: 1; min-width: 0; font: 400 13px/1 var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 900px) { .token-band { grid-template-columns: minmax(0, 1fr); } }

/* ==========================================================================
   Tiers
   ========================================================================== */
.tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.tier { padding: clamp(24px, 3vw, 40px); display: flex; flex-direction: column; position: relative; overflow: hidden; }
.tier--featured { border-color: var(--line-3); }
.tier__badge {
  position: absolute; top: 24px; right: 24px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid rgba(201, 180, 140, 0.4); color: var(--gold); font: 500 11.5px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
}
.tier__card { --card-w: min(300px, 70vw); margin: 8px 0 36px; }
.tier__card .pcard { cursor: default; }
.tier__name { font: 400 40px/1 var(--serif); margin: 0; }
.tier__sub { color: var(--muted); margin: 10px 0 24px; }
.tier__price { display: flex; align-items: baseline; gap: 10px; padding: 20px 0; margin-bottom: 20px; border-block: 1px solid var(--line); }
.tier__price b { font: 400 44px/1 var(--serif); }
.tier__price span { color: var(--muted); font-size: 14px; }
.tier__list { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 14px; }
.tier__list li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; }
.tier__list svg { flex: none; width: 18px; height: 18px; color: var(--gold); margin-top: 2px; }
.tier__list li.off { color: var(--dim); }
.tier__list li.off svg { color: var(--dim); }
.tier .btn { margin-top: auto; }
@media (max-width: 860px) { .tiers { grid-template-columns: minmax(0, 1fr); } }

/* ==========================================================================
   Steps
   ========================================================================== */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); }
.step { padding: 32px 32px 8px 0; position: relative; }
.step + .step { padding-left: 32px; border-left: 1px solid var(--line); }
.step__n { display: block; margin-bottom: 48px; font: 500 12px/1 var(--mono); color: var(--gold); letter-spacing: 0.1em; }
.step h3 { margin: 0 0 10px; font: 400 30px/1.1 var(--serif); }
.step p { margin: 0; color: var(--muted); font-size: 15px; }
@media (max-width: 860px) {
  .steps { grid-template-columns: minmax(0, 1fr); }
  .step, .step + .step { padding: 28px 0; border-left: 0; border-top: 1px solid var(--line); }
  .step__n { margin-bottom: 20px; }
}

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq { max-width: 820px; margin-inline: auto; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 24px 2px; cursor: pointer; list-style: none; font: 400 22px/1.3 var(--serif);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex: none; font: 300 22px/1 var(--sans); color: var(--muted); transition: transform 0.3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 2px 24px; color: var(--muted); max-width: 680px; }

/* ==========================================================================
   CTA band
   ========================================================================== */
.cta-band {
  position: relative; overflow: hidden; border-radius: var(--r-xl);
  padding: clamp(36px, 6vw, 80px); display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center;
  background: radial-gradient(90% 140% at 100% 100%, rgba(201, 180, 140, 0.12), transparent 60%), var(--surface);
  border: 1px solid var(--line-2);
}
.cta-band .card-stage { --card-w: min(360px, 72vw); justify-self: center; transform: rotate(-7deg); }
@media (max-width: 860px) { .cta-band { grid-template-columns: minmax(0, 1fr); } }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer { border-top: 1px solid var(--line); margin-top: 48px; padding: 64px 0 44px; }
.footer__inner {
  width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto;
  display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap;
}
.footer__brand p { color: var(--muted); max-width: 320px; margin: 16px 0 0; font-size: 14.5px; }
.footer__cols { display: flex; gap: clamp(40px, 8vw, 96px); }
.footer__cols h4 { margin: 0 0 16px; font: 500 11px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); }
.footer__cols a { display: block; padding: 5px 0; color: var(--muted); font-size: 14.5px; }
.footer__cols a:hover { color: var(--text); }
.footer__legal {
  width: min(var(--wrap), 100% - 2 * var(--gutter)); margin: 56px auto 0; padding-top: 24px;
  border-top: 1px solid var(--line); font-size: 12.5px; color: var(--dim); line-height: 1.7;
}
.footer__legal a { text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================================
   Page header (sub pages)
   ========================================================================== */
.page-head { position: relative; padding: clamp(40px, 6vw, 80px) 0 clamp(24px, 4vw, 40px); }
.page-head .h2 { max-width: 780px; }

/* ==========================================================================
   Gift cards
   ========================================================================== */
.gc-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 36px; }
.gc-toolbar .search { position: relative; flex: 1 1 280px; }
.gc-toolbar .search svg { position: absolute; left: 16px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); color: var(--dim); }
.gc-toolbar .search .input { padding-left: 46px; }
.gc-toolbar .xselect { flex: 0 1 270px; min-width: 230px; }
.cat-row { display: flex; gap: 8px; overflow-x: auto; padding: 22px 0 6px; margin-bottom: 20px; scrollbar-width: none; }
.cat-row::-webkit-scrollbar { display: none; }
.gc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.gc-tile {
  display: flex; flex-direction: column; text-align: left; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line); overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.25s;
}
.gc-tile:hover { transform: translateY(-3px); border-color: var(--line-3); }
.gc-tile__logo { aspect-ratio: 1.586; display: grid; place-items: center; position: relative; overflow: hidden; }
.gc-tile__body { display: block; padding: 12px 14px 14px; }
.gc-tile__name, .gc-tile__range { display: block; }
.gc-tile__name { font-weight: 500; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gc-tile__range { font-size: 12px; color: var(--dim); margin-top: 3px; font-family: var(--mono); }
.gc-tile.is-out { opacity: 0.4; }
.gc-empty { padding: 60px 20px; text-align: center; color: var(--muted); grid-column: 1 / -1; }
.gc-more { display: flex; justify-content: center; margin-top: 32px; }

.brand-hero { display: flex; gap: 18px; align-items: center; margin-bottom: 22px; }
.brand-hero__logo { width: 112px; aspect-ratio: 1.586; border-radius: 10px; overflow: hidden; flex: none; display: grid; place-items: center; }
.brand-hero h2 { margin: 0; }
.brand-hero p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.denoms { display: flex; flex-wrap: wrap; gap: 8px; }
.denoms .chip { height: 38px; font-size: 13.5px; }
.field { margin-bottom: 22px; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 999px; height: 42px; }
.qty button { width: 42px; height: 42px; font-size: 18px; color: var(--muted); }
.qty button:hover { color: var(--text); }
.qty span { min-width: 28px; text-align: center; font-family: var(--mono); }
.brand-desc { color: var(--muted); font-size: 13.5px; max-height: 92px; overflow: auto; margin: 0 0 22px; }

/* ==========================================================================
   Modal (<dialog>)
   ========================================================================== */
dialog.modal {
  width: min(560px, 100% - 24px); max-height: min(88vh, 900px); padding: 0; border: 1px solid var(--line-2);
  border-radius: var(--r-lg); background: var(--surface); color: var(--text); box-shadow: 0 40px 120px -20px #000; overflow: hidden;
}
dialog.modal--wide { width: min(680px, 100% - 24px); }
dialog.modal::backdrop { background: rgba(5, 6, 9, 0.72); backdrop-filter: blur(4px); }
dialog.modal[open] { animation: pop 0.4s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(12px); } }
.modal__inner { max-height: min(88vh, 900px); overflow: auto; padding: clamp(22px, 4vw, 34px); }
.modal__close {
  position: absolute; top: 14px; right: 14px; z-index: 2; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; color: var(--muted); border: 1px solid var(--line-2);
}
.modal__close:hover { color: var(--text); border-color: var(--line-3); }
.modal__close svg { width: 14px; height: 14px; }
.modal h2 { font: 400 32px/1.08 var(--serif); margin: 0 0 12px; padding-right: 40px; }
.modal__sub { color: var(--muted); margin: 0 0 24px; }
.handoff-list { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 14px; }
.handoff-list li { display: flex; gap: 12px; font-size: 14.5px; color: var(--muted); }
.handoff-list li b { color: var(--text); font-weight: 500; }
.handoff-list svg { flex: none; width: 18px; height: 18px; color: var(--gold); margin-top: 2px; }

/* ==========================================================================
   Swap
   ========================================================================== */
.swap-layout { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.swap { padding: 8px; }
.swap__box { padding: 18px 18px 16px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line); }
.swap__box + .swap__box { margin-top: 4px; }
.swap__top { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.swap__main { display: flex; align-items: center; gap: 12px; }
.swap__main input, .swap__main output {
  width: 0;
  flex: 1; min-width: 0; background: none; border: 0; outline: none; padding: 0;
  font: 400 clamp(32px, 4vw, 40px)/1.1 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.swap__main output.is-loading { color: var(--dim); }
.coin-btn {
  display: inline-flex; align-items: center; gap: 10px; flex: none; height: 46px; padding: 0 12px 0 6px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line-2); font-weight: 500; transition: border-color 0.2s;
}
.coin-btn:hover { border-color: var(--line-3); }
.coin-btn img, .coin-ph { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-3); }
.coin-btn .net { display: block; font: 500 10.5px/1.2 var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: 0.06em; }
.coin-btn .tk { display: block; line-height: 1.15; text-transform: uppercase; }
.coin-btn svg { width: 12px; height: 12px; color: var(--dim); }
.flip-btn {
  position: relative; z-index: 2; display: grid; place-items: center; width: 40px; height: 40px; margin: -18px auto;
  border-radius: 12px; background: var(--surface-2); border: 4px solid var(--surface); color: var(--muted);
  transition: transform 0.5s var(--ease), color 0.2s;
}
.flip-btn:hover { color: var(--text); transform: rotate(180deg); }
.flip-btn svg { width: 16px; height: 16px; }
.swap__fields { padding: 18px 8px 8px; display: grid; gap: 14px; }
.swap__meta { display: grid; gap: 9px; padding: 14px 16px; margin: 0 8px; border-radius: 12px; border: 1px solid var(--line); font-size: 13.5px; }
.swap__meta div { display: flex; justify-content: space-between; gap: 12px; }
.swap__meta dt { color: var(--muted); }
.swap__meta dd { margin: 0; font-family: var(--mono); font-size: 13px; text-align: right; }
.swap__actions { padding: 16px 8px 8px; display: grid; gap: 10px; }
.memo-toggle { font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; justify-self: start; }
.swap-side { display: grid; gap: 16px; }
.swap-side .panel { padding: 26px; }
.swap-side h3 { margin: 0 0 16px; font: 400 26px/1.1 var(--serif); }
.howto { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.howto li { display: flex; gap: 14px; font-size: 14.5px; color: var(--muted); }
.howto li b { color: var(--text); display: block; font-weight: 500; }
.howto li span.n { flex: none; width: 26px; font: 500 12px/1.9 var(--mono); color: var(--gold); }
@media (max-width: 960px) { .swap-layout { grid-template-columns: minmax(0, 1fr); } }

/* Coin picker */
.picker { display: flex; flex-direction: column; height: min(72vh, 640px); }
.picker__head { padding: 0 0 12px; }
.picker__list { flex: 1; overflow: auto; margin: 0 -8px; padding: 4px 0 8px; }
.picker__item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; text-align: left; }
.picker__item:hover, .picker__item:focus-visible { background: rgba(236, 232, 225, 0.04); }
.picker__item img, .picker__item .coin-ph { width: 32px; height: 32px; border-radius: 50%; flex: none; }
.picker__item b { font-weight: 500; text-transform: uppercase; }
.picker__item small { display: block; color: var(--dim); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picker__item > span { min-width: 0; flex: 1; }
.picker__item.is-token { background: var(--gold-soft); }
.net-badge { flex: none; padding: 3px 8px; border-radius: 6px; font: 500 10.5px/1.3 var(--mono); text-transform: uppercase; border: 1px solid var(--line-2); color: var(--muted); }
.picker__popular { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

/* ==========================================================================
   Wallet + token pay
   ========================================================================== */
.wallet-chip {
  display: inline-flex; align-items: center; gap: 10px; height: 36px; padding: 0 14px 0 6px; border-radius: 999px;
  border: 1px solid var(--line-2); font-size: 13.5px; font-family: var(--mono);
}
.wallet-chip img { width: 24px; height: 24px; border-radius: 6px; }
.wallet-list { display: grid; gap: 8px; }
.wallet-list button {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; text-align: left;
  border: 1px solid var(--line-2); transition: border-color 0.2s, background 0.2s;
}
.wallet-list button:hover { border-color: var(--line-3); background: rgba(236, 232, 225, 0.03); }
.wallet-list img { width: 32px; height: 32px; border-radius: 8px; }
.wallet-list b { font-weight: 500; }
.pay-summary { display: grid; gap: 10px; padding: 16px 18px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--bg-2); margin-bottom: 16px; font-size: 14px; }
.pay-summary div { display: flex; justify-content: space-between; gap: 12px; }
.pay-summary dt { color: var(--muted); }
.pay-summary dd { margin: 0; font-family: var(--mono); font-size: 13.5px; text-align: right; word-break: break-all; }
.pay-total { font: 400 34px/1.1 var(--serif) !important; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; border: 1px solid var(--line-2); }
.seg button { height: 32px; padding: 0 16px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--muted); }
.seg button[aria-pressed='true'] { background: var(--text); color: var(--ink); }
.pay-layout { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.pay-card { padding: clamp(20px, 3vw, 30px); }
@media (max-width: 960px) { .pay-layout { grid-template-columns: minmax(0, 1fr); } }

/* ==========================================================================
   Order
   ========================================================================== */
.order-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.order-main { padding: clamp(22px, 3vw, 34px); }
.order-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.order-pair { display: flex; align-items: center; gap: 12px; font: 400 26px/1.2 var(--serif); }
.order-pair img { width: 32px; height: 32px; border-radius: 50%; }
.order-pair .arrow { color: var(--dim); }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 13px; border-radius: 999px;
  font-size: 12.5px; font-weight: 500; border: 1px solid; white-space: nowrap;
}
.status-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-pill.is-wait { color: var(--warn); border-color: rgba(220, 188, 124, 0.3); }
.status-pill.is-wait::before, .status-pill.is-busy::before { animation: pulse-dot 1.4s ease-in-out infinite; }
.status-pill.is-busy { color: #b9cfe0; border-color: rgba(185, 207, 224, 0.3); }
.status-pill.is-ok { color: var(--ok); border-color: rgba(156, 199, 178, 0.3); }
.status-pill.is-bad { color: var(--bad); border-color: rgba(222, 149, 133, 0.3); }
.status-pill.is-off { color: var(--muted); border-color: var(--line-2); }
@keyframes pulse-dot { 50% { opacity: 0.3; } }

.deposit { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; padding: 22px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line); }
.qr { width: 168px; height: 168px; padding: 12px; background: #f6f3ee; border-radius: 12px; }
.qr svg { width: 100%; height: 100%; }
.deposit__amt small, .kv small { display: block; color: var(--muted); font-size: 12.5px; margin-bottom: 6px; }
.deposit__amt b { font: 400 clamp(24px, 3vw, 32px)/1.1 var(--mono); letter-spacing: -0.02em; word-break: break-all; }
.copy-field { display: flex; align-items: center; gap: 8px; margin-top: 18px; padding: 10px 10px 10px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-2); }
.copy-field code { flex: 1; min-width: 0; font: 400 13px/1.45 var(--mono); word-break: break-all; }
.copy-btn {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px;
  border: 1px solid var(--line-2); font-size: 12.5px; font-weight: 500; transition: background 0.2s, border-color 0.2s;
}
.copy-btn:hover { border-color: var(--line-3); }
.copy-btn.is-done { background: var(--pearl); color: var(--ink); border-color: var(--pearl); }
.copy-btn svg { width: 13px; height: 13px; }
.countdown { font: 400 13px/1 var(--mono); color: var(--muted); margin-top: 14px; }

.stepper { list-style: none; margin: 30px 0 0; padding: 0; display: grid; }
.stepper li { display: grid; grid-template-columns: 26px 1fr; gap: 14px; position: relative; padding-bottom: 22px; }
.stepper li:last-child { padding-bottom: 0; }
.stepper li::before { content: ''; position: absolute; left: 12px; top: 26px; bottom: 0; width: 1px; background: var(--line-2); }
.stepper li:last-child::before { display: none; }
.stepper .dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line-3); position: relative; z-index: 1; }
.stepper .dot svg { width: 13px; height: 13px; }
.stepper b { display: block; font-weight: 500; font-size: 15px; margin-top: 2px; }
.stepper small { color: var(--dim); font-size: 13px; }
.stepper li.is-done .dot { background: var(--pearl); border-color: var(--pearl); color: var(--ink); }
.stepper li.is-done::before { background: var(--line-3); }
.stepper li.is-now .dot { border-color: var(--gold); }
.stepper li.is-now .dot::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); animation: pulse-dot 1.2s infinite; }
.stepper li.is-todo b { color: var(--muted); }

.order-side { display: grid; gap: 16px; }
.order-side .panel { padding: 24px; }
.kv { display: grid; gap: 18px; }
.kv div { min-width: 0; }
.kv span { display: block; font-family: var(--mono); font-size: 13px; word-break: break-all; }
.links-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
@media (max-width: 960px) { .order-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  .deposit { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .deposit > div { width: 100%; }
}

.big-state { text-align: center; padding: 44px 20px; }
.big-state__icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 22px; border: 1px solid rgba(156, 199, 178, 0.4); color: var(--ok); }
.big-state__icon svg { width: 26px; height: 26px; }
.big-state h2 { font: 400 40px/1.05 var(--serif); margin: 0 0 10px; }
.big-state p { color: var(--muted); margin: 0 auto; max-width: 420px; }

/* ==========================================================================
   Track
   ========================================================================== */
.track-form { display: flex; gap: 10px; max-width: 640px; }
.track-form .input { flex: 1; }
.recent { display: grid; margin-top: 28px; max-width: 860px; border-top: 1px solid var(--line); }
.recent a { display: flex; align-items: center; gap: 16px; padding: 18px 4px; border-bottom: 1px solid var(--line); transition: background 0.2s; }
.recent a:hover { background: rgba(236, 232, 225, 0.02); }
.recent .pair { font-weight: 500; text-transform: uppercase; display: block; }
.recent .when { color: var(--dim); font-size: 13px; }
.recent .grow { flex: 1; min-width: 0; }
.recent .id { color: var(--dim); font: 12px/1.4 var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }

/* ==========================================================================
   Toast
   ========================================================================== */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 200; transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  padding: 12px 18px; border-radius: 12px; background: var(--pearl); color: var(--ink); font-weight: 500; font-size: 14px;
  box-shadow: var(--shadow); transition: opacity 0.3s, transform 0.3s var(--ease); max-width: calc(100% - 32px);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast.is-bad { background: var(--bad); color: #1a0a07; }

/* ==========================================================================
   Reveal on scroll
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* Motion switched off in the nav (html.rm): everything settles instantly. */
html.rm *, html.rm *::before, html.rm *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
html.rm { scroll-behavior: auto; }
html.rm .reveal { opacity: 1; transform: none; }

/* ==========================================================================
   Built with + partner call
   ========================================================================== */
.stack {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
}
.stack__item { background: var(--bg); padding: 28px 24px 26px; display: grid; gap: 10px; align-content: start; }
.stack__item b { font: 400 30px/1.05 var(--serif); letter-spacing: -0.01em; color: var(--text); }
.stack__item span { font-size: 14px; line-height: 1.5; color: var(--muted); }
.partner-cta {
  margin-top: 20px; padding: 28px 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg);
}
.partner-cta > div { flex: 1 1 360px; }
.partner-cta p { margin: 8px 0 0; color: var(--muted); font-size: 15px; max-width: 620px; }

/* Two tiers fanned in the closing band */
.card-fan { display: grid; }
.card-fan > div { grid-area: 1 / 1; }
.card-fan__back { transform: translate(15%, -13%) rotate(12deg) scale(0.93); filter: brightness(0.8); }
.card-fan__front { position: relative; }
