:root {
  --ink: #0c0f14;
  --panel: #141925;
  --panel2: #1c2331;
  --line: #2a3344;
  --paper: #e7ecf4;
  --muted: #8a93a8;
  --sense: #3ecf8e;
  --amber: #f0b429;
  --steel: #6a8cac;
  --warn: #e07a5f;
  --font-d: "Syne", sans-serif;
  --font-m: "IBM Plex Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--paper);
  font-family: var(--font-m);
  font-size: 13px;
  background: var(--ink);
  position: relative;
}
.atmosphere {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 90% 55% at 70% -10%, rgba(62, 207, 142, 0.14), transparent 55%),
    radial-gradient(ellipse 50% 40% at 0% 80%, rgba(106, 140, 172, 0.12), transparent 50%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 31px,
      rgba(232, 237, 246, 0.02) 31px,
      rgba(232, 237, 246, 0.02) 32px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 31px,
      rgba(232, 237, 246, 0.02) 31px,
      rgba(232, 237, 246, 0.02) 32px
    );
}
.shell {
  position: relative; z-index: 1;
  max-width: 1120px; margin: 0 auto; padding: 0 1.25rem 3rem;
}

/* —— Hero: one composition —— */
.hero {
  min-height: min(92vh, 820px);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 4.5rem 0 2.2rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2.5rem;
}
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.1em; font-size: 11px;
  color: var(--sense); margin: 0 0 0.75rem;
}
.brand {
  font-family: var(--font-d); font-weight: 800;
  font-size: clamp(3.2rem, 10vw, 5.6rem);
  letter-spacing: -0.04em; margin: 0; line-height: 0.95;
}
.brand span { color: var(--sense); }
.headline {
  font-family: var(--font-d); font-weight: 700;
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  margin: 1rem 0 0.55rem; letter-spacing: -0.02em; max-width: 22ch;
}
.hero-sub {
  color: var(--muted); max-width: 36rem; margin: 0 0 1.35rem; line-height: 1.55;
}
.hero-cta {
  display: flex; flex-wrap: wrap; gap: 0.55rem; align-items: center;
}
.conn { color: var(--muted); font-size: 11px; margin: 0.85rem 0 0; }

button, a.btn {
  font: inherit; color: var(--paper); background: var(--panel2);
  border: 1px solid var(--line); padding: 0.5rem 0.85rem; cursor: pointer;
  text-decoration: none; display: inline-block;
}
button.primary, a.btn.primary {
  background: var(--sense); color: var(--ink); border-color: var(--sense); font-weight: 600;
}
button.ghost { background: transparent; }
button:hover, a.btn:hover { border-color: var(--sense); }
.queue-pill {
  color: var(--muted); font-size: 12px; padding: 0.4rem 0.65rem;
  border: 1px solid var(--line); background: rgba(20, 25, 37, 0.7);
}

