/* ROJO. Behavioral security for AI agents.
   Brand: hot red (#ff2740) on warm near-black (#070405), warm-white ink,
   Space Grotesk display type. Matches rojo-security.vercel.app. */

:root {
  --bg: #070405;
  --bg-elev: #0b0607;
  --card: #120b0c;
  --card-hover: #170d0f;
  --border: #341f22;
  --border-soft: #241618;
  --text: #f6eeef;
  --text-dim: #a99ea0;
  --text-faint: #6f6264;
  --red: #ff2740;
  --red-bright: #ff5a6e;
  --red-deep: #7a1420;
  --green: #3fb27f;
  --green-soft: #7fe6a6;
  --green-deep: #0f2a1a;
  --amber: #d99a1e;
  --amber-deep: #2a2109;
  --sev-critical: #ff2740;
  --sev-high: #e0611c;
  --sev-medium: #c08a1e;
  --sev-low: #4f7a2a;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 40px rgba(30, 4, 8, 0.55);
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk", var(--font);
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

button {
  font-family: inherit;
  cursor: pointer;
}

/* ---------- App shell ---------- */

#app { min-height: 100%; display: flex; flex-direction: column; }

.wrap {
  width: 100%;
  max-width: 940px;
  margin: 0 auto;
  padding: 0 22px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--red-bright);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
/* Real site shows a short red em-length dash before eyebrow text (a
   decorative line, not a literal character). */
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--red);
  flex: none;
}

/* Brand mark */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 3px;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}
.brand .mark {
  flex: none;
  display: block;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 11px 18px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  background: var(--card);
  border-color: var(--border);
  transition: background 0.15s, border-color 0.15s, transform 0.05s, opacity 0.15s;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { background: var(--card-hover); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn:disabled:active { transform: none; }

.btn-primary {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  box-shadow: 0 10px 34px -6px rgba(255, 39, 64, 0.55);
}
.btn-primary:hover { background: var(--red-bright); border-color: var(--red-bright); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--border);
  color: var(--text);
  padding: 8px 12px;
}
.btn-ghost:hover { background: var(--card); color: var(--text); border-color: var(--border); }

.btn-sm { padding: 7px 12px; font-size: 13px; }

.btn:focus-visible,
a:focus-visible,
input:focus-visible,
.tab:focus-visible,
.scan-row:focus-visible {
  outline: 2px solid var(--red-bright);
  outline-offset: 2px;
}

/* ---------- Landing ---------- */

.landing {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 0 70px;
}
.landing-inner { padding: 20px 0; position: relative; }
/* Faint radial red glow behind the hero, matching the marketing site. */
.landing-inner::before {
  content: "";
  position: absolute;
  top: -80px;
  left: -120px;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 39, 64, 0.10), transparent 62%);
  pointer-events: none;
  z-index: 0;
}
.landing-inner > * { position: relative; z-index: 1; }
.landing .brand { margin-bottom: 40px; font-size: 22px; }

.hero-title {
  font-family: var(--display);
  font-size: 44px;
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  max-width: 15em;
}
.hero-title .accent {
  color: var(--red-bright);
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-underline-offset: 5px;
  text-decoration-thickness: 3px;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-dim);
  max-width: 34em;
  margin: 0 0 34px;
}

.signin-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 460px;
  box-shadow: var(--shadow);
}
.signin-card h2 { margin: 0 0 4px; font-size: 18px; }
.signin-card .hint { color: var(--text-dim); font-size: 14px; margin: 0 0 18px; }

.field-row { display: flex; gap: 10px; align-items: stretch; }
@media (max-width: 520px) { .field-row { flex-direction: column; } }

input[type="email"], input[type="text"] {
  flex: 1;
  min-width: 0;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
}
input::placeholder { color: var(--text-faint); }
input:focus { border-color: var(--red); }

.reassure {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-faint);
  line-height: 1.5;
}
.reassure svg { flex: none; margin-top: 2px; opacity: 0.8; }

.feature-row {
  display: flex;
  gap: 26px;
  margin-top: 46px;
  flex-wrap: wrap;
}
.feature { flex: 1; min-width: 200px; }
.feature .k {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}
.feature .k .mk { color: var(--red-bright); font-size: 16px; }
.feature .v { font-size: 13.5px; color: var(--text-dim); line-height: 1.5; }

/* ---------- Top bar (signed in) ---------- */

