/* The order is fixed: equal-specificity rules across these files rely on it
   (docs/overhaul/01-design-system.md, section 1). Imported once, from src/main.tsx. *//* ==========================================================================
   B Sites — Design Tokens
   Language: "Black canvas, white pills, one lime spark."
   Measured from OKX's public site (pure black canvas, #121212 surfaces,
   #383838 hairlines, 100px pill CTAs, 700-weight headings, single lime
   accent, restrained up/down colours) and re-expressed as our own system.
   Theme is switched with <html data-theme="dark|light">.
   ========================================================================== */

:root {
  /* ---- Typography ---- */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display", "Segoe UI", "Helvetica Neue", Roboto, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --fs-display: 44px;  --lh-display: 1.32;   /* hero headline  (OKX: 44/58) */
  --fs-h2: 40px;       --lh-h2: 1.3;
  --fs-h3: 24px;       --lh-h3: 1.33;
  --fs-h4: 18px;       --lh-h4: 1.4;
  --fs-body-lg: 18px;  --lh-body-lg: 1.36;
  --fs-body: 16px;     --lh-body: 1.5;
  --fs-sm: 14px;       --lh-sm: 1.43;
  --fs-xs: 12px;       --lh-xs: 1.33;
  --fw-regular: 400; --fw-medium: 500; --fw-semi: 600; --fw-bold: 700;

  /* ---- Spacing (4px base) ---- */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 20px;
  --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px;
  --s-20: 80px; --s-30: 120px;

  /* ---- Shape ---- */
  --r-xs: 6px;    /* chips, segmented items       */
  --r-sm: 8px;    /* inputs                       */
  --r-md: 12px;   /* app cards, menus             */
  --r-lg: 16px;   /* nested panels                */
  --r-xl: 24px;   /* modals, marketing cards      */
  --r-2xl: 28px;  /* hero panels, phone frame     */
  --r-pill: 999px;/* every button, badge, tab     */

  /* ---- Motion ---- */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur-1: 120ms; --dur-2: 200ms; --dur-3: 360ms;

  /* ---- Layout ---- */
  --nav-h: 64px;
  --side-w: 248px;
  --tab-h: 64px;
  --container: 1200px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);

  /* ---- Z-index ---- */
  --z-nav: 50; --z-menu: 60; --z-overlay: 100; --z-toast: 200;
}

/* ==================== DARK (default) ==================== */
:root,
:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #000000;           /* page canvas                       */
  --surface: #121212;      /* cards, panels                     */
  --surface-2: #1a1a1a;    /* modals, menus, raised             */
  --fill: #262626;         /* secondary pills, hovered rows     */
  --fill-2: #383838;       /* chips (active), pressed           */
  --line: #383838;         /* outlines (OKX card border)        */
  --line-soft: #202020;    /* table dividers                    */

  --text: #ffffff;
  --text-2: #b3b3b3;       /* body copy                         */
  --text-3: #909090;       /* captions / labels (OKX #909090)   */
  --text-4: #5b5b5b;       /* disabled / placeholders           */

  --cta-bg: #ffffff;       /* primary pill                      */
  --cta-ink: #000000;
  --cta-hover: #e6e6e6;

  --accent: #bcff2f;       /* the lime spark                    */
  --accent-ink: #000000;
  --accent-soft: color-mix(in srgb, #bcff2f 14%, transparent);

  --up: #25a750;           /* gains, live, verified             */
  --down: #ec5b82;         /* losses, errors (lifted for AA)    */
  --warn: #f5a524;         /* pending                           */
  --info: #7aa7ff;

  --up-soft: color-mix(in srgb, var(--up) 16%, transparent);
  --down-soft: color-mix(in srgb, var(--down) 16%, transparent);
  --warn-soft: color-mix(in srgb, var(--warn) 16%, transparent);

  --chart: #bcff2f;
  --focus: #ffffff;
  --scrim: rgba(0, 0, 0, .64);
  --shadow-pop: 0 24px 64px rgba(0, 0, 0, .6), 0 0 0 1px #2a2a2a;
  --shadow-card: none;
  --skeleton-a: #161616; --skeleton-b: #242424;
}

/* ==================== LIGHT ==================== */
:root[data-theme="light"] {
  color-scheme: light;

  --bg: #ffffff;
  --surface: #f5f5f5;
  --surface-2: #ffffff;
  --fill: #f0f0f0;
  --fill-2: #e2e2e2;
  --line: #dcdcdc;
  --line-soft: #ececec;

  --text: #000000;
  --text-2: #4a4a4a;
  --text-3: #6e6e6e;
  --text-4: #b3b3b3;

  --cta-bg: #000000;
  --cta-ink: #ffffff;
  --cta-hover: #262626;

  --accent: #bcff2f;       /* stays lime, always used as a fill with black ink */
  --accent-ink: #000000;
  --accent-soft: color-mix(in srgb, #bcff2f 40%, transparent);

  --up: #12843a;
  --down: #c9335a;
  --warn: #a86400;
  --info: #2b5fd9;

  --chart: #3f7a00;
  --focus: #000000;
  --scrim: rgba(0, 0, 0, .42);
  --shadow-pop: 0 24px 64px rgba(0, 0, 0, .18), 0 0 0 1px #e4e4e4;
  --shadow-card: 0 1px 0 rgba(0, 0, 0, .02);
  --skeleton-a: #eeeeee; --skeleton-b: #f8f8f8;
}

/* Responsive type scale */
@media (max-width: 720px) {
  :root {
    --fs-display: 32px; --lh-display: 1.25;
    --fs-h2: 28px; --lh-h2: 1.28;
    --fs-h3: 20px;
    --fs-body-lg: 16px;
    --nav-h: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur-1: 0ms; --dur-2: 0ms; --dur-3: 0ms; }
}

/* ==========================================================================
   B Sites — Base: reset, typography, layout primitives
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  transition: background var(--dur-2) var(--ease), color var(--dur-2) var(--ease);
}
body.no-scroll { overflow: hidden; }

h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: #000; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.skip-link { position: absolute; left: 16px; top: -64px; z-index: 999; background: var(--cta-bg); color: var(--cta-ink); padding: 12px 20px; border-radius: var(--r-pill); font-weight: 600; }
.skip-link:focus { top: 12px; }

.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Type */
.display { font-size: var(--fs-display); line-height: var(--lh-display); font-weight: 700; letter-spacing: -.02em; }
.h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); font-weight: 700; letter-spacing: -.015em; }
.h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: 700; letter-spacing: -.01em; }
.h4 { font-size: var(--fs-h4); line-height: var(--lh-h4); font-weight: 600; }
.lead { font-size: var(--fs-body-lg); line-height: var(--lh-body-lg); color: var(--text-2); }
.body { font-size: var(--fs-body); }
.small { font-size: var(--fs-sm); line-height: var(--lh-sm); }
.xs { font-size: var(--fs-xs); line-height: var(--lh-xs); }
.muted { color: var(--text-3); }
.dim { color: var(--text-2); }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; letter-spacing: -.01em; }
.mono { font-family: var(--mono); }
.up { color: var(--up); } .down { color: var(--down); } .warn { color: var(--warn); }
.eyebrow { font-size: var(--fs-sm); font-weight: 600; color: var(--text-3); letter-spacing: .02em; }
.text-center { text-align: center; }
.balance { text-wrap: balance; }

/* Layout */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
@media (max-width: 720px) { .container { padding-inline: 16px; } }
.stack > * + * { margin-top: var(--gap, 16px); }
.row { display: flex; align-items: center; gap: var(--gap, 12px); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--gap, 12px); }
.grid { display: grid; gap: var(--gap, 16px); }
.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.hide-mobile { display: initial; }
.show-mobile { display: none !important; }
@media (max-width: 899px) { .hide-tablet { display: none !important; } .show-tablet { display: initial !important; } }
@media (max-width: 720px) { .hide-mobile { display: none !important; } .show-mobile { display: initial !important; } }

.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 24px; height: 24px; }

/* Reveal on scroll (progressive enhancement) */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--fill-2) transparent; }
/* ==========================================================================
   B Sites — Components
   buttons · inputs · cards · badges · tabs · lists · overlays · toasts · loading
   ========================================================================== */

