/* ───────────── Cactus dashboard - design system ───────────── */
:root {
  /* surfaces */
  --bg: #f6f8f7;
  --surface: #ffffff;
  --surface-2: #fafcfb;
  --line: #e5eae8;
  --line-2: #eff2f0;

  /* ink */
  --ink-1: #0b1411;
  --ink-2: #1f2d28;
  --ink-3: #4b5a55;
  --muted: #8190 8a;
  --muted: #7b8a84;

  /* brand */
  --mint-50:  #eefaf3;
  --mint-100: #dff4e8;
  --mint-200: #bde9d2;
  --mint-400: #49cc86;
  --mint-500: #22b972;
  --mint-600: #16a864;
  --mint-700: #0f8a51;

  /* semantic */
  --good: #12a05a;
  --good-soft: #e7f6ed;
  --warn: #c98a0c;
  --warn-soft: #fcf3dd;
  --bad:  #d1352b;
  --bad-soft: #fbeeee;
  --crit: #8b0e0e;
  --crit-soft: #fde2e2;
  --info: #2f6fa5;
  --info-soft: #e8f1f9;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(15, 31, 23, 0.04);
  --shadow-md: 0 2px 4px rgba(15, 31, 23, 0.04), 0 10px 24px rgba(15, 31, 23, 0.05);

  --font: "Inter", ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --sidebar-w: 240px;
  --topbar-h: 64px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
html, body {
  margin: 0; background: var(--bg); color: var(--ink-1);
  font-family: var(--font); font-size: 14px; line-height: 1.5;
  font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased;
}
body { min-height: 100vh; }
a { color: var(--mint-700); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: 12.5px; }

/* ─── Wordmark (bold green "cactus") ─────────────────────────── */
.brand-home {
  display: inline-block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  border-radius: 6px;
  transition: opacity .12s ease;
}
.brand-home:hover { opacity: 0.8; text-decoration: none; }
.brand-home:focus-visible { outline: 2px solid var(--mint-600, #16a864); outline-offset: 3px; }
.sb-brand.brand-home { display: block; }

.brand-word {
  font-family: var(--font);
  font-weight: 900;
  letter-spacing: -0.035em;
  color: var(--mint-600);
  font-size: 72px;
  line-height: 1;
}
.brand-word.small { font-size: 22px; line-height: 1.1; }
.brand-tag {
  margin-top: 14px; font-size: 14px; color: var(--ink-3); font-weight: 500;
}

/* ─── Screen containers ──────────────────────────────────────── */
.screen {
  min-height: 100vh; width: 100%;
  display: flex; flex-direction: column;
  position: relative;
}
.screen-center {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 56px 24px 40px;
}

/* ─── Landing ────────────────────────────────────────────────── */
.landing-inner {
  max-width: 620px; width: 100%;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.landing-form {
  margin-top: 36px; width: 100%;
  display: flex; gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 6px 6px 6px 18px;
  box-shadow: var(--shadow-md);
  transition: border-color .12s ease, box-shadow .12s ease;
}
.landing-form:focus-within {
  border-color: var(--mint-400);
  box-shadow: 0 0 0 4px var(--mint-100), var(--shadow-md);
}
.landing-form input {
  flex: 1; border: none; outline: none; background: transparent;
  font-family: var(--font); font-size: 17px; font-weight: 500;
  padding: 14px 8px; color: var(--ink-1);
}
.landing-form input::placeholder { color: var(--muted); }
.landing-form button {
  border: none; cursor: pointer;
  background: var(--mint-600); color: #fff;
  font-family: var(--font); font-size: 15px; font-weight: 700;
  padding: 0 22px; border-radius: 10px;
  transition: background .12s ease;
}
.landing-form button:hover { background: var(--mint-700); }
.landing-form button:disabled { opacity: .6; cursor: not-allowed; }
.landing-hint {
  margin-top: 18px; color: var(--muted); font-size: 12.5px;
}
.landing-error {
  margin-top: 14px;
  background: var(--bad-soft); color: var(--bad);
  border: 1px solid #f5c8c3; border-radius: 8px;
  padding: 10px 14px; font-size: 13px; font-weight: 500;
  max-width: 100%;
}

/* ─── Lead modal ─────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(11, 20, 17, 0.45);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.modal-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(15, 31, 23, 0.22);
  width: 100%; max-width: 440px;
  overflow: hidden;
  animation: modalPop .18s ease-out both;
}
@keyframes modalPop {
  from { transform: translateY(6px) scale(.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.modal-head {
  display: flex; gap: 12px; align-items: center;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--line-2);
}
.modal-head .ct-ico {
  flex: 0 0 40px; width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px; border-radius: 10px;
  background: var(--ct-ico-bg, var(--mint-50));
  color: var(--ct-ico-fg, var(--mint-700));
  border: 1px solid var(--ct-ico-bd, var(--mint-100));
}
.modal-head h2 { margin: 0; font-size: 17px; font-weight: 800; }
.modal-body { padding: 16px 22px 8px; }
.lead-target {
  background: var(--mint-50); color: var(--mint-700);
  border: 1px solid var(--mint-100);
  padding: 8px 12px; border-radius: 8px;
  font-size: 12.5px; margin-bottom: 14px;
}
.lead-target strong { font-family: var(--mono); font-weight: 700; color: var(--mint-700); }
.lead-field { display: block; margin-bottom: 12px; }
.lead-field > span {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--ink-2); margin-bottom: 4px;
}
.lead-field input {
  width: 100%; border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; font-size: 14px; font-family: var(--font);
  background: var(--surface); color: var(--ink-1);
  transition: border-color .12s ease, box-shadow .12s ease;
}
.lead-field input:focus {
  outline: none; border-color: var(--mint-400);
  box-shadow: 0 0 0 3px var(--mint-100);
}
.lead-field .lead-email-hint {
  display: block; margin-top: 4px;
  font-size: 11.5px; color: var(--muted);
}
.lead-error {
  background: var(--bad-soft); color: var(--bad);
  border: 1px solid #f5c8c3; border-radius: 8px;
  padding: 9px 12px; font-size: 12.5px; font-weight: 500;
  margin: 4px 0 0;
}
.modal-foot {
  display: flex; gap: 8px; justify-content: flex-end;
  padding: 14px 22px 18px; border-top: 1px solid var(--line-2);
  background: var(--surface-2);
}
.btn-ghost, .btn-primary {
  font-family: var(--font); font-weight: 600; font-size: 13px;
  padding: 9px 16px; border-radius: 8px; cursor: pointer;
  border: 1px solid transparent;
  transition: background .12s ease;
}
.btn-ghost { background: transparent; color: var(--ink-3); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink-1); }
.btn-primary { background: var(--mint-600); color: #fff; }
.btn-primary:hover { background: var(--mint-700); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }

/* ─── Export PDF - prominent CTA in the topbar ─────────────────── */
.btn-export {
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(22,168,100,0.25), 0 4px 10px rgba(22,168,100,0.18);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn-export:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(22,168,100,0.3), 0 8px 16px rgba(22,168,100,0.22);
}
.btn-export:active { transform: translateY(0); }
.btn-export-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(255,255,255,0.22);
  font-size: 11px; font-weight: 800;
}

/* ─── Share report - companion to Export PDF ───────────────────── */
.btn-share {
  font-family: var(--font); font-weight: 700; font-size: 13.5px;
  letter-spacing: 0.01em;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--mint-50);
  color: var(--mint-700);
  border: 1px solid var(--mint-200, #bfe5d1);
  transition: background .12s ease, border-color .12s ease, transform .12s ease;
}
.btn-share:hover {
  background: var(--mint-100);
  border-color: var(--mint-600, #16a864);
  transform: translateY(-1px);
}
.btn-share:active { transform: translateY(0); }
.btn-share:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.btn-share-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--mint-100);
  color: var(--mint-700);
  font-size: 11px; font-weight: 800;
}

/* ─── Loading screen ────────────────────────────────────────── */
.loading-inner {
  max-width: 720px; width: 100%;
  display: flex; flex-direction: column; align-items: stretch; text-align: center;
  padding: 40px 20px;
}
.loading-inner .brand-word { align-self: center; }
.loading-title {
  margin-top: 12px; font-size: 14px; color: var(--ink-3);
  text-align: center;
}
.loading-title strong {
  font-family: var(--mono); font-weight: 700; color: var(--mint-700);
}

.scan-panel {
  margin-top: 24px; width: 100%;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  text-align: left;
}
.scan-head {
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--line-2);
  background: linear-gradient(180deg, var(--mint-50) 0%, var(--surface) 100%);
}
.scan-head-main {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 12px; margin-bottom: 10px;
}
.scan-head-label {
  font-size: 14px; font-weight: 600; color: var(--ink-1);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.scan-head-meta {
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  flex: 0 0 auto;
}
.scan-head-meta #ps-count { color: var(--mint-700); font-weight: 600; }
.scan-head-dot { margin: 0 6px; opacity: .5; }
.scan-bar {
  height: 4px; background: var(--line-2); border-radius: 4px; overflow: hidden;
}
.scan-bar-fill {
  height: 100%; width: 0%; background: var(--mint-600);
  transition: width .35s ease;
  background-image: linear-gradient(90deg, var(--mint-600), var(--mint-700));
}

.scan-steps {
  list-style: none; margin: 0; padding: 8px 0; max-height: 360px;
  overflow-y: auto;
}
.scan-step {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 20px;
  font-size: 13.5px;
  border-left: 2px solid transparent;
  transition: background .15s ease, border-color .15s ease;
}
.scan-step + .scan-step { border-top: 1px solid var(--line-2); }
.scan-step-ico {
  flex: 0 0 18px; width: 18px; height: 18px; margin-top: 2px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.scan-step-body { flex: 1; min-width: 0; }
.scan-step-title { font-weight: 600; color: var(--ink-2); font-size: 13.5px; }
.scan-step-desc  { color: var(--muted); font-size: 12.5px; margin-top: 2px; line-height: 1.45; }
.scan-step-status {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  flex: 0 0 auto; margin-top: 2px;
  text-transform: uppercase; letter-spacing: .05em;
}

/* pending */
.scan-step[data-state="pending"] .scan-step-ico {
  background: var(--surface-2); color: transparent;
  border: 1px solid var(--line);
}
.scan-step[data-state="pending"] .scan-step-title { color: var(--ink-3); }

/* running */
.scan-step[data-state="running"] {
  background: var(--mint-50);
  border-left-color: var(--mint-600);
}
.scan-step[data-state="running"] .scan-step-ico {
  border: 2px solid var(--mint-200);
  border-top-color: var(--mint-600);
  background: transparent;
  animation: scan-spin .9s linear infinite;
}
.scan-step[data-state="running"] .scan-step-title { color: var(--mint-700); }
.scan-step[data-state="running"] .scan-step-status { color: var(--mint-700); font-weight: 600; }

/* done */
.scan-step[data-state="done"] .scan-step-ico {
  background: var(--mint-600); color: #fff;
  border: 1px solid var(--mint-600);
}
.scan-step[data-state="done"] .scan-step-ico::before {
  content: "✓"; font-size: 11px; line-height: 1;
}
.scan-step[data-state="done"] .scan-step-title { color: var(--ink-2); }
.scan-step[data-state="done"] .scan-step-status { color: var(--mint-700); }

@keyframes scan-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.loading-note {
  margin-top: 18px; font-size: 12.5px; color: var(--muted);
  text-align: center;
}

/* ─── Sidebar ───────────────────────────────────────────────── */
.sidebar {
  position: fixed; inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  padding: 20px 14px;
  z-index: 50;
}
.sb-brand { padding: 0 8px 16px; border-bottom: 1px solid var(--line-2); margin-bottom: 12px; }
.sb-brand .brand-word { display: block; }
.sb-sub { color: var(--muted); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; margin-top: 2px; }

.sb-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.sb-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; border-radius: 8px;
  color: var(--ink-3); font-weight: 500; font-size: 13.5px;
  transition: background .12s ease, color .12s ease;
}
.sb-link:hover { background: var(--mint-50); color: var(--ink-1); text-decoration: none; }
.sb-link.active { background: var(--mint-100); color: var(--mint-700); font-weight: 600; }
.sb-count {
  min-width: 22px; padding: 0 7px; height: 19px;
  border-radius: 999px;
  background: var(--line-2); color: var(--ink-3);
  font-size: 11px; font-weight: 700; line-height: 19px;
  text-align: center; font-variant-numeric: tabular-nums;
}
.sb-count:empty { display: none; }
.sb-link.active .sb-count { background: var(--mint-500); color: #fff; }
.sb-count.bad  { background: var(--bad-soft); color: var(--bad); }
.sb-count.warn { background: var(--warn-soft); color: var(--warn); }
.sb-count.good { background: var(--good-soft); color: var(--good); }

.sb-foot { padding: 12px 8px 0; border-top: 1px solid var(--line-2); margin-top: 12px; }
.sb-cta {
  display: block; text-align: center;
  background: var(--mint-600); color: #fff !important;
  padding: 9px 12px; border-radius: 8px; font-weight: 600; font-size: 13px;
}
.sb-cta:hover { background: var(--mint-700); text-decoration: none; }
.sb-mini { color: var(--muted); font-size: 11px; margin-top: 10px; text-align: center; }

/* ─── Main ──────────────────────────────────────────────────── */
.main { margin-left: var(--sidebar-w); min-height: 100vh; }

/* ─── Top bar ───────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0;
  height: var(--topbar-h);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
  padding: 0 28px;
  display: flex; gap: 18px; align-items: center;
  z-index: 40;
}
.tb-summary {
  flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0;
}
.tb-label { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.tb-target { font-family: var(--mono); font-size: 13.5px; color: var(--ink-2); padding: 5px 10px; background: var(--mint-50); border: 1px solid var(--mint-100); border-radius: 6px; }
.tb-meta { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tb-status { font-size: 12.5px; color: var(--muted); }

/* ─── Progress strip ────────────────────────────────────────── */
.progress-strip {
  padding: 14px 28px 0;
  border-bottom: 1px solid var(--line-2);
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
}
.ps-row { display: flex; align-items: center; gap: 18px; padding-bottom: 10px; }
.ps-text { min-width: 260px; }
.ps-label { font-weight: 600; color: var(--ink-1); font-size: 13.5px; }
.ps-count { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.ps-bar { flex: 1; height: 6px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.ps-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--mint-400), var(--mint-600));
  transition: width .3s ease;
}
.ps-log {
  display: flex; gap: 6px; overflow-x: auto; padding: 6px 0 12px;
  font-family: var(--mono); font-size: 11.5px;
}
.ps-log-item {
  white-space: nowrap;
  padding: 3px 10px; border-radius: 999px;
  background: var(--line-2); color: var(--ink-3);
}
.ps-log-item.done { background: var(--good-soft); color: var(--good); }
.ps-log-item.active { background: var(--mint-100); color: var(--mint-700); font-weight: 600; }

/* ─── Empty state ───────────────────────────────────────────── */
.empty {
  max-width: 720px;
  margin: 80px auto;
  text-align: center;
  padding: 0 24px;
}
.empty-illustration { font-size: 72px; opacity: .6; margin-bottom: 18px; }
.empty h1 { font-size: 28px; letter-spacing: -0.02em; margin: 0 0 12px; }
.empty p { color: var(--ink-3); margin: 0 0 24px; }
.empty-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

/* ─── Dashboard grid ────────────────────────────────────────── */
.dashboard { padding: 22px 28px 60px; display: flex; flex-direction: column; gap: 22px; scroll-margin-top: calc(var(--topbar-h) + 20px); }

/* False-positive / manual-review disclaimer */
.dash-disclaimer {
  display: flex; gap: 12px; align-items: flex-start;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 4px solid #f59e0b;
  color: #78350f;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px; line-height: 1.55;
}
.dash-disclaimer strong { color: #78350f; font-weight: 700; }
.dash-disclaimer a { color: #b45309; font-weight: 600; text-decoration: underline; }
.dash-disclaimer a:hover { color: #92400e; }
.dash-disclaimer-ico {
  flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%;
  background: #f59e0b; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px;
}
.row { scroll-margin-top: calc(var(--topbar-h) + 20px); }
.row-two { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.row-overview {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 22px;
}
@media (max-width: 1100px) {
  .row-overview { grid-template-columns: 1fr; }
  .row-two { grid-template-columns: 1fr; }
}
@media (max-width: 780px) {
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .dashboard { padding: 18px; }
}
.hidden { display: none !important; }

/* ─── Card primitives ───────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px 18px 16px;
  position: relative;
  overflow: hidden;
}
.card-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 14px; gap: 10px;
}
.card h2 {
  margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -0.005em; color: var(--ink-1);
}

/* ─── Section titles (prominent, accented) ───────────────────── */
.card-title {
  display: flex; align-items: center; gap: 14px;
  padding: 0 0 14px; margin: 0 0 14px;
  border-bottom: 1px solid var(--line-2);
  position: relative;
}
.card-title .ct-ico {
  flex: 0 0 44px;
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px;
  border-radius: 12px;
  background: var(--ct-ico-bg, var(--mint-50));
  color: var(--ct-ico-fg, var(--mint-700));
  border: 1px solid var(--ct-ico-bd, var(--mint-100));
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.03);
}
.card-title .ct-text { flex: 1 1 auto; min-width: 0; }
.card-title .ct-text h2 {
  font-size: 18px; font-weight: 800; letter-spacing: -0.015em;
  color: var(--ink-1);
  line-height: 1.2;
}
.card-title .ct-text p {
  margin: 2px 0 0; font-size: 12.5px; color: var(--ink-3);
  font-weight: 500;
}
.card-title .ct-meta { flex: 0 0 auto; }

/* Colored accent top-stripe + icon-tile theme per data-accent */
.card[data-accent]::before {
  content: ""; position: absolute; inset: 0 0 auto 0;
  height: 3px;
  background: var(--ct-stripe, var(--mint-500));
  opacity: 0.9;
}
.card[data-accent="mint"]    { --ct-ico-bg: #ecfdf5; --ct-ico-fg: #047857; --ct-ico-bd: #a7f3d0; --ct-stripe: #10b981; }
.card[data-accent="red"]     { --ct-ico-bg: #fef2f2; --ct-ico-fg: #b91c1c; --ct-ico-bd: #fecaca; --ct-stripe: #ef4444; }
.card[data-accent="orange"]  { --ct-ico-bg: #fff7ed; --ct-ico-fg: #c2410c; --ct-ico-bd: #fed7aa; --ct-stripe: #f97316; }
.card[data-accent="teal"]    { --ct-ico-bg: #f0fdfa; --ct-ico-fg: #0f766e; --ct-ico-bd: #99f6e4; --ct-stripe: #14b8a6; }
.card[data-accent="blue"]    { --ct-ico-bg: #eff6ff; --ct-ico-fg: #1d4ed8; --ct-ico-bd: #bfdbfe; --ct-stripe: #3b82f6; }
.card[data-accent="purple"]  { --ct-ico-bg: #faf5ff; --ct-ico-fg: #7e22ce; --ct-ico-bd: #e9d5ff; --ct-stripe: #a855f7; }
.card[data-accent="indigo"]  { --ct-ico-bg: #eef2ff; --ct-ico-fg: #4338ca; --ct-ico-bd: #c7d2fe; --ct-stripe: #6366f1; }
.card[data-accent="slate"]   { --ct-ico-bg: #f1f5f9; --ct-ico-fg: #334155; --ct-ico-bd: #cbd5e1; --ct-stripe: #64748b; }
.card[data-accent="charcoal"]{ --ct-ico-bg: #1e293b; --ct-ico-fg: #f1f5f9; --ct-ico-bd: #334155; --ct-stripe: #0f172a; }
.kicker {
  font-size: 11px; font-weight: 600; letter-spacing: .08em;
  color: var(--muted); text-transform: uppercase;
}
.muted { color: var(--muted); }
.muted.small { font-size: 12px; }

.tag {
  display: inline-block; padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px; font-weight: 700;
  background: var(--line-2); color: var(--ink-3);
}
.tag-soft { background: var(--mint-50); color: var(--mint-700); }
.tag[data-grade="A+"], .tag[data-grade="A"] { background: var(--good-soft); color: var(--good); }
.tag[data-grade="B"] { background: var(--good-soft); color: var(--good); }
.tag[data-grade="C"] { background: var(--warn-soft); color: var(--warn); }
.tag[data-grade="D"], .tag[data-grade="F"] { background: var(--bad-soft); color: var(--bad); }

.chip { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 999px; background: var(--line-2); font-size: 12px; color: var(--ink-3); }
.chip-soft { background: var(--mint-50); color: var(--mint-700); }

/* ─── KPI Risk ──────────────────────────────────────────────── */
.kpi-risk { display: flex; flex-direction: column; gap: 12px; }
.kpi-head { display: flex; justify-content: space-between; align-items: center; }
.kpi-risk-body { display: flex; align-items: center; gap: 16px; }
.gauge { width: 180px; height: auto; flex-shrink: 0; }
.kpi-risk-figs { flex: 1; }
.risk-grade {
  font-size: 54px; font-weight: 800; letter-spacing: -0.04em;
  line-height: 1;
}
.risk-grade[data-grade="A+"], .risk-grade[data-grade="A"] { color: var(--good); }
.risk-grade[data-grade="B"] { color: #4db874; }
.risk-grade[data-grade="C"] { color: var(--warn); }
.risk-grade[data-grade="D"], .risk-grade[data-grade="F"] { color: var(--bad); }
.risk-score { font-size: 18px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; margin-top: 2px; }
.risk-max { color: var(--muted); font-weight: 500; }

.kpi-risk-foot {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding-top: 10px; border-top: 1px solid var(--line-2);
}
.sev-dot {
  font-size: 11px; font-weight: 600;
  padding: 3px 8px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 5px;
}
.sev-dot::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; }
.sev-dot.sev-critical { background: var(--crit-soft); color: var(--crit); }
.sev-dot.sev-critical::before { background: var(--crit); }
.sev-dot.sev-high { background: var(--bad-soft); color: var(--bad); }
.sev-dot.sev-high::before { background: var(--bad); }
.sev-dot.sev-medium { background: var(--warn-soft); color: var(--warn); }
.sev-dot.sev-medium::before { background: var(--warn); }
.sev-dot.sev-low { background: var(--good-soft); color: var(--good); }
.sev-dot.sev-low::before { background: var(--good); }
.sev-dot.sev-info { background: var(--info-soft); color: var(--info); }
.sev-dot.sev-info::before { background: var(--info); }

/* Small KPIs */
.kpi-col { display: flex; flex-direction: column; gap: 22px; }
.kpi-small { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.kpi-small-head { display: flex; justify-content: space-between; align-items: center; }
.kpi-small-val {
  font-size: 26px; font-weight: 800; letter-spacing: -0.02em;
  color: var(--ink-1); font-variant-numeric: tabular-nums;
}
.kpi-small-val[data-status="good"] { color: var(--good); }
.kpi-small-val[data-status="warn"] { color: var(--warn); }
.kpi-small-val[data-status="bad"]  { color: var(--bad); }
.kpi-small-val[data-status="na"]   { color: var(--muted); }
.kpi-small-foot { font-size: 12px; color: var(--muted); }

.surface-compact {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.surface-compact > div { display: flex; flex-direction: column; }
.surface-compact .num { font-size: 20px; font-weight: 800; color: var(--mint-700); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.surface-compact .lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }

/* Severity minibar */
.sev-mini { display: flex; flex-direction: column; gap: 8px; }
.sev-bar {
  display: flex; height: 12px; border-radius: 999px; overflow: hidden;
  background: var(--line-2);
}
.sev-bar > span { display: block; height: 100%; }
.sev-mini-legend { display: flex; flex-wrap: wrap; gap: 8px; }

/* ─── Priorities ────────────────────────────────────────────── */
.prio-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.prio-list li {
  display: grid; grid-template-columns: 28px 1fr auto; gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.prio-list li[data-sev="critical"] { border-left-color: var(--crit); }
.prio-list li[data-sev="high"] { border-left-color: var(--bad); }
.prio-list li[data-sev="medium"] { border-left-color: var(--warn); }
.prio-list li[data-sev="low"] { border-left-color: var(--good); }
.prio-n {
  width: 24px; height: 24px;
  border-radius: 6px;
  background: var(--line-2); color: var(--ink-3);
  display: grid; place-items: center;
  font-weight: 700; font-size: 12px;
}
.prio-title { font-weight: 600; color: var(--ink-1); }
.prio-detail { color: var(--ink-3); font-size: 12.5px; margin-top: 2px; }

/* ─── OWASP grid ────────────────────────────────────────────── */
.owasp-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
}
.owasp-item {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: flex; flex-direction: column; gap: 2px;
  background: var(--surface);
  position: relative;
  padding-left: 36px;
}
.owasp-item::before {
  content: attr(data-icon);
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px;
  border-radius: 6px;
  display: grid; place-items: center;
  font-weight: 700; font-size: 11px;
}
.owasp-item[data-status="pass"]::before { background: var(--good-soft); color: var(--good); }
.owasp-item[data-status="warn"]::before { background: var(--warn-soft); color: var(--warn); }
.owasp-item[data-status="fail"]::before { background: var(--bad-soft); color: var(--bad); }
.owasp-item[data-status="na"]::before   { background: var(--line-2); color: var(--muted); }
.owasp-item[data-status="fail"] { border-color: #f4d4d4; }
.owasp-item[data-status="na"] { opacity: .7; }
.owasp-code { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.owasp-name { font-weight: 600; font-size: 13px; color: var(--ink-1); }
.owasp-meta { font-size: 11.5px; color: var(--muted); }

/* ─── Tech grid ─────────────────────────────────────────────── */
.tech-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.tech-card {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 12px; align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color .12s ease, box-shadow .12s ease;
}
.tech-card:hover { border-color: var(--mint-200); box-shadow: var(--shadow-sm); }
.tech-card[data-tag="eol"] { border-color: #f4d4d4; }
.tech-logo {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: 8px; flex-shrink: 0;
}
.tech-logo img { width: 22px; height: 22px; object-fit: contain; }
.tech-logo .letter { font-weight: 800; color: var(--mint-700); font-size: 16px; }
.tech-name { font-weight: 700; font-size: 13.5px; color: var(--ink-1); }
.tech-version { font-size: 12px; color: var(--muted); font-family: var(--mono); }
.tech-host { font-size: 11px; color: var(--muted); margin-top: 2px; }
.tech-badge {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  padding: 3px 7px; border-radius: 999px;
  letter-spacing: .04em;
}
.tech-badge.eol { background: var(--bad-soft); color: var(--bad); }
.tech-badge.old { background: var(--warn-soft); color: var(--warn); }
.tech-badge.cve { background: var(--crit-soft); color: var(--crit); }

/* ─── Vulns ─────────────────────────────────────────────────── */
.vulns-list { display: flex; flex-direction: column; gap: 8px; }
.vuln-row {
  display: grid; grid-template-columns: 90px 1fr auto; gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--warn);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.vuln-row[data-sev="critical"] { border-left-color: var(--crit); }
.vuln-row[data-sev="high"]     { border-left-color: var(--bad); }
.vuln-row[data-sev="medium"]   { border-left-color: var(--warn); }
.vuln-row[data-sev="low"]      { border-left-color: var(--good); }
.vuln-title { font-weight: 600; color: var(--ink-1); }
.vuln-detail { color: var(--ink-3); font-size: 12.5px; }
.vuln-meta { color: var(--muted); font-size: 11.5px; font-family: var(--mono); margin-top: 4px; }
.vuln-cves { display: flex; flex-wrap: wrap; gap: 4px; max-width: 220px; justify-content: flex-end; }
.cve-pill {
  font-family: var(--mono); font-size: 10.5px;
  padding: 2px 6px; border-radius: 4px;
  background: var(--crit-soft); color: var(--crit);
}
.no-vulns {
  padding: 30px 20px; text-align: center;
  background: var(--good-soft); border-radius: var(--radius-sm);
  color: var(--good);
}
.no-vulns strong { color: var(--good); }

/* ─── Headers matrix ────────────────────────────────────────── */
.hdr-matrix { overflow-x: auto; }
.hdr-matrix table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
.hdr-matrix th, .hdr-matrix td {
  padding: 10px 8px; text-align: center;
  border-bottom: 1px solid var(--line-2);
}
.hdr-matrix th { background: var(--surface-2); color: var(--ink-3); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.hdr-matrix th:first-child, .hdr-matrix td:first-child {
  text-align: left; font-family: var(--mono); color: var(--ink-1); font-size: 12.5px;
  padding-left: 4px;
}
.hdr-dot {
  width: 22px; height: 22px; display: inline-grid; place-items: center;
  border-radius: 6px; font-size: 13px; font-weight: 700;
}
.hdr-dot.ok  { background: var(--good-soft); color: var(--good); }
.hdr-dot.bad { background: var(--bad-soft); color: var(--bad); }

/* ─── TLS card ──────────────────────────────────────────────── */
.tls-rows { display: flex; flex-direction: column; gap: 8px; }
.tls-row {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: flex; flex-direction: column; gap: 4px;
}
.tls-row-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tls-host { font-family: var(--mono); font-size: 13px; color: var(--ink-1); }
.tls-issuer { color: var(--ink-3); font-size: 12.5px; }
.tls-meta { font-size: 11.5px; color: var(--muted); font-family: var(--mono); display: flex; gap: 12px; flex-wrap: wrap; }

/* ─── Email ─────────────────────────────────────────────────── */
.email-verdict {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 10px;
  font-weight: 600;
}
.email-verdict[data-status="good"] { background: var(--good-soft); color: var(--good); }
.email-verdict[data-status="ok"]   { background: var(--good-soft); color: var(--good); }
.email-verdict[data-status="warn"] { background: var(--warn-soft); color: var(--warn); }
.email-verdict[data-status="bad"]  { background: var(--bad-soft); color: var(--bad); }
.email-verdict[data-status="na"]   { background: var(--line-2); color: var(--muted); }

.email-rows { display: flex; flex-direction: column; gap: 8px; }
.email-row {
  display: grid; grid-template-columns: 120px 1fr auto; gap: 12px; align-items: center;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.email-row strong { font-weight: 600; }
.email-row code { color: var(--ink-3); word-break: break-all; }

/* ─── Compliance ────────────────────────────────────────────── */
.compliance-rollup {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.fw-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.fw-name { font-weight: 700; font-size: 13.5px; letter-spacing: -0.005em; color: var(--ink-1); margin-bottom: 8px; }
.fw-segbar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--line-2); margin-bottom: 8px; }
.fw-segbar > span { display: block; height: 100%; }
.fw-legend { display: flex; gap: 10px; font-size: 11.5px; color: var(--ink-3); }
.fw-legend .d { display: inline-block; width: 7px; height: 7px; border-radius: 50%; vertical-align: middle; margin-right: 4px; }
.d.pass { background: var(--good); } .d.warn { background: var(--warn); } .d.fail { background: var(--bad); }

.compliance-details-toggle { margin-top: 14px; }
.compliance-details-toggle summary {
  cursor: pointer; color: var(--mint-700); font-weight: 600; font-size: 13px;
  padding: 6px 0;
}
.ctrl-table { width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 10px; font-size: 13px; }
.ctrl-table th, .ctrl-table td {
  padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line-2);
}
.ctrl-table th { background: var(--surface-2); color: var(--ink-3); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.ctrl-table td:first-child { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); width: 110px; }
.ctrl-status {
  display: inline-block; font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em;
}
.ctrl-status.pass { background: var(--good-soft); color: var(--good); }
.ctrl-status.warn { background: var(--warn-soft); color: var(--warn); }
.ctrl-status.fail { background: var(--bad-soft); color: var(--bad); }
.ctrl-status.na   { background: var(--line-2); color: var(--muted); }
.fw-subsection { margin-top: 16px; }
.fw-subsection h3 { margin: 0 0 4px; font-size: 12.5px; color: var(--ink-2); font-weight: 700; }

/* ─── DNS + subdomain lists ─────────────────────────────────── */
.dns-rows { display: flex; flex-direction: column; gap: 6px; }
.dns-row {
  display: grid; grid-template-columns: 50px 1fr; gap: 12px; align-items: start;
  padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 6px;
  font-size: 12.5px;
}
.dns-type { font-family: var(--mono); font-weight: 700; color: var(--mint-700); }
.dns-vals { font-family: var(--mono); color: var(--ink-3); word-break: break-all; white-space: pre-line; }
.subdomain-list {
  display: flex; flex-wrap: wrap; gap: 5px;
  max-height: 240px; overflow-y: auto;
}
.subdomain-list .sd {
  font-family: var(--mono); font-size: 12px;
  padding: 3px 8px; border-radius: 6px;
  background: var(--mint-50); color: var(--mint-700);
  border: 1px solid var(--mint-100);
}

/* ─── Subdomain takeover ─────────────────────────────────────── */
.takeover-summary {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px;
}
.takeover-summary .tk-stat {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 12.5px;
}
.takeover-summary .tk-stat .num { font-weight: 800; font-size: 16px; font-family: var(--mono); }
.takeover-summary .tk-stat.vuln { background: #fee2e2; border-color: #fecaca; color: #991b1b; }
.takeover-summary .tk-stat.potential { background: #fef3c7; border-color: #fde68a; color: #92400e; }
.takeover-summary .tk-stat.safe { background: var(--mint-50); border-color: var(--mint-100); color: var(--mint-700); }
.takeover-summary .tk-stat.unresolved { background: var(--surface-2); color: var(--ink-3); }

.takeover-body { display: flex; flex-direction: column; gap: 8px; max-height: 520px; overflow-y: auto; }
.tk-row {
  display: grid; grid-template-columns: 28px 1.1fr 1.3fr 1fr 1.3fr;
  gap: 10px; align-items: center;
  padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 12.5px;
  background: var(--surface);
}
.tk-row.vulnerable { border-left: 4px solid var(--crit); background: #fff7f7; }
.tk-row.potential { border-left: 4px solid var(--warn); background: #fffbeb; }
.tk-row.safe { border-left: 4px solid var(--good); }
.tk-row.unresolved { border-left: 4px solid var(--muted); opacity: .75; }
.tk-row .tk-ico { font-size: 15px; text-align: center; }
.tk-row .tk-sub { font-family: var(--mono); font-weight: 600; color: var(--ink-1); word-break: break-all; }
.tk-row .tk-cname { font-family: var(--mono); color: var(--ink-3); word-break: break-all; font-size: 11.5px; }
.tk-row .tk-svc { font-weight: 600; color: var(--ink-2); }
.tk-row .tk-ev { color: var(--ink-3); font-size: 11.5px; }
.tk-empty { color: var(--muted); font-size: 13px; padding: 10px; }

/* ─── OSINT ─────────────────────────────────────────────────── */
.osint-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
.osint-block {
  padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface);
}
.osint-block h3 { margin: 0 0 10px; font-size: 13px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.osint-block h3 .tag { font-size: 11px; }
.wayback-list { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); padding: 0 0 0 18px; margin: 0; max-height: 160px; overflow-y: auto; }
.wayback-list li { padding: 2px 0; }

/* OSINT dork queries - source cards with labeled rows */
.osint-head { margin-bottom: 14px; }
.osint-head h3 { margin: 0 0 4px; font-size: 14px; }
.osint-sources {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
}
.osint-source {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.osint-source-head {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: linear-gradient(180deg, var(--mint-50), var(--surface));
  border-bottom: 1px solid var(--line);
}
.osint-source-ico {
  width: 32px; height: 32px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--mint-100); color: var(--mint-700);
  font-weight: 800; font-size: 14px;
  flex-shrink: 0;
}
.osint-source-meta { flex: 1; min-width: 0; }
.osint-source-name { font-weight: 700; font-size: 13.5px; color: var(--ink-1); line-height: 1.2; }
.osint-source-desc { font-size: 11.5px; color: var(--muted); margin-top: 2px; line-height: 1.3; }
.osint-source-count {
  font-size: 11px; font-weight: 600; color: var(--mint-700);
  background: var(--mint-50);
  padding: 3px 8px; border-radius: 999px;
  white-space: nowrap;
}
.osint-q-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column;
}
.osint-q {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  transition: background .12s ease;
}
.osint-q:first-child { border-top: none; }
.osint-q:hover { background: var(--mint-50); }
.osint-q-main { flex: 1; min-width: 0; }
.osint-q-label {
  font-size: 12.5px; font-weight: 600; color: var(--ink-1);
  line-height: 1.3; margin-bottom: 3px;
}
.osint-q-raw {
  font-family: var(--mono); font-size: 11px;
  color: var(--ink-3);
  background: var(--bg-subtle, #f5f7f6);
  padding: 2px 6px; border-radius: 4px;
  display: inline-block; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.osint-q-open {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--mint-600, #16a864);
  color: #fff;
  font-size: 11.5px; font-weight: 600;
  text-decoration: none;
  transition: background .12s ease, transform .12s ease;
}
.osint-q-open:hover { background: var(--mint-700, #10351f); transform: translateY(-1px); text-decoration: none; }

/* ─── Findings table ────────────────────────────────────────── */
.sev-summary { display: flex; flex-wrap: wrap; gap: 6px; }
.table-scroll { overflow-x: auto; }
.findings-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.findings-table th, .findings-table td {
  padding: 9px 12px; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--line-2);
}
.findings-table th {
  background: var(--surface-2); color: var(--ink-3); font-weight: 600;
  font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
  position: sticky; top: 0;
}
.findings-table tbody tr:hover { background: var(--surface-2); }
.findings-table td:first-child { width: 96px; }
.findings-table td:nth-child(2) { width: 130px; color: var(--ink-3); }
.findings-table .detail { color: var(--ink-3); font-size: 12.5px; }

/* ─── CTA ───────────────────────────────────────────────────── */
.cta {
  background: linear-gradient(135deg, var(--mint-50) 0%, #fff 60%);
  border-color: var(--mint-200);
  display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center;
  padding: 22px 24px;
}
.cta h2 { font-size: 20px; margin: 6px 0 6px; letter-spacing: -0.01em; }
.btn { display: inline-block; border: 0; cursor: pointer; font-weight: 600; font-size: 13.5px; border-radius: 8px; padding: 10px 18px; }
.btn-primary { background: var(--mint-600); color: #fff !important; }
.btn-primary:hover { background: var(--mint-700); text-decoration: none; }

/* scrollbars slim */
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: #cfdad4; border-radius: 999px; }
*::-webkit-scrollbar-track { background: transparent; }

/* ════════════════════════════════════════════════════════════════════
   RESPONSIVE / MOBILE
   Breakpoints: 1100 (tablet-wide), 900 (drawer), 640 (mobile), 420 (small mobile)
   ════════════════════════════════════════════════════════════════════ */

/* Hamburger button + sidebar backdrop: hidden by default, shown <=900px */
.sidebar-toggle {
  display: none;
  background: transparent; border: 1px solid var(--line);
  border-radius: 8px;
  width: 40px; height: 40px;
  cursor: pointer;
  padding: 0;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 4px;
  flex-shrink: 0;
  transition: background .12s ease, border-color .12s ease;
}
.sidebar-toggle:hover { background: var(--mint-50); border-color: var(--mint-200); }
.sidebar-toggle span {
  display: block; width: 18px; height: 2px;
  background: var(--ink-2); border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.sidebar-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.sidebar-toggle.open span:nth-child(2) { opacity: 0; }
.sidebar-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.sidebar-backdrop {
  position: fixed; inset: 0;
  background: rgba(11, 20, 17, 0.45);
  backdrop-filter: blur(2px);
  z-index: 45;
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}
.sidebar-backdrop.open { opacity: 1; pointer-events: auto; }

/* Compact/short button labels swap with full labels on narrow */
.btn-label-short { display: none; }

/* ─── Tablet-wide (≤1100px): grids already stack via earlier @media ─── */

/* ─── Tablet / small laptop (≤900px): sidebar becomes drawer ─── */
@media (max-width: 900px) {
  :root { --topbar-h: 58px; }

  .sidebar-toggle { display: inline-flex; }

  .sidebar {
    transform: translateX(-100%);
    transition: transform .25s ease;
    width: min(82vw, 300px);
    box-shadow: 0 0 0 1px var(--line), 10px 0 30px rgba(15, 31, 23, 0.12);
    z-index: 60;
  }
  .sidebar.open { transform: translateX(0); }

  .main { margin-left: 0; }

  .topbar { padding: 0 14px; gap: 12px; }
  .tb-summary { gap: 8px; }
  .tb-meta { gap: 6px; }

  body.sidebar-open { overflow: hidden; }

  /* Keep old 780px rules from applying (overridden below) */
}

/* ─── Narrow mobile (≤640px) ─── */
@media (max-width: 640px) {
  html, body { font-size: 14px; }

  /* Landing */
  .screen { padding: 28px 18px; }
  .brand-word { font-size: 54px; }
  .landing-inner { padding: 0; }
  .brand-tag { font-size: 13px; margin-top: 10px; }
  .landing-form {
    flex-direction: column;
    padding: 10px;
    gap: 10px;
    border-radius: 12px;
  }
  .landing-form input {
    width: 100%;
    font-size: 16px;  /* prevents iOS zoom on focus */
    padding: 12px 12px;
  }
  .landing-form button {
    width: 100%;
    padding: 14px 22px;
    border-radius: 10px;
  }

  /* Loading */
  .loading-inner { padding: 20px 4px; }
  .loading-title { font-size: 13.5px; }
  .scan-panel { margin-top: 18px; border-radius: 12px; }
  .scan-head { padding: 12px 14px; }
  .scan-head-label { font-size: 13px; }
  .scan-head-meta { font-size: 11px; }
  .scan-step { padding: 10px 14px; gap: 10px; font-size: 13px; }
  .scan-step-title { font-size: 13px; }
  .scan-step-desc { font-size: 12px; }
  .scan-steps { max-height: none; }

  /* Lead modal */
  .modal-backdrop { padding: 12px; align-items: flex-end; }
  .modal-card {
    max-width: 100%; border-radius: 14px 14px 10px 10px;
    max-height: 92vh; display: flex; flex-direction: column;
  }
  .modal-head { padding: 14px 16px 12px; }
  .modal-head h2 { font-size: 16px; }
  .modal-body { padding: 14px 16px 6px; overflow-y: auto; }
  .lead-field input { font-size: 16px; padding: 11px 12px; }
  .modal-foot { padding: 12px 16px 14px; flex-direction: column-reverse; }
  .modal-foot .btn-ghost, .modal-foot .btn-primary { width: 100%; padding: 12px 16px; font-size: 14px; }

  /* Topbar */
  .topbar {
    height: auto;
    padding: 10px 14px;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
  }
  .tb-summary { order: 2; flex: 1 1 100%; gap: 8px; }
  .tb-label { font-size: 10px; }
  .tb-target { font-size: 12px; padding: 4px 8px; }
  .tb-meta { order: 3; flex: 1 1 100%; gap: 6px; flex-wrap: wrap; }
  .tb-status { display: none; }
  #sidebar-toggle { order: 1; }
  .btn-label-full { display: none; }
  .btn-label-short { display: inline; }
  .btn-export, .btn-share {
    padding: 9px 12px;
    font-size: 12.5px;
    flex: 1 1 auto;
    justify-content: center;
  }
  #new-scan-btn { padding: 9px 12px; font-size: 12.5px; flex: 0 0 auto; }

  /* Dashboard */
  .dashboard { padding: 14px 12px 40px; gap: 14px; }
  .card { padding: 14px 14px 12px; border-radius: 10px; }
  .card-title { gap: 10px; padding-bottom: 10px; margin-bottom: 10px; }
  .card-title .ct-ico {
    flex: 0 0 36px; width: 36px; height: 36px;
    font-size: 18px; border-radius: 10px;
  }
  .card-title .ct-text h2 { font-size: 16px; }
  .card-title .ct-text p { font-size: 11.5px; }

  .dash-disclaimer { padding: 10px 12px; font-size: 12.5px; gap: 10px; }

  /* KPI row */
  .kpi-risk-body { flex-direction: column; align-items: stretch; gap: 12px; }
  .gauge { width: 140px; align-self: center; }
  .risk-grade { font-size: 44px; text-align: center; }
  .risk-score { text-align: center; }
  .kpi-risk-foot { justify-content: center; }

  .kpi-col { gap: 14px; }
  .kpi-small { padding: 12px 14px; }

  /* Attack surface compact grid -> 3 columns fit comfortably at 360px */
  .surface-compact { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .surface-compact .num { font-size: 18px; }
  .surface-compact .lbl { font-size: 10px; }

  /* OWASP stacks to single column */
  .owasp-grid { grid-template-columns: 1fr; }

  /* Priorities - compress */
  .prio-list li { grid-template-columns: 26px 1fr; gap: 8px; padding: 10px; }
  .prio-list li .sev-dot { grid-column: 1 / -1; justify-self: start; }

  /* Tech grid single col */
  .tech-grid { grid-template-columns: 1fr; }
  .tech-card { grid-template-columns: 36px 1fr auto; gap: 10px; padding: 10px; }
  .tech-logo { width: 36px; height: 36px; }
  .tech-logo img { width: 18px; height: 18px; }

  /* Vulns - stack CVE pills below */
  .vuln-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px;
  }
  .vuln-cves { max-width: 100%; justify-content: flex-start; }

  /* Email rows - stack */
  .email-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 10px 12px;
  }
  .email-verdict { font-size: 13px; padding: 10px 12px; }

  /* Compliance */
  .compliance-rollup { grid-template-columns: 1fr; }
  .ctrl-table td:first-child { width: auto; font-size: 11.5px; }

  /* Headers matrix already scrolls horizontally */

  /* Takeover rows - stack into block layout */
  .tk-row {
    grid-template-columns: 28px 1fr;
    grid-template-areas:
      "ico sub"
      ".   cname"
      ".   svc"
      ".   ev";
    gap: 4px 10px;
    padding: 10px 12px;
  }
  .tk-row .tk-ico { grid-area: ico; }
  .tk-row .tk-sub { grid-area: sub; font-size: 13px; }
  .tk-row .tk-cname { grid-area: cname; }
  .tk-row .tk-svc { grid-area: svc; }
  .tk-row .tk-ev { grid-area: ev; }
  .takeover-summary .tk-stat { flex: 1 1 calc(50% - 5px); }

  /* OSINT sources - single column */
  .osint-sources { grid-template-columns: 1fr; gap: 10px; }
  .osint-q { padding: 10px 12px; gap: 8px; }
  .osint-q-label { font-size: 12px; }
  .osint-q-raw { font-size: 10.5px; }
  .osint-q-open { padding: 5px 9px; font-size: 11px; }

  /* DNS - reduce type column */
  .dns-row { grid-template-columns: 42px 1fr; gap: 8px; }
  .dns-type { font-size: 11.5px; }
  .dns-vals { font-size: 11.5px; }

  /* Findings table */
  .findings-table { font-size: 12px; }
  .findings-table th, .findings-table td { padding: 7px 8px; }
  .findings-table td:first-child { width: 80px; }
  .findings-table td:nth-child(2) { width: 100px; }

  /* CTA card */
  .cta { grid-template-columns: 1fr; gap: 12px; padding: 18px; }

  /* Sidebar CTA inside drawer still visible */
}

/* ─── Very small mobile (≤420px) ─── */
@media (max-width: 420px) {
  .brand-word { font-size: 44px; }
  .brand-word.small { font-size: 20px; }

  .card-title .ct-text h2 { font-size: 15px; }

  .tb-meta { gap: 4px; }
  .btn-export, .btn-share, #new-scan-btn {
    padding: 8px 10px;
    font-size: 12px;
  }
  .btn-export-ico, .btn-share-ico { width: 16px; height: 16px; font-size: 10px; }

  /* Tighter padding */
  .dashboard { padding: 12px 10px 32px; }
  .card { padding: 12px; }

  .surface-compact { grid-template-columns: repeat(3, 1fr); gap: 8px; }
}

/* Override old ≤780 rule (kept for back-compat but now superseded) */
@media (max-width: 780px) {
  .sidebar { display: flex; }      /* restore sidebar display - it's a drawer now */
  .dashboard { padding: 14px 12px 40px; }
}

/* ─── Landing page: hero + features grid + how-it-works + closing CTA ─── */

.screen-landing {
  /* landing no longer centers its content — it scrolls */
  padding: 0;
}

/* Hero */
.lp-hero {
  position: relative;
  padding: 96px 24px 72px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.lp-hero .landing-inner { position: relative; z-index: 2; }
.lp-hero-bg {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 420px at 50% -140px, rgba(22, 168, 100, 0.10), transparent 70%),
    radial-gradient(680px 300px at 100% 0%, rgba(34, 185, 114, 0.06), transparent 70%),
    radial-gradient(680px 300px at 0% 0%, rgba(122, 66, 255, 0.05), transparent 70%),
    linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
}
/* Subtle dot grid overlay — fills lateral space with texture, not content */
.lp-hero-bg::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(15, 138, 81, 0.13) 1px, transparent 0);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 70% 80% at 50% 45%, transparent 0%, transparent 30%, rgba(0,0,0,.55) 55%, rgba(0,0,0,.85) 78%, #000 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 45%, transparent 0%, transparent 30%, rgba(0,0,0,.55) 55%, rgba(0,0,0,.85) 78%, #000 100%);
  opacity: .8;
}
.lp-hero::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--line); z-index: 1;
}

/* Radar pulse rings — thematic "scanning" visual behind the form */
.lp-radar {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 900px; height: 900px;
  pointer-events: none;
  z-index: 1;
  display: grid; place-items: center;
  mask-image: radial-gradient(circle at center, #000 42%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at center, #000 42%, transparent 72%);
}
.lp-radar-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(22, 168, 100, 0.22);
  width: 0; height: 0;
  animation: lpRadar 5.5s linear infinite;
}
.lp-radar-ring:nth-child(1) { animation-delay: 0s; }
.lp-radar-ring:nth-child(2) { animation-delay: 1.1s; }
.lp-radar-ring:nth-child(3) { animation-delay: 2.2s; }
.lp-radar-ring:nth-child(4) { animation-delay: 3.3s; }
.lp-radar-ring:nth-child(5) { animation-delay: 4.4s; }
@keyframes lpRadar {
  0%   { width: 0;    height: 0;    opacity: 0;    border-width: 1.5px; }
  8%   { opacity: .7; }
  100% { width: 900px; height: 900px; opacity: 0;   border-width: 0.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .lp-radar-ring { animation: none; width: 420px; height: 420px; opacity: .18; }
  .lp-radar-ring:nth-child(2) { width: 560px; height: 560px; opacity: .12; }
  .lp-radar-ring:nth-child(3) { width: 720px; height: 720px; opacity: .08; }
  .lp-radar-ring:nth-child(4),
  .lp-radar-ring:nth-child(5) { display: none; }
}
@media (max-width: 760px) {
  .lp-radar { width: 560px; height: 560px; }
  @keyframes lpRadar {
    0%   { width: 0;    height: 0;    opacity: 0;   border-width: 1.5px; }
    8%   { opacity: .6; }
    100% { width: 560px; height: 560px; opacity: 0; border-width: 0.5px; }
  }
}

/* Trust row under the form */
.lp-trust {
  margin-top: 24px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 14px;
}
.lp-trust-item {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px; font-weight: 600; color: var(--ink-3);
  box-shadow: var(--shadow-sm);
}
.lp-trust-ico { font-size: 13px; line-height: 1; }

/* Generic section container */
.lp-section {
  padding: 72px 24px;
  max-width: 1100px; width: 100%;
  margin: 0 auto;
}
.lp-section + .lp-section { border-top: 1px solid var(--line-2); }

.lp-section-head {
  text-align: center; max-width: 680px; margin: 0 auto 40px;
}
.lp-kicker {
  display: inline-block;
  font-size: 11.5px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--mint-700);
  background: var(--mint-50);
  padding: 4px 10px; border-radius: 999px;
  margin-bottom: 14px;
}
.lp-h2 {
  font-family: var(--font);
  font-size: 30px; font-weight: 800; letter-spacing: -0.015em;
  color: var(--ink-1); line-height: 1.2;
  margin: 0 0 12px;
}
.lp-sub {
  font-size: 15px; color: var(--ink-3); line-height: 1.55;
  margin: 0;
}

/* Features grid */
.lp-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.lp-tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  display: flex; flex-direction: column; gap: 6px;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.lp-tile:hover {
  border-color: var(--mint-200);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.lp-tile-ico {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  font-size: 18px;
  background: var(--mint-50);
  border: 1px solid var(--mint-100);
  margin-bottom: 4px;
}
.lp-tile-ico[data-accent="blue"]    { background: #eaf3fc; border-color: #c8ddf3; }
.lp-tile-ico[data-accent="teal"]    { background: #e6f5f4; border-color: #bfe2e0; }
.lp-tile-ico[data-accent="orange"]  { background: #fdf0e3; border-color: #f4d8b7; }
.lp-tile-ico[data-accent="purple"]  { background: #f1ebff; border-color: #d9c8ff; }
.lp-tile-ico[data-accent="indigo"]  { background: #eceafc; border-color: #cac5f1; }
.lp-tile-ico[data-accent="red"]     { background: #fbeeee; border-color: #f2cdcb; }
.lp-tile-ico[data-accent="slate"]   { background: #eef1f4; border-color: #d1d7de; }
.lp-tile-ico[data-accent="charcoal"]{ background: #e9ebec; border-color: #cfd2d5; }
.lp-tile h3 {
  font-size: 15px; font-weight: 700; letter-spacing: -0.005em;
  color: var(--ink-1); margin: 0 0 2px;
}
.lp-tile p {
  font-size: 13px; line-height: 1.55; color: var(--ink-3); margin: 0;
}

/* How it works (numbered steps) */
.lp-how { background: linear-gradient(180deg, var(--bg) 0%, var(--surface-2) 100%); border-radius: 0; max-width: none; padding: 72px 24px; }
.lp-how .lp-section-head,
.lp-how .lp-steps { max-width: 1100px; margin-left: auto; margin-right: auto; }
.lp-steps {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.lp-step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
}
.lp-step-num {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--mint-600); color: #fff;
  font-family: var(--mono); font-weight: 700; font-size: 14px;
  margin-bottom: 12px;
  box-shadow: 0 2px 6px rgba(22, 168, 100, 0.25);
}
.lp-step h3 {
  font-size: 16px; font-weight: 700;
  color: var(--ink-1); margin: 0 0 6px;
}
.lp-step p {
  font-size: 13.5px; line-height: 1.55; color: var(--ink-3); margin: 0;
}

/* Closing CTA */
.lp-cta-section { padding-bottom: 90px; }
.lp-cta-card {
  background: linear-gradient(135deg, #0f8a51 0%, #16a864 55%, #22b972 100%);
  color: #fff;
  border-radius: 18px;
  padding: 44px 32px 40px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(15, 138, 81, 0.22);
  position: relative;
  overflow: hidden;
}
.lp-cta-card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(800px 300px at 50% -60%, rgba(255,255,255,0.18), transparent 70%);
  pointer-events: none;
}
.lp-cta-kicker {
  display: inline-block;
  font-size: 11.5px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,0.9);
  padding: 4px 10px; border-radius: 999px;
  background: rgba(255,255,255,0.14);
  margin-bottom: 14px;
  position: relative;
}
.lp-cta-card h2 {
  font-size: 28px; font-weight: 800; letter-spacing: -0.015em;
  color: #fff; margin: 0 0 10px; position: relative;
}
.lp-cta-card > p {
  font-size: 15px; color: rgba(255,255,255,0.9);
  margin: 0 0 22px; position: relative;
}
.lp-cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px;
  background: #fff; color: var(--mint-700) !important;
  border-radius: 10px;
  font-family: var(--font); font-weight: 700; font-size: 15px;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
  position: relative;
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}
.lp-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0,0,0,0.18);
  text-decoration: none;
}
.lp-cta-mini {
  margin-top: 20px; position: relative;
  font-size: 12.5px; color: rgba(255,255,255,0.82);
}
.lp-cta-mini a {
  color: #fff !important;
  text-decoration: underline; text-decoration-color: rgba(255,255,255,0.5);
  text-underline-offset: 3px;
}
.lp-cta-mini a:hover { text-decoration-color: #fff; }

/* Responsive */
@media (max-width: 760px) {
  .lp-hero { padding: 96px 18px 56px; min-height: auto; }
  .lp-section { padding: 56px 18px; }
  .lp-how { padding: 56px 18px; }
  .lp-cta-section { padding-bottom: 64px; }
  .lp-h2 { font-size: 24px; }
  .lp-cta-card { padding: 36px 22px 32px; border-radius: 14px; }
  .lp-cta-card h2 { font-size: 22px; }
  .lp-trust { gap: 8px 10px; margin-top: 20px; }
  .lp-trust-item { padding: 5px 10px; font-size: 11.5px; }
}

/* ─── SecurePurple branding: back pill, sidebar logo, topbar logo, footer ─── */

/* SecurePurple accent (for hover states on SP-links specifically) */
:root {
  --sp-purple: #7a42ff;
  --sp-purple-soft: #f1ebff;
}

/* Top-left back pill on landing + loading screens */
.sp-back {
  position: absolute; top: 18px; left: 18px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px 7px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  font-size: 12px; font-weight: 600; color: var(--ink-3);
  text-decoration: none;
  transition: border-color .12s ease, color .12s ease, box-shadow .12s ease, transform .12s ease;
  z-index: 5;
}
.sp-back:hover {
  border-color: var(--sp-purple);
  color: var(--sp-purple);
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(122, 66, 255, 0.12);
  transform: translateY(-1px);
}
.sp-back-arrow {
  font-size: 14px; line-height: 1; color: inherit; font-weight: 700;
}
.sp-back-text {
  font-family: var(--font);
  font-size: 12.5px; font-weight: 600; letter-spacing: .01em;
  color: inherit;
}

/* Make "by SecurePurple" in landing tagline a subtle link */
.brand-tag-link {
  color: inherit; border-bottom: 1px dotted var(--muted);
  padding-bottom: 1px; transition: color .12s ease, border-color .12s ease;
}
.brand-tag-link:hover {
  color: var(--sp-purple); border-color: var(--sp-purple); text-decoration: none;
}

/* Sidebar: cactus brand + separate "by [SecurePurple logo]" link */
.sb-brand-group {
  padding: 0 8px 14px;
  border-bottom: 1px solid var(--line-2);
  margin-bottom: 12px;
  display: flex; flex-direction: column; gap: 6px; align-items: flex-start;
}
.sb-brand-group .sb-brand {
  padding: 0; border-bottom: none; margin-bottom: 0;
}
.sb-sp-link {
  display: inline-block;
  padding: 3px 6px;
  margin-left: -6px;
  border-radius: 6px;
  color: var(--muted); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; font-weight: 600;
  text-decoration: none;
  transition: background .12s ease, color .12s ease;
}
.sb-sp-link:hover { background: var(--sp-purple-soft); color: var(--sp-purple); text-decoration: none; }
.sb-sp-name { color: var(--ink-2); font-weight: 700; }
.sb-sp-link:hover .sb-sp-name { color: var(--sp-purple); }

/* Shared footer (landing / loading / dashboard) */
.sp-footer {
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  padding: 28px 24px 22px;
}
.sp-footer-inner {
  max-width: 860px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 10px;
}
.sp-footer-brand {
  display: inline-block; line-height: 0;
  padding: 4px 8px; border-radius: 8px;
  transition: background .12s ease;
}
.sp-footer-brand:hover { background: var(--sp-purple-soft); }
.sp-footer-brand img { height: 26px; width: auto; display: block; }
.sp-footer-brand-text {
  line-height: 1; font-family: var(--font);
  font-size: 15px; font-weight: 800; letter-spacing: -0.005em;
  color: var(--ink-1);
  padding: 6px 10px;
}
.sp-footer-brand-text:hover { color: var(--sp-purple); text-decoration: none; }
.sp-footer-tag {
  font-size: 12.5px; color: var(--ink-3); max-width: 560px; line-height: 1.55;
}
.sp-footer-tag strong { color: var(--ink-1); }
.sp-footer-nav {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 8px; margin-top: 4px;
  font-size: 12.5px; font-weight: 500;
}
.sp-footer-nav a { color: var(--ink-2); padding: 2px 2px; }
.sp-footer-nav a:hover { color: var(--sp-purple); text-decoration: none; }
.sp-footer-nav span { color: var(--muted); }
.sp-footer-legal {
  font-size: 11px; color: var(--muted); margin-top: 6px;
  letter-spacing: .02em;
}

/* Dashboard variant: footer needs to clear the fixed sidebar */
.sp-footer-dash { border-top: 1px solid var(--line); }

/* Mobile tweaks */
@media (max-width: 640px) {
  .sp-back { top: 12px; left: 12px; padding: 5px 10px 5px 8px; gap: 6px; }
  .sp-back-text { font-size: 11.5px; }
  .sp-back-arrow { font-size: 12px; }

  .screen-center { padding: 64px 18px 32px; }

  .sp-footer { padding: 22px 18px 18px; }
  .sp-footer-brand img { height: 22px; }
  .sp-footer-tag { font-size: 12px; }
  .sp-footer-nav { font-size: 12px; gap: 6px; }
}
