/* ============================================
   AppScan — Design tokens + base styles
   Aesthetic: dark, diagnostic, Stripe-meets-Linear
   ============================================ */

:root, [data-theme="dark"] {
  /* Surfaces */
  --bg-0: #0A0B0D;
  --bg-1: #0F1014;
  --bg-2: #15171C;
  --bg-3: #1C1F26;
  --bg-4: #242832;

  /* Lines */
  --line-1: rgba(255,255,255,0.06);
  --line-2: rgba(255,255,255,0.10);
  --line-3: rgba(255,255,255,0.16);

  /* Text */
  --fg-0: #F5F6F7;
  --fg-1: #B6BAC2;
  --fg-2: #7C828D;
  --fg-3: #565B65;

  /* Brand + severity — monochrome brand accent */
  --teal:    #F5F6F7;
  --teal-d:  #B6BAC2;
  --teal-bg: rgba(255,255,255,0.08);
  --teal-on: #0A0B0D;
  --teal-glow: rgba(255,255,255,0.35);
  --teal-tint: rgba(255,255,255,0.06);
  --amber:   #F59E0B;
  --amber-bg: rgba(245,158,11,0.10);
  --red:     #EF4444;
  --red-bg:  rgba(239,68,68,0.10);
  --blue:    #5B9DFF;
  --blue-bg: rgba(91,157,255,0.10);
  --violet:  #A78BFA;
  --violet-bg: rgba(167,139,250,0.10);

  /* Code block surface */
  --code-bg: #07080a;
  --teal-on: #001a14;   /* text color on teal fills */
  --shadow-card: 0 0 0 1px var(--line-1);
}

[data-theme="light"] {
  --bg-0: #FFFFFF;
  --bg-1: #FFFFFF;
  --bg-2: #F7F7F8;
  --bg-3: #ECECF1;
  --bg-4: #DCDEE3;

  --line-1: rgba(15,17,21,0.06);
  --line-2: rgba(15,17,21,0.10);
  --line-3: rgba(15,17,21,0.20);

  --fg-0: #0F1014;
  --fg-1: #3D434D;
  --fg-2: #6B7280;
  --fg-3: #9CA1A9;

  --teal:    #0F1014;
  --teal-d:  #000000;
  --teal-bg: rgba(15,17,21,0.06);
  --teal-on: #FFFFFF;
  --teal-glow: rgba(15,17,21,0.35);
  --teal-tint: rgba(15,17,21,0.05);
  --amber:   #D97706;
  --amber-bg: rgba(217,119,6,0.10);
  --red:     #DC2626;
  --red-bg:  rgba(220,38,38,0.08);
  --blue:    #2563EB;
  --blue-bg: rgba(37,99,235,0.08);
  --violet:  #7C3AED;
  --violet-bg: rgba(124,58,237,0.08);

  --code-bg: #0F1014;   /* keep code dark even in light mode (Stripe-like) */
  --teal-on: #FFFFFF;
  --shadow-card: 0 1px 2px rgba(15,17,21,0.04), 0 0 0 1px var(--line-1);
}

[data-theme="light"] .card { box-shadow: var(--shadow-card); border-color: var(--line-1); }
[data-theme="light"] .card-head { background: transparent; }
[data-theme="light"] .tbl th { background: var(--bg-2); color: var(--fg-2); }
[data-theme="light"] .tbl tbody tr:hover td { background: var(--bg-2); }
[data-theme="light"] .topbar { background: var(--bg-1); }
[data-theme="light"] .app-main { background: var(--bg-0); }
[data-theme="light"] ::selection { background: var(--teal); color: var(--teal-on); }
[data-theme="light"] *::-webkit-scrollbar-thumb { background: var(--bg-3); border: 2px solid var(--bg-0); }

/* Sidebar: in light mode, give it a soft off-white panel feel */
[data-theme="light"] .sidebar { background: var(--bg-1); }
[data-theme="light"] .nav-item.active { background: var(--bg-2); border-color: var(--line-1); }
[data-theme="light"] .nav-item:hover { background: var(--bg-2); }

/* Brand mark on light */
[data-theme="light"] .brand-mark { color: var(--teal-on); box-shadow: 0 0 0 1px var(--line-3), 0 2px 6px rgba(15,17,21,0.12); }

