/* ============================================================================
   AuthForge — shared design system
   Same-origin stylesheet (no third-party requests). ALL readable text is solid
   white at full opacity; hierarchy comes only from size and weight. Every card
   carries a medium-gray border. Icons are Lucide, rendered in white.
   ========================================================================== */

:root {
  --bg: #09090b;
  --bg-soft: #0e0e11;
  --surface: #131316;
  --surface-2: #17171b;
  --surface-popular: #1a1726;
  --bd: #3a3a42;            /* medium-gray card border */
  --bd-strong: #565660;
  --bd-soft: #26262d;       /* subtle dividers / grid */
  --text: #ffffff;          /* the only text color */
  --indigo: #a99bf7;
  --indigo-strong: #6d5fe0;
  --maxw: 1240px;
  --radius: 16px;
  --radius-sm: 12px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: ""; position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(900px 520px at 14% -8%, rgba(139, 123, 240, 0.10), transparent 60%),
    radial-gradient(820px 480px at 90% 2%, rgba(99, 102, 241, 0.08), transparent 58%);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background-image:
    linear-gradient(var(--bd-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--bd-soft) 1px, transparent 1px);
  background-size: 58px 58px; opacity: .5;
  mask-image: radial-gradient(circle at 50% 16%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at 50% 16%, #000 0%, transparent 70%);
}

a { color: var(--text); text-decoration: none; }
svg { display: block; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Icons — Lucide, white */
.ic { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; fill: none;
  stroke-linecap: round; stroke-linejoin: round; color: var(--text); flex-shrink: 0; }

/* Eyebrow */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text); background: var(--surface);
  border: 1px solid var(--bd); padding: 7px 14px; border-radius: 999px;
}
.eyebrow .ic { width: 14px; height: 14px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-weight: 600; font-size: 15px; padding: 13px 22px; border-radius: 12px;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform .15s ease, background .2s ease, border-color .2s ease, box-shadow .25s ease;
}
.btn .ic { width: 17px; height: 17px; }
.btn-primary { color: #0a0a0c; background: #ffffff; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -14px rgba(255,255,255,.4); }
.btn-outline { color: var(--text); background: transparent; border-color: var(--bd-strong); }
.btn-outline:hover { background: var(--surface-2); border-color: var(--text); transform: translateY(-2px); }
.btn-current { color: var(--text); background: var(--surface-2); border-color: var(--bd); cursor: default; }
.btn-block { width: 100%; }

/* ---- Nav (mobile-first; links cluster right on desktop) ---- */
header.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(9, 9, 11, 0.92);
  backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--bd-soft);
}
.nav-inner {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 10px 16px; min-height: 64px; position: relative;
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; font-size: 18px; letter-spacing: -0.01em; flex-shrink: 0; color: var(--text); }
.brand .logo { width: 32px; height: 32px; object-fit: contain; display: block; }
.auth-card .brand .logo { width: 44px; height: 44px; }
.menu-check {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: auto; padding: 9px; cursor: pointer;
  border: 1px solid var(--bd); border-radius: 10px; background: var(--surface);
  color: var(--text); flex-shrink: 0;
}
.menu-toggle .ic { width: 22px; height: 22px; }
.nav-right {
  display: none; flex-direction: column; align-items: stretch;
  width: 100%; gap: 18px; padding: 4px 0 16px;
  border-top: 1px solid var(--bd-soft);
}
.menu-check:checked ~ .nav-right { display: flex; }
.menu-check:checked ~ .menu-toggle { border-color: var(--text); background: var(--surface-2); }
body:has(.menu-check:checked) { overflow: hidden; }
.nav-links {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 14px; margin: 0; padding-top: 14px;
}
.nav-links a { color: var(--text); font-size: 15px; font-weight: 600; padding: 4px 0; }
.nav-links a:hover { text-decoration: underline; text-underline-offset: 5px; }
.nav-cta {
  display: flex; flex-direction: column; align-items: stretch;
  gap: 10px; margin: 0;
}
.nav-cta .btn { width: 100%; justify-content: center; padding: 12px 18px; font-size: 14px; }

