/* ==========================================================
   FamAPI — Coinbase-style design system
   White canvas, Coinbase Blue (#0052ff), pill CTAs,
   dark editorial heroes, Inter + JetBrains Mono.
   ========================================================== */

:root {
  --primary: #0052ff;
  --primary-active: #003ecc;
  --primary-disabled: #a8b8cc;
  --ink: #0a0b0d;
  --body: #5b616e;
  --muted: #7c828a;
  --muted-soft: #a8acb3;
  --hairline: #dee1e6;
  --hairline-soft: #eef0f3;
  --canvas: #ffffff;
  --surface-soft: #f7f7f7;
  --surface-strong: #eef0f3;
  --surface-dark: #0a0b0d;
  --surface-dark-elevated: #16181c;
  --on-dark-soft: #a8acb3;
  --up: #05b169;
  --down: #cf202f;
  --yellow: #f4b000;

  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 100px;
  --radius-full: 9999px;

  --font-sans: 'Inter', -apple-system, system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4 { margin: 0; font-weight: 400; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-active); }
img { max-width: 100%; }
code, pre { font-family: var(--font-mono); }
.mono { font-family: var(--font-mono); }

/* ---------- Layout ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 40px 24px 96px; }
.page-head { margin-bottom: 40px; }
.page-title { font-size: 40px; line-height: 1.05; letter-spacing: -0.02em; margin-bottom: 10px; }
.page-sub { font-size: 16px; color: var(--body); max-width: 640px; }
.page-sub a { font-weight: 600; }

/* ---------- Top navigation (light) ---------- */
.topnav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.topnav-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 64px; }
.nav-logo { font-size: 20px; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; }
.nav-logo:hover { color: var(--ink); }
.nav-logo-accent { color: var(--primary); }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-link {
  padding: 9px 14px; border-radius: var(--radius-pill);
  font-size: 14px; font-weight: 500; color: var(--ink); white-space: nowrap;
}
.nav-link:hover { background: var(--surface-strong); color: var(--ink); }
.nav-link.active { background: var(--surface-strong); color: var(--primary); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.topnav-dark {
  background: rgba(10,11,13,0.9);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.topnav-dark .nav-logo { color: #fff; }
.topnav-dark .nav-link { color: var(--on-dark-soft); }
.topnav-dark .nav-link:hover { background: var(--surface-dark-elevated); color: #fff; }
.topnav-dark .nav-link.active { background: var(--surface-dark-elevated); color: #fff; }

/* ---------- Grid helpers ---------- */
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }

@media (max-width: 768px) {
  .grid2, .grid3 { grid-template-columns: 1fr; }
}

/* ---------- Toggle switch ---------- */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-track {
  position: absolute; inset: 0; border-radius: var(--radius-pill);
  background: var(--surface-strong); transition: background-color 0.2s ease; cursor: pointer;
}
.switch-thumb {
  position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: var(--radius-full);
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.25); transition: transform 0.2s ease;
}
.switch input:checked + .switch-track { background: var(--primary); }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(20px); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; min-height: 44px;
  border: none; border-radius: var(--radius-pill);
  font-family: inherit; font-size: 16px; font-weight: 600; line-height: 1.15;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-active); color: #fff; }
.btn-primary:disabled { background: var(--primary-disabled); cursor: not-allowed; }
.btn-secondary { background: var(--surface-strong); color: var(--ink); }
.btn-secondary:hover { background: var(--hairline); color: var(--ink); }
.btn-dark { background: var(--surface-dark-elevated); color: #fff; }
.btn-dark:hover { background: #202329; color: #fff; }
.btn-outline { background: transparent; box-shadow: inset 0 0 0 1px var(--hairline); color: var(--ink); }
.btn-outline:hover { box-shadow: inset 0 0 0 1px var(--ink); color: var(--ink); }
.btn-outline-light { background: transparent; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35); color: #fff; }
.btn-outline-light:hover { box-shadow: inset 0 0 0 1px #fff; color: #fff; }
.btn-danger { background: transparent; box-shadow: inset 0 0 0 1px rgba(207,32,47,0.4); color: var(--down); }
.btn-danger:hover { background: rgba(207,32,47,0.06); box-shadow: inset 0 0 0 1px var(--down); color: var(--down); }
.btn-lg { padding: 16px 32px; min-height: 56px; }
.btn-sm { padding: 8px 16px; min-height: 36px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-link { background: transparent; color: var(--primary); padding: 6px 8px; min-height: auto; }
.btn-link:hover { background: rgba(0,82,255,0.06); color: var(--primary-active); }

/* ---------- Forms ---------- */
label {
  display: block; font-size: 13px; font-weight: 600; color: var(--ink);
  margin: 18px 0 6px;
}
label:first-child { margin-top: 0; }
.input {
  width: 100%; padding: 13px 16px; min-height: 48px;
  border: 1px solid var(--hairline); border-radius: var(--radius-md);
  background: var(--canvas); font-family: inherit; font-size: 15px; color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,82,255,0.12); }
.input::placeholder { color: var(--muted-soft); }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237c828a' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }
.field-hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }

/* ---------- Badges / pills ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 600; line-height: 1.5;
}
.badge-blue { background: rgba(0,82,255,0.08); color: var(--primary); }
.badge-green { background: rgba(5,177,105,0.10); color: var(--up); }
.badge-red { background: rgba(207,32,47,0.08); color: var(--down); }
.badge-amber { background: rgba(244,176,0,0.12); color: #8a6400; }
.badge-gray { background: var(--surface-strong); color: var(--muted); }
.badge-dark { background: var(--surface-dark); color: #fff; }
.badge-outline { box-shadow: inset 0 0 0 1px var(--hairline); color: var(--body); }

/* ---------- Cards ---------- */
.card {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-xl);
  padding: 32px;
  margin-bottom: 20px;
}
.card + .card { margin-top: 20px; }
.card-title { font-size: 18px; font-weight: 600; letter-spacing: 0; display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.card-sub { font-size: 14px; color: var(--body); margin-bottom: 20px; }
.card-dark {
  background: var(--surface-dark); color: #fff; border: none;
}
.card-dark .card-title { color: #fff; }
.card-dark .card-sub { color: var(--on-dark-soft); }
.card-flat { box-shadow: var(--shadow-soft); }
.card-hover { transition: box-shadow 0.2s ease, transform 0.2s ease; }
.card-hover:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* ---------- Stat tiles ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--canvas); border: 1px solid var(--hairline);
  border-radius: var(--radius-xl); padding: 22px 24px;
}
.stat-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 10px; }
.stat-value { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-value.up { color: var(--up); }
.stat-value.down { color: var(--down); }
.stat-card.primary {
  background: var(--primary); border: none; color: #fff;
}
.stat-card.primary .stat-label { color: rgba(255,255,255,0.75); }
.stat-card.dark { background: var(--surface-dark); border: none; color: #fff; }
.stat-card.dark .stat-label { color: var(--on-dark-soft); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th {
  text-align: left; padding: 12px 16px; color: var(--muted);
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
  border-bottom: 1px solid var(--hairline); white-space: nowrap;
}
.data-table td { padding: 14px 16px; border-bottom: 1px solid var(--hairline-soft); color: var(--body); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--surface-soft); }
.data-table td strong { color: var(--ink); }
.data-table .cell-main { color: var(--ink); font-weight: 600; }
.empty-row { text-align: center; color: var(--muted); padding: 40px 16px !important; }

/* ---------- Alerts / toasts ---------- */
.alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px 18px; border-radius: var(--radius-md);
  font-size: 14px; margin-bottom: 20px;
}
.alert-success { background: rgba(5,177,105,0.08); color: #047a4e; }
.alert-error { background: rgba(207,32,47,0.08); color: #a31522; }
.alert-info { background: rgba(0,82,255,0.07); color: #003ecc; }
.alert-warn { background: rgba(244,176,0,0.10); color: #7a5800; }
.alert-ok { background: rgba(5,177,105,0.08); color: #047a4e; }

/* ---------- Hero (dark editorial band) ---------- */
.hero-dark {
  background: var(--surface-dark); color: #fff;
  padding: 96px 0; overflow: hidden;
}
.hero-dark .hero-title { font-size: clamp(40px, 6vw, 72px); line-height: 1.0; letter-spacing: -0.03em; font-weight: 400; margin-bottom: 24px; }
.hero-dark .hero-title .accent { color: var(--primary); }
.hero-dark .hero-sub { color: var(--on-dark-soft); font-size: 18px; max-width: 600px; margin-bottom: 40px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: var(--radius-pill);
  background: var(--surface-dark-elevated); color: var(--on-dark-soft);
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em; margin-bottom: 28px;
}
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--up); }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 48px; }
.hero-pill {
  padding: 8px 16px; border-radius: var(--radius-pill);
  background: var(--surface-dark-elevated); color: var(--on-dark-soft); font-size: 13.5px;
}
/* Floating product mockup card (hero visual) */
.mock-stack { position: relative; }
.mock-card {
  background: var(--surface-dark-elevated); border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-xl); padding: 24px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.45);
}
.mock-card + .mock-card { margin-top: 16px; }
.mock-card .mock-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.07); }
.mock-card .mock-row:last-child { border-bottom: none; }
.mock-card .mock-label { font-size: 13px; color: var(--on-dark-soft); }
.mock-card .mock-value { font-size: 14px; font-weight: 600; color: #fff; font-family: var(--font-mono); }
.mock-card .mock-value.up { color: var(--up); }
.mock-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.mock-head .mock-title { font-size: 14px; font-weight: 600; color: #fff; }
.mock-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--up); }

/* ---------- Section rhythm ---------- */
.section { padding: 96px 0; }
.section-soft { background: var(--surface-soft); }
.section-dark { background: var(--surface-dark); color: #fff; }
.section-dark .section-sub { color: var(--on-dark-soft); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section-title { font-size: clamp(32px, 4.5vw, 48px); line-height: 1.05; letter-spacing: -0.02em; margin-bottom: 14px; }
.section-sub { font-size: 16px; color: var(--body); }
.section-eyebrow {
  display: inline-block; padding: 6px 16px; border-radius: var(--radius-pill);
  background: var(--surface-strong); color: var(--ink);
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 18px;
}

/* ---------- Feature cards ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card {
  background: var(--canvas); border: 1px solid var(--hairline);
  border-radius: var(--radius-xl); padding: 32px;
  transition: box-shadow 0.2s ease;
}
.feature-card:hover { box-shadow: var(--shadow-soft); }
.feature-icon {
  width: 40px; height: 40px; border-radius: var(--radius-full);
  background: var(--surface-strong); display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.feature-icon svg { width: 20px; height: 20px; }
.feature-card h3 { font-size: 18px; font-weight: 600; letter-spacing: 0; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--body); }

/* ---------- Pricing ---------- */
.price-label { font-size: 14px; font-weight: 600; color: var(--body); margin-bottom: 6px; }
.price-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.price { font-size: 40px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.price-strike { font-size: 17px; color: var(--muted); text-decoration: line-through; }
.check-list { list-style: none; padding: 0; margin: 0 0 28px; flex: 1; }
.check-list li { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 14px; color: var(--body); }
.check-list li::before {
  content: ''; width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
  background: rgba(0,82,255,0.10); color: var(--primary);
}
.check-list li { counter-increment: none; }
.check-list li::before {
  content: '✓'; display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.pricing-card {
  background: var(--canvas); border: 1px solid var(--hairline);
  border-radius: var(--radius-xl); padding: 32px;
  display: flex; flex-direction: column; position: relative;
}
.pricing-card.featured { background: var(--surface-dark); color: #fff; border: none; }
.pricing-card.featured .pricing-name { color: #fff; }
.pricing-card.featured .pricing-price { color: #fff; }
.pricing-card.featured .pricing-desc { color: var(--on-dark-soft); }
.pricing-card.featured .pricing-feature { color: #cfd3d9; }
.pricing-card.featured .pricing-check { color: var(--up); }
.pricing-name { font-size: 14px; font-weight: 600; color: var(--body); margin-bottom: 6px; }
.pricing-days { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.pricing-price-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.pricing-price { font-size: 40px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.pricing-price small { font-size: 15px; color: var(--muted); font-weight: 500; }
.pricing-original { font-size: 17px; color: var(--muted); text-decoration: line-through; }
.pricing-savings { font-size: 12.5px; font-weight: 600; color: var(--up); margin-bottom: 24px; min-height: 18px; }
.pricing-features { list-style: none; padding: 0; margin: 0 0 28px; flex: 1; }
.pricing-feature { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 14px; color: var(--body); }
.pricing-check { color: var(--primary); flex-shrink: 0; }
.pricing-featured .pricing-check { color: var(--up); }
.pricing-offer-ribbon {
  position: absolute; top: -12px; right: 24px;
  background: var(--primary); color: #fff;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 6px 16px; border-radius: var(--radius-pill);
}

/* ---------- Leaderboard ---------- */
.leaderboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; max-width: 820px; margin: 0 auto; }
.leader-card {
  background: var(--canvas); border: 1px solid var(--hairline);
  border-radius: var(--radius-xl); padding: 28px 20px; text-align: center;
}
.leader-card.gold { box-shadow: inset 0 0 0 2px rgba(244,176,0,0.5); }
.leader-card.silver { box-shadow: inset 0 0 0 2px rgba(168,172,179,0.6); }
.leader-card.bronze { box-shadow: inset 0 0 0 2px rgba(180,120,60,0.5); }
.leader-rank { font-size: 13px; font-weight: 600; color: var(--primary); margin-bottom: 12px; }
.leader-avatar {
  width: 64px; height: 64px; border-radius: var(--radius-full); object-fit: cover;
  margin: 0 auto 12px; display: block; background: var(--surface-strong);
}
.leader-avatar-ph {
  width: 64px; height: 64px; border-radius: var(--radius-full);
  background: var(--surface-strong); display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px; font-size: 24px; font-weight: 600; color: var(--muted);
}
.leader-name { font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.leader-amount { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; color: var(--up); font-variant-numeric: tabular-nums; }
.leader-amount-label { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* ---------- Support strip ---------- */
.support-strip { display: flex; justify-content: center; gap: 48px; flex-wrap: wrap; padding: 40px 0 0; }
.support-item { text-align: center; }
.support-item .num { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.support-item .label { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ---------- Footer ---------- */
.footer { background: var(--canvas); border-top: 1px solid var(--hairline); padding: 64px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 48px; }
.footer-brand p { font-size: 13.5px; color: var(--body); margin-top: 14px; max-width: 260px; }
.footer h4 { font-size: 13px; font-weight: 600; margin-bottom: 16px; }
.footer-col a { display: block; padding: 5px 0; font-size: 13.5px; color: var(--body); }
.footer-col a:hover { color: var(--ink); }
.legal { border-top: 1px solid var(--hairline-soft); padding: 20px 0; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.legal p { font-size: 12.5px; color: var(--muted); }

/* ---------- Code blocks (docs) ---------- */
.code-block { margin-bottom: 16px; border: 1px solid var(--hairline); border-radius: var(--radius-lg); overflow: hidden; background: var(--canvas); }
.code-label {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px; background: var(--surface-soft); border-bottom: 1px solid var(--hairline-soft);
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted);
}
.code-label code { color: var(--ink); }
.code-block pre {
  margin: 0; padding: 18px; overflow-x: auto;
  font-size: 13px; line-height: 1.6; color: var(--ink);
  white-space: pre-wrap; word-break: break-word;
}
.copy-btn {
  background: transparent; border: 1px solid var(--hairline); color: var(--body);
  padding: 5px 12px; border-radius: var(--radius-pill); font-size: 11.5px; font-weight: 600; cursor: pointer;
  transition: all 0.15s ease;
}
.copy-btn:hover { border-color: var(--primary); color: var(--primary); }
.copy-btn.copied { background: rgba(5,177,105,0.1); border-color: var(--up); color: var(--up); }

/* ---------- Docs ---------- */
.docs-section { padding: 32px 0; border-bottom: 1px solid var(--hairline-soft); }
.docs-section:last-child { border-bottom: none; }
.docs-section h2 { font-size: 22px; font-weight: 600; display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.docs-num {
  width: 30px; height: 30px; border-radius: var(--radius-full); flex-shrink: 0;
  background: var(--surface-strong); color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
}
.docs-section .desc { color: var(--body); font-size: 14.5px; margin-bottom: 18px; }
.docs-callout {
  background: var(--surface-soft); border: 1px solid var(--hairline);
  border-radius: var(--radius-lg); padding: 16px 18px; font-size: 14px; color: var(--body);
  margin-bottom: 32px;
}
.docs-callout strong { color: var(--ink); }

/* ---------- App shell (sidebar + content) ---------- */
.app { display: flex; min-height: 100vh; background: var(--canvas); }
.sidebar {
  width: 264px; flex-shrink: 0;
  background: var(--canvas);
  border-right: 1px solid var(--hairline);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto; z-index: 40;
}
.side-logo {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px; border-bottom: 1px solid var(--hairline-soft);
}
.side-logo a { font-size: 20px; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; }
.side-close {
  display: none; background: var(--surface-strong); border: none; cursor: pointer;
  width: 32px; height: 32px; border-radius: var(--radius-sm); font-size: 14px; color: var(--muted);
}
.side-section {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted-soft); padding: 22px 24px 8px;
}
.side-link {
  display: flex; align-items: center; gap: 12px;
  margin: 2px 12px; padding: 11px 14px; border-radius: var(--radius-pill);
  color: var(--body); font-size: 14px; font-weight: 500;
  transition: background-color 0.12s ease, color 0.12s ease;
}
.side-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.side-link:hover { background: var(--surface-strong); color: var(--ink); }
.side-link.active { background: rgba(0,82,255,0.08); color: var(--primary); font-weight: 600; }
.side-footer {
  margin-top: auto; padding: 18px 16px; border-top: 1px solid var(--hairline-soft);
}
.side-user { display: flex; align-items: center; gap: 12px; padding: 4px 8px 14px; }
.side-avatar {
  width: 38px; height: 38px; border-radius: var(--radius-full); object-fit: cover; flex-shrink: 0;
  background: var(--surface-strong); display: flex; align-items: center; justify-content: center;
  color: var(--primary); font-weight: 700; font-size: 14px;
}
.side-user-name { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.side-user-email { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.side-signout {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 0 8px; padding: 9px 14px; border-radius: var(--radius-pill);
  color: var(--down); font-size: 13.5px; font-weight: 500;
  transition: background-color 0.12s ease, color 0.12s ease;
}
.side-signout svg { width: 16px; height: 16px; flex-shrink: 0; }
.side-signout:hover { background: rgba(207,32,47,0.07); color: var(--down); }
.side-overlay { display: none; }
.side-badge-admin {
  display: inline-flex; align-items: center;
  margin: 0 24px 14px; padding: 4px 12px; border-radius: var(--radius-pill);
  background: var(--surface-dark); color: #fff; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
}

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-topbar {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; padding: 0 32px;
  border-bottom: 1px solid var(--hairline-soft);
  background: var(--canvas); position: sticky; top: 0; z-index: 30;
}
.app-topbar-title { font-size: 15px; font-weight: 600; }
.hamburger {
  display: none; background: transparent; border: none; cursor: pointer;
  font-size: 20px; color: var(--ink); padding: 6px;
}
.app-content { padding: 32px; max-width: 1080px; width: 100%; }

@media (max-width: 900px) {
  .hamburger { display: block; }
  .sidebar {
    position: fixed; left: 0; top: 0; height: 100vh;
    transform: translateX(-100%); transition: transform 0.25s ease;
    width: 280px; box-shadow: var(--shadow-md);
  }
  .sidebar.open { transform: translateX(0); }
  .side-close { display: block; }
  .side-overlay.open { display: block; position: fixed; inset: 0; background: rgba(10,11,13,0.4); z-index: 35; }
  .app-content { padding: 20px 16px; }
  .app-topbar { padding: 0 16px; }
}

/* ---------- Modals ---------- */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 100;
  background: rgba(10,11,13,0.55); backdrop-filter: blur(4px);
  align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--canvas); border-radius: var(--radius-xl);
  padding: 32px; max-width: 400px; width: 100%;
  box-shadow: var(--shadow-md); text-align: center;
}
.modal-title { font-size: 17px; font-weight: 600; letter-spacing: 0; margin-bottom: 4px; }
.modal-sub { font-size: 13px; color: var(--body); margin-bottom: 16px; }
.modal-price { font-size: 34px; font-weight: 600; letter-spacing: -0.03em; margin: 8px 0 16px; }
.modal .input { margin-top: 8px; text-align: center; }
.modal-close { display: inline-block; margin-top: 16px; font-size: 13px; color: var(--muted); cursor: pointer; padding: 8px; }
.modal-close:hover { color: var(--ink); }

/* ---------- QR ---------- */
.qr-frame {
  width: 232px; height: 232px; margin: 18px auto;
  border-radius: var(--radius-lg); padding: 12px;
  background: #fff; border: 1px solid var(--hairline);
}
.qr-frame img { width: 100%; height: 100%; border-radius: var(--radius-sm); display: block; }
.qr-hint { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.modal-status {
  margin-top: 14px; padding: 12px; border-radius: var(--radius-md);
  background: var(--surface-strong); color: var(--primary);
  font-size: 13.5px; font-weight: 600;
}
.modal-status.success { background: rgba(5,177,105,0.10); color: var(--up); }
.modal-status.error { background: rgba(207,32,47,0.08); color: var(--down); }

/* ---------- API key rows ---------- */
.key-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  border: 1px solid var(--hairline); border-radius: var(--radius-lg);
  padding: 14px 16px; margin-bottom: 12px; background: var(--surface-soft);
}
.key-text { flex: 1; font-family: var(--font-mono); font-size: 13.5px; color: var(--ink); word-break: break-all; min-width: 200px; }
.key-label { font-size: 12px; color: var(--muted); margin: -6px 0 14px; padding-left: 4px; }

/* ---------- Plan tiles (dashboard quick pick) ---------- */
.plan-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.plan-tile {
  border: 1px solid var(--hairline); border-radius: var(--radius-xl); padding: 22px;
  text-align: center; cursor: pointer; background: var(--canvas);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease; position: relative;
}
.plan-tile:hover { border-color: var(--primary); box-shadow: var(--shadow-soft); transform: translateY(-2px); }
.plan-tile.offer { box-shadow: inset 0 0 0 2px rgba(0,82,255,0.35); }
.plan-tile .pt-days { font-size: 13px; font-weight: 600; color: var(--body); margin-bottom: 8px; }
.plan-tile .pt-price { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.plan-tile .pt-original { font-size: 12px; color: var(--muted); text-decoration: line-through; margin-bottom: 4px; }
.plan-tile .pt-badge {
  position: absolute; top: -9px; right: 16px;
  background: var(--primary); color: #fff; font-size: 10px; font-weight: 700; letter-spacing: 0.05em;
  padding: 4px 10px; border-radius: var(--radius-pill);
}

/* ---------- Quick action tiles ---------- */
.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.quick-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  padding: 22px; border: 1px solid var(--hairline); border-radius: var(--radius-xl);
  background: var(--canvas); color: var(--ink);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.quick-tile:hover { box-shadow: var(--shadow-soft); transform: translateY(-2px); color: var(--ink); }
.quick-tile .qt-icon {
  width: 40px; height: 40px; border-radius: var(--radius-full);
  background: var(--surface-strong); display: flex; align-items: center; justify-content: center;
}
.quick-tile .qt-icon svg { width: 19px; height: 19px; }
.quick-tile .qt-title { font-size: 15px; font-weight: 600; }
.quick-tile .qt-desc { font-size: 12.5px; color: var(--muted); }

/* ---------- Countdown timer ---------- */
.timer {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius-pill);
  background: rgba(5,177,105,0.10); color: #047a4e; font-weight: 600; font-size: 14px;
}
.timer.expired { background: rgba(207,32,47,0.08); color: #a31522; }

/* ---------- Demo success overlay ---------- */
.success-overlay {
  position: fixed; inset: 0; background: rgba(10,11,13,0.96);
  display: none; align-items: center; justify-content: center; z-index: 200; flex-direction: column;
}
.success-overlay.active { display: flex; }
.success-circle {
  width: 110px; height: 110px; border-radius: var(--radius-full);
  background: var(--surface-dark-elevated); box-shadow: 0 0 60px rgba(5,177,105,0.35);
  display: flex; align-items: center; justify-content: center; margin-bottom: 26px;
}
.success-check { stroke: var(--up); stroke-width: 3.5; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 166; stroke-dashoffset: 166; animation: drawStroke 0.5s ease forwards 0.15s; }
@keyframes drawStroke { to { stroke-dashoffset: 0; } }
.success-title { font-size: 26px; font-weight: 600; color: #fff; margin-bottom: 6px; letter-spacing: -0.01em; }
.success-amount { font-size: 40px; font-weight: 600; color: var(--up); font-family: var(--font-mono); margin-bottom: 8px; }
.success-sub { font-size: 13.5px; color: var(--on-dark-soft); margin-bottom: 30px; }

/* ---------- Misc ---------- */
.link-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.divider { height: 1px; background: var(--hairline-soft); margin: 24px 0; }
.text-muted { color: var(--muted); }
.text-body { color: var(--body); }
.text-primary { color: var(--primary); }
.text-up { color: var(--up); }
.text-down { color: var(--down); }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.w-full { width: 100%; }
.center { text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .feature-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .wrap { padding: 28px 16px 64px; }
  .section { padding: 64px 0; }
  .hero-dark { padding: 64px 0; }
  .nav-links { display: none; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .card { padding: 24px; }
  .support-strip { gap: 28px; }
}