.section { margin: 0 0 2.4rem; max-width: 40rem; }
.section h2 {
  font-family: var(--font-d); font-weight: 700; font-size: 1.15rem;
  margin: 0 0 0.55rem; color: var(--paper);
}
.section p { color: var(--muted); line-height: 1.55; margin: 0; }
.section p strong { color: var(--paper); font-weight: 500; }
.arch {
  margin: 0.75rem 0; padding: 1rem 1.1rem; background: #0a0d12;
  border: 1px solid var(--line); color: var(--sense); font-size: 11.5px;
  line-height: 1.45; overflow-x: auto; max-width: 100%;
}
.nonclaim {
  margin-top: 0.65rem !important; font-size: 12px; color: var(--steel) !important;
}
.bullets {
  margin: 0.5rem 0 0; padding-left: 1.15rem; color: var(--muted); line-height: 1.55;
}
.live-strip { max-width: 44rem; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

.charts-panel { max-width: none; }
.chart-story { color: var(--paper) !important; margin: 0.35rem 0 0.25rem !important; }
.chart-grid {
  display: grid; gap: 0.85rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0.75rem; max-width: 52rem;
}
@media (max-width: 900px) { .chart-grid { grid-template-columns: 1fr; } }
.charts-panel figure { margin: 0; }
.charts-panel figcaption {
  font-family: var(--font-d); color: var(--sense); font-size: 0.9rem; margin-bottom: 0.35rem;
}
.charts-panel canvas {
  width: 100%; height: auto; display: block;
  background: #0a0d12; border: 1px solid var(--line);
}
.chart-src { margin: 0.3rem 0 0; font-size: 11px; }

.funnel {
  max-width: 40rem;
  padding-top: 1.5rem; border-top: 1px solid rgba(62, 207, 142, 0.35);
}
.contact-mail { margin: 0.65rem 0 0.85rem !important; font-size: 1.05rem; }
.contact-mail a {
  color: var(--sense); font-weight: 600; text-decoration: none;
  border-bottom: 1px solid rgba(62, 207, 142, 0.4);
}
.funnel-form { margin-top: 0.35rem; display: flex; flex-direction: column; gap: 0.55rem; }
.funnel-row {
  display: grid; gap: 0.55rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 640px) { .funnel-row { grid-template-columns: 1fr; } }
.funnel-form label {
  display: flex; flex-direction: column; gap: 0.25rem;
  color: var(--muted); font-size: 11px; letter-spacing: 0.02em;
}
.funnel-form input,
.funnel-form select,
.funnel-form textarea {
  font: inherit; color: var(--paper); background: #0a0d12;
  border: 1px solid var(--line); padding: 0.45rem 0.55rem; width: 100%;
}
.funnel-form input:focus,
.funnel-form select:focus,
.funnel-form textarea:focus {
  outline: none; border-color: var(--sense);
}
.funnel-actions {
  display: flex; flex-wrap: wrap; gap: 0.65rem; align-items: center;
}
#contactStatus.ok { color: var(--sense); }
#contactStatus.err { color: var(--warn); }
.legacy-link { margin-top: 1.25rem !important; font-size: 11px; }
.legacy-link a { color: var(--steel); }

/* —— Live train view —— */
.live-toolbar {
  display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center;
  margin: 1.25rem 0 0.85rem; padding-top: 0.5rem;
}
.ttl { color: var(--amber); margin-left: auto; }
.live-grid {
  display: grid; gap: 0.85rem;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.85fr);
}
@media (max-width: 960px) { .live-grid { grid-template-columns: 1fr; } }
.live-main, .live-side {
  background: rgba(20, 25, 37, 0.85); border: 1px solid var(--line);
  padding: 0.85rem 1rem;
}
.live-main h2, .live-side h2, .live-main h3, .live-side h3 {
  font-family: var(--font-d); margin: 0 0 0.55rem; font-weight: 700;
}
.live-main h3, .live-side h3 { font-size: 0.9rem; color: var(--sense); margin-top: 0.85rem; }
.meter-grid {
  display: grid; gap: 0.35rem 0.55rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 0 0.65rem;
}
.meter {
  background: #0a0d12; border: 1px solid var(--line);
  padding: 0.4rem 0.5rem; display: flex; flex-direction: column; gap: 0.15rem;
}
.meter span {
  color: var(--muted); font-size: 10px; letter-spacing: 0.04em; text-transform: uppercase;
}
.meter strong {
  color: var(--sense); font-size: 1.05rem; font-family: var(--font-d); font-weight: 700;
}
.probe-row {
  display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.35rem 0 0.65rem;
}
.probe-chip {
  border: 1px solid var(--line); background: #0a0d12;
  padding: 0.3rem 0.5rem; font-size: 11px; color: var(--muted);
}
.probe-chip strong { color: var(--amber); font-weight: 600; }
.muscle-bars { display: flex; flex-direction: column; gap: 0.25rem; min-height: 8rem; }
.mbar {
  display: grid; grid-template-columns: 9rem 1fr 2.5rem; gap: 0.4rem; align-items: center;
  font-size: 11px; color: var(--muted);
}
.mbar .track { height: 6px; background: #0a0d12; border: 1px solid var(--line); }
.mbar .fill { height: 100%; background: var(--sense); width: 0%; }
#trainCurves {
  width: 100%; height: auto; display: block;
  background: #0a0d12; border: 1px solid var(--line); margin-top: 0.35rem;
}
.term {
  margin: 0; padding: 0.55rem; background: #0a0c11; border: 1px solid var(--line);
  overflow: auto; max-height: 220px; white-space: pre-wrap; word-break: break-word;
  font-size: 11.5px; line-height: 1.4;
}
.live-term { max-height: 240px; min-height: 140px; }
.tip-term { max-height: 140px; color: var(--amber); }
.tip { margin: 0.45rem 0 0; }
