/* =========================================================
   Causal Fields — control-room UI
   3 base colors: deep-space bg, cyan primary, slate neutrals
   + functional status colors (safe/risky/blocked)
   ========================================================= */

:root {
  --bg: #05070d;
  --bg-2: #080b14;
  --panel: #0c1120;
  --panel-2: #0f1626;
  --line: rgba(120, 150, 200, 0.12);
  --line-strong: rgba(120, 150, 200, 0.22);

  --text: #e7ecf6;
  --muted: #93a1bd;
  --faint: #64728f;

  --cyan: #35e6d0;
  --cyan-dim: #16b8a6;
  --cyan-glow: rgba(53, 230, 208, 0.35);

  --safe: #3ee08f;
  --risky: #f5b544;
  --blocked: #ff5470;

  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 1140px;

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

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

h1,
h2,
h3 {
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0;
  font-weight: 600;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Background field ---------- */
#field-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(120, 150, 200, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 150, 200, 0.04) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 78%);
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 0%, rgba(53, 230, 208, 0.08), transparent 55%),
    radial-gradient(ellipse at 50% 120%, rgba(6, 9, 20, 0.9), transparent 60%);
}

/* keep content above the field */
.nav,
main,
.footer {
  position: relative;
  z-index: 2;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
  --pad-y: 12px;
  --pad-x: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: var(--pad-y) var(--pad-x);
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 550;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease,
    border-color 0.2s ease;
  font-family: inherit;
  white-space: nowrap;
}
.btn--sm {
  --pad-y: 9px;
  --pad-x: 16px;
  font-size: 0.85rem;
}
.btn--full {
  width: 100%;
}
.btn--primary {
  background: var(--cyan);
  color: #04120f;
  box-shadow: 0 0 0 1px rgba(53, 230, 208, 0.4), 0 12px 40px -12px var(--cyan-glow);
}
.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(53, 230, 208, 0.6), 0 16px 50px -12px var(--cyan-glow);
}
.btn--ghost {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--line-strong);
  color: var(--text);
}
.btn--ghost:hover {
  border-color: var(--cyan-dim);
  color: #fff;
}

.btn__spinner {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(4, 18, 15, 0.35);
  border-top-color: #04120f;
  display: none;
  animation: spin 0.7s linear infinite;
}
.btn.is-loading .btn__spinner {
  display: inline-block;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 14px 0;
  backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(5, 7, 13, 0.85), rgba(5, 7, 13, 0.5));
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.brand__mark {
  position: relative;
  width: 22px;
  height: 22px;
  display: inline-block;
}
.brand__node {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan-glow);
}
.brand__node:nth-child(1) {
  top: 0;
  left: 0;
}
.brand__node:nth-child(2) {
  bottom: 0;
  left: 2px;
  background: var(--cyan-dim);
}
.brand__node:nth-child(3) {
  top: 5px;
  right: 0;
}
.brand__text {
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: 0.18em;
}
.nav__links {
  display: flex;
  gap: 26px;
  font-size: 0.9rem;
  color: var(--muted);
}
.nav__links a:hover {
  color: var(--text);
}
.nav-mobile-only,
.nav-menu-toggle {
  display: none;
}
.nav__actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.nav-console {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}
.nav-console:hover { color: var(--cyan); }
.nav-menu-toggle {
  width: 40px;
  height: 40px;
  padding: 0;
  place-content: center;
  gap: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(8, 11, 20, 0.92);
  cursor: pointer;
}
.nav-menu-toggle span {
  display: block;
  width: 17px;
  height: 1px;
  background: var(--text);
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.nav-menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}
.nav-menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}
.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  overflow: hidden;
}
.lang-toggle button {
  padding: 6px 12px;
  background: transparent;
  border: 0;
  color: var(--faint);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s, background 0.15s;
}
.lang-toggle button.is-active {
  color: #04120f;
  background: var(--cyan);
}

/* ---------- Shared section ---------- */
.section {
  padding: 108px 0;
}
.section--tight {
  padding-top: 40px;
}
.section__head {
  max-width: 720px;
  margin: 0 auto 54px;
  text-align: center;
}
.kicker {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 16px;
}
.section__title {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  text-wrap: balance;
}
.section__lead {
  margin-top: 18px;
  color: var(--muted);
  font-size: 1.05rem;
  text-wrap: pretty;
}

/* ---------- Hero ---------- */
.hero {
  padding: 96px 0 60px;
  text-align: center;
}
.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(53, 230, 208, 0.05);
  font-size: 0.8rem;
  color: var(--muted);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--safe);
  box-shadow: 0 0 0 0 rgba(62, 224, 143, 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(62, 224, 143, 0.5);
  }
  70% {
    box-shadow: 0 0 0 9px rgba(62, 224, 143, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(62, 224, 143, 0);
  }
}
.eyebrow {
  margin-top: 28px;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.hero__title {
  margin-top: 20px;
  font-size: clamp(2.2rem, 6vw, 4rem);
  letter-spacing: -0.03em;
  text-wrap: balance;
  background: linear-gradient(180deg, #ffffff 30%, #a9b8d6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__sub {
  margin-top: 24px;
  max-width: 640px;
  color: var(--muted);
  font-size: 1.12rem;
  text-wrap: pretty;
}
.hero__actions {
  margin-top: 34px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}
.hero__stats {
  margin: 56px 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  max-width: 980px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.hero__stats > div {
  padding: 20px 24px;
  border-right: 1px solid var(--line);
  text-align: left;
}
.hero__stats > div:last-child {
  border-right: 0;
}
.hero__stats dt {
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--cyan);
}
.hero__stats dd {
  margin: 6px 0 0;
  color: var(--faint);
  font-size: 0.8rem;
  line-height: 1.45;
}

/* ---------- Problem brief ---------- */
.problem-brief {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 11, 20, 0.72);
}
.problem-brief__inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-top: 18px;
  padding-bottom: 18px;
}
.problem-brief p {
  min-width: 0;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  column-gap: 10px;
  padding: 5px 24px;
}
.problem-brief p + p {
  border-left: 1px solid var(--line);
}
.problem-brief p > span {
  grid-row: 1 / 3;
  color: var(--cyan-dim);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}
