/* ============================================================
   Kybercel — Quiz / Assessment app
   ============================================================ */

.quiz-root { min-height: 100vh; display: flex; flex-direction: column; position: relative; z-index: 1; }

/* ---------- top bar + progress ---------- */
.qz-top {
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid var(--line-soft);
  background: oklch(0.142 0.014 262 / 0.78);
  backdrop-filter: blur(14px);
}
.qz-top-inner {
  max-width: 760px; margin: 0 auto; padding: 0 var(--pad);
  height: 64px; display: flex; align-items: center; gap: 18px;
}
.qz-top .brand { display: flex; align-items: center; gap: 10px; }
.qz-top .brand .mark { width: 20px; height: 20px; color: var(--acc); flex: none; }
.qz-top .brand .name { font-family: var(--font-display); font-weight: 600; color: var(--ink); font-size: 1.02rem; }
.qz-progress { flex: 1; height: 4px; border-radius: 3px; background: var(--bg-2); overflow: hidden; }
.qz-progress i { display: block; height: 100%; background: var(--acc); border-radius: 3px; transition: width .45s cubic-bezier(.2,.7,.2,1); }
.qz-count { font-family: var(--font-mono); font-size: 0.74rem; color: var(--ink-low); letter-spacing: 0.04em; white-space: nowrap; }
.qz-exit { font-family: var(--font-mono); font-size: 0.74rem; color: var(--ink-faint); letter-spacing: 0.04em; text-decoration: none; white-space: nowrap; }
.qz-exit:hover { color: var(--ink-mid); }
.qz-reset { background: none; border: 1px solid var(--line); border-radius: var(--r); padding: 5px 10px; color: var(--ink-low); font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em; cursor: pointer; white-space: nowrap; transition: border-color .14s, color .14s; }
.qz-reset:hover { border-color: var(--warn-dim); color: var(--warn); }

/* ---------- stage ---------- */
.qz-stage { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: clamp(36px, 7vw, 88px) var(--pad) 80px; }
.qz-card { width: 100%; max-width: 720px; }

/* ---------- question ---------- */
.qz-phase { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--acc); display: inline-flex; align-items: center; gap: 0.7em; margin-bottom: 22px; }
.qz-phase::before { content: ""; width: 16px; height: 1px; background: var(--acc-line); }
.qz-q { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; font-size: clamp(1.6rem, 3.4vw, 2.4rem); color: var(--ink); text-wrap: balance; }
.qz-sub { color: var(--ink-low); font-size: 0.95rem; margin-top: 12px; font-family: var(--font-mono); }
.qz-options { display: grid; gap: 10px; margin-top: 30px; }
.qz-opt {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--bg-1); color: var(--ink-mid); cursor: pointer;
  font-family: var(--font-body); font-size: 1.02rem;
  transition: border-color .14s ease, background .14s ease, transform .08s ease;
}
.qz-opt:hover { border-color: var(--ink-faint); background: var(--bg-2); color: var(--ink); }
.qz-opt:active { transform: translateY(1px); }
.qz-opt.sel { border-color: var(--acc-line); background: var(--acc-dim); color: var(--ink); }
.qz-key {
  flex: none; width: 26px; height: 26px; border-radius: 5px; border: 1px solid var(--line);
  display: grid; place-items: center; font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-low);
}
.qz-opt:hover .qz-key { border-color: var(--ink-faint); color: var(--ink-mid); }
.qz-opt.sel .qz-key { border-color: var(--acc); color: var(--acc); background: oklch(0.795 0.142 67 / 0.12); }
.qz-opt .qz-lbl { flex: 1; }
.qz-check { flex: none; color: var(--acc); width: 18px; height: 18px; opacity: 0; transition: opacity .14s ease; }
.qz-opt.sel .qz-check { opacity: 1; }

.qz-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 28px; gap: 14px; }
.qz-back {
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink-low); letter-spacing: 0.04em;
  background: none; border: none; cursor: pointer; padding: 10px 4px; display: inline-flex; align-items: center; gap: 8px;
}
.qz-back:hover { color: var(--ink); }
.qz-back[disabled] { opacity: 0; pointer-events: none; }