@media (min-width: 1025px) {
  .nav-inner { flex-wrap: nowrap; gap: 24px; min-height: 70px; }
  .menu-toggle { display: none; }
  .nav-right {
    display: flex !important; flex-direction: row; align-items: center;
    width: auto; margin-left: auto; padding: 0; border-top: none; gap: 0;
  }
  .nav-links {
    flex-direction: row; align-items: center; gap: 28px; padding-top: 0;
  }
  .nav-links a { font-size: 14.5px; font-weight: 500; }
  .nav-cta { flex-direction: row; margin-left: 28px; width: auto; gap: 12px; }
  .nav-cta .btn { width: auto; padding: 10px 18px; }
}

/* ---- Hero ---- */
.hero { padding: 96px 0 60px; text-align: center; }
.hero h1 { font-size: clamp(40px, 6vw, 74px); line-height: 1.03; letter-spacing: -0.035em; font-weight: 800; margin: 26px auto 0; max-width: 15ch; }
.hero p.sub { font-size: clamp(17px, 2.1vw, 20px); max-width: 64ch; margin: 24px auto 0; line-height: 1.6; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 36px; }
.hero-trust { margin-top: 26px; display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 13.5px; }
.hero-trust .ic { width: 15px; height: 15px; }

/* ---- Stat strip ---- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 64px; border: 1px solid var(--bd); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.stat { padding: 28px 22px; text-align: center; border-right: 1px solid var(--bd-soft); }
.stat:last-child { border-right: none; }
.stat .num { font-size: clamp(28px, 3.4vw, 38px); font-weight: 800; letter-spacing: -0.02em; }
.stat .lbl { font-size: 13.5px; margin-top: 4px; font-weight: 500; }

/* ---- Sections ---- */
section { padding: 96px 0; }
.sec-head { max-width: 66ch; margin: 0 auto 56px; text-align: center; }
.sec-head h2 { font-size: clamp(30px, 4vw, 46px); line-height: 1.08; letter-spacing: -0.025em; font-weight: 800; margin-top: 18px; }
.sec-head p { font-size: 18px; margin-top: 16px; }

/* ---- Card grids ---- */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--bd); border-radius: var(--radius); padding: 32px; transition: border-color .2s ease, transform .2s ease; }
.card:hover { border-color: var(--bd-strong); transform: translateY(-3px); }
.card .ico, .sec-item .ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--bd); margin-bottom: 18px; }
.card .ico .ic { width: 23px; height: 23px; }
.card h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.card p { font-size: 15px; margin-top: 9px; }

.secure-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.sec-item { background: var(--surface); border: 1px solid var(--bd); border-radius: var(--radius-sm); padding: 24px; transition: border-color .2s ease, transform .2s ease; }
.sec-item:hover { border-color: var(--bd-strong); transform: translateY(-3px); }
.sec-item .ico { width: 42px; height: 42px; margin-bottom: 15px; }
.sec-item .ico .ic { width: 21px; height: 21px; }
.sec-item h3 { font-size: 16.5px; font-weight: 700; }
.sec-item p { font-size: 14px; margin-top: 7px; }
.sec-item code, .card code { font-family: var(--mono); font-size: 12.5px; color: var(--text); }

/* ---- Architecture ---- */
.arch { display: grid; gap: 14px; max-width: 780px; margin: 0 auto; }
.arch-node { display: flex; align-items: center; gap: 18px; background: var(--surface); border: 1px solid var(--bd); border-radius: var(--radius-sm); padding: 20px 24px; }
.arch-node .badge { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; border: 1px solid var(--bd); padding: 6px 11px; border-radius: 7px; white-space: nowrap; }
.arch-node h4 { font-size: 15.5px; font-weight: 700; }
.arch-node p { font-size: 13.5px; margin-top: 2px; }
.arch-arrow { text-align: center; font-size: 12.5px; font-family: var(--mono); }

/* ---- Split / code ---- */
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: 44px; align-items: center; }
.split h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; letter-spacing: -0.02em; font-weight: 800; }
.split p.lead { font-size: 17px; margin-top: 16px; }
.checklist { margin-top: 24px; display: grid; gap: 14px; list-style: none; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; }
.checklist li .ic { width: 20px; height: 20px; margin-top: 1px; }
.codewrap { background: var(--bg-soft); border: 1px solid var(--bd); border-radius: var(--radius); overflow: hidden; }
.code-head { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--bd-soft); background: var(--surface); }
.dot { width: 11px; height: 11px; border-radius: 50%; background: var(--bd-strong); }
.code-title { margin-left: 10px; font-family: var(--mono); font-size: 12.5px; }
pre { margin: 0; padding: 22px; overflow-x: auto; font-family: var(--mono); font-size: 13.5px; line-height: 1.75; color: var(--text); }
pre .cm { font-style: italic; }

