/* ==========================================================================
   Vellum Private Wealth — design system
   Executive institutional fintech: clean editorial surfaces, soft depth,
   emerald accent, dark (default) and light themes.

   The single stylesheet for every page (public site, auth, investor
   dashboard, admin). Mobile-first: base rules target a 320px viewport;
   enhancements at 640 / 768 / 1024px.
   ========================================================================== */

/* ─── 1. Tokens ─────────────────────────────────────────────────────────── */
:root {
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --pill: 999px;

  --gutter: 16px;
  --sidebar-w: 256px;
  --topbar-h: 64px;
  --header-h: 68px;
  --tabbar-h: 64px;
  --touch: 46px;

  --ease: cubic-bezier(.16, 1, .3, 1);
  --t-fast: .18s ease;
  --t-smooth: .35s var(--ease);
}

/* Dark — executive obsidian (default) */
html.dark {
  --bg: #090a0f;
  --surface: #101218;
  --surface2: #171a23;
  --card: #12141c;
  --card-hover: #171a24;
  --glass: rgba(14, 16, 22, 0.78);

  --border: rgba(255, 255, 255, 0.08);
  --border-bright: rgba(255, 255, 255, 0.15);
  --border-focus: rgba(255, 255, 255, 0.38);

  --text: #f8fafc;
  --text-2: #cbd5e1;
  --muted: #828b9e;
  --faint: #525a6c;

  --primary: #ffffff;
  --on-primary: #090a0f;
  --accent: #10b981;
  --accent-2: #38bdf8;
  --gold: #f59e0b;
  --accent-dim: rgba(16, 185, 129, 0.13);
  --accent-glow: rgba(16, 185, 129, 0.06);

  --success: #10b981;
  --success-dim: rgba(16, 185, 129, 0.13);
  --danger: #f43f5e;
  --danger-dim: rgba(244, 63, 94, 0.13);
  --warning: #f59e0b;
  --warning-dim: rgba(245, 158, 11, 0.13);
  --info: #38bdf8;
  --info-dim: rgba(56, 189, 248, 0.11);

  --shadow: 0 15px 35px -12px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  --shadow-hover: 0 22px 45px -12px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --shadow-pop: 0 30px 70px -10px rgba(0, 0, 0, 0.7);
  --scrim: rgba(3, 4, 8, 0.62);
  --grid-line: rgba(255, 255, 255, 0.035);
  color-scheme: dark;
}

/* Light — Swiss private banking */
html:not(.dark) {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface2: #f1f5f9;
  --card: #ffffff;
  --card-hover: #f8fafc;
  --glass: rgba(255, 255, 255, 0.82);

  --border: #e2e8f0;
  --border-bright: #cbd5e1;
  --border-focus: #0f172a;

  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --faint: #94a3b8;

  --primary: #0f172a;
  --on-primary: #ffffff;
  --accent: #059669;
  --accent-2: #2563eb;
  --gold: #d97706;
  --accent-dim: rgba(5, 150, 105, 0.1);
  --accent-glow: rgba(5, 150, 105, 0.05);

  --success: #059669;
  --success-dim: rgba(5, 150, 105, 0.1);
  --danger: #e11d48;
  --danger-dim: rgba(225, 29, 72, 0.08);
  --warning: #d97706;
  --warning-dim: rgba(217, 119, 6, 0.1);
  --info: #2563eb;
  --info-dim: rgba(37, 99, 235, 0.08);

  --shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 12px 28px -8px rgba(15, 23, 42, 0.08);
  --shadow-hover: 0 16px 40px -10px rgba(15, 23, 42, 0.16);
  --shadow-pop: 0 30px 70px -10px rgba(15, 23, 42, 0.22);
  --scrim: rgba(15, 23, 42, 0.42);
  --grid-line: rgba(15, 23, 42, 0.045);
  color-scheme: light;
}

/* Legacy aliases (a few templates reference these directly) */
html {
  --void: var(--bg);
  --cyan: var(--accent);
  --cyan-dim: var(--accent-dim);
  --cyan-glow: var(--accent-glow);
  --on-cyan: #ffffff;
  --text-faint: var(--muted);
}

