/* Transform AI — Initial AI Assessment
   Design tokens lifted verbatim from transformai.dev so the assessment reads as
   one product with the marketing site. */

:root {
  --brand: #1a3ad8;
  --brand-2: #3a66ff;
  --brand-3: #6b8eff;
  --brand-soft: rgba(26, 58, 216, 0.08);
  --brand-soft-2: rgba(58, 102, 255, 0.12);

  --bg: #ffffff;
  --surface: #f6f8fc;
  --surface-2: #eef2fa;
  --border: #e3e8f3;
  --border-strong: #cdd5e6;

  --ink: #0a1230;
  --ink-soft: #1f2950;
  --ink-muted: #5b6585;
  --ink-dim: #8a93af;

  --crimson: #b1262c;
  --green: #1c7c4a;
  --purple: #6b34c9;
  --orange: #c26510;

  --radius: 18px;
  --radius-sm: 10px;
  --radius-lg: 28px;
  --max: 1200px;

  --shadow-1: 0 1px 2px rgba(10, 18, 48, 0.04), 0 4px 16px rgba(10, 18, 48, 0.05);
  --shadow-2: 0 1px 2px rgba(10, 18, 48, 0.06), 0 14px 40px -10px rgba(10, 18, 48, 0.12);
  --shadow-brand: 0 14px 40px -12px rgba(26, 58, 216, 0.35);
  --gradient-brand: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);

  --sans: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --display: 'Space Grotesk', Inter, sans-serif;
  --serif: Fraunces, Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1, 'ss01' 1;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }
[hidden] { display: none !important; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0;
}

a { color: var(--brand); }

/* ------------------------------------------------------------------ layout */

.shell {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px;
}
.shell--wide { max-width: var(--max); }

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 66px;
}
.nav__logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav__logo img { height: 26px; width: auto; display: block; }
.nav__tag {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  padding-left: 12px;
  border-left: 1px solid var(--border-strong);
}
@media (max-width: 560px) { .nav__tag { display: none; } }

.smcaps {
  font-family: var(--display);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
}

/* ----------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.2s ease;
}
.btn--lg { height: 52px; padding: 0 26px; font-size: 15px; }
.btn--primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.08), var(--shadow-brand);
}
.btn--primary:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 22px 50px -14px rgba(26,58,216,.5); }
.btn--ghost { background: #fff; color: var(--ink); border-color: var(--border-strong); box-shadow: var(--shadow-1); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--brand-3);
  outline-offset: 2px;
}

/* -------------------------------------------------------------- intro card */

.intro { padding: 64px 0 90px; }
.intro__eyebrow { margin-bottom: 18px; }
.intro__title {
  font-size: clamp(32px, 6vw, 50px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin-bottom: 22px;
}
.intro__body { font-size: 18px; color: var(--ink-soft); margin: 0 0 22px; max-width: 58ch; }
.intro__meta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 26px;
}
.intro__reassurance { color: var(--ink-muted); max-width: 58ch; margin: 0 0 32px; }
.intro__steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin: 38px 0 0;
  padding: 0;
  list-style: none;
}
.intro__step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.intro__step b { display: block; font-family: var(--display); font-size: 14.5px; margin-bottom: 4px; }
.intro__step span { font-size: 13.5px; color: var(--ink-muted); line-height: 1.5; }

/* ---------------------------------------------------------------- progress */

