/* Gifted prep (js/tz.js): lessons, practice with worked answers, mock exams */
.tz-ov { padding-top: calc(var(--sat) + 8px); padding-bottom: calc(var(--sab) + 8px); }
.tz-sheet { width: min(100%, 520px); padding: 14px 14px 0; gap: 8px; -webkit-user-select: text; user-select: text; }
.tz-headtxt { min-width: 0; }
.tz-headtxt h2 { font-size: 18px; text-align: start; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tz-headtxt small { display: block; font-size: 12px; color: var(--muted); }
#tz-back[hidden] { display: none; }
#tz-back span { font-size: 22px; font-weight: 900; }
.tz-body { flex: 1; overflow: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 9px; padding: 4px 2px 22px; }
.tz-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tz-stat { display: flex; flex-direction: column; align-items: center; padding: 10px 4px; border-radius: 16px; background: rgba(0, 0, 0, .28); border: 1px solid var(--line); }
.tz-stat b { font-size: 20px; font-weight: 900; color: var(--gold-a); }
.tz-stat small { font-size: 11.5px; color: var(--muted); }
.tz-note { margin: 0; padding: 9px 12px; border-radius: 14px; font-size: 13px; font-weight: 700; background: rgba(41, 211, 255, .1); border: 1px solid rgba(41, 211, 255, .3); }
.tz-fine { margin: 4px 0 0; font-size: 11.5px; color: var(--muted); text-align: center; }
.tz-sec { margin: 8px 2px -2px; font-size: 13px; font-weight: 900; color: var(--muted); }
.tz-card {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; text-align: start; width: 100%;
  background: rgba(0, 0, 0, .25); border: 1px solid var(--line); border-inline-start: 4px solid var(--cc, var(--violet)); transition: transform .08s ease;
}
.tz-card:active { transform: translateY(2px); }
.tz-card .emo { font-size: 24px; flex: none; }
.tz-card .grow { flex: 1; min-width: 0; }
.tz-card b { display: block; font-size: 15px; }
.tz-card small { display: block; font-size: 12px; color: var(--muted); }
.tz-card .go { font-size: 22px; font-weight: 900; color: var(--cc, var(--violet)); }
.tz-card.sub { padding: 8px 14px; background: rgba(0, 0, 0, .15); }
.tz-card.sub .emo { font-size: 14px; color: var(--cc); }
.tz-card.sub b { font-size: 14px; font-weight: 700; }
.tz-card.read { opacity: .85; }
.tz-card.hot { background: linear-gradient(90deg, rgba(255, 79, 109, .22), rgba(0, 0, 0, .25)); }
.tz-card.all { background: linear-gradient(90deg, rgba(255, 216, 77, .12), rgba(0, 0, 0, .25)); }

.tz-lesson { font-size: 15.5px; line-height: 1.95; }
.tz-lesson h3 { margin: 14px 0 4px; font-size: 17px; color: var(--gold-a); }
.tz-lesson p { margin: 6px 0; }
.tz-lesson ul, .tz-lesson ol { margin: 4px 0; padding-inline-start: 22px; }
.tz-lesson .ex { margin: 10px 0; padding: 10px 12px; border-radius: 14px; background: rgba(54, 163, 255, .12); border: 1px solid rgba(54, 163, 255, .35); }
.tz-lesson .ex::before { content: "✏️ مثال"; display: block; font-weight: 900; font-size: 13px; color: #8fd0ff; }
.tz-lesson .tip { margin: 10px 0; padding: 10px 12px; border-radius: 14px; background: rgba(255, 191, 46, .12); border: 1px solid rgba(255, 191, 46, .4); }
.tz-lesson .tip::before { content: "💡 نکته"; display: block; font-weight: 900; font-size: 13px; color: var(--gold-a); }
.tz-lesson .fig, .tz-fig {
  margin: 8px 0; padding: 10px 12px; border-radius: 12px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line);
  font-family: "Courier New", monospace, Vazirmatn; font-size: 18px; line-height: 1.5; white-space: pre; direction: ltr; text-align: left; overflow-x: auto;
  width: fit-content; max-width: 100%; margin-inline: auto; font-variant-numeric: tabular-nums;
}

.tz-q { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 20px; background: var(--card); color: var(--card-ink); }
.tz-qn { margin: 0; font-size: 12px; font-weight: 900; color: #6b62b8; }
.tz-text { margin: 0; font-size: 16.5px; font-weight: 700; line-height: 1.8; }
.tz-pass { padding: 10px 12px; border-radius: 12px; background: #f1edff; font-size: 14.5px; line-height: 1.95; max-height: 42vh; overflow: auto; }
.tz-q .tz-fig { background: #1d1745; color: #fff; }
.tz-opts { display: flex; flex-direction: column; gap: 8px; }
.tz-opt {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; text-align: start; min-height: 48px;
  background: #fff; border: 2px solid #e2ddf5; color: var(--card-ink); font-size: 15.5px; font-weight: 700;
}
.tz-opt i { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #ece8ff; font-style: normal; font-size: 13px; font-weight: 900; color: #5b4fc4; }
.tz-opt.picked { border-color: #7c5cff; background: #efeaff; }
.tz-opt.picked i { background: #7c5cff; color: #fff; }
.tz-opt.right { border-color: #22c47e; background: #e3f9ee; }
.tz-opt.right i { background: #22c47e; color: #fff; }
.tz-opt.wrong { border-color: #ff4f6d; background: #ffe8ec; }
.tz-opt.wrong i { background: #ff4f6d; color: #fff; }
.tz-exp { padding: 12px 14px; border-radius: 16px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); font-size: 14.5px; line-height: 1.9; }
.tz-exp[hidden] { display: none; }
.tz-exp b.ok { color: #8fffc8; }
.tz-exp b.no { color: #ff9aac; }
.tz-exp p { margin: 4px 0; }
.tz-link { margin-top: 4px; font-size: 13px; font-weight: 800; color: #8fd0ff; text-decoration: underline; }
.tz-diff button { font-size: 13px; }
.tz-end { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 24px 0; text-align: center; }
.tz-end .big { font-size: 52px; }

.tz-exambar { position: sticky; top: -4px; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: #1b1650; border: 1px solid var(--line); font-size: 12.5px; }
.tz-exambar span { flex: 1; color: var(--muted); }
.tz-exambar .clock { font-size: 17px; font-variant-numeric: tabular-nums; }
.tz-exambar .clock.low { color: #ff6d86; }
.tz-exambar .btn.small { height: 36px; font-size: 13px; padding: 0 12px; }
.tz-nav { display: flex; gap: 8px; }
.tz-nav .btn { flex: 1; }
.tz-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.tz-grid button { height: 30px; border-radius: 8px; font-size: 11px; font-weight: 800; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); color: var(--muted); }
.tz-grid button.on { background: rgba(124, 92, 255, .55); color: #fff; }
.tz-grid button.cur { outline: 2px solid var(--gold-a); }

.tz-score { display: flex; flex-direction: column; align-items: center; padding: 14px; border-radius: 20px; background: linear-gradient(180deg, rgba(255, 216, 74, .16), rgba(0, 0, 0, .25)); border: 1px solid rgba(255, 216, 74, .4); text-align: center; }
.tz-score .pct { font-size: 46px; font-weight: 900; color: var(--gold-a); line-height: 1.2; }
.tz-score p { margin: 2px 0; font-size: 13.5px; }
.tz-per { display: flex; flex-direction: column; gap: 7px; }
.tz-per .row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.tz-per .nm { width: 128px; flex: none; }
.tz-per .bar { flex: 1; height: 10px; border-radius: 6px; background: rgba(0, 0, 0, .35); overflow: hidden; }
.tz-per .bar i { display: block; height: 100%; background: var(--cc); border-radius: 6px; }
.tz-per b { width: 40px; text-align: end; }
.tz-key { border-radius: 14px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); border-inline-start: 4px solid var(--muted); }
.tz-key.right { border-inline-start-color: var(--ok); }
.tz-key.wrong { border-inline-start-color: var(--danger); }
.tz-key summary { display: flex; gap: 8px; padding: 10px 12px; font-size: 13.5px; font-weight: 700; cursor: pointer; list-style: none; }
.tz-key summary::-webkit-details-marker { display: none; }
.tz-key summary span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tz-key i { font-style: normal; flex: none; }
.tz-key .in { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.tz-key .in .tz-pass { background: rgba(255, 255, 255, .08); max-height: none; }
.tz-key .in .tz-fig { color: #fff; }
.tz-key .opt { margin: 0; padding: 4px 8px; border-radius: 8px; }
.tz-key .opt.right { background: rgba(47, 208, 138, .2); color: #8fffc8; font-weight: 800; }
.tz-key .opt.wrong { background: rgba(255, 79, 109, .2); color: #ff9aac; text-decoration: line-through; }