.topbar {
  border-bottom: 1px solid var(--border-soft);
  background: rgba(7, 4, 5, 0.72);
  backdrop-filter: saturate(140%) blur(14px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
  gap: 14px;
}
.topbar .brand { font-size: 20px; }
/* The crosshair mark picks up a gentle pulse so it reads as "live", matching
   the marketing site's glowing mark. */
.topbar .brand .mark {
  animation: brand-pulse 3.2s ease-in-out infinite;
}
@keyframes brand-pulse {
  0%, 100% { filter: drop-shadow(0 0 3px rgba(255, 39, 64, 0.45)); }
  50% { filter: drop-shadow(0 0 8px rgba(255, 39, 64, 0.85)); }
}
@media (prefers-reduced-motion: reduce) {
  .topbar .brand .mark { animation: none; }
}

.topbar .who {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
/* Account chip: a small pill, not just floating text, so the header feels
   composed. Green dot means signed-in session. */
.topbar .account {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 13px;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 6px 13px 6px 11px;
}
.topbar .account-dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(63, 178, 127, 0.65);
}
.topbar .account-email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 34vw;
}
@media (max-width: 520px) {
  .topbar .account { padding: 5px 10px; }
  .topbar .account-email { max-width: 42vw; }
}

/* ---------- Page + hero header ---------- */

.page { flex: 1; padding: 8px 0 90px; }

/* The dashboard's hero: the signed-in echo of the landing hero. Big display
   type, tight tracking, generous space before the first section. */
.dash-hero {
  padding: 44px 0 6px;
}
.dash-hero .eyebrow { margin-bottom: 12px; }
.dash-title {
  font-family: var(--display);
  font-size: 40px;
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 12px;
}
.dash-sub {
  font-size: 17px;
  color: var(--text-dim);
  max-width: 40em;
  margin: 0;
  line-height: 1.5;
}

/* ---------- Sections ---------- */

.section { margin-top: 40px; }
.section:first-child { margin-top: 8px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.section-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
}
.section-head .sub { font-size: 13px; color: var(--text-faint); }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

/* ---------- Connect card ---------- */

/* Elevate the whole card: soft shadow like the landing's sign-in card, a
   hairline red accent along the top edge so it reads as the primary action. */
.connect-card {
  position: relative;
  padding: 26px 26px 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.connect-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--red), var(--red-bright) 55%, transparent);
  opacity: 0.9;
}
@media (max-width: 600px) { .connect-card { padding: 20px 18px; } }

.connect-head {
  position: relative;
  margin-bottom: 22px;
  padding-left: 42px;
}
/* Numbered step marker: quiet visual hierarchy ("this is step 1"). */
.connect-step {
  position: absolute;
  left: 0;
  top: 1px;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(255, 39, 64, 0.12);
  border: 1px solid rgba(255, 39, 64, 0.4);
  color: var(--red-bright);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}
.connect-head h3 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
}
.connect-sub { font-size: 14px; color: var(--text-dim); margin: 0; max-width: 44em; }
@media (max-width: 600px) {
  .connect-head { padding-left: 0; }
  .connect-step { position: static; margin-bottom: 12px; }
}
.connect-head code,
.connect-use code {
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  padding: 1px 6px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--red-bright);
}

/* HERO: the one command. The visual centerpiece of the card. */
.connect-hero { margin-bottom: 24px; }
.ch-label,
.cu-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--red-bright);
  font-weight: 500;
  margin-bottom: 9px;
}
.cu-label { color: var(--text-faint); }
.connect-hero .codeblock {
  border-color: rgba(255, 39, 64, 0.32);
  background: linear-gradient(180deg, rgba(255, 39, 64, 0.06), var(--bg-elev) 60%);
  box-shadow: 0 0 0 1px rgba(255, 39, 64, 0.16), 0 12px 34px rgba(20, 3, 6, 0.45);
}
.connect-hero .codeblock pre {
  font-size: 13.5px;
  padding: 18px 16px;
  padding-right: 108px;
  color: var(--text);
}
/* Trust line under the install command: muted, one line, links out to the
   raw script so security buyers can read what `curl | sh` will run. */
.trust-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
  font-size: 12.5px;
  color: var(--text-faint);
  line-height: 1.5;
}
.trust-line svg { flex: none; opacity: 0.75; }
.trust-line a {
  color: var(--text-dim);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(169, 158, 160, 0.4);
  transition: color 0.15s;
}
.trust-line a:hover { color: var(--red-bright); text-decoration-color: var(--red-bright); }
.ch-help {
  font-size: 13px;
  color: var(--text-faint);
  margin: 10px 0 0;
  line-height: 1.55;
  max-width: 46em;
}

