/* =========================================================
   EQOPAY brand stylesheet
   Palette from the emblem: deep navy E, royal blue → cyan link,
   lime → green swoosh. High-contrast navy text on bright surfaces.
   ========================================================= */
@font-face { font-family: "Poppins"; src: url("../assets/fonts/Poppins-Regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../assets/fonts/Poppins-Medium.woff") format("woff"); font-weight: 500 600; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../assets/fonts/Poppins-Bold.woff") format("woff"); font-weight: 700 900; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../assets/fonts/Poppins-BoldItalic.woff") format("woff"); font-weight: 700 900; font-style: italic; font-display: swap; }

:root {
  /* brand */
  --navy: #0a1f6e;        /* E */
  --navy-deep: #06134a;
  --royal: #1446ff;       /* link body */
  --blue: #0a6cff;
  --cyan: #12c4ff;        /* link highlight */
  --lime: #8fdc00;        /* swoosh highlight */
  --green: #1fb43c;       /* swoosh */
  --green-deep: #138a2c;

  /* neutrals */
  --ink: #0b1640;
  --ink-2: #33406b;
  --muted: #5a6788;
  --line: #dfe6f5;
  --bg: #f4f7ff;
  --surface: #ffffff;
  --tint-blue: #eaf0ff;
  --tint-cyan: #e3f8ff;
  --tint-green: #e8f9e6;
  --danger: #d92d3a;
  --surface-2: #fbfcff;
  --surface-3: #f3f6fd;
  --row-line: #eef2fa;
  --input-border: #d3dcef;
  --line-strong: #c9d6ff;
  --placeholder: #8a96b4;
  --brand-text: var(--navy);
  --accent-text: var(--royal);
  --green-text: var(--green-deep);
  --tint-amber: #fff3d1; --amber-text: #7a4b00; --amber-line: #ffe0a3;
  --tint-red: #ffecee; --red-text: #a3121d; --red-line: #f6c6cb;
  --tint-gray: #edf0f7; --gray-text: #4a5675;
  --green-line: #bfe8c3;
  --header-bg: rgba(255, 255, 255, .92);
  --hero-base: linear-gradient(180deg, #ffffff 0%, #f1f5ff 100%);
  color-scheme: light;

  --brand-grad: linear-gradient(100deg, var(--navy) 0%, var(--royal) 38%, var(--cyan) 68%, var(--green) 100%);
  --blue-grad: linear-gradient(120deg, var(--royal), var(--blue) 55%, var(--cyan));
  --green-grad: linear-gradient(120deg, var(--green-deep), var(--green) 60%, #43c92b);
  --deep-grad: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 45%, #1236c8 100%);

  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(10, 31, 110, .06), 0 4px 14px rgba(10, 31, 110, .06);
  --shadow: 0 2px 6px rgba(10, 31, 110, .06), 0 18px 44px rgba(10, 31, 110, .10);
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--accent-text); text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; font-weight: 700; color: var(--ink); }
p { margin: 0 0 1em; }
code, pre { font-family: var(--mono); font-size: .86em; }
:focus-visible { outline: 3px solid rgba(20, 70, 255, .45); outline-offset: 2px; }
.container { width: min(1180px, 92vw); margin: 0 auto; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.hidden { display: none !important; }
.grad-text { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-bar { height: 4px; background: var(--brand-grad); }

/* ---------- dark theme ---------- */
[data-theme="dark"] {
  /* Deep-navy dark theme (the one you picked): navy canvas, brand blue/cyan/green accents */
  --ink: #edf1ff;
  --ink-2: #c3cdee;
  --muted: #93a0c8;
  --line: #1c2a5c;
  --line-strong: #2c3f85;
  --bg: #050b22;
  --surface: #0a1433;
  --surface-2: #0e1a40;
  --surface-3: #112050;
  --row-line: #142254;
  --input-border: #24366f;
  --placeholder: #6d7aa6;
  --tint-blue: rgba(20, 70, 255, .20);
  --tint-cyan: rgba(18, 196, 255, .16);
  --tint-green: rgba(31, 180, 60, .18);
  --tint-amber: rgba(255, 176, 32, .16); --amber-text: #ffc560; --amber-line: rgba(255, 176, 32, .35);
  --tint-red: rgba(239, 68, 84, .16); --red-text: #ff8a95; --red-line: rgba(239, 68, 84, .35);
  --tint-gray: rgba(148, 163, 210, .14); --gray-text: #b3bddd;
  --green-line: rgba(31, 180, 60, .35);
  --brand-text: #ffffff;
  --accent-text: #7fa6ff;
  --green-text: #6fe08a;
  --header-bg: rgba(5, 11, 34, .86);
  --hero-base: linear-gradient(180deg, #050b22 0%, #08133a 100%);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 14px rgba(0, 0, 0, .25);
  --shadow: 0 2px 6px rgba(0, 0, 0, .4), 0 18px 44px rgba(0, 0, 0, .45);
  color-scheme: dark;
}
[data-theme="dark"] .wordmark .pay { background: linear-gradient(120deg, #3d7bff, var(--cyan)); -webkit-background-clip: text; background-clip: text; }
[data-theme="dark"] .tagline .t1 { color: #fff; } [data-theme="dark"] .tagline .t2 { color: var(--cyan); } [data-theme="dark"] .tagline .t3 { color: var(--lime); }
[data-theme="dark"] .hero-visual .emblem { filter: drop-shadow(0 0 1.5px rgba(255, 255, 255, .9)) drop-shadow(0 0 34px rgba(18, 196, 255, .35)); }
[data-theme="dark"] .hero-visual .halo { opacity: .4; }
[data-theme="dark"] .hero-visual .ring { border-color: rgba(127, 166, 255, .25); }
[data-theme="dark"] .feature .ico { box-shadow: none; }
[data-theme="dark"] .stats-strip .stat:nth-child(1) { background: #13298f; }
[data-theme="dark"] .section-brand, [data-theme="dark"] .cta-band, [data-theme="dark"] .auth-side,
[data-theme="dark"] .docs-hero, [data-theme="dark"] .checkout .head { background: linear-gradient(135deg, #0b1c66 0%, #1236c8 60%, #0f7fd6 100%); }
[data-theme="dark"] .site-footer { background: #030716; }
[data-theme="dark"] .code-card, [data-theme="dark"] pre.json, [data-theme="dark"] .docs pre { background: #071030; border-color: var(--line); }
[data-theme="dark"] .code-card .bar { background: #0b1744; }
[data-theme="dark"] .tabs button.on { background: #071030; border-color: #071030; }
[data-theme="dark"] .btn-light:hover { background: var(--surface-3); }
[data-theme="dark"] .alert-info { color: #cfdcff; }
[data-theme="dark"] .toast { background: #13298f; }
[data-theme="dark"] input:disabled { background: var(--surface-3); }
[data-theme="dark"] .test-banner { filter: saturate(.9) brightness(.92); }
[data-theme="dark"] .btn-navy { background: var(--royal); }
[data-theme="dark"] .btn-outline:hover { background: var(--surface-3); }
[data-theme="dark"] .chip i[style*="--navy"] { background: #7fa6ff !important; }

/* ---------- logos: real logo vs emblem ----------
   Real logo (EQ mark + wordmark): header, sidebar, footer, auth pages, checkout, 404, share image.
   Emblem (round badge): favicon / app icon and as artwork (hero illustration, auth panel, empty states).
   Each real-logo spot ships a dark-text version (light surfaces) and a white-text version (dark surfaces). */
.logo-img { display: block; max-width: 100%; height: auto; }
.on-dark-only { display: none !important; }
[data-theme="dark"] .on-light-only { display: none !important; }
[data-theme="dark"] .on-dark-only { display: block !important; }
.brand .logo-h { height: 40px; width: auto; }
.sidebar .brand .logo-h { height: 34px; }
.topbar .brand .logo-h { height: 32px; }
.logo-h.logo-xs { height: 22px !important; }
.auth-logo { margin-bottom: 1.4rem; }
.auth-logo .logo-h { height: 36px; }
.auth-side .brand .logo-h { height: 40px; }
.hero-wordmark { width: min(470px, 92%); }
.cta-logo { width: 210px; margin-bottom: .7rem; }
.footer-logo { display: inline-block; margin-bottom: 1rem; padding: 0 !important; }
.footer-logo img { width: 240px; max-width: 100%; }
.page-plain { background: var(--surface); }
@media (max-width: 600px) { .brand .logo-h { height: 30px; } .hero-wordmark { width: 92%; } }

/* theme toggle */
.theme-toggle { width: 40px; height: 40px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; display: inline-grid; place-items: center; font-size: 1.05rem; transition: background .2s, transform .2s; flex: none; }
.theme-toggle:hover { background: var(--surface-3); transform: rotate(-12deg); }
.theme-toggle .sun { display: none; } .theme-toggle .moon { display: inline; }
[data-theme="dark"] .theme-toggle .sun { display: inline; } [data-theme="dark"] .theme-toggle .moon { display: none; }
.theme-float { position: fixed; top: 1rem; right: 1rem; z-index: 60; }

/* ---------- brand lockup (emblem + wordmark) ---------- */
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none !important; }
.brand img { height: 44px; width: auto; }
.wordmark { font: italic 700 1.55rem/1 var(--font); letter-spacing: .01em; white-space: nowrap; }
.wordmark .eqo { color: var(--brand-text); }
.wordmark .pay { background: var(--blue-grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .08em; }
.on-dark .wordmark .eqo { color: #fff; }
.on-dark .wordmark .pay { background: linear-gradient(120deg, var(--cyan), #6fe3ff); -webkit-background-clip: text; background-clip: text; }
.emblem-badge { background: #fff; border-radius: 14px; padding: 5px 7px; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
.tagline { font-weight: 700; letter-spacing: .22em; font-size: .82rem; text-transform: uppercase; }
.tagline .t1 { color: var(--brand-text); } .tagline .t2 { color: var(--accent-text); } .tagline .t3 { color: var(--green); }
.on-dark .tagline .t1 { color: #fff; } .on-dark .tagline .t2 { color: var(--cyan); } .on-dark .tagline .t3 { color: var(--lime); }

/* ---------- buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .75rem 1.3rem; border-radius: 12px; border: 1.5px solid transparent; font: 600 .95rem var(--font); cursor: pointer; transition: transform .08s, box-shadow .2s, background .2s, filter .2s; text-decoration: none !important; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue-grad); color: #fff; box-shadow: 0 8px 22px rgba(20, 70, 255, .32); }
.btn-primary:hover { filter: brightness(1.07); box-shadow: 0 10px 28px rgba(20, 70, 255, .4); }
.btn-green { background: var(--green-grad); color: #fff; box-shadow: 0 8px 22px rgba(31, 180, 60, .32); }
.btn-green:hover { filter: brightness(1.06); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-deep); }
.btn-outline { background: var(--surface); color: var(--brand-text); border-color: var(--brand-text); }
.btn-outline:hover { background: var(--tint-blue); }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn-light { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-light:hover { border-color: var(--input-border); background: var(--surface-2); }
.btn-danger { background: var(--surface); color: var(--danger); border-color: var(--red-line); }
.btn-sm { padding: .45rem .8rem; font-size: .84rem; border-radius: 9px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.spinner { display: inline-block; width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

label { display: block; font-weight: 600; font-size: .87rem; margin-bottom: .35rem; color: var(--ink); }
.field { margin-bottom: 1rem; }
.hint { font-size: .8rem; color: var(--muted); margin-top: .3rem; }
input, select, textarea { width: 100%; padding: .7rem .85rem; border: 1.5px solid var(--input-border); border-radius: 11px; font: inherit; font-size: .95rem; background: var(--surface); color: var(--ink); transition: border-color .15s, box-shadow .15s; }
input::placeholder { color: var(--placeholder); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-text); box-shadow: 0 0 0 4px rgba(20, 70, 255, .14); }
input:disabled { background: var(--surface-3); color: var(--muted); }
.input-group { display: flex; gap: .5rem; align-items: stretch; }
.row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.alert { padding: .8rem 1rem; border-radius: 12px; font-size: .9rem; margin-bottom: 1rem; border: 1px solid; }
.alert-error { background: var(--tint-red); color: var(--red-text); border-color: var(--red-line); }
.alert-success { background: var(--tint-green); color: var(--green-text); border-color: var(--green-line); }
.alert-info { background: var(--tint-blue); color: var(--brand-text); border-color: var(--line-strong); }
.alert-warn { background: var(--tint-amber); color: var(--amber-text); border-color: var(--amber-line); }

/* ---------- site header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.site-header::before { content: ""; display: block; height: 4px; background: var(--brand-grad); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.nav { display: flex; align-items: center; gap: 1.7rem; }
.nav a { color: var(--ink-2); font-weight: 500; font-size: .95rem; }
.nav a:hover { color: var(--accent-text); text-decoration: none; }
.nav .btn { color: #fff; }
.nav .login { color: var(--brand-text); font-weight: 600; }
.nav-toggle { display: none; background: none; border: 0; color: var(--brand-text); font-size: 1.7rem; cursor: pointer; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 70px 0 110px; background:
  radial-gradient(620px 420px at 88% 18%, rgba(18, 196, 255, .22), transparent 65%),
  radial-gradient(560px 380px at 72% 92%, rgba(143, 220, 0, .20), transparent 65%),
  radial-gradient(700px 500px at 0% 0%, rgba(20, 70, 255, .12), transparent 60%),
  var(--hero-base); }
.hero .container { display: grid; grid-template-columns: 1.05fr .95fr; gap: 2.5rem; align-items: center; }
.hero-brand { margin-bottom: 1.6rem; }
.hero-brand .wordmark { font-size: clamp(3rem, 7vw, 5.2rem); }
.hero-brand .tagline { display: block; margin-top: .5rem; }
.hero h1 { font-size: clamp(1.7rem, 3.1vw, 2.5rem); font-weight: 700; color: var(--ink); max-width: 580px; }
.hero h1 .hl { color: var(--accent-text); }
.hero p.lead { font-size: 1.08rem; color: var(--ink-2); max-width: 560px; }
.hero .cta { display: flex; gap: .8rem; flex-wrap: wrap; margin: 1.7rem 0 1.6rem; }
.chips { display: flex; gap: .55rem; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: .4rem; padding: .38rem .8rem; border-radius: 999px; font-size: .82rem; font-weight: 600; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); box-shadow: var(--shadow-sm); }
.chip i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

.hero-visual { position: relative; display: grid; place-items: center; min-height: 460px; }
.hero-visual .halo { position: absolute; width: 470px; height: 470px; border-radius: 50%; background: conic-gradient(from 200deg, var(--royal), var(--cyan), var(--lime), var(--green), var(--navy), var(--royal)); filter: blur(60px); opacity: .28; animation: spin 18s linear infinite; }
.hero-visual .ring { position: absolute; width: 440px; height: 440px; border-radius: 50%; border: 2px dashed rgba(20, 70, 255, .18); animation: spin 60s linear infinite reverse; }
.hero-visual .emblem { position: relative; width: min(420px, 82vw); filter: drop-shadow(0 30px 40px rgba(10, 31, 110, .22)); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }
.float-card { position: absolute; background: var(--surface); border-radius: 16px; padding: .8rem 1rem; box-shadow: var(--shadow); display: flex; gap: .7rem; align-items: center; font-size: .84rem; border: 1px solid var(--line); z-index: 2; }
.float-card .ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-weight: 700; flex: none; }
.float-card strong { display: block; font-size: .95rem; color: var(--ink); }
.float-card span { color: var(--muted); }
.float-card.a { top: 30px; left: -10px; animation: float 7s ease-in-out infinite; }
.float-card.b { bottom: 40px; right: -6px; animation: float 8s ease-in-out .8s infinite; }
.float-card.c { bottom: 6px; left: 30px; animation: float 9s ease-in-out .4s infinite; }

/* ---------- stats strip ---------- */
.stats-strip { margin-top: -58px; position: relative; z-index: 3; }
.stats-strip .grid { display: grid; grid-template-columns: repeat(4, 1fr); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); }
.stats-strip .stat { padding: 1.5rem 1rem; text-align: center; color: #fff; }
.stats-strip .stat:nth-child(1) { background: var(--navy); }
.stats-strip .stat:nth-child(2) { background: var(--royal); }
.stats-strip .stat:nth-child(3) { background: #0796e0; }
.stats-strip .stat:nth-child(4) { background: var(--green-deep); }
.stats-strip strong { display: block; font-size: 1.85rem; font-weight: 700; }
.stats-strip span { opacity: .92; font-size: .9rem; }

/* ---------- sections ---------- */
.section { padding: 96px 0; }
.section-white { background: var(--surface); }
.section-head { text-align: center; max-width: 700px; margin: 0 auto 3rem; }
.section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.kicker { display: inline-block; font-weight: 700; text-transform: uppercase; letter-spacing: .16em; font-size: .76rem; margin-bottom: .8rem; padding: .3rem .8rem; border-radius: 999px; background: var(--tint-blue); color: var(--accent-text); }
.kicker.green { background: var(--tint-green); color: var(--green-text); }
.kicker.light { background: rgba(255, 255, 255, .14); color: #fff; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }

.feature { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 1.7rem; transition: transform .2s, box-shadow .2s, border-color .2s; overflow: hidden; }
.feature::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--accent, var(--royal)); opacity: 0; transition: opacity .2s; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.feature:hover::after { opacity: 1; }
.feature .ico { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; font-size: 1.35rem; margin-bottom: 1.1rem; color: #fff; background: var(--accent, var(--royal)); box-shadow: 0 8px 18px color-mix(in srgb, var(--accent, var(--royal)) 35%, transparent); }
.feature h3 { font-size: 1.12rem; }
.feature p { color: var(--muted); font-size: .94rem; margin: 0; }
.a-navy { --accent: var(--navy); } .a-royal { --accent: var(--royal); } .a-cyan { --accent: #0aa6e6; } .a-green { --accent: var(--green); } .a-lime { --accent: #5fae00; } .a-red { --accent: #e0262f; }
.badge-soon { display: inline-block; font-size: .68rem; font-weight: 700; padding: .14rem .5rem; border-radius: 999px; background: var(--tint-amber); color: var(--amber-text); margin-left: .35rem; vertical-align: middle; letter-spacing: .02em; }

/* code showcase */
.code-card { background: #0b1a52; border-radius: 20px; box-shadow: 0 30px 70px rgba(10, 31, 110, .35); overflow: hidden; border: 1px solid #1d2f7a; }
.code-card .bar { display: flex; align-items: center; gap: .45rem; padding: .85rem 1rem; background: #0e2066; font-size: .8rem; color: #a8b8ef; }
.code-card .bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; display: inline-block; }
.code-card .bar i:nth-child(2) { background: #febc2e; }
.code-card .bar i:nth-child(3) { background: #28c840; margin-right: .6rem; }
.code-card pre { margin: 0; padding: 1.3rem 1.4rem; color: #e6ecff; overflow-x: auto; line-height: 1.75; font-size: .83rem; }
.tok-k { color: #6fd3ff; } .tok-s { color: #b4f06a; } .tok-c { color: #8396d6; } .tok-n { color: #ffc46b; }
.checklist-plain { list-style: none; padding: 0; margin: 1.2rem 0; }
.checklist-plain li { padding: .45rem 0 .45rem 2rem; position: relative; color: var(--ink-2); }
.checklist-plain li::before { content: "✓"; position: absolute; left: 0; top: .45rem; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--tint-green); color: var(--green-text); font-weight: 700; display: grid; place-items: center; font-size: .8rem; }

/* steps on deep brand gradient */
.section-brand { background: var(--deep-grad); color: #fff; position: relative; overflow: hidden; }
.section-brand::after { content: ""; position: absolute; right: -160px; bottom: -200px; width: 520px; height: 520px; border-radius: 50%; border: 60px solid rgba(143, 220, 0, .14); }
.section-brand h2 { color: #fff; }
.section-brand .section-head p { color: #d4defe; }
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.3rem; position: relative; z-index: 1; }
.step { padding: 1.6rem; border-radius: 20px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); backdrop-filter: blur(6px); }
.step::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: #fff; color: var(--navy); font-weight: 700; font-size: 1.1rem; margin-bottom: 1rem; }
.step:nth-child(2)::before { color: var(--royal); } .step:nth-child(3)::before { color: #0796e0; } .step:nth-child(4)::before { background: var(--lime); color: var(--navy-deep); }
.step h3 { color: #fff; font-size: 1.1rem; }
.step p { color: #d4defe; font-size: .93rem; margin: 0; }

/* pricing */
.pricing .plan { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 2rem; display: flex; flex-direction: column; position: relative; }
.pricing .plan.featured { border: 0; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--brand-grad) border-box; border: 2.5px solid transparent; box-shadow: 0 24px 60px rgba(20, 70, 255, .18); transform: translateY(-8px); }
.pricing .plan.featured::before { content: "Most popular"; position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--blue-grad); color: #fff; font-size: .74rem; font-weight: 700; padding: .3rem .9rem; border-radius: 999px; }
.pricing .price { font-size: 2.4rem; font-weight: 700; margin: .4rem 0 .2rem; color: var(--brand-text); }
.pricing .price small { font-size: .95rem; font-weight: 500; color: var(--muted); }
.pricing ul { list-style: none; padding: 0; margin: 1.2rem 0 1.6rem; flex: 1; }
.pricing li { padding: .4rem 0; font-size: .94rem; color: var(--ink-2); }
.pricing li::before { content: "✓"; color: var(--green); font-weight: 700; margin-right: .6rem; }

/* faq */
.faq { max-width: 840px; margin: 0 auto; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.3rem; margin-bottom: .8rem; transition: box-shadow .2s; }
.faq details[open] { box-shadow: var(--shadow-sm); border-color: var(--line-strong); }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--tint-blue); color: var(--accent-text); font-weight: 700; }
.faq details[open] summary::after { content: "–"; background: var(--royal); color: #fff; }
.faq details p { margin: .8rem 0 0; color: var(--ink-2); }

.cta-band { background: var(--deep-grad); color: #fff; border-radius: 26px; padding: 3rem; display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; inset: auto -60px -120px auto; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(143, 220, 0, .45), transparent 65%); }
.cta-band h2 { color: #fff; margin: 0 0 .3rem; }
.cta-band p { color: #dbe4ff; margin: 0; }
.cta-band > * { position: relative; z-index: 1; }

/* footer */
.site-footer { background: var(--navy-deep); color: #c3cdf0; padding: 64px 0 30px; font-size: .92rem; }
.site-footer::before { content: ""; display: block; height: 4px; background: var(--brand-grad); margin-top: -64px; margin-bottom: 60px; }
.site-footer .cols { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2rem; }
.site-footer h4 { color: #fff; font-size: .95rem; }
.site-footer a { color: #c3cdf0; display: block; padding: .22rem 0; font-weight: 400; }
.site-footer a:hover { color: #fff; }
.site-footer .bottom { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 2.5rem; padding-top: 1.4rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }

/* ---------- auth pages ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: var(--deep-grad); color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side::after { content: ""; position: absolute; right: -140px; bottom: -140px; width: 420px; height: 420px; border-radius: 50%; border: 50px solid rgba(143, 220, 0, .16); }
.auth-side h2 { color: #fff; font-size: 2rem; }
.auth-side .hero-emblem { width: 260px; background: #fff; border-radius: 28px; padding: 1.2rem 1.4rem; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.auth-side ul { list-style: none; padding: 0; color: #dbe4ff; }
.auth-side li { margin: .7rem 0; }
.auth-side li::before { content: "✓"; color: var(--lime); margin-right: .6rem; font-weight: 700; }
.auth-main { display: grid; place-items: center; padding: 2rem; background: var(--surface); }
.auth-card { width: min(420px, 100%); }
.auth-card h1 { font-size: 1.9rem; }

/* ---------- dashboard ---------- */
.app { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.sidebar { background: var(--surface); border-right: 1px solid var(--line); padding: 1.1rem .9rem; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.sidebar .brand { padding: .3rem .5rem 1.3rem; }
.sidebar .brand img { height: 40px; }
.sidebar .wordmark { font-size: 1.4rem; }
.sidebar nav a { display: flex; align-items: center; gap: .75rem; padding: .66rem .85rem; border-radius: 12px; color: var(--ink-2); font-weight: 500; margin-bottom: .2rem; font-size: .94rem; }
.sidebar nav a:hover { background: var(--tint-blue); color: var(--brand-text); text-decoration: none; }
.sidebar nav a.active { background: var(--blue-grad); color: #fff; box-shadow: 0 8px 18px rgba(20, 70, 255, .28); }
.sidebar nav a .i { width: 20px; text-align: center; }
.sidebar .foot { margin-top: auto; font-size: .82rem; padding: .9rem; border-radius: 14px; background: var(--bg); }
.sidebar .foot strong { color: var(--ink); display: block; }
.main { min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 2rem; background: var(--header-bg); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar h1 { font-size: 1.35rem; margin: 0; }
.mode-switch { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.mode-switch button { border: 0; background: transparent; padding: .42rem 1.05rem; border-radius: 999px; font: 600 .85rem var(--font); color: var(--muted); cursor: pointer; }
.mode-switch button.on[data-mode="test"] { background: #ffb020; color: #3d2600; }
.mode-switch button.on[data-mode="live"] { background: var(--green-grad); color: #fff; }
.test-banner { background: repeating-linear-gradient(135deg, #ffb020 0 14px, #ffbe3d 14px 28px); color: #3d2600; text-align: center; font-size: .8rem; padding: .3rem; font-weight: 700; letter-spacing: .03em; }
.content { padding: 2rem; max-width: 1260px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.4rem; box-shadow: var(--shadow-sm); }
.card h2 { font-size: 1.1rem; margin-bottom: .25rem; }
.card > h2 + p, .card-head p { margin-top: 0; }
.card form, .card .table-wrap { margin-top: .6rem; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.4rem; }
.kpi { border-radius: var(--radius); padding: 1.25rem 1.35rem; color: #fff; position: relative; overflow: hidden; box-shadow: var(--shadow-sm); }
.kpi::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.kpi:nth-child(1) { background: linear-gradient(135deg, var(--navy), #1532a8); }
.kpi:nth-child(2) { background: linear-gradient(135deg, var(--royal), #2f6bff); }
.kpi:nth-child(3) { background: linear-gradient(135deg, #0784c9, var(--cyan)); }
.kpi:nth-child(4) { background: linear-gradient(135deg, var(--green-deep), var(--green)); }
.kpi .label { font-size: .84rem; font-weight: 500; opacity: .92; }
.kpi .value { font-size: 1.75rem; font-weight: 700; margin-top: .25rem; }
.kpi .sub { font-size: .78rem; opacity: .85; }
.chart { width: 100%; height: 250px; }
.chart .bar { fill: url(#barGrad); }
.chart .bar:hover { opacity: .8; }
.chart text { font-size: 11px; fill: var(--muted); font-family: var(--font); }
.chart .gridline { stroke: var(--row-line); }
.checklist .btn { white-space: normal; text-align: left; justify-content: flex-start; }

table.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th { text-align: left; font-weight: 600; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; padding: .7rem .8rem; border-bottom: 1.5px solid var(--line); white-space: nowrap; }
.tbl td { padding: .8rem; border-bottom: 1px solid var(--row-line); vertical-align: middle; color: var(--ink); }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--surface-3); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: .35rem; padding: .22rem .65rem; border-radius: 999px; font-size: .75rem; font-weight: 600; text-transform: capitalize; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.success, .pill.live { background: var(--tint-green); color: var(--green-text); }
.pill.pending, .pill.test { background: var(--tint-amber); color: var(--amber-text); }
.pill.failed, .pill.expired { background: var(--tint-red); color: var(--red-text); }
.pill.cancelled { background: var(--tint-gray); color: var(--gray-text); }
.pill.review { background: var(--tint-amber); color: var(--amber-text); }
.how-list { padding-left: 1.2rem; margin: .4rem 0 1rem; }
.how-list li { margin-bottom: .6rem; line-height: 1.55; }
.filters { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filters input, .filters select { width: auto; min-width: 150px; padding: .55rem .75rem; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; font-size: .88rem; color: var(--muted); }
.secret { font-family: var(--mono); font-size: .85rem; background: var(--bg); border: 1.5px dashed var(--input-border); padding: .65rem .8rem; border-radius: 10px; word-break: break-all; color: var(--brand-text); }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: .55rem 1rem; font-size: .92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }
pre.json { background: #0b1a52; color: #e6ecff; padding: 1rem; border-radius: 12px; overflow: auto; max-height: 320px; font-size: .8rem; }

.drawer-backdrop { position: fixed; inset: 0; background: rgba(6, 19, 74, .4); z-index: 80; backdrop-filter: blur(2px); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--surface); z-index: 90; box-shadow: -10px 0 40px rgba(6, 19, 74, .2); display: flex; flex-direction: column; }
.drawer header { display: flex; justify-content: space-between; align-items: center; padding: 1.2rem 1.4rem; border-bottom: 1px solid var(--line); border-top: 4px solid; border-image: var(--brand-grad) 1; }
.drawer .body { padding: 1.4rem; overflow-y: auto; }
.icon-btn { background: none; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--muted); }

.toast-wrap { position: fixed; bottom: 1.2rem; right: 1.2rem; z-index: 200; display: flex; flex-direction: column; gap: .5rem; }
.toast { background: var(--navy); color: #fff; padding: .85rem 1.1rem; border-radius: 12px; box-shadow: 0 12px 30px rgba(6, 19, 74, .3); font-size: .9rem; max-width: 360px; animation: pop .2s ease-out; border-left: 4px solid var(--cyan); }
.toast.error { background: var(--red-text); border-left-color: #ffb3ba; }
.toast.success { background: var(--green-deep); border-left-color: var(--lime); }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }

/* ---------- docs ---------- */
.docs-hero { background: var(--deep-grad); color: #fff; padding: 2.6rem 0; }
.docs-hero h1 { color: #fff; margin: 0 0 .3rem; }
.docs-hero p { color: #d4defe; margin: 0; }
.docs { display: grid; grid-template-columns: 240px 1fr; gap: 2.8rem; padding: 2.5rem 0 5rem; }
.docs aside { position: sticky; top: 100px; align-self: start; font-size: .92rem; }
.docs aside a { display: block; padding: .3rem .7rem; color: var(--ink-2); border-left: 2px solid var(--line); font-weight: 400; }
.docs aside a:hover { color: var(--accent-text); border-left-color: var(--accent-text); text-decoration: none; }
.docs aside h4 { font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; color: var(--accent-text); margin: 1.3rem 0 .4rem; }
.docs article { min-width: 0; }
.docs article h2 { font-size: 1.6rem; margin-top: 2.8rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.docs article h2:first-child { margin-top: 0; border: 0; padding: 0; }
.docs article h3 { font-size: 1.1rem; margin-top: 1.6rem; }
.docs pre { background: #0b1a52; color: #e6ecff; padding: 1.1rem 1.2rem; border-radius: 14px; overflow-x: auto; line-height: 1.65; }
.docs :not(pre) > code { background: var(--tint-blue); color: var(--brand-text); padding: .1rem .38rem; border-radius: 6px; }
.docs table { width: 100%; border-collapse: collapse; font-size: .9rem; margin: 1rem 0; }
.docs th, .docs td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.docs th { background: var(--tint-blue); color: var(--brand-text); }
.method { display: inline-block; font: 700 .76rem var(--mono); padding: .2rem .5rem; border-radius: 7px; margin-right: .45rem; vertical-align: middle; }
.method.post { background: var(--green); color: #fff; }
.method.get { background: var(--royal); color: #fff; }
.tabs { display: flex; gap: .3rem; margin-bottom: -1px; flex-wrap: wrap; }
.tabs button { border: 1px solid var(--line); border-bottom: 0; background: var(--bg); padding: .45rem .9rem; border-radius: 9px 9px 0 0; font: 600 .82rem var(--font); cursor: pointer; color: var(--muted); }
.tabs button.on { background: #0b1a52; color: #fff; border-color: #0b1a52; }
.tab-panel pre { border-top-left-radius: 0; margin-top: 0; }

/* ---------- checkout ---------- */
.checkout-bg { min-height: 100vh; background:
  radial-gradient(600px 380px at 0% 0%, rgba(20, 70, 255, .16), transparent 60%),
  radial-gradient(520px 340px at 100% 100%, rgba(143, 220, 0, .18), transparent 60%), var(--bg);
  display: grid; place-items: center; padding: 2rem 1rem; }
.checkout { width: min(440px, 100%); background: var(--surface); border-radius: 26px; box-shadow: 0 30px 80px rgba(10, 31, 110, .16); overflow: hidden; }
.checkout .head { background: var(--deep-grad); color: #fff; padding: 1.6rem; position: relative; overflow: hidden; }
.checkout .head::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; border: 26px solid rgba(143, 220, 0, .18); }
.checkout .head > * { position: relative; z-index: 1; }
.checkout .head .biz { color: #d4defe; font-size: .85rem; }
.checkout .head h1 { color: #fff; font-size: 1.35rem; margin: .3rem 0; }
.checkout .head .amt { font-size: 2.2rem; font-weight: 700; }
.checkout .body { padding: 1.6rem; }
.checkout .foot { padding: .9rem; border-top: 1px solid var(--line); font-size: .8rem; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: .45rem; }
.checkout .foot .brand img { height: 24px; }
.checkout .foot .wordmark { font-size: 1rem; }
.mpesa-tag { display: inline-flex; align-items: center; gap: .4rem; background: var(--tint-green); color: var(--green-text); padding: .32rem .75rem; border-radius: 999px; font-weight: 600; font-size: .8rem; margin-bottom: 1rem; }
.status-view { text-align: center; padding: 1rem 0; }
.status-view .big { width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 1rem; display: grid; place-items: center; font-size: 2.2rem; }
.status-view .big.wait { background: var(--tint-blue); }
.status-view .big.ok { background: var(--green-grad); color: #fff; box-shadow: 0 10px 26px rgba(31, 180, 60, .35); }
.status-view .big.bad { background: var(--tint-red); color: var(--red-text); }
.pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.08); opacity: .75; } }

/* ---------- responsive ---------- */
.menu-btn { display: none !important; }
@media (max-width: 980px) {
  .hero .container, .auth-wrap, .grid-2 { grid-template-columns: 1fr; }
  .hero-visual { min-height: 380px; order: -1; }
  .hero-visual .halo, .hero-visual .ring { width: 340px; height: 340px; }
  .hero-visual .emblem { width: 300px; }
  .float-card.c { display: none; }
  .auth-side { display: none; }
  .grid-3, .grid-4, .steps, .kpis { grid-template-columns: 1fr 1fr; }
  .stats-strip .grid { grid-template-columns: 1fr 1fr; }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
  .docs { grid-template-columns: 1fr; }
  .docs aside { position: static; }
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 100; width: 252px; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  .sidebar.open { transform: none; }
  .menu-btn { display: inline-flex !important; }
  .content { padding: 1.2rem; }
  .topbar { padding: .8rem 1.2rem; }
  .nav { display: none; position: absolute; top: 78px; left: 0; right: 0; background: var(--surface); flex-direction: column; padding: 1.2rem; gap: 1rem; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav-toggle { display: block; }
}
@media (max-width: 600px) {
  .grid-3, .grid-4, .steps, .kpis { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: .1rem; }
  .kv dd { margin-bottom: .6rem; }
  .cta-band { padding: 2rem; }
  .float-card.a { left: 0; top: 0; }
  .float-card.b { right: 0; bottom: 0; }
  .brand img { height: 38px; }
  .wordmark { font-size: 1.35rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.site-footer a.brand { display: inline-flex; padding: 0; }
[data-theme="dark"] .btn-navy { background: var(--royal); }
[data-theme="dark"] .btn-outline:hover { background: var(--surface-3); }

.plan-pick { display: flex; gap: .7rem; align-items: flex-start; padding: 1rem; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; font-weight: 500; background: var(--surface); margin: 0; }
.plan-pick:has(input:checked) { border-color: var(--royal); box-shadow: 0 0 0 4px rgba(20, 70, 255, .12); background: var(--tint-blue); }
.plan-pick input { margin-top: .3rem; }
#type-pick label:has(input:checked) { border-color: var(--royal); background: var(--tint-blue); }
/* auth pages: the side panel already shows the logo; repeat it above the form only on small screens */
.auth-card .auth-logo { display: none; }
@media (max-width: 980px) { .auth-card .auth-logo { display: inline-block; } }

/* ================= auth pages v2: creative side panel ================= */
.auth-side { background:
    radial-gradient(520px 340px at 85% 62%, rgba(18, 196, 255, .22), transparent 65%),
    radial-gradient(420px 300px at 10% 100%, rgba(143, 220, 0, .16), transparent 65%),
    linear-gradient(160deg, #040c33 0%, #0a1f6e 58%, #0d2a8a 100%);
  padding: 2.4rem 3rem; gap: 1.2rem; }
.auth-side::after { display: none; }
[data-theme="dark"] .auth-side { background:
    radial-gradient(520px 340px at 85% 62%, rgba(18, 196, 255, .20), transparent 65%),
    radial-gradient(420px 300px at 10% 100%, rgba(143, 220, 0, .14), transparent 65%),
    linear-gradient(160deg, #030926 0%, #081a5c 60%, #0b2378 100%); }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; position: relative; z-index: 2; }
.back-home { display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .9rem; border-radius: 999px; font-size: .86rem; font-weight: 600;
  color: #fff; background: rgba(255, 255, 255, .10); border: 1px solid rgba(255, 255, 255, .22); text-decoration: none !important; transition: background .2s, transform .2s; }
.back-home:hover { background: rgba(255, 255, 255, .2); transform: translateX(-2px); }
.back-inline { display: none; color: var(--accent-text); background: var(--tint-blue); border-color: transparent; margin-bottom: 1.2rem; }
.auth-copy { position: relative; z-index: 2; max-width: 460px; }
.auth-copy h2 { color: #fff; font-size: clamp(1.7rem, 2.6vw, 2.2rem); }
.auth-copy ul { list-style: none; padding: 0; margin: 0; color: #dbe4ff; }
.auth-copy li { margin: .55rem 0; display: flex; gap: .6rem; }
.auth-copy li::before { content: "✓"; flex: none; width: 1.35rem; height: 1.35rem; border-radius: 50%; display: grid; place-items: center; background: rgba(143, 220, 0, .18); color: var(--lime); font-weight: 700; font-size: .78rem; margin-top: .15rem; }
.auth-side .tagline { position: relative; z-index: 2; margin: 0; }

.showcase { position: relative; height: 340px; display: grid; place-items: center; margin: .4rem 0; }
.sc-halo { position: absolute; width: 300px; height: 300px; border-radius: 50%; background: conic-gradient(from 210deg, var(--royal), var(--cyan), var(--lime), var(--green), var(--royal)); filter: blur(55px); opacity: .45; animation: spin 16s linear infinite; }
.sc-orbit { position: absolute; border-radius: 50%; border: 1.5px dashed rgba(255, 255, 255, .18); animation: spin 22s linear infinite; }
.sc-orbit.o1 { width: 300px; height: 300px; }
.sc-orbit.o2 { width: 360px; height: 360px; border-style: solid; border-color: rgba(18, 196, 255, .14); animation-duration: 30s; animation-direction: reverse; }
.sc-orbit.o3 { width: 240px; height: 240px; border-color: rgba(143, 220, 0, .2); animation-duration: 18s; }
.sc-orbit .dot { position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 12px currentColor; }
.d-blue { background: #3d7bff; color: #3d7bff; } .d-green { background: var(--lime); color: var(--lime); } .d-cyan { background: var(--cyan); color: var(--cyan); }
.sc-emblem { position: relative; width: 210px; filter: drop-shadow(0 0 2px rgba(255, 255, 255, .9)) drop-shadow(0 18px 40px rgba(0, 0, 0, .45)) drop-shadow(0 0 40px rgba(18, 196, 255, .35)); animation: float 6s ease-in-out infinite; z-index: 1; }
.sc-chip { position: absolute; z-index: 2; display: flex; align-items: center; gap: .6rem; padding: .6rem .85rem; border-radius: 14px; background: rgba(6, 16, 60, .72); border: 1px solid rgba(255, 255, 255, .16); backdrop-filter: blur(8px); color: #fff; font-size: .8rem; box-shadow: 0 12px 30px rgba(0, 0, 0, .3); }
.sc-chip .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-weight: 700; flex: none; }
.sc-chip strong { display: block; font-size: .85rem; }
.sc-chip small { color: #b9c7ef; }
.sc-chip.c1 { top: 8px; right: 4%; animation: float 7s ease-in-out infinite; }
.sc-chip.c2 { bottom: 34px; left: 0; animation: float 8s ease-in-out .6s infinite; }
.sc-chip.c3 { bottom: 0; right: 10%; animation: float 9s ease-in-out .3s infinite; }

.auth-main { position: relative; background:
  radial-gradient(500px 300px at 100% 0%, rgba(18, 196, 255, .07), transparent 60%),
  radial-gradient(420px 260px at 0% 100%, rgba(143, 220, 0, .06), transparent 60%), var(--surface); }
.auth-card h1 { margin-bottom: .3rem; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 4.2rem; }
.pw-toggle { position: absolute; right: .45rem; top: 50%; transform: translateY(-50%); border: 0; background: var(--tint-blue); color: var(--accent-text); font: 600 .78rem var(--font); padding: .35rem .6rem; border-radius: 8px; cursor: pointer; }
.check { display: flex; gap: .65rem; align-items: flex-start; font-weight: 400; font-size: .85rem; color: var(--ink-2); margin: .2rem 0 1.2rem; line-height: 1.5; }
.check input { width: 18px; height: 18px; margin-top: .15rem; flex: none; accent-color: var(--royal); }
.auth-trust { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-top: 1.4rem; }
.auth-trust span { font-size: .76rem; color: var(--muted); background: var(--surface-3); border: 1px solid var(--line); padding: .3rem .65rem; border-radius: 999px; }
.auth-legal { text-align: center; font-size: .8rem; color: var(--muted); margin-top: 1rem; }
@media (max-width: 980px) { .back-inline { display: inline-flex; } }
@media (max-height: 760px) { .showcase { height: 260px; } .sc-emblem { width: 160px; } .sc-orbit.o2 { display: none; } }

/* ================= legal pages ================= */
.legal-hero { background: var(--deep-grad); color: #fff; padding: 2.6rem 0; }
.legal-hero h1 { color: #fff; margin: .2rem 0 .3rem; }
.legal-hero p { color: #d4defe; margin: 0; }
[data-theme="dark"] .legal-hero { background: linear-gradient(135deg, #0b1c66 0%, #1236c8 60%, #0f7fd6 100%); }
.legal { display: grid; grid-template-columns: 250px 1fr; gap: 2.8rem; padding: 2.5rem 0 5rem; }
.legal aside { position: sticky; top: 100px; align-self: start; font-size: .88rem; max-height: calc(100vh - 120px); overflow: auto; }
.legal aside a { display: block; padding: .28rem .7rem; color: var(--ink-2); border-left: 2px solid var(--line); font-weight: 400; }
.legal aside a:hover { color: var(--accent-text); border-left-color: var(--royal); text-decoration: none; }
.legal article { min-width: 0; max-width: 820px; }
.legal article h2 { font-size: 1.3rem; margin-top: 2.2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.legal article h2:first-of-type { border: 0; margin-top: 0; padding-top: 0; }
.legal article p, .legal article li { color: var(--ink-2); }
.legal article li { margin: .35rem 0; }
.legal table { width: 100%; border-collapse: collapse; font-size: .9rem; margin: 1rem 0; }
.legal th, .legal td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { background: var(--tint-blue); color: var(--brand-text); }
.legal .summary { background: var(--tint-blue); border: 1px solid var(--line-strong); border-radius: 14px; padding: 1.1rem 1.3rem; margin-bottom: 2rem; }
.legal .summary h3 { margin: 0 0 .5rem; font-size: 1rem; }
.legal .summary ul { margin: 0; padding-left: 1.2rem; }
@media (max-width: 980px) { .legal { grid-template-columns: 1fr; } .legal aside { position: static; max-height: none; } }
.checkout-bg { align-content: center; }
.auth-side .tagline .t1 { color: #fff; } .auth-side .tagline .t2 { color: var(--cyan); } .auth-side .tagline .t3 { color: var(--lime); }
.sc-emblem { width: 250px; }
.sc-halo { width: 340px; height: 340px; }
.sc-orbit.o1 { width: 330px; height: 330px; } .sc-orbit.o2 { width: 400px; height: 400px; } .sc-orbit.o3 { width: 270px; height: 270px; }
.showcase { height: 380px; }
@media (max-height: 760px) { .showcase { height: 270px; } .sc-emblem { width: 170px; } .sc-halo { width: 240px; height: 240px; } .sc-orbit.o1 { width: 240px; height: 240px; } .sc-orbit.o3 { width: 200px; height: 200px; } }

/* =====================================================================
   MOBILE-FIRST POLISH (phones 320–600px, tablets 600–980px)
   ===================================================================== */
html { -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }
img, svg, video { max-width: 100%; }
button, a, input, select, textarea { -webkit-tap-highlight-color: rgba(20, 70, 255, .12); }
.table-wrap { -webkit-overflow-scrolling: touch; }

/* docs / legal: wide tables + code scroll inside themselves, never the page */
.docs table, .legal table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.docs pre, .legal pre { max-width: 100%; }
.docs article, .legal article { overflow-wrap: anywhere; }
.docs :not(pre) > code { word-break: break-word; }

/* "On this page" toggle for docs/legal sidebars on small screens */
.toc-toggle { display: none; }

/* sidebar backdrop (dashboard, mobile) */
.sidebar-backdrop { display: none; }

@media (max-width: 980px) {
  /* nav menu: full-width, comfortable tap targets */
  .nav { gap: .2rem; padding: .8rem 1rem 1.2rem; max-height: calc(100vh - 78px); overflow-y: auto; }
  .nav a { padding: .8rem .6rem; border-radius: 10px; font-size: 1rem; }
  .nav a:hover { background: var(--tint-blue); }
  .nav .btn { margin-top: .4rem; justify-content: center; padding: .85rem; }
  .nav [data-theme-toggle] { align-self: flex-start; margin: .2rem .6rem; }

  /* hero: brand + message first, artwork second and smaller */
  .hero { padding: 36px 0 80px; }
  .hero-visual { order: 0; min-height: 320px; margin-top: .5rem; }
  .hero-visual .halo, .hero-visual .ring { width: 300px; height: 300px; }
  .hero-visual .emblem { width: 250px; }

  /* toc toggle for docs & legal */
  .toc-toggle { display: flex; width: 100%; justify-content: space-between; align-items: center; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--ink); font: 600 .95rem var(--font); cursor: pointer; }
  .toc-toggle::after { content: "▾"; transition: transform .2s; }
  .toc-open .toc-toggle::after { transform: rotate(180deg); }
  .docs aside, .legal aside { border: 1px solid var(--line); border-radius: 12px; padding: .2rem 1rem 1rem; margin-top: -.6rem; display: none; background: var(--surface); }
  .toc-open aside { display: block; }
  .docs, .legal { gap: 1.4rem; padding-top: 1.4rem; }

  /* dashboard */
  .sidebar-backdrop.show { display: block; position: fixed; inset: 0; background: rgba(6, 19, 74, .45); z-index: 99; }
  .topbar { gap: .5rem; }
  .topbar h1 { font-size: 1.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

@media (max-width: 600px) {
  /* rhythm */
  .container { width: min(1180px, 100% - 2rem); }
  .section { padding: 56px 0; }
  .section-head { margin-bottom: 2rem; }
  .section-head h2 { font-size: 1.65rem; }
  h1 { word-break: break-word; }

  /* iOS: 16px inputs stop zoom-on-focus */
  input, select, textarea { font-size: 16px; }

  /* landing */
  .hero h1 { font-size: 1.75rem; }
  .hero p.lead { font-size: 1rem; }
  .hero .cta { flex-direction: column; }
  .hero .cta .btn { width: 100%; padding: .9rem; }
  .chips { gap: .4rem; }
  .chip { font-size: .76rem; padding: .32rem .65rem; }
  .hero-visual { min-height: 280px; }
  .hero-visual .halo, .hero-visual .ring { width: 250px; height: 250px; }
  .hero-visual .emblem { width: 210px; }
  .float-card { padding: .55rem .7rem; font-size: .74rem; border-radius: 12px; }
  .float-card .ic { width: 30px; height: 30px; border-radius: 9px; }
  .float-card strong { font-size: .82rem; }
  .float-card.a { top: 0; left: 0; }
  .float-card.b { bottom: 4px; right: 0; }
  .stats-strip { margin-top: -50px; }
  .stats-strip .stat { padding: 1.1rem .6rem; }
  .stats-strip strong { font-size: 1.3rem; }
  .stats-strip span { font-size: .78rem; }
  .feature { padding: 1.3rem; }
  .code-card pre { font-size: .74rem; padding: 1rem; }
  .step { padding: 1.3rem; }
  .pricing .plan { padding: 1.5rem; }
  .pricing .plan.featured { transform: none; margin-top: .6rem; }
  .pricing .price { font-size: 2rem; }
  .faq details { padding: .95rem 1rem; }
  .cta-band { padding: 1.6rem; border-radius: 20px; }
  .cta-band > div:last-child { width: 100%; flex-direction: column; }
  .cta-band .btn { width: 100%; }
  .site-footer { padding-top: 48px; }
  .site-footer .cols { grid-template-columns: 1fr 1fr; gap: 1.4rem; }
  .site-footer .cols > div:first-child { grid-column: 1 / -1; }
  .site-footer .bottom { flex-direction: column; gap: .4rem; }
  .footer-logo img { width: 200px; }

  /* docs / legal */
  .docs-hero, .legal-hero { padding: 1.8rem 0; }
  .docs article h2 { font-size: 1.35rem; margin-top: 2rem; }
  .docs pre { font-size: .76rem; padding: .9rem; border-radius: 10px; }
  .docs th, .docs td, .legal th, .legal td { padding: .5rem; font-size: .84rem; }

  /* auth */
  .auth-main { padding: 1.2rem 1rem 2rem; align-items: start; }
  .auth-card h1 { font-size: 1.6rem; }

  /* checkout */
  .checkout-bg { padding: 1rem .75rem; }
  .checkout { border-radius: 20px; }
  .checkout .head { padding: 1.3rem; }
  .checkout .body { padding: 1.3rem; }

  /* dashboard shell */
  .content { padding: 1rem .85rem 2rem; }
  .topbar { padding: .7rem .85rem; }
  .topbar .theme-toggle { width: 36px; height: 36px; }
  .mode-switch button { padding: .38rem .7rem; }
  .test-banner { font-size: .72rem; }
  .card { padding: 1.1rem; border-radius: 14px; }
  .card-head { align-items: flex-start; }
  .kpis { gap: .7rem; grid-template-columns: 1fr 1fr; }
  .kpi { padding: 1rem; }
  .kpi .value { font-size: 1.25rem; }
  .kpi .label { font-size: .76rem; }
  .kpi .sub { font-size: .7rem; }
  .row { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }

  /* filters: 2-column grid of controls */
  .filters { display: grid; grid-template-columns: 1fr 1fr; }
  .filters input[name="q"] { grid-column: 1 / -1; }
  .filters input, .filters select { min-width: 0; width: 100%; }
  .filters .btn { width: 100%; }

  /* input groups wrap (secrets, key forms, URLs) */
  .input-group { flex-wrap: wrap; }
  .input-group > .secret, .input-group > input, .input-group > select { flex: 1 1 100%; }
  .input-group > .btn { flex: 1 1 auto; }

  /* tables -> stacked cards */
  .tbl.stack thead { display: none; }
  .tbl.stack, .tbl.stack tbody, .tbl.stack tr, .tbl.stack td { display: block; width: 100%; }
  .tbl.stack tr { border: 1px solid var(--line); border-radius: 12px; padding: .55rem .8rem; margin-bottom: .6rem; background: var(--surface); }
  .tbl.stack tr.click:hover td { background: transparent; }
  .tbl.stack td { display: flex; justify-content: space-between; align-items: center; gap: 1rem; border: 0; padding: .32rem 0; text-align: right; }
  .tbl.stack td.num { text-align: right; }
  .tbl.stack td::before { content: attr(data-label); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); text-align: left; flex: none; }
  .tbl.stack td:not([data-label])::before, .tbl.stack td[data-label=""]::before { content: none; }
  .tbl.stack td:not([data-label]), .tbl.stack td[data-label=""] { justify-content: flex-end; flex-wrap: wrap; gap: .4rem; }
  .tbl.stack td > div { text-align: right; }
  .table-wrap { overflow: visible; }

  /* drawer full screen, sticky header */
  .drawer { width: 100vw; }
  .drawer header { position: sticky; top: 0; background: var(--surface); z-index: 1; }
  .drawer .body { padding: 1.1rem; }
  .toast-wrap { left: .75rem; right: .75rem; bottom: .75rem; }
  .toast { max-width: none; }
  .pager { flex-direction: column; gap: .6rem; }
}

@media (max-width: 360px) {
  .kpis { grid-template-columns: 1fr; }
  .site-footer .cols { grid-template-columns: 1fr; }
  .brand .logo-h { height: 26px; }
  .mode-switch button { padding: .34rem .55rem; font-size: .8rem; }
}

@media (max-width: 600px) { .hide-sm { display: none; } }
.topbar > div:first-child { min-width: 0; flex: 1 1 auto; }
.topbar > div:last-child { flex: none; }
.tbl td .small.muted, .secret { overflow-wrap: anywhere; word-break: break-word; }
@media (max-width: 360px) {
  .topbar .theme-toggle { width: 32px; height: 32px; font-size: .9rem; }
  .topbar h1 { font-size: 1rem; }
  .menu-btn { padding: .35rem .55rem !important; }
}
@media (max-width: 980px) {
  .nav { align-items: stretch; }
  .nav a { text-align: left; }
  .nav .btn { width: 100%; }
}
@media (max-width: 600px) {
  .kpi .value { font-size: clamp(1rem, 5vw, 1.25rem); overflow-wrap: anywhere; line-height: 1.2; }
  .input-group > .secret { flex: 1 1 100% !important; }
  .tbl.stack td:first-child { display: block; text-align: left; padding-bottom: .5rem; margin-bottom: .2rem; border-bottom: 1px dashed var(--line); }
  .tbl.stack td:first-child::before { display: block; margin-bottom: .25rem; }
  .tbl.stack td:first-child > div { text-align: left; }
}
@media (max-width: 600px) { .kpi .value { white-space: nowrap; overflow-wrap: normal; } }

/* ===== auth v3: PayWave-style fields ===== */
.auth-card { width: min(520px, 100%); }
.grid-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.pw-meter { height: 4px; border-radius: 4px; background: var(--line); margin-top: .5rem; overflow: hidden; }
.pw-meter span { display: block; height: 100%; width: 0; border-radius: 4px; transition: width .25s, background .25s; }
.auth-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: -.2rem 0 1.2rem; flex-wrap: wrap; }
.auth-switch { text-align: center; margin: 1.2rem 0 0; color: var(--muted); font-size: .92rem; }
.linklike { background: none; border: 0; color: var(--accent-text); font: 600 .92rem var(--font); cursor: pointer; padding: 0; }
.linklike:disabled { color: var(--muted); cursor: default; }
.verify-icon { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; font-size: 1.8rem; background: var(--tint-blue); margin-bottom: 1rem; }
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: .5rem; margin: 1.2rem 0; }
.otp input { text-align: center; font-size: 1.5rem; font-weight: 700; padding: .7rem 0; border-radius: 12px; }
@media (max-width: 600px) { .grid-form { grid-template-columns: 1fr; } .otp { gap: .35rem; } .otp input { font-size: 1.3rem; padding: .6rem 0; } }

/* ---------- dashboard v3 (PayWave-style layout) ---------- */
.nav-label { font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 1rem .9rem .35rem; }
.title-stack { display: flex; flex-direction: column; min-width: 0; }
.title-stack h1 { line-height: 1.15; }
.hello { font-size: .82rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bell-wrap { position: relative; }
.icon-btn { position: relative; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 1rem; display: grid; place-items: center; }
.icon-btn:hover { background: var(--tint-blue); }
.bell-count { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--danger); color: #fff; font-size: .66rem; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--surface); }
.notif-panel { display: none; position: absolute; right: 0; top: calc(100% + 8px); width: min(360px, calc(100vw - 24px)); max-height: 70vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg, 0 18px 50px rgba(10,31,110,.18)); z-index: 60; }
.notif-panel.open { display: block; }
.notif-head { display: flex; justify-content: space-between; align-items: center; padding: .85rem 1rem; border-bottom: 1px solid var(--line); }
.notif { display: flex; gap: .7rem; padding: .8rem 1rem; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.notif:hover { background: var(--tint-blue); text-decoration: none; }
.notif:last-child { border-bottom: 0; }
.notif strong { display: block; font-size: .88rem; }
.notif small { display: block; color: var(--muted); font-size: .8rem; }
.notif em { display: block; font-style: normal; color: var(--muted); font-size: .72rem; margin-top: .2rem; }
.n-ic { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .8rem; }
.notif.success .n-ic { background: var(--tint-green); color: var(--green-text); }
.notif.warning .n-ic { background: var(--tint-amber); color: var(--amber-text); }
.notif.danger .n-ic { background: var(--tint-red); color: var(--red-text); }

.kpis-pw { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.4rem; }
.kpi-pw { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; box-shadow: var(--shadow-sm); position: relative; min-width: 0; }
.kpi-pw .label { color: var(--muted); font-size: .84rem; font-weight: 600; margin-top: .7rem; }
.kpi-pw .value { font-size: 1.7rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: .95rem; }
.acc-counts { display: flex; gap: 2.5rem; align-items: center; margin-top: 1rem; flex-wrap: wrap; }
.acc-counts .label { display: block; color: var(--muted); font-size: .84rem; }
.acc-counts strong { font-size: 1.8rem; }
.verify-banner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }

.acc-card .acc-name { margin: 0; font-size: 1.2rem; }
.acc-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .9rem 1.4rem; padding: .9rem 0 1rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.acc-meta strong { word-break: break-word; }
.kv-label { font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: .2rem 0 .35rem; }
.keyrow { display: flex; align-items: center; gap: .45rem; background: var(--surface-2, var(--tint-gray)); border: 1px solid var(--line); border-radius: 10px; padding: .45rem .5rem .45rem .8rem; margin-bottom: .9rem; min-width: 0; }
.keyval { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: none; padding: 0; color: var(--text); }
.keyval.link { color: var(--accent-text); }
.icon-sq { flex: none; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; display: inline-grid; place-items: center; font-size: .9rem; color: var(--text); }
.icon-sq:hover { background: var(--tint-blue); }
.icon-sq.danger { color: var(--danger); border-color: var(--red-line); }
.icon-sq.danger:hover { background: var(--tint-red); }
.acc-actions { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }

.plan-strip { display: flex; gap: 1rem; flex-wrap: wrap; margin: .6rem 0 1rem; }
.plan-strip > div { flex: 1; min-width: 160px; border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem; background: var(--tint-blue); }
.plan-strip strong { font-size: 1.3rem; display: block; }
.plan-strip span { color: var(--muted); font-size: .84rem; }
.inactive-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .85rem 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.all-active .big-check { width: 64px; height: 64px; margin: 0 auto .8rem; border-radius: 50%; display: grid; place-items: center; background: var(--tint-green); color: var(--green-text); font-size: 1.8rem; font-weight: 800; }
.all-active p { font-weight: 600; color: var(--text); }
.danger-zone { border-color: var(--red-line); }
.danger-zone h2 { color: var(--danger); }

@media (max-width: 960px) { .kpis-pw { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
  .kpis-pw { gap: .7rem; }
  .kpi-pw { padding: 1rem; }
  .kpi-pw .value { font-size: 1.3rem; }
  .acc-actions { justify-content: stretch; }
  .acc-actions .btn { flex: 1; }
  .hello { display: none; }
  .bell-wrap .notif-panel { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; }
}
.acc-head { flex-wrap: wrap; gap: .8rem; }
@media (max-width: 560px) { .acc-head .btn { width: 100%; } }
.tf-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
/* mobile auth header: logo on its own row (clear of the theme button), back link under it */
@media (max-width: 980px) {
  .auth-card { display: flex; flex-direction: column; }
  .auth-card > * { min-width: 0; }
  .auth-card .auth-logo { display: block; order: -2; align-self: flex-start; margin-bottom: 1rem; padding-right: 56px; }
  .auth-card .back-inline { order: -1; align-self: flex-start; }
  .auth-card .auth-logo .logo-h { height: 32px; }
}

/* ---- support chat ---- */
.chat-log { max-height: 55vh; overflow-y: auto; display: flex; flex-direction: column; gap: .7rem; padding: .4rem .2rem 1rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.chat-msg { max-width: 82%; padding: .7rem .9rem; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.chat-msg.mine { align-self: flex-end; background: var(--tint-blue); border-color: transparent; }
.chat-msg.theirs { align-self: flex-start; background: var(--tint-green); border-color: transparent; }
.chat-msg.note { align-self: stretch; max-width: none; background: var(--tint-amber); }
.chat-meta { font-size: .74rem; color: var(--muted); margin-bottom: .25rem; }
.chat-body { white-space: normal; word-wrap: break-word; line-height: 1.5; }
.chat-sys { align-self: center; font-size: .75rem; color: var(--muted); }
.chat-form textarea { width: 100%; }
.nav-count { margin-left: auto; background: var(--red-text, #c0392b); color: #fff; border-radius: 999px; font-size: .7rem; padding: 0 .45rem; font-weight: 700; }
/* ---- CCR calendar ---- */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: .3rem; }
.cal-h { font-size: .72rem; color: var(--muted); text-align: center; font-weight: 600; }
.cal-d { min-height: 44px; border: 1px solid var(--line); border-radius: 8px; padding: .25rem; font-size: .75rem; display: flex; flex-direction: column; }
.cal-d small { margin-top: auto; font-weight: 700; }
.cal-d.earned { background: var(--tint-amber); border-color: transparent; }
.cal-d.paid { background: var(--tint-green); border-color: transparent; }
/* ---- staff console ---- */
.tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.2rem; border-bottom: 1px solid var(--line); }
.tabs a { padding: .6rem .9rem; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 600; text-decoration: none; }
.tabs a.on { color: var(--accent-text); border-bottom-color: currentColor; }
.tabs .tcount { background: var(--tint-red); color: var(--red-text); border-radius: 999px; padding: 0 .45rem; font-size: .72rem; margin-left: .3rem; }
.desk { display: grid; grid-template-columns: 340px 1fr; gap: 1rem; align-items: start; }
.desk-list { max-height: 75vh; overflow-y: auto; padding: 0; }
.desk-item { display: block; padding: .8rem 1rem; border-bottom: 1px solid var(--line); cursor: pointer; }
.desk-item:hover, .desk-item.on { background: var(--tint-blue); }
.desk-item .t { display: flex; justify-content: space-between; gap: .5rem; font-weight: 600; }
.desk-item .s { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qr-bar { display: flex; gap: .4rem; flex-wrap: wrap; margin: .5rem 0; }
.qr-chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: .25rem .7rem; font-size: .78rem; cursor: pointer; }
.qr-chip:hover { background: var(--tint-blue); }
@media (max-width: 900px) { .desk { grid-template-columns: 1fr; } }
/* ---- support desk (staff) ---- */
.sb-tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin: 0 0 .6rem; }
.sb-tab { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: .45rem .9rem; font-weight: 600; cursor: pointer; color: var(--muted); display: inline-flex; gap: .35rem; align-items: center; }
.sb-tab.on { background: var(--tint-blue); color: var(--accent-text); border-color: transparent; }
.sb-badge { border-radius: 999px; padding: 0 .45rem; font-size: .72rem; font-weight: 800; background: var(--tint-gray); color: var(--gray-text); }
.sb-badge.red { background: var(--tint-red); color: var(--red-text); }
.sb-badge.amber { background: var(--tint-amber); color: var(--amber-text); }
.sb-toolbar { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: .8rem; }
.sb-hint { flex-basis: 100%; font-size: .82rem; color: var(--muted); }
.sb-sel, .sb-search { max-width: 220px; padding: .35rem .6rem; font-size: .85rem; }
.sb-chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: .25rem .7rem; font-size: .8rem; cursor: pointer; }
.sb-chip.on { background: var(--tint-blue); font-weight: 700; }
.sb-stats { padding: 1rem 1.2rem; }
.sb-spark { display: flex; gap: 3px; align-items: flex-end; height: 44px; }
.sb-spark span { flex: 1; background: var(--accent-text, #1446ff); opacity: .55; border-radius: 3px 3px 0 0; min-width: 6px; }
.desk { display: grid; grid-template-columns: 360px 1fr; gap: 1rem; align-items: start; }
.desk-list { max-height: 78vh; overflow-y: auto; padding: 0; }
.desk-item { display: flex; gap: .7rem; padding: .8rem 1rem; border-bottom: 1px solid var(--line); cursor: pointer; }
.desk-item:hover, .desk-item.on { background: var(--tint-blue); }
.desk-item .sb-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .2rem; }
.desk-item .t { display: flex; justify-content: space-between; gap: .5rem; font-size: .9rem; }
.desk-item .t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.desk-item .t span { font-size: .75rem; white-space: nowrap; }
.desk-item .s { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-meta { display: flex; gap: .4rem; font-size: .75rem; min-width: 0; }
.sb-topic { color: var(--green-text); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 170px; }
.sb-av { width: 34px; height: 34px; border-radius: 50%; background: var(--tint-green); color: var(--green-text); font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sb-av.big { width: 42px; height: 42px; font-size: 1.05rem; }
.sup-pane { padding: 0; overflow: hidden; }
.sup-head { display: flex; justify-content: space-between; gap: .8rem; flex-wrap: wrap; align-items: center; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); }
.sup-chips { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; font-size: .78rem; margin-top: .2rem; }
.sup-body { display: flex; min-height: 0; }
.sup-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sup-main .chat-log { max-height: 60vh; min-height: 300px; margin: 0; padding: 1rem; border-bottom: 1px solid var(--line); }
.sup-composer { position: relative; padding: .7rem 1rem 1rem; display: flex; flex-direction: column; gap: .4rem; }
.sup-row { display: flex; gap: .5rem; align-items: flex-end; }
.sup-row select { max-width: 150px; }
.sup-row textarea { flex: 1; min-height: 44px; max-height: 140px; resize: none; }
.sup-side { width: 290px; flex-shrink: 0; border-left: 1px solid var(--line); padding: 1rem; max-height: 76vh; overflow-y: auto; }
.side-row { display: flex; justify-content: space-between; gap: .5rem; align-items: center; padding: .35rem 0; border-bottom: 1px solid var(--line); font-size: .82rem; }
.tx-card { border: 1px solid var(--line); border-radius: 10px; padding: .6rem .7rem; margin: .4rem 0; font-size: .85rem; display: flex; flex-direction: column; gap: .2rem; }
.qr-pop { position: absolute; left: 1rem; right: 1rem; bottom: 100%; margin-bottom: .4rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .7rem; box-shadow: 0 12px 32px rgba(0,0,0,.2); z-index: 5; max-height: 50vh; overflow-y: auto; }
.qr-chip.on { background: var(--tint-blue); font-weight: 700; }
.reply-bar { display: flex; gap: .6rem; align-items: center; background: var(--tint-blue); border-left: 3px solid var(--green-text); border-radius: 8px; padding: .4rem .6rem; }
.reply-bar > div { flex: 1; min-width: 0; }
.msg-tag { display: flex; gap: .4rem; flex-wrap: wrap; font-size: .72rem; font-weight: 700; margin-bottom: .25rem; }
.msg-tag a { color: inherit; background: rgba(0,0,0,.06); border-radius: 6px; padding: 0 .35rem; text-decoration: none; }
.msg-quote { cursor: pointer; border-left: 3px solid var(--green-text); background: rgba(0,0,0,.05); border-radius: 6px; padding: .3rem .5rem; margin-bottom: .35rem; font-size: .78rem; }
.msg-quote div { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; opacity: .85; }
.chat-msg.bot { background: var(--tint-gray); }
.chat-msg.flash, .chat-report.flash { box-shadow: 0 0 0 3px rgba(255,190,90,.8); transition: box-shadow .3s; }
.chat-report { align-self: center; max-width: 82%; background: var(--tint-amber); color: var(--amber-text); border-radius: 10px; padding: .5rem .8rem; font-size: .8rem; }
.chat-day { align-self: center; font-size: .72rem; color: var(--muted); background: var(--tint-gray); border-radius: 999px; padding: .15rem .8rem; }
.chat-divider { align-self: stretch; text-align: center; font-size: .72rem; color: var(--green-text); border-top: 1px dashed var(--green-text); padding-top: .2rem; }
.shot img { max-width: 220px; max-height: 260px; border-radius: 8px; cursor: zoom-in; display: block; margin: .2rem 0; }
.shot-gone { font-size: .78rem; opacity: .75; font-style: italic; }
.shot-viewer { position: fixed; inset: 0; background: rgba(0,0,0,.85); z-index: 10000; display: flex; align-items: center; justify-content: center; cursor: zoom-out; }
.shot-viewer img { max-width: 94vw; max-height: 92vh; border-radius: 8px; }
.shot-viewer button { position: absolute; top: 16px; right: 20px; background: none; border: 0; color: #fff; font-size: 2rem; cursor: pointer; }
@media (max-width: 1100px) { .sup-body { flex-direction: column; } .sup-side { width: auto; border-left: 0; border-top: 1px solid var(--line); max-height: none; } }
@media (max-width: 900px) { .desk { grid-template-columns: 1fr; } }
/* ---- merchant chat widget ---- */
.cw-fab { position: fixed; right: 22px; bottom: 22px; z-index: 900; width: 58px; height: 58px; border-radius: 50%; border: 0; background: var(--royal, #1446ff); color: #fff; font-size: 1.6rem; cursor: pointer; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.cw-badge { position: absolute; top: -2px; right: -2px; background: #e53935; color: #fff; border-radius: 999px; font-size: .7rem; font-weight: 800; padding: 0 .4rem; }
.cw-win { position: fixed; right: 22px; bottom: 92px; z-index: 900; width: 370px; max-width: calc(100vw - 24px); height: 560px; max-height: calc(100vh - 120px); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 16px 48px rgba(0,0,0,.25); display: flex; flex-direction: column; overflow: hidden; }
.cw-head { padding: .9rem 1rem; background: var(--royal, #1446ff); color: #fff; display: flex; justify-content: space-between; align-items: center; }
.cw-body { flex: 1; overflow-y: auto; padding: .9rem; display: flex; flex-direction: column; gap: .6rem; }
.cw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; }
.cw-sc { text-align: left; border: 1px solid var(--line); background: var(--tint-blue); border-radius: 10px; padding: .5rem .6rem; font-size: .8rem; font-weight: 600; cursor: pointer; }
.cw-sc.primary { grid-column: 1 / -1; background: var(--royal, #1446ff); color: #fff; border-color: transparent; }
.cw-cb { display: flex; gap: .5rem; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: .5rem .7rem; font-size: .88rem; cursor: pointer; }
.cw-cb input { width: auto; }
.dash-reply-banner { display: flex; gap: .8rem; align-items: center; cursor: pointer; }
.wd-bar { display: flex; justify-content: space-between; gap: .6rem; flex-wrap: wrap; align-items: center; margin: .6rem 1rem 0; padding: .6rem .8rem; border-radius: 10px; background: var(--tint-amber); color: var(--amber-text); }
.wd-bar.overdue { background: var(--tint-red); color: var(--red-text); }
/* ---- charts (validated palette: categorical slots 1-3, blue sequential ramp) ---- */
:root { --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --viz-grid: #e9edf5;
  --seq-1: #cde2fb; --seq-2: #9ec5f4; --seq-3: #6da7ec; --seq-4: #3987e5; --seq-5: #256abf; --seq-6: #184f95; --seq-0: #f1f4fa; }
[data-theme="dark"] { --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --viz-grid: #1c2a5c;
  --seq-1: #104281; --seq-2: #1c5cab; --seq-3: #2a78d6; --seq-4: #5598e7; --seq-5: #86b6ef; --seq-6: #b7d3f6; --seq-0: #0f1c47; }
.viz-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; margin-bottom: 1.2rem; box-shadow: var(--shadow-sm); min-width: 0; }
.viz-head { display: flex; justify-content: space-between; gap: .8rem; align-items: flex-start; margin-bottom: .5rem; }
.viz-head h3 { margin: 0; font-size: 1rem; }
.viz-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; flex-shrink: 0; }
.viz-toggle button { border: 0; background: transparent; padding: .2rem .7rem; font-size: .75rem; cursor: pointer; color: var(--muted); }
.viz-toggle button.on { background: var(--tint-blue); color: var(--accent-text); font-weight: 700; }
.viz { width: 100%; display: block; overflow: visible; }
.viz-grid { stroke: var(--viz-grid); stroke-width: 1; }
.viz-axis { fill: var(--muted); font-size: 11px; }
.viz-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.viz-line.dashed { stroke-dasharray: 5 4; opacity: .75; }
.viz-dot { stroke: var(--surface); stroke-width: 2; }
.viz-cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.viz-hit { fill: transparent; cursor: crosshair; outline: none; }
.viz-legend { display: flex; flex-wrap: wrap; gap: .9rem; font-size: .8rem; color: var(--muted); margin-bottom: .4rem; }
.viz-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.viz-sw { width: 12px; height: 12px; border-radius: 3px; background: var(--c); display: inline-block; flex-shrink: 0; }
.viz-sw.dashed { height: 2px; border-radius: 0; background: repeating-linear-gradient(90deg, var(--c) 0 4px, transparent 4px 7px); }
.viz-tip { position: fixed; z-index: 10001; display: none; pointer-events: none; background: var(--surface); color: inherit; border: 1px solid var(--line); border-radius: 10px; padding: .5rem .7rem; font-size: .8rem; box-shadow: 0 8px 24px rgba(0,0,0,.18); min-width: 150px; }
.viz-tip-row { display: flex; gap: .5rem; align-items: center; margin-top: .2rem; }
.viz-tip-row span:not(.viz-sw) { flex: 1; color: var(--muted); }
.viz-cell { cursor: pointer; outline: none; fill: var(--seq-0); }
.viz-cell:focus, .viz-cell:hover { stroke: var(--accent-text); stroke-width: 1.5; }
.seq-1 { fill: var(--seq-1); background: var(--seq-1); } .seq-2 { fill: var(--seq-2); background: var(--seq-2); } .seq-3 { fill: var(--seq-3); background: var(--seq-3); }
.seq-4 { fill: var(--seq-4); background: var(--seq-4); } .seq-5 { fill: var(--seq-5); background: var(--seq-5); } .seq-6 { fill: var(--seq-6); background: var(--seq-6); }
.viz-ramp { display: flex; align-items: center; gap: 2px; margin-top: .4rem; }
.viz-ramp span { width: 14px; height: 10px; border-radius: 2px; display: inline-block; }
.viz-hbars, .viz-funnel { display: flex; flex-direction: column; gap: .45rem; }
.viz-hrow, .viz-frow { display: grid; grid-template-columns: minmax(110px, 38%) 1fr 128px; gap: .6rem; align-items: center; font-size: .85rem; }
.viz-hlabel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viz-htrack { height: 12px; background: var(--seq-0); border-radius: 0 4px 4px 0; overflow: hidden; }
.viz-hbar, .viz-fbar { display: block; height: 100%; background: var(--series-1); border-radius: 0 4px 4px 0; }
.viz-frow.worst .viz-fbar { background: var(--series-2); }
.viz-hval { font-weight: 700; text-align: right; white-space: nowrap; }
.viz-hval small { display: block; font-weight: 400; color: var(--muted); font-size: .72rem; }
.an-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.2rem; }
.an-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .8rem; margin-bottom: 1.2rem; }
.an-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1rem; }
.an-kpi .label { font-size: .78rem; color: var(--muted); }
.an-kpi .value { font-size: 1.45rem; font-weight: 800; margin-top: .15rem; }
.an-kpi .sub { font-size: .75rem; color: var(--muted); margin-top: .15rem; }
.delta { font-size: .75rem; font-weight: 700; margin-left: .3rem; white-space: nowrap; }
.delta.up { color: var(--green-text); } .delta.down { color: var(--red-text); } .delta.flat { color: var(--muted); }
.an-insights { margin: 0; padding-left: 1.1rem; } .an-insights li { margin: .25rem 0; }
.an-filters { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.an-filters .seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.an-filters .seg button { white-space: nowrap; }
.an-filters .seg button { border: 0; background: var(--surface); padding: .35rem .8rem; cursor: pointer; font-size: .82rem; color: var(--muted); }
.an-filters .seg button.on { background: var(--tint-blue); color: var(--accent-text); font-weight: 700; }
.an-section { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 800; margin: 1.6rem 0 .7rem; }
@media (max-width: 960px) { .an-grid { grid-template-columns: 1fr; } }

.seg .seg-label{padding:0 .55rem 0 .4rem;font-size:.78rem;color:var(--muted);align-self:center}
/* change badge under big KPI numbers so long amounts aren't cut off */
.kpi-pw .value .delta { display: block; margin: .2rem 0 0; font-size: .78rem; }
.sidebar .foot #biz-email, .sidebar .foot #biz-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.paid-to { display: flex; gap: .6rem; align-items: baseline; padding: .65rem .8rem; border: 1px dashed var(--line); border-radius: 10px; background: var(--bg); }

/* support desk: one bar on top (tabs + actions), filters belong to the list column, stats in a panel */
.desk-bar { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; margin-bottom: 1rem; }
.desk-bar .sb-tabs { margin: 0; }
.desk-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.desk-col { padding: 0; overflow: hidden; }
.desk-col .desk-list { max-height: 72vh; border-radius: 0; box-shadow: none; }
.desk-tools { display: flex; flex-direction: column; gap: .5rem; padding: .8rem; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.desk-tools .sb-sel, .desk-tools .sb-search { max-width: none; width: 100%; }
.desk-tools > .sb-chip, .desk-tools > #dk-alldone { align-self: flex-start; }
.desk-tools:has(.sb-chip) { flex-direction: row; flex-wrap: wrap; }
.desk-tools:has(.sb-chip) .sb-search, .desk-tools:has(.sb-chip) .sb-sel { flex-basis: 100%; }
.desk-pick { min-height: 240px; display: grid; place-items: center; }
.sup-head { flex-wrap: nowrap; align-items: flex-start; }
.sup-head-who { display: flex; gap: .8rem; align-items: center; min-width: 0; flex: 1; }
.sup-head-act { flex-shrink: 0; }
.desk-item .sb-meta { flex-wrap: wrap; align-items: center; }
.desk-item .sb-meta .pill { white-space: nowrap; }
@media (max-width: 700px) { .sup-head { flex-wrap: wrap; } .desk-actions { width: 100%; } }
.desk-sel2 { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.desk-tools .desk-sel2 .sb-sel { min-width: 0; }
.tx-row-act { display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; flex-shrink: 0; }

/* admin analytics: one page per question */
.an-pages { display: flex; gap: .3rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: 0 0 1.4rem; }
.an-pages a { padding: .55rem .9rem; color: var(--muted); font-weight: 600; font-size: .92rem; border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none; }
.an-pages a:hover { color: var(--ink); text-decoration: none; }
.an-pages a.on { color: var(--accent-text); border-bottom-color: var(--accent-text); }
.an-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.an-head h2 { margin: 0 0 .15rem; font-size: 1.55rem; }
.an-head p { margin: 0; }
.an-head-tools { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.an-head-tools .seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.an-head-tools .seg button { border: 0; background: var(--surface); padding: .35rem .8rem; cursor: pointer; font-size: .82rem; color: var(--muted); white-space: nowrap; }
.an-head-tools .seg button.on { background: var(--tint-blue); color: var(--accent-text); font-weight: 700; }
.an-asof { margin: .6rem 0 1.2rem; }
.an-hero { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9rem; margin-bottom: 1.2rem; }
.an-hero .an-kpi { padding: 1.1rem 1.2rem; }
.an-hero .an-kpi .value { font-size: 1.85rem; }
.an-story h3, .an-h3 { font-size: 1.05rem; margin: 0 0 .5rem; }
.an-h3 { margin: 1.6rem 0 .7rem; }
.an-defs { margin: 1.4rem 0 .4rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: .7rem 1rem; }
.an-defs summary { cursor: pointer; font-weight: 600; font-size: .9rem; }
.an-defs dl { margin: .7rem 0 .2rem; display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: .45rem 1rem; font-size: .88rem; }
.an-defs dt { font-weight: 700; }
.an-defs dd { margin: 0; color: var(--muted); }
@media (max-width: 900px) { .an-hero { grid-template-columns: 1fr 1fr; } .an-defs dl { grid-template-columns: 1fr; } .an-defs dd { margin-bottom: .4rem; } }
@media print {
  header, .topbar, .tabs, .an-pages, .an-head-tools, .viz-toggle, .an-noprint, .theme-toggle { display: none !important; }
  body, .content { background: #fff !important; }
  .an-defs { display: block; } .an-defs[open] summary, .an-defs summary { list-style: none; }
  .viz-card, .card, .an-kpi { break-inside: avoid; box-shadow: none !important; }
  .an-grid { grid-template-columns: 1fr 1fr; }
}
.an-kpis.an-row4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .an-kpis.an-row4 { grid-template-columns: 1fr 1fr; } }
.an-kpis.an-row3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .an-kpis.an-row3 { grid-template-columns: 1fr; } }
.an-kpis.an-row6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1100px) { .an-kpis.an-row6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .an-kpis.an-row6 { grid-template-columns: 1fr 1fr; } }
.wcode { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8rem; letter-spacing: .04em; background: var(--tint-gray); color: var(--ink); padding: .05rem .35rem; border-radius: 5px; }
.aff-link { display: grid; gap: .7rem; }
.aff-link .keyrow { max-width: 640px; }

/* ---------- homepage: feature bento with live examples ---------- */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: minmax(210px, auto); gap: 1.2rem; }
.tile { position: relative; border-radius: 22px; padding: 1.6rem; overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.tile h3 { font-size: 1.2rem; margin: .7rem 0 .45rem; color: var(--ink); line-height: 1.3; }
.tile p { color: var(--muted); font-size: .94rem; margin: 0; }
.tile-tag { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 700; padding: .3rem .7rem; border-radius: 999px; background: var(--tint-blue); color: var(--accent-text); }
.tile-tag.green { background: var(--tint-green); color: var(--green-text); }
.tile-tag.light { background: rgba(255, 255, 255, .12); color: #fff; }

/* STK: big dark tile with a phone */
.tile-stk { grid-column: span 2; grid-row: span 2; background: var(--deep-grad); border: 0; color: #fff; display: grid; grid-template-columns: 1fr 250px; gap: 1.5rem; align-items: center; padding: 2.2rem; }
.tile-stk::after { content: ""; position: absolute; right: -120px; top: -140px; width: 380px; height: 380px; border-radius: 50%; border: 46px solid rgba(143, 220, 0, .12); }
.tile-stk .tile-tag { background: rgba(255, 255, 255, .14); color: #fff; }
.tile-stk h3 { color: #fff; font-size: clamp(1.5rem, 2.4vw, 2rem); letter-spacing: -.02em; }
.tile-stk p { color: #d4defe; font-size: 1rem; max-width: 34ch; }
.phone { position: relative; z-index: 1; width: 230px; height: 400px; border-radius: 36px; background: #050c2e; border: 8px solid #1b2a6b; box-shadow: 0 30px 60px rgba(0, 0, 0, .35); justify-self: center; }
.phone-notch { width: 90px; height: 18px; background: #1b2a6b; border-radius: 0 0 12px 12px; margin: 0 auto; }
.phone-screen { padding: .6rem .8rem; height: calc(100% - 18px); background: linear-gradient(180deg, #0e1d5c, #08123d); border-radius: 0 0 28px 28px; display: flex; flex-direction: column; }
.phone-time { color: #c9d4ff; font-size: .72rem; text-align: center; margin-bottom: 2.4rem; }
.prompt { background: #f4f6fb; color: #111a3d; border-radius: 14px; padding: .9rem .85rem .7rem; font-size: .8rem; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.prompt p { margin: 0 0 .7rem; color: #111a3d; font-size: .8rem; }
.pin { border-bottom: 2px solid var(--green); padding: .3rem 0; color: #5a6788; font-size: .72rem; display: flex; justify-content: space-between; }
.pin span { color: #111a3d; letter-spacing: .3em; font-weight: 700; }
.prompt-btns { display: flex; justify-content: flex-end; gap: 1.1rem; margin-top: .7rem; font-weight: 700; font-size: .78rem; color: #5a6788; }
.prompt-btns .ok { color: var(--green-deep); }
.toast-paid { position: absolute; z-index: 2; left: 2.2rem; bottom: 2rem; display: flex; gap: .7rem; align-items: center; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); backdrop-filter: blur(8px); padding: .7rem 1rem; border-radius: 14px; }
.toast-paid i { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--green); color: #fff; font-style: normal; font-weight: 800; }
.toast-paid b { display: block; font-size: .9rem; }
.toast-paid span { font-size: .75rem; color: #c9d4ff; }

/* links: chat */
.chat { display: flex; flex-direction: column; gap: .5rem; margin-top: .8rem; background: var(--bg); border-radius: 14px; padding: .8rem; }
.bubble { margin: 0; padding: .55rem .75rem; border-radius: 12px; font-size: .82rem; max-width: 88%; line-height: 1.45; }
.bubble.out { align-self: flex-end; background: #d9fdd3; color: #0f2a12; border-bottom-right-radius: 4px; }
.bubble.out u { color: #0a5bd8; }
.bubble.in { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); color: var(--ink); border-bottom-left-radius: 4px; }
[data-theme="dark"] .bubble.out { background: #134d37; color: #e3ffe9; }
[data-theme="dark"] .bubble.out u { color: #8cc4ff; }

/* webhooks: dark code */
.tile-hook { background: #0b1a52; border-color: #1d2f7a; }
.tile-hook h3 { color: #fff; }
.tile-hook pre { margin: .8rem 0 .6rem; background: rgba(0, 0, 0, .25); border-radius: 12px; padding: .8rem .9rem; color: #e6ecff; font-size: .74rem; line-height: 1.6; overflow-x: auto; }
.tile-hook pre .k { color: #8fdc00; font-weight: 700; } .tile-hook pre .ok { color: #8fdc00; } .tile-hook pre .s { color: #7fd3ff; } .tile-hook pre .n { color: #ffd479; }
.small-light { color: #a8b8ef !important; font-size: .82rem !important; }

/* sandbox: chips */
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .8rem 0; }
.chips .c { font-size: .76rem; font-weight: 700; padding: .25rem .6rem; border-radius: 999px; }
.chips .ok { background: var(--tint-green); color: var(--green-text); }
.chips .no { background: var(--tint-red); color: var(--red-text); }
.chips .wait { background: var(--tint-amber); color: var(--amber-text); }

/* dashboard: wide tile with a table */
.tile-dash { grid-column: span 2; display: grid; grid-template-columns: .8fr 1.2fr; gap: 1.4rem; align-items: center; }
.mini-table { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; font-size: .8rem; }
.mini-table .r { display: grid; grid-template-columns: 1.3fr 1.2fr .8fr .9fr; padding: .55rem .8rem; border-top: 1px solid var(--line); color: var(--ink); align-items: center; }
.mini-table .r.h { border-top: 0; background: var(--bg); color: var(--muted); font-weight: 700; font-size: .72rem; }
.mini-table .r span:nth-child(3) { text-align: right; padding-right: .8rem; font-weight: 600; }
.st { font-size: .7rem; font-weight: 700; padding: .15rem .5rem; border-radius: 999px; justify-self: start; }
.st.ok { background: var(--tint-green); color: var(--green-text); } .st.no { background: var(--tint-red); color: var(--red-text); }

/* secure */
.ticks { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; gap: .45rem; }
.ticks li { position: relative; padding-left: 1.5rem; font-size: .9rem; color: var(--muted); }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 1.05rem; height: 1.05rem; border-radius: 50%; background: var(--tint-green); color: var(--green-text); font-size: .68rem; font-weight: 800; display: grid; place-items: center; margin-top: .2rem; }

/* ---------- homepage: analytics band ---------- */
.an-band-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 3.5rem; align-items: center; position: relative; z-index: 1; }
.an-band-copy h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin: 0 0 .8rem; }
.an-band-copy > p { color: #d4defe; font-size: 1.05rem; }
.an-ticks { list-style: none; padding: 0; margin: 1.4rem 0 1.8rem; display: grid; gap: .7rem; }
.an-ticks li { position: relative; padding-left: 1.8rem; color: #d4defe; }
.an-ticks li b { color: #fff; }
.an-ticks li::before { content: "✓"; position: absolute; left: 0; top: .15rem; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: rgba(143, 220, 0, .2); color: #b6f24a; font-size: .72rem; font-weight: 800; display: grid; place-items: center; }
.btn-light-on-dark { background: #fff; color: var(--navy) !important; font-weight: 700; }
.an-dash { margin: 0; background: #fff; border-radius: 22px; padding: 1.3rem 1.4rem 1rem; box-shadow: 0 40px 80px rgba(0, 0, 0, .35); color: #0b1640; }
[data-theme="dark"] .an-dash { background: #0d1a4a; color: #edf1ff; border: 1px solid #22347e; }
.an-dash-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.an-dash .seg { display: inline-flex; border: 1px solid #dfe6f5; border-radius: 999px; overflow: hidden; font-size: .76rem; }
.an-dash .seg span { padding: .22rem .7rem; color: #5a6788; }
.an-dash .seg span.on { background: #eaf0ff; color: #1446ff; font-weight: 700; }
[data-theme="dark"] .an-dash .seg { border-color: #22347e; } [data-theme="dark"] .an-dash .seg span { color: #a8b8ef; } [data-theme="dark"] .an-dash .seg span.on { background: #1a2c70; color: #9db4ff; }
.an-dash-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-bottom: 1rem; }
.an-dash-kpis div { border-radius: 14px; padding: .7rem .8rem; background: #f4f7ff; }
[data-theme="dark"] .an-dash-kpis div { background: #13235e; }
.an-dash-kpis span { display: block; font-size: .74rem; color: #5a6788; }
[data-theme="dark"] .an-dash-kpis span { color: #a8b8ef; }
.an-dash-kpis b { display: block; font-size: 1.2rem; margin: .1rem 0; white-space: nowrap; }
.an-dash-kpis em { font-style: normal; font-size: .74rem; font-weight: 700; color: #5a6788; }
.an-dash-kpis em.up { color: #138a2c; } [data-theme="dark"] .an-dash-kpis em.up { color: #5fd16f; }
.an-dash .lbl { display: flex; justify-content: space-between; font-size: .78rem; font-weight: 700; color: #5a6788; margin-bottom: .3rem; }
[data-theme="dark"] .an-dash .lbl { color: #a8b8ef; }
.an-dash .lbl span { font-weight: 500; display: inline-flex; gap: .3rem; align-items: center; }
.an-dash .k { display: inline-block; width: 12px; height: 3px; border-radius: 2px; margin-left: .4rem; }
.an-dash .k.now { background: #1446ff; } .an-dash .k.prev { background: #b9c6ec; }
.an-dash svg { width: 100%; height: auto; display: block; }
.an-dash svg .now { fill: none; stroke: #1446ff; stroke-width: 2.5; stroke-linejoin: round; }
.an-dash svg .prev { fill: none; stroke: #b9c6ec; stroke-width: 2; stroke-dasharray: 5 5; }
.an-dash svg .dots circle { fill: #fff; stroke: #1446ff; stroke-width: 2; }
[data-theme="dark"] .an-dash svg .dots circle { fill: #0d1a4a; } [data-theme="dark"] .an-dash svg .now { stroke: #6f93ff; } [data-theme="dark"] .an-dash svg .dots circle { stroke: #6f93ff; }
.an-dash svg text { fill: #8a96b4; font-size: 10px; font-family: var(--font); }
.an-dash-chart { margin-bottom: .9rem; }
.heat { display: grid; grid-template-columns: 32px repeat(17, 1fr); gap: 3px; align-items: center; }
.heat .hd { font-size: .66rem; color: #8a96b4; }
.heat i { display: block; height: 12px; border-radius: 3px; }
.heat .l0 { background: #eef2fb; } .heat .l1 { background: #d6e0ff; } .heat .l2 { background: #a9bdff; } .heat .l3 { background: #6f90ff; } .heat .l4 { background: #3a63ff; } .heat .l5 { background: #1446ff; }
[data-theme="dark"] .heat .l0 { background: #172a66; }
.an-dash figcaption { text-align: right; font-size: .72rem; font-style: italic; color: #8a96b4; margin-top: .6rem; }

@media (max-width: 980px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .tile-stk { grid-column: span 2; grid-row: auto; }
  .tile-dash { grid-column: span 2; }
  .an-band-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .bento { grid-template-columns: 1fr; }
  .tile-stk, .tile-dash { grid-column: auto; grid-template-columns: 1fr; }
  .tile-stk { padding: 1.6rem; }
  .toast-paid { position: static; margin-top: -.5rem; }
  .an-dash-kpis { grid-template-columns: 1fr 1fr; }
}
/* fixes after first render */
.tile-secure { grid-column: span 3; display: grid; grid-template-columns: .9fr 1.1fr; gap: 1.5rem; align-items: center; }
.tile-secure .ticks { grid-template-columns: 1fr 1fr; margin: 0; gap: .7rem 1.4rem; }
.phone { height: 330px; }
.phone-time { margin-bottom: 1.6rem; }
@media (max-width: 980px) { .tile-secure { grid-column: span 2; } }
@media (max-width: 680px) { .tile-secure { grid-column: auto; grid-template-columns: 1fr; } .tile-secure .ticks { grid-template-columns: 1fr; } }
[data-theme="dark"] #features .grad-text { background: linear-gradient(100deg, #7d9cff 0%, var(--cyan) 55%, var(--green) 100%); -webkit-background-clip: text; background-clip: text; }

/* ---------- code blocks: black card with label + Copy, same in light and dark ---------- */
.codebox { background: #0d0e12; border: 1px solid #24262e; border-radius: 14px; overflow: hidden; margin: 1rem 0; box-shadow: 0 10px 28px -14px rgba(0, 0, 0, .45); }
.codebox-bar { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .4rem .5rem .4rem 1rem; background: #16181e; border-bottom: 1px solid #24262e; color: #9aa0ae; font: 600 .74rem var(--mono); letter-spacing: .02em; }
.codebox-copy { background: #24262e; color: #e6e8ee; border: 1px solid #353844; border-radius: 8px; padding: .28rem .7rem; font: 600 .75rem var(--font); cursor: pointer; line-height: 1.2; }
.codebox-copy:hover { background: #2e313b; border-color: #464a57; }
.codebox-copy:focus-visible { outline: 2px solid #7d9cff; outline-offset: 2px; }
.codebox-copy.done { background: #12351f; border-color: #1f6b3a; color: #8ff0aa; }
.codebox pre, .docs .codebox pre, [data-theme="dark"] .codebox pre, [data-theme="dark"] .docs .codebox pre, .codebox pre.json, [data-theme="dark"] .codebox pre.json {
  background: transparent; border: 0; border-radius: 0; margin: 0; color: #e8eaf0; padding: 1rem 1.15rem; box-shadow: none; }
.codebox-json pre.json { max-height: 320px; }
.tab-panel .codebox { margin-top: 0; border-top-left-radius: 0; }
.tabs button.on, [data-theme="dark"] .tabs button.on { background: #16181e; color: #fff; border-color: #24262e; }
/* homepage code card: black as well, with Copy in its title bar */
.code-card, [data-theme="dark"] .code-card { background: #0d0e12; border-color: #24262e; box-shadow: 0 30px 70px rgba(0, 0, 0, .35); }
.code-card .bar { background: #16181e; color: #9aa0ae; }
.code-card .bar .codebox-copy { margin-left: auto; }

/* ---------- admin authenticator setup ---------- */
.totp-card { max-width: 640px; }
.totp-steps { margin: 16px 0; padding-left: 22px; display: grid; gap: 18px; }
.totp-steps li { line-height: 1.55; }
.totp-key { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0 4px; }
.totp-key code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.05rem; letter-spacing: .06em;
  background: #0d0e12; color: #e9edf5; padding: 10px 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,.1); user-select: all; word-break: break-all; }
.totp-form { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.totp-form input { width: 150px; font-size: 1.25rem; letter-spacing: .2em; text-align: center; padding: 10px 12px; }