/* ---- Pricing ---- */
#pricing .pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; align-items: start; }
.tier { position: relative; background: var(--surface); border: 1px solid var(--bd); border-radius: var(--radius); padding: 30px; display: flex; flex-direction: column; min-height: 100%; }
.tier.popular { background: var(--surface-popular); border-color: var(--bd-strong); }
.tier-head { display: flex; align-items: center; justify-content: space-between; }
.tier h3 { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
.tier .pop-badge { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; background: var(--indigo-strong); color: #fff; padding: 5px 10px; border-radius: 7px; }
.tier .from { font-size: 13px; margin-top: 22px; }
.price { display: flex; align-items: flex-start; gap: 4px; margin-top: 8px; line-height: 1; }
.price .cur { font-size: 22px; font-weight: 600; margin-top: 8px; }
.price .amt { font-size: 56px; font-weight: 800; letter-spacing: -0.03em; }
.price .per { align-self: flex-end; font-size: 13px; margin-bottom: 9px; }
.tier .tagline { font-size: 15.5px; font-weight: 600; margin-top: 18px; }
.tier .cta { margin-top: 20px; }
.tier .feat-head { font-size: 14px; font-weight: 600; margin-top: 26px; margin-bottom: 4px; }
.tier ul.feats { list-style: none; margin-top: 18px; display: grid; gap: 13px; }
.tier ul.feats li { display: flex; align-items: flex-start; gap: 11px; font-size: 14.5px; }
.tier ul.feats li .ic { width: 18px; height: 18px; margin-top: 2px; }
.tier-spacer { flex: 1; }

.price-annual { display: none; }
#pricing:has(#bill-annual:checked) .price-monthly { display: none; }
#pricing:has(#bill-annual:checked) .price-annual { display: inline; }

.pricing-foot { display: flex; align-items: center; justify-content: center; position: relative; margin-top: 40px; }
.billing-toggle { display: inline-flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--bd); border-radius: 999px; padding: 5px; }
.billing-toggle input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.billing-toggle label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; padding: 9px 20px; border-radius: 999px; cursor: pointer; transition: background .2s ease, color .2s ease; }
.billing-toggle label em { font-style: normal; font-size: 11px; font-family: var(--mono); border: 1px solid var(--bd); border-radius: 6px; padding: 2px 6px; }
.billing-toggle input:checked + label { background: #fff; color: #0a0a0c; }
.billing-toggle input:checked + label em { border-color: rgba(10,10,12,.35); }
.country { position: absolute; right: 0; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--bd); border-radius: 10px; padding: 8px 12px; background: var(--surface); }
.country .ic { width: 16px; height: 16px; }
.country select { appearance: none; -webkit-appearance: none; background: transparent; border: none; color: var(--text); font-family: var(--font); font-size: 14px; font-weight: 500; padding-right: 4px; cursor: pointer; }
.country select option { background: #131316; color: #fff; }

.enterprise-cta { text-align: center; margin-top: 64px; padding-top: 56px; border-top: 1px solid var(--bd-soft); }
.enterprise-cta .ic { width: 26px; height: 26px; margin: 0 auto 14px; }
.enterprise-cta p { font-size: 18px; font-weight: 600; }
.enterprise-cta a { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* ---- Comparison table ---- */
.cmp-f, .cmp-a, .cmp-o { padding: 16px 22px; font-size: 14.5px; text-align: left; border-bottom: 1px solid var(--bd-soft); }
.cmp-f { font-weight: 500; }
.cmp-a { font-weight: 700; }
.cmp-o { font-weight: 400; }

/* ---- Compliance band ---- */
.band { border: 1px solid var(--bd); border-radius: var(--radius); background: var(--surface); padding: 48px; }
.badges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 32px; }
.badge-card { text-align: center; padding: 26px 16px; border: 1px solid var(--bd); border-radius: var(--radius-sm); background: var(--surface-2); }
.badge-card .ic { width: 38px; height: 38px; margin: 0 auto 13px; }
.badge-card h4 { font-size: 15px; font-weight: 700; }
.badge-card p { font-size: 12.5px; margin-top: 4px; }

/* ---- Final CTA ---- */
.final { text-align: center; border: 1px solid var(--bd); border-radius: 24px; background: var(--surface); padding: 70px 32px; }
.final h2 { font-size: clamp(32px, 4.5vw, 50px); line-height: 1.06; letter-spacing: -0.03em; font-weight: 800; max-width: 18ch; margin: 0 auto; }
.final p { font-size: 18px; margin: 18px auto 0; max-width: 56ch; }

/* ---- Footer (fully white) ---- */
footer { border-top: 1px solid var(--bd); padding: 66px 0 40px; margin-top: 44px; }
.foot-grid { display: grid; grid-template-columns: 1.7fr repeat(4, 1fr); gap: 36px; }
.foot-brand p { font-size: 14px; margin-top: 14px; max-width: 34ch; color: var(--text); }
.foot-col h5 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--text); }
.foot-col a { display: block; font-size: 14px; margin-top: 13px; color: var(--text); }
.foot-col a:hover { text-decoration: underline; text-underline-offset: 3px; }
.foot-bottom { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; margin-top: 50px; padding-top: 26px; border-top: 1px solid var(--bd-soft); font-size: 13px; color: var(--text); width: 100%; }
.foot-inner { text-align: center; width: 100%; }
.foot-copy { text-align: center; width: 100%; margin: 0; font-size: 14px; color: var(--text); }
.copyright { font-weight: 700; color: var(--text); font-size: 14px; text-align: center; width: 100%; margin: 0 auto; }
.copyright a { color: var(--text); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.foot-bottom .secure-note { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--mono); text-align: center; }
.foot-bottom .secure-note .ic { width: 14px; height: 14px; }

