/* Beacon — design tokens & base styles */

:root {
  /* Ink (warm dark neutrals) */
  --ink-950: #0F0E0C;
  --ink-900: #161513;
  --ink-800: #1F1E1B;
  --ink-700: #2C2A26;
  --ink-600: #44423D;
  --ink-500: #6B6862;
  --ink-400: #9B9890;
  --ink-300: #C8C5BC;
  --ink-200: #E6E3DA;
  --ink-100: #F4F1E8;
  --ink-50:  #FAF8F2;

  /* Coral (brand) */
  --coral-50:  #FFEFE8;
  --coral-100: #FFD7C5;
  --coral-200: #FFBA9C;
  --coral-300: #FF9870;
  --coral-400: #FF7757;
  --coral-500: #ED5A3A;
  --coral-600: #C9421F;
  --coral-700: #9C3115;
  --coral-800: #6F210D;

  /* Mint (success) */
  --mint-50:  #E8FBF1;
  --mint-100: #C2F1D9;
  --mint-200: #93E2BB;
  --mint-300: #5ECC97;
  --mint-400: #2EAC71;
  --mint-500: #1F8957;
  --mint-600: #166540;
  --mint-700: #0E4429;

  /* Severity */
  --sev-critical: #E54A2E;
  --sev-high:     #E89234;
  --sev-medium:   #C9B342;
  --sev-low:      #6B7A85;

  /* Theme mapping — dark default */
  --bg: var(--ink-950);
  --surface: var(--ink-900);
  --surface-2: var(--ink-800);
  --border: var(--ink-700);
  --border-hover: var(--ink-600);
  --text-1: var(--ink-200);
  --text-2: var(--ink-400);
  --text-3: var(--ink-500);
  --text-muted: var(--ink-600);
  --brand: var(--coral-400);
  --brand-strong: var(--coral-500);
  --success: var(--mint-400);

  --shadow-card: none;
  --shadow-elev2: none;

  /* Type */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* Radii */
  --r-xs: 4px; --r-sm: 6px; --r-md: 8px; --r-lg: 12px; --r-xl: 16px; --r-2xl: 20px; --r-full: 9999px;

  /* Motion */
  --ease-out: cubic-bezier(0.2, 0, 0, 1);
  --ease-out-soft: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  --bg: var(--ink-100);
  --surface: #FFFFFF;
  --surface-2: var(--ink-50);
  --border: #E6E3DA;
  --border-hover: #D4D0C3;
  --text-1: var(--ink-950);
  --text-2: var(--ink-600);
  --text-3: var(--ink-500);
  --text-muted: #B8B4A8;
  --brand: var(--coral-500);
  --brand-strong: var(--coral-600);
  --success: var(--mint-500);
  --shadow-card: 0 1px 2px rgba(15,14,12,0.04), 0 4px 12px rgba(15,14,12,0.05);
  --shadow-elev2: 0 4px 8px rgba(15,14,12,0.06), 0 12px 32px rgba(15,14,12,0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text-1);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}

body {
  min-height: 100vh;
}

/* Type scale */
.t-display-2xl { font-size: 72px; line-height: 76px; letter-spacing: -0.04em; font-weight: 600; }
.t-display-xl  { font-size: 56px; line-height: 60px; letter-spacing: -0.03em; font-weight: 600; }
.t-display-lg  { font-size: 44px; line-height: 48px; letter-spacing: -0.025em; font-weight: 600; }
.t-display-md  { font-size: 36px; line-height: 42px; letter-spacing: -0.02em; font-weight: 600; }
.t-heading-xl  { font-size: 28px; line-height: 34px; letter-spacing: -0.015em; font-weight: 600; }
.t-heading-lg  { font-size: 22px; line-height: 28px; letter-spacing: -0.01em; font-weight: 600; }
.t-heading-md  { font-size: 18px; line-height: 24px; letter-spacing: -0.005em; font-weight: 600; }
.t-heading-sm  { font-size: 15px; line-height: 20px; font-weight: 600; }
.t-body-lg     { font-size: 17px; line-height: 26px; }
.t-body-md     { font-size: 15px; line-height: 23px; }
.t-body-sm     { font-size: 13px; line-height: 20px; }
.t-body-xs     { font-size: 11px; line-height: 16px; letter-spacing: 0.005em; font-weight: 500; }
.t-mono-md     { font-family: var(--font-mono); font-size: 14px; line-height: 22px; }
.t-mono-sm     { font-family: var(--font-mono); font-size: 12px; line-height: 20px; }