.progress { position: sticky; top: 66px; z-index: 30; background: #fff; border-bottom: 1px solid var(--border); }
.progress__inner { display: flex; align-items: center; gap: 14px; padding: 13px 0; }
.progress__track { flex: 1; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress__fill { height: 100%; width: 0; background: var(--gradient-brand); border-radius: 999px; transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
.progress__label { font-family: var(--display); font-size: 12.5px; font-weight: 600; color: var(--ink-muted); white-space: nowrap; }

/* ---------------------------------------------------------------- sections */

.section { padding: 44px 0 110px; }
.section__num {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--brand);
  text-transform: uppercase;
}
.section__title { font-size: clamp(26px, 4.4vw, 36px); line-height: 1.12; margin: 10px 0 8px; letter-spacing: -0.03em; }
.section__blurb { color: var(--ink-muted); margin: 0 0 6px; font-size: 16.5px; }

.q { padding: 34px 0; border-top: 1px solid var(--border); }
.q:first-of-type { border-top: none; padding-top: 22px; }
.q__title { font-size: 19.5px; line-height: 1.35; font-weight: 600; letter-spacing: -0.018em; margin: 0 0 4px; }
.q__req { color: var(--brand-2); margin-left: 4px; }
.q__help { color: var(--ink-muted); font-size: 14.5px; margin: 6px 0 0; }
.q__error {
  display: flex; align-items: center; gap: 7px;
  color: var(--crimson); font-size: 14px; font-weight: 500; margin-top: 10px;
}
.q--invalid .opt, .q--invalid .field input, .q--invalid textarea { border-color: rgba(177, 38, 44, 0.45); }

/* ------------------------------------------------------------- option grid */

.opts { display: grid; gap: 10px; margin-top: 16px; }
.opts--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .opts--2 { grid-template-columns: 1fr; } }

.opt {
  display: flex;
  position: relative; /* containing block for the visually hidden input, so
                         focusing it never scrolls somewhere unexpected */
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  line-height: 1.45;
  font-size: 15.5px;
}
.opt:hover { border-color: var(--border-strong); background: var(--surface); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt__mark {
  flex: none;
  width: 20px; height: 20px;
  margin-top: 1px;
  border: 1.5px solid var(--border-strong);
  background: #fff;
  display: grid;
  place-items: center;
  transition: all 0.15s ease;
}
.opt--radio .opt__mark { border-radius: 50%; }
.opt--check .opt__mark { border-radius: 6px; }
.opt__mark::after { content: ''; opacity: 0; transition: opacity 0.12s ease; }
.opt--radio .opt__mark::after { width: 9px; height: 9px; border-radius: 50%; background: #fff; }
.opt--check .opt__mark::after {
  width: 10px; height: 6px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}
.opt.is-selected { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand); }
/* The real input is visually hidden, so the label carries the focus ring —
   without this, restoring focus after a re-render would be invisible. */
.opt:has(input:focus-visible) { outline: 3px solid var(--brand-3); outline-offset: 2px; }
.opt.is-selected .opt__mark { background: var(--brand); border-color: var(--brand); }
.opt.is-selected .opt__mark::after { opacity: 1; }
.opt.is-disabled { opacity: 0.45; cursor: not-allowed; }

/* ---------------------------------------------------------------- scale UI */

.scale { margin-top: 18px; }
.scale__row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.scale__btn {
  appearance: none;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 14px 6px 12px;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.15s ease;
}
.scale__btn:hover { border-color: var(--border-strong); background: var(--surface); }
.scale__btn.is-selected { background: var(--gradient-brand); border-color: transparent; color: #fff; box-shadow: var(--shadow-brand); }
.scale__ends {
  display: flex; justify-content: space-between; gap: 14px;
  margin-top: 10px; font-size: 13px; color: var(--ink-muted);
}
.scale__ends span:last-child { text-align: right; }
.scale__na { margin-top: 12px; }

/* ------------------------------------------------------------------ fields */

.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
@media (max-width: 640px) { .fields { grid-template-columns: 1fr; } }
.field--full { grid-column: 1 / -1; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.field input, textarea, select {
  width: 100%;
  font-family: var(--sans);
  font-size: 15.5px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft-2); outline: none; }
textarea { min-height: 120px; resize: vertical; line-height: 1.55; margin-top: 16px; }
.field__error { color: var(--crimson); font-size: 13px; margin-top: 5px; }
.counter { font-size: 12.5px; color: var(--ink-dim); text-align: right; margin-top: 6px; }
.other-box { margin-top: 12px; }

/* --------------------------------------------------------------- nav bar */

.stepnav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid var(--border);
  padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 35;
}
.stepnav__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stepnav__hint { font-size: 13px; color: var(--ink-dim); }
@media (max-width: 560px) { .stepnav__hint { display: none; } }

/* ------------------------------------------------------------------ outro */

.outro { padding: 70px 0 100px; }
.outro__tick {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--gradient-brand);
  display: grid; place-items: center;
  box-shadow: var(--shadow-brand);
  margin-bottom: 24px;
}
.outro__title { font-size: clamp(27px, 4.6vw, 38px); line-height: 1.14; letter-spacing: -0.03em; margin-bottom: 18px; }
.outro__list { margin: 12px 0 26px; padding: 0; list-style: none; }
.outro__list li { position: relative; padding-left: 26px; margin-bottom: 9px; color: var(--ink-soft); }
.outro__list li::before {
  content: ''; position: absolute; left: 4px; top: 11px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--brand-2);
}
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 26px 0;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip {
  background: #fff; border: 1px solid var(--border-strong);
  border-radius: 999px; padding: 6px 14px;
  font-size: 13.5px; font-weight: 500; color: var(--ink-soft);
}