/* ---- Cookie banner (thin white border, fixed to viewport bottom) ---- */
.cookie-banner {
  background: var(--bg-soft);
  border: 1px solid #ffffff;
  border-radius: 0;
  padding: 16px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  box-shadow: 0 -12px 40px -12px rgba(0, 0, 0, .65);
}
.cookie-banner.in-footer { margin: 0; }
.cookie-banner.floating { max-width: none; margin: 0; }
.cookie-banner p { font-size: 14px; color: var(--text); line-height: 1.6; }
.cookie-banner a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.cookie-actions { display: flex; gap: 10px; }
.cookie-actions .btn { padding: 10px 20px; font-size: 14px; }
@media (min-width: 620px) {
  .cookie-banner { flex-direction: row; align-items: center; justify-content: space-between; }
  .cookie-banner p { flex: 1; }
  .cookie-actions { flex-shrink: 0; }
}

/* ---- Scroll-to-top (thin white border) ---- */
.scroll-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 70;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid #ffffff; background: rgba(9,9,11,.7);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: var(--text); display: grid; place-items: center; cursor: pointer;
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, background .2s ease;
}
.scroll-top.show { opacity: 1; transform: none; pointer-events: auto; }
.scroll-top:hover { background: rgba(255,255,255,.14); }
.scroll-top svg { width: 20px; height: 20px; stroke: #fff; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* ---- Legal / docs prose ---- */
.legal { max-width: 820px; margin: 0 auto; padding: 64px 0 40px; }
.legal .eyebrow { margin-bottom: 18px; }
.legal h1 { font-size: clamp(32px, 5vw, 46px); font-weight: 800; letter-spacing: -0.03em; }
.legal .updated { font-size: 14px; margin-top: 12px; font-family: var(--mono); }
.legal h2 { font-size: 22px; font-weight: 700; margin-top: 44px; letter-spacing: -0.01em; }
.legal h3 { font-size: 17px; font-weight: 700; margin-top: 28px; }
.legal p, .legal li { font-size: 16px; line-height: 1.75; margin-top: 14px; }
.legal ul, .legal ol { margin-top: 14px; padding-left: 22px; }
.legal li { margin-top: 8px; }
.legal a { text-decoration: underline; text-underline-offset: 2px; }
.legal .toc { background: var(--surface); border: 1px solid var(--bd); border-radius: var(--radius-sm); padding: 22px 26px; margin-top: 32px; }
.legal .toc h2 { margin-top: 0; font-size: 14px; text-transform: uppercase; letter-spacing: .08em; }
.legal .toc ul { list-style: none; padding-left: 0; columns: 2; }
.note { border: 1px solid var(--bd); border-radius: var(--radius-sm); padding: 18px 22px; margin-top: 28px; font-size: 14px; }

/* ---- Docs (sidebar layout) ---- */
.docs { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 56px; padding: 56px 0 40px; align-items: start; }
.docs-nav { position: sticky; top: 92px; align-self: start; }
.docs-nav h6 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; margin: 18px 0 10px; }
.docs-nav a { display: block; font-size: 14px; padding: 6px 0; color: var(--text); }
.docs-nav a:hover { text-decoration: underline; text-underline-offset: 3px; }
.docs-main h1 { font-size: clamp(32px, 5vw, 44px); font-weight: 800; letter-spacing: -0.03em; }
.docs-main .lead { font-size: 18px; line-height: 1.7; margin-top: 16px; }
.docs-main h2 { font-size: 26px; font-weight: 800; margin-top: 56px; letter-spacing: -0.02em; scroll-margin-top: 90px; }
.docs-main h3 { font-size: 18px; font-weight: 700; margin-top: 30px; scroll-margin-top: 90px; }
.docs-main p, .docs-main li { font-size: 16px; line-height: 1.75; margin-top: 14px; }
.docs-main ul, .docs-main ol { margin-top: 14px; padding-left: 22px; }
.docs-main li { margin-top: 8px; }
.docs-main a { text-decoration: underline; text-underline-offset: 2px; }
.docs-main .codewrap { margin-top: 18px; }
.docs-main code { font-family: var(--mono); font-size: 13.5px; background: var(--surface-2); border: 1px solid var(--bd-soft); border-radius: 5px; padding: 1px 6px; }
.docs-main pre code { background: none; border: none; padding: 0; }
.doc-table { width: 100%; border-collapse: collapse; margin-top: 18px; border: 1px solid var(--bd); border-radius: var(--radius-sm); overflow: hidden; }
.doc-table th, .doc-table td { text-align: left; padding: 12px 16px; font-size: 14px; border-bottom: 1px solid var(--bd-soft); vertical-align: top; }
.doc-table th { font-weight: 700; background: var(--surface-2); }
.doc-table tr:last-child td { border-bottom: none; }
.audience { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 22px; }
.audience .card { padding: 22px; }
.audience .card h3 { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.audience .card .ic { width: 20px; height: 20px; }
.steps { counter-reset: step; list-style: none; padding-left: 0; margin-top: 18px; }
.steps li { counter-increment: step; position: relative; padding-left: 44px; margin-top: 18px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border: 1px solid var(--bd-strong); border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; }

/* ---- Auth pages (login / signup) ---- */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 96px 20px 48px; position: relative; }
body.cookie-banner-open .scroll-top { bottom: 96px; }
body.cookie-banner-open { padding-bottom: 88px; }