/* ---------- Buttons ---------- */
.btn {
  --h: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 24px;
  border-radius: var(--r-pill);
  font-size: 16px; font-weight: 600; line-height: 1; white-space: nowrap;
  background: var(--fill); color: var(--text);
  border: 1px solid transparent;
  transition: background var(--dur-2) var(--ease), transform var(--dur-1) var(--ease), opacity var(--dur-2), border-color var(--dur-2);
  user-select: none; -webkit-tap-highlight-color: transparent;
  position: relative;
}
.btn:hover { background: var(--fill-2); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--cta-bg); color: var(--cta-ink); }
.btn-primary:hover { background: var(--cta-hover); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: color-mix(in srgb, var(--accent) 86%, #fff); }
.btn-secondary { background: var(--fill); color: var(--text); }
.btn-outline { background: transparent; border-color: var(--text); color: var(--text); }
.btn-outline:hover { background: var(--text); color: var(--bg); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--fill); color: var(--text); }
.btn-danger { background: var(--down); color: #fff; }
.btn-danger:hover { background: color-mix(in srgb, var(--down) 86%, #000); }
.btn-danger-ghost { background: var(--down-soft); color: var(--down); }
.btn-danger-ghost:hover { background: color-mix(in srgb, var(--down) 26%, transparent); }
.btn-xs { --h: 28px; padding: 0 12px; font-size: 13px; }
.btn-sm { --h: 36px; padding: 0 16px; font-size: 14px; }
.btn-md { --h: 44px; padding: 0 20px; font-size: 15px; }
.btn-lg { --h: 60px; padding: 0 28px; font-size: 20px; font-weight: 700; }  /* OKX hero CTA: 61px / 20px / 700 */
.btn-block { width: 100%; }
.btn-icon { width: var(--h); padding: 0; }
.btn[disabled], .btn[aria-disabled="true"] { background: var(--fill); color: var(--text-4); cursor: not-allowed; pointer-events: none; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid var(--cta-ink); border-right-color: transparent; animation: spin .7s linear infinite;
}
.btn-secondary.is-loading::after, .btn-ghost.is-loading::after, .btn-outline.is-loading::after { border-color: var(--text); border-right-color: transparent; }
.btn-danger.is-loading::after { border-color: #fff; border-right-color: transparent; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center;
  color: var(--text-2); transition: background var(--dur-2), color var(--dur-2);
}
.icon-btn:hover { background: var(--fill); color: var(--text); }

.link { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--text-4); transition: text-decoration-color .2s; }
.link:hover { text-decoration-color: var(--text); }
.link-btn { font-weight: 600; font-size: 14px; color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.link-btn:disabled { color: var(--text-4); text-decoration: none; cursor: not-allowed; }

/* ---------- Form fields ---------- */
.field { display: grid; gap: 8px; }
.field > label, .label { font-size: 14px; font-weight: 500; color: var(--text); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.field > label > span:first-child { margin-right: auto; }
.label .opt { font-weight: 400; color: var(--text-3); font-size: 13px; }
.hint { font-size: 13px; color: var(--text-3); line-height: 1.4; }
.err { font-size: 13px; color: var(--down); display: none; align-items: flex-start; gap: 6px; line-height: 1.4; }
.err .icon { width: 16px; height: 16px; margin-top: 1px; }
.field.has-error .err { display: flex; }
.field.has-error .input-wrap { border-color: var(--down); }
.field.has-success .input-wrap { border-color: var(--up); }

.input-wrap {
  display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px;
  background: var(--fill); border: 1px solid transparent; border-radius: var(--r-sm);
  transition: border-color var(--dur-2), background var(--dur-2);
}
.input-wrap:hover { border-color: var(--line); }
.input-wrap:focus-within { border-color: var(--text); background: var(--bg); }
.input-wrap .icon { color: var(--text-3); }
.input, .textarea, .select {
  flex: 1; min-width: 0; width: 100%; background: transparent; border: 0; outline: 0; color: var(--text);
  font-size: 16px; /* 16px prevents iOS zoom */ height: 100%;
}
.input::placeholder, .textarea::placeholder { color: var(--text-4); }
.input-wrap .affix { color: var(--text-3); font-size: 15px; white-space: nowrap; }
.input-wrap.is-textarea { height: auto; padding: 12px 14px; align-items: flex-start; }
.textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
.select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 24px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23909090' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right center / 16px no-repeat; }
.select option { background: var(--surface-2); color: var(--text); }
.input-wrap .btn { margin-right: -6px; }
.input-lg { height: 56px; }
.input-lg .input { font-size: 18px; }

/* Checkbox / radio */
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 14px; color: var(--text-2); line-height: 1.5; }
.check input { appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 1px 0 0; border: 1.5px solid var(--text-4); border-radius: 6px; display: grid; place-items: center; cursor: pointer; transition: all var(--dur-1); background: transparent; }
.check input[type=radio] { border-radius: 50%; }
.check input:hover { border-color: var(--text-2); }
.check input:checked { background: var(--cta-bg); border-color: var(--cta-bg); }
.check input:checked::after { content: ""; width: 10px; height: 6px; border-left: 2px solid var(--cta-ink); border-bottom: 2px solid var(--cta-ink); transform: translateY(-1px) rotate(-45deg); }
.check input[type=radio]:checked::after { width: 8px; height: 8px; border: 0; border-radius: 50%; background: var(--cta-ink); transform: none; }

/* Switch */
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { appearance: none; -webkit-appearance: none; position: absolute; inset: 0; margin: 0; width: 100%; height: 100%; border-radius: var(--r-pill); background: var(--fill-2); cursor: pointer; transition: background var(--dur-2); }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform var(--dur-2) var(--ease); box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked { background: var(--up); }
.switch input:checked::after { transform: translateX(18px); }

/* Range */
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; --p: 50%; }
.range::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(to right, var(--text) var(--p), var(--fill-2) var(--p)); }
.range::-moz-range-track { height: 4px; border-radius: 4px; background: var(--fill-2); }
.range::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--text); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--cta-bg); border: 4px solid var(--bg); box-shadow: 0 0 0 1.5px var(--text); margin-top: -9px; }
.range::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--cta-bg); border: 4px solid var(--bg); box-shadow: 0 0 0 1.5px var(--text); }

/* Segmented control */
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--fill); border-radius: var(--r-xs); }
.seg button { height: 30px; padding: 0 14px; border-radius: 4px; font-size: 13px; font-weight: 600; color: var(--text-3); transition: all var(--dur-1); }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"], .seg button.on { background: var(--fill-2); color: var(--text); }
:root[data-theme="light"] .seg button[aria-pressed="true"], :root[data-theme="light"] .seg button.on { background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.12); }

/* OTP */
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.otp input {
  width: 100%; min-width: 0; height: 64px; text-align: center; font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums;
  background: var(--fill); border: 1px solid transparent; border-radius: var(--r-md); outline: 0; caret-color: var(--accent); transition: border-color var(--dur-1), background var(--dur-1);
}
.otp input:focus { border-color: var(--text); background: var(--bg); }
.otp input:not(:placeholder-shown) { border-color: var(--line); }
.otp.is-error input { border-color: var(--down); animation: shake .4s; }
.otp.is-ok input { border-color: var(--up); }
@media (max-width: 400px) { .otp { gap: 6px; } .otp input { height: 56px; font-size: 24px; } }

/* ---------- Cards & panels ---------- */
.card { background: var(--surface); border-radius: var(--r-md); padding: 20px; box-shadow: var(--shadow-card); }
.card-lg { padding: 24px; border-radius: var(--r-lg); }
.card-line { background: transparent; border: 1.28px solid var(--line); border-radius: 25px; padding: 24px; } /* OKX marketing card */
.card-hover { transition: transform var(--dur-2) var(--ease), border-color var(--dur-2); }
.card-hover:hover { transform: translateY(-3px); border-color: var(--text-4); }
.divider { height: 1px; background: var(--line-soft); border: 0; margin: 0; }

/* ---------- Badges / status ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; background: var(--fill); color: var(--text-2); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.no-dot::before { display: none; }
.badge-live, .badge-ok, .badge-paid, .badge-verified, .badge-active { background: var(--up-soft); color: var(--up); }
.badge-draft, .badge-neutral { background: var(--fill); color: var(--text-3); }
.badge-deploying, .badge-processing { background: var(--accent-soft); color: var(--text); }
:root[data-theme="dark"] .badge-deploying, :root[data-theme="dark"] .badge-processing { color: var(--accent); }
.badge-deploying::before, .badge-processing::before { animation: pulse 1.2s ease-in-out infinite; background: var(--accent); }
:root[data-theme="light"] .badge-deploying::before, :root[data-theme="light"] .badge-processing::before { background: #5c9900; }
.badge-pending, .badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-failed, .badge-error, .badge-rejected { background: var(--down-soft); color: var(--down); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: var(--r-xs); background: var(--fill); font-size: 14px; font-weight: 500; color: var(--text-3); transition: all var(--dur-1); }
.chip:hover { color: var(--text); }
.chip.on, .chip[aria-pressed="true"] { background: var(--fill-2); color: var(--text); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
.chips::-webkit-scrollbar { display: none; }

/* ---------- Tabs (underline, OKX markets style) ---------- */
.tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--line-soft); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; padding: 12px 0 14px; font-size: 16px; font-weight: 600; color: var(--text-3); white-space: nowrap; transition: color var(--dur-2); }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); }
.tab[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--text); border-radius: 2px; }
.tab .count { margin-left: 6px; font-size: 12px; color: var(--text-3); font-weight: 500; }

/* ---------- Stepper ---------- */
.stepper { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.step { display: grid; gap: 8px; text-align: left; }
.step .bar { height: 4px; border-radius: 4px; background: var(--fill-2); overflow: hidden; position: relative; }
.step .bar::after { content: ""; position: absolute; inset: 0; background: var(--text); transform: scaleX(0); transform-origin: left; transition: transform var(--dur-3) var(--ease); }
.step.done .bar::after, .step.active .bar::after { transform: scaleX(1); }
.step.active .bar::after { background: var(--accent); }
:root[data-theme="light"] .step.active .bar::after { background: #000; }
.step .t { font-size: 12px; font-weight: 600; color: var(--text-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step.active .t, .step.done .t { color: var(--text); }
.step.done .t { color: var(--text-3); }
.step[disabled] { cursor: default; }
@media (max-width: 720px) { .step .t { display: none; } .step.active .t { display: block; position: absolute; } .stepper { gap: 4px; } }

/* ---------- Lists / rows ---------- */
.list-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.list-row:last-child { border-bottom: 0; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--fill-2); font-weight: 700; font-size: 14px; flex: none; }
.avatar-sq { border-radius: 10px; }
.tile { width: 40px; height: 40px; border-radius: 12px; background: var(--fill); display: grid; place-items: center; flex: none; color: var(--text); }
.kv { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; padding: 10px 0; }
.kv > :first-child { color: var(--text-3); }
.kv > :last-child { font-weight: 600; text-align: right; }

/* ---------- Menu (dropdown) ---------- */
.menu-wrap { position: relative; }
.menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 200px; z-index: var(--z-menu);
  background: var(--surface-2); border-radius: var(--r-md); padding: 6px; box-shadow: var(--shadow-pop);
  opacity: 0; transform: translateY(-4px) scale(.98); pointer-events: none; transform-origin: top right;
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
}
.menu.open { opacity: 1; transform: none; pointer-events: auto; }
.menu button, .menu a { display: flex; align-items: center; gap: 12px; width: 100%; height: 40px; padding: 0 12px; border-radius: 8px; font-size: 14px; font-weight: 500; text-align: left; color: var(--text); }
.menu button:hover, .menu a:hover { background: var(--fill); }
.menu .danger { color: var(--down); }
.menu hr { border: 0; height: 1px; background: var(--line-soft); margin: 6px 0; }

/* ---------- Overlays: modal + drawer + sheet ---------- */
.overlay { position: fixed; inset: 0; z-index: var(--z-overlay); display: grid; place-items: center; padding: 24px; background: var(--scrim); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; pointer-events: none; transition: opacity var(--dur-2) var(--ease); }
.overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  width: 100%; max-width: 440px; max-height: calc(100dvh - 48px); overflow: auto;
  background: var(--surface-2); border-radius: var(--r-xl); padding: 28px; box-shadow: var(--shadow-pop);
  transform: translateY(12px) scale(.97); transition: transform var(--dur-3) var(--ease);
}
.overlay.open .modal { transform: none; }
.modal-lg { max-width: 560px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.modal-title { font-size: 22px; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; }
.modal-body { color: var(--text-2); font-size: 15px; }
.modal-foot { display: flex; gap: 12px; margin-top: 24px; }
.modal-foot .btn { flex: 1; }
.modal-icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 16px; background: var(--fill); }
.modal-icon.danger { background: var(--down-soft); color: var(--down); }
.modal-icon.ok { background: var(--up-soft); color: var(--up); }
.modal-icon.accent { background: var(--accent); color: #000; }
.modal-icon .icon { width: 26px; height: 26px; }

.overlay.drawer-wrap { place-items: stretch end; padding: 0; }
.drawer {
  width: min(480px, 100%); height: 100%; background: var(--surface-2); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform var(--dur-3) var(--ease); box-shadow: var(--shadow-pop);
}
.overlay.open .drawer { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line-soft); }
.drawer-body { flex: 1; overflow: auto; padding: 24px; }
.drawer-foot { padding: 16px 24px calc(16px + var(--safe-b)); border-top: 1px solid var(--line-soft); display: flex; gap: 12px; }
.drawer-foot .btn { flex: 1; }
.grab { display: none; width: 40px; height: 4px; border-radius: 4px; background: var(--fill-2); margin: 8px auto 0; }

/* On phones, modals and drawers become bottom sheets */
@media (max-width: 640px) {
  .overlay { padding: 0; place-items: end stretch; }
  .modal { max-width: none; border-radius: var(--r-xl) var(--r-xl) 0 0; padding: 24px 20px calc(24px + var(--safe-b)); transform: translateY(100%); max-height: 92dvh; }
  .modal::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--fill-2); margin: -12px auto 16px; }
  .overlay.drawer-wrap { place-items: end stretch; }
  .drawer { width: 100%; height: auto; max-height: 92dvh; border-radius: var(--r-xl) var(--r-xl) 0 0; transform: translateY(100%); }
  .grab { display: block; }
}

