/* AIQ brand tokens, sampled from brand/dimensions-wheel.png and brand/logo.png. */
:root {
  --navy-950: #000e24;   /* page background */
  --navy-900: #031631;   /* raised surface */
  --navy-800: #0a2244;   /* card */
  --navy-700: #12305a;   /* card border, inputs */
  --logo-navy: #1c243c;  /* logo disc */
  --rule: #0078a0;       /* divider lines */
  --cyan: #00c2f8;       /* headline accent */
  --cyan-bright: #00ecf8;/* icon glow */
  --orange: #f88000;     /* accent arcs */
  --gold: #eda507;       /* logo highlight */
  --text: #ffffff;
  --muted: #b8c8f0;      /* subtitle */
  --dim: #7f93bb;
  --danger: #ff8a7a;

  --radius: 14px;
  --radius-sm: 10px;
  --tap: 48px;
  --gutter: 16px;
  --maxw: 680px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(1200px 600px at 50% -200px, #0a2a55 0%, var(--navy-950) 60%) fixed, var(--navy-950);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
}
img { max-width: 100%; height: auto; }
a { color: var(--cyan); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--cyan-bright);
  outline-offset: 2px;
}
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px; }
[hidden] { display: none !important; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px var(--gutter);
  padding-top: max(8px, env(safe-area-inset-top));
  background: rgba(0, 14, 36, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0, 120, 160, 0.35);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; min-height: var(--tap); }
.brand img { width: 40px; height: 40px; }
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: 0.01em; }
.topnav { display: flex; gap: 4px; }
.nav-btn {
  min-height: var(--tap); padding: 0 12px; display: inline-flex; align-items: center;
  background: transparent; border: 1px solid transparent; border-radius: 999px;
  color: var(--muted); font: inherit; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer;
}
.nav-btn:hover { color: var(--text); border-color: var(--navy-700); }
@media (max-width: 380px) { .brand-name { display: none; } }

main { outline: none; }
.screen { max-width: var(--maxw); margin: 0 auto; padding: 20px var(--gutter) 40px; }
.footer { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter) 32px; text-align: center; }

/* Type */
h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; }
.hero-title { font-size: 28px; font-weight: 800; letter-spacing: -0.01em; margin-top: 8px; }
.accent { color: var(--cyan); }
.hero-sub { color: var(--muted); font-size: 18px; margin: 0 0 8px; }
.eyebrow { color: var(--orange); font-weight: 700; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; margin: 16px 0 6px; }
.headline { font-size: 32px; font-weight: 800; color: var(--text); }
.under-headline { color: var(--muted); margin: 0 0 16px; }
.section-title { font-size: 22px; margin: 36px 0 12px; padding-top: 20px; border-top: 1px solid rgba(0, 120, 160, 0.4); }
.lead-question { color: var(--muted); font-style: italic; margin: 0 0 12px; }
.step-count { color: var(--dim); font-size: 14px; margin: 0 0 4px; }
.hint { color: var(--muted); font-size: 15px; display: block; margin-top: 6px; }
.fine-print { color: var(--dim); font-size: 14px; }
.narrative { font-size: 18px; }
.team-line { color: var(--cyan); font-weight: 600; }
.empty { font-size: 18px; }
.config-note { color: var(--gold); font-size: 15px; border: 1px dashed var(--gold); border-radius: var(--radius-sm); padding: 12px; }
.noscript { padding: 20px; text-align: center; }
@media (min-width: 600px) {
  .hero-title { font-size: 36px; }
  .headline { font-size: 40px; }
}

/* Progress */
.progress { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 16px; }
.progress li { flex: 1; display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--dim); padding-top: 8px; border-top: 3px solid var(--navy-700); }
.progress li.done { color: var(--muted); border-top-color: var(--rule); }
.progress li.current { color: var(--text); border-top-color: var(--cyan); font-weight: 700; }
.progress-dot { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--navy-800); font-size: 12px; }
.progress li.current .progress-dot { background: var(--cyan); color: var(--navy-950); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 12px 22px; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 700; font-size: 17px; cursor: pointer; text-decoration: none; text-align: center;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--cyan); color: var(--navy-950); }
.btn-primary:hover:not(:disabled) { background: var(--cyan-bright); }
.btn-accent { background: var(--orange); color: var(--navy-950); }
.btn-accent:hover { background: #ff9426; }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--rule); }
.btn-secondary:hover { border-color: var(--cyan); }
.btn-ghost { background: transparent; color: var(--muted); border-color: transparent; }
.btn-ghost:hover { color: var(--text); }
.btn-small { min-height: 40px; padding: 6px 14px; font-size: 15px; }
.btn-block { width: 100%; margin-top: 12px; }
.link-btn { background: none; border: 0; color: var(--cyan); font: inherit; text-decoration: underline; cursor: pointer; padding: 10px 0; min-height: var(--tap); }
.actions { display: flex; gap: 12px; margin-top: 24px; }
.actions .btn { flex: 1; }
.actions-stack { flex-direction: column; }
.sticky-actions { position: sticky; bottom: 0; padding: 12px 0 max(12px, env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--navy-950) 70%, rgba(0, 14, 36, 0)); margin-top: 12px; }
@media (min-width: 600px) { .actions-stack { flex-direction: row; } }