.auth-back { position: absolute; top: 24px; left: 24px; z-index: 60; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--text); border: 1px solid var(--bd); background: var(--surface); padding: 9px 15px; border-radius: 11px; transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.auth-back:hover { border-color: var(--text); background: var(--surface-2); transform: translateX(-2px); }
.auth-back .ic { width: 16px; height: 16px; }
.auth-card { width: 100%; max-width: 430px; background: var(--surface); border: 1px solid var(--bd); border-radius: 20px; padding: 38px 36px; animation: formRise .55s cubic-bezier(.16,1,.3,1) both; }
@keyframes formRise { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
.auth-card .brand { justify-content: center; margin-bottom: 6px; }
.auth-head { text-align: center; margin-bottom: 24px; }
.auth-head h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.auth-head p { font-size: 14.5px; margin-top: 8px; }
.field { margin-top: 16px; display: grid; gap: 7px; }
.field label { font-size: 13.5px; font-weight: 600; }
.field input { width: 100%; background: var(--bg-soft); border: 1px solid var(--bd); border-radius: 11px; padding: 12px 14px; color: var(--text); font-size: 15px; font-family: var(--font); transition: border-color .2s ease, box-shadow .2s ease; }
.field input::placeholder { color: #8b8b95; }
.field input:focus { outline: none; border-color: #ffffff; box-shadow: 0 0 0 3px rgba(255,255,255,.08); }
.auth-card form .btn { margin-top: 24px; width: 100%; }
.btn.loading { opacity: .65; pointer-events: none; }
.form-error { margin-top: 16px; font-size: 13.5px; color: var(--text); background: rgba(248,113,113,.12); border: 1px solid #f87171; border-radius: 11px; padding: 11px 14px; display: none; }
.form-error.show { display: block; animation: formRise .25s ease both; }
.auth-success { margin-top: 16px; display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--text); background: rgba(52,211,153,.12); border: 1px solid rgba(52,211,153,.5); border-radius: 11px; padding: 12px 14px; }
.auth-success .ic { width: 18px; height: 18px; color: #34d399; flex-shrink: 0; margin-top: 1px; }
.auth-success p { margin: 0; line-height: 1.55; }
.auth-alt { text-align: center; margin-top: 22px; font-size: 14px; }
.auth-alt a { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.auth-demo { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--bd-soft); text-align: center; font-size: 12.5px; font-family: var(--mono); }

/* Wide auth layout (login + setup sidebar) */
.auth-page-wide { padding-left: 20px; padding-right: 20px; }
.auth-shell { display: grid; grid-template-columns: minmax(0, 430px) minmax(0, 360px); gap: 28px; align-items: start; width: 100%; max-width: 860px; }
.auth-aside { background: var(--surface); border: 1px solid var(--bd); border-radius: 20px; padding: 28px 26px; animation: formRise .55s cubic-bezier(.16,1,.3,1) .08s both; }
.auth-aside h2 { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.auth-aside-lead { font-size: 14px; line-height: 1.6; margin-top: 10px; }
.auth-dir { display: grid; gap: 10px; margin-top: 20px; }
.auth-dir-link { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 14px 14px; border: 1px solid var(--bd-soft); border-radius: 14px; color: var(--text); transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.auth-dir-link:hover { border-color: var(--bd-strong); background: var(--surface-2); transform: translateX(2px); text-decoration: none; }
.auth-dir-ico { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--bd); border-radius: 10px; }
.auth-dir-ico .ic { width: 18px; height: 18px; }
.auth-dir-body { display: grid; gap: 3px; min-width: 0; }
.auth-dir-body strong { font-size: 14px; font-weight: 700; }
.auth-dir-body span { font-size: 12.5px; line-height: 1.45; }
.auth-dir-body code { font-family: var(--mono); font-size: 11.5px; }
.auth-dir-arrow { width: 16px; height: 16px; opacity: .7; }
.auth-aside-foot { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--bd-soft); font-size: 12.5px; line-height: 1.55; }

/* Password visibility toggle */
.field-input-wrap { position: relative; }
.field-input-wrap input { padding-right: 46px; }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: transparent; border: none; color: var(--text); padding: 6px; border-radius: 8px; cursor: pointer; opacity: .75; transition: opacity .2s ease; }
.pw-toggle:hover { opacity: 1; }
.pw-toggle .ic { width: 18px; height: 18px; display: block; }

/* Live API status on login */
.auth-api-status { display: flex; align-items: center; gap: 10px; font-size: 12.5px; font-family: var(--mono); padding: 10px 12px; border: 1px solid var(--bd-soft); border-radius: 11px; margin-bottom: 18px; }
.auth-api-dot { width: 8px; height: 8px; border-radius: 50%; background: #8b8b95; flex-shrink: 0; }
.auth-api-status.ok .auth-api-dot { background: #34d399; box-shadow: 0 0 0 3px rgba(52,211,153,.2); }
.auth-api-status.err .auth-api-dot { background: #f87171; box-shadow: 0 0 0 3px rgba(248,113,113,.2); }
.auth-api-status.wait .auth-api-dot { animation: pulse 1.2s ease infinite; }
@keyframes pulse { 0%, 100% { opacity: .4; } 50% { opacity: 1; } }

/* Configure wizard */
.cfg-page { padding: 96px 0 64px; }
.cfg-head { max-width: 720px; }
.cfg-head h1 { font-size: clamp(28px, 4vw, 38px); font-weight: 800; letter-spacing: -0.03em; }
.cfg-head .lead { margin-top: 12px; font-size: 16px; line-height: 1.65; }
.cfg-steps { margin-top: 36px; display: grid; gap: 20px; }
.cfg-step { background: var(--surface); border: 1px solid var(--bd); border-radius: var(--radius); padding: 26px 28px; }
.cfg-step h2 { font-size: 17px; font-weight: 800; display: flex; align-items: center; gap: 12px; }
.cfg-step-num { width: 30px; height: 30px; border: 1px solid var(--bd-strong); border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 700; flex-shrink: 0; }
.cfg-step p { margin-top: 12px; font-size: 14.5px; line-height: 1.6; }
.cfg-step ul { margin-top: 12px; padding-left: 20px; font-size: 14.5px; line-height: 1.65; }
.cfg-copy { margin-top: 14px; position: relative; }
.cfg-copy pre { margin: 0; padding: 14px 16px; padding-right: 72px; background: var(--bg-soft); border: 1px solid var(--bd-soft); border-radius: 11px; font-family: var(--mono); font-size: 12.5px; line-height: 1.65; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }
.cfg-copy-btn { position: absolute; top: 10px; right: 10px; font-size: 12px; font-weight: 700; padding: 6px 12px; border: 1px solid var(--bd); border-radius: 8px; background: var(--surface); color: var(--text); cursor: pointer; transition: background .2s ease; }
.cfg-copy-btn:hover { background: var(--surface-2); }
.cfg-copy-btn.done { border-color: #34d399; }
.cfg-note { margin-top: 32px; }
.cfg-planner { background: var(--surface); border: 1px solid var(--bd); border-radius: var(--radius); padding: 28px 28px 24px; margin-top: 28px; }
.cfg-planner h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.cfg-planner > p { margin-top: 10px; font-size: 14.5px; line-height: 1.6; }
.cfg-hint { margin-top: 14px; font-size: 12.5px; font-family: var(--mono); opacity: .9; }
.field-hint { font-size: 12px; opacity: .85; }
.field .optional { font-weight: 500; opacity: .75; }
.cfg-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.cfg-tab { font-family: var(--font); font-size: 14px; font-weight: 700; padding: 10px 18px; border: 1px solid var(--bd); border-radius: 999px; background: var(--surface); color: var(--text); cursor: pointer; transition: border-color .2s ease, background .2s ease; }
.cfg-tab:hover { border-color: var(--bd-strong); background: var(--surface-2); }
.cfg-tab.active { border-color: var(--text); background: var(--surface-2); }
.docs-callout { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; padding: 20px 22px; border: 1px solid var(--bd); border-radius: var(--radius); background: var(--surface); }
.docs-callout p { margin: 0; font-size: 15px; max-width: 52ch; line-height: 1.55; }
.docs-callout-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cfg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }
.cfg-grid .field { margin-top: 0; }

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; max-width: 430px; }
  .auth-aside { order: 2; }
  .cfg-grid { grid-template-columns: 1fr; }
}

/* ---- Dashboard ---- */
.dash { padding: 56px 0 40px; }
.dash-head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.dash-head h1 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 800; letter-spacing: -0.02em; }
.dash-head p { font-size: 15px; margin-top: 6px; }
.plan-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; border: 1px solid var(--bd-strong); border-radius: 999px; padding: 8px 15px; }
.plan-badge .ic { width: 15px; height: 15px; }
.dash-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 32px; }
.dash-card { background: var(--surface); border: 1px solid var(--bd); border-radius: var(--radius); padding: 26px 28px; }
.dash-card h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; }
.kv { margin-top: 18px; display: grid; gap: 13px; }
.kv-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; font-size: 14.5px; }
.kv-row .v { font-weight: 700; font-family: var(--mono); font-size: 13px; text-align: right; word-break: break-all; }
.ent-list { margin-top: 18px; display: grid; gap: 12px; list-style: none; }
.ent-list li { display: flex; align-items: center; gap: 11px; font-size: 14.5px; }
.ent-list li .ic { width: 18px; height: 18px; }
.dash-loading { margin-top: 40px; text-align: center; font-size: 15px; font-family: var(--mono); }
.audit-out { margin-top: 16px; background: var(--bg-soft); border: 1px solid var(--bd-soft); border-radius: 11px; padding: 14px 16px; font-family: var(--mono); font-size: 12.5px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; min-height: 20px; }