/* ─── 2. Base ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; text-rendering: optimizeLegibility; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text-2);
  font: 400 15px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  transition: background-color var(--t-smooth), color var(--t-smooth);
}
body.scroll-locked { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--text); }
h1, h2, h3, h4 { margin: 0; color: var(--text); font-family: var(--font-display); font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); }
h2 { font-size: clamp(1.3rem, 1.1rem + 1vw, 1.85rem); }
h3 { font-size: clamp(1rem, .96rem + .25vw, 1.12rem); letter-spacing: -0.02em; }
p { margin: 0 0 12px; }
strong { color: var(--text); font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
code { font-family: var(--font-mono); font-size: .92em; }
pre { font: 12px/1.55 var(--font-mono); white-space: pre-wrap; word-break: break-all; margin: 6px 0 0; }
::selection { background: var(--accent-dim); color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden], .hidden { display: none !important; }
.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; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 1000; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--primary); color: var(--on-primary); font-weight: 600; }
.skip-link:focus { top: 8px; }
.icon { width: 18px; height: 18px; flex-shrink: 0; }

/* Thin themed scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--border-bright) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 10px; border: 3px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* ─── 3. Typography helpers ─────────────────────────────────────────────── */
.label, .eyebrow { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.eyebrow { color: var(--accent); font-size: 12px; line-height: 1.7; }
/* Display accent: emerald → sky gradient on the continuation of a headline */
.soft {
  font-weight: inherit; letter-spacing: inherit;
  background: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--accent);
}
.lead { font-size: clamp(1.02rem, .98rem + .3vw, 1.15rem); color: var(--muted); line-height: 1.7; }
.prose { color: var(--text-2); line-height: 1.75; max-width: 72ch; }
.prose h2, .prose h3 { margin: 28px 0 10px; }
.prose ul, .prose ol { padding-left: 20px; }
.prose li { margin-bottom: 6px; }
.text-muted { color: var(--text-2); }
.text-faint { color: var(--muted); }
.text-cyan { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-xs { font-size: 12px; }
.text-sm { font-size: 13px; }
.text-lg { font-size: 17px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 13px; }
.break-all { word-break: break-all; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ─── 4. Layout primitives ──────────────────────────────────────────────── */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { max-width: 780px; }
.narrow { max-width: 780px; }
.measure { max-width: 520px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.stack > * + * { margin-top: var(--stack, 16px); }
.stack-sm { --stack: 8px; }
.stack-lg { --stack: 28px; }
.stack-xl { --stack: clamp(48px, 6vw, 88px); }
.row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.items-start { align-items: flex-start; }
.justify-end { justify-content: flex-end; }
.justify-center { justify-content: center; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.gap-sm { gap: 8px; }
.inline { display: inline; }
.d-block { display: block; }
.m-0 { margin: 0 !important; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 40px; }
.pt-2 { padding-top: 16px; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.w-full { width: 100%; }
.dimmed { opacity: .45; }

.grid { display: grid; gap: var(--grid-gap, 16px); grid-template-columns: minmax(0, 1fr); }
.grid > * { min-width: 0; }
.grid-2-sm { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-wide-gap { --grid-gap: 40px; align-items: center; }
@media (min-width: 768px) {
  :root { --gutter: 24px; }
  .grid { --grid-gap: 20px; }
  .grid-wide-gap { --grid-gap: 56px; }
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid-main-side { grid-template-columns: minmax(0, 1fr) 360px; }
}

/* Flow: task pages whose DOM order is the mobile sequence; desktop moves
   secondary blocks into a side column via grid areas. */
.flow { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.flow > * { min-width: 0; }
@media (min-width: 1024px) {
  .flow { grid-template-columns: minmax(0, 1fr) 360px; }
  .flow--deposit { grid-template-areas: "main side" "main2 side"; }
  .flow--withdraw { grid-template-areas: "main side" "main side2"; grid-template-rows: auto 1fr; }
  .flow-main { grid-area: main; } .flow-main-2 { grid-area: main2; }
  .flow-side { grid-area: side; } .flow-side-2 { grid-area: side2; }
}

/* ─── 5. Surfaces ───────────────────────────────────────────────────────── */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); min-width: 0; overflow: hidden;
  transition: border-color var(--t-fast), box-shadow var(--t-smooth), background-color var(--t-smooth);
}
.card:has(.ledger), .card:has(.table-scroll) { overflow: hidden; }
.card--accent { border-top: 2px solid var(--accent); }
.card-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  min-height: 56px; padding: 14px 18px; border-bottom: 1px solid var(--border);
}
.card-title { font-family: var(--font-display); font-size: 15px; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
.card-header a { font-size: 13px; font-weight: 600; }
.card-body { padding: 18px; }
.card-footer { padding: 14px 18px; border-top: 1px solid var(--border); background: var(--surface2); }
.card-divider { border-top: 1px solid var(--border); }
@media (min-width: 768px) { .card-body { padding: 24px; } .card-header { padding: 14px 24px; } .card-footer { padding: 14px 24px; } }

.panel-list > * { border-bottom: 1px solid var(--border); }
.panel-list > *:last-child { border-bottom: 0; }

.kv { display: grid; grid-template-columns: minmax(96px, 38%) minmax(0, 1fr); gap: 12px 16px; margin: 0; }
.kv dt { color: var(--muted); font-size: 12px; font-weight: 600; padding-top: 2px; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; color: var(--text); }

/* ─── 6. Financial figures ──────────────────────────────────────────────── */
.kpis {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px;
  background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.kpis > * { background: var(--card); min-width: 0; }
.kpis-3 { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) { .kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { padding: 16px 18px; min-width: 0; position: relative; }
.stat--card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.stat--accent::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
@media (min-width: 768px) { .stat { padding: 20px 24px; } }
.stat-label { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .01em; }
.stat-value {
  margin-top: 6px; font-family: var(--font-display); font-size: clamp(1.2rem, 1rem + .8vw, 1.55rem); font-weight: 700;
  letter-spacing: -0.03em; color: var(--text); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; line-height: 1.15;
}
.stat-value--hero { font-size: clamp(2.3rem, 1.4rem + 3.6vw, 3.6rem); letter-spacing: -0.045em; line-height: 1; margin-top: 10px; }
.stat-value--glow {
  background: linear-gradient(120deg, var(--text) 30%, var(--accent) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.stat-meta { margin-top: 4px; font-size: 12px; color: var(--muted); }

/* Equity panel: the dominant element on portfolio views */
.equity-panel {
  position: relative; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); overflow: hidden; isolation: isolate;
}
.equity-panel::before {
  content: ''; position: absolute; z-index: -1; inset: -40% -10% auto auto; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent-dim), transparent 65%); pointer-events: none;
  animation: float-slow 14s ease-in-out infinite;
}
.equity-main { padding: 24px 18px 22px; min-width: 0; }
.equity-side { padding: 20px 18px; border-top: 1px solid var(--border); min-width: 0; }
.equity-panel .kpis { border-width: 1px 0 0; border-radius: 0; }
@media (min-width: 768px) { .equity-main { padding: 32px 28px 28px; } .equity-side { padding: 26px 28px; } }
@media (min-width: 1024px) {
  .equity-top { display: grid; grid-template-columns: minmax(0, 1fr) 340px; }
  .equity-side { border-top: 0; border-left: 1px solid var(--border); }
}
.equity-figures { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 16px; font-size: 13px; color: var(--muted); }
.equity-figures strong { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ─── 7. Buttons ────────────────────────────────────────────────────────── */
.btn {
  --btn-bg: var(--surface); --btn-fg: var(--text); --btn-bd: var(--border-bright);
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--touch); padding: 0 20px;
  font: 600 14px/1.2 var(--font); text-align: center; white-space: nowrap;
  color: var(--btn-fg); background: var(--btn-bg); border: 1px solid var(--btn-bd); border-radius: var(--radius-sm);
  cursor: pointer; text-decoration: none !important;
  transition: background-color var(--t-fast), border-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
.btn:hover { --btn-bd: var(--text); color: var(--btn-fg); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-primary, .btn-primary-sm { --btn-bg: var(--primary); --btn-fg: var(--on-primary); --btn-bd: var(--primary); }
.btn-primary:hover, .btn-primary-sm:hover { --btn-bd: var(--primary); transform: translateY(-1px); box-shadow: 0 8px 22px -6px color-mix(in srgb, var(--primary) 45%, transparent); }
/* Light sweep across primary buttons */
.btn-primary::after, .btn-primary-sm::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; pointer-events: none;
  background: linear-gradient(100deg, transparent, color-mix(in srgb, var(--accent) 35%, transparent), transparent);
  transform: skewX(-20deg); transition: left .6s var(--ease);
}
.btn-primary:hover::after, .btn-primary-sm:hover::after { left: 130%; }
.btn-glow { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent), 0 10px 30px -8px color-mix(in srgb, var(--accent) 55%, transparent); }
.btn-accent { --btn-bg: var(--accent); --btn-fg: #fff; --btn-bd: var(--accent); }
.btn-accent:hover { --btn-bd: var(--accent); transform: translateY(-1px); box-shadow: 0 8px 22px -6px color-mix(in srgb, var(--accent) 60%, transparent); }
.btn-secondary { --btn-bg: var(--surface); --btn-bd: var(--border-bright); }
.btn-secondary:hover { --btn-bg: var(--surface2); }
.btn-ghost { --btn-bg: transparent; --btn-bd: transparent; --btn-fg: var(--text-2); }
.btn-ghost:hover { --btn-fg: var(--text); --btn-bg: var(--surface2); --btn-bd: transparent; }
.btn-danger { --btn-bg: transparent; --btn-fg: var(--danger); --btn-bd: color-mix(in srgb, var(--danger) 55%, transparent); }
.btn-danger:hover { --btn-bg: var(--danger-dim); --btn-bd: var(--danger); }
.btn-success { --btn-bg: transparent; --btn-fg: var(--success); --btn-bd: color-mix(in srgb, var(--success) 55%, transparent); }
.btn-success:hover { --btn-bg: var(--success-dim); --btn-bd: var(--success); }
.btn-sm, .btn-primary-sm { min-height: 38px; padding: 0 14px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 15px; border-radius: 12px; }
.btn-outline { --btn-bg: transparent; --btn-bd: var(--border-bright); }
.btn-outline:hover { --btn-bg: var(--surface2); }
.btn-icon { min-width: 38px; padding: 0; }
@media (pointer: coarse) { .btn-sm, .btn-primary-sm { min-height: var(--touch); } .btn-icon { min-width: var(--touch); min-height: var(--touch); } }
.btn .spinner { display: none; }
.btn.is-loading { pointer-events: none; opacity: .85; }
.btn.is-loading .spinner { display: inline-block; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }
.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.link-button { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--accent); cursor: pointer; }
.link-button:hover { text-decoration: underline; }

/* ─── 8. Forms ──────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; min-width: 0; }
.form-label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 600; color: var(--text); }
.form-label .req { color: var(--accent); margin-left: 3px; }
.form-input, .form-select, .form-textarea {
  display: block; width: 100%; min-height: var(--touch);
  background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); padding: 11px 14px; font: 400 15px/1.4 var(--font);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background-color var(--t-fast);
  -webkit-appearance: none; appearance: none;
}
.form-input:hover, .form-select:hover, .form-textarea:hover { border-color: var(--border-bright); }
.form-textarea { min-height: 120px; resize: vertical; }
.form-textarea--sm { min-height: 76px; }
.form-select {
  padding-right: 40px; background-repeat: no-repeat; background-position: right 14px center; background-size: 12px 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23828b9e' stroke-width='1.6'/%3E%3C/svg%3E");
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--accent); background-color: var(--surface); outline: none; box-shadow: 0 0 0 4px var(--accent-dim); }
.form-input::placeholder, .form-textarea::placeholder { color: var(--faint); }
.form-input[readonly] { color: var(--text-2); background: var(--surface); }
.form-input.error, .form-select.error, .form-textarea.error { border-color: var(--danger); box-shadow: 0 0 0 4px var(--danger-dim); }
.form-input[type="file"] { padding: 9px 12px; cursor: pointer; }
.form-input[type="file"]::file-selector-button { margin-right: 12px; padding: 6px 12px; border: 1px solid var(--border-bright); border-radius: 8px; background: var(--surface); color: var(--text); font: 600 12px var(--font); cursor: pointer; }
.field-error { display: block; font-size: 12px; color: var(--danger); margin-top: 6px; font-weight: 500; }
.form-hint { display: block; font-size: 12px; color: var(--muted); margin-top: 6px; }
.form-check { display: flex; align-items: flex-start; gap: 12px; min-height: var(--touch); padding: 12px 0; cursor: pointer; font-size: 14px; color: var(--text-2); }
.form-check input {
  -webkit-appearance: none; appearance: none; flex-shrink: 0; width: 20px; height: 20px; margin: 0;
  border: 1px solid var(--border-bright); border-radius: 6px; background: var(--surface2); display: grid; place-content: center; cursor: pointer;
  transition: background-color var(--t-fast), border-color var(--t-fast);
}
.form-check input:checked { background: var(--accent); border-color: var(--accent); }
.form-check input:checked::after { content: ''; width: 10px; height: 6px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); animation: pop .2s var(--ease); }
.form-check input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.input-affix { position: relative; }
.input-affix .affix { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; font-weight: 600; }
.input-affix .form-input { padding-left: 30px; }
.form-row { display: grid; gap: 0 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .form-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.form-section { margin: 6px 0 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.form-inline-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: -4px 0 8px; }
.strength { height: 4px; background: var(--surface2); margin-top: 8px; overflow: hidden; border-radius: 4px; }
.strength > span { display: block; height: 100%; width: 0; border-radius: 4px; transition: width .35s var(--ease), background-color .35s; }
.preset-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
@media (min-width: 768px) { .preset-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.preset-grid .btn { font-variant-numeric: tabular-nums; }
.preset-grid .btn.is-active { --btn-bd: var(--accent); --btn-bg: var(--accent-dim); --btn-fg: var(--accent); }
.otp-input { text-align: center; letter-spacing: .5em; font-family: var(--font-mono) !important; font-size: 22px !important; font-weight: 600; }

/* ─── 9. Tables (admin + dense data) ────────────────────────────────────── */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table { min-width: 760px; }
.table-min { min-width: 560px; }
.data-table th {
  text-align: left; padding: 11px 18px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); background: var(--surface2); border-bottom: 1px solid var(--border); white-space: nowrap;
}
.data-table td { padding: 14px 18px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text-2); }
.data-table tbody tr { transition: background-color var(--t-fast); }
.data-table tbody tr:hover { background: var(--accent-glow); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tr.is-current { background: var(--accent-glow); box-shadow: inset 3px 0 0 var(--accent); }
.data-table .num, .data-table th.num { text-align: right; }
.data-table .cell-main { font-weight: 600; color: var(--text); }
.data-table .cell-sub { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.data-table .actions { text-align: right; white-space: nowrap; }
.data-table .col-check { width: 40px; }
.data-table .col-wide { max-width: 340px; }
.data-table .col-nowrap { white-space: nowrap; }
.data-table input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }
.sort-link { color: inherit; }
.sort-link.active { color: var(--accent); }

/* Ledger: mobile-first transaction list that becomes columns when it has room. */
.ledger { container: ledger / inline-size; }
.ledger-head { display: none; }
.ledger-row {
  display: grid; grid-template-columns: 38px minmax(0, 1fr) auto;
  grid-template-areas: "icon main amount" "icon main status";
  gap: 4px 12px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border);
  transition: background-color var(--t-fast);
}
.ledger-row:last-child { border-bottom: 0; }
.ledger-icon { grid-area: icon; }
.ledger-main { grid-area: main; min-width: 0; }
.ledger-title { font-weight: 600; font-size: 14px; color: var(--text); }
.ledger-sub { font-size: 12px; color: var(--muted); margin-top: 3px; display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: center; min-width: 0; }
.ledger-sub > span { max-width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ledger-note { font-size: 12px; color: var(--danger); margin-top: 3px; }
.ledger-ref, .ledger-date, .ledger-sub-net { display: none; }
.ledger-status { grid-area: status; justify-self: end; text-align: right; }
.ledger-amount { grid-area: amount; justify-self: end; font-family: var(--font-mono); font-weight: 600; font-size: 14px; color: var(--text); }
.ledger-elapsed { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }
@container ledger (min-width: 760px) {
  .ledger-head, .ledger-row {
    grid-template-columns: 38px minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, .9fr) minmax(0, .9fr) 150px;
    grid-template-areas: "icon main ref date status amount";
  }
  .ledger-head {
    display: grid; gap: 0 12px; padding: 11px 18px; border-bottom: 1px solid var(--border); background: var(--surface2);
    font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  }
  .ledger-head span:first-child { grid-column: 1 / span 2; }
  .ledger-head span:last-child { text-align: right; }
  .ledger-row { padding: 13px 18px; }
  .ledger-row:hover { background: var(--accent-glow); }
  .ledger-sub-ref, .ledger-sub-date { display: none; }
  .ledger-sub-net { display: inline; }
  .ledger-ref { display: block; grid-area: ref; font-size: 13px; min-width: 0; font-family: var(--font-mono); }
  .ledger-date { display: block; grid-area: date; font-size: 13px; color: var(--text-2); }
  .ledger-date small { display: block; color: var(--muted); font-size: 12px; }
  .ledger-status { justify-self: start; text-align: left; }
}

/* Generic list rows (notifications, tickets, payout methods) */
.list-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--border); color: var(--text); min-width: 0; transition: background-color var(--t-fast); }
.list-row:last-child { border-bottom: 0; }
.list-row.items-start { align-items: flex-start; }
.list-row.is-unread, .list-row.is-current { background: var(--accent-glow); box-shadow: inset 3px 0 0 var(--accent); }
.list-row.is-disabled { opacity: .45; }
a.list-row { min-height: 58px; }
a.list-row:hover { background: var(--surface2); color: var(--text); }
a.list-row:hover .list-icon { transform: scale(1.06); }
.list-icon { width: 38px; height: 38px; flex-shrink: 0; display: grid; place-items: center; border-radius: 11px; background: var(--surface2); border: 1px solid var(--border); color: var(--text); transition: transform var(--t-fast); }
.list-icon svg { width: 17px; height: 17px; }
.list-icon--success { color: var(--success); background: var(--success-dim); border-color: transparent; }
.list-icon--danger { color: var(--danger); background: var(--danger-dim); border-color: transparent; }
.coin { width: 36px; height: 36px; flex-shrink: 0; }
.coin--sm { width: 24px; height: 24px; }
.coin--lg { width: 44px; height: 44px; }

/* ─── 10. Badges ────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--pill);
  font-size: 11px; font-weight: 600; letter-spacing: 0.02em; white-space: nowrap; line-height: 1.6;
  background: var(--surface2); color: var(--text-2); border: 1px solid var(--border);
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--plain::before { display: none; }
.badge--info, .badge--open, .badge--in_progress { background: var(--info-dim); color: var(--info); border-color: transparent; }
.badge--pending, .badge--warning, .badge--medium { background: var(--warning-dim); color: var(--warning); border-color: transparent; }
.badge--pending::before { animation: pulse-dot 2s ease-in-out infinite; }
.badge--approved, .badge--paid, .badge--resolved, .badge--success, .badge--active { background: var(--success-dim); color: var(--success); border-color: transparent; }
.badge--rejected, .badge--cancelled, .badge--danger, .badge--urgent, .badge--high, .badge--inactive { background: var(--danger-dim); color: var(--danger); border-color: transparent; }
.badge--closed, .badge--low { background: var(--surface2); color: var(--muted); }
.tier-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 3px 12px 3px 9px; border-radius: var(--pill);
  border: 1px solid var(--border-bright); background: var(--surface); color: var(--text);
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; line-height: 1.6;
}
.tier-badge::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--tier); box-shadow: 0 0 10px var(--tier); }
.tier-bronze { --tier: #CD7F32; } .tier-silver { --tier: #C0C0C0; } .tier-gold { --tier: #FFD700; }
.tier-platinum { --tier: #E5E4E2; } .tier-elite { --tier: #6366F1; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); vertical-align: middle; margin-right: 6px; animation: pulse-dot 2.5s ease-in-out infinite; }
.count-pill { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: auto; border-radius: var(--pill); background: var(--accent-dim); color: var(--accent); font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.count-pill--danger { background: var(--danger); color: #fff; }

/* ─── 11. Alerts, banners, toasts ───────────────────────────────────────── */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid transparent; border-radius: var(--radius-sm); background: var(--info-dim); font-size: 14px; color: var(--text-2); }
.alert strong { color: var(--text); }
.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; color: var(--info); }
.alert--warning { background: var(--warning-dim); } .alert--warning svg { color: var(--warning); }
.alert--success { background: var(--success-dim); } .alert--success svg { color: var(--success); }
.alert--danger { background: var(--danger-dim); } .alert--danger svg { color: var(--danger); }
.alert .alert-body { flex: 1; min-width: 0; }