/* ---------- Toasts ---------- */
.toasts { position: fixed; z-index: var(--z-toast); top: calc(16px + var(--safe-t)); left: 50%; transform: translateX(-50%); display: grid; gap: 10px; width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md);
  background: var(--surface-2); box-shadow: var(--shadow-pop); animation: toast-in .35s var(--ease); position: relative; overflow: hidden;
}
.toast.out { animation: toast-out .25s var(--ease) forwards; }
.toast .ti { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--fill); }
.toast .ti .icon { width: 16px; height: 16px; stroke-width: 2.25; }
.toast.success .ti { background: var(--up-soft); color: var(--up); }
.toast.error .ti { background: var(--down-soft); color: var(--down); }
.toast.warn .ti { background: var(--warn-soft); color: var(--warn); }
.toast .tt { font-weight: 600; font-size: 14px; line-height: 1.4; }
.toast .td { font-size: 13px; color: var(--text-2); line-height: 1.4; margin-top: 2px; }
.toast .tx { margin-left: auto; color: var(--text-3); }
.toast::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; background: currentColor; opacity: .5; width: 100%; transform-origin: left; animation: toast-bar var(--life, 4s) linear forwards; }
.toast.success::after { color: var(--up); } .toast.error::after { color: var(--down); } .toast.warn::after { color: var(--warn); }
@media (max-width: 899px) { .toasts { top: auto; bottom: calc(var(--tab-h) + 16px + var(--safe-b)); } }
.toasts.no-tabbar { bottom: calc(16px + var(--safe-b)); }

/* ---------- Loading ---------- */
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--fill-2); border-top-color: var(--text); animation: spin .7s linear infinite; display: inline-block; flex: none; }
.spinner-lg { width: 40px; height: 40px; border-width: 3px; }
.skeleton { background: linear-gradient(100deg, var(--skeleton-a) 30%, var(--skeleton-b) 50%, var(--skeleton-a) 70%); background-size: 300% 100%; animation: shimmer 1.4s ease-in-out infinite; border-radius: 8px; min-height: 14px; }
.progress { height: 6px; border-radius: 6px; background: var(--fill-2); overflow: hidden; }
.progress > i { display: block; height: 100%; width: var(--v, 0%); background: var(--accent); border-radius: 6px; transition: width .5s var(--ease); }
:root[data-theme="light"] .progress > i { background: #000; }
.progress.indeterminate > i { width: 40%; animation: indet 1.2s ease-in-out infinite; }

/* ---------- Empty / banners ---------- */
.empty { text-align: center; padding: 56px 24px; display: grid; justify-items: center; gap: 12px; border: 1.28px dashed var(--line); border-radius: 25px; }
.empty .art { width: 96px; height: 96px; margin-bottom: 8px; }
.banner { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r-md); background: var(--fill); font-size: 14px; line-height: 1.45; align-items: flex-start; }
.banner .icon { margin-top: 1px; }
.banner.warn { background: var(--warn-soft); } .banner.warn .icon { color: var(--warn); }
.banner.error { background: var(--down-soft); } .banner.error .icon { color: var(--down); }
.banner.ok { background: var(--up-soft); } .banner.ok .icon { color: var(--up); }
.banner.accent { background: var(--accent-soft); }

/* Accordion */
.acc { border-top: 1px solid var(--line); }
.acc-item { border-bottom: 1px solid var(--line); }
.acc-q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px 0; text-align: left; font-size: 24px; font-weight: 600; line-height: 1.33; letter-spacing: -.01em; }
.acc-q .plus { width: 24px; height: 24px; border: 1.5px solid var(--text); border-radius: 50%; flex: none; position: relative; transition: transform var(--dur-3) var(--ease); }
.acc-q .plus::before, .acc-q .plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 1.5px; background: var(--text); transform: translate(-50%, -50%); }
.acc-q .plus::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform var(--dur-3) var(--ease); }
.acc-item.open .plus::after { transform: translate(-50%, -50%) rotate(0); }
.acc-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--dur-3) var(--ease); }
.acc-a > div { overflow: hidden; color: var(--text-2); font-size: 16px; line-height: 1.6; max-width: 760px; }
.acc-a > div > p { padding-bottom: 28px; }
.acc-item.open .acc-a { grid-template-rows: 1fr; }
@media (max-width: 720px) { .acc-q { font-size: 18px; padding: 20px 0; } }

/* Colour swatch */
.swatch { width: 36px; height: 36px; border-radius: 50%; border: 2px solid transparent; background: var(--c); position: relative; transition: transform var(--dur-1); box-shadow: inset 0 0 0 1px rgba(128,128,128,.35); }
.swatch:hover { transform: scale(1.08); }
.swatch[aria-checked="true"] { border-color: var(--bg); box-shadow: 0 0 0 2px var(--text); }

/* Keyframes */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(-12px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-8px) scale(.96); } }
@keyframes toast-bar { to { transform: scaleX(0); } }
@keyframes indet { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (max-width: 899px) { @keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.96); } } }
/* ==========================================================================
   B Sites — Shells + page layouts
   ========================================================================== */

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -.02em; }
.brand-mark { display: inline-flex; }

/* ---------- Marketing shell ---------- */
.site-nav { position: sticky; top: 0; z-index: var(--z-nav); background: color-mix(in srgb, var(--bg) 84%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-bottom: 1px solid transparent; transition: border-color var(--dur-2); padding-top: var(--safe-t); }
.site-nav.scrolled { border-bottom-color: var(--line-soft); }
.site-nav-in { height: var(--nav-h); display: flex; align-items: center; gap: 32px; }
.site-links { display: flex; gap: 4px; margin-right: auto; }
.site-links a { padding: 8px 12px; font-size: 14px; font-weight: 500; color: var(--text-2); border-radius: var(--r-pill); transition: color var(--dur-1), background var(--dur-1); }
.site-links a:hover { color: var(--text); background: var(--fill); }
.site-links a[aria-current] { color: var(--text); }
.site-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
@media (max-width: 899px) { .site-nav-in { gap: 12px; } .site-actions .show-tablet { display: inline-grid !important; } }
.mm-links a { display: flex; justify-content: space-between; align-items: center; padding: 20px 0; font-size: 22px; font-weight: 600; border-bottom: 1px solid var(--line-soft); }
.mm-links a .icon { color: var(--text-3); }

.site-footer { border-top: 1px solid var(--line-soft); padding: 64px 0 calc(32px + var(--safe-b)); margin-top: 0; }
.foot-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.foot-col { display: grid; gap: 4px; align-content: start; }
.foot-col h4 { font-size: 14px; font-weight: 600; color: var(--text-3); margin-bottom: 12px; }
.foot-col a { font-size: 14px; color: var(--text-2); padding: 5px 0; transition: color .15s; }
.foot-col a:hover { color: var(--text); }
.foot-risk { margin-top: 48px; max-width: 880px; line-height: 1.6; }
.foot-bottom { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line-soft); }
@media (max-width: 720px) { .foot-top { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }

/* ---------- Landing ---------- */
.section { padding: var(--s-30) 0; }
.section-sm { padding: var(--s-20) 0; }
@media (max-width: 720px) { .section { padding: 72px 0; } .section-sm { padding: 48px 0; } }
.section-head { max-width: 760px; margin: 0 auto 64px; text-align: center; display: grid; gap: 16px; }
@media (max-width: 720px) { .section-head { margin-bottom: 40px; } }

.hl { background: var(--accent); color: #000; padding: 0 .16em; border-radius: .18em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hero { padding: 64px 0 96px; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; min-height: min(720px, calc(100dvh - 120px)); }
.hero h1 { max-width: 620px; }
.hero .lead { margin-top: 24px; max-width: 520px; }
.hero-cta { display: flex; gap: 12px; margin-top: 40px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 40px; margin-top: 56px; flex-wrap: wrap; }
.hero-stats strong { display: block; font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.hero-stats span { font-size: 14px; color: var(--text-3); }
.hero-glow { position: absolute; inset: auto -10% -30% auto; width: 60vw; height: 60vw; max-width: 760px; max-height: 760px; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 16%, transparent), transparent); pointer-events: none; z-index: -1; }
@media (max-width: 899px) { .hero-grid { grid-template-columns: 1fr; min-height: 0; } .hero { padding-top: 32px; } .hero-stats { gap: 28px; margin-top: 40px; } }
@media (max-width: 720px) { .hero-cta .btn-lg { --h: 52px; font-size: 17px; flex: 1; } }

/* Phone mock */
.phone-stage { position: relative; display: grid; place-items: center; padding: 24px 0; }
.phone { --demo: var(--accent); width: 300px; height: 600px; border-radius: 44px; border: 1.5px solid var(--line); background: var(--bg); padding: 14px; position: relative; overflow: hidden; box-shadow: 0 40px 80px -30px rgba(0,0,0,.5); }
.phone::before { content: ""; position: absolute; top: 10px; left: 50%; width: 84px; height: 22px; border-radius: 14px; background: var(--fill); transform: translateX(-50%); }
.ps { height: 100%; border-radius: 32px; background: var(--surface); padding: 44px 16px 16px; display: flex; flex-direction: column; gap: 14px; overflow: hidden; }
.ps-top { display: flex; align-items: center; justify-content: space-between; }
.ps-logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.ps-logo i { width: 22px; height: 22px; border-radius: 7px; background: var(--demo); display: block; transition: background .3s; }
.ps-pill { height: 24px; padding: 0 10px; border-radius: 99px; background: var(--demo); color: #000; font-size: 11px; font-weight: 700; display: grid; place-items: center; transition: background .3s; }
.ps-price { font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.ps-chart { height: 112px; border-radius: 12px; background: var(--bg); position: relative; overflow: hidden; }
.ps-chart svg { width: 100%; height: 100%; }
.ps-chart path.line { stroke: var(--demo); transition: stroke .3s; }
.ps-row { display: flex; justify-content: space-between; align-items: center; font-size: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.ps-row b { font-weight: 600; font-size: 13px; }
.ps-btn { margin-top: auto; height: 44px; border-radius: 99px; background: var(--demo); color: #000; font-weight: 700; font-size: 14px; display: grid; place-items: center; transition: background .3s; }
.float-card { position: absolute; background: var(--surface-2); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow-pop); display: flex; gap: 12px; align-items: center; animation: float 5s ease-in-out infinite; z-index: 2; }
.float-card .tile { width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--up); }
.float-card.a { left: -8%; bottom: 18%; }
.float-card.b { right: -6%; top: 12%; animation-delay: -2.5s; }
@media (max-width: 480px) { .float-card.a { left: 0; } .float-card.b { right: 0; } .phone { width: 272px; height: 560px; } }

/* Features */
.feat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.feat { text-align: center; display: grid; justify-items: center; gap: 12px; }
.feat .ico { width: 88px; height: 88px; border-radius: 26px; border: 1.28px solid var(--line); display: grid; place-items: center; margin-bottom: 12px; position: relative; background: linear-gradient(160deg, var(--surface), transparent); }
.feat .ico .icon { width: 36px; height: 36px; stroke-width: 1.5; }
.feat .ico::after { content: ""; position: absolute; top: 12px; right: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.feat h3 { font-size: 20px; font-weight: 700; }
.feat p { color: var(--text-2); max-width: 260px; font-size: 16px; line-height: 1.5; }
@media (max-width: 899px) { .feat-grid { grid-template-columns: 1fr 1fr; gap: 48px 24px; } }
@media (max-width: 520px) { .feat-grid { grid-template-columns: 1fr; } }

/* Brand playground */
.play { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: center; }
.brand-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 40px; }
.brand-card { text-align: left; border: 1.28px solid var(--line); border-radius: 25px; padding: 18px; display: grid; gap: 14px; transition: border-color .2s, transform .2s, background .2s; aspect-ratio: 1 / 1; align-content: space-between; }
.brand-card:hover { transform: translateY(-2px); border-color: var(--text-4); }
.brand-card[aria-checked="true"] { border-color: var(--text); background: var(--surface); }
.brand-card .dot { width: 44px; height: 44px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(128,128,128,.3); }
.brand-card b { display: block; font-size: 15px; } .brand-card span { font-size: 12px; color: var(--text-3); font-family: var(--mono); }
.browser { --c: var(--accent); border: 1.28px solid var(--line); border-radius: 24px; overflow: hidden; background: var(--surface); }
.browser-bar { height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 16px; border-bottom: 1px solid var(--line-soft); }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--fill-2); }
.browser-url { margin-left: 12px; flex: 1; max-width: 300px; height: 26px; border-radius: 99px; background: var(--fill); font-size: 12px; color: var(--text-3); display: flex; align-items: center; padding: 0 12px; gap: 6px; }
.browser-body { padding: 24px; display: grid; gap: 20px; min-height: 360px; }
.mini-nav { display: flex; align-items: center; gap: 10px; }
.mini-nav i { width: 28px; height: 28px; border-radius: 8px; background: var(--c); transition: background .3s; }
.mini-nav b { font-size: 15px; }
.mini-nav .sp { margin-left: auto; height: 30px; padding: 0 16px; border-radius: 99px; background: var(--c); color: #000; font-weight: 700; font-size: 12px; display: grid; place-items: center; transition: background .3s; }
.mini-hero h4 { font-size: 26px; line-height: 1.2; letter-spacing: -.02em; max-width: 360px; }
.mini-hero h4 em { font-style: normal; color: var(--c); transition: color .3s; }
.mini-hero p { color: var(--text-3); font-size: 13px; margin-top: 8px; max-width: 320px; }
.mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mini-grid div { background: var(--bg); border-radius: 14px; padding: 12px; font-size: 12px; display: grid; gap: 4px; }
.mini-grid b { font-size: 15px; } .mini-grid .u { color: var(--up); font-weight: 600; }
@media (max-width: 899px) { .play { grid-template-columns: 1fr; gap: 40px; } }
@media (max-width: 480px) { .brand-cards { gap: 8px; } .brand-card { padding: 12px; border-radius: 18px; } .brand-card .dot { width: 32px; height: 32px; } }

/* Calculator */
.calc { background: var(--surface); border-radius: 32px; padding: 48px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; }
.calc-in { display: grid; gap: 32px; align-content: start; }
.calc-line { display: grid; gap: 6px; }
.calc-line .top { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; }
.calc-line .top b { font-size: 20px; font-variant-numeric: tabular-nums; }
.calc-out { background: var(--bg); border: 1.28px solid var(--line); border-radius: 25px; padding: 32px; display: grid; gap: 20px; align-content: center; }
.calc-out .big { font-size: clamp(40px, 6vw, 64px); font-weight: 700; letter-spacing: -.03em; line-height: 1; }
@media (max-width: 899px) { .calc { grid-template-columns: 1fr; padding: 24px; gap: 28px; border-radius: 24px; } .calc-out { padding: 24px; } }

/* Step cards (OKX Trade / Bots / Earn / Copy pattern) */
.step-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step-card { border: 1.28px solid var(--line); border-radius: 25px; padding: 32px 24px 28px; display: grid; justify-items: center; text-align: center; gap: 10px; min-height: 380px; align-content: start; transition: border-color .25s, transform .25s; position: relative; }
.step-card:hover { border-color: var(--text-3); transform: translateY(-4px); }
.step-card .n { position: absolute; top: 18px; left: 20px; font-size: 13px; font-weight: 700; color: var(--text-3); font-variant-numeric: tabular-nums; }
.step-card .art { width: 120px; height: 120px; margin: 8px 0 18px; display: grid; place-items: center; }
.step-card h3 { font-size: 20px; font-weight: 700; }
.step-card p { color: var(--text-2); font-size: 16px; line-height: 1.45; margin-bottom: 14px; }
.step-card .btn { margin-top: auto; }
@media (max-width: 1080px) { .step-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .step-grid { grid-template-columns: 1fr; } .step-card { min-height: 0; } }

.cta-band { border: 1.28px solid var(--line); border-radius: 36px; padding: 80px 24px; text-align: center; display: grid; gap: 24px; justify-items: center; position: relative; overflow: hidden; isolation: isolate; }
.cta-band::before { content: ""; position: absolute; inset: -40% 10% auto 10%; height: 90%; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 20%, transparent), transparent); z-index: -1; }
@media (max-width: 720px) { .cta-band { padding: 56px 20px; border-radius: 28px; } }