/* Then use it */
.connect-use { margin-bottom: 20px; }
.cu-help {
  font-size: 13px;
  color: var(--text-faint);
  margin: 10px 0 0;
  line-height: 1.55;
  max-width: 46em;
}

/* Collapsible fallback for other clients */
.connect-fallback {
  border-top: 1px solid var(--border-soft);
  padding-top: 16px;
  margin-top: 4px;
}
.connect-fallback > summary {
  cursor: pointer;
  list-style: none;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
  user-select: none;
}
.connect-fallback > summary::-webkit-details-marker { display: none; }
.connect-fallback > summary::before {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
  margin-right: 2px;
  opacity: 0.7;
}
.connect-fallback[open] > summary::before { transform: rotate(45deg); }
.connect-fallback > summary:hover { color: var(--text); }
.cf-body { padding-top: 14px; }
.cf-body .dl-btn { margin-bottom: 14px; }
.cf-body .codeblock { margin-bottom: 6px; }
.cf-line { font-size: 13px; color: var(--text-dim); margin: 0 0 12px; }

/* Code block with copy */
.codeblock {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.codeblock pre {
  margin: 0;
  padding: 14px 16px;
  padding-right: 96px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.6;
  color: #e9dcdd;
}
.codeblock.inline pre { padding: 11px 14px; padding-right: 92px; }
.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 8px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.copy-btn:hover { background: var(--card-hover); color: var(--text); }
.copy-btn.copied { color: var(--green-soft); border-color: var(--green-deep); }

.ask-line {
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--text-dim);
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--red);
  border-radius: 8px;
  padding: 10px 13px;
}
.ask-line em { color: var(--text); font-style: italic; }

.dl-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--red, #ff2740); color: #fff; text-decoration: none;
  font-weight: 600; font-size: 14px; padding: 10px 16px; border-radius: 10px;
  border: 1px solid var(--red, #ff2740); transition: filter .15s ease;
}
.dl-btn:hover { filter: brightness(1.12); }

/* ---------- Scan list ---------- */

.scan-list { display: flex; flex-direction: column; gap: 10px; }