.site-banner { display: flex; align-items: center; gap: 12px; padding: 8px calc(var(--gutter) - 8px) 8px var(--gutter); font-size: 13px; border-bottom: 1px solid var(--border); background: var(--info-dim); color: var(--text); }
.site-banner svg { color: var(--info); }
.site-banner--success { background: var(--success-dim); } .site-banner--success svg { color: var(--success); }
.site-banner--danger { background: var(--danger-dim); } .site-banner--danger svg { color: var(--danger); }
.site-banner .grow strong { margin-right: 6px; }
.impersonation-bar { position: sticky; top: 0; z-index: 300; padding: 9px var(--gutter); background: var(--gold); color: #1a1205; font-size: 13px; font-weight: 600; text-align: center; }
.impersonation-bar a { color: #1a1205; text-decoration: underline; margin-left: 8px; }

.toast-stack { position: fixed; z-index: 500; top: 12px; right: 12px; left: 12px; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
@media (min-width: 640px) { .toast-stack { left: auto; width: 380px; top: 18px; right: 18px; } }
.toast {
  pointer-events: auto; display: flex; align-items: flex-start; gap: 12px; padding: 14px 12px 14px 16px;
  background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid var(--border-bright); border-radius: var(--radius-sm); box-shadow: var(--shadow-pop);
  font-size: 14px; color: var(--text); animation: toast-in .45s var(--ease);
}
.toast svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; color: var(--info); }
.toast--success svg { color: var(--success); }
.toast--error svg, .toast--danger svg { color: var(--danger); }
.toast--warning svg { color: var(--warning); }
.toast .toast-msg { flex: 1; min-width: 0; }
.toast .toast-close { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0 6px; font-size: 18px; line-height: 1; min-height: 28px; }
.toast.is-leaving { opacity: 0; transform: translateX(16px); transition: opacity .22s, transform .22s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px) scale(.97); } to { opacity: 1; transform: none; } }

/* ─── 12. Modals & drawer ───────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 400; display: flex; align-items: flex-end; justify-content: center;
  background: var(--scrim); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: fade-in .2s ease;
}
@media (min-width: 640px) { .modal-backdrop { align-items: center; padding: 24px; } }
.modal {
  width: 100%; max-width: 460px; max-height: 90vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border-bright); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-pop); padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  animation: sheet-up .35s var(--ease);
}
@media (min-width: 640px) { .modal { padding: 28px; border-radius: var(--radius-lg); animation: modal-in .3s var(--ease); } }
.modal-title { font-size: 1.3rem; margin-bottom: 8px; }
.modal-body { color: var(--text-2); font-size: 14px; margin-bottom: 22px; }
.modal-actions { display: flex; gap: 8px; }
.modal-actions .btn { flex: 1; }

.drawer { position: fixed; inset: 0; z-index: 450; display: flex; }
.drawer-scrim { position: absolute; inset: 0; background: var(--scrim); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade-in .2s ease; }
.drawer-panel {
  position: relative; display: flex; flex-direction: column; width: 86%; max-width: 300px; height: 100%; overflow-y: auto;
  background: var(--surface); border-right: 1px solid var(--border); box-shadow: var(--shadow-pop);
  animation: drawer-in .35s var(--ease);
}

/* ─── 13. Empty states, pagination, breadcrumb, tabs, misc ──────────────── */
.empty-state { display: flex; flex-direction: column; align-items: center; padding: 48px 20px; text-align: center; gap: 10px; }
.empty-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; background: var(--surface2); border: 1px solid var(--border); color: var(--accent); flex-shrink: 0; animation: float-y 4s ease-in-out infinite; }
.empty-icon svg { width: 22px; height: 22px; }
.empty-icon--success { color: var(--success); }
.empty-icon--danger { color: var(--danger); }
.empty-title { font-family: var(--font-display); font-size: 16px; font-weight: 600; color: var(--text); }
.empty-body { font-size: 13px; color: var(--muted); max-width: 320px; line-height: 1.6; }

