/* Clausewall — modern B2B SaaS shell (Linear/Vercel craft, honest claims) */
:root {
  --navy: #0B1220;
  --navy-2: #111827;
  --navy-3: #1a2438;
  --cyan: #22D3EE;
  --blue: #3B82F6;
  --ink: #E8EEF7;
  --muted: #94A3B8;
  --line: rgba(148, 163, 184, 0.18);
  --glass: rgba(17, 24, 39, 0.72);
  --ok: #34D399;
  --hold: #FBBF24;
  --block: #F87171;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --font: "Heebo", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --header-h: 64px;
  --focus: 0 0 0 3px rgba(34, 211, 238, 0.45);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .hero-viz * { animation: none !important; transition: none !important; }
}

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

img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: #67e8f9; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--cyan);
  color: var(--navy);
  padding: 0.6rem 1rem;
  z-index: 100;
  font-weight: 600;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.wrap, .wrap-xl, .narrow {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 1.25rem;
  box-sizing: border-box;
}
.wrap-xl { max-width: 1180px; }
.narrow { max-width: 720px; }

.badge {
  display: inline-block;
  margin: 1rem auto 0;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.15);
  color: var(--hold);
  font-size: 0.85rem;
  border: 1px solid rgba(251, 191, 36, 0.35);
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(11, 18, 32, 0.88);
  border-bottom: 1px solid var(--line);
}
.site-header-inner {
  position: relative;
  height: 100%;
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 1.25rem;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand-logo { height: 36px; width: auto; }
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem 1.15rem;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.35rem 0.2rem;
}
.site-nav a:hover { color: var(--ink); }
.site-nav .nav-cta {
  color: var(--navy) !important;
  margin-inline-start: 0.35rem;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(34, 211, 238, 0.35);
}
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  padding: 10px;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

/* —— Buttons —— */
.btn-primary, .btn-ghost, button.submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-primary, button.submit {
  background: linear-gradient(135deg, #22D3EE 0%, #3B82F6 100%);
  color: #0B1220 !important;
  box-shadow: 0 8px 28px rgba(34, 211, 238, 0.25);
}
.btn-primary:hover, button.submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.35);
  color: var(--navy) !important;
}
.btn-primary:disabled, button.submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn-ghost {
  background: transparent;
  color: var(--ink) !important;
  border-color: var(--line);
}
.btn-ghost:hover {
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(34, 211, 238, 0.06);
}
.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; }

