/* ═══════════════════════════════════════════════════════════════════════════
   AltInsight — editorial brand system
   Light "paper" marketing surface + dark product "islands" (report, app).
   Tokens are redefined inside .surface-dark so the same components adapt.
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
  /* type */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "Charter", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-mono: "SF Mono", ui-monospace, "JetBrains Mono", "Roboto Mono", Menlo, monospace;

  /* brand */
  --paper: #F4F1E9;
  --paper-2: #FCFBF7;
  --ink: #14161B;
  --ink-soft: #3d424b;
  --accent: #2748E0;      /* cobalt */
  --accent-press: #1c37bd;
  --signal: #C4700A;      /* amber, for correlation/alert motif */

  /* mapped component tokens (light) */
  --bg: var(--paper);
  --bg-soft: #ECE7DA;
  --panel: var(--paper-2);
  --panel-2: #F1EDE2;
  --border: #E4DFD2;
  --border-strong: #D6D0C0;
  --text: var(--ink);
  --muted: #6c7178;
  --brand: var(--accent);
  --brand-2: var(--signal);

  --ok: #12805c;
  --warn: #C4700A;
  --danger: #c0392b;

  --maxw: 1120px;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20,22,27,.04), 0 8px 30px -18px rgba(20,22,27,.25);
}

/* dark product surfaces: report window + in-app shell */
.surface-dark, .report-frame, .app-shell {
  --bg: #0b1020;
  --bg-soft: #111a33;
  --panel: #16203b;
  --panel-2: #1c2947;
  --border: #263356;
  --border-strong: #33436e;
  --text: #eaf0ff;
  --muted: #9fb0d6;
  --brand: #5b8bff;
  --brand-2: #22d3aa;
  color: var(--text);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* paper grain (behind content) for tactile texture */
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.25'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}
a { color: inherit; text-decoration: none; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.serif { font-family: var(--font-serif); }
.accent { color: var(--accent); }

h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 600; letter-spacing: -.015em; color: var(--ink); }

/* mono eyebrow/label */
.eyebrow, .label {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); font-weight: 500;
}
.eyebrow .mk { color: var(--accent); }

/* ── buttons ─────────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 9px;
  font-weight: 600; font-size: 15px; font-family: var(--font-sans); cursor: pointer; border: 1px solid transparent;
  transition: transform .06s ease, background .15s ease, border-color .15s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--paper-2); }
.btn-primary:hover { background: #000; }
.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-press); }
.btn-block { width: 100%; justify-content: center; }
.surface-dark .btn-primary, .report-frame .btn-primary { background: var(--brand); color: #05132a; }
.surface-dark .btn-ghost { color: var(--text); border-color: var(--border-strong); }

/* ── nav ─────────────────────────────────────────────────────────────────── */
.nav { position: sticky; top: 0; z-index: 40; background: rgba(244,241,233,.82);
  backdrop-filter: saturate(140%) blur(10px); border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); }
.brand .logo-mark { display: block; }
.brand-word { font-family: var(--font-serif); font-size: 20px; font-weight: 500; letter-spacing: -.01em; }
.brand-word b { font-weight: 700; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a.link { color: var(--ink-soft); font-size: 15px; font-weight: 500; }
.nav-links a.link:hover { color: var(--ink); }

/* ── hero ────────────────────────────────────────────────────────────────── */
.hero { padding: 88px 0 40px; }
.hero-tight { padding: 74px 0 30px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(38px, 5vw, 60px); line-height: 1.03; margin: 20px 0 0; }
.hero .lede { font-size: clamp(17px, 1.5vw, 20px); color: var(--ink-soft); margin: 22px 0 0; max-width: 620px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.hero-note { margin-top: 16px; font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); letter-spacing: .02em; }
.underline-accent { background-image: linear-gradient(var(--accent), var(--accent)); background-repeat: no-repeat;
  background-position: 0 92%; background-size: 100% 2px; padding-bottom: 1px; }

/* pipeline chip row (Connect → Correlate → Deliver) */
.pipe { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 26px;
  font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-soft); }
.pipe .p { border: 1px solid var(--border-strong); border-radius: 999px; padding: 6px 13px; background: var(--paper-2); }
.pipe .arw { color: var(--accent); }

/* hero two-column + soft glow */
.hero { position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(680px 340px at 82% 12%, rgba(39,72,224,.10), transparent 68%); }
.hero .container { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 52px; align-items: center; }
.hero-copy h1 { margin-top: 18px; }