.muted { color: var(--text-2); }
.dim { color: var(--text-3); }
.brand { color: var(--brand); }
.mono { font-family: var(--font-mono); }
.tabular { font-variant-numeric: tabular-nums; }
.eyebrow { font-size: 11px; line-height: 16px; color: var(--text-3); font-weight: 500; letter-spacing: 0.02em; }

/* Reset */
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; padding: 0; }
input, textarea { font-family: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

/* Top chrome */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Floating screen switcher (dev) */
.switcher {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1000;
  display: flex;
  gap: 6px;
  background: color-mix(in oklab, var(--surface) 80%, transparent);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  padding: 6px;
  align-items: center;
}
.switcher button {
  height: 28px;
  min-width: 28px;
  padding: 0 8px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: 0.02em;
  transition: all 120ms var(--ease-out);
}
.switcher button:hover { color: var(--text-1); background: var(--surface-2); }
.switcher button.active { background: var(--coral-400); color: var(--ink-950); }
.switcher .sep { width: 1px; height: 16px; background: var(--border); margin: 0 4px; }
.switcher .theme {
  height: 28px; width: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-full);
  color: var(--text-2);
}
.switcher .theme:hover { color: var(--text-1); background: var(--surface-2); }

/* Demo-mode banner (shown on every non-landing screen) */
.demo-banner {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 220px);
  padding: 6px 14px 6px 6px;
  background: color-mix(in oklab, var(--surface) 88%, transparent);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.demo-banner__pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  border-radius: var(--r-full);
  background: var(--coral-400);
  color: var(--ink-950);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.demo-banner__text { color: var(--text-2); }
.demo-banner__text a {
  color: var(--text-1);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.demo-banner__text a:hover { color: var(--coral-400); }
@media (max-width: 640px) {
  .demo-banner { max-width: calc(100vw - 32px); font-size: 11px; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--r-md);
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: background 150ms var(--ease-out), color 150ms var(--ease-out), border-color 150ms var(--ease-out), opacity 150ms var(--ease-out);
  white-space: nowrap;
  user-select: none;
}
.btn:focus-visible {
  outline: 2px solid var(--coral-300);
  outline-offset: 2px;
}
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-md { height: 40px; padding: 0 16px; font-size: 15px; }
.btn-lg { height: 48px; padding: 0 20px; font-size: 15px; }
.btn-xl { height: 56px; padding: 0 24px; font-size: 15px; font-weight: 600; }

.btn-primary { background: var(--coral-400); color: var(--ink-950); }
.btn-primary:hover { background: var(--coral-500); }
.btn-primary:active { background: var(--coral-600); }
.btn-primary[disabled] { opacity: 0.4; cursor: default; }

.btn-secondary {
  background: transparent;
  color: var(--text-1);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--surface-2); border-color: var(--border-hover); }

.btn-ghost {
  background: transparent;
  color: var(--text-2);
}
.btn-ghost:hover { background: color-mix(in oklab, var(--surface-2) 60%, transparent); color: var(--text-1); }

/* Card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
}
.card-lg { padding: 32px; }
.card-md { padding: 24px; }
.card-sm { padding: 20px; }

/* Input */
.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 8px;
  letter-spacing: -0.005em;
}
.input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-1);
  font-size: 15px;
  outline: none;
  transition: border-color 120ms var(--ease-out), box-shadow 120ms var(--ease-out);
}
.input::placeholder { color: var(--text-3); }
.input:focus {
  border-color: var(--coral-400);
  border-width: 1.5px;
  padding: 0 13.5px;
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--coral-300) 25%, transparent);
}