.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.pagination-links { display: flex; gap: 4px; flex-wrap: wrap; }
.page-link { display: inline-grid; place-items: center; min-width: 38px; height: 38px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--border); color: var(--text-2); font-weight: 600; font-variant-numeric: tabular-nums; transition: all var(--t-fast); }
@media (pointer: coarse) { .page-link { min-width: var(--touch); height: var(--touch); } }
.page-link:hover { border-color: var(--border-bright); color: var(--text); background: var(--surface2); }
.page-link.active { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.page-link.disabled { opacity: .35; pointer-events: none; }

.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.breadcrumb a { color: var(--text-2); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { opacity: .5; }

.copy-field { display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface2); min-width: 0; overflow: hidden; }
.copy-field code { flex: 1; min-width: 0; padding: 12px 14px; font-size: 13px; word-break: break-all; color: var(--text); }
.copy-field .btn { min-height: auto; border-width: 0 0 0 1px; border-radius: 0; }
.copy-inline { display: inline-flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%; }
.copy-inline > .num { white-space: normal; overflow-wrap: anywhere; min-width: 0; font-family: var(--font-mono); font-size: .92em; }
.copy-inline button { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0; width: 28px; height: 28px; border-radius: 7px; display: inline-grid; place-items: center; flex-shrink: 0; transition: all var(--t-fast); }
@media (pointer: coarse) { .copy-inline button { width: 40px; height: 40px; margin: -6px 0; } }
.copy-inline button:hover { color: var(--accent); background: var(--accent-dim); }
.copy-inline svg { width: 14px; height: 14px; }
.copied { color: var(--success) !important; }

.progress { height: 6px; background: var(--surface2); overflow: hidden; border-radius: 6px; }
.progress > span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); animation: grow-x 1.2s var(--ease) both; transform-origin: left; }

.tabs { display: flex; gap: 4px; overflow-x: auto; padding: 4px; background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.card > .tabs { border-radius: 0; border-width: 0 0 1px; background: transparent; padding: 8px 12px; }
.tab { padding: 0 14px; min-height: 38px; display: inline-flex; align-items: center; border-radius: 9px; color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; transition: all var(--t-fast); }
.tab:hover { color: var(--text); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.tab.active { color: var(--text); background: var(--surface); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }

.filters { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); padding: 16px 18px; border-bottom: 1px solid var(--border); }
@media (min-width: 640px) { .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .filters { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); align-items: end; } }
.filters .form-group { margin: 0; }
.filters--foot { border-top: 1px solid var(--border); border-bottom: 0; }

.accordion { display: grid; gap: 10px; }
.accordion details { border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.accordion details[open] { border-color: var(--border-bright); box-shadow: var(--shadow); }
.accordion summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; min-height: var(--touch); font-weight: 600; color: var(--text); }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: '+'; display: grid; place-items: center; flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--surface2); color: var(--accent); font-size: 18px; font-weight: 400; line-height: 1; transition: transform var(--t-smooth); }
.accordion details[open] summary::after { transform: rotate(45deg); }
.accordion .accordion-body { padding: 0 20px 18px; color: var(--text-2); line-height: 1.7; animation: fade-up .35s var(--ease); }

details.disclosure > summary { list-style: none; cursor: pointer; }
details.disclosure > summary::-webkit-details-marker { display: none; }