/* How it works */
.how-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; }
.how-side { position: sticky; top: calc(var(--nav-h) + 32px); display: grid; gap: 20px; }
.tl { display: grid; gap: 16px; counter-reset: s; }
.tl-item { border: 1.28px solid var(--line); border-radius: 25px; padding: 28px; display: grid; grid-template-columns: 56px 1fr; gap: 20px; transition: border-color .2s; }
.tl-item:hover { border-color: var(--text-4); }
.tl-n { width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: #000; display: grid; place-items: center; font-weight: 700; font-size: 20px; }
.tl-item h3 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.tl-item p { color: var(--text-2); }
.tl-item ul { margin-top: 14px; display: grid; gap: 8px; }
.tl-item li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--text-2); }
.tl-item li .icon { color: var(--up); margin-top: 2px; width: 18px; height: 18px; }
.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 16px; align-items: center; }
.flow .box { border: 1.28px solid var(--line); border-radius: 25px; padding: 24px; display: grid; gap: 6px; text-align: center; }
.flow .box b { font-size: 28px; letter-spacing: -.02em; }
.flow .box.hot { background: var(--accent); color: #000; border-color: var(--accent); } .flow .box.hot span { color: #000; opacity: .7; }
.flow .arr { color: var(--text-3); }
@media (max-width: 899px) { .how-grid { grid-template-columns: 1fr; gap: 32px; } .how-side { position: static; } .flow { grid-template-columns: 1fr; } .flow .arr { transform: rotate(90deg); justify-self: center; } }
@media (max-width: 520px) { .tl-item { grid-template-columns: 1fr; padding: 22px; } .tl-n { width: 44px; height: 44px; font-size: 17px; } }

.prose { max-width: 720px; margin: 0 auto; }
.prose h2 { font-size: 28px; font-weight: 700; margin: 56px 0 16px; letter-spacing: -.015em; scroll-margin-top: 96px; }
.prose h3 { font-size: 18px; margin: 28px 0 8px; }
.prose p, .prose li { color: var(--text-2); line-height: 1.7; margin-bottom: 14px; }
.prose ul { list-style: disc; padding-left: 22px; }

/* ---------- Auth ---------- */
.auth { display: grid; grid-template-columns: minmax(380px, 42%) 1fr; min-height: 100dvh; }
.auth-brand { background: #121212; color: #fff; padding: 32px 48px; display: flex; flex-direction: column; justify-content: space-between; position: sticky; top: 0; height: 100dvh; overflow: hidden; --text: #fff; --text-3: #909090; --line: #383838; --fill: #262626; --text-2: #b3b3b3; --text-4: #5b5b5b; --line-soft: #242424; --surface-2: #1a1a1a; }
.auth-brand::before { content: ""; position: absolute; inset: auto -30% -25% -30%; height: 70%; background: radial-gradient(closest-side, rgba(188,255,47,.14), transparent); pointer-events: none; }
.auth-brand .display { font-size: 48px; font-weight: 600; line-height: 1.25; max-width: 440px; position: relative; }
.auth-feed { display: grid; gap: 10px; position: relative; }
.feed-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: #1a1a1a; font-size: 14px; animation: toast-in .5s var(--ease) both; }
.feed-item .tile { width: 34px; height: 34px; border-radius: 10px; background: rgba(188,255,47,.12); color: #bcff2f; }
.feed-item b { margin-left: auto; color: #25a750; font-variant-numeric: tabular-nums; }
.auth-main { display: flex; flex-direction: column; min-height: 100dvh; padding: 24px 24px calc(24px + var(--safe-b)); }
.auth-top { display: flex; align-items: center; justify-content: space-between; }
.auth-center { flex: 1; display: grid; place-items: center; padding: 32px 0; }
.auth-card { width: 100%; max-width: 440px; }
.auth-view { animation: view-in .4s var(--ease) both; }
@keyframes view-in { from { opacity: 0; transform: translateY(12px); } }
.auth-title { font-size: 36px; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
.auth-sub { color: var(--text-2); margin-top: 12px; font-size: 16px; }
.auth-form { margin-top: 32px; display: grid; gap: 20px; }
.email-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--fill); border-radius: var(--r-pill); padding: 6px 6px 6px 14px; font-weight: 600; font-size: 14px; max-width: 100%; }
.email-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-legal { font-size: 13px; color: var(--text-3); line-height: 1.5; text-align: center; margin-top: 8px; }
.auth-legal a { text-decoration: underline; text-underline-offset: 2px; color: var(--text-2); }
.resend { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--text-3); }
.success-ring { width: 88px; height: 88px; margin-bottom: 24px; }
.success-ring circle { fill: var(--accent); animation: pop .5s var(--ease) both; transform-origin: center; }
.success-ring path { stroke: #000; stroke-width: 4; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .5s .35s var(--ease) forwards; }
.demo-note { margin-top: 32px; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--line); font-size: 12px; color: var(--text-3); line-height: 1.6; }
.demo-note code { font-family: var(--mono); color: var(--text); background: var(--fill); padding: 1px 6px; border-radius: 4px; }
@media (max-width: 899px) { .auth { grid-template-columns: 1fr; } .auth-brand { display: none; } .auth-title { font-size: 30px; } }

/* ---------- Dashboard shell ---------- */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100dvh; }
.sidebar { position: sticky; top: 0; height: 100dvh; border-right: 1px solid var(--line-soft); padding: 20px 16px; display: flex; flex-direction: column; gap: 28px; }
.side-top { padding: 4px 10px; }
.side-nav { display: grid; gap: 4px; }
.side-nav a { height: 46px; display: flex; align-items: center; gap: 14px; padding: 0 14px; border-radius: 14px; color: var(--text-2); font-weight: 600; font-size: 15px; transition: background var(--dur-1), color var(--dur-1); }
.side-nav a:hover { background: var(--fill); color: var(--text); }
.side-nav a.active { background: var(--fill); color: var(--text); }
.side-nav a.active .icon { color: var(--accent); }
:root[data-theme="light"] .side-nav a.active .icon { color: var(--text); }
.side-bottom { margin-top: auto; display: grid; gap: 12px; }
.side-balance { background: var(--surface); border-radius: 16px; padding: 16px; display: grid; gap: 2px; transition: background .2s; }
.side-balance:hover { background: var(--fill); }
.side-balance strong { font-size: 24px; letter-spacing: -.02em; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 12px 4px 0; border-top: 1px solid var(--line-soft); }
.side-user .avatar { width: 34px; height: 34px; font-size: 13px; }
.app-col { min-width: 0; display: flex; flex-direction: column; }
.app-main { padding: 36px 40px 80px; width: 100%; max-width: 1180px; }
.topbar { position: sticky; top: 0; z-index: var(--z-nav); height: calc(56px + var(--safe-t)); padding: var(--safe-t) 16px 0; display: none; align-items: center; justify-content: space-between; background: color-mix(in srgb, var(--bg) 86%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line-soft); }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-nav); height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b); display: none; grid-template-columns: repeat(5, 1fr); background: color-mix(in srgb, var(--bg) 90%, transparent); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border-top: 1px solid var(--line-soft); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--text-3); -webkit-tap-highlight-color: transparent; }
.tabbar a.active { color: var(--text); }
.tabbar a.active .icon { color: var(--accent); } :root[data-theme="light"] .tabbar a.active .icon { color: var(--text); }
.tabbar .tab-create span { width: 52px; height: 52px; border-radius: 50%; background: var(--cta-bg); color: var(--cta-ink); display: grid; place-items: center; transform: translateY(-12px); box-shadow: 0 0 0 5px var(--bg), 0 8px 20px rgba(0,0,0,.35); transition: transform var(--dur-1); }
.tabbar .tab-create:active span { transform: translateY(-12px) scale(.94); }
@media (max-width: 899px) {
  .app { grid-template-columns: 1fr; }
  .topbar { display: flex; }
  .tabbar { display: grid; }
  .app-main { padding: 20px 16px calc(var(--tab-h) + 40px + var(--safe-b)); }
}
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.page-head h1 { font-size: 32px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.page-head p { color: var(--text-2); margin-top: 6px; }
@media (max-width: 720px) { .page-head h1 { font-size: 26px; } .page-head { margin-bottom: 20px; } }

/* ---------- My Sites ---------- */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 28px; }
.stat { background: var(--surface); border-radius: var(--r-md); padding: 16px 20px; display: grid; gap: 4px; }
.stat .v { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
@media (max-width: 560px) { .stat-row { grid-template-columns: 1fr 1fr 1fr; gap: 8px; } .stat { padding: 12px; } .stat .v { font-size: 20px; } }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.sites-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
@media (max-width: 400px) { .sites-grid { grid-template-columns: 1fr; } }
.site-card { --c: var(--accent); background: var(--surface); border-radius: var(--r-lg); display: flex; flex-direction: column; transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2); box-shadow: inset 0 0 0 1px transparent; }
.site-card:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px var(--line); }
.site-thumb { border-radius: var(--r-lg) var(--r-lg) 0 0; height: 148px; background: linear-gradient(160deg, color-mix(in srgb, var(--c) 22%, var(--surface)), var(--surface) 75%); padding: 18px 18px 0; position: relative; overflow: hidden; }
.site-thumb .win { background: var(--bg); border-radius: 12px 12px 0 0; height: 100%; padding: 10px 12px; display: grid; gap: 7px; align-content: start; box-shadow: 0 -8px 30px rgba(0,0,0,.2); }
.win .bar { display: flex; align-items: center; gap: 6px; } .win .bar i { width: 12px; height: 12px; border-radius: 4px; background: var(--c); } .win .bar b { height: 5px; width: 40px; border-radius: 4px; background: var(--fill-2); } .win .bar em { margin-left: auto; height: 10px; width: 28px; border-radius: 6px; background: var(--c); }
.win .ln { height: 8px; border-radius: 4px; background: var(--fill-2); } .win .ln.s { width: 55%; } .win .ln.h { height: 12px; width: 78%; background: var(--text); opacity: .9; }
.win .cells { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 2px; } .win .cells i { height: 22px; border-radius: 6px; background: var(--fill); }
.site-thumb .badge { position: absolute; top: 12px; right: 12px; background: var(--bg); }
.site-body { padding: 16px 18px 18px; display: grid; gap: 12px; flex: 1; align-content: start; }
.site-name { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.site-domain { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-3); max-width: 100%; }
.site-domain:hover { color: var(--text); } .site-domain span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.site-metrics b { display: block; font-size: 17px; font-weight: 700; } .site-metrics span { font-size: 12px; color: var(--text-3); }
.site-new { border: 1.28px dashed var(--line); border-radius: var(--r-lg); min-height: 300px; display: grid; place-items: center; align-content: center; gap: 12px; text-align: center; padding: 24px; color: var(--text-2); transition: border-color .2s, background .2s; }
.site-new:hover { border-color: var(--text); background: var(--surface); color: var(--text); }
.site-new .tile { width: 56px; height: 56px; border-radius: 50%; background: var(--cta-bg); color: var(--cta-ink); }
.sk-card { background: var(--surface); border-radius: var(--r-lg); overflow: hidden; } .sk-card .skeleton { border-radius: 0; height: 148px; } .sk-card > div:last-child { padding: 18px; display: grid; gap: 12px; }

