:root {
  --bg: #0f1216;
  --panel: #171b21;
  --panel-2: #1e232b;
  --border: #2a303a;
  --text: #e7eaee;
  --muted: #8c95a3;
  --accent: #4da3ff;
  --accent-2: #2ecf8e;
  --danger: #ff6b6b;
  --warn: #f5a623;
  /* Matches the logo's orange exactly (sampled from static/logo.png) --
     used only for the "Corporate" nav link, which is meant to stand out
     from the rest of the nav rather than blend in with --accent. */
  --brand-orange: #f06928;
  font-size: 15px;
}

/* Light mode -- same variable names, swapped palette. Applied via
   data-theme="light" on <html>, set by the inline script in base.html
   (before first paint) and toggled by #theme-toggle-btn in app.js. */
:root[data-theme="light"] {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --panel-2: #eef0f4;
  --border: #d8dce2;
  --text: #171b21;
  --muted: #5b6472;
  --accent: #1f6fd6;
  --accent-2: #16915f;
  --danger: #d63c3c;
  --warn: #b9750f;
  /* Darkened from the logo's orange (#f06928) -- the logo's exact orange
     fails WCAG AA against a white/light background, this passes it. */
  --brand-orange: #bf490f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.maintenance-banner {
  background: rgba(245,166,35,0.15);
  color: var(--warn);
  border-bottom: 1px solid rgba(245,166,35,0.3);
  padding: 8px 16px;
  text-align: center;
  font-size: 0.85rem;
}

/* ---- Topbar ---- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.hamburger-btn {
  display: none;
  background: none; border: 1px solid var(--border); color: var(--text);
  border-radius: 6px; padding: 4px 10px; font-size: 1.1rem; cursor: pointer;
}
.brand { color: var(--text); font-weight: 700; text-decoration: none; font-size: 1.15rem; display: flex; align-items: center; }
.brand-mark { letter-spacing: 0.02em; }
.brand-accent { color: var(--accent); }
/* aisoql-logo-v2: wide wordmark logo */
.brand-logo { height: 43px; width: auto; display: block; }
@media (max-width: 640px) { .brand-logo { height: 29px; } }

/* Two logical rows (see base.html) so we can force a break between them
   on narrow screens without disturbing the single-row desktop look. */