/* Buttons: in light mode primary uses teal w/ white text */
[data-theme="light"] .btn-primary { color: #fff; }
[data-theme="light"] .btn-primary:hover { background: var(--teal-d); border-color: var(--teal-d); }
[data-theme="light"] .btn { background: var(--bg-1); border-color: var(--line-2); }
[data-theme="light"] .btn:hover { background: var(--bg-2); }
[data-theme="light"] .btn-primary { background: var(--teal); border-color: var(--teal-d); color: #fff; }
[data-theme="light"] .btn-primary:hover { background: var(--teal-d); border-color: var(--teal-d); }
[data-theme="light"] .btn-ghost { background: transparent; border-color: transparent; }
[data-theme="light"] .btn-ghost:hover { background: var(--bg-2); }

/* Pure white surfaces */
[data-theme="light"] .chip { background: var(--bg-1); border-color: var(--line-2); }
[data-theme="light"] .searchbar { background: var(--bg-1); border-color: var(--line-2); }
[data-theme="light"] .searchbar kbd { background: var(--bg-2); border-color: var(--line-2); }
[data-theme="light"] .stat { background: var(--bg-1); box-shadow: var(--shadow-card); }
[data-theme="light"] .topbar { background: var(--bg-0); border-bottom-color: var(--line-1); }
[data-theme="light"] .app-main { background: var(--bg-0); }

/* Theme toggle: white in light mode */
[data-theme="light"] .theme-toggle { background: var(--bg-1); border-color: var(--line-2); }
[data-theme="light"] .theme-toggle:hover { background: var(--bg-2); }

/* Hero pill: light surface in light mode */
[data-theme="light"] .hero .pill {
  background: var(--bg-1);
  border-color: var(--line-2);
  color: var(--fg-1);
  box-shadow: 0 1px 2px rgba(15,17,21,0.04);
}

/* Section eyebrows: keep subtle in light mode */
[data-theme="light"] .section-eyebrow { color: var(--fg-2); }

/* Findings panels: pure white */
[data-theme="light"] .findings,
[data-theme="light"] .cat-head { background: var(--bg-1); }
[data-theme="light"] .cat-head:hover { background: var(--bg-2); }
[data-theme="light"] .finding-expand { background: var(--bg-2); }
[data-theme="light"] .finding.open { background: var(--bg-2); }
[data-theme="light"] .finding:hover { background: var(--bg-2); }

/* Stepper / Uploader pure white */
[data-theme="light"] .stepper { background: var(--bg-1); }
[data-theme="light"] .step.active { background: var(--bg-2); }
[data-theme="light"] .uploader { background: var(--bg-1); }
[data-theme="light"] .connect-card { background: var(--bg-1); }
[data-theme="light"] .connect-card:hover { background: var(--bg-2); }
[data-theme="light"] .store-card { background: var(--bg-1); }
[data-theme="light"] .store-card.sel {
  border-color: var(--fg-0);
  box-shadow: 0 0 0 1px var(--fg-0);
  background: var(--bg-1);
}

/* Form inputs in light mode */
[data-theme="light"] .field input,
[data-theme="light"] .field select,
[data-theme="light"] .field textarea {
  background: var(--bg-1);
  border-color: var(--line-2);
}

/* Chips in light mode */
[data-theme="light"] .chip-play { color: #1f7a35; background: rgba(52,168,83,0.10); border-color: rgba(52,168,83,0.25); }
[data-theme="light"] .chip-app { color: #1F2937; background: rgba(15,17,21,0.05); border-color: rgba(15,17,21,0.12); }

/* Searchbar in light mode */
[data-theme="light"] .searchbar { background: var(--bg-2); border-color: var(--line-1); }
[data-theme="light"] .searchbar kbd { background: var(--bg-1); }

/* Score ring track */
[data-theme="light"] .score-ring svg circle:first-child { stroke: var(--bg-3) !important; }

/* Hero backgrounds */
[data-theme="light"] .hero-bg { background: transparent; }
[data-theme="light"] .hero-grid { opacity: 0.35; }
[data-theme="light"] .landing-nav {
  background: rgba(255,255,255,0.78);
}
[data-theme="light"] .hero h1 .accent {
  background: linear-gradient(180deg, var(--teal), var(--teal-d));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Code blocks: stay dark with adjusted contrast even in light mode */
[data-theme="light"] .code-block {
  background: var(--code-bg);
  border-color: rgba(255,255,255,0.08);
  color: #E5E7EB;
}
[data-theme="light"] .code-block .ln { color: rgba(255,255,255,0.3); }
[data-theme="light"] .code-block .filename { color: rgba(255,255,255,0.45); }

/* Demo frame — ALWAYS dark, regardless of theme */
.demo-frame {
  /* Re-scope vars locally so all descendants render dark */
  --bg-0: #0A0B0D;
  --bg-1: #0F1014;
  --bg-2: #15171C;
  --bg-3: #1C1F26;
  --bg-4: #242832;
  --fg-0: #F5F6F7;
  --fg-1: #B6BAC2;
  --fg-2: #7C828D;
  --fg-3: #565B65;
  --line-1: rgba(255,255,255,0.06);
  --line-2: rgba(255,255,255,0.10);
  --line-3: rgba(255,255,255,0.16);
  background: var(--bg-1);
  color: var(--fg-0);
  border-color: rgba(255,255,255,0.10);
  box-shadow: 0 30px 80px -30px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.06);
}
[data-theme="light"] .demo-frame {
  box-shadow: 0 30px 80px -30px rgba(15,17,21,0.35), 0 0 0 1px rgba(255,255,255,0.06);
}

/* CTA section */
[data-theme="light"] .cta-section {
  background: var(--bg-1);
}

/* Price card emphasis */
[data-theme="light"] .price-card.feat {
  background: var(--bg-1);
  border-color: var(--fg-0);
  box-shadow: 0 8px 24px -10px rgba(15,17,21,0.10), 0 0 0 1px var(--fg-0);
}

/* Stat sparkline backgrounds blend better */
[data-theme="light"] .stat { box-shadow: var(--shadow-card); }

/* Severity stays consistent — already using vars */

/* Toggle in light */
[data-theme="light"] .toggle { background: var(--bg-3); }
[data-theme="light"] .toggle::after { background: var(--bg-1); }
[data-theme="light"] .toggle.on::after { background: #fff; }

/* Brand-mark text-color on teal */
[data-theme="light"] .brand-mark { color: #fff; }

/* Verdict banner: subtle in light */
[data-theme="light"] .verdict { background: var(--bg-1); box-shadow: var(--shadow-card); }
[data-theme="light"] .verdict::before { opacity: 0.06; }

/* Theme toggle button (sun/moon) */
.theme-toggle {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  color: var(--fg-1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background .15s, border-color .15s;
}
.theme-toggle:hover { background: var(--bg-3); border-color: var(--line-3); color: var(--fg-0); }
.theme-toggle svg { transition: transform .4s cubic-bezier(.4,.2,.2,1), opacity .25s; }

:root, [data-theme="dark"], [data-theme="light"] {
  --font-sans: "Geist", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-display: "Geist", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-pixel-square:   "Geist Pixel Square",   "Geist Mono", monospace;
  --font-pixel-grid:     "Geist Pixel Grid",     "Geist Mono", monospace;
  --font-pixel-circle:   "Geist Pixel Circle",   "Geist Mono", monospace;
  --font-pixel-triangle: "Geist Pixel Triangle", "Geist Mono", monospace;
  --font-pixel-line:     "Geist Pixel Line",     "Geist Mono", monospace;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
}

* { box-sizing: border-box; }

/* Smooth scrolling for anchor links on public pages.
   window.scrollTo({ behavior:"instant" }) in go() still overrides this for route changes. */
html { scroll-behavior: smooth; }

html, body, #root {
  margin: 0; padding: 0;
  background: var(--bg-0);
  color: var(--fg-0);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Tabular nums on diagnostic readouts */
.mono, .tbl td, .tbl th,
.stat .val, .stat .trend,
.crumbs, .card-sub,
.code-block, kbd {
  font-variant-numeric: tabular-nums;
}
button { font-family: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
input, textarea, select { font-family: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--teal); color: var(--teal-on); }

*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 8px; border: 2px solid var(--bg-0); }
*::-webkit-scrollbar-thumb:hover { background: var(--bg-4); }

/* Geist Pixel utility classes */
.pixel-square   { font-family: var(--font-pixel-square);   letter-spacing: 0; }
.pixel-grid     { font-family: var(--font-pixel-grid);     letter-spacing: 0; }
.pixel-circle   { font-family: var(--font-pixel-circle);   letter-spacing: 0; }
.pixel-triangle { font-family: var(--font-pixel-triangle); letter-spacing: 0; }
.pixel-line     { font-family: var(--font-pixel-line);     letter-spacing: 0; }

.mono { font-family: var(--font-mono); }

/* ─────── App shell ─────── */
.app-shell { display: grid; grid-template-columns: 244px 1fr; min-height: 100vh; }
.app-main { display: flex; flex-direction: column; min-width: 0; background: var(--bg-0); }

/* Sidebar */
.sidebar {
  background: var(--bg-1);
  border-right: 1px solid var(--line-1);
  padding: 18px 12px;
  display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; height: 100vh;
}
.sidebar .brand {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px 18px;
  border-bottom: 1px solid var(--line-1);
  margin-bottom: 12px;
}
.brand-mark {
  /* deprecated — replaced by full-wordmark <img class="brand-logo"> */
  display: none;
}
.brand-logo {
  height: 22px;
  width: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}
/* Theme-conditional logo */
.brand-logo-dark  { display: none; }
[data-theme="dark"] .brand-logo-light { display: none; }
[data-theme="dark"] .brand-logo-dark  { display: block; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 600; font-size: 15.5px;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: baseline;
}
.brand-name .prefix { color: var(--fg-0); }
.brand-name .word { color: var(--fg-2); }
.brand-name .dot { color: var(--teal); }
.nav-section {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
  padding: 16px 10px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  color: var(--fg-1);
  cursor: pointer;
  font-size: 13.5px;
  border: 1px solid transparent;
  user-select: none;
}
.nav-item:hover { background: var(--bg-2); color: var(--fg-0); }
.nav-item.active { background: var(--bg-3); color: var(--fg-0); border-color: var(--line-2); }
.nav-item .ic { width: 16px; height: 16px; color: var(--fg-2); flex-shrink: 0; }
.nav-item.active .ic { color: var(--teal); }
.nav-item .count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
  background: var(--bg-3);
  padding: 1px 6px;
  border-radius: 4px;
}
.sidebar .footer { margin-top: auto; border-top: 1px solid var(--line-1); padding-top: 12px; }
.userchip {
  display: flex; align-items: center; gap: 10px;
  padding: 8px;
  border-radius: var(--r-md);
  cursor: pointer;
}
.userchip:hover { background: var(--bg-2); }
.avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #A78BFA, #5B9DFF);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 600; color: #fff;
  flex-shrink: 0;
}
.userchip .uname { font-size: 13px; font-weight: 500; }
.userchip .uplan { font-size: 11px; color: var(--fg-2); font-family: var(--font-mono); }

/* Top bar */
.topbar {
  height: 56px;
  border-bottom: 1px solid var(--line-1);
  display: flex; align-items: center;
  padding: 0 28px;
  gap: 16px;
  background: var(--bg-0);
  position: sticky; top: 0; z-index: 5;
}
.crumbs {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-2);
  display: flex; align-items: center; gap: 8px;
}
.crumbs .sep { color: var(--fg-3); }
.crumbs .cur { color: var(--fg-0); }
.topbar .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.searchbar {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-1);
  border: 1px solid var(--line-1);
  border-radius: var(--r-sm);
  padding: 5px 10px;
  font-size: 12.5px;
  color: var(--fg-2);
  font-family: var(--font-mono);
  width: 336px;
  min-width: 120px;
  flex-shrink: 1;
}
/* Placeholder span — lighter than typed text, truncates before pushing kbd */
.searchbar > span {
  color: var(--fg-3);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.searchbar kbd {
  margin-left: auto;
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 10.5px;
  color: var(--fg-2);
  flex-shrink: 0;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  color: var(--fg-0);
  transition: background .12s, border-color .12s, transform .04s;
  white-space: nowrap;
}
.btn:hover { background: var(--bg-3); border-color: var(--line-3); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--teal);
  color: var(--teal-on);
  border-color: var(--teal-d);
  font-weight: 600;
}
.btn-primary:hover { background: var(--teal-d); border-color: var(--teal-d); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--fg-1); }
.btn-ghost:hover { background: var(--bg-2); color: var(--fg-0); }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-lg { padding: 12px 22px; font-size: 14px; }
.btn-icon { padding: 0; width: 32px; height: 32px; border-radius: 50%; justify-content: center; }

/* Content */
.content { padding: 28px 32px 80px; max-width: 1480px; width: 100%; margin: 0 auto; }
.page-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}
.page-sub { color: var(--fg-2); margin: 4px 0 0; font-size: 13.5px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; gap: 16px; }