/* —— Hero —— */
.hero-wide {
  position: relative;
  padding: 3.5rem 0 2.5rem;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 70% 30%, rgba(34, 211, 238, 0.12), transparent 60%),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(59, 130, 246, 0.1), transparent 55%),
    linear-gradient(180deg, transparent, var(--navy));
  background-size: auto, auto, auto;
}
.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 60% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 60% 40%, #000 20%, transparent 75%);
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 2.5rem 3rem;
  align-items: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.hero-grid > * {
  min-width: 0;
  max-width: 100%;
}
.hero-copy { max-width: 100%; }
.hero-copy h1 {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.hero-cta { width: 100%; max-width: 100%; }
.hero-cta .btn-primary,
.hero-cta .btn-ghost {
  max-width: 100%;
  box-sizing: border-box;
}
.hero-viz-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.22);
}
.trust-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 10px var(--ok);
}
.hero-copy h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.85rem, 3.2vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.lead, .section-lead {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 38ch;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.hero-note { margin: 0; max-width: 42ch; }
.note { color: var(--muted); font-size: 0.875rem; }

/* —— Agent Control Room / live graph —— */
.hero-viz-wrap { position: relative; }
.control-room.hero-viz {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(34, 211, 238, 0.22);
  background:
    radial-gradient(ellipse 70% 50% at 40% 40%, rgba(34, 211, 238, 0.07), transparent 55%),
    radial-gradient(ellipse 40% 40% at 85% 20%, rgba(167, 139, 250, 0.08), transparent 50%),
    linear-gradient(160deg, #070b14 0%, #0B1220 55%, #0a1020 100%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 0 40px rgba(34, 211, 238, 0.06);
  padding: 0.75rem 0.85rem 0.85rem;
  overflow: hidden;
  min-height: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.cr-chrome-compact {
  flex-wrap: nowrap;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}
.cr-chrome-compact .cr-title {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(58vw, 360px);
}
@media (max-width: 420px) {
  .cr-chrome-compact { flex-wrap: wrap; }
  .cr-chrome-compact .cr-title { max-width: 100%; }
}
.cr-chrome {

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.55rem;
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
}
.cr-chrome-left { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.cr-live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #34D399;
  box-shadow: 0 0 10px #34D399;
  animation: livePulse 1.6s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
.cr-title {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: #E8EEF7;
}
.cr-meta {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.cr-demo-badge {
  flex: 0 1 auto;
  max-width: 100%;
  box-sizing: border-box;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #67e8f9;
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.08);
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}
.cr-main {
  display: grid;
  grid-template-columns: 1.45fr 0.9fr;
  gap: 0.65rem;
  align-items: stretch;
  min-width: 0;
  max-width: 100%;
}
.cr-main > * { min-width: 0; max-width: 100%; }
.cr-graph-wrap {
  position: relative;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  overflow: hidden;
  min-height: 340px;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-self: stretch;
}
.cr-graph-wrap #cr-canvas {
  flex: 1 1 auto;
  width: 100% !important;
  height: auto !important;
  min-height: 300px;
}

#cr-canvas {
  display: block;
  width: 100% !important;
  max-width: 100%;
  min-width: 0;
  min-height: 260px;
  height: 100% !important;
  aspect-ratio: auto;
}
.cr-counters-slim {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  left: auto;
  bottom: auto;
  padding: 0.3rem 0.45rem;
  border-radius: 8px;
  background: rgba(7, 11, 20, 0.78);
  backdrop-filter: blur(6px);
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem 0.65rem;
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  pointer-events: none;
  text-transform: uppercase;
  z-index: 2;
  max-width: 55%;
}
.cr-counters-slim b { color: #E8EEF7; font-weight: 700; margin-right: 0.2rem; }
.cr-counters-slim .allow b { color: #34D399; }
.cr-counters-slim .hold b { color: #FBBF24; }
.cr-counters-slim .block b { color: #F472B6; }

.cr-active {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  background: rgba(8, 12, 22, 0.85);
  padding: 0.7rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.cr-panel-label {
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cr-idx { color: #67e8f9; letter-spacing: 0.08em; }
.cr-action-title {
  transition: opacity 0.25s ease;
  margin: 0.15rem 0 0;
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: #F8FAFC;
  font-weight: 700;
}
.cr-action-sub {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.cr-clause-row { margin-bottom: 0.25rem; }
.cr-clause {
  display: inline-block;
  margin-top: 0.2rem;
  color: var(--cyan);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}
#cr-wave { display: block; width: 100%; height: 56px; margin: 0.15rem 0 0.35rem; }
.cr-metrics { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 0.35rem; }
.cr-metric {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.62rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.cr-mbar {
  height: 5px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.15);
  overflow: hidden;
}
.cr-mbar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.45);
  transition: width 0.45s ease;
}
.cr-mbar.risk i { background: linear-gradient(90deg, #FBBF24, #F472B6); box-shadow: 0 0 8px rgba(244, 114, 182, 0.4); }
.cr-mbar.conf i { background: linear-gradient(90deg, #34D399, #22D3EE); box-shadow: 0 0 8px rgba(52, 211, 153, 0.35); }
.cr-verdict-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  margin-top: 0.15rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.cr-verdict-pill.allow { background: rgba(52, 211, 153, 0.15); color: #34D399; box-shadow: 0 0 18px rgba(52, 211, 153, 0.25); border: 1px solid rgba(52, 211, 153, 0.4); }
.cr-verdict-pill.hold { background: rgba(251, 191, 36, 0.15); color: #FBBF24; box-shadow: 0 0 18px rgba(251, 191, 36, 0.25); border: 1px solid rgba(251, 191, 36, 0.4); }
.cr-verdict-pill.block { background: rgba(244, 114, 182, 0.15); color: #F472B6; box-shadow: 0 0 18px rgba(244, 114, 182, 0.3); border: 1px solid rgba(244, 114, 182, 0.45); }

.cr-workflow {
  margin-top: 0.65rem;
  padding: 0.55rem 0.35rem 0.35rem;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}
.cr-flow {
  list-style: none;
  margin: 0.45rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.15rem;
}
.cr-flow li {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 600;
}
.cr-flow .dot {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px currentColor;
}
.cr-flow .c1 { background: #60A5FA; color: #60A5FA; }
.cr-flow .c2 { background: #22D3EE; color: #22D3EE; }
.cr-flow .c3 { background: #A78BFA; color: #A78BFA; }
.cr-flow .c4 { background: #FBBF24; color: #FBBF24; }
.cr-flow .c5 { background: #F472B6; color: #F472B6; }
.cr-flow .c6 { background: #34D399; color: #34D399; }
.cr-flow .arr {
  width: 14px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(148,163,184,0.5), transparent);
  margin: 0 0.15rem;
  position: relative;
}
.cr-flow .arr::after {
  content: "";
  position: absolute;
  right: -1px; top: -2px;
  border: 3px solid transparent;
  border-left-color: rgba(148,163,184,0.55);
}

.cr-log-panel {
  margin-top: 0.55rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  padding: 0.45rem 0.6rem 0.5rem;
}
.cr-log {
  margin-top: 0.3rem;
  max-height: 4.8rem;
  overflow: hidden;
}
.cr-log-line {
  font-size: 0.62rem;
  line-height: 1.45;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0.1rem 0;
  border-bottom: 1px solid rgba(148,163,184,0.06);
}
.cr-log-line .t { color: #64748B; margin-right: 0.35rem; }
.cr-log-line .a { color: #CBD5E1; }
.cr-log-line .p { color: #67e8f9; margin-left: 0.35rem; }
.cr-log-line .c { color: #A78BFA; margin-left: 0.35rem; }
.cr-log-line .v { margin-left: 0.4rem; font-weight: 800; letter-spacing: 0.06em; }
.cr-log-line .v.allow { color: #34D399; }
.cr-log-line .v.hold { color: #FBBF24; }
.cr-log-line .v.block { color: #F472B6; }

.viz-caption { margin: 0.75rem 0 0; text-align: center; }

@media (max-width: 960px) {
  .cr-main { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .control-room.hero-viz { padding: 0.55rem 0.6rem 0.65rem; }
  .cr-main { grid-template-columns: 1fr; gap: 0.5rem; }
  .cr-graph-wrap { min-height: 280px; height: auto; }
  .cr-graph-wrap #cr-canvas {
    min-height: 260px;
    aspect-ratio: 5 / 4;
    height: auto !important;
    flex: 0 0 auto;
  }
  .cr-chrome-compact .cr-title { max-width: 48vw; font-size: 0.55rem; }
  .cr-workflow, .cr-log-panel { display: none; }
  .cr-counters-slim { font-size: 0.55rem; gap: 0.35rem 0.5rem; }
  .cr-action-title { font-size: 0.9rem; }
  .cr-active { padding: 0.55rem 0.65rem; }
  .cr-metric:nth-child(n+3) { display: none; } /* confidence only on desktop */
  .cr-metric { grid-template-columns: 6rem 1fr; }
  #cr-wave { height: 44px; }
  .cr-chrome .cr-meta { display: none; }
  .viz-caption { display: none; }
}
@media (max-width: 390px) {
  .cr-active { padding: 0.5rem 0.6rem; }
}



/* In-customer story panel extras */
.cr-contract {
  display: block;
  margin-top: 0.2rem;
  color: #E2E8F0;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}
.cr-clause-row .cr-clause {
  display: block;
  margin-top: 0.15rem;
}
.cr-pilot-note {
  margin: 0.5rem 0 0;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
}
.cr-flow li.is-active {
  color: #E8EEF7;
}
.cr-flow li.is-active .dot {
  box-shadow: 0 0 12px currentColor;
  transform: scale(1.25);
}
.cr-flow li.is-done {
  color: rgba(148, 163, 184, 0.7);
}
.viz-caption .viz-pilot {
  display: inline;
  color: #67e8f9;
}
.cr-meta {
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}
@media (max-width: 720px) {
  .cr-chrome .cr-meta { display: inline; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* iPhone Safari growth-loop guards */
.hero-viz-wrap,
.control-room.hero-viz,
.cr-main,
.cr-graph-wrap,
.cr-active {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.hero-viz-wrap {
  width: 100%;
  overflow: hidden;
}
.control-room.hero-viz {
  width: 100%;
  overflow: hidden;
}
.cr-graph-wrap {
  width: 100%;
  overflow: hidden;
}
#cr-wave {
  display: block;
  width: 100% !important;
  max-width: 100%;
  height: 56px !important;
  min-width: 0;
}
.hero-grid > * { min-width: 0; max-width: 100%; }
.hero-copy h1 { overflow-wrap: anywhere; word-break: break-word; }

/* —— Sections —— */
.section {
  padding: 4rem 0;
  border-top: 1px solid transparent;
}
.section + .section { border-top-color: var(--line); }
.eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
}
.section h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.you { color: var(--muted); font-size: 0.95rem; margin-top: 1.5rem; }

.works-band { padding: 2rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.works-label { margin: 0 0 0.75rem; color: var(--muted); font-size: 0.85rem; text-align: center; }
.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}
.chip {
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  background: rgba(17, 24, 39, 0.75);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--cyan);
  letter-spacing: 0.01em;
}
.nominative { text-align: center; max-width: 70ch; margin: 0 auto; }

.problem-grid, .icon-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}
.icon-grid { grid-template-columns: repeat(2, 1fr); }
.glass-card {
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(17, 24, 39, 0.55);
  backdrop-filter: blur(8px);
}
.glass-card h3, .icon-card strong {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}
.glass-card p, .icon-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.steps-visual {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.step-card {
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(26, 36, 56, 0.5), rgba(11, 18, 32, 0.4));
}
.step-icon {
  color: var(--cyan);
  margin-bottom: 0.75rem;
}
.step-card strong { display: block; margin-bottom: 0.4rem; font-size: 0.95rem; }
.step-card p { margin: 0; color: var(--muted); font-size: 0.88rem; }

/* Proof */
.proof-layout {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 1.5rem;
  align-items: start;
  margin-top: 1.5rem;
}
.browser-frame {
  border-radius: 12px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: #0a0f1a;
  box-shadow: var(--shadow);
}
.browser-chrome {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.75rem;
  background: #151c2c;
  border-bottom: 1px solid var(--line);
}
.browser-chrome .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #334155;
}
.browser-chrome .dot:nth-child(1) { background: #f87171; }
.browser-chrome .dot:nth-child(2) { background: #fbbf24; }
.browser-chrome .dot:nth-child(3) { background: #34d399; }
.browser-chrome .url {
  margin-inline-start: 0.5rem;
  flex: 1;
  font-size: 0.72rem;
  color: var(--muted);
  background: rgba(0,0,0,0.35);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
}
.browser-frame img { width: 100%; }
.proof-callouts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.proof-callouts li {
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(17, 24, 39, 0.55);
  color: var(--muted);
  font-size: 0.92rem;
}
.proof-callouts strong { color: var(--ink); display: block; margin-bottom: 0.25rem; }
.honesty { margin-top: 1.25rem; }

/* Form */
.request-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 2rem;
  align-items: start;
}
.checklist { margin: 1rem 0 0; padding-inline-start: 1.1rem; color: var(--muted); }
.checklist li { margin-bottom: 0.4rem; }
.card, .form-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(17, 24, 39, 0.75);
  padding: 1.5rem 1.6rem;
  box-shadow: var(--shadow);
}
.form-title { margin: 0 0 0.35rem; font-size: 1.15rem; }
.field {
  display: block;
  margin: 0.85rem 0 0.35rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
}
input[type="text"], input[type="email"], textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(11, 18, 32, 0.8);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.95rem;
}
input:focus, textarea:focus { border-color: rgba(34, 211, 238, 0.5); }
.fieldset {
  margin: 1rem 0 0;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.fieldset legend { padding: 0 0.35rem; color: var(--muted); font-size: 0.85rem; }
.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.tool {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.85rem;
  cursor: pointer;
  background: rgba(11, 18, 32, 0.5);
}
.tool input { accent-color: var(--cyan); }
.consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  margin: 1rem 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.consent input { margin-top: 0.2rem; accent-color: var(--cyan); }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.submit { width: 100%; margin-top: 0.5rem; }

/* FAQ */
.faq { margin-top: 1.25rem; }
.faq-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 0.65rem;
  background: rgba(17, 24, 39, 0.45);
  padding: 0;
}
.faq-item summary {
  cursor: pointer;
  padding: 1rem 1.15rem;
  font-weight: 600;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--cyan);
  font-weight: 400;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p {
  margin: 0;
  padding: 0 1.15rem 1.1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 3rem;
  background: #080d16;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
}
.footer-logo { height: 28px; width: auto; margin-bottom: 0.75rem; }
.site-footer p { margin: 0.25rem 0; color: var(--muted); font-size: 0.9rem; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--cyan); }

/* Reveal — visible by default if JS fails */
.reveal { opacity: 1; transform: none; }
html.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; transition: none; }
}

/* —— Scan / legal shared chrome helpers —— */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}
.legal-body { padding: 2rem 0 4rem; }
.legal-body h1 { font-size: 1.75rem; }
.legal-body h2 { margin-top: 2rem; font-size: 1.2rem; }
.legal-body p, .legal-body li { color: var(--muted); }

/* Clean list used elsewhere */
.clean { color: var(--muted); }

/* Sticky CTA (scan page may use) */
.sticky-cta {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 40;
}

/* —— Responsive —— */
@media (max-width: 960px) {
  .hero-grid, .proof-layout, .request-grid, .footer-grid {
    grid-template-columns: 1fr;
  }
  .steps-visual { grid-template-columns: 1fr 1fr; }
  .problem-grid { grid-template-columns: 1fr; }
  .icon-grid { grid-template-columns: 1fr; }
  .viz-stage { grid-template-columns: 1fr; }
  .viz-flow { flex-direction: row; min-height: auto; }
  .viz-flow-line { width: 24px; height: 2px; min-height: 0; background: linear-gradient(90deg, transparent, var(--cyan), transparent); }
}

@media (max-width: 720px) {
  .brand-logo { height: 30px; }
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem 1.25rem 1.25rem;
    background: rgba(11, 18, 32, 0.96);
    border-bottom: 1px solid var(--line);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a {
    padding: 0.75rem 0.25rem;
    border-bottom: 1px solid var(--line);
  }
  .site-nav .nav-cta {
    margin: 0.75rem 0 0;
    text-align: center;
    border-bottom: none;
  }
  .steps-visual { grid-template-columns: 1fr; }
  .hero-wide { padding-top: 2rem; }
  .wrap, .wrap-xl, .narrow { padding-inline: 1rem; }
  .site-header-inner { padding-inline: 1rem; }
  .control-room.hero-viz { min-height: 0; }
  .viz-stage { min-height: 0; gap: 0.5rem; }
  .viz-shield-mark { width: 44px; height: 50px; }
  .viz-call { min-height: 0; }
}


@media (max-width: 390px) {
  .hero-copy h1 { font-size: 1.55rem; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn-primary,
  .hero-cta .btn-ghost {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .cr-demo-badge { font-size: 0.55rem; letter-spacing: 0.04em; padding: 0.2rem 0.45rem; }
}

/* —— Scan page + shared utilities (preserve /scan polish) —— */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.1rem;
  color: var(--cyan) !important;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: transparent;
}
.btn-secondary:hover {
  background: rgba(34, 211, 238, 0.08);
  border-color: var(--cyan);
}
.ok { color: var(--ok); }
.err { color: var(--block); }
.note.ok { color: #86efac; }
.badge[hidden] { display: none !important; }

.scan-page { padding-bottom: 2rem; }
.scan-page .nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0 0.5rem;
}
.nav-link { color: var(--cyan); text-decoration: none; font-size: 0.95rem; font-weight: 500; }
.nav-link:hover { text-decoration: underline; }
.scan-hero { margin: 1.25rem 0; }
.scan-hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.privacy-callout {
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.06);
  padding: 0.85rem 1rem;
  border-radius: 10px;
}
.scan-h2 { margin-top: 1.5rem; }
.scan-actions { margin-top: 1.25rem; }
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
}
@media (max-width: 640px) {
  .grid-2 { grid-template-columns: 1fr; }
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 1.25rem;
}
.stat {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  text-align: center;
}
.stat-val { font-size: 1.6rem; font-weight: 700; color: #fff; }
.stat-label { font-size: 0.8rem; color: var(--muted); margin-top: 0.2rem; }
.disclaimer-banner {
  border-left: 3px solid var(--cyan);
  padding-left: 0.85rem;
}
.finding {
  margin-top: 0.85rem;
}
.finding-meta { display: flex; gap: 0.75rem; align-items: center; margin-bottom: 0.35rem; flex-wrap: wrap; }
.sev-pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.25);
  color: #e2e8f0;
}
.finding.sev-high .sev-pill { background: rgba(248, 113, 113, 0.25); color: #fecaca; }
.finding.sev-medium .sev-pill { background: rgba(251, 191, 36, 0.22); color: #fde68a; }
.finding.sev-low .sev-pill { background: rgba(34, 211, 238, 0.18); color: #a5f3fc; }
.cta-card { margin-top: 1.5rem; border-color: rgba(59, 130, 246, 0.45); }
.linkish {
  background: none;
  border: none;
  color: var(--cyan);
  cursor: pointer;
  padding: 0;
  font: inherit;
  text-decoration: underline;
}
.footer-note { margin: 2rem 0 3rem; }

/* Scan form fields (label.field with nested span) */
label.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0.65rem 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
}
label.field > span { font-size: 0.9rem; color: var(--muted); }
label.field input[type="file"],
label.field input[type="text"],
label.field input[type="email"],
label.field input[type="number"] {
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: #fff;
  padding: 0.55rem 0.7rem;
  font: inherit;
  width: 100%;
}
.check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  margin: 1rem 0;
  font-size: 0.9rem;
  color: var(--muted);
}
.check input { margin-top: 0.2rem; accent-color: var(--cyan); }
.tool-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.5rem 0 0.75rem;
}
.tool-grid .tool { margin: 0; }

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  color: #a5f3fc;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  margin: 0 0 1rem;
}
.trust-panel { margin-bottom: 1.25rem; }
.trust-title { font-size: 1.05rem; margin-top: 0; }
.trust-list li { margin: 0.45rem 0; color: var(--muted); }
.dropzone {
  border: 1.5px dashed rgba(34, 211, 238, 0.45);
  border-radius: 12px;
  padding: 1.25rem 1rem;
  text-align: center;
  background: rgba(34, 211, 238, 0.04);
  cursor: pointer;
  position: relative;
  margin: 0.5rem 0 0.75rem;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone:focus, .dropzone.dragover {
  border-color: #22d3ee;
  background: rgba(34, 211, 238, 0.1);
  outline: none;
}
.dropzone-sm { padding: 0.85rem; }
.dropzone-title { margin: 0 0 0.25rem; font-weight: 600; color: #e2e8f0; }
.file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.linkish-inline { color: var(--cyan); text-decoration: underline; }
.howto { margin: 0.75rem 0 1rem; color: var(--muted); }
.howto summary { cursor: pointer; color: var(--cyan); }
.howto-steps { margin: 0.5rem 0 0 1.1rem; color: #cbd5e1; }
.howto-steps li { margin: 0.35rem 0; }
.progress { margin: 0.75rem 0; }
.progress-bar {
  height: 6px;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #22d3ee, #3b82f6);
  transition: width 0.45s ease;
}
.exposure-card {
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  margin: 1rem 0;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
}
.exposure-level { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.65rem; }
.exposure-label { font-size: 0.85rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.exposure-value { font-size: 1.75rem; font-weight: 800; }
.exp-high .exposure-value { color: #fecaca; }
.exp-medium .exposure-value { color: #fde68a; }
.exp-low .exposure-value { color: #a5f3fc; }
.exposure-why { margin: 0.55rem 0 0; color: #e2e8f0; }
.findings-heading { margin: 1.5rem 0 0.75rem; }
.finding-steps, .finding-qs { margin: 0.35rem 0 0.75rem 1.1rem; }
.finding-steps li, .finding-qs li { margin: 0.3rem 0; color: var(--muted); }
.next-steps { margin: 0.5rem 0 0 1.1rem; }
.next-steps li { margin: 0.65rem 0; color: var(--muted); }
.report-actions { margin-top: 1.25rem; }
.scan-sample-row { margin: 0.5rem 0 0.25rem; }
.legal-main { padding: 1.5rem 0 3rem; }
.legal-main .card { margin-top: 1rem; }
.legal-main h1 { margin: 1rem 0 0.5rem; }
textarea { min-height: 90px; resize: vertical; }

/* ===== DOM diagram (no canvas text) ===== */
.cr-chrome-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  flex-wrap: wrap;
}
.cr-chrome-compact .cr-counters-slim {
  position: static;
  max-width: none;
  background: transparent;
  backdrop-filter: none;
  padding: 0;
  gap: 0.45rem 0.7rem;
  font-size: 0.68rem;
}
.cr-diagram {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}
.cr-diagram-body {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: stretch;
  min-width: 0;
  min-height: 320px;
}
.cr-bound {
  position: relative;
  z-index: 1;
  border: 1.5px solid rgba(34, 211, 238, 0.55);
  border-radius: 14px;
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.12), inset 0 0 0 1px rgba(59, 130, 246, 0.15);
  background: rgba(8, 12, 22, 0.45);
  padding: 0.55rem 0.6rem 0.7rem;
  min-width: 0;
  overflow: hidden;
}
.cr-bound-title {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--cyan);
  margin: 0 0 0.55rem;
  padding: 0.2rem 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cr-bound-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 0.55rem 0.75rem;
  align-items: start;
  min-width: 0;
}
.cr-col {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}
.cr-col-label {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.cr-node, .cr-shield, .cr-card {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.cr-node {
  padding: 0.35rem 0.45rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(11, 18, 32, 0.65);
}
.cr-node.is-active {
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.2);
  background: rgba(34, 211, 238, 0.08);
}
.cr-node-label {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.75rem;
  font-weight: 700;
  color: #E8EEF7;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}
.cr-orb {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: 0 0 10px currentColor;
  background: currentColor;
}
.c-cyan { color: #22D3EE; }
.c-violet { color: #A78BFA; }
.c-amber { color: #FBBF24; }
.c-orange { color: #FF7A59; }
.c-green { color: #4ADE80; }
.c-sky { color: #38BDF8; }
.c-pink { color: #F472B6; }

.cr-shield {
  flex-direction: column;
  text-align: center;
  gap: 0.35rem;
  padding: 0.5rem 0.4rem;
  border-radius: 12px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: radial-gradient(circle at 50% 30%, rgba(34, 211, 238, 0.15), transparent 65%), rgba(11, 18, 32, 0.7);
}
.cr-shield.is-active {
  box-shadow: 0 0 22px rgba(34, 211, 238, 0.35);
  border-color: rgba(34, 211, 238, 0.7);
}
.cr-shield .cr-node-label { text-align: center; }

.cr-contracts {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-top: 0.35rem;
  min-width: 0;
}
.cr-card {
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(11, 18, 32, 0.8);
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 600;
  color: #E2E8F0;
}
.cr-card span { min-width: 0; overflow-wrap: anywhere; }
.cr-card.is-match {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.3);
  background: rgba(34, 211, 238, 0.12);
}

.cr-outside {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 7.5rem;
  max-width: 9.5rem;
  padding: 0.45rem 0.4rem;
  border-radius: 12px;
  border: 1px dashed rgba(148, 163, 184, 0.35);
  background: rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
}
.cr-outside-nodes {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.cr-node-out { opacity: 0.92; }
.cr-node-out.is-blocked-target {
  opacity: 0.45;
}

.cr-edges {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  overflow: visible;
}
.cr-edges path {
  fill: none;
  stroke: rgba(148, 163, 184, 0.28);
  stroke-width: 1.5;
}
.cr-edges path.is-hot {
  stroke-width: 2.2;
}
.cr-edges path.allow { stroke: #34D399; }
.cr-edges path.hold { stroke: #FBBF24; }
.cr-edges path.block { stroke: #F472B6; }
.cr-edges .cr-pulse {
  fill: #22D3EE;
  filter: drop-shadow(0 0 6px #22D3EE);
}

.cr-step-caption {
  margin: 0;
  text-align: center;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #F8FAFC;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(34, 211, 238, 0.3);
  background: rgba(7, 11, 20, 0.85);
  min-width: 0;
}

/* Kill old absolute counters / canvas graph wrap behaviors */
.cr-graph-wrap { display: none !important; }
#cr-canvas { display: none !important; }

.cr-main {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(220px, 0.85fr);
  gap: 0.75rem;
  align-items: start;
  min-width: 0;
}
.cr-active { min-width: 0; max-width: 100%; }

@media (max-width: 960px) {
  .cr-main { grid-template-columns: 1fr; }
  .cr-diagram-body {
    grid-template-columns: 1fr;
  }
  .cr-outside {
    max-width: none;
    width: 100%;
    order: -1;
  }
  .cr-outside-nodes {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .cr-outside-nodes .cr-node { flex: 1 1 30%; }
}

@media (max-width: 480px) {
  .cr-bound-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .cr-col-agents,
  .cr-col-systems {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .cr-col-agents .cr-col-label,
  .cr-col-systems .cr-col-label,
  .cr-col-checkpoint .cr-col-label { width: 100%; }
  .cr-col-agents .cr-node,
  .cr-col-systems .cr-node { flex: 1 1 42%; }
  .cr-chrome-compact .cr-counters-slim {
    order: 3;
    width: 100%;
    justify-content: flex-start;
  }
  .cr-step-caption { font-size: 0.78rem; }
  .cr-node-label { font-size: 0.72rem; }
}

/* ===== Inside-the-engine hero (cumulative stages) ===== */
.hero-viz-wrap {
  position: relative;
  overflow: hidden;
  max-width: 100%;
  min-width: 0;
  width: 100%;
}
.control-room.hero-viz.is-engine,
.control-room.hero-viz {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  height: 560px;
  max-height: 560px;
  padding: 0.75rem 0.85rem 0.85rem;
  background:
    radial-gradient(120% 80% at 8% 0%, rgba(34, 211, 238, 0.1), transparent 50%),
    radial-gradient(90% 60% at 100% 100%, rgba(59, 130, 246, 0.08), transparent 45%),
    linear-gradient(180deg, #0B1220 0%, #070B14 100%);
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 14px;
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.06) inset,
    0 18px 50px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}
.cr-chrome-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  min-width: 0;
  flex: 0 0 auto;
}
.cr-chrome-left {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}
.cr-live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22D3EE;
  box-shadow: 0 0 10px #22D3EE;
  animation: engPulse 1.6s ease-in-out infinite;
  flex: 0 0 auto;
}
@keyframes engPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
.cr-title {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #E2E8F0;
}
.cr-demo-badge {
  font-size: 0.68rem;
  line-height: 1.3;
  color: #94A3B8;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.eng-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  min-width: 0;
  flex: 0 0 auto;
}
.eng-rail {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  min-width: 0;
  flex: 1 1 auto;
}
.eng-rail li {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #94A3B8;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(15, 23, 42, 0.55);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.eng-rail li:hover { border-color: rgba(34, 211, 238, 0.45); color: #E2E8F0; }
.eng-rail li.is-done {
  color: #67E8F9;
  border-color: rgba(34, 211, 238, 0.35);
}
.eng-rail li.is-active {
  color: #0B1220;
  background: linear-gradient(90deg, #22D3EE, #3B82F6);
  border-color: transparent;
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.45);
}
.eng-rail-num { font-family: ui-monospace, Menlo, monospace; opacity: 0.85; }
.eng-rail-name { white-space: nowrap; }

.eng-controls {
  display: flex;
  gap: 0.3rem;
  flex: 0 0 auto;
}
.eng-ctrl {
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: rgba(7, 11, 20, 0.85);
  color: #E2E8F0;
  font-size: 0.85rem;
  cursor: pointer;
  line-height: 1;
}
.eng-ctrl:hover {
  border-color: #22D3EE;
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.35);
}
.eng-ctrl[aria-pressed="true"] {
  background: rgba(34, 211, 238, 0.2);
  color: #22D3EE;
}

.eng-scenario-tag {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #CBD5E1;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.7);
  flex: 0 0 auto;
}
.eng-scenario-tag.is-block { color: #FBCFE8; border-color: rgba(244, 114, 182, 0.45); }
.eng-scenario-tag.is-hold { color: #FDE68A; border-color: rgba(251, 191, 36, 0.45); }
.eng-scenario-tag.is-allow { color: #A7F3D0; border-color: rgba(52, 211, 153, 0.45); }

.eng-stage {
  position: relative;
  min-width: 0;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.eng-stack {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1 1 auto;
  padding-right: 0.15rem;
  scrollbar-width: thin;
}
.eng-connector {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  overflow: visible;
}
.eng-conn-path {
  stroke: #22D3EE;
  stroke-width: 1.6;
  stroke-dasharray: 5 4;
  filter: drop-shadow(0 0 4px #22D3EE);
  animation: engDash 0.9s linear infinite;
}
@keyframes engDash {
  to { stroke-dashoffset: -18; }
}

.eng-step {
  min-width: 0;
  max-width: 100%;
}
.eng-step.is-done {
  flex: 0 0 auto;
}
.eng-step-summary {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 0.4rem;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(34, 211, 238, 0.2);
  background: rgba(15, 23, 42, 0.65);
  color: #CBD5E1;
  cursor: pointer;
  font: inherit;
  min-width: 0;
}
.eng-step-summary:hover {
  border-color: rgba(34, 211, 238, 0.45);
}
.eng-step-check {
  width: 1.1rem; height: 1.1rem;
  border-radius: 50%;
  background: #34D399;
  color: #052e1a;
  font-size: 0.7rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.45);
  flex: 0 0 auto;
}
.eng-step-name {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #67E8F9;
  white-space: nowrap;
}
.eng-step-preview {
  font-size: 0.72rem;
  color: #94A3B8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.eng-step.is-open {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.eng-step-body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.7rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  background:
    linear-gradient(180deg, rgba(34, 211, 238, 0.07), transparent 40%),
    rgba(7, 11, 20, 0.92);
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.08) inset,
    0 0 28px rgba(34, 211, 238, 0.12);
  animation: engOpen 0.35s ease;
}
@keyframes engOpen {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.eng-panel-label {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #67E8F9;
}
.eng-human {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  color: #F8FAFC;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.eng-mono-sec {
  display: block;
  margin-top: 0.2rem;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.68rem;
  line-height: 1.35;
  color: #64748B;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
}
.eng-agent-chip {
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 700;
  color: #0B1220;
  background: #22D3EE;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.4);
}
.eng-action-card {
  border: 1px solid rgba(34, 211, 238, 0.3);
  background: rgba(5, 8, 15, 0.9);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}
.eng-action-card .eng-mono-sec { color: #94A3B8; margin: 0; }

.eng-slots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  min-width: 0;
}
.eng-slot {
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 10px;
  padding: 0.5rem 0.6rem;
  background: rgba(15, 23, 42, 0.75);
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  transition: box-shadow 0.25s, border-color 0.25s;
}
.eng-slot:hover {
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.2);
}
.eng-slot-k {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #67E8F9;
  margin-bottom: 0.15rem;
}
.eng-slot-v {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  color: #F1F5F9;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.eng-contract {
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 10px;
  background: rgba(5, 8, 15, 0.9);
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
}
.eng-contract-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: #CBD5E1;
  padding: 0.4rem 0.65rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  overflow-wrap: anywhere;
}
.eng-contract-body {
  max-height: 160px;
  overflow: auto;
  padding: 0.5rem 0.65rem;
  min-width: 0;
}
.eng-clause-line {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #94A3B8;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.eng-clause-line.muted { opacity: 0.7; }
.eng-clause-line.is-hit {
  color: #F8FAFC;
  background: rgba(34, 211, 238, 0.12);
  border-left: 3px solid #22D3EE;
  padding: 0.45rem 0.55rem;
  border-radius: 0 8px 8px 0;
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.15);
}
.eng-clause-sec {
  font-family: ui-monospace, Menlo, monospace;
  font-weight: 700;
  color: #22D3EE;
  margin-right: 0.25rem;
}
.eng-hl {
  background: rgba(251, 191, 36, 0.35);
  color: #FEF3C7;
  padding: 0 0.15rem;
  border-radius: 3px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.eng-match-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.eng-chip {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.65rem;
  color: #E2E8F0;
  border: 1px dashed rgba(34, 211, 238, 0.4);
  border-radius: 6px;
  padding: 0.18rem 0.4rem;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.eng-checks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.eng-check {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.28s ease, transform 0.28s ease;
  font-size: 0.82rem;
  color: #E2E8F0;
  min-width: 0;
}
.eng-check.is-shown { opacity: 1; transform: none; }
.eng-check-mark {
  width: 1.25rem; height: 1.25rem; border-radius: 50%;
  margin-top: 0.05rem; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 800;
  border: 2px solid #64748B;
  color: #0B1220;
}
.eng-check.is-pass .eng-check-mark {
  background: #34D399;
  border-color: #34D399;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.55);
}
.eng-check.is-fail .eng-check-mark {
  background: #F472B6;
  border-color: #F472B6;
  box-shadow: 0 0 10px rgba(244, 114, 182, 0.5);
}
.eng-check-body { min-width: 0; }
.eng-check-label {
  display: block;
  font-weight: 600;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.eng-gauge {
  height: 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  overflow: hidden;
  margin-top: 0.25rem;
}
.eng-gauge-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  transition: width 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  background: #34D399;
}
.eng-gauge-fill.is-block { background: linear-gradient(90deg, #F472B6, #FB7185); }
.eng-gauge-fill.is-hold { background: linear-gradient(90deg, #FBBF24, #F59E0B); }
.eng-gauge-fill.is-allow { background: linear-gradient(90deg, #34D399, #10B981); }
.eng-gauge-label {
  font-size: 0.7rem;
  color: #94A3B8;
  font-family: ui-monospace, Menlo, monospace;
}

.eng-verdict {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.1;
  color: #F8FAFC;
  transform: scale(0.7);
  opacity: 0;
  transform-origin: left center;
  transition: transform 0.45s cubic-bezier(0.22, 1.4, 0.36, 1), opacity 0.3s ease;
}
.eng-verdict.is-stamped {
  transform: scale(1);
  opacity: 1;
}
.eng-verdict.is-block { color: #F472B6; text-shadow: 0 0 28px rgba(244, 114, 182, 0.55); }
.eng-verdict.is-hold { color: #FBBF24; text-shadow: 0 0 28px rgba(251, 191, 36, 0.5); font-size: 1.55rem; }
.eng-verdict.is-allow { color: #34D399; text-shadow: 0 0 28px rgba(52, 211, 153, 0.5); }
.eng-decide-human { font-size: 0.95rem; }
.eng-pilot-tag {
  margin: 0;
  font-size: 0.7rem;
  color: #94A3B8;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 8px;
  padding: 0.3rem 0.5rem;
  align-self: flex-start;
}

.eng-evidence-block {
  margin: 0;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: #05080f;
  color: #A5F3FC;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.68rem;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-height: 150px;
  overflow: auto;
  min-height: 4.5rem;
}
.eng-report-count {
  margin: 0;
  font-size: 0.75rem;
  color: #CBD5E1;
}
.eng-report-count b { color: #22D3EE; }

@media (max-width: 960px) {
  .control-room.hero-viz {
    height: auto;
    max-height: none;
    min-height: 0;
  }
  .eng-stage {
    min-height: 0;
    overflow: visible;
  }
  .eng-stack {
    overflow: visible;
  }
  .eng-step.is-open {
    flex: 0 1 auto;
  }
  .eng-step-body {
    overflow: visible;
    max-height: none;
  }
  .eng-contract-body { max-height: 200px; }
}
@media (max-width: 720px) {
  .control-room.hero-viz {
    padding: 0.6rem;
    min-height: 0;
  }
  .eng-slots { grid-template-columns: 1fr; }
  .eng-verdict { font-size: 1.7rem; }
  .eng-verdict.is-hold { font-size: 1.25rem; }
  .eng-rail li { font-size: 0.62rem; padding: 0.2rem 0.38rem; }
  .cr-demo-badge { font-size: 0.6rem; }
  .cr-chrome-compact { flex-direction: column; align-items: flex-start; }
  .eng-human { font-size: 0.88rem; }
  .eng-step-body { padding: 0.55rem 0.6rem; }
  .eng-contract-body { max-height: 140px; }
}
@media (prefers-reduced-motion: reduce) {
  .eng-step-body, .eng-check, .eng-gauge-fill, .eng-verdict, .cr-live-dot, .eng-conn-path {
    animation: none !important;
    transition: none !important;
  }
  .eng-verdict { opacity: 1; transform: none; }
  .eng-check { opacity: 1; transform: none; }
}

/* Contain long nowrap summaries so they don't inflate scrollWidth */
.eng-step-summary,
.eng-step-preview,
.eng-topbar,
.cr-chrome-compact,
.cr-demo-badge {
  max-width: 100%;
  overflow: hidden;
}
.eng-step-summary {
  grid-template-columns: auto auto minmax(0, 1fr);
}
.control-room.hero-viz {
  overflow-x: hidden;
}
@media (max-width: 960px) {
  .control-room.hero-viz.is-engine,
  .control-room.hero-viz {
    height: auto !important;
    max-height: none !important;
  }
}