/* ---------- Create Site ---------- */
.create { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 56px; align-items: start; }
.create-form { display: grid; gap: 28px; }
.step-panel { display: grid; gap: 24px; animation: view-in .35s var(--ease) both; }
.step-panel h2 { font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; }
.form-actions { display: flex; gap: 12px; padding-top: 8px; }
.form-actions .btn { min-width: 120px; } .form-actions .btn-primary { flex: 1; }
.autosave { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); }
.autosave .icon { width: 14px; height: 14px; color: var(--up); }
.preview-col { position: sticky; top: 24px; display: grid; gap: 14px; }
.pv-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pv-stage { background: var(--surface); border-radius: var(--r-xl); padding: 24px; display: grid; place-items: center; min-height: 560px; }
.pv { --pv-primary: #bcff2f; --pv-ink: #000; --pv-r: 12px; --pv-font: var(--font); width: 100%; background: var(--pv-bg); color: var(--pv-text); border-radius: 16px; overflow: hidden; font-family: var(--pv-font); box-shadow: 0 20px 60px -20px rgba(0,0,0,.5), 0 0 0 1px var(--pv-line); transition: width .35s var(--ease), border-radius .3s; }
.pv[data-mode="dark"] { --pv-bg: #0b0b0b; --pv-surface: #161616; --pv-text: #fff; --pv-sub: #9a9a9a; --pv-line: #2a2a2a; }
.pv[data-mode="light"] { --pv-bg: #fff; --pv-surface: #f3f3f3; --pv-text: #000; --pv-sub: #6b6b6b; --pv-line: #e3e3e3; }
.pv[data-device="mobile"] { width: 300px; border-radius: 32px; }
.pv-bar { height: 34px; display: flex; align-items: center; gap: 6px; padding: 0 12px; background: var(--pv-surface); } .pv-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--pv-line); } .pv-bar span { margin-left: 8px; font-size: 10px; color: var(--pv-sub); background: var(--pv-bg); border-radius: 99px; padding: 3px 10px; max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-nav { display: flex; align-items: center; gap: 10px; padding: 14px 18px; }
.pv-logo { width: 28px; height: 28px; border-radius: calc(var(--pv-r) * .6); background: var(--pv-primary); color: var(--pv-ink); display: grid; place-items: center; font-weight: 800; font-size: 13px; overflow: hidden; flex: none; } .pv-logo img { width: 100%; height: 100%; object-fit: cover; }
.pv-nav b { font-size: 14px; letter-spacing: -.01em; }
.pv-nav .links { margin-left: auto; display: flex; gap: 14px; font-size: 11px; color: var(--pv-sub); }
.pv-btn { background: var(--pv-primary); color: var(--pv-ink); font-weight: 700; font-size: 11px; height: 30px; padding: 0 14px; border-radius: calc(var(--pv-r) * 2.2); display: inline-grid; place-items: center; transition: background .2s, border-radius .2s; }
.pv-hero { padding: 24px 18px 20px; display: grid; gap: 10px; }
.pv-hero h5 { margin: 0; font-size: 26px; line-height: 1.15; letter-spacing: -.02em; font-weight: 800; } .pv-hero h5 em { font-style: normal; color: var(--pv-primary); }
.pv-hero p { margin: 0; font-size: 12px; color: var(--pv-sub); max-width: 320px; line-height: 1.5; }
.pv-hero .pv-btn { height: 38px; padding: 0 20px; font-size: 12px; justify-self: start; margin-top: 6px; }
.pv-list { padding: 0 18px 14px; display: grid; gap: 8px; }
.pv-row { display: flex; align-items: center; gap: 10px; background: var(--pv-surface); border-radius: var(--pv-r); padding: 10px 12px; font-size: 12px; }
.pv-row .sym { width: 24px; height: 24px; border-radius: 50%; background: var(--pv-line); flex: none; } .pv-row b { font-size: 12px; } .pv-row small { color: var(--pv-sub); font-size: 10px; display: block; }
.pv-row .p { margin-left: auto; text-align: right; font-variant-numeric: tabular-nums; } .pv-row .p span { color: #25a750; font-size: 10px; font-weight: 700; } .pv-row .p span.d { color: #ec5b82; }
.pv-foot { padding: 14px 18px 18px; border-top: 1px solid var(--pv-line); display: flex; align-items: center; gap: 10px; font-size: 10px; color: var(--pv-sub); flex-wrap: wrap; }
.pv-foot .soc { display: flex; gap: 8px; margin-left: auto; } .pv-foot .soc i { width: 24px; height: 24px; border-radius: 50%; background: var(--pv-surface); display: grid; place-items: center; color: var(--pv-text); } .pv-foot .soc svg { width: 12px; height: 12px; }
.pv[data-device="mobile"] .links { display: none; }
.pv-fab { display: none; }
@media (max-width: 1100px) { .create { grid-template-columns: 1fr; gap: 24px; } .preview-col.desk { display: none; } .pv-fab { display: inline-flex; position: fixed; right: 16px; bottom: calc(var(--tab-h) + 16px + var(--safe-b)); z-index: 40; box-shadow: 0 8px 28px rgba(0,0,0,.4); } .pv-stage { min-height: 0; padding: 16px; border-radius: 0; background: transparent; } }
@media (min-width: 900px) and (max-width: 1100px) { .pv-fab { bottom: 24px; } }

.upload { border: 1.5px dashed var(--line); border-radius: var(--r-lg); padding: 28px; display: grid; justify-items: center; gap: 8px; text-align: center; cursor: pointer; transition: border-color .2s, background .2s; }
.upload:hover, .upload.drag { border-color: var(--text); background: var(--surface); }
.upload .tile { border-radius: 50%; }
.upload-prev { display: flex; align-items: center; gap: 16px; padding: 14px; background: var(--fill); border-radius: var(--r-md); }
.upload-prev img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; background: var(--fill-2); }
.swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.opt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.opt-card { border: 1.28px solid var(--line); border-radius: var(--r-md); padding: 14px; text-align: left; display: grid; gap: 8px; transition: border-color .15s, background .15s; }
.opt-card:hover { border-color: var(--text-4); } .opt-card[aria-checked="true"] { border-color: var(--text); background: var(--surface); }
.opt-card .demo { height: 36px; background: var(--fill-2); } .opt-card b { font-size: 14px; } .opt-card span.s { font-size: 12px; color: var(--text-3); }
.social-grid { display: grid; gap: 12px; }
.review-card { background: var(--surface); border-radius: var(--r-md); padding: 4px 20px; }
.review-card header { display: flex; justify-content: space-between; align-items: center; padding: 14px 0 6px; font-weight: 700; }
.deploy-steps { display: grid; gap: 14px; margin-top: 20px; }
.ds-step { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--text-3); }
.ds-step .ic { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); flex: none; }
.ds-step.run { color: var(--text); } .ds-step.done { color: var(--text-2); } .ds-step.done .ic { background: var(--up); color: #fff; } .ds-step .ic .icon { width: 14px; height: 14px; stroke-width: 2.5; }
@media (max-width: 560px) { .opt-grid { grid-template-columns: 1fr; } .form-actions { position: sticky; bottom: calc(var(--tab-h) + var(--safe-b)); margin: 0 -16px; padding: 12px 16px; background: var(--bg); border-top: 1px solid var(--line-soft); z-index: 5; } .form-actions .btn { min-width: 0; } }

/* ---------- Commissions ---------- */
.bal-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.bal { background: var(--surface); border-radius: var(--r-lg); padding: 22px 24px; display: grid; gap: 6px; align-content: start; }
.bal .v { font-size: 36px; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
.bal.hero-bal { background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 14%, var(--surface)), var(--surface) 70%); }
.bal .lbl { display: flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 14px; }
.bal .lbl .icon { width: 16px; height: 16px; }
.bal .btn { margin-top: 12px; justify-self: start; }
@media (max-width: 899px) { .bal-grid { grid-template-columns: 1fr 1fr; } .bal.hero-bal { grid-column: 1 / -1; } }
@media (max-width: 480px) { .bal .v { font-size: 28px; } .bal { padding: 18px; } }
.chart-card { background: var(--surface); border-radius: var(--r-lg); padding: 24px; margin-bottom: 12px; }
.chart-wrap { position: relative; margin-top: 20px; }
.chart-svg { width: 100%; height: 280px; overflow: visible; touch-action: pan-y; }
.chart-tip { position: absolute; pointer-events: none; background: var(--surface-2); box-shadow: var(--shadow-pop); border-radius: 12px; padding: 10px 14px; font-size: 13px; transform: translate(-50%, -110%); opacity: 0; transition: opacity .12s; white-space: nowrap; z-index: 3; }
.chart-tip b { display: block; font-size: 16px; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) { .chart-svg { height: 200px; } .chart-card { padding: 18px; } }
.tx-card { background: var(--surface); border-radius: var(--r-lg); padding: 8px 24px 16px; }
.tx-card .tabs { margin: 8px 0 0; }
.tx-head, .tx-row { display: grid; grid-template-columns: 130px minmax(0, 1.6fr) minmax(0, 1fr) 120px 120px; gap: 16px; align-items: center; }
.tx-head { padding: 16px 0 10px; font-size: 12px; color: var(--text-3); } .tx-head .r, .tx-row .r { text-align: right; justify-self: end; }
.tx-row { padding: 14px 0; border-top: 1px solid var(--line-soft); font-size: 14px; min-height: 64px; animation: view-in .3s var(--ease) both; }
.tx-row .who { display: flex; align-items: center; gap: 12px; min-width: 0; } .tx-row .who > div { min-width: 0; } .tx-row .who b { display: block; font-weight: 600; } .tx-row .who small { color: var(--text-3); font-size: 12px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-row .amt { font-weight: 700; font-variant-numeric: tabular-nums; }
.tx-ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--up-soft); color: var(--up); flex: none; } .tx-ic.w { background: var(--fill); color: var(--text); } .tx-ic .icon { width: 18px; height: 18px; }
@media (max-width: 720px) {
  .tx-card { padding: 4px 16px 12px; } .tx-head { display: none; }
  .tx-row { grid-template-columns: 1fr auto; grid-template-areas: "who amt" "date st"; gap: 6px 12px; padding: 14px 0; }
  .tx-row .c-date { grid-area: date; font-size: 12px; color: var(--text-3); } .tx-row .who { grid-area: who; } .tx-row .c-site { display: none; } .tx-row .amt { grid-area: amt; } .tx-row .c-st { grid-area: st; justify-self: end; }
}
.method { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1.28px solid var(--line); border-radius: var(--r-md); width: 100%; text-align: left; transition: border-color .15s, background .15s; }
.method[aria-checked="true"] { border-color: var(--text); background: var(--fill); }
.method b { display: block; font-size: 15px; } .method small { color: var(--text-3); font-size: 13px; }
.method .radio { margin-left: auto; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--text-4); display: grid; place-items: center; flex: none; }
.method[aria-checked="true"] .radio { border-color: var(--cta-bg); background: var(--cta-bg); box-shadow: inset 0 0 0 4px var(--fill); }