/* Cards */
.card {
  background: var(--bg-1);
  border: 1px solid var(--line-1);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.tbl-scroll { overflow-x: auto; }
.card-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-1);
}
.card-title { font-size: 13px; font-weight: 600; letter-spacing: -0.005em; }
.card-sub { font-size: 12px; color: var(--fg-2); margin-left: auto; font-family: var(--font-mono); }
.card-body { padding: 18px; }

/* Severity badges */
.sev {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px 3px 6px;
  border-radius: 4px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.sev .dot { width: 6px; height: 6px; border-radius: 50%; }
.sev-critical { color: var(--red); background: var(--red-bg); border-color: rgba(239,68,68,0.25); }
.sev-critical .dot { background: var(--red); box-shadow: 0 0 6px var(--red); }
.sev-warning  { color: var(--amber); background: var(--amber-bg); border-color: rgba(245,158,11,0.25); }
.sev-warning  .dot { background: var(--amber); box-shadow: 0 0 6px var(--amber); }
.sev-info     { color: var(--blue); background: var(--blue-bg); border-color: rgba(91,157,255,0.25); }
.sev-info     .dot { background: var(--blue); box-shadow: 0 0 6px var(--blue); }
.sev-pass     { color: var(--teal); background: var(--teal-bg); border-color: var(--line-3); }
.sev-pass     .dot { background: var(--teal); box-shadow: 0 0 6px var(--teal-glow); }

/* Chips */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  font-size: 11.5px;
  color: var(--fg-1);
  font-family: var(--font-mono);
}
.chip-play { color: #9ad8a8; background: rgba(52,168,83,0.10); border-color: rgba(52,168,83,0.3); }
.chip-app  { color: #e8e8ea; background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.18); }

/* Tables */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 10.5px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--fg-3);
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-1);
  background: var(--bg-1);
}
.tbl td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-1);
  vertical-align: middle;
}
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .1s; }
.tbl tbody tr:hover td { background: var(--bg-2); cursor: pointer; }