.problem-brief strong {
  font-size: 0.88rem;
}
.problem-brief small {
  margin-top: 2px;
  color: var(--faint);
  font-size: 0.76rem;
  line-height: 1.45;
}

/* ---------- Cards ---------- */
.cards {
  display: grid;
  gap: 20px;
}
.cards--3 {
  grid-template-columns: repeat(3, 1fr);
}
.cards--4 {
  grid-template-columns: repeat(4, 1fr);
}
.card {
  position: relative;
  padding: 30px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 22, 38, 0.6), rgba(9, 12, 22, 0.6));
  backdrop-filter: blur(8px);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}
.card__index {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--cyan-dim);
  letter-spacing: 0.15em;
}
.card h3 {
  margin: 14px 0 10px;
  font-size: 1.18rem;
}
.card p {
  color: var(--muted);
  font-size: 0.96rem;
}
.card--use h3 {
  margin-top: 0;
}

/* ---------- Preflight ---------- */
.preflight {
  display: grid;
  grid-template-columns: minmax(260px, 0.62fr) minmax(0, 1.38fr);
  gap: 20px;
  align-items: start;
}
.preflight__panel {
  padding: 24px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 22, 38, 0.75), rgba(9, 12, 22, 0.75));
  backdrop-filter: blur(10px);
  position: sticky;
  top: 90px;
}
.pf-zone-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 22px;
}
.pf-zone-heading > span:first-child {
  flex: 0 0 auto;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  line-height: 1.5;
}
.pf-zone-heading div {
  min-width: 0;
}
.pf-zone-heading strong,
.pf-zone-heading small {
  display: block;
}
.pf-zone-heading strong {
  color: var(--text);
  font-size: 0.94rem;
}
.pf-zone-heading small {
  margin-top: 4px;
  color: var(--faint);
  font-size: 0.74rem;
  line-height: 1.4;
}
.panel-block {
  margin-bottom: 20px;
}
.panel-block--row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.field-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 10px;
}
.pf-input {
  width: 100%;
  resize: vertical;
  min-height: 76px;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: rgba(5, 7, 13, 0.7);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.5;
}
.pf-input:focus {
  outline: none;
  border-color: var(--cyan-dim);
  box-shadow: 0 0 0 3px rgba(53, 230, 208, 0.12);
}
.pf-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pf-example {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(5, 7, 13, 0.5);
  color: var(--muted);
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.pf-example:hover {
  color: var(--text);
  border-color: var(--cyan-dim);
}
.pf-example[data-tone="risky"]::before,
.pf-example[data-tone="blocked"]::before,
.pf-example[data-tone="safe"]::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: middle;
}
.pf-example[data-tone="safe"]::before {
  background: var(--safe);
}
.pf-example[data-tone="risky"]::before {
  background: var(--risky);
}
.pf-example[data-tone="blocked"]::before {
  background: var(--blocked);
}
.pf-select {
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: rgba(5, 7, 13, 0.7);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}
.pf-select:focus {
  outline: none;
  border-color: var(--cyan-dim);
}
.pf-hint {
  margin-top: 12px;
  color: var(--faint);
  font-size: 0.78rem;
  text-align: center;
}
.pf-hint[data-state="live"] { color: var(--safe); }
.pf-hint[data-state="fallback"] { color: var(--risky); }

/* Output console */
.preflight__output {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(6, 9, 18, 0.85);
  backdrop-filter: blur(10px);
  overflow: hidden;
  min-height: 460px;
  display: flex;
  flex-direction: column;
}
.console-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(12, 17, 32, 0.6);
}
.console-dots {
  display: inline-flex;
  gap: 6px;
}
.console-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-strong);
}
.console-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--faint);
  letter-spacing: 0.06em;
}
.console-safety {
  margin-left: auto;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-align: right;
}
.verdict-badge {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--faint);
}
.verdict-badge[data-state="safe"] {
  color: var(--safe);
  border-color: rgba(62, 224, 143, 0.4);
  background: rgba(62, 224, 143, 0.08);
}
.verdict-badge[data-state="risky"] {
  color: var(--risky);
  border-color: rgba(245, 181, 68, 0.4);
  background: rgba(245, 181, 68, 0.08);
}
.verdict-badge[data-state="blocked"] {
  color: var(--blocked);
  border-color: rgba(255, 84, 112, 0.4);
  background: rgba(255, 84, 112, 0.08);
}
.console-body {
  flex: 1;
}