/* ---------- Domains / Account ---------- */
.domain-row { display: grid; grid-template-columns: minmax(0, 1.4fr) auto auto auto; gap: 20px; align-items: center; background: var(--surface); border-radius: var(--r-lg); padding: 18px 20px; }
.domain-row + .domain-row { margin-top: 10px; }
.domain-row .h { font-weight: 700; font-size: 17px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.status-col { display: grid; gap: 4px; justify-items: start; } .status-col small { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
@media (max-width: 899px) { .domain-row { grid-template-columns: 1fr auto; } .domain-row .status-col { grid-row: 2; } .domain-row .menu-wrap { grid-row: 1; grid-column: 2; } }
.dns { width: 100%; border-collapse: collapse; font-size: 13px; } .dns th { text-align: left; color: var(--text-3); font-weight: 500; padding: 8px 8px 8px 0; } .dns td { padding: 10px 8px 10px 0; border-top: 1px solid var(--line-soft); font-family: var(--mono); word-break: break-all; }
.dom-result { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.set-card { background: var(--surface); border-radius: var(--r-lg); padding: 24px; display: grid; gap: 16px; }
.set-card + .set-card { margin-top: 12px; }
.danger-zone { border: 1.28px solid color-mix(in srgb, var(--down) 45%, transparent); background: transparent; }

/* ---------- Design system page ---------- */
.ds-sec { padding: 56px 0; border-top: 1px solid var(--line-soft); }
.ds-sec > h2 { font-size: 28px; margin-bottom: 8px; letter-spacing: -.02em; } .ds-sec > p { color: var(--text-2); margin-bottom: 32px; max-width: 640px; }
.ds-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.ds-sw { border-radius: 16px; overflow: hidden; background: var(--surface); } .ds-sw i { display: block; height: 72px; box-shadow: inset 0 0 0 1px var(--line); } .ds-sw div { padding: 10px 12px; font-size: 12px; } .ds-sw b { display: block; font-size: 13px; } .ds-sw code { color: var(--text-3); font-family: var(--mono); }
.demo-box { background: var(--surface); border-radius: var(--r-lg); padding: 24px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.spec-row { display: grid; grid-template-columns: 120px 1fr; gap: 24px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line-soft); } .spec-row code { font-family: var(--mono); font-size: 12px; color: var(--text-3); }
@media (max-width: 560px) { .spec-row { grid-template-columns: 1fr; gap: 4px; } }

/* auth: compact brand shown only when the brand panel is hidden */
.auth-top .mob-brand { display: none; }
@media (max-width: 899px) { .auth-top .mob-brand { display: inline-flex; } }
/* Rules the theme sample ships in an inline \3c style> block (theme-bsite/index.html:155-158), verbatim.
   They are part of the approved look, not a deviation (docs/overhaul/01-design-system.md, section 4). */
.step-card .art .icon { width: 64px; height: 64px; stroke-width: 1.2; }
.step-card .art { border: 1.28px solid var(--line); border-radius: 50%; background: var(--surface); }
/* ==========================================================================
   Sanctioned deviations from the theme sample. Nothing else may be added here.
   Each block carries the id of its row in docs/overhaul/01-design-system.md,
   section 4; `npm run theme:check` rejects any rule without a listed id.
   ========================================================================== */

/* O1 — Status badges are plain rectangular labels: small radius, no dot, no animation.
   Why: the owner's brief forbids pill badges with (pulsing) dots everywhere, admin panel included.
   Height, 12px/600 type and the colour variants stay as the theme defines them; .no-dot is now a no-op. */
.badge { border-radius: var(--r-xs); padding: 0 var(--s-2); gap: var(--s-1); }
.badge::before, .badge-deploying::before, .badge-processing::before { content: none; animation: none; }

/* O2 — On desktop the toast host of a page without a tab bar keeps its top anchor only.
   Why: sample defect. `.toasts.no-tabbar { bottom: … }` sits outside its media query, so at 900px and
   wider the host is stretched to the full viewport height. */
@media (min-width: 900px) { .toasts.no-tabbar { bottom: auto; } }

/* O3 — The raised Create button keeps its own ink colour, also when it is the active tab, in both themes.
   Why: sample defect. The active-tab icon colour (lime in dark, black in light) leaks into the plus sign
   and makes it unreadable on the Create page. The light-theme selector is needed to outrank
   `:root[data-theme="light"] .tabbar a.active .icon`. */
.tabbar .tab-create .icon,
.tabbar .tab-create.active .icon,
:root[data-theme="light"] .tabbar .tab-create.active .icon { color: var(--cta-ink); }

/* O4 — Loading spinners of the accent and danger-ghost buttons use a colour that is visible on them.
   Why: sample defect. Both variants inherit the primary button's spinner colour. */
.btn-accent.is-loading::after { border-color: var(--accent-ink); border-right-color: transparent; }
.btn-danger-ghost.is-loading::after { border-color: var(--down); border-right-color: transparent; }

/* O5 — In the light theme the select chevron is drawn with the light --text-3 value.
   Why: sample defect. The chevron is a data URI with the dark value hard-coded; a data URI cannot read a
   custom property, so the light value has to be written out. */
:root[data-theme="light"] .select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236e6e6e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); }

/* O6 — The success tick has a gap long enough to hide it completely before it is drawn.
   Why: sample defect. With `stroke-dasharray: 40` a stub of the tick shows before the draw starts. The
   finished tick is unchanged. */
.success-ring path { stroke-dasharray: 40 100; }

/* O7 — With "reduce motion" on, decorative keyframe animations are off and their end states are shown.
   Why: accessibility. The sample only zeroes the --dur-* transitions. Spinners, the indeterminate
   progress bar and the toast countdown keep running; nothing changes for users without the preference. */
@media (prefers-reduced-motion: reduce) {
  .skeleton, .float-card, .otp.is-error input, .success-ring circle, .success-ring path,
  .toast, .toast.out, .feed-item, .auth-view, .step-panel, .tx-row { animation: none; }
  .success-ring path { stroke-dashoffset: 0; }
  .toast.out { opacity: 0; }
}

/* O8 — Cards keep their content inside their column.
   Why: sample defect. .side-bottom, .side-balance, .set-card, .bal and .site-body are grids with an implicit auto
   column, and .bal and .site-card sit in 1fr tracks (.bal-grid, .sites-grid) whose minimum is their content's width,
   so one long unbreakable line (an e-mail address, a domain, a large amount) widened the card past its column: out
   of the 248px sidebar, and on phones the Account, Commissions and My sites pages scrolled sideways. */
.side-bottom, .side-balance, .set-card, .bal, .site-body { grid-template-columns: minmax(0, 1fr); }
.bal, .site-card { min-width: 0; }

/* O9 — The round icon button never shrinks.
   Why: sample defect. .icon-btn has a fixed size but no flex: none (which .avatar, .tile, .switch and .check input
   have), so next to long text in a row it was squeezed: the sidebar's theme toggle beside a long e-mail address
   was 8px wide. */
.icon-btn { flex: none; }
/* ==========================================================================
   Components the theme sample does not have (docs/overhaul/01-design-system.md, section 5).

   Before adding a rule:
   1. Reuse a theme class if one fits (.seg, .tabs, .chip, .method, .opt-card, .kv, .list-row,
      .tx-head / .tx-row, .dns, .dom-result, .set-card, .banner, .ds-step, .menu, .drawer, .modal).
      A new class is the last resort, and it never restyles a class the theme defines.
   2. Colours only through tokens. No hex, rgb or hsl literals.
   3. Type sizes only from the theme's set (11, 12, 13, 14, 15, 16, 17, 18, 20, 22, 24, 26, 28, 32,
      36, 44px), weights 400/500/600/700, font-family only var(--font), var(--mono) or var(--pv-font).
   4. Spacing from the 4px grid plus the theme's literals (6, 10, 14, 18, 22, 28px). Radii from the
      tokens, plus 25px for marketing-style outlined cards.
   5. Motion only with var(--dur-*) and var(--ease). Loading is .skeleton, .spinner or .progress.
   6. Status is always a .badge. No dots, no pulses, no pill-shaped status labels.
   7. Start each block with a comment: what it is, which page uses it, which theme classes it was
      modelled on.

   `npm run theme:check` enforces 1 (no theme class restyled), 2, the font-family part of 3 and 6.
   ========================================================================== */

/* ==========================================================================
   DataTable: the list of records on the admin panel's pages (users, sites, commissions, withdrawals,
   domains, payments, bots). Modelled on .tx-card, .tx-head and .tx-row (the grid, the 12px muted header,
   the hairline between rows, the stacked layout at 720px; 14px cells like .tx-row) and, for the secondary
   line under a value, on `.tx-row .who small`. The column tracks
   come from --dt-cols, set per table by ui/DataTable.tsx. Rows run edge to edge of the card so that the
   hover fill (--fill, as on the theme's hovered rows) has room around the text.
   ========================================================================== */
.dt { background: var(--surface); border-radius: var(--r-lg); padding: 8px 24px 16px; }
.dt-head, .dt-row { display: grid; grid-template-columns: var(--dt-cols); gap: 16px; align-items: center; }
.dt-head { padding: 16px 0 10px; font-size: 12px; color: var(--text-3); }
.dt-row { margin-inline: -24px; padding: 14px 24px; border-top: 1px solid var(--line-soft); font-size: 14px; min-height: 64px; transition: background var(--dur-1); }
.dt-row:hover { background: var(--fill); }
.dt-row-idle:hover { background: transparent; }
.dt-cell { min-width: 0; }
.dt-cell small { display: block; font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dt-end { text-align: right; justify-self: end; }
@media (max-width: 720px) {
  .dt { padding: 4px 16px 12px; }
  .dt-head { display: none; }
  .dt-row { grid-template-columns: 1fr; gap: 6px; margin-inline: -16px; padding: 14px 16px; min-height: 0; }
  .dt-cell { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .dt-cell[data-label]::before { content: attr(data-label); font-size: 12px; color: var(--text-3); flex: none; }
  .dt-cell:not([data-label]) { justify-content: flex-start; }
  .dt-cell.dt-end:not([data-label]) { justify-content: flex-end; }
  .dt-end { justify-self: stretch; }
}

/* ==========================================================================
   Toolbar search box: the search field of ui/Toolbar.tsx, used above every DataTable. It is the theme's
   .input-wrap; this only lets it share the row with the filter chips (.toolbar, .chips) and wrap on phones.
   ========================================================================== */
.toolbar-search { flex: 1 1 240px; max-width: 360px; }

/* ==========================================================================
   Public page offsets: the lime example box's retry control and the first section of a standalone page.
   Used by pages/public (WorkedExample.tsx, sections/placement.ts). Modelled on .link-btn, .flow .box.hot
   and .section-sm.
   .link-btn takes --text, which is white in the dark theme and unreadable on the lime box: .link-on-accent, added to it, takes the
   box's ink instead. .page-top gives a section that opens a page the top padding of the sample's own
   pages (.section-sm: 80px, 48px on phones), so every public page starts at the same offset.
   ========================================================================== */
.link-on-accent { color: var(--accent-ink); }
.link-on-accent:focus-visible { outline-color: var(--accent-ink); }
.page-top { padding-top: var(--s-20); }
@media (max-width: 720px) { .page-top { padding-top: 48px; } }

/* ==========================================================================
   Earnings row of the commissions page: Today, This month and Last month side by side. Used by pages/commissions
   (features/commissions/EarningsCards.tsx). Modelled on .bal-grid: the theme's first column is 1.4 times wider because
   it holds the hero card; this row has no hero, so its three cards are equal. Below 900px the sample's two columns are
   kept and the third card (.bal-grid-last) spans both, as the hero card of the first row does.
   ========================================================================== */
.bal-grid-even { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 899px) { .bal-grid-even { grid-template-columns: 1fr 1fr; } .bal-grid-last { grid-column: 1 / -1; } }

/* BrandName: the second word of the logo lettering (every shell). Lime on the dark canvas and on the auth
   brand panel; on the light canvas lime is unreadable, so it is mixed towards the text colour. */
.brand-accent { color: var(--accent); }
html[data-theme="light"] .brand-accent { color: color-mix(in srgb, var(--accent) 42%, var(--text)); }
html[data-theme="light"] .auth-brand .brand-accent { color: var(--accent); }

/* ==========================================================================
   Tooltip: a short explanation that opens over a control while the pointer rests on it or it has focus (ui/Tooltip.tsx).
   Used by My Sites (the Traders figures). Modelled on .menu (the same surface, radius, shadow and the opacity-and-lift
   transition) and .small (12px muted type). It never takes pointer events itself, so it cannot trap the pointer.
   ========================================================================== */
.tip-wrap { position: relative; display: inline-flex; }
.tip {
  position: absolute; bottom: calc(100% + 8px); left: 50%; width: max-content; max-width: 240px; z-index: var(--z-menu);
  background: var(--surface-2); color: var(--text-2); border-radius: var(--r-sm); padding: 8px 12px; box-shadow: var(--shadow-pop);
  font-size: 12px; font-weight: 500; line-height: 1.45; text-align: left; white-space: normal;
  opacity: 0; transform: translate(-50%, 4px); pointer-events: none;
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
}
.tip.tip-bottom { bottom: auto; top: calc(100% + 8px); transform: translate(-50%, -4px); }
.tip.tip-open { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 560px) { .tip { left: auto; right: -8px; transform: translateY(4px); } .tip.tip-bottom { transform: translateY(-4px); } .tip.tip-open { transform: none; } }

/* ==========================================================================
   My Sites card mock-up: the picture of a customer's own site inside .site-thumb (features/sites/SiteMock.tsx). The sample draws a window
   from one colour; the brief asks for the owner's real colours, corner style, font, logo and name, so the window is the preview's own
   .pv (its dark and light modes, --pv-primary, --pv-ink, --pv-r and --pv-font are all the data of the site). .site-mock only trims the
   preview to the card's 130px window; .mk-* are its placeholder bars, modelled on .win .ln and .pv-row.
   ========================================================================== */
.site-thumb .site-mock { height: 100%; width: 100%; border-radius: 12px 12px 0 0; box-shadow: none; display: grid; gap: 8px; align-content: start; }
.site-mock[data-corners="sharp"] { --pv-r: 2px; }
.site-mock[data-corners="pill"] { --pv-r: 20px; }
.mk-nav { display: flex; align-items: center; gap: 10px; padding: 10px 12px 0; min-width: 0; }
.mk-nav b { min-width: 0; font-size: 14px; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-btn { margin-left: auto; flex: none; height: 18px; width: 40px; border-radius: calc(var(--pv-r) * 2.2); background: var(--pv-primary); }
.site-mock .mk-hero { display: grid; gap: 6px; padding: 0 12px; }
.mk-bar { height: 10px; width: 70%; border-radius: var(--pv-r); background: var(--pv-text); opacity: .9; }
.mk-bar.mk-sub { height: 6px; width: 45%; background: var(--pv-secondary, var(--pv-line)); opacity: 1; }
.site-mock .mk-rows { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0 12px; }
.mk-rows i { height: 22px; border-radius: var(--pv-r); background: var(--pv-surface); }

/* ==========================================================================
   Tooltip trigger and card notices of My Sites (features/sites). .tip-trigger is a text label that is also the control a tooltip
   explains: the label's own type with a small info icon after it (modelled on .small.muted and .icon). .site-note is the one line
   under a card's name for a state that needs a sentence (modelled on .small.muted).
   ========================================================================== */
.tip-trigger { display: inline-flex; align-items: center; gap: 4px; padding: 0; background: none; border: 0; font-size: inherit; font-weight: inherit; line-height: inherit; font-family: var(--font); color: inherit; cursor: help; border-radius: var(--r-xs); }
.tip-trigger svg { width: 14px; height: 14px; }
.site-notice { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.site-notice > span { flex: 1 1 200px; }

/* ==========================================================================
   Domain wallets of the Domains page (features/domains/WalletCards.tsx): the "KES wallet" and "USDT wallet" cards side by side. Modelled on
   .bal-grid and .bal: the theme's first column is wider because it holds a hero card; two wallets are equal. Below 560px they stack.
   ========================================================================== */
.wallet-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 560px) { .wallet-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   ColorPicker (ui/ColorPicker.tsx): the hex field's round button, the popover under the field and the picker inside it (saturation and
   brightness area, hue slider, presets). Used by the create-site wizard and the site editor. Modelled on .menu (the popover: surface, radius, shadow),
   .input-wrap (the field) and .swatch (the preset circles, reused as they are). The colours are data: the stylesheet only reads the custom
   properties the component sets from the hue (--cp-hue, --cp-white, --cp-black, --cp-rainbow, --cp-color); it holds no colour of its own.
   Dragging must never scroll the page, so the area and the slider take no touch gestures. The area is 160px high, 180px on touch screens.
   ========================================================================== */
.cp-wrap { display: block; }
.cp-trigger { width: 24px; height: 24px; flex: none; border-radius: 50%; background: var(--c, var(--fill-2)); border: 2px solid var(--bg); box-shadow: 0 0 0 1.5px var(--line); cursor: pointer; padding: 0; }
.cp-trigger:hover:not(:disabled) { box-shadow: 0 0 0 1.5px var(--text-4); }
.cp-trigger:disabled { cursor: not-allowed; opacity: .5; }
.cp-pop { position: absolute; left: 0; top: calc(100% + 6px); width: min(320px, 100%); min-width: 260px; z-index: var(--z-menu); background: var(--surface-2); border-radius: var(--r-md); padding: 14px; box-shadow: var(--shadow-pop); }
.cp-panel { display: grid; gap: 14px; }
.cp-area { position: relative; height: 160px; border-radius: var(--r-sm); cursor: crosshair; touch-action: none; user-select: none; background: linear-gradient(to top, var(--cp-black), transparent), linear-gradient(to right, var(--cp-white), var(--cp-hue)); }
.cp-touch .cp-area { height: 180px; }
.cp-hue { position: relative; height: 16px; border-radius: var(--r-pill); cursor: pointer; touch-action: none; user-select: none; background: linear-gradient(to right, var(--cp-rainbow)); }
.cp-thumb { position: absolute; width: 22px; height: 22px; border-radius: 50%; background: var(--cp-color); border: 3px solid var(--cp-white); box-shadow: 0 0 0 1.5px var(--cp-black); transform: translate(-50%, -50%); pointer-events: none; }
.cp-area .cp-thumb { left: var(--cp-x); top: var(--cp-y); }
.cp-hue .cp-thumb { left: var(--cp-hue-x); top: 50%; }
.cp-area:focus-visible, .cp-hue:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.cp-suggest { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cp-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--c); flex: none; box-shadow: 0 0 0 1px var(--line); }

/* ==========================================================================
   PreviewFrame (ui/PreviewFrame.tsx): the viewport inside the theme's .pv frame (below .pv-bar), where the real site template runs in an
   iframe. The iframe is created at the design size of the device and scaled down from its top-left corner; the viewport's height is the scaled
   height, set inline. Modelled on .pv (the frame), .skeleton (loading) and .small.muted (the message). .pv-bar-fav is the favicon in the
   frame's browser bar (05 6.1), 14px, left of the address.
   ========================================================================== */
.pv-viewport-wrap { display: grid; }
.pv-viewport { position: relative; overflow: hidden; width: 100%; background: var(--pv-bg); }
.pv-frame { position: absolute; top: 0; left: 0; border: 0; transform-origin: top left; background: var(--pv-bg); }
.pv-loading { position: absolute; inset: 0; display: grid; align-content: start; gap: 12px; padding: 18px; }
.pv-empty { display: grid; justify-items: center; align-content: center; gap: 12px; min-height: 240px; padding: 24px; text-align: center; }
.pv-viewport .pv-empty { position: absolute; inset: 0; }
.pv-bar-fav { width: 14px; height: 14px; border-radius: 3px; object-fit: cover; flex: none; }
.pv-subhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ==========================================================================
   Upload control states (ui/UploadField.tsx), on top of the theme's .upload and .upload-prev: a refused file marks the zone with the error colour;
   a disabled zone (the draft is not saved yet) is dimmed and takes no clicks; the stored picture keeps its shape (a logo is not cropped, the phone
   icon is a rounded-square mask).
   ========================================================================== */
.upload-invalid { border-color: var(--down); }
.upload-disabled { opacity: .55; cursor: not-allowed; }
.upload-thumb { width: 56px; height: 56px; flex: none; border-radius: 12px; background: var(--thumb) center / cover no-repeat, var(--fill-2); }
[data-shape="logo"] > .upload-thumb { background-size: contain; }
[data-shape="icon"] > .upload-thumb { border-radius: 14px; }
[data-shape="square"] > .upload-thumb { border-radius: 6px; }

/* ==========================================================================
   Create-site wizard (features/site-setup): the pieces the theme's .create page does not have. .field-row is two controls side by side (the "Colors for" and "Default mode" switches); .font-demo is the
   specimen line of a font card (the font family is set inline from the site kit's registry); .opt-card.static is a card that is not a button.
   .autosave-warn and .autosave-bad colour the autosave indicator when it could not save.
   ========================================================================== */
.field-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.font-demo { font-family: var(--pv-font); font-size: 22px; font-weight: 700; line-height: 1.2; }
.autosave-warn, .autosave-warn svg { color: var(--warn); }
.autosave-bad, .autosave-bad svg { color: var(--down); }
.deploy-copy { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--fill); border-radius: var(--r-md); padding: 12px 14px; margin-top: 12px; }
.deploy-copy code { font-family: var(--mono); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.deploy-dev { display: grid; gap: 10px; margin-top: 16px; }

/* ==========================================================================
   Wide modal (ui/Modal.tsx size="xl"): the full-size site preview of the create-site wizard, which needs the template's own 1280px design width.
   Modelled on .modal-lg (the theme's wider variant); on phones the theme's bottom-sheet rule at 640px wins, as for every modal.
   ========================================================================== */
.modal-xl { max-width: 1320px; width: calc(100vw - 48px); }
@media (max-width: 640px) { .modal-xl { width: auto; max-width: none; } }

/* ==========================================================================
   Site editor (features/site-editor): the pieces the wizard's .create page does not have. .tab-dot is the mark on a tab label that holds unsaved changes (05 5.6); it is
   a 6px circle in the warning colour with no animation and is never a status label. .ed-list and .ed-item are the lists of the document (perks, slides, reviews, the tab
   bar): modelled on .set-card (a surface with the 16px radius and a 16px grid) and .list-row (the hairline and the row layout). .ed-tab is one row of the tab-bar list:
   the drag handle, the name field, the up and down buttons and the Shown switch; .is-lifted marks the row held by the keyboard or the pointer, .is-hidden dims a hidden tab.
   ========================================================================== */
.tab-dot { display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-radius: 50%; background: var(--warn); vertical-align: middle; }
.ed-list { display: grid; gap: 12px; }
.ed-item { display: grid; gap: 14px; background: var(--surface); border-radius: var(--r-md); padding: 16px; }
.ed-item-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ed-tab { grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 12px; }
.ed-handle { width: 32px; height: 32px; cursor: grab; touch-action: none; }
.ed-handle:active { cursor: grabbing; }
.ed-tab.is-lifted { box-shadow: 0 0 0 2px var(--focus); }
.ed-name { min-width: 0; }
.ed-tab.is-hidden .ed-name { opacity: .6; }
@media (max-width: 560px) {
  .ed-tab { grid-template-columns: auto minmax(0, 1fr) auto; }
  .ed-tab .ed-shown { grid-column: 2 / -1; }
}

/* ==========================================================================
   Network icon (ui/NetworkIcon.tsx): the self-hosted logo of a USDT network, next to its name in the checkout and top-up network choice, the payment panel,
   the withdrawal network choice and the admin's network screens. Modelled on .tile (a fixed square that never shrinks, centred content) and on the round
   .avatar. --net-size is set per instance (20 or 24px). The fallback for a code without a logo is a neutral round mark with two letters, in the theme's
   fill and caption colours, like the placeholder initial of a site card.
   ========================================================================== */
.net-icon { width: var(--net-size, 20px); height: var(--net-size, 20px); flex: none; border-radius: 50%; display: inline-grid; place-items: center; vertical-align: middle; }
.net-icon-fallback { background: var(--fill-2); color: var(--text-2); font-size: 11px; font-weight: 600; line-height: 1; }

/* ==========================================================================
   Tab strip overflow (ui/Tabs.tsx): when the underline tabs do not fit (the site editor's nine tabs, any strip on a phone) the theme's
   .tabs scrolls sideways with its scrollbar hidden, so nothing showed that more tabs existed and a mouse could not reach them. .tabs-strip
   is the strip's box: it never widens the column it sits in (min-width 0). .tabs-fade-start / .tabs-fade-end fade the end that hides
   tabs (a mask, so it works on any surface). .tabs-scroll is the round button over that end, modelled on .icon-btn (round, --fill hover)
   at the 32px size of the theme's small controls, on --surface-2 with a --line hairline (as .card-line). The tablist itself (.tabs, .tab) is unchanged.
   ========================================================================== */
.tabs-strip { position: relative; min-width: 0; }
.tabs-fade-end { mask-image: linear-gradient(to right, var(--text) calc(100% - 64px), transparent); }
.tabs-fade-start { mask-image: linear-gradient(to left, var(--text) calc(100% - 64px), transparent); }
.tabs-fade-start.tabs-fade-end { mask-image: linear-gradient(to right, transparent, var(--text) 64px, var(--text) calc(100% - 64px), transparent); }
.tabs-scroll {
  position: absolute; top: 50%; z-index: 1; width: 32px; height: 32px; margin-top: -16px; border-radius: 50%;
  display: grid; place-items: center; background: var(--surface-2); color: var(--text); box-shadow: 0 0 0 1px var(--line);
  transition: background var(--dur-1) var(--ease);
}
.tabs-scroll:hover { background: var(--fill); }
.tabs-scroll-start { left: 0; }
.tabs-scroll-end { right: 0; }

/* ==========================================================================
   Read-only value (ui/ReadOnlyField.tsx): a value shown in the theme's .input-wrap box that cannot be changed (the site editor's App ID and
   domain, the chosen domain of the wizard). The editable box is filled (--fill) and turns --text-bordered on hover and focus, so a read-only
   value in the same box looked typeable. .ro-wrap drops the fill for a --line hairline (the outlined look of .card-line) and keeps it on
   hover; focus (a click or the Tab key) turns the hairline --text-3, never the --text typing border nor the --bg typing surface.
   .ro-input hides the typing caret and uses the default cursor; the text stays selectable and copyable, in --text-2 like the theme's
   secondary values. .ro-copy is the small ghost Copy button at the end of the box (as .input-wrap .btn).
   ========================================================================== */
.ro-wrap, .ro-wrap:hover { background: transparent; border-color: var(--line); }
.ro-wrap:focus-within { background: transparent; border-color: var(--text-3); }
.ro-input { caret-color: transparent; cursor: default; color: var(--text-2); text-overflow: ellipsis; }
.ro-input:focus-visible { outline: 0; }
.ro-copy { flex: none; }

/* ==========================================================================
   Fitted figure (ui/FitText.tsx): a balance or amount that must stay whole inside its card (the sidebar's withdrawable balance, the
   commissions and wallet cards). The component steps the font down through the theme's type sizes until the figure fits on one line;
   .money-fit lets a figure still too long at the smallest allowed size wrap instead of spilling out of the card. Tabular figures stay (.num).
   ========================================================================== */
.money-fit { min-width: 0; overflow-wrap: anywhere; }
/*$vite$:1*/