/* Animations */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse-dot { 0%,100% { opacity:1; transform: scale(1);} 50% { opacity:.45; transform: scale(.85);} }
@keyframes sweep { 0%{ transform: translateX(-100%);} 100%{ transform: translateX(220%);} }
@keyframes fadeUp { from{ opacity:0; transform: translateY(8px);} to{ opacity:1; transform: translateY(0);} }
@keyframes blink { 50% { opacity: 0; } }
@keyframes draw { from { stroke-dashoffset: var(--len);} to { stroke-dashoffset: 0; } }
@keyframes scan-line {
  0% { top: 0; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 8px var(--teal);
  animation: pulse-dot 1.4s ease-in-out infinite;
  display: inline-block;
}
.cursor { animation: blink 1s steps(2) infinite; }
.fade-up { animation: fadeUp .5s ease-out both; }

/* ─────── Landing ─────── */
.landing { background: var(--bg-0); min-height: 100vh; color: var(--fg-0); position: relative; overflow-x: clip; }
.landing-nav {
  position: sticky; top: 0; z-index: 30;
  background: rgba(10,11,13,0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-1);
}
.landing-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex; align-items: center; gap: 24px;
}
.landing-nav .links { display: flex; gap: 22px; margin-left: 28px; font-size: 13.5px; color: var(--fg-1); }
.landing-nav .links a:hover { color: var(--fg-0); }
.landing-nav .right { margin-left: auto; display: flex; gap: 10px; align-items: center; }

.hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 80px 32px 30px;
  text-align: center;
  position: relative;
  z-index: 1;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(0,212,170,0.12), transparent 60%),
    radial-gradient(ellipse 70% 60% at 50% 100%, rgba(91,157,255,0.06), transparent 60%);
  pointer-events: none;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line-1) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-1) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 30%, transparent 75%);
  pointer-events: none;
  opacity: .5;
}
.hero .pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 8px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(15,16,20,0.6);
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--fg-1);
  margin-bottom: 24px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 5.8vw, 72px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.022em;
  margin: 0;
}
.hero h1 { color: var(--fg-1); }
.hero h1 .accent { color: var(--fg-0); }
.hero p.tag {
  font-size: 18px;
  color: var(--fg-1);
  max-width: 600px;
  margin: 24px auto 32px;
  line-height: 1.55;
}
.hero .cta-row { display: flex; gap: 12px; justify-content: center; align-items: center; }
.hero .cta-sub { color: var(--fg-2); font-size: 12px; margin-top: 14px; font-family: var(--font-mono); }

.trust-bar {
  max-width: 1100px;
  margin: 40px auto 0;
  padding: 22px 32px;
  display: flex;
  gap: 36px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  border-top: 1px solid var(--line-1);
  border-bottom: 1px solid var(--line-1);
}
.trust-bar .item { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.trust-bar .num {
  font-family: var(--font-pixel-square);
  font-size: 24px; font-weight: 400;
  color: var(--fg-0);
  letter-spacing: 0;
}
.trust-bar .lbl {
  font-size: 10.5px;
  color: var(--fg-2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--font-mono);
}

.section { max-width: 1180px; margin: 0 auto; padding: 90px 32px; }
/* Anchor scroll offset — keeps headings clear of the 90px sticky nav. */
#how, #how-it-works, #features, #pricing { scroll-margin-top: 100px; }
.section h2 {
  font-family: var(--font-display);
  font-size: 38px; font-weight: 600;
  letter-spacing: -0.018em;
  margin: 0 0 14px;
}
.section .lead { color: var(--fg-1); font-size: 16px; max-width: 600px; margin: 0 0 44px; }
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--teal);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.steps-grid  { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.feature-card {
  background: var(--bg-1);
  border: 1px solid var(--line-1);
  border-radius: var(--r-lg);
  padding: 22px;
  position: relative;
  transition: border-color .15s, transform .15s;
}
.feature-card:hover { border-color: var(--line-3); transform: translateY(-2px); }
.feature-card .ic {
  width: 34px; height: 34px;
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  margin-bottom: 14px;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  color: var(--teal);
}
.feature-card h3 { font-size: 15px; font-weight: 600; margin: 0 0 6px; letter-spacing: -0.005em; }
.feature-card p { font-size: 13px; color: var(--fg-2); margin: 0; line-height: 1.55; }
.feature-card .count {
  position: absolute; top: 22px; right: 22px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
}

/* Live demo frame */
.demo-wrap { max-width: 980px; margin: 0 auto; }
.demo-frame {
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 40px 100px -40px rgba(0,212,170,0.22), 0 0 0 1px var(--line-1);
}
.demo-frame .topdot {
  display: flex; gap: 6px; padding: 11px 14px;
  border-bottom: 1px solid var(--line-1);
  background: var(--bg-2);
  align-items: center;
}
.demo-frame .topdot .d { width: 10px; height: 10px; border-radius: 50%; background: var(--bg-4); }
.demo-frame .topdot .title { margin-left: 14px; font-family: var(--font-mono); font-size: 11.5px; color: var(--fg-2); }
.demo-body {
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 20px 24px;
  color: var(--fg-1);
  background:
    radial-gradient(circle at 100% 0%, rgba(0,212,170,0.05), transparent 40%);
  min-height: 480px;
  position: relative;
}
.demo-body .line { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.demo-body .line.q { color: var(--fg-3); }
.demo-body .check { color: var(--teal); }
.demo-body .warn { color: var(--amber); }
.demo-body .crit { color: var(--red); }
.demo-body .tag { color: var(--fg-3); margin-left: auto; font-size: 11.5px; }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.price-card {
  background: var(--bg-1);
  border: 1px solid var(--line-1);
  border-radius: var(--r-lg);
  padding: 28px 24px;
  display: flex; flex-direction: column;
  position: relative;
}
.price-card.feat {
  border-color: var(--line-3);
  background:
    radial-gradient(120% 50% at 50% 0%, var(--teal-tint), transparent 60%),
    var(--bg-1);
}
.price-card .ribbon {
  position: absolute; top: -10px; left: 24px;
  background: var(--teal);
  color: var(--teal-on);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
}
.price-card h3 {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 600;
  margin: 0 0 6px;
}
.price-card .price {
  font-family: var(--font-display);
  font-size: 36px; font-weight: 600;
  letter-spacing: -0.02em;
  margin: 12px 0 4px;
}
.price-card .price .unit { font-size: 14px; color: var(--fg-2); font-weight: 400; }
.price-card .sub { color: var(--fg-2); font-size: 13px; margin-bottom: 20px; }
.price-card ul { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-direction: column; gap: 10px; flex-grow: 1; }
.price-card li { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; color: var(--fg-1); }
.price-card li .ck { color: var(--teal); flex-shrink: 0; margin-top: 2px; }
/* Pricing CTA stretches full-width in the card column — center its label. */
.price-card .btn { justify-content: center; width: 100%; }

.cta-section {
  max-width: 1100px; margin: 40px auto 80px;
  padding: 60px 40px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  background:
    radial-gradient(ellipse 80% 100% at 50% 0%, var(--teal-tint), transparent 60%),
    var(--bg-1);
  text-align: center;
}
.cta-section h2 {
  font-family: var(--font-display);
  font-size: 36px; font-weight: 600;
  letter-spacing: -0.018em;
  margin: 0 0 12px;
}
.cta-section p { color: var(--fg-1); font-size: 16px; margin: 0 0 24px; }

/* ─────── Docs page ─────── */
.docs-cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 18px;
}
.docs-cat-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--bg-1);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  cursor: pointer;
  font-size: 13px; color: var(--fg-0);
  font-family: var(--font-sans);
  text-align: left;
  transition: border-color .15s, background .15s;
  width: 100%;
}
.docs-cat-item:hover { border-color: var(--line-3); background: var(--bg-2); }
.docs-section { scroll-margin-top: 100px; margin-top: 44px; padding-top: 36px; border-top: 1px solid var(--line-1); }