/* Six-layer decision trace */
.pf-pipeline {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: rgba(5, 7, 13, 0.72);
}
.pf-layer {
  position: relative;
  min-width: 0;
  padding: 12px 9px 11px;
  border-right: 1px solid var(--line);
  transition: background 0.25s ease, color 0.25s ease;
}
.pf-layer:last-child { border-right: 0; }
.pf-layer__index {
  display: block;
  margin-bottom: 5px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.59rem;
  letter-spacing: 0.12em;
}
.pf-layer__name {
  display: block;
  min-height: 2.3em;
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 700;
  line-height: 1.15;
}
.pf-layer__state {
  position: absolute;
  right: 8px;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-strong);
}
.pf-layer[data-state="running"] { background: rgba(53, 230, 208, 0.06); }
.pf-layer[data-state="running"] .pf-layer__state {
  background: var(--cyan);
  box-shadow: 0 0 0 5px rgba(53, 230, 208, 0.1), 0 0 16px var(--cyan-glow);
  animation: layer-scan 0.65s ease-in-out infinite alternate;
}
.pf-layer[data-state="pass"] .pf-layer__state { background: var(--safe); box-shadow: 0 0 10px rgba(62, 224, 143, 0.55); }
.pf-layer[data-state="warn"] .pf-layer__state { background: var(--risky); box-shadow: 0 0 10px rgba(245, 181, 68, 0.55); }
.pf-layer[data-state="block"] .pf-layer__state { background: var(--blocked); box-shadow: 0 0 10px rgba(255, 84, 112, 0.55); }
.pf-layer[data-state="pass"] .pf-layer__name,
.pf-layer[data-state="warn"] .pf-layer__name,
.pf-layer[data-state="block"] .pf-layer__name { color: var(--text); }
@keyframes layer-scan { to { transform: scale(1.55); opacity: 0.55; } }