/* ------------------------------------------------------------ report pages */

.report { padding: 40px 0 80px; }
.report__page { page-break-after: always; }
.report__page + .report__page { margin-top: 60px; padding-top: 44px; border-top: 1px solid var(--border); }

.stage {
  background: var(--gradient-brand);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 34px 34px 30px;
  box-shadow: var(--shadow-brand);
}
.stage__label { font-family: var(--display); font-size: 11.5px; letter-spacing: 0.18em; text-transform: uppercase; opacity: 0.82; }
.stage__name { font-family: var(--display); font-size: clamp(38px, 8vw, 62px); line-height: 1; letter-spacing: -0.035em; margin: 10px 0 12px; color: #fff; }
.stage__summary { font-size: 16.5px; opacity: 0.94; max-width: 54ch; margin: 0; }
.stage__ladder { display: flex; gap: 6px; margin-top: 26px; }
.stage__rung { flex: 1; height: 5px; border-radius: 999px; background: rgba(255, 255, 255, 0.28); }
.stage__rung.is-on { background: #fff; }
.stage__rungs-legend { display: flex; justify-content: space-between; margin-top: 10px; font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.7; font-family: var(--display); }
@media (max-width: 560px) { .stage__rungs-legend span:nth-child(even) { display: none; } }

.indicators { display: grid; gap: 10px; margin-top: 26px; }
.indicator {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
}
.indicator__name { font-family: var(--display); font-weight: 600; font-size: 15px; }
.indicator__meaning { font-size: 13px; color: var(--ink-dim); margin-top: 2px; }
.indicator__word { font-size: 14.5px; font-weight: 600; text-align: right; white-space: nowrap; }
.indicator__dots { display: flex; gap: 4px; justify-content: flex-end; margin-top: 6px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border-strong); }
.dot.is-on { background: var(--brand-2); border-color: var(--brand-2); }
.dot.is-half { background: linear-gradient(90deg, var(--brand-2) 50%, var(--surface-2) 50%); border-color: var(--brand-3); }
.indicator--attention .indicator__word { color: var(--crimson); }
.indicator--attention .dot.is-on, .indicator--attention .dot.is-half { background: var(--crimson); border-color: var(--crimson); }

.oplist { list-style: none; padding: 0; margin: 16px 0 0; counter-reset: op; }
.oplist li {
  counter-increment: op;
  position: relative;
  padding: 14px 16px 14px 52px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  background: #fff;
  font-size: 15.5px;
}
.oplist li::before {
  content: counter(op, decimal-leading-zero);
  position: absolute; left: 16px; top: 14px;
  font-family: var(--display); font-size: 12px; font-weight: 600;
  letter-spacing: 0.08em; color: var(--brand);
}

.pathway {
  border: 1px solid var(--brand);
  background: var(--brand-soft);
  border-radius: var(--radius);
  padding: 26px;
  margin-top: 18px;
}
.pathway__name { font-family: var(--display); font-size: 24px; letter-spacing: -0.025em; margin: 6px 0 12px; }
.pathway__why { color: var(--ink-soft); margin: 0; }
.nextphase { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
.nextphase span { font-size: 13.5px; color: var(--ink-muted); }
.nextphase .chip { background: #fff; }

/* ------------------------------------------------------------------- admin */

.admin { padding: 28px 0 80px; }
.admin__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.toolbar input[type='search'], .toolbar select {
  height: 40px; padding: 0 12px; font-size: 14px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: #fff;
}
.toolbar input[type='search'] { min-width: 220px; flex: 1; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 860px; }
th {
  text-align: left; font-family: var(--display); font-size: 11.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-dim); font-weight: 600;
  padding: 13px 14px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
td { padding: 13px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: var(--surface); }
tbody tr:last-child td { border-bottom: none; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; color: var(--ink-muted); }

.pill {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; font-family: var(--display); letter-spacing: 0.06em;
  text-transform: uppercase; white-space: nowrap;
}
.pill--stage { background: var(--brand-soft); color: var(--brand); }
.flagdots { display: inline-flex; gap: 4px; }
.flagdot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.flagdot--green { background: var(--green); }
.flagdot--blue { background: var(--brand); }
.flagdot--purple { background: var(--purple); }
.flagdot--orange { background: var(--orange); }
.flagdot--red { background: var(--crimson); }

.flagrow { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.flagtag {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border-strong); border-radius: 999px;
  padding: 6px 14px 6px 10px; font-size: 13px; background: #fff;
}
.flagtag b { font-family: var(--display); font-size: 11.5px; letter-spacing: 0.08em; }

.drawer {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(10, 18, 48, 0.42);
  display: flex; justify-content: flex-end;
}
.drawer__panel {
  width: min(720px, 100%);
  background: #fff;
  overflow-y: auto;
  padding: 26px 26px 60px;
  box-shadow: var(--shadow-2);
}
.drawer__close { position: sticky; top: 0; float: right; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 16px; font-size: 14.5px; margin: 16px 0; }
.kv dt { color: var(--ink-dim); font-size: 13px; }
.kv dd { margin: 0; color: var(--ink-soft); }
.answers { margin-top: 18px; }
.answers h4 { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand); margin: 22px 0 8px; }
.answers dl { display: grid; gap: 10px; margin: 0; }
.answers .qa { border-left: 2px solid var(--border); padding-left: 14px; }
.answers .qa dt { font-size: 13.5px; color: var(--ink-muted); }
.answers .qa dd { margin: 3px 0 0; font-size: 14.5px; }

.login { max-width: 400px; margin: 90px auto; }

/* ------------------------------------------------------------------ misc */

.footer { border-top: 1px solid var(--border); padding: 26px 0 40px; color: var(--ink-dim); font-size: 13.5px; }
.footer a { color: var(--ink-muted); }
.error-banner {
  background: rgba(177, 38, 44, 0.07);
  border: 1px solid rgba(177, 38, 44, 0.3);
  color: var(--crimson);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 14.5px;
  margin: 16px 0;
}
.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: var(--surface-2); border-radius: var(--radius-sm); height: 18px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ------------------------------------------------------------------ print */

@media print {
  .nav, .stepnav, .progress, .no-print, .footer { display: none !important; }
  body { font-size: 12pt; }
  .report { padding: 0; }
  .report__page + .report__page { border-top: none; margin-top: 0; padding-top: 0; }
  .stage { box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .indicator, .oplist li, .pathway { break-inside: avoid; }
  @page { margin: 16mm; }
}