.footer-bar {
  border-top: 1px solid var(--line-1);
  padding: 28px 32px;
  max-width: 1180px;
  margin: 0 auto;
  display: flex; justify-content: space-between;
  align-items: center;
  color: var(--fg-2);
  font-size: 12.5px;
  font-family: var(--font-mono);
}

/* ─────── Dashboard stats ─────── */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.stat {
  background: var(--bg-1);
  border: 1px solid var(--line-1);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}
.stat .lbl {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 10px;
}
.stat .val {
  font-family: var(--font-display);
  font-size: 30px; font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1;
}
.stat .val .unit { font-size: 15px; color: var(--fg-2); margin-left: 2px; }
.stat .trend {
  font-family: var(--font-mono);
  font-size: 11.5px;
  margin-top: 8px;
  display: flex; align-items: center; gap: 4px;
}
.stat .trend.up { color: var(--teal); }
.stat .trend.dn { color: var(--red); }
.stat .spark {
  position: absolute;
  right: 12px; top: 14px;
  width: 80px; height: 30px;
}

.two-col { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; }

/* ─────── Score ring ─────── */
.score-ring-wrap {
  display: flex; align-items: center; gap: 22px;
}
.score-ring { position: relative; width: 132px; height: 132px; flex-shrink: 0; }
.score-ring svg { transform: rotate(-90deg); }
.score-ring .score-num {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.score-ring .score-num .n {
  font-family: var(--font-pixel-square);
  font-size: 38px; font-weight: 400;
  letter-spacing: 0; line-height: 1;
}
.score-ring .score-num .l {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-3);
  margin-top: 4px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Verdict banner */
.verdict {
  display: flex; align-items: center; gap: 18px;
  padding: 18px 22px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line-2);
  position: relative;
  overflow: hidden;
  background: var(--bg-1);
}
.verdict::before {
  content:""; position: absolute; inset: 0;
  background: radial-gradient(circle at 0% 50%, var(--accent), transparent 50%);
  opacity: .14;
  pointer-events: none;
}
.verdict .icon-wrap {
  width: 56px; height: 56px;
  border-radius: var(--r-md);
  display: grid; place-items: center;
  background: var(--accent-bg);
  border: 1px solid var(--accent);
  color: var(--accent);
  z-index: 1;
  flex-shrink: 0;
}
.verdict .label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.verdict .title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: 4px;
}
.verdict .stamp {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-2);
  text-align: right;
  z-index: 1;
}
.verdict.v-pass { --accent: var(--teal); --accent-bg: var(--teal-bg); }
.verdict.v-likely { --accent: var(--blue); --accent-bg: var(--blue-bg); }
.verdict.v-needs { --accent: var(--amber); --accent-bg: var(--amber-bg); }
.verdict.v-reject { --accent: var(--red); --accent-bg: var(--red-bg); }

/* Store tabs */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--line-2);
  margin-bottom: 18px;
  gap: 4px;
}
.tab {
  padding: 10px 16px;
  font-size: 13px;
  color: var(--fg-2);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  font-weight: 500;
  transition: color .12s;
}
.tab:hover { color: var(--fg-0); }
.tab.active { color: var(--fg-0); border-color: var(--fg-0); }
.tab .ct {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--bg-3);
  color: var(--fg-1);
  padding: 1px 6px;
  border-radius: 4px;
}
.tab.active .ct { background: var(--teal-bg); color: var(--teal); }

/* Category sections */
.cat-head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px;
  background: var(--bg-1);
  border: 1px solid var(--line-1);
  border-bottom: 0;
  border-top-left-radius: var(--r-md);
  border-top-right-radius: var(--r-md);
  cursor: pointer;
  user-select: none;
}
.cat-head:hover { background: var(--bg-2); }
.cat-head .title { font-size: 14px; font-weight: 600; letter-spacing: -0.005em; }
.cat-head .meta { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.cat-head .chev { color: var(--fg-3); transition: transform .15s; }
.cat-head.closed .chev { transform: rotate(-90deg); }
.cat-head .ic { color: var(--fg-2); }

.findings { background: var(--bg-1); border: 1px solid var(--line-1); border-top: 0; border-radius: 0 0 var(--r-md) var(--r-md); }
.finding {
  display: grid;
  grid-template-columns: 110px 1fr 24px;
  align-items: flex-start;
  padding: 14px 18px;
  border-top: 1px solid var(--line-1);
  cursor: pointer;
  border-left: 3px solid transparent;
  gap: 16px;
  transition: background .1s;
}
.finding:hover { background: var(--bg-2); }
.finding.sev-critical { border-left-color: var(--red); }
.finding.sev-warning { border-left-color: var(--amber); }
.finding.sev-info { border-left-color: var(--blue); }
.finding.sev-pass { border-left-color: var(--teal-d); }
.finding .body .name { font-weight: 500; font-size: 13.5px; margin-bottom: 4px; }
.finding .body .desc { color: var(--fg-2); font-size: 12.5px; line-height: 1.5; }
.finding .chev { color: var(--fg-3); margin-top: 2px; }
.finding.open { background: var(--bg-2); border-bottom: 1px solid var(--line-1); }
.finding.open .chev { transform: rotate(90deg); }
.finding-expand {
  padding: 0 18px 18px 132px;
  border-top: 1px solid var(--line-1);
  background: var(--bg-2);
  display: none;
}
.finding.open + .finding-expand { display: block; }
.finding-expand .rec {
  background: var(--bg-1);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--fg-1);
  line-height: 1.55;
}
.finding-expand .rec h5 {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 8px;
}
.code-block {
  background: var(--code-bg);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  padding: 12px 14px;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-1);
  overflow-x: auto;
  position: relative;
}
.code-block .filename {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--fg-3);
  margin-bottom: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.code-block .ln { color: var(--fg-3); user-select: none; display: inline-block; width: 24px; }