.pf-empty {
  height: 100%;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--faint);
  gap: 22px;
  padding: 24px;
}
.pf-empty p {
  max-width: 320px;
  font-size: 0.92rem;
}
.pf-empty__ring {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  position: relative;
}
.pf-empty__ring::before,
.pf-empty__ring::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}
.pf-empty__ring::before {
  inset: 14px;
  border: 1px solid rgba(53, 230, 208, 0.3);
  animation: pulse-ring 2.4s ease-out infinite;
}
.pf-empty__ring::after {
  inset: 30px;
  background: var(--cyan);
  box-shadow: 0 0 16px var(--cyan-glow);
}
@keyframes pulse-ring {
  0% {
    transform: scale(0.9);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* Result */
.pf-result {
  animation: fade-up 0.4s ease both;
}
.pf-decision-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
}
.pf-result-zone {
  min-width: 0;
  padding: 24px;
}
.pf-result-zone--decision {
  border-left: 1px solid var(--line);
  transition: box-shadow 0.25s ease;
}
.pf-result-zone--decision[data-state="safe"] {
  box-shadow: inset 3px 0 var(--safe);
}
.pf-result-zone--decision[data-state="risky"] {
  box-shadow: inset 3px 0 var(--risky);
}
.pf-result-zone--decision[data-state="blocked"] {
  box-shadow: inset 3px 0 var(--blocked);
}
.pf-zone-heading--decision {
  align-items: center;
}
.pf-zone-heading--decision .verdict-badge {
  margin-left: auto;
}
.pf-risk-summary {
  margin: 0 0 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.pf-section {
  margin-bottom: 24px;
}
.pf-section:last-child {
  margin-bottom: 0;
}
.pf-section__label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 14px;
}

.causal-chain {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.causal-chain li {
  position: relative;
  padding: 0 0 20px 28px;
  color: var(--text);
  font-size: 0.94rem;
  opacity: 0;
  animation: chain-in 0.4s ease forwards;
}
.causal-chain li::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan-glow);
}
.causal-chain li::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 14px;
  bottom: 0;
  width: 1px;
  background: linear-gradient(var(--cyan-dim), transparent);
}
.causal-chain li:last-child {
  padding-bottom: 0;
}
.causal-chain li:last-child::after {
  display: none;
}
.causal-chain .chain-step {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--cyan-dim);
  display: block;
  margin-bottom: 3px;
}
@keyframes chain-in {
  from {
    opacity: 0;
    transform: translateX(-6px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.risk-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.risk-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(12, 17, 32, 0.5);
  font-size: 0.9rem;
}
.risk-sev {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  border-radius: 6px;
  flex-shrink: 0;
}
.risk-sev[data-sev="high"] {
  color: var(--blocked);
  background: rgba(255, 84, 112, 0.12);
}
.risk-sev[data-sev="medium"] {
  color: var(--risky);
  background: rgba(245, 181, 68, 0.12);
}
.risk-sev[data-sev="low"] {
  color: var(--safe);
  background: rgba(62, 224, 143, 0.12);
}
.risk-text {
  color: var(--muted);
}

.pf-intervention {
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(53, 230, 208, 0.25);
  background: rgba(53, 230, 208, 0.06);
  color: var(--text);
  font-size: 0.94rem;
}

.counterfactual {
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.counterfactual__branch {
  min-width: 0;
  padding: 16px;
  background: rgba(12, 17, 32, 0.44);
}
.counterfactual__branch + .counterfactual__branch {
  border-top: 1px solid var(--line);
}
.counterfactual__branch--likely { background: rgba(53, 230, 208, 0.035); }
.counterfactual__branch--worst { background: rgba(255, 84, 112, 0.035); }
.counterfactual__branch--safer { background: rgba(62, 224, 143, 0.045); }
.counterfactual__branch small {
  display: block;
  margin-bottom: 8px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.counterfactual__branch p {
  min-height: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}
.counterfactual__score {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 13px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.72rem;
}
.counterfactual__score strong {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 1rem;
}
.counterfactual__branch--safer .counterfactual__score strong { color: var(--safe); }
.counterfactual__branch--worst .counterfactual__score strong { color: var(--blocked); }
.pf-intelligence {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.pf-intelligence > div { min-width: 0; }
.pf-metric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.pf-metric-head .pf-section__label { margin-bottom: 0; }
.pf-metric-head strong { color: var(--cyan); font-family: var(--font-mono); }
.pf-meter {
  height: 7px;
  margin: 14px 0 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}
.pf-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan-dim), var(--cyan));
  box-shadow: 0 0 12px var(--cyan-glow);
  transition: width 0.55s ease;
}
.pf-meter--risk span {
  background: linear-gradient(90deg, var(--safe), var(--risky), var(--blocked));
  box-shadow: none;
}
.pf-detail { color: var(--faint); font-size: 0.78rem; line-height: 1.45; }
.pf-detail strong { color: var(--muted); }
.pf-governance__list { margin: 0; border-top: 1px solid var(--line); }
.pf-governance__list div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.76rem;
}
.pf-governance__list dt { color: var(--faint); }
.pf-governance__list dd { margin: 0; color: var(--text); font-family: var(--font-mono); text-align: right; }

.pf-json-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.copy-btn {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.copy-btn:hover {
  color: var(--text);
  border-color: var(--cyan-dim);
}
.pf-json {
  margin: 0;
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #04060c;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.6;
  color: #9fb2d4;
}
.pf-json .j-key {
  color: var(--cyan);
}
.pf-json .j-str {
  color: #8fd3a6;
}
.pf-json .j-num {
  color: #f5b544;
}
.pf-technical {
  border-top: 1px solid var(--line);
  background: rgba(5, 7, 13, 0.48);
}
.pf-technical summary {
  padding: 16px 24px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  list-style-position: inside;
}
.pf-technical summary:hover {
  color: var(--text);
}
.pf-technical[open] summary {
  border-bottom: 1px solid var(--line);
  color: var(--cyan);
}
.pf-technical__body {
  padding-bottom: 24px;
}
.pf-record {
  padding: 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 14, 24, 0.52);
}
.pf-record__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}
.pf-record__head p {
  margin: 5px 0 0;
  max-width: 620px;
  color: var(--faint);
  font-size: 0.8rem;
  line-height: 1.5;
}
.pf-record__head .pf-section__label {
  margin: 0;
  color: var(--text);
}
.pf-record__actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}
.pf-record__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.pf-record__grid > div {
  min-width: 0;
  padding: 14px 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
}
.pf-record__grid dt {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pf-record__grid dd {
  margin: 7px 0 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  line-height: 1.45;
}
.pf-record__note {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-left: 2px solid var(--risky);
  background: rgba(245, 181, 68, 0.06);
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.5;
}
.pf-record__note[data-state="persisted"] {
  border-left-color: var(--safe);
  background: rgba(50, 214, 151, 0.06);
}
.pf-attestation {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(5, 7, 13, 0.4);
}
.pf-attestation > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 12px 14px;
  cursor: pointer;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 700;
  list-style: none;
}
.pf-attestation > summary::-webkit-details-marker { display: none; }
.pf-attestation > summary::before {
  content: "+";
  color: var(--cyan);
  font-family: var(--font-mono);
}
.pf-attestation[open] > summary::before { content: "−"; }
.pf-attestation__badge {
  margin-left: auto;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
}
.pf-attestation__badge[data-state="approved"] { border-color: rgba(50, 214, 151, 0.42); color: var(--safe); }
.pf-attestation__badge[data-state="changes_requested"] { border-color: rgba(245, 181, 68, 0.42); color: var(--risky); }
.pf-attestation__badge[data-state="rejected"] { border-color: rgba(255, 101, 125, 0.42); color: var(--blocked); }
.pf-attestation__body {
  padding: 16px;
  border-top: 1px solid var(--line);
}
.pf-attestation__intro {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 18px;
  margin-bottom: 14px;
}
.pf-attestation__intro p {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.5;
}
.pf-attestation__intro p:last-child {
  padding-left: 12px;
  border-left: 2px solid var(--line-strong);
  color: var(--faint);
}
.pf-attestation__form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.pf-attestation__form label {
  display: grid;
  gap: 6px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
}
.pf-attestation__form input,
.pf-attestation__form select,
.pf-attestation__form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  outline: none;
  background: rgba(8, 14, 24, 0.82);
  color: var(--text);
  font: 0.78rem/1.4 var(--font-sans);
}
.pf-attestation__form input,
.pf-attestation__form select { min-height: 40px; padding: 0 10px; }
.pf-attestation__form textarea { min-height: 72px; padding: 9px 10px; resize: vertical; }
.pf-attestation__form input:focus,
.pf-attestation__form select:focus,
.pf-attestation__form textarea:focus { border-color: var(--cyan-dim); }
.pf-attestation__form :disabled { cursor: not-allowed; opacity: 0.48; }
.pf-attestation__note-field { grid-column: 1 / -1; }
.pf-attestation__submit {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
}
.pf-attestation__submit p {
  margin: 0;
  color: var(--faint);
  font-size: 0.72rem;
}
.pf-attestation__submit p[data-state="success"] { color: var(--safe); }
.pf-attestation__submit p[data-state="error"] { color: var(--blocked); }
.pf-attestation__list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.pf-attestation__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 11px 12px;
  border-left: 2px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.018);
}
.pf-attestation__item[data-state="approved"] { border-left-color: var(--safe); }
.pf-attestation__item[data-state="changes_requested"] { border-left-color: var(--risky); }
.pf-attestation__item[data-state="rejected"] { border-left-color: var(--blocked); }
.pf-attestation__item strong,
.pf-attestation__item p { margin: 0; }
.pf-attestation__item strong { color: var(--text); font-size: 0.76rem; }
.pf-attestation__item p { margin-top: 4px; color: var(--muted); font-size: 0.72rem; line-height: 1.45; }
.pf-attestation__meta {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-align: right;
}
.pf-history {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.pf-history__head,
.pf-history__tools,
.pf-history__meta,
.pf-history__actions {
  display: flex;
  align-items: center;
}
.pf-history__head {
  justify-content: space-between;
  gap: 16px;
}
.pf-history__head p { margin: 0; }
.pf-history__head .pf-section__label { margin-bottom: 5px; }
.pf-history__head > div:first-child > p:last-child {
  color: var(--faint);
  font-size: 0.78rem;
}
.pf-history__tools { gap: 8px; }
.pf-history__count {
  min-width: 28px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-align: center;
}
.pf-history__status {
  margin: 14px 0 0;
  color: var(--faint);
  font-size: 0.76rem;
}
.pf-history__status[data-state="success"] { color: var(--safe); }
.pf-history__status[data-state="error"] { color: var(--risky); }
.pf-history__list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.pf-history__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(5, 7, 13, 0.5);
}
.pf-history__meta {
  flex-wrap: wrap;
  gap: 6px 10px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.64rem;
}
.pf-history__verdict { font-weight: 800; }
.pf-history__verdict[data-state="safe"] { color: var(--safe); }
.pf-history__verdict[data-state="risky"] { color: var(--risky); }
.pf-history__verdict[data-state="blocked"] { color: var(--blocked); }
.pf-history__action {
  margin: 6px 0 0;
  overflow: hidden;
  color: var(--text);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pf-history__actions {
  align-self: center;
  gap: 6px;
}
.pf-history__actions .copy-btn {
  min-height: 32px;
  padding: 6px 9px;
}
.pf-history__actions .copy-btn[data-action="delete"] { color: var(--blocked); }
.pf-technical__grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
  gap: 24px;
  padding: 24px 24px 0;
}
.pf-technical__grid .pf-section {
  min-width: 0;
  margin-bottom: 0;
}
.pf-technical .pf-json {
  max-height: 360px;
}

