:root {
  --paper: #F5F8FB;
  --surface: #FFFFFF;
  --ink: #10202E;
  --ink-soft: #4C5C68;
  --line: #DCE4EA;
  --brand: #1D5B9D;
  --brand-deep: #154A82;
  --brand-tint: #E8F0F8;
  --header: #000000;
  --teal: #0B6156;
  --teal-deep: #084A42;
  --cyan: #28A9BD;
  --risk-critical: #C43D3D;
  --risk-critical-tint: #FBEBEA;
  --risk-medium: #B8790A;
  --risk-medium-tint: #FBF2E3;
  --risk-good: #2F8F5B;
  --risk-good-tint: #E9F6EF;
  --shadow: 0 1px 2px rgba(16,32,46,0.04), 0 8px 24px rgba(16,32,46,0.06);
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin:0; padding:0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Open Sans', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
::selection { background: var(--cyan); color: #fff; }
.topbar {
  background: var(--header);
  border-bottom: 3px solid var(--cyan);
}
.topbar-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.topbar img.logo {
  height: 36px;
  width: auto;
  display: block;
}
.topbar .kicker {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #9FB1BE;
  text-transform: uppercase;
}
.shell {
  max-width: 640px;
  margin: 0 auto;
  padding: 36px 20px 80px;
}
.shell.wide { max-width: 960px; }
h1.headline {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 800;
  font-size: clamp(26px, 5vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 4px 0 10px;
}
p.lede {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 52ch;
  margin: 0 0 28px;
}
.intro-card, .q-card, .gate-card, .cat-block, .panel-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 22px 0 26px; }
.stat { background: var(--brand-tint); border-radius: 10px; padding: 14px 12px; text-align: center; }
.stat .num { font-family: 'IBM Plex Mono', monospace; font-weight: 700; font-size: 20px; color: var(--brand); }
.stat .lbl { font-size: 11.5px; color: var(--ink-soft); margin-top: 3px; line-height: 1.3; }
button.primary, .btn.primary {
  appearance: none; border: none; cursor: pointer; width: 100%;
  background: var(--cyan); color: #fff;
  font-family: 'Open Sans', Arial, sans-serif; font-weight: 700; font-size: 15.5px;
  padding: 15px 22px; border-radius: 9px;
}
button.primary:hover, .btn.primary:hover { background: #1f8fa3; }
button.ghost, .btn.ghost {
  appearance: none; border: 1.5px solid var(--line); background: transparent;
  color: var(--ink-soft); font-weight: 600; font-size: 14.5px;
  padding: 12px 18px; border-radius: 9px; cursor: pointer;
}
button.ghost:hover { border-color: var(--brand); color: var(--brand); }
button:disabled { opacity: 0.4; cursor: not-allowed; }
button.primary:focus-visible, button.ghost:focus-visible, .opt:focus-visible {
  outline: 3px solid var(--cyan); outline-offset: 2px;
}
.progress-wrap { margin-bottom: 22px; }
.progress-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.progress-top .step { font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; color: var(--brand); font-weight: 600; }
.progress-top .cat { font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); font-weight: 700; }
.progress-track { height: 6px; background: var(--line); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--brand), var(--cyan)); border-radius: 4px; transition: width 0.35s ease; }
.q-text { font-family: 'Montserrat', Arial, sans-serif; font-weight: 700; font-size: 19px; line-height: 1.4; margin: 0 0 20px; }
.options { display: flex; flex-direction: column; gap: 10px; }
.opt {
  display: flex; align-items: flex-start; gap: 12px; text-align: left; width: 100%;
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 10px;
  padding: 13px 16px; font-size: 14.5px; line-height: 1.45; color: var(--ink); cursor: pointer;
}
.opt:hover { border-color: var(--cyan); }
.opt .dot { flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--ink-soft); margin-top: 1px; position: relative; }
.opt.selected { border-color: var(--brand); background: var(--brand-tint); }
.opt.selected .dot { border-color: var(--brand); }
.opt.selected .dot::after { content: ""; position: absolute; inset: 3px; background: var(--brand); border-radius: 50%; }
.nav-row { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; }
.field { text-align: left; margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-soft); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; font-family: 'Open Sans', Arial, sans-serif; font-size: 15px;
  padding: 12px 14px; border-radius: 8px; border: 1.5px solid var(--line);
  background: var(--paper); color: var(--ink);
}
.consent-label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.consent-label input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--brand); flex: 0 0 auto; }
.consent-label span { font-size: 12.5px; line-height: 1.5; color: var(--ink-soft); }
.score-card {
  background-image: linear-gradient(135deg, var(--brand), var(--brand-deep));
  border-radius: var(--radius); padding: 34px 28px; color: #fff;
  box-shadow: var(--shadow); text-align: center;
}
.score-card .eyebrow { font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: #CFE3F2; margin-bottom: 10px; }
.score-num { font-family: 'IBM Plex Mono', monospace; font-weight: 700; font-size: 64px; line-height: 1; }
.score-num span { font-size: 26px; opacity: 0.8; }
.score-level { font-family: 'Montserrat', Arial, sans-serif; font-weight: 800; font-size: 21px; margin-top: 10px; }
.score-desc { font-size: 14.5px; color: #D7E7F3; max-width: 44ch; margin: 10px auto 0; line-height: 1.55; }
.section-title {
  font-family: 'Montserrat', Arial, sans-serif; font-weight: 800; font-size: 14px;
  letter-spacing: 0.03em; text-transform: uppercase; color: var(--ink-soft); margin: 34px 0 14px;
}
.cat-row { padding: 11px 0; }
.cat-row + .cat-row { border-top: 1px solid var(--line); }
.cat-row-top { display: flex; justify-content: space-between; margin-bottom: 7px; }
.cat-row-top .pct { font-family: 'IBM Plex Mono', monospace; font-size: 13px; font-weight: 600; }
.bar-track { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; }
.risk-item, .risk-empty, .rec-item {
  border-radius: 10px; padding: 14px 16px; margin-bottom: 10px;
}
.risk-item { display: flex; gap: 12px; background: var(--risk-critical-tint); border: 1px solid color-mix(in srgb, var(--risk-critical) 35%, transparent); }
.risk-empty { background: var(--risk-good-tint); border: 1px solid color-mix(in srgb, var(--risk-good) 35%, transparent); }
.rec-item { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; gap: 14px; }
.rec-item .n {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%;
  background: var(--brand-tint); color: var(--brand);
  font-family: 'IBM Plex Mono', monospace; font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.cta-card {
  background-image: linear-gradient(135deg, var(--teal), var(--teal-deep));
  border-radius: var(--radius); padding: 28px 26px; color: #fff; text-align: center; margin-top: 28px;
}
.cta-card h3 { font-family: 'Montserrat', Arial, sans-serif; font-size: 20px; margin: 0 0 8px; }
.cta-card p { font-size: 14px; color: #DCF3EC; margin: 0 0 18px; line-height: 1.55; }
.foot-note { text-align: center; font-size: 12px; color: var(--ink-soft); margin-top: 26px; line-height: 1.6; }
.err { color: var(--risk-critical); font-size: 13px; margin: 8px 0; }
[hidden] { display: none !important; }
.table-wrap { overflow-x: auto; }
table.leads { width: 100%; border-collapse: collapse; font-size: 14px; }
table.leads th, table.leads td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
table.leads th { font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-soft); }
table.leads tr { cursor: pointer; }
table.leads tr:hover td { background: var(--brand-tint); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.toolbar input, .toolbar select { flex: 1; min-width: 140px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
@media (max-width: 720px) {
  .stats, .stat-row { grid-template-columns: 1fr 1fr; }
}