.code-block .kw { color: #c084fc; }
.code-block .str { color: #fbbf24; }
.code-block .tag { color: #60a5fa; }
.code-block .at { color: #a3e635; }
.code-block .hl { background: rgba(239,68,68,0.15); display: block; margin: 0 -14px; padding: 0 14px; border-left: 2px solid var(--red); }

.policy-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--blue);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid rgba(91,157,255,0.25);
  background: var(--blue-bg);
  margin-top: 12px;
  margin-right: 8px;
}
.policy-link:hover { background: rgba(91,157,255,0.18); }

/* Radar / breakdown */
.cat-breakdown { display: flex; flex-direction: column; gap: 12px; }
.cat-row { display: flex; align-items: center; gap: 12px; }
.cat-row .name { font-size: 12.5px; flex-shrink: 0; width: 100px; color: var(--fg-1); }
.cat-row .bar-track {
  flex: 1; height: 6px; background: var(--bg-3);
  border-radius: 3px; overflow: hidden;
}
.cat-row .bar {
  height: 100%; border-radius: 3px;
  background: var(--teal);
  box-shadow: 0 0 8px var(--teal-glow);
}
.cat-row.warn .bar { background: linear-gradient(90deg, #d97706, var(--amber)); box-shadow: 0 0 8px rgba(245,158,11,0.4); }
.cat-row.bad .bar { background: linear-gradient(90deg, #dc2626, var(--red)); box-shadow: 0 0 8px rgba(239,68,68,0.4); }
.cat-row .pct {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--fg-1);
  width: 36px;
  text-align: right;
}

/* Scan setup (steps) */
.stepper {
  display: flex;
  gap: 4px;
  margin-bottom: 32px;
  background: var(--bg-1);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  padding: 6px;
}
.step {
  flex: 1;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  cursor: pointer;
  color: var(--fg-2);
  font-size: 13px;
  transition: background .12s;
}
.step:hover:not(.active) { background: var(--bg-2); }
.step .n {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--bg-3);
  color: var(--fg-2);
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 600;
  flex-shrink: 0;
}
.step.active { background: var(--bg-3); color: var(--fg-0); }
.step.active .n { background: var(--teal); color: var(--teal-on); }
.step.done .n { background: var(--teal-bg); color: var(--teal); border: 1px solid var(--line-3); }
.step.done { color: var(--fg-1); }
.step .label { font-weight: 500; font-size: 13px; }
.step .sub { color: var(--fg-3); font-size: 11.5px; margin-top: 1px; }

/* Uploader */
.uploader {
  border: 2px dashed var(--line-2);
  border-radius: var(--r-lg);
  padding: 48px 32px;
  text-align: center;
  background: var(--bg-1);
  transition: border-color .15s, background .15s;
  position: relative;
  overflow: hidden;
}
.uploader:hover, .uploader.drag {
  border-color: var(--teal);
  background:
    radial-gradient(circle at 50% 50%, var(--teal-tint), transparent 60%),
    var(--bg-1);
}
.uploader .ic-big {
  width: 56px; height: 56px;
  border-radius: var(--r-md);
  background: var(--bg-3);
  display: inline-grid; place-items: center;
  margin-bottom: 16px;
  color: var(--teal);
  border: 1px solid var(--line-2);
}
.uploader h3 {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 600;
  margin: 0 0 8px;
}
.uploader p { color: var(--fg-2); font-size: 13.5px; margin: 0 0 18px; }
.uploader .types {
  display: flex; gap: 8px; justify-content: center;
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
  letter-spacing: 0.08em;
}
.uploader .types span {
  border: 1px solid var(--line-2);
  padding: 3px 8px;
  border-radius: 4px;
}

.connect-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.connect-card {
  background: var(--bg-1);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  padding: 16px;
  display: flex; align-items: center; gap: 12px;
  cursor: pointer;
}
.connect-card:hover { border-color: var(--line-3); background: var(--bg-2); }
.connect-card .ic {
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  background: var(--bg-3);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.connect-card .nm { font-size: 13.5px; font-weight: 500; }
.connect-card .sb { font-size: 11.5px; color: var(--fg-3); font-family: var(--font-mono); }

/* Store select cards */
.store-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.store-card {
  background: var(--bg-1);
  border: 1px solid var(--line-1);
  border-radius: var(--r-lg);
  padding: 22px;
  cursor: pointer;
  position: relative;
  transition: border-color .12s;
}
.store-card:hover { border-color: var(--line-3); }
.store-card.sel {
  border-color: var(--teal);
  background:
    radial-gradient(circle at 100% 0%, var(--teal-tint), transparent 50%),
    var(--bg-1);
}
.store-card .check {
  position: absolute; top: 16px; right: 16px;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--line-3);
  display: grid; place-items: center;
}
.store-card.sel .check {
  background: var(--teal); border-color: var(--teal); color: var(--teal-on);
}
.store-card .logo {
  width: 44px; height: 44px;
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  margin-bottom: 14px;
  border: 1px solid var(--line-2);
}
.store-card h3 { margin: 0 0 4px; font-size: 16px; font-weight: 600; letter-spacing: -0.005em; }
.store-card p { color: var(--fg-2); font-size: 12.5px; margin: 0; }
.store-card .checks-count {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--fg-3);
}
.store-card .checks-count strong { color: var(--fg-0); }

/* Form fields */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.field input, .field select, .field textarea {
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 9px 12px;
  font-size: 13.5px;
  color: var(--fg-0);
  outline: none;
  transition: border-color .12s;
  width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--teal); }
.field .hint { font-size: 11.5px; color: var(--fg-3); }

/* API keys table-row */
.apikey-row {
  display: grid;
  grid-template-columns: 1fr 220px 140px 110px;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-1);
}
.apikey-row:last-child { border-bottom: 0; }
.apikey-row .key {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--fg-1);
  background: var(--bg-2);
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--line-1);
  display: inline-flex; align-items: center; gap: 8px;
  width: fit-content;
}
.apikey-row .lbl { font-size: 13.5px; font-weight: 500; }
.apikey-row .lbl .sub { display: block; font-size: 11.5px; color: var(--fg-3); margin-top: 1px; font-family: var(--font-mono); }
.apikey-row .meta { font-family: var(--font-mono); font-size: 12px; color: var(--fg-2); }

