/* HSK Mastery — landing "try the onboarding" placement demo styles.
   Owned by the try-onboarding feature; loaded by index.php.
   Reuses .wrap / .section-head / .eyebrow / .btn / .door* from styles.css —
   everything below is new surface: the quiz card, choices, result card. */

.tob-card {
  background: var(--paper-raised);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  box-shadow: 0 1px 0 rgba(251,245,230,0.9) inset, 0 22px 50px -28px rgba(31,27,22,0.4);
  padding: 28px;
  max-width: 640px;
}
.tob-fallback { margin: 0; color: var(--ink-faded); font-size: 15px; }

/* Doors reuse .door / .door-zh / .door-body / .door-level / .level-picks /
   .level-pick / .door-note verbatim from styles.css — no overrides needed. */
.tob-card .door:last-of-type { margin-bottom: 12px; }
.tob-card .door-level[hidden] { display: none; }

.tob-eyebrow {
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin: 0 0 14px; font-family: var(--serif-body);
}

/* ---------- the first-lesson moment (door 零) ---------- */
.tob-lesson-zh {
  font-family: var(--han); font-size: clamp(30px, 7vw, 44px);
  color: var(--ink); line-height: 1.4; margin: 0 0 10px;
}
.tob-lesson-pinyin {
  font-family: var(--serif-display); font-style: italic;
  font-size: 18px; color: var(--ink-whisper); margin: 0 0 10px;
}
.tob-lesson-en { font-size: 18px; color: var(--ink); margin: 0 0 6px; }
.tob-lesson-note {
  font-size: 14px; color: var(--ink-faded); margin: 0 0 22px;
  padding: 10px 12px; background: var(--paper-sunken); border-radius: 8px;
}
.tob-lesson .btn { margin-top: 4px; }

/* ---------- progress dots ---------- */
.tob-progress { display: flex; gap: 7px; margin: 0 0 20px; flex-wrap: wrap; }
.tob-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--paper-sunken); border: 1.5px solid var(--hairline);
}
.tob-dot.done { background: var(--accent); border-color: var(--accent); }
.tob-dot.current { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(168,50,42,0.15); }

/* ---------- question ---------- */
.tob-q-zh {
  font-family: var(--han); font-size: clamp(24px, 6vw, 32px);
  color: var(--ink); line-height: 1.55; margin: 0 0 8px;
}
.tob-q-pinyin {
  font-family: var(--serif-display); font-style: italic;
  font-size: 15px; color: var(--ink-whisper); margin: 0 0 10px;
}
.tob-q-prompt { font-size: 15.5px; color: var(--ink-faded); margin: 0 0 18px; line-height: 1.5; }

.tob-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 4px; }
@media (max-width: 480px) { .tob-choices { grid-template-columns: 1fr; } }
.tob-choice {
  font: inherit; font-family: var(--han); font-size: 17px;
  padding: 14px 16px; min-height: 52px;
  background: var(--paper); border: 1.5px solid var(--hairline); border-radius: 10px;
  cursor: pointer; color: var(--ink); text-align: left; transition: all .15s;
  line-height: 1.35;
}
.tob-choice:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.tob-choice.correct { background: var(--correct-bg); border-color: var(--correct); color: var(--correct); }
.tob-choice.wrong { background: var(--wrong-bg); border-color: var(--wrong); color: var(--wrong); }
.tob-choice:disabled { cursor: default; }

.tob-explain {
  display: none; margin-top: 16px; padding: 16px; border-radius: 10px;
  background: var(--paper-sunken); border-left: 3px solid var(--correct);
}
.tob-explain.show { display: block; }
.tob-explain-verdict {
  font-family: var(--serif-body); font-size: 13px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 8px; color: var(--correct);
}
.tob-explain-verdict.no { color: var(--wrong); }
.tob-explain.wrong { border-left-color: var(--wrong); }
.tob-explain-body { font-size: 15px; color: var(--ink-faded); line-height: 1.6; margin: 0 0 14px; }
.tob-explain .btn { width: 100%; justify-content: center; }
@media (min-width: 481px) { .tob-explain .btn { width: auto; } }

/* ---------- result card ---------- */
.tob-score {
  font-family: var(--serif-display); font-weight: 600;
  font-size: 56px; line-height: 1; margin: 0 0 14px; color: var(--ink);
}
.tob-score span { font-size: 28px; color: var(--ink-whisper); }
.tob-verdict {
  font-family: var(--serif-display); font-weight: 600;
  font-size: clamp(21px, 4vw, 26px); line-height: 1.3; margin: 0 0 10px; color: var(--ink);
}
.tob-sub { font-size: 16px; color: var(--ink-faded); line-height: 1.55; margin: 0 0 26px; }

.tob-levelbar-wrap { margin: 0 0 22px; }
.tob-levelbar {
  position: relative; display: flex; height: 16px;
  border-radius: 8px; overflow: visible; gap: 2px;
}
.tob-seg { flex: 1; height: 100%; opacity: 0.85; }
.tob-seg:first-child { border-radius: 8px 0 0 8px; }
.tob-seg:last-child { border-radius: 0 8px 8px 0; }
.tob-marker {
  position: absolute; top: -7px; width: 0; height: 0;
  transform: translateX(-50%);
  border-left: 7px solid transparent; border-right: 7px solid transparent;
  border-top: 10px solid var(--ink);
}
.tob-levelbar-labels {
  display: flex; justify-content: space-between; margin-top: 8px;
  font-size: 11px; color: var(--ink-whisper); font-family: var(--serif-body);
}
.tob-levelbar-labels span { flex: 1; text-align: center; }
.tob-levelbar-labels span.on { color: var(--ink); font-weight: 700; }

.tob-honest {
  font-size: 13.5px; color: var(--ink-whisper); line-height: 1.6;
  margin: 0 0 22px; padding: 12px 14px; background: var(--paper-sunken); border-radius: 8px;
}
.tob-cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 0 0 16px; }
.tob-cta .btn { flex: 1 1 auto; justify-content: center; }
@media (min-width: 481px) { .tob-cta .btn { flex: 0 0 auto; } }
.tob-quiet { font-size: 13.5px; color: var(--ink-whisper); font-style: italic; margin: 0; }

/* ---------- limit / error states ---------- */
.tob-limit h3 {
  font-family: var(--serif-display); font-size: 24px; font-weight: 600; margin: 0 0 10px;
}
.tob-limit p { font-size: 15.5px; color: var(--ink-faded); line-height: 1.6; margin: 0 0 20px; }
.tob-error { text-align: center; padding: 12px 0; }
.tob-error p { color: var(--ink-faded); margin: 0 0 14px; }

/* ---------- mobile: keep everything within 375px, no fixed widths ---------- */
@media (max-width: 480px) {
  .tob-card { padding: 20px; border-radius: 12px; }
  .tob-cta { flex-direction: column; align-items: stretch; }
}