/* Forms */
fieldset { border: 0; margin: 0 0 20px; padding: 0; min-width: 0; }
.q { display: block; font-size: 21px; font-weight: 700; margin: 0 0 14px; padding: 0; line-height: 1.3; }
.field { display: block; margin: 0 0 20px; }
.field-label { display: block; font-weight: 600; margin-bottom: 8px; padding: 0; }
input[type="number"], select {
  width: 100%; min-height: var(--tap); padding: 10px 14px; border-radius: var(--radius-sm);
  background: var(--navy-900); color: var(--text); border: 1px solid var(--navy-700); font: inherit; font-size: 18px;
}
input[aria-invalid="true"] { border-color: var(--danger); }
.money, .unit-input { display: flex; align-items: center; gap: 8px; }
.money > span { color: var(--muted); font-size: 18px; }
.unit-input > span { color: var(--muted); font-size: 15px; }
.choices { display: grid; gap: 10px; }
.choices-row { grid-template-columns: repeat(2, 1fr); }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice > span {
  display: flex; align-items: center; min-height: 56px; padding: 12px 16px;
  border-radius: var(--radius-sm); border: 2px solid var(--navy-700); background: var(--navy-900);
  font-weight: 600;
}
.choice input:checked + span { border-color: var(--cyan); background: rgba(0, 194, 248, 0.12); box-shadow: 0 0 0 1px var(--cyan) inset; }
.choice input:focus-visible + span { outline: 3px solid var(--cyan-bright); outline-offset: 2px; }
.slider { display: block; margin-bottom: 18px; }
.slider-top { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; margin-bottom: 4px; }
.slider output { color: var(--cyan); min-width: 2ch; text-align: right; font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; height: var(--tap); accent-color: var(--cyan); background: transparent; }

/* Landing wheel */
.wheel { display: block; width: 100%; max-width: 300px; margin: 12px auto 20px; }
.wheel-seg path { fill: var(--navy-800); stroke: rgba(0, 120, 160, 0.5); stroke-width: 1; transition: fill 0.2s; }
.wheel-seg text { fill: var(--dim); font-size: 15px; font-weight: 700; text-anchor: middle; pointer-events: none; }
.wheel-seg.lit path { fill: rgba(0, 194, 248, 0.25); stroke: var(--cyan); }
.wheel-seg.lit text { fill: var(--text); }
.wheel-seg.active path { fill: var(--cyan); }
.wheel-seg.active text { fill: var(--navy-950); }
.wheel-seg { cursor: pointer; outline: none; }
.wheel-seg:focus-visible path { stroke: var(--orange); stroke-width: 3; }
.wheel-center { fill: var(--cyan); font-size: 22px; font-weight: 800; text-anchor: middle; }

/* Dimension tiles */
.dim-list { display: grid; gap: 8px; }
.dim-tile {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 10px 14px;
  background: var(--navy-900); color: var(--text); border: 2px solid var(--navy-700); border-radius: var(--radius-sm);
  font: inherit; text-align: left; cursor: pointer;
}
.dim-tile:hover { border-color: var(--rule); }
.dim-tile.selected { border-color: var(--cyan); background: rgba(0, 194, 248, 0.12); }
.dim-num { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--cyan); color: var(--cyan); font-weight: 800; }
.dim-teaser .dim-num { border-color: var(--navy-700); color: var(--dim); }
.dim-coming-soon .dim-num { border-color: var(--orange); color: var(--orange); }
.dim-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.dim-name { font-weight: 700; }
.dim-line { color: var(--muted); font-size: 14px; }
.dim-teaser .dim-name { color: var(--muted); }
.dim-badge { flex: none; font-size: 12px; font-weight: 700; color: var(--orange); border: 1px solid var(--orange); border-radius: 999px; padding: 2px 8px; }