.qr-frame { width: 196px; height: 196px; padding: 12px; background: #fff; border-radius: var(--radius); margin: 0 auto; box-shadow: var(--shadow); }
.qr-frame img { width: 100%; height: 100%; image-rendering: pixelated; }
.proof-preview { max-height: 360px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.scroll-box { max-height: 420px; overflow-y: auto; }

.thread { display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 92%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px 14px 14px 4px; background: var(--surface2); animation: fade-up .35s var(--ease); }
.msg--staff { border-left: 3px solid var(--accent); }
.msg--mine { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: var(--accent-dim); border-color: transparent; }
.msg-meta { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); }

.chart-box { position: relative; height: 240px; }
.chart-box--sm { height: 200px; }
@media (min-width: 768px) { .chart-box { height: 290px; } }

.avatar { width: 36px; height: 36px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.avatar--lg { width: 54px; height: 54px; font-size: 17px; }

.status-line { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 12px; color: var(--muted); }

/* ─── 14. Page header ───────────────────────────────────────────────────── */
.page-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.page-header > div:first-child { min-width: 0; }
.page-title { font-size: clamp(1.5rem, 1.15rem + 1.2vw, 2.05rem); }
.page-title.mt-1 { margin-top: 8px; }
.page-sub { margin: 6px 0 0; color: var(--muted); font-size: 14px; max-width: 640px; }
.page-header .btn-group { width: 100%; }
.page-header .btn-group > .btn { flex: 1; }
@media (min-width: 640px) { .page-header .btn-group { width: auto; } .page-header .btn-group > .btn { flex: 0 0 auto; } }
@media (min-width: 768px) { .page-header { margin-bottom: 28px; } }

/* ─── 15. Brand ─────────────────────────────────────────────────────────── */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none !important; white-space: nowrap; min-width: 0; }
.brand:hover { color: var(--text); }
.brand-mark {
  width: 34px; height: 34px; flex-shrink: 0; padding: 7px; border-radius: 10px;
  background: var(--primary); color: var(--on-primary); transition: transform var(--t-smooth);
}
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.05); }
.brand-text { display: inline-flex; align-items: center; gap: 8px; line-height: 1; min-width: 0; }
.brand-text b { font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; }
.brand-word { display: inline-flex; flex-direction: column; min-width: 0; }
.brand-word i { margin-top: 4px; font-style: normal; font-size: 8.5px; font-weight: 600; letter-spacing: .32em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.brand-text small { padding: 3px 7px; border-radius: 6px; background: var(--accent-dim); color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

/* ─── 16. Public site ───────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: var(--glass); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border); transition: box-shadow var(--t-smooth), background-color var(--t-smooth);
}
.site-header.is-scrolled { box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .35); }
.site-header .container { display: flex; align-items: center; gap: 12px; height: var(--header-h); }
.site-nav { display: none; gap: 4px; margin: 0 auto; padding: 4px; border-radius: var(--pill); }
.site-nav a { position: relative; display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border-radius: var(--pill); color: var(--muted); font-size: 14px; font-weight: 500; transition: color var(--t-fast), background-color var(--t-fast); }
.site-nav a:hover { color: var(--text); background: var(--surface2); }
.site-nav a.active { color: var(--text); background: var(--surface2); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.header-actions .btn { min-height: 40px; padding: 0 16px; font-size: 13px; }
.header-actions .btn-outline { display: none; }
.header-actions .theme-toggle-wrap { display: none; }
@media (max-width: 380px) { .site-header .brand-text { display: none; } }
@media (min-width: 560px) { .header-actions .btn-outline { display: inline-flex; } }
@media (min-width: 960px) {
  .site-nav { display: flex; } .menu-toggle { display: none !important; }
  .header-actions { margin-left: 0; }
  .header-actions .theme-toggle-wrap { display: block; }
}
.mobile-menu { border-top: 1px solid var(--border); background: var(--surface); padding: 8px var(--gutter) 18px; box-shadow: 0 20px 30px -10px rgba(0, 0, 0, .25); animation: slide-down .3s var(--ease); }
.mobile-menu a:not(.btn) { display: flex; align-items: center; justify-content: space-between; min-height: 50px; color: var(--text); border-bottom: 1px solid var(--border); font-weight: 600; font-size: 1.02rem; }
.mobile-menu a:not(.btn)::after { content: '→'; color: var(--muted); transition: transform var(--t-fast); }
.mobile-menu a:not(.btn):hover::after { transform: translateX(4px); color: var(--accent); }
.mobile-menu-theme { padding-top: 10px; }
.mobile-menu-ctas { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }

/* Ticker */
.ticker-bar { position: relative; background: var(--surface); border-bottom: 1px solid var(--border); overflow: hidden; padding: 10px 0; }
.ticker-bar::before, .ticker-bar::after { content: ''; position: absolute; top: 0; bottom: 0; width: 60px; z-index: 1; pointer-events: none; }
.ticker-bar::before { left: 0; background: linear-gradient(90deg, var(--surface), transparent); }
.ticker-bar::after { right: 0; background: linear-gradient(-90deg, var(--surface), transparent); }
.ticker-inner { display: flex; gap: 40px; width: max-content; white-space: nowrap; animation: ticker-roll 40s linear infinite; }
.ticker-bar:hover .ticker-inner { animation-play-state: paused; }
.ticker-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-family: var(--font-mono); color: var(--muted); }
.ticker-pill img { width: 18px; height: 18px; }
.ticker-pill .sym { font-weight: 600; color: var(--text); }
.ticker-pill .up { color: var(--accent); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 56px 0 72px; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.hero-bg::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 56px 56px, linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 60% 35%, #000 25%, transparent 80%);
          mask-image: radial-gradient(ellipse 75% 70% at 60% 35%, #000 25%, transparent 80%);
}
.orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; will-change: transform; }
.orb--a { width: 420px; height: 420px; top: -120px; right: 4%; background: color-mix(in srgb, var(--accent) 45%, transparent); animation: orb-a 18s ease-in-out infinite; }
.orb--b { width: 360px; height: 360px; bottom: -160px; right: 30%; background: color-mix(in srgb, var(--accent-2) 35%, transparent); animation: orb-b 22s ease-in-out infinite; }
.orb--c { width: 260px; height: 260px; top: 30%; left: -80px; background: color-mix(in srgb, var(--accent) 22%, transparent); animation: orb-a 26s ease-in-out infinite reverse; }
html:not(.dark) .orb { opacity: .28; }
.hero .container { position: relative; display: grid; gap: 48px; align-items: center; }
@media (min-width: 992px) { .hero { padding: 88px 0 104px; } .hero .container { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 56px; } }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: var(--pill);
  background: var(--surface2); border: 1px solid var(--border); font-size: 12.5px; font-weight: 600; color: var(--muted);
}
.hero-badge .dot { margin: 0; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-dim); }
.hero-title { margin-top: 22px; font-size: clamp(2.4rem, 1.4rem + 4.2vw, 4rem); letter-spacing: -0.04em; line-height: 1.04; }
.hero-title .soft { display: inline; }
.hero-sub { margin-top: 22px; max-width: 34em; color: var(--muted); font-size: clamp(1.02rem, .98rem + .35vw, 1.15rem); line-height: 1.7; }
.hero-ctas { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-ctas .btn { flex: 1 1 200px; }
@media (min-width: 560px) { .hero-ctas .btn { flex: 0 0 auto; } }
.hero-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 40px; padding-top: 26px; border-top: 1px solid var(--border); }
.hero-stats strong { display: block; font-family: var(--font-display); font-size: clamp(1.25rem, 1rem + 1vw, 1.7rem); font-weight: 700; color: var(--text); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.hero-stats span { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.trust-line { margin-top: 26px; font-size: 12.5px; font-weight: 600; color: var(--muted); display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
.trust-line span { display: inline-flex; align-items: center; gap: 8px; }
.trust-line .icon { width: 15px; height: 15px; color: var(--accent); }

/* 3D metal card */
.card-stage { position: relative; perspective: 1200px; display: grid; place-items: center; padding: 24px 0; }
.metal-card {
  position: relative; width: 100%; max-width: 400px; aspect-ratio: 1.586; border-radius: var(--radius-lg); overflow: hidden;
  padding: clamp(18px, 4vw, 28px); display: flex; flex-direction: column; justify-content: space-between;
  color: #fff; background: linear-gradient(135deg, #1e222e 0%, #0d0f15 100%);
  border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 30px 60px -15px rgba(0, 0, 0, .55);
  transform-style: preserve-3d; transition: transform .2s ease-out, box-shadow var(--t-smooth); will-change: transform;
  animation: card-float 7s ease-in-out infinite;
}
.metal-card.is-tilting { animation: none; }
html:not(.dark) .metal-card { background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); box-shadow: 0 30px 55px -15px rgba(15, 23, 42, .45); }
.metal-card::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at var(--mx, 30%) var(--my, 20%), rgba(255, 255, 255, .22), transparent 55%);
}
.metal-card::after {
  content: ''; position: absolute; inset: -50%; pointer-events: none;
  background: conic-gradient(from 180deg, transparent 0 70%, rgba(16, 185, 129, .25) 80%, transparent 90%);
  animation: spin 9s linear infinite; mix-blend-mode: screen; opacity: .6;
}
.metal-card > * { position: relative; z-index: 1; }
.mc-top, .mc-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.mc-bottom { align-items: flex-end; }
.mc-chip { width: 42px; height: 30px; border-radius: 7px; background: linear-gradient(135deg, #e2e8f0, #94a3b8); border: 1px solid rgba(255, 255, 255, .4); }
.mc-tag { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #94a3b8; }
.mc-label { font-size: 11px; color: #94a3b8; text-transform: uppercase; letter-spacing: .06em; }
.mc-balance { font-family: var(--font-display); font-size: clamp(1.5rem, 1.1rem + 2vw, 2rem); font-weight: 700; letter-spacing: -0.02em; color: #fff; font-variant-numeric: tabular-nums; }
.mc-holder { font-family: var(--font-mono); font-size: 11.5px; color: #cbd5e1; letter-spacing: .06em; text-transform: uppercase; }
.mc-holder small { display: block; margin-top: 3px; color: #94a3b8; font-size: 10.5px; text-transform: none; letter-spacing: 0; }
.mc-pill { padding: 4px 10px; border-radius: var(--pill); background: rgba(16, 185, 129, .2); border: 1px solid rgba(16, 185, 129, .45); color: #34d399; font-family: var(--font-mono); font-size: 11px; font-weight: 600; }
.float-chip {
  position: absolute; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; border-radius: 14px;
  background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid var(--border-bright); box-shadow: var(--shadow-pop); font-size: 12px; color: var(--muted);
  animation: float-y 6s ease-in-out infinite;
}
.float-chip strong { display: block; font-size: 13px; color: var(--text); }
.float-chip .ic { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: var(--accent-dim); color: var(--accent); flex-shrink: 0; }
.float-chip .ic .icon { width: 16px; height: 16px; }
.float-chip--a { top: -4px; left: -2%; animation-delay: -2s; }
.float-chip--b { bottom: -6px; right: -2%; animation-delay: -4s; }
@media (max-width: 991px) { .float-chip--a { left: 0; } .float-chip--b { right: 0; } }
@media (max-width: 420px) { .float-chip { display: none; } }

/* Sections */
.section { position: relative; padding: 64px 0; }
.section--alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
@media (min-width: 1024px) { .section { padding: 96px 0; } }
.section-head { max-width: 620px; margin-bottom: 36px; }
.section-title, .section-head h2 { margin-top: 10px; font-size: clamp(1.8rem, 1.3rem + 1.9vw, 2.5rem); letter-spacing: -0.035em; line-height: 1.1; }
.section-head p { margin-top: 12px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.stats-bar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 768px) { .stats-bar { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } }
.stats-bar > div { padding: 22px 18px; text-align: center; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.stats-bar strong { display: block; font-family: var(--font-display); font-size: clamp(1.5rem, 1.15rem + 1.4vw, 2.2rem); letter-spacing: -0.04em; color: var(--text); font-variant-numeric: tabular-nums; }
.stats-bar .label { margin-top: 4px; text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 500; }

/* Tiles: equal panels (steps, features, quotes, plans) as separate cards */
.tiles { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) { .tiles { gap: 20px; } .tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .tiles-4, .tiles-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .tiles-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tiles > * {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); min-width: 0;
  transition: transform var(--t-smooth), box-shadow var(--t-smooth), border-color var(--t-fast);
}
.tiles > *:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--border-bright); }
.step, .feature { padding: 26px; }
.step-num { display: inline-block; font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: .08em; color: var(--accent); font-variant-numeric: tabular-nums; }
.step h3 { margin: 14px 0 8px; }
.feature-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--surface2); border: 1px solid var(--border); color: var(--text); margin-bottom: 18px; transition: all var(--t-smooth); }
.feature:hover .feature-icon, .trust-item:hover .feature-icon { background: var(--accent); color: #fff; border-color: var(--accent); transform: rotate(-6deg); }
.feature-icon svg { width: 20px; height: 20px; }
.feature h3 { margin-bottom: 8px; }
.feature p { color: var(--muted); }
.feature--card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); }

.plan-card { position: relative; display: flex; flex-direction: column; padding: 26px 24px; overflow: hidden; }
.plan-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
.plan-card:hover::before, .plan-card--featured::before { transform: scaleX(1); }
.plan-card--featured { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)) !important; background: linear-gradient(180deg, var(--accent-glow), var(--card) 40%) !important; }
.plan-name { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }
.plan-range { margin: 18px 0 2px; font-family: var(--font-mono); font-size: clamp(1.4rem, 1.2rem + .7vw, 1.75rem); font-weight: 700; letter-spacing: -0.03em; color: var(--accent); font-variant-numeric: tabular-nums; }
.plan-list { list-style: none; margin: 18px 0 22px; padding: 16px 0 0; border-top: 1px solid var(--border); flex: 1; }
.plan-list li { display: flex; gap: 10px; padding: 7px 0; font-size: 14px; color: var(--text-2); }
.plan-list svg { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; margin-top: 3px; }
.plan-list li.is-unlocked { color: var(--text); }
.plan-list li.is-locked { opacity: .45; }
.plan-list li.is-locked svg { color: var(--muted); }

.quote { padding: 26px; display: flex; flex-direction: column; gap: 16px; margin: 0; }
.quote blockquote { margin: 0; color: var(--text-2); line-height: 1.7; flex: 1; }
.stars { color: var(--gold); letter-spacing: 2px; font-size: 14px; }

.cta-band { position: relative; overflow: hidden; isolation: isolate; margin: 0 var(--gutter) 64px; padding: 64px 24px; text-align: center; border-radius: 28px; background: var(--primary); color: var(--on-primary); }
.cta-band::before { content: ''; position: absolute; z-index: -1; inset: -50% -20%; background: radial-gradient(circle at 20% 30%, color-mix(in srgb, var(--accent) 45%, transparent), transparent 40%), radial-gradient(circle at 80% 70%, color-mix(in srgb, var(--accent-2) 35%, transparent), transparent 40%); animation: spin 30s linear infinite; }
.cta-band h2 { color: var(--on-primary); font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3rem); letter-spacing: -0.04em; }
.cta-band .soft { -webkit-text-fill-color: currentColor; color: inherit; background: none; opacity: .65; }
.cta-band .lead { color: color-mix(in srgb, var(--on-primary) 70%, transparent); }
.cta-band .btn-primary { --btn-bg: var(--on-primary); --btn-fg: var(--primary); --btn-bd: var(--on-primary); }
@media (min-width: 1248px) { .cta-band { max-width: 1200px; margin: 0 auto 96px; } }

.site-footer { padding: 56px 0 calc(28px + env(safe-area-inset-bottom)); font-size: 14px; color: var(--muted); background: var(--surface); border-top: 1px solid var(--border); }
.footer-grid { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; } }
.footer-grid .label { color: var(--text); text-transform: none; letter-spacing: 0; font-size: 14px; }
.footer-intro { max-width: 360px; margin-top: 16px; }
.footer-links { list-style: none; margin: 10px 0 0; padding: 0; }
.footer-links a { display: inline-flex; align-items: center; min-height: 34px; color: var(--muted); transition: color var(--t-fast), transform var(--t-fast); }
.footer-links a:hover { color: var(--text); transform: translateX(3px); }
.footer-bottom { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 12.5px; color: var(--muted); }
.footer-status { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px; }
.footer-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-dim); animation: pulse-dot 2.5s ease-in-out infinite; }