.topbar-right { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; row-gap: 8px; column-gap: 20px; }
.topbar-row { display: flex; align-items: center; gap: 14px; }
.topbar-right a { color: var(--muted); text-decoration: none; }
.topbar-right a:hover { color: var(--text); }
.topbar-right a.cta { background: var(--accent); color: #06111f; padding: 6px 14px; border-radius: 6px; font-weight: 600; }

/* "Corporate" nav link -- deliberately breaks from the muted nav-link
   styling above so it stands out as its own destination, not just another
   item in the list. Not scoped to .topbar-right: this class is reused
   inside the mobile hamburger drawer (.sidebar-mobile-extras) too, so the
   selector has to match there as well, not just in the topbar. */
a.nav-corporate-link {
  color: var(--brand-orange);
  font-weight: 700;
  letter-spacing: 0.02em;
}
a.nav-corporate-link:hover { color: var(--brand-orange); opacity: 0.82; }

/* "Get a Demo" pill -- a fixed brand gradient rather than the theme's
   --accent, so it reads the same (and stays legible) in both light and
   dark mode instead of shifting with the palette. Also not scoped to
   .topbar-right, for the same reason as .nav-corporate-link above. */
a.btn-demo-pill {
  background: linear-gradient(135deg, #0b1531 0%, #1f3d8f 55%, #2f6fe0 100%);
  color: #ffffff;
  font-weight: 700;
  padding: 7px 18px;
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(15, 30, 80, 0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  display: inline-block;
}
a.btn-demo-pill:hover {
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(15, 30, 80, 0.45);
}

.theme-toggle-btn {
  background: none; border: 1px solid var(--border); color: var(--text);
  border-radius: 999px; width: 32px; height: 32px; font-size: 1rem; line-height: 1;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.theme-toggle-btn:hover { background: var(--panel-2); }

.token-pill {
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px;
  padding: 4px 12px; font-size: 0.85rem; color: var(--accent-2);
}
.admin-pill {
  background: rgba(77,163,255,0.15); border: 1px solid rgba(77,163,255,0.35); color: var(--accent);
  border-radius: 999px; padding: 4px 10px; font-size: 0.78rem; font-weight: 600;
}

/* Below this width the topbar keeps only the theme toggle plus the one
   account action that always applies (Log out, or Log in/Sign up).
   Everything else -- Help/Admin/Buy tokens (.nav-desktop-only) and the
   whole secondary row (token balance, Corporate, Get a Demo) -- moves
   into the hamburger drawer instead (see .sidebar-mobile-extras below),
   so the logo and that one action always share a single line. */
@media (max-width: 860px) {
  .topbar-row-secondary { display: none; }
  .nav-desktop-only { display: none; }
}

/* ---- App shell / sidebar ---- */
.app-shell { display: flex; min-height: calc(100vh - 204px); }
.app-shell.no-sidebar { display: block; }
.sidebar {
  width: 230px; flex-shrink: 0; background: var(--panel); border-right: 1px solid var(--border);
  padding: 18px 0; position: sticky; top: 136px; align-self: flex-start; height: calc(100vh - 136px);
  overflow-y: auto;
}
.sidebar-nav { display: flex; flex-direction: column; }
.sidebar-nav a {
  color: var(--muted); text-decoration: none; padding: 9px 22px; font-size: 0.9rem;
  border-left: 3px solid transparent;
}
.sidebar-nav a.sub { padding-left: 34px; font-size: 0.85rem; }
.sidebar-nav a:hover { color: var(--text); background: var(--panel-2); }
.sidebar-nav a.active { color: var(--text); border-left-color: var(--accent); background: var(--panel-2); font-weight: 600; }
.sidebar-group-label {
  color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 16px 22px 4px;
}
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 15; }
.sidebar-overlay.open { display: block; }

@media (max-width: 860px) {
  .hamburger-btn { display: inline-block; }
  .sidebar {
    position: fixed; left: -240px; top: 0; height: 100vh; z-index: 25; transition: left 0.2s ease;
    padding-top: 144px;
  }
  .sidebar.open { left: 0; }
}

/* Anonymous users' drawer (see base.html) -- always "drawer" positioned,
   not just below 860px, so it never becomes a persistent desktop column
   the way the signed-in .sidebar does above. In practice it's only ever
   reachable below 860px anyway, since that's the only width where the
   hamburger button that opens it is visible. */
.sidebar-drawer {
  position: fixed; left: -240px; top: 0; height: 100vh; z-index: 25; transition: left 0.2s ease;
  padding-top: 144px;
}
.sidebar-drawer.open { left: 0; }

/* Token balance / Corporate / Get a Demo, repeated inside the hamburger
   drawer so they're still reachable once the topbar hides them below
   860px (see .nav-desktop-only and .topbar-row-secondary above). Hidden
   above that width since the topbar already shows the real ones there. */
.sidebar-mobile-extras {
  display: none;
}
@media (max-width: 860px) {
  .sidebar-mobile-extras {
    display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
    padding: 0 22px 16px; margin-bottom: 8px; border-bottom: 1px solid var(--border);
  }
}
/* Re-assert color/padding at higher specificity than the generic
   ".sidebar-nav a" rule below (same specificity, later in the file, so
   it would otherwise win and flatten these back to plain muted links). */
.sidebar-mobile-extras a.nav-corporate-link { color: var(--brand-orange); }
.sidebar-mobile-extras a.btn-demo-pill { color: #ffffff; padding: 6px 16px; }

.container { flex: 1; min-width: 0; max-width: 1000px; margin: 0 auto; padding: 32px 20px 80px; width: 100%; }
.container-anon { max-width: 1000px; }

.card { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 24px; margin-bottom: 24px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 860px) { .grid { grid-template-columns: 1fr; } }

h1 { margin-top: 0; font-size: 1.4rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: 1rem; }
.muted { color: var(--muted); font-size: 0.9rem; }

label { display: block; margin-bottom: 14px; font-size: 0.85rem; color: var(--muted); }
input, select, textarea {
  width: 100%; margin-top: 6px; padding: 10px 12px; background: var(--panel-2);
  border: 1px solid var(--border); border-radius: 6px; color: var(--text);
  font-size: 0.95rem; font-family: inherit;
}
textarea { resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
input[type="checkbox"] { width: auto; display: inline-block; margin: 0 8px 0 0; vertical-align: middle; }
input[type="file"] { padding: 8px; cursor: pointer; }

.btn-primary, .btn-secondary, .btn-danger, .link-btn {
  border: none; border-radius: 6px; padding: 10px 18px; font-weight: 600; cursor: pointer;
  font-size: 0.9rem; text-decoration: none; display: inline-block;
}
.btn-primary { background: var(--accent); color: #06111f; }
.btn-primary:disabled { opacity: 0.6; cursor: default; }
.btn-secondary { background: var(--panel-2); color: var(--text); border: 1px solid var(--border); }
.btn-danger { background: rgba(255,107,107,0.15); color: var(--danger); border: 1px solid rgba(255,107,107,0.35); }
.link-btn { background: none; color: var(--muted); padding: 0; font-weight: 400; text-decoration: underline; }
.inline-form { display: inline; }
.btn-sm { padding: 4px 10px; font-size: 0.78rem; }

.auth-card { max-width: 380px; margin: 40px auto; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 28px; }
.auth-switch { text-align: center; color: var(--muted); font-size: 0.9rem; }

.flash-stack { margin-bottom: 20px; }
.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 8px; font-size: 0.9rem; }
.flash-error { background: rgba(255,107,107,0.12); color: var(--danger); border: 1px solid rgba(255,107,107,0.3); }
.flash-success { background: rgba(46,207,142,0.12); color: var(--accent-2); border: 1px solid rgba(46,207,142,0.3); }

.result-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.file-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 10px; }
.file-tab {
  background: var(--panel-2); border: 1px solid var(--border); color: var(--muted);
  padding: 5px 10px; border-radius: 5px; font-size: 0.78rem; cursor: pointer;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.file-tab.active { color: var(--text); border-color: var(--accent); }

.code-block {
  background: #0b0d10; border: 1px solid var(--border); border-radius: 8px; padding: 16px;
  overflow-x: auto; max-height: 480px; font-size: 0.8rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; word-break: break-word;
}
.diff-old { color: var(--danger); display: block; }
.diff-new { color: var(--accent-2); display: block; }
.diff-ctx { color: var(--muted); display: block; }

table.data-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
table.data-table th, table.data-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); }
table.data-table th { color: var(--muted); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }

.badge { padding: 2px 8px; border-radius: 999px; font-size: 0.75rem; display: inline-block; }
.badge-success { background: rgba(46,207,142,0.15); color: var(--accent-2); }
.badge-error { background: rgba(255,107,107,0.15); color: var(--danger); }
.badge-idle { background: rgba(140,149,163,0.15); color: var(--muted); }
.badge-info { background: rgba(77,163,255,0.15); color: var(--accent); }
.badge-warn { background: rgba(245,166,35,0.15); color: var(--warn); }

.pack-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 700px) { .pack-grid { grid-template-columns: 1fr; } }
.pack-card { background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 18px; text-align: center; position: relative; }
.pack-card.popular { border-color: var(--accent); }
.pack-popular-badge {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #06111f; font-size: 0.7rem; font-weight: 700;
  padding: 2px 10px; border-radius: 999px;
}
.pack-tokens { color: var(--accent-2); font-weight: 600; }
.pack-price { font-size: 1.6rem; font-weight: 700; margin: 4px 0 14px; }
.pack-blurb { color: var(--muted); font-size: 0.82rem; margin-bottom: 14px; min-height: 2.4em; }

.amount-pos { color: var(--accent-2); }
.amount-neg { color: var(--danger); }

.hint {
  margin: -8px 0 14px; font-size: 0.82rem; color: var(--muted); background: var(--panel-2);
  border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px;
}
.hint:empty { display: none; }

.help-block { margin-bottom: 18px; }
.help-block h3 { margin-bottom: 4px; font-size: 1rem; color: var(--accent); }
.help-block p { margin: 0; color: var(--muted); font-size: 0.9rem; }

/* ---- Pill toggle (New / Improve) ---- */
.pill-toggle { display: inline-flex; background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px; padding: 3px; margin-bottom: 18px; }
.pill-toggle-btn { background: none; border: none; color: var(--muted); padding: 6px 16px; border-radius: 999px; font-size: 0.85rem; cursor: pointer; font-weight: 600; }
.pill-toggle-btn.active { background: var(--accent); color: #06111f; }

/* ---- Deployment pipeline ---- */
.pipeline { display: flex; gap: 16px; margin: 20px 0; flex-wrap: wrap; }
.pipeline-stage { flex: 1; min-width: 200px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 16px; }
.pipeline-stage.running { border-color: var(--accent); }
.pipeline-stage.completed { border-color: var(--accent-2); }
.pipeline-stage.failed { border-color: var(--danger); }
.pipeline-stage h3 { display: flex; justify-content: space-between; align-items: center; }
.log-box { background: #0b0d10; border: 1px solid var(--border); border-radius: 6px; padding: 10px; margin-top: 10px; max-height: 220px; overflow-y: auto; font-size: 0.76rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.log-info { color: var(--muted); }
.log-success { color: var(--accent-2); }
.log-error { color: var(--danger); }
.log-warn { color: var(--warn); }

/* ---- Tabs (Admin Center) ---- */
.tab-bar { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; flex-wrap: wrap; }
.tab-btn { background: none; border: none; color: var(--muted); padding: 10px 16px; cursor: pointer; font-size: 0.9rem; border-bottom: 2px solid transparent; text-decoration: none; }
.tab-btn.active, a.tab-btn.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card { background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 16px; text-align: center; }
.stat-val { font-size: 1.5rem; font-weight: 700; }
.stat-label { color: var(--muted); font-size: 0.78rem; margin-top: 4px; }

/* ---- Accordion (FAQ) ---- */
.accordion-item { border: 1px solid var(--border); border-radius: 8px; margin-bottom: 10px; overflow: hidden; }
.accordion-header { background: var(--panel-2); padding: 14px 16px; cursor: pointer; font-weight: 600; }
.accordion-body { max-height: 0; overflow: hidden; transition: max-height 0.2s ease; padding: 0 16px; color: var(--muted); }
.accordion-body.open { max-height: 400px; padding: 14px 16px; }

/* ---- Toasts ---- */
.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 16px; font-size: 0.85rem; box-shadow: 0 4px 14px rgba(0,0,0,0.3); }
.toast-success { border-color: var(--accent-2); color: var(--accent-2); }
.toast-error { border-color: var(--danger); color: var(--danger); }
.toast-info { border-color: var(--accent); color: var(--accent); }

/* ---- Modal ---- */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 50; align-items: center; justify-content: center; }
.modal-overlay.open { display: flex; }
.modal-box { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 24px; max-width: 480px; width: 90%; max-height: 85vh; overflow-y: auto; }

.footer { text-align: center; color: var(--muted); font-size: 0.8rem; padding: 20px 20px 40px; }

/* ---- Marketing homepage ---- */
.btn-lg { padding: 13px 26px; font-size: 1rem; }

.hero { text-align: center; padding: 48px 0 40px; }
.hero-eyebrow {
  color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem;
  font-weight: 600; margin: 0 0 14px;
}
.hero h1 { font-size: 2.2rem; line-height: 1.25; margin: 0 0 16px; }
.hero-sub { color: var(--muted); font-size: 1.05rem; max-width: 620px; margin: 0 auto 28px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 20px; }
.hero-trust { color: var(--muted); font-size: 0.82rem; max-width: 560px; margin: 0 auto; }

.landing-section { padding: 40px 0; border-top: 1px solid var(--border); }
.landing-heading { text-align: center; font-size: 1.3rem; margin: 0 0 28px; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 860px) { .feature-grid { grid-template-columns: 1fr; } }
.feature-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 20px;
}
.feature-card h3 { margin: 0 0 8px; font-size: 1rem; color: var(--accent); }
.feature-card p { margin: 0; color: var(--muted); font-size: 0.88rem; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step { text-align: center; padding: 0 10px; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
  border-radius: 999px; background: rgba(77,163,255,0.15); color: var(--accent); font-weight: 700;
  margin-bottom: 10px;
}
.step h3 { margin: 0 0 6px; font-size: 0.95rem; }
.step p { margin: 0; color: var(--muted); font-size: 0.85rem; }

.pull-quote-section { padding: 44px 0; border-top: 1px solid var(--border); text-align: center; }
.pull-quote {
  font-size: 1.5rem; font-weight: 600; font-style: normal; max-width: 640px;
  margin: 0 auto; color: var(--text);
}
.pull-quote::before { content: "\201C"; color: var(--accent); }
.pull-quote::after { content: "\201D"; color: var(--accent); }

.landing-cta { text-align: center; padding: 40px 0 20px; border-top: 1px solid var(--border); }
.landing-cta h2 { font-size: 1.3rem; margin: 0 0 10px; }
.landing-cta .muted { margin: 0 0 22px; }
.landing-cta .muted a { color: var(--accent); }

/* "Built to enhance, not replace" reassurance section -- upgraded to a
   bolder, more "banner"-like treatment (gradient wordmark text, a glowing
   badge, and the aisoql robot mascot pulled in beside the copy) so it
   reads as a statement rather than a quiet aside. Still aisoql's own
   brand colors/mascot -- no assets borrowed from anywhere else. Reused
   on both home.html and business.html. */
.reassurance-section {
  position: relative; overflow: hidden;
  padding: 40px 32px; margin: 8px 0 40px; border-radius: 16px;
  background: linear-gradient(135deg, rgba(240,105,40,0.14) 0%, rgba(45,120,255,0.08) 100%);
  border: 1px solid rgba(240,105,40,0.35);
  box-shadow: 0 8px 40px rgba(240,105,40,0.12);
}
.reassurance-section::before {
  content: ""; position: absolute; top: -60%; left: 8%; width: 60%; height: 220%;
  background: radial-gradient(circle, rgba(240,105,40,0.18) 0%, rgba(240,105,40,0) 70%);
  pointer-events: none;
}
.reassurance-inner {
  position: relative; z-index: 1; display: flex; align-items: center; justify-content: center;
  gap: 28px; max-width: 900px; margin: 0 auto;
}
.reassurance-content { flex: 1; min-width: 0; text-align: center; }
.reassurance-mascot {
  width: 120px; height: auto; flex-shrink: 0;
  filter: drop-shadow(0 8px 20px rgba(240,105,40,0.35));
}
.reassurance-badge {
  display: inline-flex; align-items: center; gap: 6px;
  color: #fff; background: linear-gradient(135deg, #f06928 0%, #ff9248 100%);
  border: none; border-radius: 999px; padding: 6px 16px;
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  margin: 0 0 16px;
  box-shadow: 0 4px 16px rgba(240,105,40,0.4);
}
.reassurance-badge::before { content: "\26A1\FE0E"; }
.reassurance-heading {
  font-size: 1.9rem; font-weight: 800; margin: 0 0 14px; line-height: 1.25;
  color: var(--brand-orange);
  background: linear-gradient(135deg, var(--brand-orange) 0%, var(--accent) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
@supports not (background-clip: text) {
  .reassurance-heading { -webkit-text-fill-color: initial; background: none; color: var(--brand-orange); }
}
.reassurance-sub { color: var(--muted); font-size: 1rem; max-width: 560px; margin: 0 auto; }
@media (max-width: 700px) {
  .reassurance-inner { flex-direction: column; gap: 16px; }
  .reassurance-mascot { width: 92px; order: -1; }
  .reassurance-heading { font-size: 1.5rem; }
}

/* Exit-intent banner (see base.html/app.js) -- a "fly in" card from the
   bottom-right, not a full-screen modal, so it reassures without blocking
   the page. Off-screen by default; .show slides it into view. */
.exit-banner {
  position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 340px; max-width: calc(100vw - 40px);
  background: var(--panel); border: 1px solid rgba(240,105,40,0.4); border-radius: 12px;
  padding: 20px 20px 22px; box-shadow: 0 12px 32px rgba(0,0,0,0.35);
  transform: translateY(140%); transition: transform 0.35s ease;
}
.exit-banner.show { transform: translateY(0); }
.exit-banner-close {
  position: absolute; top: 10px; right: 12px; background: none; border: none; color: var(--muted);
  font-size: 1.3rem; line-height: 1; cursor: pointer; padding: 4px;
}
.exit-banner-close:hover { color: var(--text); }
.exit-banner-badge {
  color: var(--brand-orange); font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.03em; margin: 0 0 8px;
}
.exit-banner-body { color: var(--muted); font-size: 0.87rem; margin: 0 0 16px; padding-right: 10px; }
.exit-banner-cta { display: inline-block; width: 100%; text-align: center; }
@media (max-width: 480px) {
  .exit-banner { left: 20px; right: 20px; width: auto; }
}

/* Refer a Friend page (referral.html) -- the copy-link box, and the small
   "you were invited" note on the register page for a ?ref= link. */
.referral-link-row { display: flex; gap: 10px; flex-wrap: wrap; }
.referral-link-input {
  flex: 1; min-width: 220px; background: var(--panel-2); border: 1px solid var(--border);
  color: var(--text); border-radius: 8px; padding: 10px 12px; font-family: monospace; font-size: 0.85rem;
}
.referral-note {
  color: var(--brand-orange); background: rgba(240,105,40,0.1); border: 1px solid rgba(240,105,40,0.3);
  border-radius: 8px; padding: 10px 14px; font-size: 0.88rem; margin: 0 0 16px;
}
.reward-preference-form { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.reward-preference-option {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--panel-2); cursor: pointer; width: 100%;
  max-width: 560px; font-weight: 400;
}
.reward-preference-option input { margin-top: 3px; }
.reward-preference-option.selected { border-color: var(--brand-orange); background: rgba(240,105,40,0.08); }
.reward-preference-option span { color: var(--text); font-size: 0.9rem; }

/* --- Share graphics (referral banner kit) --- */
.banner-kit-group { margin-bottom: 28px; }
.banner-kit-group:last-child { margin-bottom: 0; }
.banner-kit-group h3 { margin: 0 0 4px; font-size: 1rem; }
.banner-kit-group .muted { margin: 0 0 14px; font-size: 0.88rem; }
.banner-kit-row { display: flex; flex-wrap: wrap; gap: 16px; }
.banner-kit-item {
  flex: 1 1 220px; max-width: 260px; border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; background: var(--panel-2);
}
.banner-kit-item img { display: block; width: 100%; height: auto; border-bottom: 1px solid var(--border); }
.banner-kit-item-meta { padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.banner-kit-item-label { font-size: 0.82rem; color: var(--muted); }
.banner-kit-item-meta a { font-size: 0.82rem; font-weight: 600; color: var(--accent); text-decoration: none; }
.banner-kit-item-meta a:hover { text-decoration: underline; }

.role-badge { padding: 2px 8px; border-radius: 999px; font-size: 0.72rem; font-weight: 600; display: inline-block; }
.role-badge-owner { background: rgba(240,105,40,0.15); color: var(--brand-orange); }
.role-badge-admin { background: rgba(77,163,255,0.15); color: var(--accent); }
.role-badge-member { background: rgba(140,149,163,0.15); color: var(--muted); }

.org-key-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.org-key-value { font-family: ui-monospace, monospace; background: var(--panel-2); border: 1px solid var(--border);
                  border-radius: 6px; padding: 4px 10px; font-size: 0.85rem; letter-spacing: 0.05em; }

.seat-meter { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; }
.seat-meter-bar { flex: 1; height: 8px; border-radius: 999px; background: var(--panel-2); overflow: hidden; }
.seat-meter-fill { height: 100%; background: var(--accent-2); }
.seat-meter-fill.seat-meter-over { background: var(--danger); }

/* --- PWA install link (menu) --- */
.nav-install-link { color: var(--text); opacity: 0.85; font-size: 0.9rem; text-decoration: none; }
.nav-install-link:hover { opacity: 1; text-decoration: underline; }

/* --- footer legal links --- */
.footer-links { margin-top: 10px; font-size: 0.85rem; }
.footer-links a { color: inherit; opacity: 0.85; text-decoration: underline; }
.footer-links a:hover { opacity: 1; }

/* --- register legal note --- */
.auth-legal { margin-top: 12px; font-size: 0.8rem; opacity: 0.8; text-align: center; }
.auth-legal a { color: inherit; text-decoration: underline; }

/* aisoql-logo-v2: mascot images now use the square robot icon */
.reassurance-mascot { object-fit: contain; }


/* referral-brand-v2: share-graphics grid (images keep their own aspect ratio) */
.banner-kit-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; align-items: start; }
.banner-kit-item { margin: 0; padding: 0; background: var(--panel, transparent); border: 1px solid var(--border, rgba(128,128,128,.25)); border-radius: 12px; overflow: hidden; display: block; min-height: 0; height: auto; }
.banner-kit-item.bk-wide { grid-column: span 6; }
.banner-kit-item.bk-tall { grid-column: span 3; }
.banner-kit-item.bk-square { grid-column: span 4; }
.banner-kit-thumb { display: block; line-height: 0; }
.banner-kit-item img { display: block; width: 100%; height: auto; aspect-ratio: auto; object-fit: contain; background: none; }
.banner-kit-item-meta { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; font-size: .9rem; }
@media (max-width: 760px) {
  .banner-kit-item.bk-wide { grid-column: span 12; }
  .banner-kit-item.bk-tall, .banner-kit-item.bk-square { grid-column: span 6; }
}


/* aisoql-textlogo-v1: header logo as live text (Exo 2 Black Italic, self-hosted) */
@font-face { font-family: "Exo 2 Logo"; font-style: italic; font-weight: 900; font-display: swap;
  src: url("/static/fonts/exo-2-latin-900-italic.woff2") format("woff2"); }
@font-face { font-family: "Exo 2 Logo"; font-style: italic; font-weight: 800; font-display: swap;
  src: url("/static/fonts/exo-2-latin-800-italic.woff2") format("woff2"); }
.brand-text { display: inline-flex; align-items: baseline; white-space: nowrap; line-height: 1;
  padding: 4px 0 8px; font-family: "Exo 2 Logo", "Arial Black", Impact, sans-serif; font-style: italic;
  font-weight: 900; font-size: 2.25rem; letter-spacing: -0.01em; color: var(--text); }
/* aisoql-textlogo-v2 */
.brand-ai { font-size: 1.2em; position: relative; top: 0.05em; padding: 0 0.06em 0 0.02em; margin-right: -0.04em;
  color: #e5252c; background: linear-gradient(180deg, #ff4950 0%, #c8161e 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.brand-com { font-size: 0.5em; font-weight: 600; margin-left: 0.04em; }
@media (max-width: 640px) { .brand-text { font-size: 1.7rem; } }

@font-face { font-family: "Exo 2 Logo"; font-style: italic; font-weight: 600; font-display: swap;
  src: url("/static/fonts/exo-2-latin-600-italic.woff2") format("woff2"); }

/* aisoql-textlogo-v3: "Built for Salesforce" tag under the text logo */
.brand-text { flex-direction: column; align-items: flex-start; padding: 4px 0 6px; }
.brand-main { display: inline-flex; align-items: baseline; }
.brand-tag { display: block; font-size: max(0.34em, 9px); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.18em; margin-top: 0.2em; margin-left: 0.02em; margin-right: -0.18em; opacity: 0.8; }
@media (max-width: 640px) { .brand-tag { letter-spacing: 0.19em; margin-right: -0.19em; } }

/* aisoql-codeblock-contrast: code blocks keep a dark background in both themes, so their text must stay light */
.code-block, .code-block code { color: #e6edf3; }

/* aisoql-intro-pricing */
.intro-price-banner{margin:0 0 18px;padding:12px 16px;border-left:4px solid #e5252c;border-radius:8px;background:rgba(229,37,44,.09);font-size:.95em;line-height:1.45}
.intro-price-banner strong{font-weight:700}
.intro-price-banner a{margin-left:6px;text-decoration:underline}

/* aisoql-intro-banners */
.intro-price-banner--page{max-width:760px;margin:0 auto 20px}

/* aisoql-css-version */
.intro-price-banner a{color:inherit;font-weight:600}

/* aisoql-offer-hero */
.offer-hero{position:relative;display:flex;align-items:center;gap:24px;flex-wrap:wrap;margin:0 auto 24px;max-width:960px;padding:26px 32px;border-radius:18px;color:#f3f5f8;background:radial-gradient(520px 260px at 90% 0%,rgba(47,124,246,.30),transparent 60%),radial-gradient(420px 260px at 0% 100%,rgba(224,38,45,.22),transparent 60%),#0b1120;border:1px solid rgba(255,255,255,.10);box-shadow:0 10px 30px rgba(0,0,0,.22)}
.offer-hero__text{flex:1 1 420px;min-width:0}
.offer-hero__eyebrow{font-size:.78rem;font-weight:700;letter-spacing:.16em;text-transform:uppercase;color:#ff6b72;margin-bottom:8px}
.offer-hero__price{font-family:'Exo 2 Logo',system-ui,sans-serif;font-weight:800;font-size:clamp(1.8rem,4.2vw,2.6rem);line-height:1.08;letter-spacing:-.01em;color:#fff}
.offer-hero__sub{margin:10px 0 0;font-size:1rem;line-height:1.5;color:#b9c4d8}
.offer-hero .offer-hero__cta{display:inline-block;background:#ff4b52;color:#fff;font-weight:800;padding:14px 26px;border-radius:999px;text-decoration:none;white-space:nowrap}
.offer-hero .offer-hero__cta:hover{filter:brightness(1.08)}
.offer-hero .offer-hero__fine{margin-left:6px;color:#b9c4d8;text-decoration:underline;font-size:.9rem;white-space:nowrap}
@media (max-width:560px){.offer-hero{padding:20px 20px}.offer-hero .offer-hero__cta{width:100%;text-align:center}}