/* ---------- Layer architecture ---------- */
.section--layers {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 11, 20, 0.55);
}
.layer-architecture {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(5, 7, 13, 0.48);
}
.layer-architecture article {
  position: relative;
  min-height: 180px;
  padding: 26px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.layer-architecture article:nth-child(3n) { border-right: 0; }
.layer-architecture article:nth-child(n + 4) { border-bottom: 0; }
.layer-architecture article::after {
  content: "";
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 0;
  height: 1px;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--cyan), transparent);
  transition: transform 0.35s ease;
}
.layer-architecture article:hover::after { transform: scaleX(1); }
.layer-architecture article > span {
  color: var(--cyan-dim);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
}
.layer-architecture h3 { margin: 22px 0 9px; font-size: 1rem; }
.layer-architecture p { color: var(--muted); font-size: 0.86rem; line-height: 1.55; }

/* ---------- Steps ---------- */
.steps {
  display: flex;
  align-items: stretch;
  gap: 0;
  flex-wrap: wrap;
  justify-content: center;
}
.step {
  flex: 1 1 240px;
  max-width: 320px;
  padding: 30px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 22, 38, 0.55), rgba(9, 12, 22, 0.55));
  backdrop-filter: blur(8px);
}
.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(53, 230, 208, 0.4);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-weight: 700;
  box-shadow: inset 0 0 20px rgba(53, 230, 208, 0.08);
}
.step h3 {
  margin: 18px 0 10px;
  font-size: 1.22rem;
}
.step p {
  color: var(--muted);
  font-size: 0.95rem;
}
.step__conn {
  align-self: center;
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan-dim), transparent);
  flex: 0 0 auto;
}
.sector-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 34px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.sector-line > span {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
}
.sector-line ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.84rem;
}
.sector-line li::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--cyan-dim);
  box-shadow: 0 0 9px var(--cyan-glow);
  vertical-align: middle;
}