.page-hero { position: relative; overflow: hidden; isolation: isolate; padding: 52px 0 40px; border-bottom: 1px solid var(--border); }
.page-hero::before { content: ''; position: absolute; z-index: -1; width: 480px; height: 480px; top: -240px; right: -60px; border-radius: 50%; background: radial-gradient(circle, var(--accent-dim), transparent 65%); animation: float-slow 16s ease-in-out infinite; }
.page-hero::after { content: ''; position: absolute; z-index: -2; inset: 0; background: linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 48px 48px, linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 48px 48px; -webkit-mask-image: linear-gradient(180deg, #000, transparent 90%); mask-image: linear-gradient(180deg, #000, transparent 90%); }
@media (min-width: 1024px) { .page-hero { padding: 80px 0 56px; } }
.page-hero h1 { margin-top: 12px; font-size: clamp(2.1rem, 1.35rem + 3vw, 3.3rem); letter-spacing: -0.04em; line-height: 1.06; }
.page-hero p { margin-top: 14px; max-width: 620px; }

/* Plan finder (homepage interactive) */
.finder { display: grid; gap: 20px; padding: 20px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
@media (min-width: 900px) { .finder { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 32px; padding: 32px; } }
.finder-group + .finder-group { margin-top: 26px; }
.finder-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.finder-amount { font-family: var(--font-display); font-size: clamp(1.5rem, 1.2rem + 1vw, 1.9rem); font-weight: 700; color: var(--text); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 6px; outline: none; cursor: pointer;
  background: linear-gradient(90deg, var(--accent) 0 var(--fill, 20%), var(--surface2) var(--fill, 20%) 100%); }
.range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--primary); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--border-bright), 0 4px 10px rgba(0, 0, 0, .3); cursor: grab; transition: transform var(--t-fast); }
.range::-webkit-slider-thumb:hover { transform: scale(1.15); }
.range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--primary); border: 3px solid var(--surface); cursor: grab; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { min-height: 36px; padding: 0 14px; border-radius: var(--pill); border: 1px solid var(--border-bright); background: var(--surface); color: var(--text-2); font: 600 13px var(--font); cursor: pointer; font-variant-numeric: tabular-nums; transition: all var(--t-fast); }
.chip:hover { border-color: var(--text); color: var(--text); }
.chip.is-active { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.finder-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.finder-plan { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); transition: all var(--t-smooth); }
.finder-plan strong { display: block; font-size: 14px; }
.finder-plan span { display: block; margin-top: 2px; font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.finder-plan.is-active { border-color: var(--accent); background: var(--accent-dim); transform: translateY(-2px); box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--accent) 70%, transparent); }
.finder-plan.is-active span { color: var(--accent); }
.finder-result { display: flex; flex-direction: column; justify-content: space-between; gap: 20px; padding: 24px; border-radius: var(--radius); background: var(--surface2); border: 1px solid var(--border); }
.finder-result-plan { margin-top: 6px; font-family: var(--font-display); font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.4rem); font-weight: 800; letter-spacing: -0.04em; color: var(--accent); }
.finder-result-plan.is-swap { animation: swap-in .45s var(--ease); }
.finder-rows > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.finder-rows > div:last-child { border-bottom: 0; }
.finder-rows span:first-child { color: var(--muted); }
.finder-rows span:last-child { font-family: var(--font-mono); font-weight: 600; color: var(--text); text-align: right; }
.finder-bar { position: relative; height: 90px; }
.finder-bar svg { width: 100%; height: 100%; overflow: visible; }

/* Trust items */
.trust-item { padding: 28px; }
.trust-item h3 { margin-bottom: 8px; }
.trust-item p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.65; }

/* ─── 17. Auth ──────────────────────────────────────────────────────────── */
.auth-split { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) { .auth-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.auth-column { display: flex; flex-direction: column; min-width: 0; }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px var(--gutter); }
.auth-top .row { gap: 4px; }
.auth-shell { flex: 1; display: grid; place-items: start center; padding: 16px var(--gutter) 48px; }
@media (min-width: 768px) { .auth-shell { place-items: center; padding: 32px var(--gutter) 64px; } }
.auth-card { width: 100%; max-width: 440px; animation: fade-up .6s var(--ease) both; }
.auth-card--wide { max-width: 760px; }
@media (max-width: 1023px) { .auth-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 26px 20px; } }
@media (min-width: 640px) and (max-width: 1023px) { .auth-card { padding: 36px; } }
.auth-card h1 { font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.1rem); margin-top: 10px; }
.auth-sub { margin: 8px 0 26px; color: var(--muted); font-size: 14.5px; }
.auth-foot { margin-top: 22px; text-align: center; font-size: 14px; color: var(--muted); }
.auth-status { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.auth-visual { display: none; }
@media (min-width: 1024px) {
  .auth-visual {
    position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
    margin: 12px 12px 12px 0; height: calc(100vh - 24px); padding: 40px; border-radius: 24px; overflow: hidden; isolation: isolate;
    background: #0b0d13; color: #cbd5e1; border: 1px solid rgba(255, 255, 255, .08);
  }
  .auth-visual::before { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px) 0 0 / 44px 44px, linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px) 0 0 / 44px 44px; -webkit-mask-image: radial-gradient(ellipse at 50% 45%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse at 50% 45%, #000 20%, transparent 75%); }
  .auth-visual .orb { opacity: .55; }
  .auth-visual h2 { color: #fff; font-size: clamp(1.6rem, 1rem + 1.4vw, 2.3rem); letter-spacing: -0.035em; max-width: 15em; }
  .auth-visual p { color: #94a3b8; max-width: 34em; margin: 12px 0 0; }
  .auth-visual .card-stage { flex: 1; }
  .auth-points { display: flex; flex-wrap: wrap; gap: 8px; }
  .auth-points span { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: var(--pill); background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); font-size: 12.5px; color: #cbd5e1; }
  .auth-points .icon { width: 14px; height: 14px; color: #34d399; }
}

/* ─── 18. App shell (dashboard + admin) ─────────────────────────────────── */
.app-shell { min-height: 100vh; }
.sidebar { display: none; }
@media (min-width: 768px) {
  .sidebar {
    display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; z-index: 160;
    width: var(--sidebar-w); background: var(--surface); border-right: 1px solid var(--border); overflow-y: auto;
  }
  .app-main { margin-left: var(--sidebar-w); }
}
.sidebar-brand { display: flex; align-items: center; height: var(--topbar-h); padding: 0 20px; flex-shrink: 0; }
.sidebar-nav { padding: 6px 12px 16px; flex: 1; }
.sidebar-section { padding: 18px 10px 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 12px; margin: 1px 0;
  border-radius: 10px; color: var(--muted); font-size: 14px; font-weight: 500;
  transition: color var(--t-fast), background-color var(--t-fast);
}
@media (pointer: coarse) { .nav-item { min-height: var(--touch); } }
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; transition: transform var(--t-smooth); }
.nav-item:hover { color: var(--text); background: var(--surface2); }
.nav-item:hover svg { transform: translateX(2px); }
.nav-item.active { color: var(--text); background: var(--surface2); font-weight: 600; box-shadow: inset 0 0 0 1px var(--border); }
.nav-item.active::before { content: ''; position: absolute; left: -12px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav-item.active svg { color: var(--accent); }
.drawer-panel .nav-item.active::before { left: -12px; }
.sidebar-foot { margin: 0 12px 12px; padding: 14px; border-radius: var(--radius-sm); background: var(--surface2); border: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.sidebar-foot .who { display: block; color: var(--text); font-weight: 600; word-break: break-all; margin-top: 2px; }

.app-main { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 150; display: flex; align-items: center; gap: 6px;
  height: var(--topbar-h); padding: 0 10px; background: var(--glass);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); border-bottom: 1px solid var(--border);
}
.topbar .brand-mark { width: 30px; height: 30px; padding: 6px; border-radius: 9px; }
.topbar .brand-text b { font-size: 1rem; }
@media (max-width: 379px) { .topbar .brand-text { display: none; } }
@media (min-width: 768px) { .topbar .brand { display: none; } .topbar { padding: 0 20px 0 28px; } }
.topbar-context { display: none; align-items: center; gap: 10px; font-size: 13px; font-weight: 500; color: var(--muted); }
.topbar-context .text-cyan { color: var(--text); font-weight: 600; }
.topbar-context span[aria-hidden] { opacity: .5; }
.topbar-context .live { display: inline-flex; align-items: center; gap: 6px; color: var(--success); }
.topbar-context .live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
@media (min-width: 768px) { .topbar-context { display: flex; } }
.topbar-actions { margin-left: auto; padding-left: 12px; display: flex; align-items: center; gap: 6px; }
.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0;
  color: var(--text-2); background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
@media (pointer: coarse) { .icon-btn { width: 44px; height: 44px; } }
.icon-btn:hover { color: var(--text); border-color: var(--border-bright); transform: translateY(-1px); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .badge-count { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--pill); background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; font-variant-numeric: tabular-nums; border: 2px solid var(--bg); animation: pop .4s var(--ease); }
.user-chip { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 2px 4px; border-radius: var(--pill); color: var(--text); transition: background-color var(--t-fast); }
.user-chip:hover { color: var(--text); }
a.user-chip:hover { background: var(--surface2); }
.user-chip .avatar { width: 34px; height: 34px; }
.user-chip .who { display: none; line-height: 1.25; font-size: 13px; font-weight: 600; padding-right: 8px; }
@media (min-width: 1024px) { .user-chip .who { display: block; } }
.user-chip .who small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 500; }

.page-content { width: 100%; max-width: 1280px; margin: 0 auto; padding: 22px var(--gutter) 44px; }
@media (max-width: 767px) { .has-tabbar .page-content { padding-bottom: calc(var(--tabbar-h) + 36px + env(safe-area-inset-bottom)); } }
@media (min-width: 1024px) { .page-content { padding: 34px 36px 60px; } }

/* Mobile bottom tab bar */
.mobile-tab-bar {
  display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 200; gap: 4px; padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  background: var(--glass); -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%); border-top: 1px solid var(--border);
}
.tab-item {
  position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: calc(var(--tabbar-h) - 12px); min-width: var(--touch); border-radius: 12px; color: var(--muted); text-decoration: none !important;
  font-size: 10.5px; font-weight: 600; transition: color var(--t-fast), background-color var(--t-fast);
}
.tab-item svg { width: 20px; height: 20px; transition: transform var(--t-smooth); }
.tab-item:hover { color: var(--text); }
.tab-item.active { color: var(--text); background: var(--surface2); }
.tab-item.active svg { color: var(--accent); transform: translateY(-1px) scale(1.08); }
@media (min-width: 768px) { .mobile-tab-bar, .drawer-toggle { display: none !important; } }

/* Cookie banner */
.cookie-banner { position: fixed; bottom: 12px; left: 12px; right: 12px; z-index: 350; padding: 16px; border-radius: var(--radius); background: var(--glass); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border: 1px solid var(--border-bright); box-shadow: var(--shadow-pop); animation: sheet-up .5s var(--ease); }
@media (min-width: 640px) { .cookie-banner { left: auto; max-width: 520px; right: 18px; bottom: 18px; } }
@media (max-width: 767px) { .has-tabbar .cookie-banner { bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom)); } }
.cookie-banner .inner { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 640px) { .cookie-banner .inner { flex-direction: row; align-items: center; } }
.cookie-banner p { margin: 0; font-size: 13px; color: var(--text-2); flex: 1; }

