/* RiskRadar design system.
   One set of tokens drives every page. Motion is decoration only: everything
   still reads with animations off, and prefers-reduced-motion switches them off. */

:root {
  /* ink */
  --ink: #0a2540;
  --ink-2: #425466;
  --ink-3: #697386;
  --ink-4: #8792a2;
  /* surfaces */
  --page: #f6f9fc;
  --surface: #ffffff;
  --surface-2: #fafbfd;
  --line: #e6ebf1;
  --line-2: #d5dbe3;
  /* brand */
  --accent: #635bff;
  --accent-hover: #0a2540;
  --accent-soft: #eeedff;
  --accent-ink: #4c44e0;
  --cyan: #00d4ff;
  --pink: #ff5996;
  --amber: #ffb547;
  /* status (never a series colour; always with an icon + label) */
  --good: #0ca30c;
  --good-ink: #0b6e0b;
  --good-soft: #e8f7e8;
  --warn: #fab219;
  --warn-ink: #8a5a00;
  --warn-soft: #fff6e1;
  --crit: #d03b3b;
  --crit-ink: #b42828;
  --crit-soft: #fdecec;
  /* navy band */
  --navy: #0a2540;
  --navy-2: #0d2f52;
  --navy-line: rgba(255, 255, 255, 0.1);
  --navy-ink: #adbdcc;
  /* shape */
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(10, 37, 64, 0.06), 0 1px 1px rgba(10, 37, 64, 0.04);
  --shadow: 0 2px 5px -1px rgba(50, 50, 93, 0.12), 0 1px 3px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 30px 60px -12px rgba(50, 50, 93, 0.25), 0 18px 36px -18px rgba(0, 0, 0, 0.3);
  --ring: 0 0 0 4px rgba(99, 91, 255, 0.22);
  /* type */
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.215, 0.61, 0.355, 1);
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font: 15px/1.6 var(--sans); -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent-ink); text-decoration: none; }
a:hover { color: var(--ink); }
img, svg { display: block; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.02em; font-weight: 650; }
p { margin: 0; }
.num, .tabular { font-variant-numeric: tabular-nums; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ------------------------------------------------------------------ buttons */
.btn, button {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font: 600 14px/1 var(--sans); letter-spacing: 0.005em; white-space: nowrap;
  padding: 11px 18px; border-radius: 999px; border: 0;
  background: var(--accent); color: #fff; text-decoration: none;
  transition: background 0.18s var(--ease), box-shadow 0.18s var(--ease),
              transform 0.18s var(--ease), color 0.18s;
}
.btn:hover, button:hover { background: var(--accent-hover); color: #fff; }
.btn:active, button:active { transform: translateY(1px); }
.btn .arrow { transition: transform 0.18s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn.dark, button.dark { background: var(--ink); }
.btn.dark:hover, button.dark:hover { background: #1a3a5c; }
.btn.ghost, button.ghost {
  background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2);
}
.btn.ghost:hover, button.ghost:hover { background: var(--surface-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink-4); }
.btn.on-dark { background: rgba(255,255,255,0.14); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25); }
.btn.on-dark:hover { background: rgba(255,255,255,0.24); }
.btn.sm, button.sm { padding: 8px 13px; font-size: 13px; }
button:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.inline-form { display: inline; margin: 0; }

/* ------------------------------------------------------------------ inputs */
label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 16px 0 6px; }
input[type=email], input[type=password], input[type=url], input[type=text], select {
  width: 100%; padding: 10px 12px; font: inherit; font-size: 15px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px;
  box-shadow: var(--shadow-sm); transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.note { font-size: 13px; color: var(--ink-3); }
.error {
  display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 0; padding: 10px 12px;
  border-radius: 8px; background: var(--crit-soft); color: var(--crit-ink); font-size: 14px;
}

/* ------------------------------------------------------------------ badges */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1.5; white-space: nowrap;
  background: var(--page); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line);
}
.badge.good { background: var(--good-soft); color: var(--good-ink); box-shadow: none; }
.badge.warn { background: var(--warn-soft); color: var(--warn-ink); box-shadow: none; }
.badge.crit { background: var(--crit-soft); color: var(--crit-ink); box-shadow: none; }
.badge.accent { background: var(--accent-soft); color: var(--accent-ink); box-shadow: none; }
.badge.sim { background: transparent; color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line-2); font-weight: 500; }
.badge .ico { font-size: 11px; line-height: 1; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-4); flex: none; }
.dot.good { background: var(--good); }
.dot.crit { background: var(--crit); }
.dot.live { background: var(--good); box-shadow: 0 0 0 0 rgba(12, 163, 12, 0.45); animation: pulse 2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(12, 163, 12, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(12, 163, 12, 0); }
  100% { box-shadow: 0 0 0 0 rgba(12, 163, 12, 0); }
}
.tk {
  display: inline-block; font: 600 11px/1.6 var(--mono); letter-spacing: 0.02em; color: var(--ink-2);
  padding: 0 6px; border-radius: 4px; background: var(--page); box-shadow: inset 0 0 0 1px var(--line);
}
.chip {
  display: inline-flex; align-items: center; gap: 5px; flex: none;
  font: 600 12px/1.7 var(--mono); padding: 0 7px; border-radius: 6px;
  font-variant-numeric: tabular-nums; min-width: 58px; justify-content: center;
}
.chip i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.8; }
.chip.neg { background: var(--crit-soft); color: var(--crit-ink); }
.chip.pos { background: #e7f1ff; color: #1757b8; }
.chip.neu { background: var(--page); color: var(--ink-3); }

/* ------------------------------------------------------------------ top nav */
.nav {
  position: sticky; top: 0; z-index: 50; transition: background 0.25s, box-shadow 0.25s;
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav.scrolled { background: rgba(255, 255, 255, 0.82); backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px); box-shadow: 0 1px 0 var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700;
  font-size: 17px; letter-spacing: -0.02em; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 28px; height: 28px; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a:not(.btn) { color: var(--ink-2); font-weight: 550; font-size: 14.5px; }
.nav-links a:not(.btn):hover { color: var(--ink); }
.nav.on-hero:not(.scrolled) .nav-links a:not(.btn), .nav.on-hero:not(.scrolled) .brand { color: var(--ink); }

/* ------------------------------------------------------------------ hero */
.hero { position: relative; overflow: hidden; margin-top: -68px; padding: 150px 0 120px; isolation: isolate; }
.hero-bg {
  position: absolute; inset: 0 0 auto 0; height: 100%; z-index: -2;
  transform: skewY(-8deg); transform-origin: 0 0; overflow: hidden;
  background: #a7a0ff;
}
.hero-bg .blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.9;
  animation: drift 18s ease-in-out infinite alternate; will-change: transform; }
.hero-bg .b1 { width: 60vw; height: 60vw; left: -10vw; top: -30vw; background: #635bff; }
.hero-bg .b2 { width: 50vw; height: 50vw; right: -12vw; top: -18vw; background: #ff5996; animation-duration: 22s; animation-delay: -6s; }
.hero-bg .b3 { width: 44vw; height: 44vw; left: 30vw; top: 4vw; background: #00d4ff; animation-duration: 26s; animation-delay: -12s; }
.hero-bg .b4 { width: 36vw; height: 36vw; right: 10vw; bottom: -18vw; background: #ffb547; animation-duration: 20s; animation-delay: -3s; }
@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(6vw, 4vw, 0) scale(1.12); }
  100% { transform: translate3d(-4vw, 2vw, 0) scale(0.95); }
}
.hero-fade { position: absolute; inset: auto 0 0 0; height: 55%; z-index: -1;
  background: linear-gradient(to bottom, rgba(246,249,252,0) 0%, var(--page) 78%); }
.hero-grid { display: grid; grid-template-columns: 1.18fr 1fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 8px; border-radius: 999px;
  background: rgba(255,255,255,0.7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-size: 13px; font-weight: 600; color: var(--ink); box-shadow: var(--shadow-sm);
}
.eyebrow .pill { background: var(--ink); color: #fff; border-radius: 999px; padding: 2px 8px; font-size: 11px; letter-spacing: 0.04em; }
.hero h1 {
  margin: 22px 0 20px; font-size: clamp(38px, 4.6vw, 60px); line-height: 1.06;
  letter-spacing: -0.035em; font-weight: 700; color: var(--ink);
}
/* Solid ink over the gradient, as the gradient already carries the colour;
   gradient-clipped text lost contrast where it crossed the purple blob. */
.hero h1 .grad { color: var(--ink); }
.hero .lede { font-size: 19px; line-height: 1.55; color: var(--ink-2); max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; align-items: center; }
.hero-note { margin-top: 14px; font-size: 13px; color: var(--ink-3); }

/* the floating product preview */
.preview { position: relative; perspective: 1600px; }
.preview-card {
  position: relative; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  padding: 18px; transform: rotateY(-9deg) rotateX(4deg); transform-style: preserve-3d;
  transition: transform 0.6s var(--ease); animation: float 7s ease-in-out infinite;
}
.preview:hover .preview-card { transform: rotateY(-3deg) rotateX(1deg); }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
.preview-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.preview-dots { display: flex; gap: 6px; }
.preview-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.preview-title { font-size: 12px; font-weight: 600; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.mini-row {
  display: grid; grid-template-columns: 62px 1fr 64px; align-items: center; gap: 12px;
  padding: 10px 6px; border-top: 1px solid var(--line);
}
.mini-row:first-of-type { border-top: 0; }
.mini-row .t { font: 700 13px/1.2 var(--mono); }
.mini-row .t small { display: block; font: 500 11px/1.4 var(--sans); color: var(--ink-4); }
.mini-row .v { text-align: right; font: 650 15px/1 var(--sans); font-variant-numeric: tabular-nums; }
.mini-row .v small { display: block; margin-top: 4px; font-size: 11px; font-weight: 500; color: var(--ink-4); }
.toast {
  position: absolute; right: -26px; bottom: -64px; width: 280px; z-index: 2;
  background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-lg);
  padding: 13px 14px; display: flex; gap: 11px; align-items: flex-start;
  animation: toastIn 0.9s var(--ease) 1.1s both, float 7s ease-in-out 2s infinite;
}
.toast .ic { width: 30px; height: 30px; border-radius: 8px; flex: none; display: grid; place-items: center;
  background: var(--crit-soft); color: var(--crit-ink); font-weight: 800; }
.toast b { display: block; font-size: 13px; }
.toast span { font-size: 12px; color: var(--ink-3); }
@keyframes toastIn { from { opacity: 0; transform: translateY(18px) scale(0.96); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------ sections */
.section { padding: 96px 0; position: relative; }
.section.tight { padding: 64px 0; }
.kicker { font-size: 14px; font-weight: 650; color: var(--accent-ink); letter-spacing: 0.01em; margin-bottom: 12px; }
.section h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.12; letter-spacing: -0.03em; max-width: 20em; }
.section .sub { margin-top: 14px; font-size: 17.5px; color: var(--ink-2); max-width: 40em; line-height: 1.6; }
.section-head { margin-bottom: 44px; }

/* count-up stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 28px 24px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat .v { font-size: 36px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .v .unit { font-size: 18px; color: var(--ink-3); margin-left: 3px; font-weight: 600; }
.stat .k { margin-top: 6px; font-size: 14px; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.stat .bar { margin-top: 14px; height: 3px; width: 32px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--cyan)); }

/* pipeline diagram */
.pipeline-card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 28px 24px 18px; overflow: hidden; }
.pipeline-svg { width: 100%; height: auto; }
.pipeline-svg .edge { fill: none; stroke: var(--line-2); stroke-width: 2; }
.pipeline-svg .flow { fill: none; stroke: url(#flowGrad); stroke-width: 2; stroke-dasharray: 6 10;
  animation: dash 1.4s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -32; } }
.pipeline-svg .node rect { fill: var(--surface); stroke: var(--line-2); stroke-width: 1; }
.pipeline-svg .node.hot rect { stroke: var(--accent); }
.pipeline-svg .node .title { font: 650 13px var(--sans); fill: var(--ink); }
.pipeline-svg .node .desc { font: 500 11px var(--sans); fill: var(--ink-3); }
.pipeline-svg .node .icon { fill: var(--accent-soft); }
.pipeline-svg .node .glyph { font: 700 12px var(--mono); fill: var(--accent-ink); }
.pipeline-svg .packet { fill: var(--accent); }
.pipeline-svg .packet.alt { fill: var(--pink); }
.pipeline-legend { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 30px; }
.pipeline-legend div { font-size: 14px; color: var(--ink-2); }
.pipeline-legend b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }

/* distribution + cards */
.split { display: grid; grid-template-columns: 1.25fr 1fr; gap: 28px; align-items: stretch; }
.card {
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow);
  padding: 24px; position: relative;
}
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.card-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.card h3 { font-size: 16px; letter-spacing: -0.01em; }
.card .card-sub { font-size: 13.5px; color: var(--ink-3); margin-top: 3px; }
.compare { display: grid; gap: 12px; }
.compare .row {
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center;
  padding: 16px 18px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
}
.compare .row b { font-size: 15px; display: block; }
.compare .row span { font-size: 13px; color: var(--ink-3); }
.compare .row .big { font: 700 22px/1 var(--sans); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.compare .row.win { border-color: transparent; box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.chart-wrap { position: relative; margin-top: 16px; }
.chart-wrap svg { width: 100%; height: auto; overflow: visible; }
.axis-label { font: 500 11px var(--sans); fill: var(--ink-4); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 12px; font-size: 12.5px; color: var(--ink-3); }
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.key-line { width: 16px; height: 2px; border-radius: 1px; background: var(--ink); }
.key-box { width: 12px; height: 12px; border-radius: 3px; background: #b9b5ff; }
.key-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--crit); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--crit); }

/* tooltip */
.tip {
  position: absolute; z-index: 20; pointer-events: none; min-width: 120px;
  background: var(--ink); color: #fff; border-radius: 8px; padding: 8px 10px;
  font-size: 12px; line-height: 1.45; box-shadow: var(--shadow-lg); white-space: nowrap;
  opacity: 0; transform: translate(-50%, calc(-100% - 12px)); transition: opacity 0.12s;
}
.tip.on { opacity: 1; }
.tip strong { font-size: 14px; font-variant-numeric: tabular-nums; display: block; }
.tip .muted { color: #aab7c4; }

/* ticker grid (landing + dashboard) */
.tickers { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.tcard {
  background: var(--surface); border-radius: 14px; border: 1px solid var(--line);
  padding: 16px 16px 12px; transition: box-shadow 0.2s var(--ease), transform 0.2s var(--ease), border-color 0.2s;
  position: relative;
}
.tcard:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: transparent; }
.tcard.over { border-color: rgba(208, 59, 59, 0.35); }
.tcard-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.tcard .sym { font: 700 15px/1.2 var(--mono); letter-spacing: 0.01em; }
.tcard .co { font-size: 12.5px; color: var(--ink-3); }
.tcard .score { text-align: right; }
.tcard .score b { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; display: block; line-height: 1.1; }
.tcard .score small { font-size: 11.5px; color: var(--ink-4); }
.tcard .spark { margin: 10px -4px 6px; position: relative; }
.tcard .spark svg { width: 100%; height: 64px; overflow: visible; }
.tcard-f { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-3); min-height: 24px; white-space: nowrap; }
.tcard .headline { display: block; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink-2); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tcard .headline:hover { color: var(--accent-ink); }
.spark-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark-area { fill: url(#sparkFill); }
.spark-cut { stroke: var(--ink); stroke-width: 1; opacity: 0.55; }
.spark-cut-label { font: 600 10px var(--sans); fill: var(--ink-3); }
.spark-hot { fill: var(--crit); stroke: var(--surface); stroke-width: 2; }
.spark-end { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.spark-cross { stroke: var(--ink-4); stroke-width: 1; opacity: 0; }
.spark:hover .spark-cross { opacity: 1; }
.draw { stroke-dasharray: var(--len, 1000); stroke-dashoffset: var(--len, 1000); animation: drawIn 1.3s var(--ease) forwards; }
@keyframes drawIn { to { stroke-dashoffset: 0; } }

/* feed */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 12px; align-items: flex-start; padding: 13px 0; border-top: 1px solid var(--line); }
.feed li:first-child { border-top: 0; }
.feed li.enter { animation: slideIn 0.5s var(--ease) both; }
@keyframes slideIn { from { opacity: 0; transform: translateY(-8px); background: var(--accent-soft); } to { opacity: 1; transform: none; } }
.feed a.title { color: var(--ink); font-weight: 550; font-size: 14.5px; line-height: 1.45; }
.feed a.title:hover { color: var(--accent-ink); }
.feed .meta { font-size: 12.5px; color: var(--ink-4); margin-top: 3px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* navy engineering band */
.navy { background: var(--navy); color: #fff; position: relative; overflow: hidden; }
.navy::before { content: ""; position: absolute; inset: -40% -10% auto auto; width: 70%; height: 140%;
  background: radial-gradient(closest-side, rgba(99,91,255,0.35), transparent 70%); pointer-events: none; }
.navy .kicker { color: #9f9aff; }
.navy h2 { color: #fff; }
.navy .sub { color: var(--navy-ink); }
.eng-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--navy-line);
  border: 1px solid var(--navy-line); border-radius: var(--r-lg); overflow: hidden; }
.eng { background: var(--navy); padding: 28px; transition: background 0.25s; }
.eng:hover { background: var(--navy-2); }
.eng .icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(99,91,255,0.35), rgba(0,212,255,0.25)); color: #fff; font: 700 14px var(--mono); }
.eng h3 { font-size: 17px; color: #fff; margin-bottom: 8px; }
.eng p { color: var(--navy-ink); font-size: 14.5px; line-height: 1.6; }
.eng .fact { margin-top: 14px; font: 600 12.5px var(--mono); color: #7fe3ff; }
.code {
  margin-top: 40px; background: #06182c; border-radius: var(--r-lg); border: 1px solid var(--navy-line);
  overflow: hidden; box-shadow: 0 30px 60px -20px rgba(0,0,0,0.5);
}
.code-top { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--navy-line); }
.code-top i { width: 10px; height: 10px; border-radius: 50%; background: #2a3f57; }
.code-top span { font: 500 12px var(--mono); color: var(--navy-ink); margin-left: 6px; }
.code pre { margin: 0; padding: 20px 22px; overflow-x: auto; font: 13.5px/1.75 var(--mono); color: #d6e2ef; }
.code .c { color: #6f86a0; } .code .k { color: #b39dff; } .code .s { color: #7fe3ff; } .code .f { color: #ffb86b; } .code .n { color: #ff7ab2; }

/* CTA band */
.cta { padding: 96px 0 110px; text-align: center; position: relative; overflow: hidden; isolation: isolate; }
.cta::before { content: ""; position: absolute; inset: 20% 10% 0; z-index: -1; filter: blur(70px); opacity: 0.45;
  background: radial-gradient(40% 60% at 30% 50%, #635bff, transparent 70%),
              radial-gradient(35% 55% at 70% 50%, #00d4ff, transparent 70%),
              radial-gradient(30% 50% at 50% 80%, #ff5996, transparent 70%); }
.cta h2 { margin: 0 auto; font-size: clamp(30px, 4vw, 46px); line-height: 1.1; letter-spacing: -0.03em; max-width: 16em; }
.cta .sub { margin: 16px auto 0; font-size: 18px; color: var(--ink-2); max-width: 34em; line-height: 1.6; }
.cta .hero-cta { margin-top: 30px; }
.cta .hero-cta { justify-content: center; }

/* footer */
footer.site { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--ink-3); font-size: 13.5px; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }
footer.site a { color: var(--ink-2); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; } .reveal.d2 { transition-delay: 0.16s; } .reveal.d3 { transition-delay: 0.24s; }

/* ================================================================== app shell */
.app { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; padding: 20px 14px; background: var(--surface);
  border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px;
}
.side .brand { padding: 4px 10px 18px; }
.side-link {
  display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 8px;
  color: var(--ink-2); font-weight: 550; font-size: 14px;
}
.side-link svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.side-link:hover { background: var(--page); color: var(--ink); }
.side-link.on { background: var(--accent-soft); color: var(--accent-ink); }
.side-sec { margin: 18px 10px 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-4); }
.side-foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--line); }
.who { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; min-width: 0; }
.avatar { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--pink)); color: #fff; font-weight: 700; font-size: 13px; }
.who .n { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who .r { font-size: 12px; color: var(--ink-4); }
.linklike { background: none !important; color: var(--ink-3) !important; padding: 0 !important; font-weight: 550; font-size: 13px; border-radius: 0; }
.linklike:hover { color: var(--ink) !important; }
.main { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 32px; background: rgba(246,249,252,0.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar h1 { font-size: 22px; letter-spacing: -0.02em; }
.topbar .live { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); }
.content { padding: 26px 32px 60px; max-width: 1280px; }
.guest-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 12px 16px; border-radius: 12px; margin-bottom: 20px; font-size: 14px;
  background: linear-gradient(90deg, var(--accent-soft), #e6f9ff); color: var(--ink);
}
.status-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3);
}
.status-pill b { color: var(--ink); font-weight: 650; }
.status-pill.bad { border-color: rgba(208,59,59,0.35); }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 26px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 18px 16px; }
.kpi .k { font-size: 13px; color: var(--ink-3); font-weight: 550; display: flex; align-items: center; gap: 7px; }
.kpi .v { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; margin-top: 6px; font-variant-numeric: tabular-nums; line-height: 1.15; }
.kpi .d { font-size: 12.5px; color: var(--ink-4); margin-top: 4px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 30px 0 14px; }
.sec-h h2 { font-size: 17px; letter-spacing: -0.01em; }
.sec-h .note { font-size: 13px; }
.two { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; align-items: start; }

/* alert timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 18px 36px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline .node { position: absolute; left: 4px; top: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--surface); box-shadow: inset 0 0 0 4px var(--crit); }
.timeline .node.medium { box-shadow: inset 0 0 0 4px var(--warn); }
.timeline .node.low { box-shadow: inset 0 0 0 4px var(--ink-4); }
.timeline .node.sim { box-shadow: inset 0 0 0 2px var(--ink-4); }
.timeline .row1 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.timeline .row1 .sym { font: 700 13px var(--mono); }
.timeline .when { font-size: 12.5px; color: var(--ink-4); margin-left: auto; white-space: nowrap; }
.timeline .msg { font-size: 13.5px; color: var(--ink-2); margin-top: 3px; }
.timeline .foot { font-size: 12px; color: var(--ink-4); margin-top: 4px; display: flex; gap: 10px; flex-wrap: wrap; }
.empty { text-align: center; padding: 28px 12px; color: var(--ink-3); font-size: 14px; }
.empty .glyph { width: 44px; height: 44px; margin: 0 auto 10px; border-radius: 12px; background: var(--page); display: grid; place-items: center; font-size: 20px; }

/* simulate stepper */
.sim-card { background: linear-gradient(160deg, #ffffff 30%, #f3f2ff); }
.sim-controls { display: flex; gap: 10px; align-items: center; margin-top: 14px; }
.sim-controls select { width: auto; min-width: 110px; }
.steps { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.steps li { display: flex; align-items: center; gap: 11px; font-size: 13.5px; color: var(--ink-4); transition: color 0.3s; }
.steps .s-ic { width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-size: 11px; font-weight: 800; background: var(--page); color: var(--ink-4); box-shadow: inset 0 0 0 1px var(--line-2);
  transition: background 0.3s, color 0.3s, box-shadow 0.3s; }
.steps li.active { color: var(--ink); }
.steps li.active .s-ic { background: var(--accent-soft); color: var(--accent-ink); box-shadow: inset 0 0 0 2px var(--accent); animation: spin-ring 1s linear infinite; }
.steps li.done { color: var(--ink-2); }
.steps li.done .s-ic { background: var(--good); color: #fff; box-shadow: none; }
.steps li.fail .s-ic { background: var(--warn-soft); color: var(--warn-ink); box-shadow: none; }
@keyframes spin-ring { 50% { box-shadow: inset 0 0 0 2px rgba(99,91,255,0.35); } }
.sim-msg { margin-top: 12px; font-size: 13px; color: var(--ink-3); min-height: 20px; }

/* ================================================================== auth */
.auth-shell { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.auth-art { position: relative; overflow: hidden; background: var(--navy); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; isolation: isolate; }
.auth-art .hero-bg { transform: none; opacity: 0.75; height: 100%; }
.auth-art .brand { color: #fff; }
.auth-art blockquote { margin: 0; font-size: 26px; line-height: 1.3; letter-spacing: -0.02em; font-weight: 650; max-width: 16em; }
.auth-art .sub { color: rgba(255,255,255,0.85); margin-top: 14px; font-size: 15px; max-width: 30em; }
.auth-art .glass { margin-top: 28px; background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.25);
  border-radius: 14px; padding: 14px 16px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); max-width: 360px; }
.auth-art .glass .t { font: 700 13px var(--mono); }
.auth-art .glass .m { font-size: 13px; opacity: 0.9; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 48px 24px; background: var(--surface); }
.auth-form .box { width: 100%; max-width: 380px; }
.auth-form h1 { font-size: 28px; letter-spacing: -0.025em; }
.auth-form .sub { color: var(--ink-3); margin-top: 6px; font-size: 15px; }
.auth-form form { margin-top: 18px; }
.auth-form button[type=submit] { width: 100%; justify-content: center; margin-top: 22px; padding: 13px; border-radius: 8px; }
.divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: var(--ink-4); font-size: 12.5px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-form .alt { margin-top: 20px; font-size: 14px; color: var(--ink-3); text-align: center; }
.auth-form .demo-btn { width: 100%; justify-content: center; border-radius: 8px; padding: 12px; }

/* onboarding / settings */
.narrow { max-width: 760px; }
.picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-top: 14px; }
.pick { position: relative; margin: 0; cursor: pointer; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick .face {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 12px; background: var(--surface);
  border: 1px solid var(--line-2); transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.pick:hover .face { border-color: var(--ink-4); }
.pick input:checked + .face { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow-sm); background: #fbfbff; }
.pick input:focus-visible + .face { box-shadow: var(--ring); }
.pick .logo { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font: 700 11px var(--mono);
  background: var(--page); color: var(--ink-2); flex: none; }
.pick input:checked + .face .logo { background: var(--accent); color: #fff; }
.pick .nm { font-size: 14px; font-weight: 600; color: var(--ink); }
.pick .sy { font: 500 12px var(--mono); color: var(--ink-4); }
.pick .check { margin-left: auto; width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-2); flex: none; display: grid; place-items: center; color: #fff; font-size: 11px; }
.pick input:checked + .face .check { background: var(--accent); box-shadow: none; }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 18px; flex-wrap: wrap; }
.stepnum { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; font-weight: 700; margin-right: 10px; }

/* ================================================================== responsive */
@media (max-width: 980px) {
  .hero-grid, .split, .two { grid-template-columns: 1fr; }
  .preview { max-width: 520px; margin: 10px auto 30px; }
  .toast { right: 10px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat { border-left: 0; padding-left: 0; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .pipeline-legend { grid-template-columns: 1fr; }
  .eng-grid { grid-template-columns: 1fr; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-art { display: none; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side .brand { padding: 4px 8px; margin-right: auto; }
  .side-sec { display: none; }
  .side-foot { margin: 0; padding: 0; border: 0; display: flex; align-items: center; gap: 12px; }
  .side-foot .who { display: none; }
  .topbar, .content { padding-left: 18px; padding-right: 18px; }
  .nav-links a.hide-sm { display: none; }
}
@media (max-width: 560px) {
  .kpis, .stats { grid-template-columns: 1fr 1fr; }
  .hero { padding-top: 120px; }
  .section { padding: 64px 0; }
  .toast { display: none; }
  .nav-links { gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .pipeline-svg .packet { display: none; }
  .draw { stroke-dasharray: none; stroke-dashoffset: 0; }
}

/* brand sweep: the radar arm rotates slowly */
.brand-mark .sweep { transform-origin: 16px 16px; animation: sweep 4s linear infinite; }
@keyframes sweep { to { transform: rotate(360deg); } }
.timeline li.enter { animation: slideIn 0.6s var(--ease) both; }

/* ---- mobile fixes ----
   Grid tracks default to min-content; the rotated preview card forced the
   hero wider than the viewport (hidden by the hero's overflow). */
.hero-grid > *, .split > *, .two > *, .kpis > * { min-width: 0; }
@media (max-width: 980px) {
  .hero-grid, .split, .two { grid-template-columns: minmax(0, 1fr); }
  .preview-card { transform: none; }
}
@media (max-width: 860px) {
  .side { flex-wrap: nowrap; overflow-x: auto; gap: 2px; padding: 10px 12px; scrollbar-width: none; }
  .side::-webkit-scrollbar { display: none; }
  .side .brand span { display: none; }
  .side .brand { margin-right: 6px; padding: 2px 6px 2px 2px; }
  .side-link { white-space: nowrap; padding: 7px 10px; font-size: 13.5px; flex: none; }
  .side-foot { flex: none; margin-left: 6px; }
  .topbar { position: static; }
}
@media (max-width: 560px) {
  .hero h1 { font-size: 36px; }
  .hero .lede { font-size: 17px; }
  .nav .brand span { display: none; }
  .mini-row { grid-template-columns: 52px 1fr 56px; gap: 8px; }
}
.mini-row .spark { min-width: 0; position: relative; }
.mini-row .spark svg { width: 100%; }
