/* In-test UI. The host page supplies color tokens, .btn rules, and --te-sticky-top. */

.te-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: .9rem; color: var(--muted); }
.te-section { background: var(--bg-soft); border-radius: 20px; padding: 3px 12px; font-weight: 600; color: var(--navy); }
.te-q { font-size: 1.15rem; font-weight: 600; margin: 0 0 18px; white-space: pre-wrap; }
.te-opts { display: grid; gap: 10px; }
.te-opt { display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%; background: #fff; border: 2px solid var(--line); border-radius: 10px; padding: 12px 14px; font: inherit; color: inherit; cursor: pointer; min-height: 52px; }
.te-opt:hover:not([disabled]) { border-color: var(--navy-2); }
.te-letter { flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--bg-soft); display: grid; place-items: center; font-weight: 800; font-size: .85rem; }
.te-chosen { border-color: var(--navy); background: #f0f4fa; }
.te-chosen .te-letter { background: var(--navy); color: #fff; }
.te-right { border-color: var(--ok); background: var(--ok-bg); }
.te-right .te-letter { background: var(--ok); color: #fff; }
.te-wrong { border-color: var(--bad); background: var(--bad-bg); }
.te-wrong .te-letter { background: var(--bad); color: #fff; }
.te-opt[disabled] { cursor: default; }
.te-feedback { margin-top: 16px; padding: 14px 16px; border-radius: 10px; }
.te-feedback.ok { background: var(--ok-bg); }
.te-feedback.bad { background: var(--bad-bg); }
.te-feedback p { margin: 6px 0 0; }
.te-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; }
.te-result { text-align: center; }
.te-timeup { background: var(--bad-bg); padding: 10px; border-radius: 8px; }
.te-note { color: var(--muted); }
.te-sections { list-style: none; padding: 0; text-align: left; max-width: 520px; margin: 0 auto; }
.te-sections li { display: grid; grid-template-columns: 1fr 120px 52px; gap: 10px; align-items: center; padding: 6px 0; font-size: .92rem; }
.te-sbar { height: 8px; background: var(--bg-soft); border-radius: 8px; overflow: hidden; }
.te-sbar span { display: block; height: 100%; background: var(--ok); }
.te-review { text-align: left; margin-top: 22px; }
.te-review summary { cursor: pointer; font-weight: 700; }
.te-review li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.te-review li.bad .te-rq::before { content: "✗ "; color: var(--bad); }
.te-review li.ok .te-rq::before { content: "✓ "; color: var(--ok); }
.te-rq { font-weight: 600; white-space: pre-wrap; }
.te-exp { color: var(--muted); }
.te-result .te-nav { justify-content: center; }
.te-upsell { margin: 22px auto 0; max-width: 520px; }

.te-timerbar { position: sticky; top: var(--te-sticky-top, 64px); z-index: 5; display: flex; align-items: center; gap: 14px; background: #fff; border-bottom: 1px solid var(--line); margin: -24px -24px 18px; padding: 10px 24px; border-radius: var(--radius) var(--radius) 0 0; }
.te-clock { font-size: 1.2rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ok); min-width: 64px; }
.te-clock.warn { color: #b7791f; }
.te-clock.low { color: var(--bad); animation: tr-pulse 1s ease-in-out infinite; }
@keyframes tr-pulse { 50% { opacity: .45; } }
.te-progress { flex: 1 1 auto; max-width: 200px; height: 4px; background: var(--bg-soft); border-radius: 4px; overflow: hidden; }
.te-progress span { display: block; height: 100%; background: var(--red); transition: width .2s; }
.te-qn { margin-left: auto; font-size: .85rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.te-badge { display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; border-radius: 20px; padding: 5px 14px; margin-bottom: 8px; }
.te-badge.good { background: var(--ok-bg); color: var(--ok); }
.te-badge.mid { background: #fff6d6; color: #8a5a00; }
.te-badge.low { background: var(--bad-bg); color: var(--bad); }
.te-headline { font-size: 1.35rem; margin: 0 0 14px; }
.te-circle { width: 148px; height: 148px; border-radius: 50%; border: 5px solid var(--ok); display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 0 auto 18px; }
.te-circle.mid { border-color: #e0a526; }
.te-circle.low { border-color: var(--bad); }
.te-circle strong { font-size: 2.3rem; font-weight: 800; color: var(--navy); line-height: 1; }
.te-circle span { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.te-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 520px; margin: 0 auto 18px; }
.te-stat { background: var(--bg-soft); border-radius: 10px; padding: 10px 8px; }
.te-stat strong { display: block; font-size: 1rem; color: var(--navy); overflow-wrap: anywhere; }
.te-stat span { font-size: .75rem; color: var(--muted); }
.te-result h3 { font-size: 1rem; margin-top: 8px; }
.te-result .te-nav { flex-wrap: wrap; }
.te-dash { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin: 18px auto 0; max-width: 560px; text-align: left; }
.te-dash h4 { margin: 0 0 10px; font-size: .95rem; }
.te-dash-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.te-dash-tiles div { background: var(--bg-soft); border-radius: 8px; padding: 8px; text-align: center; }
.te-dash-tiles strong { display: block; color: var(--navy); }
.te-dash-tiles span { font-size: .72rem; color: var(--muted); }
.te-bars { display: flex; align-items: flex-end; gap: 8px; height: 80px; padding-top: 18px; }
.te-bars div { flex: 1; max-width: 48px; background: var(--red); border-radius: 4px 4px 0 0; min-height: 3px; position: relative; }
.te-bars div span { position: absolute; top: -17px; left: -6px; right: -6px; text-align: center; font-size: .7rem; color: var(--muted); }
.te-dash .te-focus { font-size: .85rem; color: var(--muted); margin: 10px 0 0; }

@media (max-width: 560px) {
  .te-sections li { grid-template-columns: 1fr 70px 44px; }
  .te-timerbar { margin: -18px -14px 16px; padding: 10px 14px; }
}