/* ── product visual (hero device + floating chip) ── */
.hero-visual { position: relative; }
.device { border-radius: 14px; overflow: hidden; border: 1px solid #26304d;
  box-shadow: 0 40px 80px -34px rgba(20,22,27,.5), 0 12px 28px -14px rgba(20,22,27,.3); }
.device-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--panel-2); border-bottom: 1px solid var(--border); }
.device-bar .dots { display: flex; gap: 6px; }
.device-bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: #3b466b; display: block; }
.device-bar .dfile { font-family: var(--font-mono); font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.device-body { position: relative; background: var(--bg); padding: 20px 20px 0; }
.dhead .dtag { font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-2); }
.dhead h4 { color: var(--text); font-size: 18px; margin: 6px 0 14px; }
.dkpi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.dkpi > div { background: var(--panel); border: 1px solid var(--border); border-radius: 9px; padding: 11px 12px; }
.dkpi b { display: block; font-family: var(--font-serif); font-size: 22px; color: var(--text); line-height: 1.1; }
.dkpi span { font-family: var(--font-mono); font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.dchart { background: var(--panel); border: 1px solid var(--border); border-radius: 9px 9px 0 0; padding: 12px 14px 0; }
.dchart svg { width: 100%; height: auto; display: block; }
.device-fade { height: 54px; margin-top: -46px; position: relative;
  background: linear-gradient(to bottom, rgba(11,16,32,0), var(--bg)); }
.hero-chip { position: absolute; left: -20px; bottom: 34px; z-index: 3; background: var(--paper-2);
  border: 1px solid var(--border-strong); border-radius: 12px; padding: 12px 15px; display: flex; gap: 11px; align-items: center;
  max-width: 290px; box-shadow: 0 18px 40px -18px rgba(20,22,27,.35); }
.hero-chip .ic { color: var(--accent); flex: 0 0 auto; }
.hero-chip div { font-size: 13px; color: var(--ink-soft); line-height: 1.35; }
.hero-chip b { color: var(--ink); }

/* ── icon tiles ── */
.ic { display: inline-block; vertical-align: middle; }
.pico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  border: 1px solid var(--border-strong); background: var(--paper); color: var(--accent); margin-bottom: 16px; }
.src .ic { color: var(--accent); flex: 0 0 auto; }
.feat .fi { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.feat .fi .ic { color: var(--accent); }
.feat .fi span { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

/* ── engine "blueprint" canvas ── */
.engine-stage { padding: 30px; border: 1px solid var(--border); border-radius: 18px;
  background-color: var(--paper-2);
  background-image: radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 20px 20px; }

/* ── section scaffolding ─────────────────────────────────────────────────── */
section.block { padding: 66px 0; }
section.block-tight { padding: 26px 0 44px; }
.ruled { border-top: 1px solid var(--border); }
.section-head { max-width: 680px; margin: 0 0 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); margin: 12px 0 0; line-height: 1.08; }
.section-head p { color: var(--ink-soft); font-size: 18px; margin: 14px 0 0; }

/* ── problem strip ───────────────────────────────────────────────────────── */
.prob { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; background: var(--paper-2); }
.prob .cell { padding: 26px 26px; border-right: 1px solid var(--border); }
.prob .cell:last-child { border-right: none; }
.prob .n { font-family: var(--font-mono); font-size: 12px; color: var(--accent); letter-spacing: .1em; }
.prob h3 { font-size: 19px; margin: 12px 0 8px; }
.prob p { margin: 0; color: var(--ink-soft); font-size: 15px; }

/* ── engine diagram ──────────────────────────────────────────────────────── */
.engine { display: grid; grid-template-columns: 210px 26px 1fr 26px 230px; gap: 18px; align-items: center; }
.engine .col-h { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 12px; }
.src-list { display: grid; gap: 10px; }
.src { display: flex; align-items: center; gap: 12px; border: 1px solid var(--border); background: var(--paper-2);
  border-radius: 10px; padding: 13px 15px; font-weight: 600; font-size: 14.5px; }
.src small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; }
.engine-core { border: 1.5px solid var(--ink); border-radius: 14px; padding: 22px 24px; background: var(--ink); color: var(--paper-2); }
.engine-core .badge-core { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #cbb68a; }
.engine-core h3 { color: var(--paper-2); font-size: 21px; margin: 8px 0 12px; }
.engine-core ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.engine-core li { font-size: 14px; color: #d9d5cc; padding-left: 20px; position: relative; font-family: var(--font-sans); }
.engine-core li::before { content: ""; position: absolute; left: 0; top: 8px; width: 8px; height: 8px; border-radius: 2px; background: var(--brand-2); }
.out { border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; background: var(--paper-2); height: 100%; }
.out h4 { margin: 0 0 6px; font-size: 17px; }
.out p { margin: 0; color: var(--ink-soft); font-size: 14px; }
.flow-arrow { align-self: center; color: var(--accent); font-size: 22px; text-align: center; }

/* ── feature list (editorial, numbered — no emoji) ───────────────────────── */
.feat-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }
.feat { display: grid; grid-template-columns: 42px 1fr; gap: 4px 14px; padding: 22px 0; border-top: 1px solid var(--border); }
.feat .fi { font-family: var(--font-mono); font-size: 13px; color: var(--accent); padding-top: 4px; }
.feat h3 { font-size: 19px; margin: 0; grid-column: 2; }
.feat p { grid-column: 2; margin: 6px 0 0; color: var(--ink-soft); font-size: 15px; }

/* ── comparison ──────────────────────────────────────────────────────────── */
.vs { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.vs .col { border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 26px; background: var(--paper-2); }
.vs .col.them { background: transparent; }
.vs .col.us { border-color: var(--ink); box-shadow: var(--shadow); }
.vs .col h3 { font-size: 20px; margin: 0 0 4px; }
.vs .col .tagline { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.vs ul { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; }
.vs li { font-size: 15px; color: var(--ink-soft); padding-left: 28px; position: relative; }
.vs .them li::before { content: "—"; position: absolute; left: 0; color: var(--muted); }
.vs .us li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 800; }
.vs .us li strong { color: var(--ink); }

/* ── outcomes ────────────────────────────────────────────────────────────── */
.outcomes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.oc { padding: 26px 26px 26px 0; border-top: 2px solid var(--ink); margin-right: 22px; }
.oc .big { font-family: var(--font-serif); font-size: 40px; font-weight: 600; letter-spacing: -.02em; }
.oc h4 { font-size: 17px; margin: 10px 0 6px; }
.oc p { margin: 0; color: var(--ink-soft); font-size: 14.5px; }

/* ── steps ───────────────────────────────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.step { padding: 24px 22px 22px 0; border-top: 1px solid var(--border-strong); margin-right: 20px; }
.step .n { font-family: var(--font-mono); font-size: 13px; color: var(--accent); }
.step .n::before { counter-increment: s; content: counter(s, decimal-leading-zero); }
.steps { counter-reset: s; }
.step h4 { margin: 14px 0 6px; font-size: 18px; }
.step p { margin: 0; color: var(--ink-soft); font-size: 14.5px; }

/* ── pricing ─────────────────────────────────────────────────────────────── */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.price { border: 1px solid var(--border); border-radius: var(--radius); padding: 30px 26px; background: var(--paper-2); display: flex; flex-direction: column; }
.price.featured { border-color: var(--ink); box-shadow: var(--shadow); }
.price h3 { font-size: 21px; margin: 0 0 2px; }
.price .who { font-family: var(--font-mono); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.price .amt { font-family: var(--font-serif); font-size: 42px; font-weight: 600; margin: 16px 0 2px; letter-spacing: -.02em; }
.price .amt small { font-size: 15px; font-weight: 400; color: var(--muted); font-family: var(--font-sans); }
.price ul { list-style: none; padding: 0; margin: 20px 0 26px; display: grid; gap: 11px; }
.price li { color: var(--ink-soft); font-size: 14.5px; padding-left: 24px; position: relative; }
.price li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 800; }
.price .btn { margin-top: auto; }

/* ── final CTA ───────────────────────────────────────────────────────────── */
.cta { background: var(--ink); color: var(--paper-2); border-radius: 18px; padding: 52px 40px; text-align: center; }
.cta h2 { color: var(--paper-2); font-size: clamp(26px, 3vw, 36px); margin: 0 0 10px; }
.cta p { color: #cfcabd; margin: 0 auto; max-width: 560px; }
.wl-form { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.wl-form input { padding: 13px 16px; border-radius: 9px; border: 1px solid #3a3f49; background: #1d2027;
  color: var(--paper-2); font-size: 15px; min-width: 240px; font-family: var(--font-sans); }
.wl-form input::placeholder { color: #8b8f98; }
.wl-form input:focus { outline: none; border-color: var(--brand-2); }
.wl-msg { margin-top: 14px; font-size: 14px; min-height: 20px; color: #cfcabd; }

/* ── footer ──────────────────────────────────────────────────────────────── */
footer { border-top: 1px solid var(--border); padding: 40px 0; margin-top: 24px; color: var(--muted); }
.foot-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; font-size: 14px; }
footer .brand-word { font-size: 17px; }

/* ═══ report window (dark island) ═══════════════════════════════════════════ */
.report-frame { max-width: 1000px; margin: 0 auto; border: 1px solid #26304d; border-radius: 16px; overflow: hidden;
  background: var(--bg-soft); box-shadow: 0 40px 80px -40px rgba(20,22,27,.5), 0 8px 24px -12px rgba(20,22,27,.25); }
.report-frame-bar { display: flex; align-items: center; gap: 12px; padding: 12px 18px; background: var(--panel-2); border-bottom: 1px solid var(--border); }
.report-frame-bar .dots { display: flex; gap: 7px; flex: 0 0 auto; }
.report-frame-bar .dots i { width: 11px; height: 11px; border-radius: 50%; background: #3b466b; display: block; }
.report-frame-bar .fname { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.report-frame-bar .tag { margin-left: auto; flex: 0 0 auto; font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; letter-spacing: .1em;
  color: #ffcf87; background: rgba(255,180,84,.12); border: 1px solid rgba(255,180,84,.3); padding: 3px 10px; border-radius: 999px; }
.report-doc { background: var(--bg); }
.report-inner { padding: 34px 38px; }
.report-head { border-bottom: 1px solid var(--border); padding-bottom: 22px; margin-bottom: 28px; }
.rep-client { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-2); }
.report-head h1 { color: var(--text); margin: 10px 0 4px; font-size: 30px; }
.rep-period { color: var(--muted); font-size: 14px; font-family: var(--font-mono); }
.kpi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 34px; }
.stat { background: var(--panel); border: 1px solid var(--border); border-radius: 11px; padding: 18px 20px; }
.stat .k { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.stat .v { font-size: 30px; font-weight: 700; margin-top: 6px; color: var(--text); font-family: var(--font-serif); }
.stat .sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.report-section { margin-bottom: 38px; }
.rep-h { display: flex; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.rep-h .num { font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: #cfe0ff; background: rgba(91,139,255,.16); border-radius: 6px; padding: 2px 8px; }
.rep-h h2 { color: var(--text); margin: 0; font-size: 22px; }
.rep-lead { color: var(--muted); font-size: 14.5px; margin: 0 0 16px; font-family: var(--font-sans); }
.rep-lead strong { color: var(--text); }
.chart-card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 22px 24px; }
.chart-card svg { width: 100%; height: auto; display: block; }
.legend { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 14px; font-size: 12.5px; color: var(--muted); font-family: var(--font-mono); }
.legend .li { display: inline-flex; align-items: center; gap: 7px; }
.legend .sw { width: 22px; height: 3px; border-radius: 2px; display: inline-block; }
.legend .dot-sw { width: 10px; height: 10px; display: inline-block; }
.corr-pairs { display: grid; gap: 10px; margin-top: 16px; }
.corr-pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; background: var(--bg-soft);
  border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; font-size: 14px; color: var(--text); }
.corr-pair .arrow { color: var(--warn); font-weight: 800; }
.corr-pair .t-when { color: var(--muted); font-size: 12px; font-family: var(--font-mono); }
.bars { display: grid; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 130px 1fr 92px; gap: 12px; align-items: center; }
.bar-name { font-size: 14px; font-weight: 600; color: var(--text); font-family: var(--font-mono); }
.bar-track { display: block; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 999px; height: 22px; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 999px; }
.bar-fill.ok { background: var(--brand-2); } .bar-fill.warn { background: #ffb454; } .bar-fill.crit { background: #ff6b6b; }
.bar-val { font-size: 13px; text-align: right; color: var(--text); }
.bar-val .state { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; font-family: var(--font-mono); letter-spacing: .05em; }
.state.ok { color: var(--brand-2); } .state.warn { color: #ffb454; } .state.crit { color: #ff6b6b; }
.rec { border-left: 3px solid #ffb454; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 18px 20px; margin-bottom: 12px; }
.rec h4 { color: var(--text); margin: 0 0 8px; font-size: 16px; font-family: var(--font-serif); }
.rec .row { font-size: 14px; margin: 4px 0; color: var(--text); }
.rec .k { color: var(--muted); display: inline-block; min-width: 128px; font-family: var(--font-mono); font-size: 12px; }
.rec .risk { color: #ffb454; }
.risk-list { display: grid; gap: 8px; }
.risk-item { display: flex; justify-content: space-between; gap: 12px; background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 8px; padding: 11px 15px; font-size: 14px; color: var(--text); }
.risk-item .sev { font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.sev.med { background: rgba(255,180,84,.14); color: #ffcf87; border: 1px solid rgba(255,180,84,.35); }
.sev.low { background: rgba(159,176,214,.12); color: var(--muted); border: 1px solid var(--border); }
.q-list { display: grid; gap: 10px; }
.q-item { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 14px 18px; font-size: 15px; color: var(--text); }
.q-item::before { content: "?"; font-family: var(--font-mono); font-weight: 800; color: var(--brand); margin-right: 10px; }

/* ── auth (light) ────────────────────────────────────────────────────────── */
.auth-wrap { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 48px 20px; }
.auth-card { width: 100%; max-width: 440px; background: var(--paper-2); border: 1px solid var(--border); border-radius: 16px; padding: 36px; box-shadow: var(--shadow); }
.auth-card h1 { margin: 0 0 6px; font-size: 27px; }
.auth-card .sub { color: var(--muted); margin: 0 0 24px; font-size: 15px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 6px; }
.field input, .field select { width: 100%; padding: 12px 14px; border-radius: 9px; border: 1px solid var(--border-strong); background: #fff; color: var(--ink); font-size: 15px; font-family: var(--font-sans); }
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); }
.alert { background: #fbe9e7; border: 1px solid #f0b7ae; color: #8f2a1c; padding: 12px 14px; border-radius: 9px; font-size: 14px; margin-bottom: 18px; }
.auth-alt { text-align: center; margin-top: 20px; color: var(--muted); font-size: 14px; }
.auth-alt a { color: var(--accent); font-weight: 600; }

/* ── app shell (dark island) ─────────────────────────────────────────────── */
.app-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; background: var(--bg); }
.sidebar { background: var(--bg-soft); border-right: 1px solid var(--border); padding: 22px 16px; display: flex; flex-direction: column; }
.sidebar .brand { margin: 4px 8px 26px; color: var(--text); }
.side-link { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 9px; color: var(--muted); font-weight: 500; font-size: 15px; margin-bottom: 4px; }
.side-link:hover { background: rgba(255,255,255,.04); color: var(--text); }
.side-link.active { background: rgba(91,139,255,.14); color: var(--text); }
.side-foot { margin-top: auto; padding: 12px 14px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.main { padding: 34px 40px; color: var(--text); }
.page-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; flex-wrap: wrap; gap: 12px; }
.page-head h1 { margin: 0; font-size: 26px; color: var(--text); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 26px; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.surface-dark .card h3, .app-shell .card h3 { color: var(--text); }
.badge { font-size: 12px; font-weight: 700; padding: 4px 11px; border-radius: 999px; font-family: var(--font-mono); }
.badge.ok { background: rgba(34,211,170,.14); color: #22d3aa; border: 1px solid rgba(34,211,170,.35); }
.badge.error { background: rgba(255,107,107,.12); color: #ff6b6b; border: 1px solid rgba(255,107,107,.35); }
.badge.na { background: rgba(159,176,214,.12); color: var(--muted); border: 1px solid var(--border); }
.intg { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 16px; }
.intg-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.intg-head h3 { margin: 0; font-size: 18px; color: var(--text); }
.intg .blurb { color: var(--muted); font-size: 14px; margin: 6px 0 16px; }
.intg-form { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.intg-form .full { grid-column: 1 / -1; }
.intg-actions { display: flex; gap: 10px; margin-top: 14px; align-items: center; }
.test-out { font-size: 14px; margin-left: 4px; }
ul.tick { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 9px; }
ul.tick li { color: var(--muted); font-size: 15px; padding-left: 26px; position: relative; }
ul.tick li::before { content: "✓"; position: absolute; left: 0; color: var(--brand-2); font-weight: 800; }

/* ── responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .engine { grid-template-columns: 1fr; }
  .flow-arrow { transform: rotate(90deg); }
  .hero-chip { position: static; max-width: none; margin: -18px 8px 0; }
  .engine-stage { padding: 18px; }
}
@media (max-width: 820px) {
  .prob, .price-grid, .outcomes, .steps, .feat-list, .vs { grid-template-columns: 1fr; }
  .prob .cell { border-right: none; border-bottom: 1px solid var(--border); }
  .oc, .step { margin-right: 0; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; overflow-x: auto; align-items: center; }
  .side-foot { display: none; }
  .nav-links .hide-sm { display: none; }
  .kpi { grid-template-columns: repeat(2, 1fr); }
  .bar-row { grid-template-columns: 96px 1fr 78px; }
  .corr-pair { grid-template-columns: 1fr; text-align: center; }
  .report-inner { padding: 22px 16px; }
  .intg-form { grid-template-columns: 1fr; }
}