/* ---- Admin console ---- */
.admin { padding: 56px 0 40px; }
.admin-bar h1 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 800; letter-spacing: -0.02em; }
.admin-bar p { font-size: 15px; margin-top: 6px; }
.btn.danger { color: var(--text); background: rgba(248,113,113,.14); border-color: #f87171; }
.btn.danger:hover { background: rgba(248,113,113,.24); border-color: #f87171; }
.btn.danger:disabled { opacity: .4; pointer-events: none; }
.admin-create { background: var(--surface); border: 1px solid var(--bd); border-radius: var(--radius); padding: 24px 26px; margin-top: 26px; }
.admin-create h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; margin-bottom: 16px; }
.admin-create form { display: grid; grid-template-columns: 1.4fr 1.4fr 1fr auto auto; gap: 14px; align-items: end; }
.admin-create .field { margin-top: 0; }
.admin-create select { appearance: none; -webkit-appearance: none; background: var(--bg-soft); border: 1px solid var(--bd); border-radius: 11px; color: var(--text); font-family: var(--font); font-size: 15px; padding: 12px 14px; cursor: pointer; }
.admin-create select option { background: #131316; color: #fff; }
.admin-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; padding-bottom: 12px; }
.admin-check input { width: 18px; height: 18px; accent-color: #ffffff; cursor: pointer; }
.admin-status { margin-top: 16px; font-size: 13.5px; font-family: var(--mono); min-height: 18px; }
.admin-table-wrap { margin-top: 22px; border: 1px solid var(--bd); border-radius: var(--radius); overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.admin-table th, .admin-table td { padding: 14px 18px; text-align: left; font-size: 14px; border-bottom: 1px solid var(--bd-soft); vertical-align: middle; }
.admin-table th { background: var(--surface-2); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table select { appearance: none; -webkit-appearance: none; background: var(--bg-soft); border: 1px solid var(--bd); border-radius: 9px; color: var(--text); font-family: var(--font); font-size: 13.5px; padding: 8px 12px; cursor: pointer; }
.admin-table select option { background: #131316; color: #fff; }
.admin-table input[type="checkbox"] { width: 18px; height: 18px; accent-color: #ffffff; cursor: pointer; }
.admin-table .row-actions { display: flex; gap: 8px; justify-content: flex-end; }
.admin-table .row-actions .btn { padding: 8px 16px; font-size: 13px; }

/* ---- Status badges ---- */
.status-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--bd-strong); color: var(--text); white-space: nowrap; }
.status-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--text); flex-shrink: 0; }
.status-badge.status-active { border-color: rgba(52, 211, 153, .55); }
.status-badge.status-active::before { background: #34d399; }
.status-badge.status-suspended { border-color: rgba(251, 191, 36, .55); }
.status-badge.status-suspended::before { background: #fbbf24; }
.status-badge.status-banned { border-color: rgba(248, 113, 113, .6); }
.status-badge.status-banned::before { background: #f87171; }

/* ---- Pagination ---- */
.pager { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-top: 18px; }
.pager-info { font-size: 13.5px; font-family: var(--mono); color: var(--text); }
.pager-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.pager-nav .btn { padding: 7px 13px; font-size: 13px; }
.pager-nav .pager-num { min-width: 38px; justify-content: center; }
.pager-nav .pager-num.current { background: #ffffff; color: #0a0a0c; border-color: #ffffff; opacity: 1; }
.pager-nav .btn:disabled:not(.pager-num) { opacity: .4; pointer-events: none; }

/* ---- Audit event tag ---- */
.evt-tag { font-family: var(--mono); font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--bd-soft); border-radius: 6px; padding: 2px 8px; color: var(--text); }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  #pricing .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .badges { grid-template-columns: repeat(2, 1fr); }
  .docs { grid-template-columns: 1fr; gap: 28px; }
  .docs-nav { position: static; border: 1px solid var(--bd); border-radius: var(--radius-sm); padding: 8px 18px 18px; }
}
@media (max-width: 880px) {
  .features, .secure-grid, .split, .stats, .audience, .dash-grid { grid-template-columns: 1fr; }
  .admin-create form { grid-template-columns: 1fr; }
  .stat { border-right: none; border-bottom: 1px solid var(--bd-soft); }
  .stat:last-child { border-bottom: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
  .country { position: static; margin-top: 18px; }
  .pricing-foot { flex-direction: column; gap: 16px; }
}
@media (max-width: 620px) {
  #pricing .pricing-grid, .badges, .foot-grid { grid-template-columns: 1fr; }
  section { padding: 64px 0; }
  .legal .toc ul { columns: 1; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