.scan-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  text-align: left;
  width: 100%;
  color: inherit;
  position: relative;
  transition: background 0.16s, border-color 0.16s, transform 0.05s, box-shadow 0.16s;
}
/* A thin red seam on the left, revealed on hover, tying rows to the brand. */
.scan-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--red);
  opacity: 0;
  transition: opacity 0.16s;
}
.scan-row:hover {
  background: var(--card-hover);
  border-color: #55333890;
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.scan-row:hover::before { opacity: 0.9; }
.scan-row:active { transform: translateY(0); }
.scan-row .grow { flex: 1; min-width: 0; }
.scan-row .target {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.scan-row .meta { font-size: 12.5px; color: var(--text-faint); margin-top: 4px; }
.scan-row .chev {
  color: var(--text-faint);
  flex: none;
  display: inline-flex;
  transition: transform 0.16s, color 0.16s;
}
.scan-row:hover .chev { color: var(--red-bright); transform: translateX(3px); }
.scan-row .when { font-size: 12.5px; color: var(--text-faint); flex: none; white-space: nowrap; }
@media (max-width: 620px) {
  .scan-row .when { display: none; }
}

/* Verdict pills */
.verdict {
  flex: none;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  padding: 6px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  white-space: nowrap;
}
.verdict.rejected { background: var(--red); color: #fff; box-shadow: 0 0 0 1px rgba(255, 39, 64, 0.35), 0 4px 18px rgba(255, 39, 64, 0.45); }
.verdict.conditional { background: var(--amber-deep); color: var(--amber); border: 1px solid #4a3a12; }
.verdict.approved { background: var(--green-deep); color: var(--green-soft); border: 1px solid #17402a; }
.verdict.unknown { background: var(--card); color: var(--text-dim); border: 1px solid var(--border); }

/* count dots inline */
.count-frag { color: var(--text-dim); }
.count-frag .c-critical { color: var(--red-bright); font-weight: 600; }
.count-frag .c-high { color: #e8804f; font-weight: 600; }
.count-frag .c-medium { color: #d9b24e; font-weight: 600; }
.count-frag .c-low { color: #9ecb6a; font-weight: 600; }
.count-frag .sep { opacity: 0.4; margin: 0 6px; }
.count-frag .clean { color: var(--green-soft); font-weight: 600; }

/* ---------- Empty / states ---------- */

.empty {
  text-align: center;
  padding: 52px 28px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: radial-gradient(120% 120% at 50% 0%, rgba(255, 39, 64, 0.06), transparent 60%);
  color: var(--text-dim);
}
.empty .icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  border-radius: 14px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red-bright);
}
.empty .t { font-size: 16px; color: var(--text); font-weight: 700; margin-bottom: 6px; letter-spacing: -0.01em; }
.empty .d { font-size: 13.5px; max-width: 30em; margin: 0 auto; }

.loading {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--text-dim);
  font-size: 14px;
  padding: 26px 4px;
}
.spinner {
  width: 17px;
  height: 17px;
  border: 2px solid var(--border);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

.error-box {
  background: var(--red-deep);
  border: 1px solid #5a1a2c;
  border-left: 3px solid var(--red);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  color: #ffc9d6;
  font-size: 13.5px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.error-box .retry {
  margin-left: auto;
  background: transparent;
  border: 1px solid #5a1a2c;
  color: #ffc9d6;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 12.5px;
  font-weight: 600;
  flex: none;
}
.error-box .retry:hover { background: rgba(255, 255, 255, 0.06); }

/* Toast */
#toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 11px 18px;
  border-radius: 10px;
  font-size: 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 9px;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast .ok { color: var(--green-soft); }

/* ---------- Scan detail ---------- */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  color: var(--text-dim);
  background: none;
  border: none;
  padding: 6px 0;
  margin-bottom: 8px;
}
.back-link:hover { color: var(--text); }

.detail-head { margin-bottom: 8px; }
.detail-head h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 28px;
  margin: 6px 0 4px;
  letter-spacing: -0.02em;
}
.detail-head .sub { color: var(--text-dim); font-size: 14px; }

.verdict-banner {
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 20px 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.verdict-banner.rejected { background: var(--red); color: #fff; }
.verdict-banner.conditional { background: linear-gradient(0deg, var(--amber-deep), var(--amber-deep)); border: 1px solid #4a3a12; }
.verdict-banner.approved { background: var(--green-deep); border: 1px solid #17402a; }
.verdict-banner.unknown { background: var(--card); border: 1px solid var(--border); }
.verdict-banner .vb-label {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.85;
}
.verdict-banner .vb-verdict {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.verdict-banner.conditional .vb-verdict { color: var(--amber); }
.verdict-banner.approved .vb-verdict { color: var(--green-soft); }
.verdict-banner .vb-desc { font-size: 14px; opacity: 0.92; margin-top: 3px; }
.verdict-banner .vb-cert {
  font-family: var(--mono);
  font-size: 12px;
  opacity: 0.85;
  text-align: right;
}
.verdict-banner .vb-cert .k { text-transform: uppercase; letter-spacing: 0.1em; font-size: 10px; opacity: 0.8; }

.stat-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 0 4px; }
.stat {
  text-align: center;
  padding: 12px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  min-width: 90px;
  flex: 1;
}
.stat .n { font-family: var(--display); font-size: 26px; font-weight: 700; letter-spacing: -0.01em; }
.stat .l {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: 1px;
}
.stat.critical .n { color: var(--sev-critical); }
.stat.high .n { color: var(--sev-high); }
.stat.medium .n { color: var(--sev-medium); }
.stat.low .n { color: var(--sev-low); }
.stat.passed .n { color: var(--green); }
.stat.scen .n { color: #7a6a6c; }

/* Finding cards */
.findings { margin-top: 22px; display: flex; flex-direction: column; gap: 14px; }

.finding {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.finding.sev-critical { border-left: 3px solid var(--sev-critical); }
.finding.sev-high { border-left: 3px solid var(--sev-high); }
.finding.sev-medium { border-left: 3px solid var(--sev-medium); }
.finding.sev-low { border-left: 3px solid var(--sev-low); }

.finding .chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 9px;
}
.chip {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 1px;
  padding: 3px 9px;
  border-radius: 999px;
  text-transform: uppercase;
}
.chip.critical { background: var(--sev-critical); color: #fff; }
.chip.high { background: var(--sev-high); color: #fff; }
.chip.medium { background: var(--sev-medium); color: #fff; }
.chip.low { background: var(--sev-low); color: #fff; }
.chip.conf {
  background: var(--green-deep);
  color: var(--green-soft);
  text-transform: none;
  letter-spacing: 0;
}
.chip.conf.needs-review {
  background: var(--amber-deep);
  color: var(--amber);
  border: 1px solid #4a3a12;
}
.chip.dupe {
  background: var(--bg-elev);
  color: var(--text-faint);
  border: 1px solid var(--border-soft);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}
.finding .trace {
  font-size: 12px;
  color: var(--text-faint);
  font-family: var(--mono);
}
.finding h3 { margin: 4px 0 8px; font-size: 17px; line-height: 1.35; }

.finding .evidence {
  margin: 10px 0;
}
.finding .evidence .lbl {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 5px;
}
.finding .evidence .body {
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--red-deep);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: #e9dcdd;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.55;
}

/* Screen-reader-only source pre (copy target for the fix-bar) */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* Fix bar: the headline "copy for your coding agent" action */
.fix-bar {
  margin: 14px 0 4px;
  background: rgba(255, 39, 64, 0.08);
  border: 1px solid rgba(255, 39, 64, 0.30);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.fix-bar .fix-copy { min-width: 0; flex: 1; }
.fix-bar .fix-lead {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
  max-width: 42em;
}
.fix-bar .fix-btn { flex: none; }
.fix-bar .fix-btn.copied { background: var(--green); border-color: var(--green); color: #06210f; }
@media (max-width: 620px) {
  .fix-bar .fix-btn { width: 100%; }
}

/* Action item: collapsed by default, short preview in the summary */
details.action-item {
  margin-top: 12px;
  background: rgba(255, 39, 64, 0.09);
  border: 1px solid rgba(255, 39, 64, 0.35);
  border-radius: 10px;
  padding: 0;
}
details.action-item > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 11px 14px;
  user-select: none;
}
details.action-item > summary::-webkit-details-marker { display: none; }
details.action-item .ai-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--red-bright);
  font-weight: 500;
  flex: none;
}
details.action-item .ai-preview {
  font-size: 12.5px;
  color: var(--text-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
details.action-item[open] .ai-preview { display: none; }
details.action-item .txt {
  font-size: 14px;
  color: var(--text);
  line-height: 1.55;
  padding: 0 14px 13px;
}

/* Conversation transcript: collapsed "Show what happened" */
details.convo {
  margin-top: 12px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--bg-elev);
}
details.convo > summary {
  cursor: pointer;
  list-style: none;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 13px;
  user-select: none;
}
details.convo > summary::-webkit-details-marker { display: none; }
details.convo > summary::before {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
  opacity: 0.7;
}
details.convo[open] > summary::before { transform: rotate(45deg); }
details.convo > summary:hover { color: var(--text); }
.convo-log {
  padding: 4px 13px 13px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.cx { line-height: 1.5; }
.cx-role {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-faint);
  margin-bottom: 2px;
}
.cx-user .cx-role { color: #d9a9ab; }
.cx-agent .cx-role { color: var(--text-dim); }
.cx-inject .cx-role { color: var(--red-bright); }
.cx-body {
  font-size: 13px;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}
.cx-inject .cx-body { color: #ffd6dc; }
.cx-tool { margin: 1px 0; }
.cx-tool code {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  color: #e9dcdd;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  padding: 7px 10px;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.5;
}
.cx-tool .cx-arrow { color: var(--text-faint); }
.cx-tool.injected code {
  border-color: rgba(255, 39, 64, 0.45);
  background: rgba(255, 39, 64, 0.10);
  color: #ffd6dc;
}
.cx-flag {
  display: inline-block;
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--red-bright);
  margin-bottom: 3px;
}

/* Full report iframe view */
.report-view { margin-top: 22px; }
.report-frame {
  width: 100%;
  height: 78vh;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
}
.report-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

/* Passed section note */
.passed-note {
  margin-top: 20px;
  font-size: 13.5px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
}
.passed-note .ok { color: var(--green-soft); }

/* Footer */
.foot {
  border-top: 1px solid var(--border-soft);
  padding: 22px 0;
  color: var(--text-faint);
  font-size: 12.5px;
  text-align: center;
}

/* Mobile tweaks */
@media (max-width: 600px) {
  .hero-title { font-size: 34px; }
  .hero-sub { font-size: 16px; }
  .dash-hero { padding: 34px 0 4px; }
  .dash-title { font-size: 32px; }
  .dash-sub { font-size: 15.5px; }
  .detail-head h1 { font-size: 23px; }
  .stat { min-width: 72px; padding: 10px 12px; }
  .stat .n { font-size: 22px; }
}