/* Toggle */
.toggle {
  width: 36px; height: 20px;
  background: var(--bg-3);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  border: 1px solid var(--line-2);
  flex-shrink: 0;
  transition: background .15s;
}
.toggle::after {
  content:""; position: absolute;
  left: 2px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px;
  background: var(--fg-1);
  border-radius: 50%;
  transition: left .15s, background .15s;
}
.toggle.on { background: var(--teal); border-color: var(--teal-d); }
.toggle.on::after { left: 18px; background: #001a14; }

/* Misc */
.row-between { display: flex; align-items: center; justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.col { display: flex; flex-direction: column; }
.mt-2 { margin-top: 8px;} .mt-3 { margin-top: 12px;} .mt-4 { margin-top: 16px;} .mt-6 { margin-top: 24px;}
.text-muted { color: var(--fg-2); }
.text-mono { font-family: var(--font-mono); }

/* App icon style */
.app-icon {
  border-radius: 22%;
  background: linear-gradient(135deg, #5B9DFF, #A78BFA);
  display: grid; place-items: center;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

/* Empty/placeholder pattern */
.dotted {
  background-image: radial-gradient(rgba(255,255,255,0.12) 1px, transparent 1px);
  background-size: 12px 12px;
}

/* ─────── Toggle: light-mode fix ─────── */
[data-theme="light"] .toggle.on::after { background: #fff; }

/* ─────── Scan results — extended tabs ─────── */
.tabs { overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }

/* Fix plan tickets */
.fix-ticket { transition: border-color .12s; }
.fix-ticket:hover { border-color: var(--line-3) !important; }

/* ─────── Reports page ─────── */
[data-theme="light"] .toggle.on { background: var(--teal); border-color: var(--teal-d); }

/* ─────── Policy library — full-width layout ─────── */
.policy-content-area { min-height: 400px; }

/* ─────── Cat row — override for scan results sidebar ─────── */
.cat-row { transition: none; }

/* ─────── Scan processing animation ─────── */
@keyframes sweep {
  0%   { transform: translateX(-120%); }
  100% { transform: translateX(220%); }
}

/* ─────── Score ring — pixel font size on smaller rings ─────── */
.score-ring .score-num .n { line-height: 1; }

/* Searchbar responsive width */
@media (max-width: 1100px) {
  .searchbar { width: 260px; }
}
@media (max-width: 768px) {
  .searchbar { width: 180px; }
  .searchbar kbd { display: none; }
}
@media (max-width: 640px) {
  .searchbar { width: 130px; }
  .steps-grid { grid-template-columns: 1fr; }
  .docs-cat-grid { grid-template-columns: 1fr 1fr; }
}

/* Mobile-ish */
@media (max-width: 900px) {
  .feature-grid, .pricing-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr 1fr; }
  .docs-cat-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .app-shell { grid-template-columns: 60px 1fr; }
  .sidebar { padding: 14px 6px; }
  .sidebar .brand-name, .nav-item span:not(.count), .nav-section, .userchip .col { display: none; }
}

/* ─────── Score ring — compact variant for preview result ─────── */
.score-ring-sm .score-num .n { font-size: 24px !important; }
.score-ring-sm .score-num .l { font-size: 9px; }

/* ─────── Free preview scan funnel ─────── */
/* Landing layout: wider body for the free-scan flow */
.free-scan-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 28px 120px;
}

/* Locked feature chips hover state */
.lock-chip:hover {
  background: var(--bg-3);
  border-color: var(--line-3);
}

/* Light-mode overrides for free-scan cards */
[data-theme="light"] .free-scan-entry-card {
  background: var(--bg-1);
}

/* Scan progress bar track */
.scan-progress-track {
  height: 3px;
  background: var(--bg-3);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 8px;
}
.scan-progress-fill {
  height: 100%;
  width: 60%;
  background: var(--teal);
  border-radius: 2px;
  animation: sweep 1.2s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RELIQ FRONTEND AUDIT — ADDITIONS
   Sections: animations · buttons · focus · tables · responsive · toasts
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── New keyframe animations ──────────────────────────────────────────────── */
@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}
@keyframes skeletonPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.45; }
}

/* ── Danger / destructive button ─────────────────────────────────────────── */
.btn-danger {
  background: rgba(239,68,68,0.14);
  border-color: rgba(239,68,68,0.35);
  color: var(--red);
}
.btn-danger:hover {
  background: rgba(239,68,68,0.22);
  border-color: rgba(239,68,68,0.55);
  color: var(--red);
}
[data-theme="light"] .btn-danger {
  background: rgba(220,38,38,0.08);
  border-color: rgba(220,38,38,0.3);
  color: var(--red);
}
[data-theme="light"] .btn-danger:hover {
  background: rgba(220,38,38,0.14);
}

/* ── Visible keyboard focus ──────────────────────────────────────────────── */
/* Applies a clear teal ring on keyboard navigation only (not mouse clicks). */
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}
/* Remove default outline when focus-visible is not triggered */
:focus:not(:focus-visible) {
  outline: none;
}
/* Buttons and interactive elements get a softer ring */
.btn:focus-visible,
.nav-item:focus-visible,
.tab:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* ── Table responsive wrapper ────────────────────────────────────────────── */
/* Wrap any .tbl in a .tbl-wrap for horizontal scroll on small screens */
.tbl-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--r-md);
  border: 1px solid var(--line-1);
}
.tbl-wrap .tbl {
  border: none;
  border-radius: 0;
  min-width: 600px; /* prevents collapse before scroll kicks in */
}
/* Ensure all standalone .tbl divs still scroll on small screens */
@media (max-width: 768px) {
  .tbl { overflow-x: auto; display: block; }
  .tbl table { min-width: 560px; }
}

/* ── Accessibility — skip link ───────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -40px;
  left: 8px;
  z-index: 99999;
  padding: 6px 12px;
  background: var(--bg-1);
  border: 1px solid var(--line-3);
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--fg-0);
  text-decoration: none;
  transition: top .15s;
}
.skip-link:focus {
  top: 8px;
}

/* ── Landing page — light-mode nav ──────────────────────────────────────── */
/* Force readable nav background in light mode */
[data-theme="light"] .landing-nav {
  background: rgba(255,255,255,0.88);
}

/* ── Responsive — 1024px (large tablet / small laptop) ──────────────────── */
@media (max-width: 1024px) {
  /* Slightly tighten landing nav links */
  .landing-nav .links { gap: 16px; }
  .landing-nav-inner  { padding: 12px 24px; }

  /* Hero */
  .hero { padding: 64px 24px 24px; }
  .hero p.tag { font-size: 16px; }

  /* Sections */
  .section { padding: 72px 24px; }
  .section h2 { font-size: 32px; }
}