/* ---------- BioLens applied field ---------- */
.section--biolens {
  position: relative;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(53, 230, 208, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(53, 230, 208, 0.035) 1px, transparent 1px),
    rgba(7, 11, 20, 0.52);
  background-size: 42px 42px;
}
.biolens-pilot {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(520px, 1.12fr);
  gap: 52px;
  align-items: center;
}
.biolens-pilot__copy .section__title,
.biolens-pilot__copy .section__lead,
.biolens-pilot__copy .kicker { text-align: left; }
.biolens-pilot__identity {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.biolens-pilot__identity .kicker { margin: 0 0 4px; }
.biolens-pilot__mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(53, 230, 208, 0.42);
  border-radius: 8px;
  color: #04100f;
  background: var(--cyan);
  box-shadow: 0 0 32px -10px var(--cyan);
  font-family: var(--font-mono);
  font-weight: 800;
}
.biolens-pilot__status {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.biolens-pilot__principle {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 26px;
  padding: 15px 16px;
  border-left: 2px solid var(--safe);
  background: rgba(43, 210, 137, 0.055);
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}
.biolens-pilot__principle strong { color: var(--text); }
.biolens-pilot__pulse {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: var(--safe);
  box-shadow: 0 0 0 6px rgba(43, 210, 137, 0.1), 0 0 14px var(--safe);
  animation: clinicalPulse 2.2s ease-in-out infinite;
}
.biolens-pilot__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.clinical-field {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(5, 8, 16, 0.92);
  box-shadow: 0 34px 90px -40px rgba(0, 0, 0, 0.95), inset 0 1px rgba(255, 255, 255, 0.025);
}
.clinical-field::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 24%, rgba(53, 230, 208, 0.06) 50%, transparent 76%);
  transform: translateX(-100%);
  animation: clinicalSweep 7s ease-in-out infinite;
}
.clinical-field__scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background: repeating-linear-gradient(180deg, transparent 0, transparent 4px, rgba(255, 255, 255, 0.025) 5px);
}
.clinical-field__head,
.clinical-field__footer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
}
.clinical-field__mode {
  padding: 5px 8px;
  border: 1px solid rgba(53, 230, 208, 0.28);
  border-radius: 6px;
  color: var(--cyan);
  background: rgba(53, 230, 208, 0.06);
}
.clinical-field__path {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 34px 1fr 34px 1fr;
  align-items: stretch;
  margin: 24px 0;
}
.clinical-node {
  position: relative;
  min-width: 0;
  min-height: 174px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(16, 24, 40, 0.84), rgba(8, 12, 23, 0.84));
}
.clinical-node > span {
  color: var(--cyan-dim);
  font-family: var(--font-mono);
  font-size: 0.66rem;
}
.clinical-node strong {
  display: block;
  margin-top: 30px;
  color: var(--text);
  font-size: 0.9rem;
}
.clinical-node p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
}
.clinical-node--field {
  border-color: rgba(53, 230, 208, 0.38);
  box-shadow: inset 0 0 34px rgba(53, 230, 208, 0.045);
}
.clinical-node--verdict { border-color: rgba(245, 181, 68, 0.28); }
.clinical-link {
  position: relative;
  align-self: center;
  height: 1px;
  overflow: hidden;
  background: rgba(53, 230, 208, 0.2);
}
.clinical-link i {
  position: absolute;
  width: 10px;
  height: 1px;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: clinicalSignal 1.8s linear infinite;
}
.clinical-verdict {
  position: relative;
  display: grid;
  grid-template-columns: 150px 1fr minmax(160px, 0.85fr);
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(245, 181, 68, 0.2);
  border-radius: 8px;
  background: rgba(245, 181, 68, 0.045);
}
.clinical-verdict__label {
  display: block;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
}
.clinical-verdict strong { display: block; margin-top: 4px; color: #f5b544; font-size: 1.1rem; }
.clinical-verdict__meter { height: 7px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, 0.06); }
.clinical-verdict__meter span {
  display: block;
  width: 68%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), #f5b544);
  box-shadow: 0 0 12px rgba(245, 181, 68, 0.34);
  transform-origin: left;
  animation: clinicalMeter 3.4s ease-in-out infinite;
}
.clinical-verdict p { color: var(--muted); font-size: 0.72rem; line-height: 1.4; }
.clinical-field__footer { margin-top: 18px; letter-spacing: 0; }
.clinical-field__footer span:first-child { color: #f5b544; }

@keyframes clinicalSignal { from { transform: translateX(-12px); } to { transform: translateX(36px); } }
@keyframes clinicalPulse { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }
@keyframes clinicalSweep { 0%, 62% { transform: translateX(-100%); } 82%, 100% { transform: translateX(100%); } }
@keyframes clinicalMeter { 0%, 100% { transform: scaleX(0.82); } 50% { transform: scaleX(1); } }

/* ---------- Trust and traceability ---------- */
.section--trust {
  border-bottom: 1px solid var(--line);
  background: rgba(5, 8, 15, 0.64);
}
.trust__head {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.72fr);
  gap: 48px;
  align-items: end;
  text-align: left;
}
.trust__head .section__lead {
  margin-top: 0;
}
.trace-line {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}
.trace-line article {
  min-width: 0;
  padding: 28px 24px;
  border-right: 1px solid var(--line);
}
.trace-line article:first-child { padding-left: 0; }
.trace-line article:last-child {
  padding-right: 0;
  border-right: 0;
}
.trace-line article > span {
  color: var(--cyan-dim);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}
.trace-line strong {
  display: block;
  margin-top: 18px;
  font-size: 0.94rem;
}
.trace-line p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.82rem;
}
.trust__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 22px;
}
.trust__footer p {
  display: grid;
  gap: 3px;
}
.trust__footer strong {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
}
.trust__footer span {
  color: var(--faint);
  font-size: 0.82rem;
}

/* ---------- Platform ---------- */
.platform {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.platform .section__title {
  text-align: left;
}
.platform .kicker {
  text-align: left;
}
.platform .section__lead {
  text-align: left;
}
.feature-list {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.feature-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.feature-list__dot {
  margin-top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan-glow);
  flex-shrink: 0;
}
.feature-list strong {
  display: block;
  font-weight: 600;
  margin-bottom: 2px;
}
.feature-list span {
  color: var(--muted);
  font-size: 0.94rem;
}

.code-window {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(6, 9, 18, 0.9);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
}
.code-block {
  margin: 0;
  padding: 22px;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.75;
  color: #c3d1ec;
  overflow-x: auto;
}
.c-com {
  color: var(--faint);
}
.c-key {
  color: #6aa0ff;
}
.c-str {
  color: #8fd3a6;
}
.c-fn {
  color: var(--cyan);
}

/* ---------- Vision ---------- */
.section--vision {
  padding: 96px 0;
}
.vision {
  text-align: center;
  max-width: 820px;
}
.vision__title {
  font-size: clamp(1.6rem, 3.6vw, 2.6rem);
  text-wrap: balance;
  margin-top: 16px;
}
.vision__body {
  margin-top: 22px;
  color: var(--muted);
  font-size: 1.08rem;
  text-wrap: pretty;
}

/* ---------- Founding pilot ---------- */
.section--offer {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(6, 10, 18, 0.76);
}
.offer__head {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 48px;
  align-items: end;
}
.offer {
  margin-top: 44px;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}
.offer__summary,
.offer__deliverables {
  padding: 38px 0;
}
.offer__summary {
  padding-right: 44px;
  border-right: 1px solid var(--line-strong);
}
.offer__deliverables {
  padding-left: 44px;
}
.offer__label,
.offer__eyebrow {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}
.offer__price {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 16px;
}
.offer__price strong {
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  line-height: 1;
  font-weight: 600;
}
.offer__price span,
.offer__billing {
  color: var(--muted);
}
.offer__billing {
  max-width: 430px;
  margin-top: 16px;
}
.offer__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.offer__list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}
.offer__list li {
  position: relative;
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(0, 1.2fr);
  gap: 22px;
  padding: 16px 0 16px 30px;
  border-bottom: 1px solid var(--line);
}
.offer__list li:last-child {
  border-bottom: 0;
}
.offer__list li::before {
  content: "";
  position: absolute;
  top: 23px;
  left: 2px;
  width: 10px;
  height: 5px;
  border-left: 2px solid var(--safe);
  border-bottom: 2px solid var(--safe);
  transform: rotate(-45deg);
}
.offer__list strong {
  font-size: 0.95rem;
}
.offer__list span {
  color: var(--muted);
  font-size: 0.9rem;
}
.offer__boundary {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding-top: 18px;
  color: var(--muted);
  font-size: 0.88rem;
}
.offer__boundary strong {
  flex: none;
  color: var(--risky);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
}

