/* Case Compare quiz. Builds on launch.css tokens.
   The one idea: case details sit on light "file cards" against the navy page,
   one card per record, so a reader has to hold two records in view and
   compare them, the way the method asks. */

.quiz .top { margin-bottom: clamp(28px, 6vw, 48px); }

.qz-eyebrow {
  margin: 0 0 .75rem;
  font-size: .78rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--blue-400);
}
.qz-meta { margin: 1.5rem 0; font-size: .9rem; color: var(--muted); }

/* ---- intro ---- */
.qz-intro h1 { max-width: 18ch; }
.qz-intro__body { max-width: 60ch; }
.qz-intro__body p { margin: 0 0 1rem; font-size: clamp(1.02rem, 2.2vw, 1.12rem); color: var(--muted); }
.qz-intro__body .qz-pivot {
  margin: 1.5rem 0 .25rem;
  font-size: clamp(1.25rem, 3.2vw, 1.55rem); font-weight: 800; line-height: 1.3;
  color: var(--paper);
}
.qz-intro__body .qz-pivot + p { margin-top: 1.25rem; }

/* ---- buttons ---- */
.qz-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .8rem 1.5rem;
  border: 1px solid transparent; border-radius: var(--r);
  font: inherit; font-size: 1.05rem; font-weight: 700; text-decoration: none;
  cursor: pointer; transition: background .15s ease, border-color .15s ease, opacity .15s ease;
}
.qz-btn--primary { background: var(--blue-500); color: var(--paper); }
.qz-btn--primary:hover { background: #1F68D2; color: var(--paper); }
.qz-btn--ghost { background: transparent; color: var(--paper); border-color: var(--line); }
.qz-btn--ghost:hover { border-color: var(--blue-400); color: var(--paper); }
.qz-btn:disabled { opacity: .4; cursor: not-allowed; }
.qz-btn:disabled:hover { background: var(--blue-500); }
.qz-link {
  padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; color: var(--muted); text-decoration: underline; text-underline-offset: .2em;
}
.qz-link:hover { color: var(--paper); }

/* ---- progress ---- */
.qz-progress { margin-bottom: 1.75rem; }
.qz-progress__label {
  margin: 0 0 .6rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted);
}
.qz-progress__ticks { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; margin: 0; padding: 0; list-style: none; }
.qz-progress__ticks li { height: 4px; border-radius: 2px; background: var(--line); transition: background .2s ease; }
.qz-progress__ticks li.is-done { background: var(--blue-400); }
.qz-progress__ticks li.is-here { background: var(--paper); }