/* Chat widget */
.chat-launcher {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 320; width: 54px; height: 54px; display: grid; place-items: center;
  border-radius: 50%; background: var(--primary); color: var(--on-primary); border: 0; cursor: pointer; box-shadow: var(--shadow-pop);
  transition: transform var(--t-smooth);
}
.chat-launcher::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; animation: ring 3s ease-out infinite; }
.chat-launcher:hover { transform: scale(1.07) rotate(-6deg); }
.chat-launcher svg { width: 22px; height: 22px; }
.has-tabbar .chat-launcher { bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom)); }
@media (min-width: 768px) { .has-tabbar .chat-launcher { bottom: 24px; } }
.chat-panel {
  position: fixed; right: 12px; left: 12px; bottom: calc(82px + env(safe-area-inset-bottom)); z-index: 330; max-height: 70vh; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border-bright); border-radius: var(--radius-lg); box-shadow: var(--shadow-pop); overflow: hidden;
  animation: modal-in .3s var(--ease); transform-origin: bottom right;
}
.has-tabbar .chat-panel { bottom: calc(var(--tabbar-h) + 82px + env(safe-area-inset-bottom)); }
@media (min-width: 640px) { .chat-panel { left: auto; width: 390px; right: 18px; } }
@media (min-width: 768px) { .has-tabbar .chat-panel { bottom: 90px; } }
.chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; min-height: 220px; }
.chat-msg { max-width: 88%; padding: 10px 13px; font-size: 14px; border-radius: 14px 14px 14px 4px; background: var(--surface2); color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; animation: fade-up .3s var(--ease); }
.chat-msg--user { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: var(--primary); color: var(--on-primary); }
.chat-suggestions { display: flex; flex-wrap: wrap; gap: 6px; }
.chat-suggestions .btn { white-space: normal; text-align: left; height: auto; border-radius: var(--pill); }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--border); }
.chat-form input { flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface2); color: var(--text); padding: 10px 14px; font: 14px var(--font); min-height: 42px; }
.chat-form input:focus { outline: none; border-color: var(--accent); }
.chat-form .btn { min-height: 42px; }