/* Results */
.range-bar { position: relative; height: 10px; border-radius: 999px; background: var(--navy-800); margin: 4px 0 20px; }
.range-fill { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: linear-gradient(90deg, rgba(0, 194, 248, 0.45), var(--cyan)); }
.range-mark { position: absolute; top: -5px; width: 4px; height: 20px; margin-left: -2px; border-radius: 2px; background: var(--orange); }
.tiles { display: grid; gap: 10px; grid-template-columns: 1fr; margin-bottom: 16px; }
.tile { background: var(--navy-800); border: 1px solid var(--navy-700); border-left: 4px solid var(--cyan); border-radius: var(--radius-sm); padding: 14px 16px; font-weight: 700; font-size: 18px; }
@media (min-width: 600px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
.how { background: var(--navy-900); border: 1px solid var(--navy-700); border-radius: var(--radius-sm); padding: 0 16px; margin: 16px 0; }
.how summary { cursor: pointer; font-weight: 700; min-height: var(--tap); display: flex; align-items: center; }
.how ol { padding-left: 22px; margin: 0 0 8px; }
.how li { margin-bottom: 8px; }
.prove-it { padding-left: 22px; }
.prove-it li { margin-bottom: 8px; }
.locked-note { color: var(--gold); font-weight: 600; }
.measured { background: var(--navy-900); border: 1px solid var(--navy-700); border-radius: var(--radius); padding: 16px; margin-top: 12px; }
.measured .btn { width: 100%; }
.measured-result { font-size: 18px; font-weight: 600; color: var(--cyan); }
.measured-result:empty { display: none; }

/* AIQ Brief */
.brief { background: #f7f9fc; color: #0b1730; border-radius: var(--radius); padding: 16px; margin: 0 0 8px; overflow: hidden; }
.brief-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.brief-top .btn-secondary { color: #0b1730; border-color: #0b1730; flex: none; }
.brief-title { font-size: 18px; margin: 0; color: #0b1730; }
.brief-body { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 14.5px; line-height: 1.55; }
.brief-head { font-weight: 800; margin: 14px 0 2px; }
.brief-line { margin: 0 0 2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.brief-blur { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 10px 0 4px; filter: blur(4px); user-select: none; -webkit-user-select: none; }
.blur-bar { display: block; height: 12px; border-radius: 6px; background: #9fb0cc; }
.brief-closing { font-size: 15px; font-style: italic; color: #33476b; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid #d6deea; }
.snap-brief-title { color: var(--orange); font-size: 15px; text-transform: uppercase; letter-spacing: 0.06em; margin: 20px 0 8px; }

/* Snapshot and teaser cards */
.snap-grid { display: grid; gap: 12px; margin-bottom: 20px; }
.snap-card { background: var(--navy-800); border: 1px solid var(--navy-700); border-left: 4px solid var(--cyan); border-radius: var(--radius); padding: 4px 16px 8px; }
.snap-headline { font-size: 24px; }
.teaser-grid { display: grid; gap: 12px; }
@media (min-width: 600px) { .teaser-grid { grid-template-columns: repeat(2, 1fr); } }
.teaser-card { background: var(--navy-900); border: 1px solid var(--navy-700); border-radius: var(--radius); padding: 16px; }
.teaser-num { margin: 0; color: var(--dim); font-weight: 800; }
.dim-coming-soon .teaser-num { color: var(--orange); }
.teaser-name { font-size: 20px; margin: 2px 0 6px; }
.teaser-value { color: var(--cyan); font-weight: 700; margin: 0 0 4px; }
.teaser-line { color: var(--muted); margin: 0 0 8px; }
.teaser-question { font-style: italic; margin: 0 0 8px; }
.card-soon { display: inline-block; color: var(--navy-950); background: var(--orange); font-weight: 800; border-radius: 999px; padding: 2px 12px; margin: 4px 0 8px; }
.teaser-taught { font-size: 15px; margin: 0; }
.tally { margin-top: 28px; }
.tally-frame { width: 100%; min-height: 520px; border: 0; background: transparent; }
.print-logo { display: none; }

/* Dialog (bottom sheet on phones) */
.sheet { padding: 0; border: 0; background: transparent; color: var(--text); max-width: 100%; max-height: 100%; width: 100%; margin: 0; }
.sheet::backdrop { background: rgba(0, 6, 18, 0.7); }
.sheet[open] { position: fixed; inset: auto 0 0 0; }
.sheet-inner {
  position: relative; max-width: var(--maxw); margin: 0 auto; max-height: 85vh; overflow: auto;
  background: var(--navy-900); border: 1px solid var(--navy-700); border-bottom: 0; border-radius: 18px 18px 0 0;
  padding: 20px var(--gutter) max(24px, env(safe-area-inset-bottom));
}
.dialog-body { padding-top: 4px; }
.dialog-title { font-size: 20px; padding-right: 48px; }
.sheet-close { position: absolute; top: 8px; right: 8px; width: var(--tap); height: var(--tap); border-radius: 50%; border: 0; background: transparent; color: var(--muted); font-size: 30px; line-height: 1; cursor: pointer; }
.sheet .teaser-card { border: 0; padding: 0 48px 0 0; background: transparent; }
.sources { padding-left: 20px; }
.sources li { margin-bottom: 10px; }
@media (min-width: 720px) {
  .sheet[open] { inset: 0; display: grid; place-items: center; }
  .sheet-inner { border-radius: 18px; border-bottom: 1px solid var(--navy-700); width: min(640px, 92vw); }
}

/* Printable summary */
@media print {
  body { background: #fff; color: #000; font-size: 12pt; }
  .no-print, .topbar, .sheet { display: none !important; }
  .footer { padding: 16pt 0 0; }
  .legal { color: #555; }
  .screen { max-width: none; padding: 0; }
  .print-logo { display: block; width: 72px; }
  .headline, .snap-headline, .teaser-name { color: #000; }
  .under-headline, .teaser-line, .eyebrow, .snap-brief-title, .teaser-value { color: #333; }
  .snap-card, .teaser-card { background: #fff; border: 1px solid #999; break-inside: avoid; }
  .section-title { border-top-color: #999; }
  .brief { border: 1px solid #999; break-inside: avoid; }
  .brief-blur { display: none; }
  a { color: #000; }
}

/* Choice with a one-line description */
.choice-text { display: flex; flex-direction: column; gap: 2px; }
.choice-desc { color: var(--muted); font-weight: 400; font-size: 15px; }
.q-intro { color: var(--muted); font-weight: 600; margin: 0 0 8px; }
.measured-title { font-size: 18px; margin: 0 0 12px; }
.measured + .measured { margin-top: 16px; }

/* Score gauges and gap cards (Risk Management) */
.gauges { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 8px 0 16px; }
.gauge { margin: 0; background: var(--navy-800); border: 1px solid var(--navy-700); border-radius: var(--radius-sm); padding: 12px 10px; text-align: center; }
.gauge svg { display: block; width: 100%; max-width: 180px; margin: 0 auto; }
.gauge-track { fill: none; stroke: var(--navy-700); stroke-width: 12; stroke-linecap: round; }
.gauge-value { fill: none; stroke: var(--cyan); stroke-width: 12; stroke-linecap: round; }
.gauge-mark { stroke: var(--orange); stroke-width: 4; stroke-linecap: round; }
.gauge-num { fill: var(--text); font-size: 24px; font-weight: 800; text-anchor: middle; }
.gauge figcaption { display: flex; flex-direction: column; gap: 2px; }
.gauge-label { font-weight: 700; font-size: 15px; }
.gauge-sub { color: var(--muted); font-size: 14px; }
.gap-list { display: grid; gap: 10px; margin: 16px 0; }
.gap-card { background: var(--navy-900); border: 1px solid var(--navy-700); border-left: 4px solid var(--orange); border-radius: var(--radius-sm); padding: 12px 16px; }
.gap-card p { margin: 0 0 8px; }
.gap-area { color: var(--orange); font-weight: 700; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; }
.gap-headline { font-size: 18px; margin: 0 0 8px; }
.gap-label { display: block; color: var(--muted); font-size: 13px; font-weight: 700; }
.submitted { text-align: center; padding-top: 40px; }
.submitted-logo { display: block; margin: 0 auto 20px; }

/* Footer legal line: small, muted, centered, on every screen, in print and when embedded */
.legal { margin: 12px auto 0; max-width: 520px; color: var(--dim); font-size: 12px; line-height: 1.45; text-align: center; }

/* Trademark symbol as a small superscript */
sup.tm { font-size: 0.55em; line-height: 0; vertical-align: super; margin-left: 0.05em; font-weight: inherit; }