/* Severity pills */
.sev-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.sev-pill .dot { width: 6px; height: 6px; border-radius: 50%; }
.sev-pill.critical { background: color-mix(in oklab, var(--sev-critical) 14%, transparent); color: var(--sev-critical); }
.sev-pill.critical .dot { background: var(--sev-critical); }
.sev-pill.high { background: color-mix(in oklab, var(--sev-high) 14%, transparent); color: var(--sev-high); }
.sev-pill.high .dot { background: var(--sev-high); }
.sev-pill.medium { background: color-mix(in oklab, var(--sev-medium) 16%, transparent); color: var(--sev-medium); }
.sev-pill.medium .dot { background: var(--sev-medium); }
.sev-pill.low { background: color-mix(in oklab, var(--sev-low) 18%, transparent); color: var(--sev-low); }
.sev-pill.low .dot { background: var(--sev-low); }
.sev-pill.fixed { background: color-mix(in oklab, var(--mint-400) 14%, transparent); color: var(--mint-400); }
.sev-pill.fixed .dot { background: var(--mint-400); }

/* Status pills (scan engines) */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 600;
}
.status-pill.queued { background: var(--surface-2); color: var(--text-3); }
.status-pill.running { background: color-mix(in oklab, var(--coral-400) 12%, transparent); color: var(--coral-400); }
.status-pill.clear { background: color-mix(in oklab, var(--mint-400) 15%, transparent); color: var(--mint-400); }
.status-pill.found { background: color-mix(in oklab, var(--coral-400) 16%, transparent); color: var(--coral-400); }
.status-pill .pulse {
  width: 8px; height: 8px; border-radius: 50%; background: currentColor;
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}

/* Top nav */
.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
}
.topnav.scrolled { border-bottom-color: var(--border); }
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.025em;
  color: var(--text-1);
}
.wordmark .mark {
  width: 22px; height: 22px;
  display: inline-block;
  position: relative;
}

/* Page container */
.page { padding: 0 32px 96px; }
.container { max-width: 1200px; margin: 0 auto; }
.center-narrow { max-width: 440px; margin: 0 auto; }
.center-wizard { max-width: 640px; margin: 0 auto; }
.center-720 { max-width: 720px; margin: 0 auto; }
.center-880 { max-width: 880px; margin: 0 auto; }

/* Hero divider — the ONE allowed gradient */
.brand-divider {
  height: 1px;
  width: 200px;
  margin: 0 auto;
  background: linear-gradient(90deg, transparent 0%, var(--coral-400) 30%, var(--mint-400) 70%, transparent 100%);
  opacity: 0.55;
}

/* Wizard option cards */
.option-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  min-height: 88px;
  cursor: pointer;
  transition: border-color 150ms var(--ease-out), background 150ms var(--ease-out);
  position: relative;
}
.option-card:hover { border-color: var(--border-hover); }
.option-card.selected {
  border: 1.5px solid var(--coral-400);
  background: color-mix(in oklab, var(--coral-400) 4%, var(--surface));
  padding: 19.5px;
}
.option-card.selected .opt-icon { color: var(--coral-400); }
.opt-icon { color: var(--text-2); flex-shrink: 0; }
.opt-title { font-size: 15px; font-weight: 600; color: var(--text-1); margin-bottom: 2px; letter-spacing: -0.005em; }
.opt-sub { font-size: 13px; color: var(--text-3); }

/* Step dot */
.step-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--border);
  transition: background 200ms var(--ease-out), transform 200ms var(--ease-out);
}
.step-dot.active { background: var(--coral-400); }
.step-dot.done {
  background: var(--mint-400);
  display: inline-flex; align-items: center; justify-content: center;
}

/* Recommended badge */
.rec-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--r-full);
  background: var(--mint-100); color: var(--mint-700);
}