/* ── Responsive — 768px (tablet portrait) ───────────────────────────────── */
@media (max-width: 768px) {
  /* Landing nav: hide text links, keep brand + CTAs */
  .landing-nav .links { display: none; }
  .landing-nav-inner  { padding: 12px 18px; gap: 12px; }
  .landing-nav .right { gap: 8px; }
  /* Collapse "Open dashboard" to just an icon on small nav */
  .landing-nav .right .btn-ghost { display: none; }

  /* Hero */
  .hero { padding: 48px 18px 20px; }
  .hero h1 { font-size: clamp(32px, 8vw, 54px); }
  .hero p.tag { font-size: 15px; max-width: 100%; }
  .hero .cta-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .hero .cta-row .btn { justify-content: center; }

  /* Trust bar */
  .trust-bar { padding: 18px 16px; gap: 20px; }
  .trust-bar .item { min-width: 80px; }
  .trust-bar .num  { font-size: 20px; }

  /* Sections */
  .section { padding: 56px 18px; }
  .section h2 { font-size: 28px; }
  .section .lead { font-size: 14.5px; margin-bottom: 32px; }

  /* Feature / steps grids → 2 col */
  .feature-grid  { grid-template-columns: 1fr 1fr; }
  .steps-grid    { grid-template-columns: 1fr 1fr; }
  .pricing-grid  { grid-template-columns: 1fr; gap: 12px; }

  /* Demo terminal: smaller text */
  .demo-body { font-size: 11.5px; padding: 16px 18px; min-height: 320px; }

  /* CTA section */
  .cta-section { padding: 64px 18px; }
  .cta-section h2 { font-size: 28px; }

  /* Footer */
  .footer-bar { flex-direction: column; gap: 12px; padding: 20px 18px; text-align: center; }
  .footer-bar > div:last-child { flex-wrap: wrap; justify-content: center; }

  /* Dashboard sidebar stays at 60px icon-only on tablet */
  .app-shell  { grid-template-columns: 60px 1fr; }
  .content    { padding: 20px 18px 60px; }
  .topbar     { padding: 0 18px; }

  /* Scan-result tab row — ensure horizontal scroll */
  .tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; }
  .tab  { white-space: nowrap; flex-shrink: 0; }

  /* Docs / GitHub Action pages */
  .docs-cat-grid { grid-template-columns: 1fr; }

  /* Two-column layouts → single */
  .two-col { grid-template-columns: 1fr; }
}

/* ── Responsive — 480px (phone) ─────────────────────────────────────────── */
@media (max-width: 480px) {
  /* Hide sidebar entirely on phone, content takes full width */
  .app-shell { display: block; }
  .sidebar   { display: none; }
  .app-main  { padding-left: 0; }
  .content   { padding: 16px 14px 60px; }
  .topbar    { padding: 0 14px; }

  /* Landing hero */
  .hero h1    { font-size: clamp(28px, 9vw, 44px); }
  .hero .pill { display: none; } /* hide version pill on very small screens */

  /* Feature grid → 1 col on phone */
  .feature-grid  { grid-template-columns: 1fr; }
  .steps-grid    { grid-template-columns: 1fr; }

  /* Auth pages */
  .landing-layout-content { padding: 32px 16px 80px; }

  /* Page head — stack on mobile */
  .page-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .page-head > div:last-child { width: 100%; }
  .page-head .btn { width: 100%; justify-content: center; }

  /* Stats grid */
  .stats-grid { grid-template-columns: 1fr 1fr; }

  /* Score ring — smaller on phone header */
  .scan-header-ring { display: none; }

  /* Billing / team / settings — reduce padding */
  .card-body { padding: 16px; }
  .card-head { padding: 14px 16px; }
}

/* ── Landing — sticky nav does not cover section anchors ─────────────────── */
/* Already has scroll-margin-top: 100px for named sections — bump for mobile */
@media (max-width: 768px) {
  #how, #how-it-works, #features, #pricing { scroll-margin-top: 72px; }
}

/* ── Scan detail — security stat grid responsive ─────────────────────────── */
@media (max-width: 560px) {
  .security-stat-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Loading overlay for entire app-main area ────────────────────────────── */
.page-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  color: var(--fg-3);
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
}

/* ── Gate/lock prompt chip (inline version) ──────────────────────────────── */
.lock-gate-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  background: var(--amber-bg);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  cursor: pointer;
  transition: background .12s;
}
.lock-gate-badge:hover { background: rgba(245,158,11,0.18); }

/* ── Toast container anchor (bottom-safe-area on iOS) ───────────────────── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .reliq-toast-anchor { padding-bottom: env(safe-area-inset-bottom); }
}

/* ── Mobile nav hamburger button ─────────────────────────────────────────── */
/* Hidden above 480px — only visible when the sidebar is hidden on phones. */
.mob-nav-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  color: var(--fg-1);
  cursor: pointer;
  flex-shrink: 0;
  transition: background .12s, border-color .12s;
}
.mob-nav-btn:hover { background: var(--bg-3); border-color: var(--line-3); color: var(--fg-0); }
@media (max-width: 480px) { .mob-nav-btn { display: flex; } }

/* ── Mobile drawer backdrop ──────────────────────────────────────────────── */
.mob-drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.52);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 400;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s;
}
.mob-drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
[data-theme="light"] .mob-drawer-backdrop { background: rgba(15,17,21,0.42); }

/* ── Mobile drawer panel ─────────────────────────────────────────────────── */
.mob-drawer {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 264px;
  background: var(--bg-1);
  border-right: 1px solid var(--line-2);
  z-index: 401;
  transform: translateX(-100%);
  transition: transform .22s cubic-bezier(.4,.2,.2,1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.mob-drawer.open { transform: translateX(0); }

/* Drawer brand row */
.mob-drawer-brand {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line-1);
  flex-shrink: 0;
}
.mob-drawer-close {
  width: 30px; height: 30px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  color: var(--fg-2);
  display: grid; place-items: center;
  cursor: pointer;
  transition: background .12s, color .12s;
}
.mob-drawer-close:hover { background: var(--bg-3); color: var(--fg-0); }

/* Drawer nav items */
.mob-drawer-section {
  padding: 14px 12px 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.mob-drawer-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  margin: 1px 8px;
  border-radius: var(--r-sm);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--fg-1);
  cursor: pointer;
  transition: background .1s, color .1s;
  border: 1px solid transparent;
}
.mob-drawer-item:hover { background: var(--bg-2); color: var(--fg-0); }
.mob-drawer-item.active {
  background: var(--bg-3);
  color: var(--fg-0);
  border-color: var(--line-2);
}
.mob-drawer-item .ic { color: var(--fg-2); flex-shrink: 0; }
.mob-drawer-item.active .ic { color: var(--fg-0); }
.mob-drawer-item .count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--fg-3);
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  border-radius: 4px;
  padding: 1px 6px;
}

/* Drawer footer / user chip */
.mob-drawer-footer {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--line-1);
}
.mob-drawer-userchip {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--bg-2);
}
.mob-drawer-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg-4);
  border: 1px solid var(--line-2);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 600; color: var(--fg-0);
  flex-shrink: 0;
}