/* ---------- compiling ---------- */
.qz-compile { width: 100%; max-width: 640px; margin: clamp(40px,8vw,100px) auto 0; }
.qz-compile .codex { position: relative; }
.qz-compile .codex-body { min-height: 230px; }
.cmp-line { display: flex; gap: 10px; align-items: baseline; opacity: 0; transform: translateY(3px); transition: opacity .3s ease, transform .3s ease; }
.cmp-line.show { opacity: 1; transform: none; }
.cmp-line .ok { color: var(--acc); flex: none; }
.cmp-line .t { color: var(--ink-mid); }
.cmp-caption { text-align: center; margin-top: 24px; font-family: var(--font-mono); font-size: 0.82rem; color: var(--ink-low); }

/* ---------- report ---------- */
.rp { width: 100%; max-width: 860px; }
.rp-head { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.rp-head-top { padding: clamp(24px,3vw,36px); display: flex; flex-wrap: wrap; gap: 28px; align-items: center; justify-content: space-between;
  background:
    radial-gradient(90% 140% at 100% 0%, color-mix(in oklch, var(--acc) 12%, transparent), transparent 60%),
    oklch(0.165 0.015 262); }
.rp-eyebrow { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-low); }
.rp-title { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; font-size: clamp(1.5rem, 3vw, 2.1rem); color: var(--ink); margin-top: 10px; max-width: 18ch; }
.rp-score { text-align: center; flex: none; white-space: nowrap; }
.rp-score .num { font-family: var(--font-display); font-weight: 600; font-size: clamp(3rem, 7vw, 4.4rem); line-height: 1; letter-spacing: -0.03em; }
.rp-score .den { color: var(--ink-faint); font-size: 1.3rem; font-family: var(--font-mono); margin-left: 2px; }
.rp-tier { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 6px 12px; border-radius: 100px; margin-top: 12px; border: 1px solid currentColor; }
.rp-tier::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tier-exposed  { color: var(--warn); } .num.tier-exposed { color: var(--warn); }
.tier-reactive { color: oklch(0.78 0.16 50); } .num.tier-reactive { color: oklch(0.78 0.16 50); }
.tier-managed  { color: var(--acc); } .num.tier-managed { color: var(--acc); }
.tier-governed { color: var(--acc); } .num.tier-governed { color: var(--acc); }
.rp-blurb { padding: 22px clamp(24px,3vw,36px); border-top: 1px solid var(--line-soft); color: var(--ink-mid); font-size: 1.05rem; line-height: 1.5; background: oklch(0.16 0.013 262); }

.rp-section-label { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-faint); margin: 36px 0 16px; }

/* dimension bars */
.rp-dims { display: grid; gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: var(--r-lg); overflow: hidden; }
.rp-dim { background: var(--bg); padding: 20px clamp(18px,2.5vw,28px); }
.rp-dim-top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.rp-dim-name { font-weight: 600; color: var(--ink); font-size: 1.05rem; }
.rp-dim-val { font-family: var(--font-mono); font-size: 0.95rem; color: var(--ink-mid); }
.rp-bar { height: 6px; border-radius: 4px; background: var(--bg-2); margin: 12px 0 10px; overflow: hidden; }
.rp-bar i { display: block; height: 100%; border-radius: 4px; transition: width .9s cubic-bezier(.2,.7,.2,1); }
.rp-dim-diag { color: var(--ink-low); font-size: 0.93rem; }

/* gaps */
.rp-gaps { display: grid; gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: var(--r-lg); overflow: hidden; }
.rp-gap { background: var(--bg); padding: 15px clamp(18px,2.5vw,24px); display: flex; gap: 13px; align-items: flex-start; color: var(--ink); line-height: 1.45; }
.rp-gap .x { color: var(--warn); flex: none; font-family: var(--font-mono); font-weight: 700; }
.rp-gap.clean { color: var(--ink-mid); }
.rp-gap.clean .x { color: var(--acc); }

/* recommendation */
.rp-rec { border: 1px solid var(--acc-line); border-radius: var(--r-lg); padding: clamp(24px,3vw,34px);
  background: radial-gradient(80% 130% at 100% 0%, color-mix(in oklch, var(--acc) 14%, transparent), transparent 58%), oklch(0.165 0.015 262); }
.rp-rec .lbl { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--acc); }
.rp-rec h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; font-size: 1.4rem; color: var(--ink); margin: 12px 0 12px; }
.rp-rec p { color: var(--ink-mid); font-size: 1.02rem; line-height: 1.55; }