/* Error pages */
.error-page { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 48px var(--gutter); }
.error-code {
  font-family: var(--font-display); font-size: clamp(5rem, 3rem + 8vw, 9rem); font-weight: 800; letter-spacing: -0.06em; line-height: 1; font-variant-numeric: tabular-nums;
  background: linear-gradient(120deg, var(--text), var(--accent) 60%, var(--accent-2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: float-y 5s ease-in-out infinite;
}

/* Theme toggle icon swap */
.theme-icon { display: none; }
.theme-icon svg { transition: transform .5s var(--ease); }
[data-theme-toggle]:hover .theme-icon svg { transform: rotate(40deg); }
html.dark .theme-icon--to-light { display: block; }
html:not(.dark) .theme-icon--to-dark { display: block; }

/* Phones: primary form actions span the full width for reach and consistency */
@media (max-width: 639px) {
  .card-body form > .btn[data-loading], .card-body form > .form-actions > .btn[data-loading] { width: 100%; }
}

/* ─── 19. Portraits (leadership & investor photos) ──────────────────────── */
.portrait { position: relative; aspect-ratio: 4 / 5; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.portrait img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
figure:hover .portrait img, .person:hover .portrait img { transform: scale(1.04); }
.portrait--wide { aspect-ratio: 3 / 2; }
.portrait-ph { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; }
.portrait-ph svg { width: 72%; height: auto; color: color-mix(in srgb, var(--muted) 35%, var(--surface2)); }
.portrait-ph-label { position: absolute; top: 16px; left: 0; right: 0; text-align: center; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.portrait--sm { width: 48px; height: 48px; flex-shrink: 0; aspect-ratio: auto; border-radius: 50%; }
.portrait--sm .portrait-ph svg { width: 86%; }
.portrait--sm .portrait-ph-label { display: none; }

.leader { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); align-items: center; }
.leader .portrait { max-width: 360px; width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
@media (min-width: 900px) { .leader { grid-template-columns: 360px minmax(0, 1fr); gap: 64px; } }
.leader--wide .portrait { max-width: 640px; }
@media (min-width: 900px) { .leader--wide { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; } }
.leader-name { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); letter-spacing: -0.035em; margin-top: 14px; }
.leader-role { margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--accent); }
.leader blockquote { margin: 24px 0 0; padding-left: 18px; border-left: 3px solid var(--accent); color: var(--text-2); font-size: clamp(1rem, .95rem + .3vw, 1.15rem); line-height: 1.75; }
.leader-bio { margin-top: 24px; padding-left: 18px; border-left: 3px solid var(--accent); color: var(--text-2); font-size: clamp(1rem, .95rem + .3vw, 1.1rem); line-height: 1.75; max-width: 64ch; }
.leader-bio p { margin: 0; } .leader-bio p + p { margin-top: 1em; }
.team-preview { max-width: 260px; }
.team-preview:has(.portrait--wide) { max-width: 420px; }
.person-bio { margin: 10px 0 0; font-size: 13px; line-height: 1.65; color: var(--text-2); }
.portrait--member img { filter: contrast(1.04); object-position: 50% 25%; }
.portrait-tint { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 60%, color-mix(in srgb, var(--bg) 45%, transparent)); }
.portrait-mono { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(circle at 50% 38%, var(--accent-dim), var(--surface2) 70%); }
.portrait-mono span { font-family: var(--font-display); font-size: clamp(2rem, 1.4rem + 3vw, 3.6rem); font-weight: 700; letter-spacing: .04em; color: var(--accent); }
.portrait--sm .portrait-mono span { font-size: 15px; }
.story { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.story-grid { display: grid; gap: 24px; }
@media (min-width: 900px) { .story-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 64px; } }
.story-grid h2 { margin-top: 12px; }
.story-body { color: var(--text-2); font-size: clamp(1rem, .96rem + .25vw, 1.1rem); line-height: 1.8; max-width: 68ch; }
.story-body p { margin: 0; } .story-body p + p { margin-top: 1.1em; }
.story-body p:first-child::first-letter { float: left; font-family: var(--font-display); font-size: 3.4em; line-height: .9; margin: 4px 10px 0 0; color: var(--accent); font-weight: 700; }
.placeholder-note { margin-top: 16px; font-size: 12px; color: var(--muted); }

.people { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .people { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }
.person { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 12px 12px 18px; min-width: 0; box-shadow: var(--shadow); transition: transform var(--t-smooth), box-shadow var(--t-smooth); }
.person:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.person .portrait { margin-bottom: 14px; }
.person--wide { grid-column: span 2; }
.person-name { font-weight: 700; font-size: 14px; color: var(--text); padding: 0 4px; }
.person-role { font-size: 12px; color: var(--muted); margin-top: 2px; padding: 0 4px; }
.people--flush .person { box-shadow: none; }
.people--docs { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .people--docs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ─── Homepage: approach, people, dashboard example, referral rates ─────── */
.principles { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.principles li { display: flex; gap: 18px; padding: 22px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform var(--t-smooth), border-color var(--t-fast); }
.principles li:hover { transform: translateX(6px); border-color: var(--border-bright); }
.principles h3 { font-size: 1.05rem; margin: 0 0 6px; }
.principles p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.principles .step-num { padding-top: 3px; }

.home-people-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 1024px) { .home-people-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 72px; } }
.home-people-text { margin-top: 18px; color: var(--text-2); font-size: clamp(1rem, .96rem + .25vw, 1.1rem); line-height: 1.8; max-width: 52ch; }
.home-people-text p { margin: 0; } .home-people-text p + p { margin-top: 1em; }
.home-people-photos { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .home-people-photos { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.home-people-photos figure { margin: 0; }
.home-people-photos figcaption { margin-top: 10px; }
.home-people-photos figcaption strong { display: block; font-size: 14px; }
.home-people-photos figcaption span { display: block; margin-top: 2px; font-size: 12px; font-weight: 600; color: var(--accent); }
.home-leader figcaption strong { font-size: 1.15rem; }
.home-investors { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.home-investors figcaption strong { font-size: 13px; }
.home-investors figcaption span { font-size: 11px; color: var(--muted); }
.home-people-photos > :only-child { grid-column: 1 / -1; }
.home-people-photos > .home-investors:only-child { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .home-people-photos > .home-investors:only-child { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.home-people-photos > .home-leader:only-child { max-width: 360px; }
.home-people-photos > .home-leader--wide:only-child { max-width: none; }
.home-people-photos > .home-leader--wide, .home-people-photos:has(> .home-leader--wide) > .home-investors { grid-column: 1 / -1; }
@media (min-width: 640px) { .home-people-photos:has(> .home-leader--wide) > .home-investors { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.home-investors > .home-investor--wide { grid-column: span 2; }

.coin-card h3 { font-size: 1.05rem; margin: 0; }
.coin-card .coin { transition: transform .6s var(--ease); }
.coin-card:hover .coin { transform: rotateY(180deg); }
.tiles.coin-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1100px) { .tiles.coin-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 479px) { .coin-card { padding: 18px; } .coin-card .row { flex-direction: column; align-items: flex-start; gap: 10px; } }

.statement { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-hover); overflow: hidden; }
.statement-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--muted); background: var(--surface2); }
.statement-total { padding: 22px 20px 6px; }
.statement-total strong { display: block; margin-top: 8px; font-family: var(--font-display); font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.statement-rows { padding: 6px 20px 12px; }
.statement-rows > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 14px; font-family: var(--font-mono); }
.statement-rows > div:last-child { border-bottom: 0; }
.statement-rows strong { display: block; font-family: var(--font); font-weight: 600; font-size: 14px; }
.statement-rows small { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); }

.bonus-rates { display: flex; flex-wrap: wrap; gap: 10px; }
.bonus-rates span { display: flex; flex-direction: column; gap: 4px; padding: 14px 22px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); font-size: 12px; font-weight: 600; color: var(--muted); transition: transform var(--t-smooth), border-color var(--t-fast); }
.bonus-rates span:hover { transform: translateY(-3px); border-color: var(--accent); }
.bonus-rates strong { font-family: var(--font-mono); font-size: 1.4rem; letter-spacing: -0.02em; color: var(--accent); font-variant-numeric: tabular-nums; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.link-arrow .icon { width: 16px; height: 16px; transition: transform var(--t-fast); }
.link-arrow:hover .icon { transform: translateX(4px); }

/* ─── Payment methods (admin + investor) ─────────────────────────────────── */
.pm-icon { display: grid; place-items: center; width: 38px; height: 38px; flex-shrink: 0; border-radius: 11px; background: var(--accent-dim); color: var(--accent); }
.pm-icon .icon { width: 18px; height: 18px; }
.pm-fields { display: grid; gap: 12px; }
.pm-field-row { display: grid; gap: 0 12px; padding: 16px 16px 4px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface2); grid-template-columns: minmax(0, 1fr); animation: fade-up .35s var(--ease); }
@media (min-width: 720px) { .pm-field-row { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); } }
.pm-field-row .form-input, .pm-field-row .form-select { background: var(--surface); }
.pm-field-row [data-options] { grid-column: 1 / -1; }
.pm-field-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 10px; grid-column: 1 / -1; }
.pm-required { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.pm-required input { accent-color: var(--accent); width: 16px; height: 16px; }
@media (min-width: 1024px) { .pm-side { position: sticky; top: calc(var(--topbar-h) + 16px); align-self: start; } }
.pm-icon--lg { width: 46px; height: 46px; border-radius: 13px; }
.pm-icon--lg .icon { width: 22px; height: 22px; }
.pm-instructions { white-space: pre-line; color: var(--text-2); font-size: 14px; line-height: 1.7; }
.pm-instructions p { margin: 0; } .pm-instructions p + p { margin-top: .8em; }

/* Show / hide password toggle (app.js) */
.pw-reveal { position: relative; }
.pw-reveal .form-input { padding-right: 48px; }
.pw-reveal-btn { position: absolute; top: 0; right: 0; bottom: 0; width: 46px; display: grid; place-items: center; background: none; border: 0; color: var(--muted); cursor: pointer; }
.pw-reveal-btn:hover, .pw-reveal-btn[aria-pressed="true"] { color: var(--accent); }
.pw-reveal-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; border-radius: var(--radius-sm); }
.pw-reveal-btn .icon { width: 18px; height: 18px; }

/* ─── 20. Motion ────────────────────────────────────────────────────────── */
/* Scroll reveal: only hides content when JS is running (html.js), so pages
   never render blank without it. */
html.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
html.js [data-reveal="left"] { transform: translateX(-30px); }
html.js [data-reveal="right"] { transform: translateX(30px); }
html.js [data-reveal="zoom"] { transform: scale(.94); }
html.js [data-reveal].is-visible { opacity: 1; transform: none; }
/* Off-screen slide-ins must not widen the page on phones */
main { overflow-x: clip; }

/* App pages: content blocks rise in, staggered */
.page-content > * { animation: fade-up .6s var(--ease) both; }
.page-content > *:nth-child(2) { animation-delay: .06s; }
.page-content > *:nth-child(3) { animation-delay: .12s; }
.page-content > *:nth-child(4) { animation-delay: .18s; }
.page-content > *:nth-child(5) { animation-delay: .24s; }
.page-content > *:nth-child(n+6) { animation-delay: .3s; }
.kpis > *, .tiles > *, .grid > .card { animation: fade-up .6s var(--ease) both; }
.kpis > *:nth-child(2), .tiles > *:nth-child(2), .grid > .card:nth-child(2) { animation-delay: .08s; }
.kpis > *:nth-child(3), .tiles > *:nth-child(3), .grid > .card:nth-child(3) { animation-delay: .16s; }
.kpis > *:nth-child(4), .tiles > *:nth-child(4), .grid > .card:nth-child(4) { animation-delay: .24s; }
/* Landing tiles reveal on scroll instead */
html.js [data-reveal] .tiles > *, html.js .tiles[data-reveal] > * { animation: none; }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes slide-down { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes drawer-in { from { transform: translateX(-100%); } to { transform: none; } }
@keyframes pop { 0% { transform: scale(.4); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes swap-in { from { opacity: 0; transform: translateY(10px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes pulse-dot { 0%, 100% { transform: scale(.9); opacity: .75; } 50% { transform: scale(1.2); opacity: 1; } }
@keyframes float-y { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes float-slow { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-30px, 20px); } }
@keyframes card-float { 0%, 100% { transform: rotateX(8deg) rotateY(-12deg) translateY(0); } 50% { transform: rotateX(4deg) rotateY(-6deg) translateY(-10px); } }
@keyframes orb-a { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(-60px, 40px) scale(1.1); } 66% { transform: translate(30px, 70px) scale(.92); } }
@keyframes orb-b { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(80px, -50px) scale(1.15); } }
@keyframes ticker-roll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes ring { 0% { transform: scale(.9); opacity: .7; } 80%, 100% { transform: scale(1.35); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  html.js [data-reveal] { opacity: 1; transform: none; }
  /* The ticker keeps scrolling, just slower */
  .ticker-inner { animation: ticker-roll 80s linear infinite !important; }
}

@media print {
  .sidebar, .topbar, .mobile-tab-bar, .site-header, .site-footer, .toast-stack, .cookie-banner, .chat-launcher, .ticker-bar { display: none !important; }
  .app-main { margin-left: 0; }
  body { background: #fff; color: #000; }
  .card, .tiles > * { box-shadow: none; }
}