/* ---------- CTA ---------- */
.cta {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 64px 32px;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(15, 22, 38, 0.8), rgba(9, 12, 22, 0.8));
}
.cta__glow {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 420px;
  height: 260px;
  background: radial-gradient(circle, var(--cyan-glow), transparent 70%);
  filter: blur(30px);
  pointer-events: none;
}
.cta__title {
  position: relative;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  margin-top: 14px;
  text-wrap: balance;
}
.cta__sub {
  position: relative;
  margin: 18px auto 0;
  max-width: 540px;
  color: var(--muted);
}
.cta__form {
  position: relative;
  margin: 32px auto 0;
  max-width: 720px;
}
.cta__fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  text-align: left;
}
.cta__fields label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}
.cta__case-field {
  grid-column: 1 / -1;
}
.cta__input {
  width: 100%;
  min-width: 0;
  padding: 13px 14px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: rgba(5, 7, 13, 0.7);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}
.cta__input:focus {
  outline: none;
  border-color: var(--cyan-dim);
  box-shadow: 0 0 0 3px rgba(53, 230, 208, 0.12);
}
.cta__textarea {
  min-height: 108px;
  resize: vertical;
  line-height: 1.5;
}
.cta__submit {
  margin-top: 18px;
}
.cta__note {
  position: relative;
  margin-top: 16px;
  color: var(--faint);
  font-size: 0.82rem;
}
.cta__note.is-success {
  color: var(--safe);
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  background: rgba(5, 7, 13, 0.6);
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.footer__brand p {
  color: var(--faint);
  font-size: 0.85rem;
}
.footer__mail {
  color: var(--muted);
  font-size: 0.86rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.footer__mail:hover {
  color: var(--text);
  border-color: var(--cyan-dim);
  box-shadow: 0 0 26px -14px var(--cyan-glow);
}
.footer__copy {
  color: var(--faint);
  font-size: 0.82rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .cards--3,
  .cards--4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .preflight {
    grid-template-columns: 1fr;
  }
  .preflight__panel {
    position: static;
  }
  .pf-pipeline { grid-template-columns: repeat(3, 1fr); }
  .pf-layer:nth-child(3) { border-right: 0; }
  .pf-layer:nth-child(-n + 3) { border-bottom: 1px solid var(--line); }
  .layer-architecture { grid-template-columns: repeat(2, 1fr); }
  .layer-architecture article,
  .layer-architecture article:nth-child(3n),
  .layer-architecture article:nth-child(n + 4) {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }
  .layer-architecture article:nth-child(2n) { border-right: 0; }
  .layer-architecture article:nth-child(n + 5) { border-bottom: 0; }
  .platform {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .biolens-pilot { grid-template-columns: 1fr; gap: 36px; }
  .problem-brief__inner { grid-template-columns: 1fr; }
  .problem-brief p { padding: 12px 0; }
  .problem-brief p + p {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  .trust__head { grid-template-columns: 1fr; gap: 18px; }
  .trace-line { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trace-line article,
  .trace-line article:first-child,
  .trace-line article:last-child { padding: 24px; }
  .trace-line article:nth-child(2n) { border-right: 0; }
  .trace-line article:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .offer__head,
  .offer { grid-template-columns: 1fr; }
  .offer__summary {
    padding-right: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line-strong);
  }
  .offer__deliverables { padding-left: 0; }
  .nav__links {
    display: none;
  }
  .nav__links.is-open {
    position: absolute;
    top: calc(100% + 14px);
    left: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 8px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: rgba(5, 7, 13, 0.98);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  }
  .nav__links.is-open a {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
  }
  .nav__links.is-open a:last-child { border-bottom: 0; }
  .nav-mobile-only { display: block; }
  .nav-console { display: none; }
  .nav-menu-toggle { display: grid; }
}
@media (max-width: 760px) {
  .pf-decision-layout,
  .pf-technical__grid {
    grid-template-columns: 1fr;
  }
  .pf-record__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pf-attestation__form { grid-template-columns: 1fr; }
  .pf-attestation__note-field,
  .pf-attestation__submit { grid-column: auto; }
  .pf-result-zone--decision {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  .pf-result-zone--decision[data-state="safe"] {
    box-shadow: inset 0 3px var(--safe);
  }
  .pf-result-zone--decision[data-state="risky"] {
    box-shadow: inset 0 3px var(--risky);
  }
  .pf-result-zone--decision[data-state="blocked"] {
    box-shadow: inset 0 3px var(--blocked);
  }
}
@media (max-width: 560px) {
  .section {
    padding: 72px 0;
  }
  .cards--3,
  .cards--4 {
    grid-template-columns: 1fr;
  }
  .step__conn {
    display: none;
  }
  .hero__stats {
    grid-template-columns: 1fr;
  }
  .hero__stats > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    text-align: center;
  }
  .hero__stats > div:last-child {
    border-bottom: 0;
  }
  .brand__text {
    font-size: 0.8rem;
  }
  .nav-cta { display: none; }
  .console-safety { display: none; }
  .pf-pipeline { grid-template-columns: repeat(2, 1fr); }
  .pf-record__head,
  .pf-record__actions {
    align-items: stretch;
    flex-direction: column;
  }
  .pf-record__actions .copy-btn {
    min-height: 40px;
  }
  .pf-record__grid {
    grid-template-columns: 1fr;
  }
  .pf-history__head { align-items: stretch; flex-direction: column; }
  .pf-history__tools { justify-content: space-between; }
  .pf-history__item { grid-template-columns: 1fr; }
  .pf-history__actions { display: grid; grid-template-columns: repeat(3, 1fr); }
  .pf-history__actions .copy-btn { min-width: 0; }
  .pf-attestation__intro { grid-template-columns: 1fr; }
  .pf-attestation__intro p:last-child { padding: 0; border-left: 0; }
  .pf-attestation__submit { align-items: stretch; flex-direction: column; }
  .pf-attestation__item { grid-template-columns: 1fr; }
  .pf-attestation__meta { text-align: left; }
  .pf-layer:nth-child(3) { border-right: 1px solid var(--line); }
  .pf-layer:nth-child(2n) { border-right: 0; }
  .pf-layer:nth-child(-n + 4) { border-bottom: 1px solid var(--line); }
  .counterfactual,
  .pf-intelligence,
  .layer-architecture { grid-template-columns: 1fr; }
  .clinical-field__path { grid-template-columns: 1fr; gap: 10px; }
  .clinical-link { width: 1px; height: 22px; margin: 0 auto; }
  .clinical-link i { width: 1px; height: 8px; animation-name: clinicalSignalVertical; }
  .clinical-node { min-height: 0; }
  .clinical-node strong { margin-top: 18px; }
  .clinical-verdict { grid-template-columns: 1fr; gap: 12px; }
  .clinical-field__footer { align-items: flex-start; flex-direction: column; gap: 6px; }
  .sector-line,
  .trust__footer { align-items: flex-start; flex-direction: column; }
  .sector-line ul { justify-content: flex-start; }
  .trace-line { grid-template-columns: 1fr; }
  .trace-line article,
  .trace-line article:first-child,
  .trace-line article:last-child {
    padding: 20px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .trace-line article:last-child { border-bottom: 0; }
  .counterfactual__branch + .counterfactual__branch {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .layer-architecture article,
  .layer-architecture article:nth-child(2n),
  .layer-architecture article:nth-child(n + 5) {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .layer-architecture article:last-child { border-bottom: 0; }
  .offer__list li { grid-template-columns: 1fr; gap: 4px; }
  .offer__boundary { align-items: flex-start; flex-direction: column; gap: 5px; }
  .cta { padding: 48px 18px; }
  .cta__fields { grid-template-columns: 1fr; }
}

@keyframes clinicalSignalVertical { from { transform: translateY(-8px); } to { transform: translateY(22px); } }

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  @page {
    margin: 14mm;
  }
  body.is-printing-record {
    background: #fff !important;
    color: #111 !important;
  }
  body.is-printing-record #field-canvas,
  body.is-printing-record .nav,
  body.is-printing-record main > :not(#preflight),
  body.is-printing-record footer,
  body.is-printing-record #preflight .section__head,
  body.is-printing-record .preflight__panel,
  body.is-printing-record .console-head,
  body.is-printing-record .pf-empty,
  body.is-printing-record .pf-technical summary,
  body.is-printing-record .pf-record__actions,
  body.is-printing-record .pf-json-head .copy-btn {
    display: none !important;
  }
  body.is-printing-record #preflight,
  body.is-printing-record .section {
    display: block !important;
    padding: 0 !important;
    background: #fff !important;
  }
  body.is-printing-record .container {
    width: 100% !important;
    max-width: none !important;
  }
  body.is-printing-record .preflight {
    display: block !important;
  }
  body.is-printing-record .preflight__output {
    border: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
  }
  body.is-printing-record #preflight * {
    color: #111 !important;
    box-shadow: none !important;
  }
  body.is-printing-record .pf-decision-layout,
  body.is-printing-record .pf-intelligence,
  body.is-printing-record .counterfactual,
  body.is-printing-record .pf-record__grid,
  body.is-printing-record .pf-technical__grid {
    break-inside: avoid;
  }
  body.is-printing-record .pf-result-zone,
  body.is-printing-record .pf-section,
  body.is-printing-record .pf-record,
  body.is-printing-record .pf-record__grid > div,
  body.is-printing-record .counterfactual__branch,
  body.is-printing-record .pf-json {
    border-color: #d7dce3 !important;
    background: #fff !important;
  }
  body.is-printing-record .pf-technical {
    background: #fff !important;
  }
  body.is-printing-record .pf-technical__body {
    display: block !important;
  }
  body.is-printing-record .pf-json {
    max-height: none !important;
    overflow: visible !important;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    background: #f6f8fa !important;
  }
  body.is-printing-record .pf-record__note {
    border-left-color: #666 !important;
    background: #f6f8fa !important;
  }
}