/* handoff summary */
.rp-summary { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.rp-summary .sm-h { padding: 14px 20px; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.06em; color: var(--ink-low); background: var(--bg-1); display: flex; justify-content: space-between; }
.rp-summary .sm-h .live { color: var(--acc); }
.sm-row { display: flex; justify-content: space-between; gap: 16px; padding: 13px 20px; border-bottom: 1px solid var(--line-soft); font-family: var(--font-mono); font-size: 0.86rem; }
.sm-row:last-child { border-bottom: none; }
.sm-row .k { color: var(--ink-faint); }
.sm-row .v { color: var(--ink); text-align: right; }

/* report CTAs */
.rp-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 34px; }
.rp-foot { margin-top: 26px; font-family: var(--font-mono); font-size: 0.74rem; color: var(--ink-faint); display: flex; gap: 18px; flex-wrap: wrap; }
.rp-restart { background: none; border: none; color: var(--ink-faint); font-family: var(--font-mono); font-size: 0.74rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.rp-restart:hover { color: var(--ink-mid); }

/* ---------- capture / done ---------- */
.qz-form-wrap { width: 100%; max-width: 540px; margin: clamp(20px,5vw,60px) auto 0; }
.qz-form-wrap h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; font-size: clamp(1.8rem,4vw,2.6rem); color: var(--ink); text-wrap: balance; }
.qz-form-wrap .lede { color: var(--ink-mid); margin-top: 14px; font-size: 1.05rem; }
.qz-form { display: grid; gap: 14px; margin-top: 30px; }
.qz-field label { display: block; font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.06em; color: var(--ink-low); margin-bottom: 7px; }
.qz-field input {
  width: 100%; padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--line);
  background: var(--bg-1); color: var(--ink); font-family: var(--font-body); font-size: 1rem;
}
.qz-field input:focus { outline: none; border-color: var(--acc); background: var(--bg-2); }
.qz-field input::placeholder { color: var(--ink-faint); }
.qz-form .btn { width: 100%; justify-content: center; margin-top: 6px; }
.qz-consent { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-faint); line-height: 1.5; }
.qz-skip { text-align: center; margin-top: 18px; }
.qz-skip button { background: none; border: none; color: var(--ink-low); font-family: var(--font-mono); font-size: 0.78rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.qz-skip button:hover { color: var(--ink); }

.qz-done { width: 100%; max-width: 560px; margin: clamp(30px,7vw,90px) auto 0; text-align: center; }
.qz-done .seal { width: 64px; height: 64px; margin: 0 auto 26px; border: 1px solid var(--acc-line); border-radius: 14px; display: grid; place-items: center; color: var(--acc); background: var(--acc-dim); }
.qz-done h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; font-size: clamp(1.8rem,4vw,2.6rem); color: var(--ink); }
.qz-done p { color: var(--ink-mid); margin-top: 16px; font-size: 1.05rem; line-height: 1.55; }
.qz-done .next { text-align: left; border: 1px solid var(--line); border-radius: var(--r-lg); margin-top: 30px; overflow: hidden; }
.qz-done .next .nx { display: flex; gap: 13px; padding: 15px 20px; border-bottom: 1px solid var(--line-soft); color: var(--ink-mid); font-size: 0.96rem; align-items: baseline; }
.qz-done .next .nx:last-child { border-bottom: none; }
.qz-done .next .nx .n { font-family: var(--font-mono); color: var(--acc); flex: none; }
.qz-done-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 30px; }
.qz-done-actions .btn { flex: 1; min-width: 180px; justify-content: center; }

@media (max-width: 560px) {
  .rp-head-top { flex-direction: column; align-items: flex-start; }
  .rp-score { text-align: left; }
}

/* ============================================================
   QUIZ — MOBILE
   ============================================================ */
@media (max-width: 600px) {
  .qz-top-inner { padding-inline: 14px; gap: 10px; }
  .qz-top .brand .name { display: none; }
  .rp-head-top { flex-direction: column; align-items: flex-start; gap: 16px; }
  .rp-score { text-align: left; }
  .rp-cta { flex-direction: column; }
  .rp-cta .btn { width: 100%; justify-content: center; }
  .sm-row { flex-direction: column; gap: 3px; }
  .sm-row .v { text-align: left; }
  .qz-form-wrap { padding-inline: 0; }
  .rp-rec { padding: 20px 18px; }
  .rp-dims, .rp-gaps { border-radius: var(--r); }
  .cred-grid { grid-template-columns: 1fr !important; }
  .cred-stats { grid-template-columns: 1fr 1fr !important; }
}