/* Code block / prompt card */
.code-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 22px;
  color: var(--text-1);
  position: relative;
  overflow: auto;
}
.code-card .copy-btn {
  position: absolute;
  top: 12px; right: 12px;
}
.code-card .header {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: 0.03em;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* Tabs */
.tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid color-mix(in oklab, var(--border) 70%, transparent);
}
.tab-btn {
  position: relative;
  padding: 12px 4px;
  font-size: 14px;
  color: var(--text-2);
  font-weight: 500;
}
.tab-btn.active { color: var(--text-1); }
.tab-btn.active::after {
  content: "";
  position: absolute;
  left: -4px; right: -4px;
  bottom: -1px;
  height: 2px;
  background: var(--coral-400);
  border-radius: var(--r-full);
}

/* Filter pill */
.filter-pill {
  height: 32px;
  padding: 0 14px;
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  transition: all 120ms var(--ease-out);
}
.filter-pill:hover { color: var(--text-1); border-color: var(--border-hover); }
.filter-pill.active {
  border-color: var(--coral-400);
  color: var(--text-1);
  background: color-mix(in oklab, var(--coral-400) 6%, transparent);
}

/* Finding row */
.finding-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 16px 16px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 120ms var(--ease-out);
}
.finding-row:hover { background: color-mix(in oklab, var(--surface-2) 50%, transparent); }
.finding-row.selected { background: var(--surface-2); }
.finding-row .sevbar {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
}
.finding-row.selected .sevbar { background: var(--coral-400) !important; }
.finding-row .ftitle { font-size: 14px; font-weight: 600; color: var(--text-1); letter-spacing: -0.005em; }
.finding-row .fpath { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); margin-top: 2px; }
.finding-row.fixed .ftitle { text-decoration: line-through; color: var(--text-3); }
.finding-row.fixed .sevbar { background: var(--mint-400) !important; }

/* Section eyebrow inside report list */
.findings-group-header {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-3);
  padding: 24px 20px 12px;
  text-transform: none;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 200;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-elev2);
  max-width: 360px;
  animation: toast-in 240ms var(--ease-out-soft);
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Animations for content entry */
.fade-up {
  animation: fade-up 320ms var(--ease-out-soft) both;
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Stage-card connecting line for "How it works" */
.steps-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}
.steps-row::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 16px;
  height: 1px;
  background: var(--border);
  z-index: 0;
}
.step-num {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--coral-400);
  color: var(--ink-950);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 14px;
  position: relative; z-index: 1;
}

/* FAQ accordion */
.faq-item {
  border-bottom: 1px solid color-mix(in oklab, var(--border) 80%, transparent);
}
.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 24px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-1);
  letter-spacing: -0.005em;
  text-align: left;
}
.faq-a {
  padding: 0 0 24px;
  max-width: 640px;
  color: var(--text-2);
  font-size: 15px;
  line-height: 26px;
}

/* Dashed border (out-of-scope) */
.dashed { border-style: dashed !important; }

/* Sticky verification status */
.sticky-status {
  position: sticky;
  top: 96px;
}

/* Scrollbar (subtle) */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

/* SVG decorative shapes */
.scan-vis {
  width: 100%;
  max-width: 880px;
  height: 360px;
  margin: 0 auto;
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  background: var(--surface);
  overflow: hidden;
}

/* Subtle keyboard hints */
kbd {
  display: inline-block;
  padding: 2px 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-2);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Disclosure */
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }

/* Header counter pills */
.count-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-2); font-weight: 500;
  padding: 4px 0;
}
.count-pill .dot { width: 8px; height: 8px; border-radius: 50%; }

/* Hover affordance for download card */
.file-row {
  display: flex; align-items: center; gap: 14px;
  height: 64px;
  padding: 0 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: border-color 120ms var(--ease-out), background 120ms var(--ease-out);
}
.file-row:hover { border-color: var(--border-hover); }