/* ---- the case files ---- */
.qz-lead { margin: 0 0 1rem; color: var(--muted); }
.qz-files {
  display: grid; gap: .9rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  margin: 0 0 1.75rem;
}
.qz-file {
  position: relative;
  padding: 1.05rem 1.15rem 1.15rem;
  border-radius: 10px;
  background: #F7F9FD;
  color: #101828;
  box-shadow: 0 16px 36px -18px rgba(0, 0, 0, .7);
  border-top: 5px solid var(--blue-500);
}
.qz-file--unidentified { border-top-color: var(--blue-400); background: #F2F5FA; }
.qz-file--note {
  grid-column: 1 / -1;
  background: rgba(255, 255, 255, .05); color: var(--paper);
  border: 1px dashed rgba(195, 206, 230, .55); border-top-width: 1px;
  box-shadow: none;
}
.qz-file--ledger { border-top-color: var(--navy-700); }
.qz-file__tag {
  margin: 0 0 .6rem;
  font-size: .7rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
  color: var(--navy-700);
}
.qz-file--unidentified .qz-file__tag { color: #3E6CAB; }
.qz-file--note .qz-file__tag { color: var(--blue-400); }
.qz-file p { margin: 0 0 .55rem; line-height: 1.55; font-size: 1rem; }
.qz-file p:last-child { margin-bottom: 0; }
.qz-file--note p { color: var(--paper); }

/* Structured records (Q4): one fact per ruled line, so lines can be read across. */
.qz-fields, .qz-ledger { margin: 0; padding: 0; list-style: none; }
.qz-fields li {
  padding: .45rem 0;
  border-bottom: 1px solid #DDE4F0;
  font-weight: 600; font-variant-numeric: tabular-nums;
}
.qz-fields li:last-child { border-bottom: 0; padding-bottom: 0; }
.qz-ledger li { position: relative; padding: .3rem 0 .3rem 1.1rem; }
.qz-ledger li::before {
  content: ''; position: absolute; left: 0; top: .85em;
  width: .45rem; height: .45rem; border-radius: 50%; background: var(--blue-500);
}

/* True / false statement */
.qz-statement {
  margin: 0 0 1.75rem;
  padding: 1.25rem 1.3rem;
  border-left: 4px solid var(--blue-500);
  border-radius: 0 10px 10px 0;
  background: rgba(255, 255, 255, .05);
  font-size: clamp(1.08rem, 2.6vw, 1.25rem); font-weight: 600; line-height: 1.5;
}

/* ---- the question ---- */
.qz-q fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.qz-q legend {
  padding: 0; margin: 0 0 .35rem;
  font-size: clamp(1.15rem, 3vw, 1.35rem); font-weight: 800; line-height: 1.35;
}
.qz-q legend:focus { outline: none; }
.qz-q__how { margin: 0 0 1rem; font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue-400); }
.qz-options { display: grid; gap: .6rem; }
.qz-opt {
  display: grid; grid-template-columns: auto 1fr; gap: .85rem; align-items: start;
  padding: .9rem 1rem;
  border: 1px solid var(--line); border-radius: var(--r);
  background: rgba(255, 255, 255, .03);
  cursor: pointer; transition: border-color .15s ease, background .15s ease;
}
.qz-opt:hover { border-color: rgba(195, 206, 230, .5); }
.qz-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.qz-opt__key {
  display: grid; place-items: center;
  min-width: 2rem; height: 2rem; padding: 0 .35rem;
  border: 1.5px solid rgba(195, 206, 230, .6); border-radius: 50%;
  font-size: .85rem; font-weight: 800; color: var(--muted);
}
.qz-q--multi .qz-opt__key { border-radius: 7px; }
.qz-opt__text { padding-top: .2rem; color: var(--paper); line-height: 1.5; }
.qz-opt:has(input:checked) { border-color: var(--blue-500); background: rgba(47, 123, 232, .14); }
.qz-opt:has(input:checked) .qz-opt__key { background: var(--blue-500); border-color: var(--blue-500); color: var(--paper); }
.qz-opt:has(input:focus-visible) { outline: 3px solid var(--blue-400); outline-offset: 2px; }
.qz-tf .qz-options { grid-template-columns: 1fr 1fr; }

.qz-nav { display: flex; justify-content: space-between; gap: .75rem; margin-top: 2rem; }
.qz-hint { min-height: 1.4em; margin: .75rem 0 0; font-size: .9rem; color: var(--muted); text-align: right; }

/* ---- results ---- */
.qz-score { padding: .5rem 0 2rem; }
.qz-score__num {
  margin: 0; line-height: 1;
  font-size: clamp(4rem, 16vw, 6.5rem); font-weight: 800; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.qz-score__of { font-size: .38em; font-weight: 700; color: var(--muted); letter-spacing: 0; }
.qz-score__title { margin: 1rem 0 0; font-size: 1.3rem; font-weight: 800; }
.qz-score__title small { display: block; font-size: .95rem; font-weight: 500; color: var(--muted); }

.qz-block { padding: 2rem 0; border-top: 1px solid var(--line); }
.qz-block h2 {
  margin: 0 0 1rem;
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--blue-400);
}
.qz-block p { margin: 0 0 1rem; color: var(--muted); max-width: 62ch; }
.qz-block p:last-child { margin-bottom: 0; }
.qz-block p.qz-strong { color: var(--paper); font-weight: 700; font-size: 1.12rem; }

.qz-testing { margin: 0; padding: 0; list-style: none; display: grid; gap: .7rem; }
.qz-testing li { position: relative; padding-left: 1.5rem; color: var(--paper); }
.qz-testing li::before { content: '?'; position: absolute; left: 0; top: 0; font-weight: 800; color: var(--blue-400); }

/* Review: one collapsible row per question */
.qz-review { display: grid; gap: .6rem; }
.qz-rv { border: 1px solid var(--line); border-radius: var(--r); background: rgba(255, 255, 255, .03); }
.qz-rv summary {
  display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: center;
  padding: .85rem 1rem; cursor: pointer; list-style: none;
}
.qz-rv summary::-webkit-details-marker { display: none; }
.qz-rv__mark {
  display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%;
  font-size: .9rem; font-weight: 800;
}
.qz-rv--right .qz-rv__mark { background: rgba(143, 227, 176, .16); color: var(--ok); }
.qz-rv--wrong .qz-rv__mark { background: rgba(255, 180, 168, .14); color: var(--err); }
.qz-rv__q { font-weight: 600; line-height: 1.4; }
.qz-rv__chev { color: var(--muted); transition: transform .15s ease; }
.qz-rv[open] .qz-rv__chev { transform: rotate(180deg); }
.qz-rv__body { padding: 0 1rem 1rem 3.5rem; }
.qz-rv__body p { margin: 0 0 .7rem; color: var(--muted); }
.qz-rv__body b { color: var(--paper); }
.qz-rv__src { font-size: .85rem; line-height: 1.55; padding-top: .6rem; border-top: 1px solid var(--line); }
.qz-rv__src b { color: var(--blue-400); }
.qz-rv__src a { color: var(--paper); }
.qz-rv__opts { margin: 0 0 .8rem; padding: 0; list-style: none; display: grid; gap: .45rem; }
.qz-rv__opts li { padding: .5rem .7rem; border-radius: 8px; background: rgba(255, 255, 255, .03); color: var(--muted); font-size: .95rem; }
.qz-rv__opts li.is-key { background: rgba(143, 227, 176, .1); color: var(--paper); }
.qz-rv__opts li.is-picked:not(.is-key) { background: rgba(255, 180, 168, .1); color: var(--paper); }
.qz-rv__opts li span { display: block; margin-top: .35rem; font-size: .88rem; color: var(--muted); }
.qz-rv__tags { display: block; margin-top: .3rem; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.qz-rv__opts li.is-key .qz-rv__tags { color: var(--ok); }
.qz-rv__opts li.is-picked:not(.is-key) .qz-rv__tags { color: var(--err); }

.qz-thinking__head { color: var(--paper) !important; font-size: clamp(1.2rem, 3vw, 1.45rem) !important; font-weight: 800; line-height: 1.3; }
.qz-positioning { color: var(--paper) !important; font-weight: 700; }
.qz-positioning span { display: block; color: var(--muted); font-weight: 600; }

.qz-cta {
  margin: .5rem 0 2rem; padding: clamp(1.4rem, 4vw, 2rem);
  border-radius: calc(var(--r) + 4px);
  background: linear-gradient(135deg, rgba(47, 123, 232, .28), rgba(14, 42, 110, .5));
  border: 1px solid rgba(95, 141, 203, .4);
}
.qz-cta__q { margin: 0 0 .4rem; font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.qz-cta__head { margin: 0 0 1.25rem; font-size: clamp(1.35rem, 3.6vw, 1.8rem); font-weight: 800; line-height: 1.2; }

.qz-join { padding: 2rem 0; border-top: 1px solid var(--line); }
.qz-join__head { margin: 0 0 .35rem; font-size: 1.15rem; font-weight: 800; }
.qz-join__sub { margin: 0 0 1rem; font-size: .92rem; color: var(--muted); }
.qz-again { margin: 0 0 2.5rem; }

@media (max-width: 480px) {
  .qz-nav .qz-btn { flex: 1; }
  .qz-rv__body { padding-left: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .qz-rv__chev, .qz-progress__ticks li { transition: none; }
}
