/* ==========================================================================
   TayyariPoint Student Portal — [tp_portal]
   Design system: blue #1D4ED8, green #16A34A, amber #F59E0B,
   Poppins (headings) / Inter (body), white cards, ambient blobs.
   Base rules below are copied verbatim from the approved portal design
   so the shell renders pixel-identical; everything is inline-styled
   per element (matching the design source) with this file only
   carrying resets, animations, and the responsive breakpoints.
   ========================================================================== */

.tp-portal-root, .tp-portal-root * { box-sizing: border-box; }
.tp-portal-root { background: #F8FAFC; font-family: 'Inter','Segoe UI',sans-serif; color: #0F172A; overflow-x: hidden; }
.tp-portal-root a { color: #1D4ED8; text-decoration: none; }
.tp-portal-root a:hover { color: #1B3FB0; }
.tp-portal-root button { font-family: inherit; }
.tp-portal-root img { max-width: 100%; display: block; }

:root {
  --tp-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --tp-ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

/* Press feedback — buttons should feel like they physically respond to a tap */
.tp-back-btn, .tp-day-nav, .tp-start-test-btn, .dp-hero-btn-primary, .dp-hero-btn-secondary,
.tp-week-card:not(.is-locked), .tp-day-card:not(.is-locked), .tp-unlock-nudge button {
  transition: transform 120ms var(--tp-ease-out), box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}
.tp-back-btn:active, .tp-day-nav:not(:disabled):active, .tp-start-test-btn:active,
.dp-hero-btn-primary:active, .dp-hero-btn-secondary:active, .tp-unlock-nudge button:active {
  transform: scale(0.96);
}
@media (hover: hover) and (pointer: fine) {
  .tp-back-btn:hover { background: #F8FAFC; border-color: #CBD5E1; }
}

@keyframes tpFadeUp   { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes tpPulseGlow{ 0%, 100% { box-shadow: 0 0 0 0 rgba(29,78,216,.3); } 50% { box-shadow: 0 0 0 8px rgba(29,78,216,0); } }
@keyframes tpSlideIn  { from { opacity: 0; transform: translateY(20px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes tpSpin     { to { transform: rotate(360deg); } }

.dp-hero { animation: tpFadeUp .4s ease; }
.dp-podium-1 .dp-podium-avatar-ring { animation: tpPulseGlow 2s infinite; }

/* Animated hero gradient — same blue family as the rest of the design,
   just slowly panning so the banner feels alive instead of a flat fill. */
@keyframes tpHeroGradient {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.dp-hero-animated {
  background: linear-gradient(120deg, #1D4ED8 0%, #2563EB 25%, #1B3FB0 50%, #2563EB 75%, #1D4ED8 100%);
  background-size: 300% 300%;
  animation: tpHeroGradient 14s ease infinite, tpFadeUp .4s ease;
}
@media (prefers-reduced-motion: reduce) {
  .dp-hero-animated { animation: tpFadeUp .4s ease; }
}

/* Hover states that the inline-style design expresses via style-hover in
   its own template engine — translated to real classes here. */
.tp-hover-row:hover { background: #F8FAFC; }
@media (hover: hover) and (pointer: fine) {
  .tp-hover-card:hover { border-color: #93A5FB; box-shadow: 0 10px 26px -12px rgba(29,78,216,.28); transform: translateY(-3px); }
  .tp-week-card.is-locked:hover, .tp-day-card.is-locked:hover { transform: none; box-shadow: none; border-color: #EEF1F6 !important; }
}
.tp-hover-lift:hover { transform: translateY(-2px); }
.tp-btn-ghost:hover { background: #EFF4FF !important; }
.tp-btn-download:hover { background: #DBEAFE !important; }
/* ── Profile settings rows (Personal Info / Change Password / Reset Progress / Help / Logout) ──
   Hardened the same way as .tp-icon-btn: theme's global button/link styles were winning over
   plain inline styles here, flattening these into default-looking rectangles. */
.tp-settings-row, .tp-settings-row-static {
    all: unset !important;
    box-sizing: border-box !important;
    display: flex !important; width: 100% !important; align-items: center !important; gap: 13px !important;
    padding: 15px 18px !important; text-align: left !important;
    font-family: inherit !important; color: inherit !important; text-decoration: none !important;
    background: none !important; border: none !important;
}
.tp-settings-row { cursor: pointer !important; }
@media (hover: hover) and (pointer: fine) { .tp-settings-row:hover { background: #F8FAFC !important; } }
.tp-settings-row-bordered { border-bottom: 1px solid #F1F5F9 !important; }
.tp-settings-row-card { border: 1px solid #E2E8F0 !important; border-radius: 14px !important; background: #fff !important; }
.tp-danger-row {
    border: 1px solid #FEE2E2 !important; border-radius: 14px !important; background: #FEF2F2 !important;
}
@media (hover: hover) and (pointer: fine) { .tp-danger-row:hover { background: #FEE2E2 !important; } }

/* ── Generic on/off switch (Daily Motivation Reminder, etc.) ── */
.tp-switch {
    all: unset !important; box-sizing: border-box !important; flex: none !important; cursor: pointer !important;
    width: 42px !important; height: 24px !important; border-radius: 999px !important;
    background: #E2E8F0 !important; position: relative !important;
    transition: background 180ms ease;
}
.tp-switch.is-on { background: #16A34A !important; }
.tp-switch:disabled { opacity: .6 !important; cursor: not-allowed !important; }
.tp-switch-knob {
    position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
    background: #fff !important; box-shadow: 0 1px 3px rgba(0,0,0,.25);
    transition: transform 180ms var(--tp-ease-out);
}
.tp-switch.is-on .tp-switch-knob { transform: translateX(18px); }

.tp-pill-btn {
    all: unset !important; box-sizing: border-box !important;
    flex: none !important; display: inline-flex !important; align-items: center !important; justify-content: center !important;
    padding: 9px 16px !important; border-radius: 10px !important; border: 1px solid #E2E8F0 !important;
    background: #fff !important; color: #1D4ED8 !important; font-size: 13px !important; font-weight: 600 !important;
    cursor: pointer !important; font-family: inherit !important;
}
@media (hover: hover) and (pointer: fine) { .tp-pill-btn:hover { background: #F8FAFC !important; } }

.tp-help-card-cta {
    all: unset !important; box-sizing: border-box !important;
    position: relative; display: flex !important; align-items: center !important; justify-content: center !important; gap: 7px !important;
    background: #fff !important; color: #1D4ED8 !important; font-size: 12.5px !important; font-weight: 700 !important;
    padding: 9px !important; border-radius: 9px !important; text-decoration: none !important; cursor: pointer !important;
    font-family: inherit !important; width: 100% !important; text-align: center !important;
}
.tp-nav-btn:hover { background: #F8FAFC; }
.tp-folder-card:hover { box-shadow: 0 4px 16px -4px rgba(29,78,216,.1); }

/* The two hero CTAs must stay visually distinct on hover — the generic
   .tp-nav-btn:hover rule above would otherwise paint both the same grey. */
.dp-hero-btn-primary:hover { background: #F8FAFC !important; color: #1D4ED8 !important; }
.dp-hero-btn-secondary:hover { background: rgba(255,255,255,.24) !important; color: #fff !important; }

.tp-hover-card { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }

/* Locked week/day cards: muted, no lift */
.tp-week-card.is-locked, .tp-day-card.is-locked { opacity: .82; }

/* YouTube click-to-play thumbnail — swaps to a standard embed on click, so the
   only styling needed here is the hover feedback on the thumbnail itself. */
.tp-yt-player { transition: opacity .15s ease; }
.tp-yt-play-btn { transition: transform 150ms var(--tp-ease-out); }
@media (hover: hover) and (pointer: fine) {
  .tp-yt-player:hover .tp-yt-play-btn { transform: translate(-50%,-50%) scale(1.06); }
}

.tp-lock-toast { pointer-events: none; }

/* Fixed sidebar layout */
.dp-sidebar-spacer { display: block; }
@media (max-width: 860px) {
  .dp-sidebar-spacer { display: none !important; }
}

/* Tabs: only the active one shows */
.tp-tab-panel { display: none; }
.tp-tab-panel.is-active { display: block; }

/* Nested week-plan views */
.tp-week-view { display: none; }
.tp-week-view.is-active { display: block; }

/* Notes folder views */
.tp-notes-view { display: none; }
.tp-notes-view.is-active { display: block; }

/* Accordion bodies */
.tp-accordion-body { display: none; }
.tp-accordion-body.is-open { display: flex; }

.tp-mobile-menu-overlay {
  display: flex; visibility: hidden; opacity: 0; pointer-events: none;
  transition: opacity 260ms var(--tp-ease-out), visibility 0s linear 260ms;
}
.tp-mobile-menu-overlay.is-open {
  visibility: visible; opacity: 1; pointer-events: auto;
  transition: opacity 260ms var(--tp-ease-out), visibility 0s linear 0s;
}

/* ── Quiz-taking UI (not present in the original mockup — designed to
      match its visual language: white cards, blue/green/amber accents) ── */
.tp-quiz-overlay {
    position: fixed; inset: 0; z-index: 999; background: #F8FAFC;
    display: none; flex-direction: column; font-family: 'Inter','Segoe UI',sans-serif;
    overflow: hidden;
}
.tp-quiz-overlay.is-open { display: flex; }
.tp-quiz-overlay::before, .tp-quiz-overlay::after {
    content: ""; position: fixed; border-radius: 50%; filter: blur(60px); opacity: .5; pointer-events: none; z-index: 0;
}
.tp-quiz-overlay::before { width: 320px; height: 320px; background: #DBEAFE; top: -110px; left: -90px; }
.tp-quiz-overlay::after  { width: 280px; height: 280px; background: #DCFCE7; bottom: -100px; right: -80px; }
@media (prefers-reduced-motion: no-preference) {
  .tp-quiz-overlay::before, .tp-quiz-overlay::after { animation: tpBlobDrift 16s ease-in-out infinite alternate; }
  .tp-quiz-overlay::after { animation-delay: -6s; }
}
@keyframes tpBlobDrift { from { transform: translate(0,0) scale(1); } to { transform: translate(16px,-12px) scale(1.06); } }
.tp-quiz-header, .tp-quiz-progress-line, .tp-quiz-body, .tp-quiz-footer { position: relative; z-index: 1; }
.tp-quiz-header {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 10px 18px; background: #fff; border-bottom: 1px solid #E2E8F0;
}
.tp-quiz-header-mid { flex: 1; margin: 0 16px; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.tp-quiz-progress-track { height: 8px; border-radius: 99px; background: #F1F5F9; overflow: hidden; }
.tp-quiz-progress-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg,#2563EB,#1D4ED8); transition: width .25s ease; }
.tp-quiz-context-label {
    font-size: 11.5px; font-weight: 700; color: #64748B; white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; letter-spacing: .01em;
}
.tp-quiz-context-label:empty { display: none; }
.tp-quiz-timer {
    font-family: 'Poppins'; font-weight: 700; font-size: 14px; color: #1D4ED8;
    background: #EFF4FF; padding: 7px 14px; border-radius: 10px; flex: none; min-width: 64px; text-align: center;
    display: inline-flex; align-items: center; gap: 6px; justify-content: center;
}
.tp-quiz-timer svg { flex: none; stroke: currentColor !important; }
.tp-quiz-timer.tp-timer-low { color: #DC2626; background: #FEF2F2; }

/* ── Icon-button hard reset ────────────────────────────────────────────
   The parent theme applies its own global <button> defaults (padding,
   min-width, box-shadow, text-transform, sometimes a background image)
   with enough specificity/!important to leak through simple class rules.
   On a plain icon-only button that shows up as an oversized flat white
   block with the icon lost somewhere inside it. Every property that a
   theme is likely to set is reset here explicitly, in the same
   !important currency, so this button can never inherit that look —
   this is the fix for every "white block" instance, not just the quiz
   close icon: apply .tp-icon-btn to any small icon-only round button. */
.tp-icon-btn, .tp-icon-btn:visited {
    all: unset !important;
    box-sizing: border-box !important;
    width: 34px !important; height: 34px !important; min-width: 34px !important; max-width: 34px !important;
    min-height: 34px !important; max-height: 34px !important; padding: 0 !important; margin: 0 !important;
    border-radius: 10px !important; border: 1px solid #E2E8F0 !important; background: #fff !important;
    color: #64748B !important; cursor: pointer !important; flex: none !important;
    display: inline-flex !important; align-items: center !important; justify-content: center !important;
    line-height: 1 !important; font-size: 0 !important; box-shadow: none !important; text-shadow: none !important;
    text-transform: none !important; letter-spacing: normal !important; appearance: none !important; -webkit-appearance: none !important;
}
.tp-icon-btn svg { display: block !important; pointer-events: none !important; stroke: currentColor !important; fill: none !important; flex: none !important; }
@media (hover: hover) and (pointer: fine) {
  .tp-icon-btn:hover { background: #F8FAFC !important; border-color: #CBD5E1 !important; }
}
.tp-icon-btn:active { transform: scale(.94); }

/* ── Defensive overrides ──────────────────────────────────────────────
   Same theme-leak problem as above, applied to the rest of the quiz
   header/meta-row controls so none of them can inherit the theme's
   brand color or box-shadow by accident. */
#tp-quiz-overlay .tp-concept-toggle svg,
#tp-quiz-overlay .tp-concept-toggle svg path { stroke: currentColor !important; fill: none !important; }

#tp-quiz-overlay .tp-quiz-report-btn { color: #DC2626 !important; border-color: #FECACA !important; background: #FEF2F2 !important; }
#tp-quiz-overlay .tp-quiz-report-btn svg,
#tp-quiz-overlay .tp-quiz-report-btn svg path { stroke: currentColor !important; fill: none !important; }
@media (hover: hover) and (pointer: fine) {
  #tp-quiz-overlay .tp-quiz-report-btn:hover { color: #fff !important; border-color: #DC2626 !important; background: #DC2626 !important; }
}

/* Concept Builder pill + switch — Practice Mode (on) vs Test Mode (off) */
.tp-concept-toggle {
    all: unset !important; box-sizing: border-box !important; flex: none !important; cursor: pointer !important;
    display: inline-flex !important; align-items: center !important; gap: 7px !important;
    height: 34px !important; padding: 0 12px 0 10px !important; border-radius: 999px !important;
    border: 1px solid #E2E8F0 !important; background: #fff !important; color: #94A3B8 !important;
    font-family: inherit !important;
    transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.tp-concept-toggle-label { font-family: 'Inter', sans-serif; font-size: 11.5px; font-weight: 700; white-space: nowrap; color: inherit !important; }
.tp-concept-toggle-switch {
    width: 30px; height: 17px; border-radius: 99px; background: #E2E8F0 !important; flex: none; position: relative;
    transition: background .2s ease;
}
.tp-concept-toggle-knob {
    position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%;
    background: #fff !important; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s var(--tp-ease-out);
}
.tp-concept-toggle.is-on { color: #B45309 !important; border-color: #FDE68A !important; background: #FFFBEB !important; }
.tp-concept-toggle.is-on .tp-concept-toggle-switch { background: #F59E0B !important; }
.tp-concept-toggle.is-on .tp-concept-toggle-knob { transform: translateX(13px); }
@media (max-width: 480px) { .tp-concept-toggle-label { display: none; } .tp-concept-toggle { padding: 0 10px; gap: 0; } }

.tp-quiz-progress-line { padding: 5px 18px 0; font-size: 11px; font-weight: 700; color: #94A3B8; background: #fff; }

/* Result screen: the question progress bar, timer and concept-builder toggle
   belong to the MCQ-taking screen, not the result — showing them above the
   score card read like an unfinished quiz was still running underneath. */
.tp-quiz-overlay.tp-quiz-results-mode .tp-quiz-header-mid,
.tp-quiz-overlay.tp-quiz-results-mode .tp-quiz-timer,
.tp-quiz-overlay.tp-quiz-results-mode #tp-quiz-concept-toggle,
.tp-quiz-overlay.tp-quiz-results-mode .tp-quiz-progress-line { display: none !important; }
.tp-quiz-overlay.tp-quiz-results-mode .tp-quiz-header { justify-content: flex-end; }
.tp-quiz-body { flex: 1; overflow-y: auto; padding: 12px 20px 118px; display: flex; }
.tp-quiz-card {
    max-width: 640px; margin: auto; width: 100%; background: #fff; border: 1px solid #F1F5F9; border-radius: 20px;
    padding: 18px 22px 18px; box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 16px 40px -20px rgba(15,23,42,.16);
    animation: tpFadeUp 300ms var(--tp-ease-out) both; transition: max-width .2s ease;
}
.tp-quiz-card.has-side { max-width: 980px; }
@media (max-width: 640px) { .tp-quiz-card { padding: 14px 14px 14px; border-radius: 16px; } }
.tp-quiz-flex { display: flex; gap: 20px; align-items: flex-start; }
.tp-quiz-main { flex: 1 1 0%; min-width: 0; max-width: 640px; display: flex; flex-direction: column; }
.tp-quiz-side { flex: 0 0 280px; max-width: 280px; }
@media (max-width: 900px) {
  .tp-quiz-flex { display: block; }
  .tp-quiz-main { max-width: none; }
  .tp-quiz-side { max-width: none; margin-top: 12px; }
}
.tp-quiz-meta { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; align-items: center; }
.tp-quiz-tag {
    font-size: 11px; font-weight: 700; padding: 5px 11px; border-radius: 999px;
    background: #F8FAFC; border: 1px solid #E2E8F0; color: #64748B;
}
.tp-quiz-tag-num { color: #1D4ED8; background: #EFF4FF; border-color: #DBEAFE; }
.tp-quiz-tag-num em { font-style: normal; color: #64748B; font-weight: 600; }
.tp-quiz-question {
    font-family: 'Poppins'; font-size: 16.5px; font-weight: 700; line-height: 1.4;
    margin: 0 0 14px; color: #0F172A;
}
.tp-quiz-option {
    all: unset !important;
    position: relative; box-sizing: border-box !important;
    display: flex !important; align-items: center !important; gap: 12px !important; width: 100% !important;
    min-width: 0 !important; max-width: 100% !important; flex-shrink: 0 !important;
    text-align: left !important; background: #fff !important; border: 1.5px solid #E2E8F0 !important;
    border-radius: 12px !important; padding: 10px 14px !important; font-size: 13.5px !important; font-weight: 500 !important;
    font-family: 'Inter','Segoe UI',sans-serif !important;
    color: #0F172A !important; cursor: pointer !important; margin: 0 0 8px !important;
    transition: border-color .15s ease, background .15s ease;
    box-shadow: none !important; float: none !important;
}
.tp-quiz-option-letter, .tp-quiz-option > span { pointer-events: none; }
@media (hover: hover) and (pointer: fine) {
  .tp-quiz-option:hover { border-color: #CBD5E1 !important; background: #F8FAFC !important; }
}
.tp-quiz-option:active { transform: scale(0.99); }
.tp-quiz-option.tp-stagger-in { animation: tpFadeUp 260ms var(--tp-ease-out) both; }
.tp-quiz-option-check { margin-left: auto; flex: none; stroke: #16A34A !important; }
.tp-quiz-option-check.tp-quiz-option-x { stroke: #DC2626 !important; }
.tp-quiz-option-letter {
    width: 20px; height: 20px; min-width: 20px; border-radius: 50%;
    background: #fff !important; border: 2px solid #CBD5E1; box-sizing: border-box;
    display: flex; align-items: center; justify-content: center; flex: none;
    transition: border-color .15s ease, background .15s ease;
}
.tp-quiz-option-letter::after {
    content: ""; width: 9px; height: 9px; border-radius: 50%; background: transparent; transition: background .15s ease;
}
.tp-quiz-option.is-correct { border-color: #16A34A !important; background: #ECFDF5 !important; }
.tp-quiz-option.is-correct .tp-quiz-option-letter { border-color: #16A34A !important; }
.tp-quiz-option.is-correct .tp-quiz-option-letter::after { background: #16A34A !important; }
.tp-quiz-option.is-wrong { border-color: #DC2626 !important; background: #FEF2F2 !important; }
.tp-quiz-option.is-wrong .tp-quiz-option-letter { border-color: #DC2626 !important; }
.tp-quiz-option.is-wrong .tp-quiz-option-letter::after { background: #DC2626 !important; }
.tp-quiz-option.is-disabled { cursor: default; }
.tp-quiz-option.is-disabled:hover { background: #fff !important; border-color: #E2E8F0 !important; }
.tp-quiz-option.is-correct:hover, .tp-quiz-option.is-wrong:hover { background: inherit !important; }
.tp-quiz-footer {
    position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid #E2E8F0;
    padding-top: 10px; padding-bottom: 10px;
    padding-left: max(20px, calc((100% - 640px) / 2));
    padding-right: max(20px, calc((100% - 640px) / 2));
    display: flex; flex-direction: column; gap: 8px;
    box-shadow: 0 -8px 24px -18px rgba(15,23,42,.18);
}
.tp-quiz-footer-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.tp-quiz-save-exit-full {
    all: unset !important; box-sizing: border-box !important; width: 100% !important;
    display: inline-flex !important; align-items: center !important; justify-content: center !important; gap: 7px !important;
    font-size: 13.5px !important; font-weight: 700 !important; font-family: inherit !important; text-align: center !important;
    padding: 10px 22px !important; border-radius: 11px !important; border: 1px solid #DC2626 !important;
    background: #DC2626 !important; color: #fff !important; cursor: pointer !important;
    box-shadow: 0 4px 14px -4px rgba(220,38,38,.4) !important;
    transition: background 150ms ease, border-color 150ms ease, transform 120ms var(--tp-ease-out);
}
@media (hover: hover) and (pointer: fine) { .tp-quiz-save-exit-full:not(:disabled):hover { background: #B91C1C !important; border-color: #B91C1C !important; } }
.tp-quiz-save-exit-full:not(:disabled):active { transform: scale(0.99); }
.tp-quiz-save-exit-full:disabled { opacity: .55 !important; cursor: not-allowed !important; }
.tp-quiz-save-exit-full svg { flex: none; stroke: currentColor !important; }
.tp-quiz-nav-btn {
    all: unset !important; box-sizing: border-box !important;
    display: inline-flex !important; align-items: center !important; justify-content: center !important; gap: 6px !important;
    font-size: 13.5px !important; font-weight: 700 !important; font-family: inherit !important; text-align: center !important;
    padding: 10px 22px !important; border-radius: 11px !important; border: 1px solid #E2E8F0 !important; background: #fff !important;
    color: #334155 !important; cursor: pointer !important; box-shadow: none !important;
    transition: background 150ms ease, border-color 150ms ease, transform 120ms var(--tp-ease-out);
}
@media (hover: hover) and (pointer: fine) { .tp-quiz-nav-btn:not(:disabled):hover { border-color: #CBD5E1 !important; background: #F8FAFC !important; } }
.tp-quiz-nav-btn:not(:disabled):active { transform: scale(0.97); }
.tp-quiz-nav-btn.tp-primary { background: #1D4ED8 !important; border-color: #1D4ED8 !important; color: #fff !important; box-shadow: 0 4px 14px -4px rgba(29,78,216,.45) !important; }
@media (hover: hover) and (pointer: fine) { .tp-quiz-nav-btn.tp-primary:not(:disabled):hover { background: #1B3FB0 !important; border-color: #1B3FB0 !important; } }
.tp-quiz-nav-btn:disabled { opacity: .45 !important; cursor: not-allowed !important; }
@media (max-width: 640px) {
  .tp-quiz-nav-btn { flex: 1 !important; }
}
/* Question-jumper dots removed from the MCQs view entirely — still built by JS
   into the DOM (harmless), just never shown or given layout space. */
.tp-quiz-jumper { display: none !important; }

.tp-spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #E2E8F0; border-top-color: #1D4ED8; animation: tpSpin .7s linear infinite; margin: 60px auto; }

/* ── Meta row, top-right: Report MCQ button ── */
/* Icon-only red flag button (no label) — tooltip/aria-label still carry the
   "Report this question" meaning for accessibility. Stays pinned top-right
   of the meta row for every question, English or Urdu. */
.tp-quiz-meta-right { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tp-quiz-report-btn {
    all: unset !important; box-sizing: border-box !important;
    display: inline-flex !important; align-items: center !important; justify-content: center !important;
    background: #FEF2F2 !important; border: 1px solid #FECACA !important;
    color: #DC2626 !important; border-radius: 50% !important; width: 30px !important; height: 30px !important; padding: 0 !important;
    font-family: inherit !important; cursor: pointer !important; box-shadow: none !important; flex: none !important;
    transition: background 150ms ease, color 150ms ease, border-color 150ms ease, transform 120ms var(--tp-ease-out);
}
.tp-quiz-report-btn svg { pointer-events: none; stroke: currentColor !important; }
@media (hover: hover) and (pointer: fine) {
  .tp-quiz-report-btn:hover { background: #DC2626 !important; border-color: #DC2626 !important; color: #fff !important; }
}
.tp-quiz-report-btn:active { transform: scale(0.92); }

/* ══════════════════════════════════════════════════════════════════
   URDU / RTL MCQs — auto-applied per-question when Arabic-script text
   is detected (see isUrduText() in tp-portal.js). Keeps English tests
   fully unaffected. NOTE: we deliberately do NOT set `direction: rtl`
   on any flex-container ancestor (.tp-quiz-card/.tp-quiz-flex/.tp-quiz-
   option) — that would silently flip flex-direction:row-reverse back
   to normal (a double reversal), which is why this looked broken
   before. `dir="rtl"` is applied only on the leaf text nodes (question
   heading, option text, explanation paragraph) in the JS.
   ══════════════════════════════════════════════════════════════════ */
.tp-quiz-card.tp-quiz-rtl .tp-quiz-question,
.tp-quiz-card.tp-quiz-rtl .tp-quiz-option > span,
.tp-quiz-explain p.tp-quiz-rtl-text {
    font-family: 'Noto Nastaliq Urdu', 'Noto Sans Arabic', 'Jameel Noori Nastaleeq', serif !important;
    line-height: 2.1; text-align: right;
}
.tp-quiz-card.tp-quiz-rtl .tp-quiz-question { font-size: 18px; }
/* Choice buttons: radio dot moves to the right, text runs right-to-left.
   This is a single, local reversal — not nested inside any RTL-direction
   ancestor — so it actually takes effect. */
.tp-quiz-card.tp-quiz-rtl .tp-quiz-option {
    flex-direction: row-reverse !important; text-align: right !important;
}
.tp-quiz-card.tp-quiz-rtl .tp-quiz-option-check { margin-left: 0; margin-right: auto; }
/* Concept Builder box always stays on the right of the page with its
   icon on the left — same position/order for English and Urdu alike.
   Only its paragraph text (above) switches to RTL. */

/* Test Mode: a chosen option is highlighted plain blue — no green/red,
   no check icon, nothing revealed — until the whole test is submitted. */
.tp-quiz-option.is-selected-plain { border-color: #1D4ED8 !important; background: #EFF4FF !important; }
.tp-quiz-option.is-selected-plain .tp-quiz-option-letter { border-color: #1D4ED8 !important; }
.tp-quiz-option.is-selected-plain .tp-quiz-option-letter::after { background: #1D4ED8 !important; }

.tp-quiz-explain {
    margin-top: 0; display: flex; gap: 10px; align-items: flex-start;
    background: #FFFBEB !important; border: 1px solid #FDE68A !important; border-radius: 12px;
    padding: 12px; font-size: 12.5px; color: #78350F !important; line-height: 1.5;
    animation: tpFadeUp 220ms var(--tp-ease-out) both;
}
.tp-quiz-explain-icon {
    width: 24px; height: 24px; flex: none; border-radius: 50%; background: #F59E0B;
    display: flex; align-items: center; justify-content: center; margin-top: 1px;
}
.tp-quiz-explain b { display: block; font-size: 12px; font-weight: 800; letter-spacing: .02em; margin-bottom: 3px; color: #92400E; }
.tp-quiz-explain p { margin: 0; }
.tp-report-modal-overlay {
    position: fixed; inset: 0; z-index: 1100; background: rgba(15,23,42,.5);
    display: flex; align-items: center; justify-content: center; padding: 20px;
}
.tp-report-modal {
    background: #fff; border-radius: 16px; padding: 24px; max-width: 380px; width: 100%;
    font-family: 'Inter','Segoe UI',sans-serif;
}
.tp-report-modal h3 { font-family: 'Poppins'; font-size: 16px; margin: 0 0 14px; color: #0F172A !important; }
.tp-report-reasons { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.tp-report-reason { display: flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; color: #334155 !important; }
.tp-report-modal textarea {
    width: 100%; border: 1px solid #E2E8F0 !important; border-radius: 10px; padding: 10px 12px; font-size: 13px;
    font-family: inherit; resize: vertical; margin-bottom: 8px; color: #0F172A !important; background: #fff !important;
    box-shadow: none !important;
}
.tp-report-msg { font-size: 12.5px; min-height: 16px; margin-bottom: 4px; }
.tp-report-actions { display: flex; gap: 8px; margin-top: 6px; }
.tp-report-actions button {
    all: unset !important; box-sizing: border-box !important;
    flex: 1 !important; text-align: center !important; padding: 11px !important; border-radius: 10px !important;
    font-weight: 700 !important; font-size: 13.5px !important; font-family: inherit !important; cursor: pointer !important;
    border: none !important; box-shadow: none !important;
}
#tp-report-cancel { background: #F1F5F9 !important; color: #334155 !important; }
#tp-report-submit { background: #1D4ED8 !important; color: #fff !important; }
#tp-report-submit:disabled { opacity: .6 !important; cursor: not-allowed !important; }

/* ── Deep review overlay ── */
.tp-review-overlay {
    position: fixed; inset: 0; z-index: 999; background: #F8FAFC;
    display: none; flex-direction: column; font-family: 'Inter','Segoe UI',sans-serif;
}
.tp-review-overlay.is-open { display: flex; }
.tp-review-body { flex: 1; overflow-y: auto; padding: 24px 20px 60px; }
.tp-review-summary { max-width: 640px; margin: 0 auto 20px; text-align: center; }
.tp-review-score { font-family: 'Poppins'; font-size: 40px; font-weight: 800; }
.tp-review-summary-line { font-size: 13.5px; color: #64748B; margin-top: 4px; }
.tp-review-summary-sub { font-size: 12px; color: #94A3B8; margin-top: 2px; }
.tp-review-section-title {
    max-width: 640px; margin: 22px auto 12px; font-family: 'Poppins'; font-size: 14px; font-weight: 700; color: #0F172A;
}
.tp-review-bars { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; }
.tp-review-bar-row { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.tp-review-bar-row .name { width: 150px; flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #334155; font-weight: 600; }
.tp-review-bar-row .track { flex: 1; height: 8px; border-radius: 99px; background: #F1F5F9; overflow: hidden; }
.tp-review-bar-row .fill { display: block; height: 100%; border-radius: 99px; }
.tp-review-bar-row .pct { width: 42px; flex: none; text-align: right; font-weight: 700; }
.tp-review-questions { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.tp-review-q { background: #fff !important; border: 1.5px solid #E2E8F0 !important; border-radius: 14px; padding: 16px; box-shadow: none !important; }
.tp-review-q.is-correct { border-color: #BBF7D0 !important; }
.tp-review-q.is-wrong { border-color: #FECACA !important; }
.tp-review-q.is-skipped { border-color: #E2E8F0 !important; }
.tp-review-q-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.tp-review-q-num { font-size: 11px; font-weight: 700; color: #94A3B8 !important; }
.tp-review-q-state { font-size: 11.5px; font-weight: 700; }
.tp-review-q.is-correct .tp-review-q-state { color: #16A34A !important; }
.tp-review-q.is-wrong .tp-review-q-state { color: #DC2626 !important; }
.tp-review-q.is-skipped .tp-review-q-state { color: #94A3B8 !important; }
.tp-review-q-text { font-size: 14px; font-weight: 600; color: #0F172A !important; margin-bottom: 10px; line-height: 1.4; }
.tp-review-opt {
    display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px;
    font-size: 13px; color: #475569 !important; margin-bottom: 5px; border: 1px solid transparent !important;
    background: transparent !important;
}
.tp-review-opt .letter {
    width: 20px; height: 20px; border-radius: 50%; background: #F1F5F9 !important; color: #64748B !important; font-size: 10.5px;
    font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none;
}
.tp-review-opt.correct { background: #ECFDF5 !important; border-color: #BBF7D0 !important; color: #065F46 !important; }
.tp-review-opt.correct .letter { background: #16A34A !important; color: #fff !important; }
.tp-review-opt.picked-wrong { background: #FEF2F2 !important; border-color: #FECACA !important; color: #991B1B !important; }
.tp-review-opt.picked-wrong .letter { background: #DC2626 !important; color: #fff !important; }
.tp-review-explain { margin-top: 8px; background: #FFFBEB !important; border: 1px solid #FDE68A !important; border-radius: 10px; padding: 10px 12px; font-size: 12.5px; color: #78350F !important; line-height: 1.5; }

.tp-attempt-row:hover { background: #F1F5F9 !important; }

/* ── Responsive (copied 1:1 from the approved design's own breakpoints) ── */
@media (max-width: 860px) {
  .dp-shell { flex-direction: column !important; }
  .dp-sidebar { display: none !important; }
  .dp-mobile-bar { display: flex !important; }
  .dp-header { display: none !important; }
  .dp-mobile-section-heading { display: flex !important; }
  .dp-content { padding: 16px 16px 40px !important; }
  .dp-stats-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
  .dp-grid-2 { grid-template-columns: 1fr !important; }
  .dp-hero { padding: 22px 18px !important; border-radius: 16px !important; flex-direction: column !important; align-items: stretch !important; }
  .dp-hero-heading { font-size: 19px !important; }
  .dp-hero-actions { flex-direction: row !important; }
  .dp-hero-actions button { flex: 1 !important; justify-content: center !important; padding: 10px 12px !important; font-size: 12.5px !important; }
  .dp-hero-widget { width: 100% !important; margin-top: 4px; }
  .dp-podium { flex-direction: row !important; gap: 8px !important; padding: 0 !important; }
  .dp-podium-1 { width: 120px !important; }
  .dp-podium-2, .dp-podium-3 { width: 100px !important; }
  .dp-podium-1 .dp-podium-avatar { width: 56px !important; height: 56px !important; }
  .dp-podium-2 .dp-podium-avatar, .dp-podium-3 .dp-podium-avatar { width: 48px !important; height: 48px !important; }
  .dp-lb-row-extra { flex-wrap: wrap !important; gap: 8px !important; }
  .dp-lb-tag { display: none !important; }
  .dp-posts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; min-width: 0 !important; }
  .dp-posts-grid > * { min-width: 0 !important; }
  .tp-post-select-btn { min-width: 0 !important; max-width: 100% !important; overflow: hidden !important; }
  .tp-post-select-btn * { min-width: 0 !important; }
  .tp-post-select-btn h4, .tp-post-select-btn p { white-space: normal !important; overflow-wrap: anywhere !important; word-break: break-word !important; }
  .tp-post-picker { overflow-x: hidden !important; max-width: 100% !important; }
  .dp-day-grid { grid-template-columns: 1fr !important; }
  .dp-week-grid { grid-template-columns: 1fr !important; min-width: 0 !important; }
  .dp-week-grid > * { min-width: 0 !important; }
  .tp-week-card, .tp-day-card { min-width: 0 !important; max-width: 100% !important; overflow: hidden !important; }
  .tp-week-card *, .tp-day-card * { min-width: 0 !important; }
  .tp-week-card h3, .tp-day-card h3 { white-space: normal !important; overflow-wrap: anywhere !important; word-break: break-word !important; }
  .tp-week-view { overflow-x: hidden !important; max-width: 100% !important; }
  .dp-test-types { grid-template-columns: 1fr 1fr !important; }
  .dp-test-types > :last-child { grid-column: 1 / -1 !important; }
  .dp-subj-grid { grid-template-columns: 1fr !important; }
  .dp-lb-pts { display: none !important; }
  .dp-header-pill { display: none !important; }
  .dp-profile-img { width: 38px !important; height: 38px !important; }
  .dp-hero-avatar { display: flex !important; }
}
@media (max-width: 520px) {
  .dp-stat-val { font-size: 20px !important; }
  .dp-bar { width: 20px !important; }
}
@media (max-width: 640px) {
  .tp-quiz-footer {
    padding-top: 8px; padding-bottom: calc(8px + env(safe-area-inset-bottom));
    padding-left: 14px; padding-right: 14px; gap: 6px;
  }
  .tp-quiz-body { padding: 10px 12px 112px; }
  .tp-quiz-card { padding: 12px 12px 12px !important; }
  .tp-quiz-question { font-size: 15px !important; margin-bottom: 10px !important; }
  .tp-quiz-option { padding: 9px 12px !important; font-size: 13px !important; margin-bottom: 6px !important; }
  .tp-quiz-meta { margin-bottom: 8px !important; }
  .tp-rc-wrap { padding: 16px 12px 24px; }
}

/* ── Profile settings modals (Personal Info / Change Password / Reset Progress) ──
   Rendered in-portal so none of these bounce out to wp-admin. ── */
.tp-modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 9999; background: rgba(15,23,42,.5);
  align-items: center; justify-content: center; padding: 20px;
}
.tp-modal-overlay.is-open { display: flex; }
.tp-modal-card {
  background: #fff; border-radius: 18px; width: 100%; max-width: 420px; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(15,23,42,.25); animation: tpSlideIn .2s var(--tp-ease-out);
}
.tp-modal-head {
  display: flex; align-items: center; justify-content: space-between; padding: 18px 20px;
  border-bottom: 1px solid #F1F5F9; font-family: 'Poppins', sans-serif; font-size: 15px; font-weight: 700;
}
.tp-modal-close {
  all: unset !important;
  box-sizing: border-box !important;
  width: 30px !important; height: 30px !important; min-width: 30px !important; border-radius: 8px !important;
  border: 1px solid #E2E8F0 !important; background: #fff !important; cursor: pointer !important;
  font-size: 18px !important; line-height: 1 !important; color: #64748B !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
}
@media (hover: hover) and (pointer: fine) { .tp-modal-close:hover { background: #F8FAFC !important; } }
.tp-modal-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.tp-field-label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 600; color: #334155; }
.tp-field-label input {
  all: unset !important;
  box-sizing: border-box !important;
  font-family: inherit !important; font-size: 13.5px !important; font-weight: 500 !important; color: #0F172A !important;
  padding: 10px 12px !important; width: 100% !important; display: block !important;
  border: 1px solid #E2E8F0 !important; border-radius: 10px !important; background: #fff !important; outline: none !important;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.tp-field-label input:focus { border-color: #93A5FB !important; box-shadow: 0 0 0 3px rgba(29,78,216,.1) !important; outline: none !important; }
.tp-modal-submit {
  all: unset !important;
  box-sizing: border-box !important;
  width: 100% !important; padding: 12px !important; border: none !important; border-radius: 10px !important;
  background: #1D4ED8 !important; color: #fff !important; text-align: center !important;
  font-family: inherit !important; font-size: 13.5px !important; font-weight: 700 !important; cursor: pointer !important;
  display: block !important; transition: background .15s ease, opacity .15s ease;
}
@media (hover: hover) and (pointer: fine) { .tp-modal-submit:hover { background: #1B3FB0 !important; } }
.tp-modal-submit:disabled { opacity: .6 !important; cursor: default !important; }
.tp-modal-msg { font-size: 12.5px; font-weight: 600; margin: -4px 0 0; min-height: 1px; }
.tp-modal-msg.is-error { color: #DC2626; }
.tp-modal-msg.is-success { color: #16A34A; }

/* ── Help & Support modal ── */
.tp-help-wa-box {
    background: linear-gradient(160deg,#075E54,#128C7E); border-radius: 16px; padding: 22px 18px;
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; color: #fff;
}
.tp-help-wa-icon { width: 48px; height: 48px; border-radius: 50%; background: #25D366; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(0,0,0,.22); }
.tp-help-badges { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.tp-help-badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; font-size: 10.5px; font-weight: 700; background: #fff; color: #075E54; }
.tp-help-badge-dot { width: 6px; height: 6px; border-radius: 50%; background: #22C55E; animation: pulse-dot 1.8s ease-out infinite; }
@keyframes pulse-dot { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.55); } 70% { box-shadow: 0 0 0 6px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
.tp-help-wa-cta {
    display: inline-flex; align-items: center; gap: 8px; background: #25D366; color: #fff !important;
    font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 13.5px; padding: 11px 22px; border-radius: 999px;
    text-decoration: none !important; box-shadow: 0 8px 20px rgba(0,0,0,.22); transition: transform 150ms var(--tp-ease-out);
}
.tp-help-wa-cta:active { transform: scale(.96); }
.tp-help-wa-note { font-size: 11px; color: rgba(255,255,255,.7); }

.tp-help-info-row {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px;
    background: #F8FAFC; border: 1px solid #F1F5F9; text-decoration: none !important; color: inherit;
    transition: background 150ms ease;
}
@media (hover: hover) and (pointer: fine) { .tp-help-info-row:hover { background: #F1F5F9; } }
.tp-help-info-ib { width: 38px; height: 38px; min-width: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.tp-help-info-lbl { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #94A3B8; }
.tp-help-info-val { display: block; font-size: 13px; font-weight: 700; color: #0F172A; margin-top: 2px; }
.tp-help-social-row { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px 0; }
.tp-help-social-icon {
    width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.12); transition: transform 150ms var(--tp-ease-out);
}
@media (hover: hover) and (pointer: fine) { .tp-help-social-icon:hover { transform: translateY(-2px); } }

@media (max-width: 640px) {
  /* "Weak Area Test" etc. going outside on mobile — this grid had no
     responsive breakpoint at all, so 3 columns squeezed to ~110px each. */
  .dp-test-types { grid-template-columns: 1fr !important; }
  .dp-grid-2 { grid-template-columns: 1fr !important; }
  .dp-subj-grid { grid-template-columns: 1fr !important; }
  .tp-stopped-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 480px) {
  /* Profile stat row ("Streak / This week / Tests") — was overflow-x:auto
     (forced horizontal scroll); wraps to 2-per-row instead. */
  .tp-profile-stats-row { flex-wrap: wrap !important; }
  .tp-profile-stats-row > div { flex: 1 1 calc(50% - 5px) !important; min-width: 0 !important; }
}
/* ==========================================================================
   Mobile menu v2 — hardened hamburger/close icons + slide-in drawer
   ========================================================================== */
.tp-hamburger-btn {
    all: unset !important; box-sizing: border-box !important;
    display: flex !important; flex-direction: column !important; justify-content: center !important; align-items: center !important;
    gap: 4px !important; width: 36px !important; height: 36px !important; min-width: 36px !important;
    border-radius: 9px !important; cursor: pointer !important; background: none !important;
    transition: background 150ms ease;
}
@media (hover: hover) and (pointer: fine) { .tp-hamburger-btn:hover { background: #F1F5F9 !important; } }
.tp-hamburger-btn:active { transform: scale(.93); }
.tp-hamburger-btn span { display: block !important; width: 18px !important; height: 2px !important; border-radius: 2px !important; background: #0F172A !important; }

.tp-mobile-menu-overlay {
    background: rgba(15,23,42,0); transition: background 260ms var(--tp-ease-out);
}
.tp-mobile-menu-overlay.is-open { background: rgba(15,23,42,.45); backdrop-filter: blur(2px); }
.tp-mobile-menu-backdrop { position: absolute; inset: 0; background: transparent; }

.dp-mobile-menu-panel {
    position: relative; z-index: 1; width: 278px; max-width: 82vw; height: 100%; background: #fff;
    display: flex; flex-direction: column; box-shadow: 22px 0 60px -20px rgba(15,23,42,.35);
    transform: translateX(-100%); transition: transform 300ms var(--tp-ease-out);
    animation: none !important;
}
.tp-mobile-menu-overlay.is-open .dp-mobile-menu-panel { transform: translateX(0); }
@media (prefers-reduced-motion: reduce) {
  .dp-mobile-menu-panel, .tp-mobile-menu-overlay { transition: none !important; }
}

.tp-mobile-menu-panel-head {
    position: relative; overflow: hidden; display: flex; align-items: center; gap: 10px;
    padding: 22px 20px 18px; border-bottom: 1px solid #E2E8F0; flex: none;
}
.tp-mobile-menu-panel-head-accent {
    position: absolute; inset: 0; background: linear-gradient(120deg,#EFF4FF,#F6F1FF 60%,#fff); z-index: 0;
}
.tp-mobile-menu-panel-head > *:not(.tp-mobile-menu-panel-head-accent) { position: relative; z-index: 1; }

.tp-mobile-close-btn {
    all: unset !important; box-sizing: border-box !important;
    width: 32px !important; height: 32px !important; min-width: 32px !important; border-radius: 9px !important;
    background: #fff !important; border: 1px solid #E2E8F0 !important;
    display: flex !important; align-items: center !important; justify-content: center !important; cursor: pointer !important;
    box-shadow: 0 1px 2px rgba(15,23,42,.05) !important; transition: background 150ms ease, border-color 150ms ease;
}
.tp-mobile-close-btn svg, .tp-mobile-close-btn svg path { stroke: #64748B !important; fill: none !important; }
@media (hover: hover) and (pointer: fine) { .tp-mobile-close-btn:hover { background: #F8FAFC !important; border-color: #CBD5E1 !important; } }
.tp-mobile-close-btn:active { transform: scale(.92); }

.tp-mobile-menu-nav { flex: 1; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 3px; }
.tp-mobile-menu-nav .tp-sidebar-nav-btn { transition: background 150ms ease, color 150ms ease, transform 120ms var(--tp-ease-out); }
.tp-mobile-menu-nav .tp-sidebar-nav-btn:active { transform: scale(.98); }
.tp-mobile-menu-overlay.is-open .tp-mobile-menu-nav .tp-sidebar-nav-btn {
    animation: tpFadeUp 340ms var(--tp-ease-out) both;
}
.tp-mobile-menu-nav .tp-sidebar-nav-btn:nth-child(1) { animation-delay: 60ms; }
.tp-mobile-menu-nav .tp-sidebar-nav-btn:nth-child(2) { animation-delay: 90ms; }
.tp-mobile-menu-nav .tp-sidebar-nav-btn:nth-child(3) { animation-delay: 120ms; }
.tp-mobile-menu-nav .tp-sidebar-nav-btn:nth-child(4) { animation-delay: 150ms; }
.tp-mobile-menu-nav .tp-sidebar-nav-btn:nth-child(5) { animation-delay: 180ms; }
.tp-mobile-menu-nav .tp-sidebar-nav-btn:nth-child(6) { animation-delay: 210ms; }
.tp-mobile-menu-nav .tp-sidebar-nav-btn:nth-child(7) { animation-delay: 240ms; }
.tp-mobile-menu-nav .tp-sidebar-nav-btn:nth-child(8) { animation-delay: 270ms; }
@media (prefers-reduced-motion: reduce) {
  .tp-mobile-menu-overlay.is-open .tp-mobile-menu-nav .tp-sidebar-nav-btn { animation: none !important; }
}

/* ==========================================================================
   Leaderboard card v2 — attractive gradient header + detail popup
   ========================================================================== */
.tp-lb-card {
    background: #fff; border: 1px solid #E2E8F0; border-radius: 16px; overflow: hidden;
    box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 1px 3px rgba(15,23,42,.06);
}
.tp-lb-card-head {
    position: relative; overflow: hidden; padding: 20px 24px;
    background: linear-gradient(120deg,#1D4ED8 0%,#4338CA 55%,#7C3AED 100%);
}
.tp-lb-card-head-glow {
    position: absolute; width: 220px; height: 220px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.22), transparent 70%);
    right: -60px; top: -80px; pointer-events: none;
}
.tp-lb-card-head-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.tp-lb-card-title { font-family: 'Poppins'; font-size: 16px; font-weight: 700; margin: 0; display: flex; align-items: center; gap: 8px; color: #fff; }
.tp-lb-card-title-icon { font-size: 18px; }
.tp-lb-card-sub { font-size: 12.5px; color: rgba(255,255,255,.78); margin: 3px 0 0; }
.tp-lb-live-pill {
    display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: #fff;
    background: rgba(255,255,255,.16); padding: 5px 11px; border-radius: 999px; white-space: nowrap; flex: none;
}
.tp-lb-live-dot { width: 6px; height: 6px; border-radius: 50%; background: #4ADE80; animation: pulse-dot 1.8s ease-out infinite; }
.tp-lb-card-body { padding: 24px; }

.tp-lb-detail-cta {
    all: unset !important; box-sizing: border-box !important;
    display: flex !important; align-items: center !important; justify-content: center !important; gap: 8px !important;
    width: 100% !important; margin-top: 18px !important; padding: 12px !important;
    background: #EFF4FF !important; color: #1D4ED8 !important; border: 1px solid #DBEAFE !important;
    border-radius: 12px !important; font-size: 13.5px !important; font-weight: 700 !important; font-family: inherit !important;
    cursor: pointer !important; transition: background 150ms ease, transform 120ms var(--tp-ease-out);
}
@media (hover: hover) and (pointer: fine) { .tp-lb-detail-cta:hover { background: #DBEAFE !important; } }
.tp-lb-detail-cta:active { transform: scale(.98); }

.tp-lb-modal-card { max-width: 440px !important; }
.tp-lb-modal-body { padding: 18px 20px 22px !important; }
.tp-lb-switch {
    display: flex; background: #F1F5F9; border-radius: 11px; padding: 4px; gap: 4px;
}
.tp-lb-switch-btn {
    all: unset !important; box-sizing: border-box !important; flex: 1 !important; text-align: center !important;
    padding: 9px !important; border-radius: 8px !important; font-size: 12.5px !important; font-weight: 700 !important;
    font-family: inherit !important; color: #64748B !important; cursor: pointer !important;
    transition: background 150ms ease, color 150ms ease, box-shadow 150ms ease;
}
.tp-lb-switch-btn.is-active { background: #fff !important; color: #1D4ED8 !important; box-shadow: 0 1px 3px rgba(15,23,42,.12) !important; }

.tp-lb-gift-banner {
    display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 13px 14px;
    background: linear-gradient(120deg,#FFFBEB,#FEF3C7); border: 1px solid #FDE68A; border-radius: 13px;
}
.tp-lb-gift-icon {
    flex: none; width: 36px; height: 36px; border-radius: 10px; background: #fff; border: 1px solid #FDE68A;
    display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.tp-lb-gift-text { display: flex; flex-direction: column; gap: 1px; }
.tp-lb-gift-text b { font-size: 12.5px; font-weight: 800; color: #92400E; }
.tp-lb-gift-text span { font-size: 11.5px; color: #92400E; opacity: .85; line-height: 1.4; }

.tp-lb-guide { margin-top: 10px; border-radius: 14px; background: linear-gradient(135deg,#F8FAFF,#F5F3FF); border: 1px solid #E7E9FB; overflow: hidden; }
.tp-lb-guide-summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; font-size: 13px; font-weight: 800; color: #1D4ED8; font-family: 'Poppins'; }
.tp-lb-guide-summary::-webkit-details-marker { display: none; }
.tp-lb-guide-summary-left { display: flex; align-items: center; gap: 8px; }
.tp-lb-guide-summary-icon { font-size: 15px; }
.tp-lb-guide-chevron { font-size: 12px; color: #1D4ED8; transition: transform .18s ease; flex: none; }
.tp-lb-guide[open] .tp-lb-guide-chevron { transform: rotate(180deg); }
.tp-lb-guide-body { padding: 4px 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.tp-lb-guide-item { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-top: 1px dashed #E2E5F5; }
.tp-lb-guide-item:first-child { border-top: none; padding-top: 4px; }
.tp-lb-guide-icon-box { width: 34px; height: 34px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex: none; box-shadow: 0 1px 2px rgba(15,23,42,.06); }
.tp-lb-guide-item-text { display: flex; flex-direction: column; gap: 2px; padding-top: 2px; }
.tp-lb-guide-item-text b { font-family: 'Poppins'; font-size: 12.5px; font-weight: 700; color: #0F172A; }
.tp-lb-guide-item-text span { font-size: 11.5px; color: #64748B; line-height: 1.5; }

.tp-lb-modal-list { margin-top: 16px; min-height: 80px; }
.tp-lb-modal-podium { display: flex; align-items: flex-end; justify-content: center; gap: 10px; margin-bottom: 18px; }
.tp-lb-modal-row {
    display: flex; align-items: center; gap: 10px; padding: 10px 10px; border-radius: 11px;
}
.tp-lb-modal-row.is-me { background: #EFF4FF; border: 1px dashed #DBEAFE; }
.tp-lb-modal-empty { text-align: center; font-size: 12.5px; color: #94A3B8; padding: 24px 0; }

/* ==========================================================================
   Result screen v2 — pixel-matched to the approved standalone result design
   Namespaced tp-rc- (result card) to avoid clashing with theme/global classes.
   ========================================================================== */
.tp-rc-wrap { position: relative; max-width: 480px; margin: 0 auto; padding: 6px 4px 24px; }
.tp-rc-card {
    background: #fff; border-radius: 26px; box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 20px 44px -18px rgba(29,78,216,.18);
    padding: 30px 24px 26px; text-align: center;
    opacity: 0; transform: translateY(14px); animation: tpRcCardIn 480ms var(--tp-ease-out) forwards;
}
@keyframes tpRcCardIn { to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .tp-rc-card { animation: none; opacity: 1; transform: none; } }

.tp-rc-tag { display: inline-block; font-size: 12.5px; font-weight: 600; color: #1D4ED8; background: #DBEAFE; padding: 6px 14px; border-radius: 999px; }
.tp-rc-meta { margin: 8px 0 0; font-size: 12.5px; color: #94A3B8; }

.tp-rc-ring-wrap { position: relative; width: 180px; height: 180px; margin: 22px auto 4px; }
.tp-rc-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.tp-rc-ring-track { fill: none; stroke: #EDF1F7; stroke-width: 14; }
.tp-rc-ring-fg { fill: none; stroke-width: 14; stroke-linecap: round; transition: stroke-dashoffset 1100ms var(--tp-ease-out), stroke 400ms ease; }
.tp-rc-ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.tp-rc-ring-score-row { display: flex; align-items: flex-start; line-height: 1; }
.tp-rc-ring-score { font-family: 'Poppins'; font-weight: 800; font-size: 3rem; letter-spacing: -0.02em; color: #0F172A; }
.tp-rc-ring-percent { font-family: 'Poppins'; font-weight: 700; font-size: 1.3rem; color: #475569; margin-top: 6px; }
.tp-rc-ring-label { margin-top: 4px; font-size: 12.5px; font-weight: 600; color: #94A3B8; text-transform: uppercase; letter-spacing: .08em; }

.tp-rc-status-pill { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; padding: 8px 18px; border-radius: 999px; font-weight: 700; font-size: 14.5px; }
.tp-rc-status-sub { margin: 10px 0 0; font-size: 13.5px; color: #94A3B8; }
.tp-rc-status-msg { margin: 14px 0 0; font-size: 14px; line-height: 1.5; color: #475569; }

.tp-rc-section-row { margin: 26px 0 10px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; text-align: left; }
.tp-rc-section-heading { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #94A3B8; margin: 0; }
.tp-rc-section-hint { margin: -4px 0 14px; font-size: 12.5px; color: #94A3B8; text-align: left; }
.tp-rc-review-progress { font-size: 12.5px; font-weight: 600; color: #94A3B8; }

.tp-rc-text-btn {
    all: unset !important; box-sizing: border-box !important; cursor: pointer !important;
    font-family: inherit !important; font-size: 13px !important; font-weight: 700 !important; color: #1D4ED8 !important; padding: 4px !important;
}

.tp-rc-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 10px; }
.tp-rc-stat {
    background: #F7F9FC; border: 1px solid #EDF1F7; border-radius: 16px; padding: 14px 8px;
    opacity: 0; transform: translateY(8px); animation: tpRcStatIn 360ms var(--tp-ease-out) forwards;
}
.tp-rc-stat:nth-child(1) { animation-delay: 100ms; } .tp-rc-stat:nth-child(2) { animation-delay: 140ms; }
.tp-rc-stat:nth-child(3) { animation-delay: 180ms; } .tp-rc-stat:nth-child(4) { animation-delay: 220ms; }
.tp-rc-stat:nth-child(5) { animation-delay: 260ms; } .tp-rc-stat:nth-child(6) { animation-delay: 300ms; }
@keyframes tpRcStatIn { to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .tp-rc-stat { animation: none; opacity: 1; transform: none; } }
.tp-rc-stat-icon { width: 28px; height: 28px; margin: 0 auto 8px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .85rem; font-weight: 700; color: #fff; }
.tp-rc-stat-correct .tp-rc-stat-icon { background: #16A34A; }
.tp-rc-stat-incorrect .tp-rc-stat-icon { background: #DC2626; }
.tp-rc-stat-skipped .tp-rc-stat-icon { background: #F59E0B; }
.tp-rc-stat-time .tp-rc-stat-icon { background: #1D4ED8; }
.tp-rc-stat-accuracy .tp-rc-stat-icon { background: #7C3AED; }
.tp-rc-stat-avgtime .tp-rc-stat-icon { background: #0891B2; }
.tp-rc-stat-value { font-family: 'Poppins'; font-weight: 700; font-size: 1.1rem; color: #0F172A; white-space: nowrap; }
.tp-rc-stat-label { margin-top: 2px; font-size: .72rem; font-weight: 500; color: #94A3B8; }

/* Mistake review — simple, one question at a time, no animation */
.tp-rc-stack-wrap { position: relative; }

.tp-rc-review-card {
    text-align: left; background: #fff; border: 1.5px solid #EDF1F7; border-radius: 16px;
    padding: 20px 18px; box-shadow: 0 10px 22px -14px rgba(15,23,42,.18);
}
.tp-rc-review-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.tp-rc-review-qnum { font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #94A3B8; }
.tp-rc-review-status { display: inline-flex; align-items: center; font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.tp-rc-review-status.tp-rc-status-incorrect { background: #FEE2E2; color: #DC2626; }
.tp-rc-review-status.tp-rc-status-skipped { background: #FEF3C7; color: #F59E0B; }
.tp-rc-review-question { font-size: .98rem; font-weight: 600; color: #0F172A; line-height: 1.45; margin: 0 0 14px; }
.tp-rc-review-note { font-size: .78rem; font-weight: 600; color: #F59E0B; margin: 0 0 10px; }
.tp-rc-review-options { display: flex; flex-direction: column; gap: 8px; margin-bottom: 2px; }
.tp-rc-review-option { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; border: 1.5px solid #EDF1F7; font-size: .85rem; color: #475569; }
.tp-rc-opt-letter { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 700; background: #F7F9FC; color: #475569; }
.tp-rc-review-option.is-correct { border-color: #16A34A; background: #DCFCE7; color: #0F172A; }
.tp-rc-review-option.is-correct .tp-rc-opt-letter { background: #16A34A; color: #fff; }
.tp-rc-review-option.is-wrong { border-color: #DC2626; background: #FEE2E2; color: #0F172A; }
.tp-rc-review-option.is-wrong .tp-rc-opt-letter { background: #DC2626; color: #fff; }
.tp-rc-review-option-tag { margin-left: auto; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.tp-rc-review-option.is-correct .tp-rc-review-option-tag { color: #16A34A; }
.tp-rc-review-option.is-wrong .tp-rc-review-option-tag { color: #DC2626; }
.tp-rc-review-explain { margin: 10px 0 4px; padding: 10px 12px; background: #F7F9FC; border-radius: 10px; font-size: .82rem; line-height: 1.5; color: #475569; }
.tp-rc-review-explain strong { color: #0F172A; }
.tp-rc-review-btn { width: 100% !important; margin-top: 14px !important; }

.tp-rc-review-empty, .tp-rc-review-done { text-align: center; padding: 28px 14px; background: #F7F9FC; border-radius: 16px; border: 1px solid #EDF1F7; }
.tp-rc-review-empty-icon { font-size: 1.8rem; margin-bottom: 8px; }
.tp-rc-review-empty p, .tp-rc-review-done p { margin: 0 0 8px; font-size: .9rem; color: #475569; }

.tp-rc-btn {
    all: unset !important; box-sizing: border-box !important; appearance: none !important; cursor: pointer !important;
    font-family: inherit !important; font-weight: 600 !important; font-size: .96rem !important;
    border-radius: 14px !important; padding: 14px 18px !important; min-height: 48px !important; text-align: center !important;
    transition: transform 120ms var(--tp-ease-out), filter 150ms ease, background 150ms ease;
}
.tp-rc-btn:active { transform: scale(.97); }
.tp-rc-btn-primary { background: #1D4ED8 !important; color: #fff !important; }
@media (hover: hover) and (pointer: fine) { .tp-rc-btn-primary:hover { filter: brightness(1.06); } }
.tp-rc-btn-secondary { background: #fff !important; color: #1D4ED8 !important; border: 1.5px solid #DBEAFE !important; }
@media (hover: hover) and (pointer: fine) { .tp-rc-btn-secondary:hover { background: #DBEAFE !important; } }

.tp-rc-cta-row {
    display: flex; gap: 10px; margin: 22px 0 0;
}
.tp-rc-cta-row .tp-rc-btn { flex: 1 !important; }

.tp-rc-confetti-layer { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 1100; }
.tp-rc-confetti-piece { position: absolute; top: -24px; width: 8px; height: 14px; border-radius: 2px; opacity: 0; animation: tpRcConfettiFall 2200ms cubic-bezier(0.55,0.06,0.68,0.19) forwards; }
@keyframes tpRcConfettiFall { 0% { opacity: 1; transform: translateY(0) rotate(0deg); } 100% { opacity: 0; transform: translateY(100vh) rotate(540deg); } }

@media (max-width: 420px) {
  .tp-rc-card { padding: 24px 16px 22px; border-radius: 20px; }
  .tp-rc-ring-wrap { width: 150px; height: 150px; }
  .tp-rc-ring-score { font-size: 2.5rem; }
}

/* ═════════════════════════════════════════════════════════════════════════
   DEMO / PRO SYSTEM + TALK TO MENTOR — v4.8.1
   Every color/border/background below is !important on purpose: these
   components live inside arbitrary themes whose global button/link styles
   (pink outlines etc.) were bleeding into them. This makes them theme-proof.
   ═════════════════════════════════════════════════════════════════════════ */

/* ── PRO / DEMO badges — identical style family to the site header badge ── */
.tp-pro-badge,
.tp-demo-badge {
  display: inline-flex !important; align-items: center !important; gap: 5px !important;
  font-family: 'Inter','Segoe UI',sans-serif !important;
  font-size: 11px !important; font-weight: 800 !important;
  letter-spacing: .6px !important; text-transform: uppercase !important;
  color: #ffffff !important;
  padding: 6px 13px !important; border-radius: 100px !important;
  border: none !important; outline: none !important; text-decoration: none !important;
  line-height: 1 !important; white-space: nowrap !important;
  -webkit-appearance: none !important; appearance: none !important;
}
.tp-pro-badge {
  background: #16A34A !important;
  box-shadow: 0 1px 3px rgba(22,163,74,.4) !important;
}
.tp-demo-badge {
  background: #F59E0B !important;
  box-shadow: 0 1px 3px rgba(245,158,11,.4) !important;
  cursor: pointer !important;
  transition: transform .15s, box-shadow .15s !important;
}
.tp-demo-badge:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(245,158,11,.45) !important; background: #D97706 !important; color: #ffffff !important; }
.tp-badge-sm { padding: 5px 10px !important; font-size: 10px !important; flex: none !important; margin-right: 8px !important; }

/* ── Green lock chip on everything visible-but-locked in demo mode ──
   Scoped to [data-demo="1"] so every chip vanishes the moment the account
   becomes Pro — no JS cleanup needed. */
.tp-portal-root[data-demo="1"] .tp-demo-locked { position: relative !important; }
.tp-portal-root[data-demo="1"] .tp-demo-locked::after {
  content: '';
  position: absolute; top: 10px; right: 10px; z-index: 6;
  width: 24px; height: 24px; border-radius: 50%;
  background: #16A34A url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E") center / 12px 12px no-repeat;
  border: 2px solid #ffffff;
  box-shadow: 0 3px 8px rgba(22,163,74,.45);
  pointer-events: none;
}
/* note rows: chip overlaps the Download button otherwise — tuck it top-left of the PDF icon */
.tp-portal-root[data-demo="1"] .tp-note-row.tp-demo-locked::after { top: 50%; right: auto; left: 10px; transform: translateY(-50%); width: 21px; height: 21px; background-size: 10px 10px; }
/* week cards get a slightly bigger chip since the card is large */
.tp-portal-root[data-demo="1"] .tp-week-card.tp-demo-locked::after { width: 26px; height: 26px; background-size: 13px 13px; }
/* locked cards read slightly muted so the free Day 1 pops */
.tp-portal-root[data-demo="1"] .tp-day-card.tp-demo-locked,
.tp-portal-root[data-demo="1"] .tp-lecture-card.tp-demo-locked { opacity: .82; }
.tp-portal-root[data-demo="1"] .tp-day-card.tp-demo-locked:hover,
.tp-portal-root[data-demo="1"] .tp-lecture-card.tp-demo-locked:hover { opacity: 1; }

/* ── Dashboard "Go Pro" banner (the only place with a direct Register button) ── */
.tp-gopro-card {
  position: relative; overflow: hidden;
  display: flex !important; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
  background: linear-gradient(120deg, #0F172A 0%, #1D4ED8 55%, #3B82F6 100%) !important;
  border: none !important; border-radius: 18px !important;
  padding: 20px 24px !important; margin: 0 0 22px !important;
  font-family: 'Inter','Segoe UI',sans-serif !important;
  box-shadow: 0 10px 28px -6px rgba(29,78,216,.45) !important;
}
.tp-gopro-glow {
  position: absolute; top: -60px; right: -40px;
  width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.22), transparent 65%);
  pointer-events: none;
}
.tp-gopro-left { display: flex; flex-direction: column; gap: 7px; min-width: 240px; flex: 1; position: relative; }
.tp-gopro-tag {
  display: inline-flex !important; align-items: center; gap: 6px; align-self: flex-start;
  font-size: 10px !important; font-weight: 800 !important; letter-spacing: .8px !important;
  color: #ffffff !important; background: rgba(255,255,255,.16) !important;
  border: 1px solid rgba(255,255,255,.3) !important;
  padding: 4px 11px !important; border-radius: 100px !important;
}
.tp-gopro-card b { font-family: 'Poppins',sans-serif !important; font-size: 17px !important; font-weight: 700 !important; color: #ffffff !important; letter-spacing: -.2px; line-height: 1.35; }
.tp-gopro-perks { font-size: 12px !important; color: rgba(255,255,255,.85) !important; font-weight: 500 !important; line-height: 1.6; }
.tp-gopro-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; position: relative; }
.tp-gopro-cta {
  display: inline-flex !important; align-items: center; justify-content: center; gap: 8px;
  background: #ffffff !important; color: #1D4ED8 !important;
  font-size: 14px !important; font-weight: 800 !important;
  padding: 12px 24px !important; border-radius: 12px !important;
  text-decoration: none !important; border: none !important;
  box-shadow: 0 6px 16px rgba(0,0,0,.2) !important;
  transition: transform .15s, box-shadow .15s !important;
  white-space: nowrap;
}
.tp-gopro-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0,0,0,.28) !important; color: #1B3FB0 !important; }
.tp-gopro-more {
  background: none !important; border: none !important; cursor: pointer !important;
  color: rgba(255,255,255,.8) !important; font-size: 11.5px !important; font-weight: 600 !important;
  text-decoration: underline !important; text-underline-offset: 3px;
  padding: 2px !important; -webkit-appearance: none !important; appearance: none !important;
}
.tp-gopro-more:hover { color: #ffffff !important; }
@media (max-width: 640px) {
  .tp-gopro-card { padding: 18px !important; }
  .tp-gopro-actions { width: 100%; }
  .tp-gopro-cta { width: 100%; }
}

/* ── Demo "Unlock Pro" modal — premium look, theme-proof ── */
.tp-demo-overlay {
  position: fixed !important; inset: 0 !important; z-index: 2147483000 !important;
  display: none !important; align-items: center !important; justify-content: center !important;
  background: rgba(15,23,42,.6) !important; backdrop-filter: blur(4px);
  padding: 18px !important;
}
.tp-demo-overlay.is-open { display: flex !important; }
.tp-demo-card {
  position: relative; width: 100%; max-width: 420px;
  background: #ffffff !important; border-radius: 24px !important; overflow: hidden;
  font-family: 'Inter','Segoe UI',sans-serif !important;
  box-shadow: 0 30px 70px rgba(15,23,42,.4) !important;
  animation: tpDemoPop .24s cubic-bezier(.34,1.4,.64,1);
  max-height: calc(100vh - 36px); overflow-y: auto;
  border: none !important; text-align: center;
}
@keyframes tpDemoPop { from { opacity: 0; transform: translateY(18px) scale(.95); } to { opacity: 1; transform: none; } }
.tp-demo-hero {
  position: relative;
  background: linear-gradient(135deg, #0F172A 0%, #1D4ED8 60%, #3B82F6 100%) !important;
  padding: 28px 24px 22px !important;
}
.tp-demo-hero::after {
  content: ''; position: absolute; top: -50px; left: -30px;
  width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.18), transparent 65%);
  pointer-events: none;
}
.tp-demo-close {
  position: absolute !important; top: 12px !important; right: 14px !important; z-index: 3;
  width: 32px !important; height: 32px !important;
  border: none !important; border-radius: 50% !important;
  background: rgba(255,255,255,.18) !important; color: #ffffff !important;
  font-size: 19px !important; line-height: 1 !important; cursor: pointer !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  -webkit-appearance: none !important; appearance: none !important;
}
.tp-demo-close:hover { background: rgba(255,255,255,.3) !important; color: #ffffff !important; }
.tp-demo-lock {
  width: 56px; height: 56px; margin: 0 auto 12px;
  border-radius: 18px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #F59E0B, #F97316) !important;
  box-shadow: 0 8px 22px rgba(245,158,11,.5), inset 0 1px 0 rgba(255,255,255,.35);
  position: relative;
}
.tp-demo-card h3 {
  font-family: 'Poppins',sans-serif !important; font-size: 20px !important; font-weight: 800 !important;
  margin: 0 0 6px !important; color: #ffffff !important; letter-spacing: -.3px; position: relative;
}
.tp-demo-hero p { font-size: 13px !important; color: rgba(255,255,255,.85) !important; line-height: 1.55 !important; margin: 0 !important; position: relative; }
.tp-demo-hero p b { color: #FDE047 !important; font-weight: 700 !important; }
.tp-demo-body { padding: 18px 20px 20px !important; }
.tp-demo-features {
  list-style: none !important; margin: 0 0 16px !important; padding: 6px 4px !important;
  text-align: left !important;
}
.tp-demo-features li {
  display: flex !important; align-items: center !important; gap: 11px !important;
  font-size: 12.5px !important; font-weight: 500 !important; color: #334155 !important;
  padding: 7px 6px !important; line-height: 1.45 !important;
  border-bottom: 1px dashed #EEF2F7;
}
.tp-demo-features li:last-child { border-bottom: none; }
.tp-demo-features li b { color: #0F172A !important; font-weight: 700 !important; }
.tp-demo-features li i {
  flex: none; width: 30px; height: 30px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center; font-style: normal;
}
.tp-demo-features .f-blue   { background: #EFF4FF !important; color: #1D4ED8 !important; }
.tp-demo-features .f-red    { background: #FEF2F2 !important; color: #DC2626 !important; }
.tp-demo-features .f-purple { background: #F5F3FF !important; color: #7C3AED !important; }
.tp-demo-features .f-amber  { background: #FFF7ED !important; color: #D97706 !important; }
.tp-demo-features .f-green  { background: #F0FDF4 !important; color: #16A34A !important; }
.tp-demo-cta {
  position: relative; overflow: hidden;
  display: flex !important; align-items: center !important; justify-content: center !important; gap: 8px !important;
  width: 100% !important; padding: 15px !important; border-radius: 14px !important;
  background: linear-gradient(135deg, #16A34A, #22C55E) !important;
  color: #ffffff !important; font-size: 15px !important; font-weight: 800 !important;
  text-decoration: none !important; border: none !important;
  box-shadow: 0 8px 20px rgba(22,163,74,.45) !important;
  transition: transform .15s, box-shadow .15s !important;
  box-sizing: border-box !important;
}
.tp-demo-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(22,163,74,.5) !important; color: #ffffff !important; }
.tp-demo-cta-shine {
  position: absolute; top: 0; left: -80%;
  width: 50%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.35), transparent);
  animation: tpCtaShine 2.8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes tpCtaShine { 0% { left: -80%; } 55%, 100% { left: 130%; } }
.tp-demo-trust { font-size: 11px !important; color: #94A3B8 !important; margin: 12px 0 2px !important; font-weight: 500 !important; }
.tp-demo-continue {
  display: block !important; width: 100% !important; margin-top: 6px !important; padding: 9px !important;
  border: none !important; background: none !important; color: #94A3B8 !important;
  font-size: 12px !important; font-weight: 600 !important; cursor: pointer !important;
  -webkit-appearance: none !important; appearance: none !important; text-decoration: none !important;
}
.tp-demo-continue:hover { color: #64748B !important; }

/* ── "Talk to Mentor" floating button (Dashboard only, bottom-right) ── */
.tp-mentor-wrap {
  position: fixed !important; right: 20px; bottom: 20px; z-index: 2147482000 !important;
  font-family: 'Inter','Segoe UI',sans-serif !important;
  display: flex; flex-direction: column; align-items: flex-end; gap: 12px;
}
.tp-mentor-fab {
  display: flex !important; align-items: center !important; gap: 9px !important;
  border: none !important; outline: none !important; cursor: pointer !important;
  padding: 7px 18px 7px 7px !important; border-radius: 100px !important; position: relative;
  background: linear-gradient(135deg, #16A34A, #22C55E) !important;
  box-shadow: 0 8px 24px rgba(22,163,74,.5) !important;
  transition: transform .18s, box-shadow .18s !important;
  -webkit-appearance: none !important; appearance: none !important;
}
.tp-mentor-fab:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 12px 30px rgba(22,163,74,.55) !important; background: linear-gradient(135deg, #15803D, #16A34A) !important; }
.tp-mentor-fab-avatar {
  width: 42px !important; height: 42px !important; border-radius: 50% !important; overflow: hidden !important; flex: none !important;
  background: rgba(255,255,255,.2) !important; border: 2px solid rgba(255,255,255,.7) !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  box-sizing: border-box !important;
}
.tp-mentor-fab-avatar img { width: 100% !important; height: 100% !important; object-fit: cover !important; border-radius: 50% !important; display: block !important; margin: 0 !important; border: none !important; }
.tp-mentor-fab-label { color: #ffffff !important; font-size: 13.5px !important; font-weight: 700 !important; white-space: nowrap !important; letter-spacing: -.1px; }
.tp-mentor-fab-ping {
  position: absolute; top: 3px; right: 5px;
  width: 11px; height: 11px; border-radius: 50%;
  background: #FDE047 !important; border: 2px solid #16A34A !important;
  animation: tpMentorPing 2s ease-in-out infinite;
  box-sizing: content-box;
}
@keyframes tpMentorPing { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.35); opacity: .6; } }

.tp-mentor-pop {
  display: none; width: 320px; max-width: calc(100vw - 32px);
  background: #ffffff !important; border-radius: 20px !important; overflow: hidden;
  box-shadow: 0 24px 60px rgba(15,23,42,.32) !important; border: 1px solid #E2E8F0 !important;
  animation: tpDemoPop .2s ease-out;
  text-align: left !important;
}
.tp-mentor-pop.is-open { display: block; }
.tp-mentor-pop-head {
  display: flex !important; align-items: center !important; gap: 11px !important; padding: 15px 14px 13px !important;
  background: linear-gradient(135deg, #16A34A, #22C55E) !important;
  border-bottom: none !important;
}
.tp-mentor-avatar {
  position: relative; width: 44px !important; height: 44px !important; border-radius: 50% !important; flex: none !important;
  background: #ffffff !important; border: 2px solid rgba(255,255,255,.8) !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  box-sizing: border-box !important;
}
.tp-mentor-avatar img { width: 100% !important; height: 100% !important; object-fit: cover !important; border-radius: 50% !important; display: block !important; margin: 0 !important; border: none !important; }
.tp-mentor-dot {
  position: absolute; bottom: 0; right: 0;
  width: 11px; height: 11px; border-radius: 50%;
  background: #FDE047 !important; border: 2px solid #ffffff !important;
  box-sizing: content-box;
}
.tp-mentor-pop-head b { display: block !important; font-size: 14.5px !important; color: #ffffff !important; font-weight: 700 !important; font-family: 'Poppins',sans-serif !important; }
.tp-mentor-pop-head small { display: block !important; font-size: 11px !important; color: rgba(255,255,255,.85) !important; font-weight: 500 !important; margin-top: 1px; }
.tp-mentor-close {
  flex: none !important; width: 28px !important; height: 28px !important;
  border: none !important; border-radius: 50% !important;
  background: rgba(255,255,255,.2) !important; color: #ffffff !important;
  font-size: 17px !important; line-height: 1 !important; cursor: pointer !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  -webkit-appearance: none !important; appearance: none !important;
}
.tp-mentor-close:hover { background: rgba(255,255,255,.35) !important; color: #ffffff !important; }
.tp-mentor-pop-body { padding: 14px !important; background: #ffffff !important; }
.tp-mentor-pop-body p { font-size: 12.5px !important; color: #64748B !important; margin: 0 0 10px !important; line-height: 1.5 !important; }
.tp-mentor-chips { display: flex !important; flex-wrap: wrap !important; gap: 7px !important; margin-bottom: 10px !important; }
.tp-mentor-chip {
  border: 1.5px solid #E2E8F0 !important; background: #F8FAFC !important; color: #334155 !important;
  font-size: 12px !important; font-weight: 600 !important; padding: 8px 13px !important; border-radius: 100px !important;
  cursor: pointer !important; transition: all .15s !important; line-height: 1 !important;
  -webkit-appearance: none !important; appearance: none !important;
  font-family: inherit !important;
}
.tp-mentor-chip:hover { border-color: #86EFAC !important; background: #F0FDF4 !important; color: #166534 !important; }
.tp-mentor-chip.is-active { border-color: #16A34A !important; background: #DCFCE7 !important; color: #166534 !important; box-shadow: 0 0 0 3px rgba(22,163,74,.12) !important; }
.tp-mentor-custom {
  width: 100% !important; border: 1.5px solid #E2E8F0 !important; border-radius: 12px !important;
  padding: 10px 12px !important; font-size: 12.5px !important; font-family: inherit !important; resize: none !important;
  color: #0F172A !important; background: #ffffff !important; box-sizing: border-box !important; margin: 0 0 10px !important;
  box-shadow: none !important; outline: none !important;
}
.tp-mentor-custom:focus { border-color: #16A34A !important; box-shadow: 0 0 0 3px rgba(22,163,74,.12) !important; }
.tp-mentor-custom::placeholder { color: #94A3B8 !important; }
.tp-mentor-send {
  display: flex !important; align-items: center !important; justify-content: center !important; gap: 8px !important;
  width: 100% !important; padding: 13px !important; border: none !important; border-radius: 12px !important;
  background: #16A34A !important; color: #ffffff !important;
  font-size: 13.5px !important; font-weight: 700 !important; cursor: pointer !important;
  transition: background .15s, transform .15s !important;
  -webkit-appearance: none !important; appearance: none !important;
  font-family: inherit !important; box-shadow: 0 4px 12px rgba(22,163,74,.3) !important;
}
.tp-mentor-send:hover { background: #15803D !important; color: #ffffff !important; transform: translateY(-1px); }

/* Mobile — keep the FAB clear of the thumb zone, shrink label, full-width popup. */
@media (max-width: 768px) {
  .tp-mentor-wrap { right: 14px; bottom: 16px; }
  .tp-mentor-fab { padding: 6px 14px 6px 6px !important; }
  .tp-mentor-fab-avatar { width: 38px !important; height: 38px !important; }
  .tp-mentor-fab-label { font-size: 12.5px !important; }
  .tp-mentor-pop { width: calc(100vw - 28px); }
  .tp-demo-hero { padding: 24px 18px 18px !important; }
  .tp-demo-body { padding: 14px 14px 16px !important; }
  .tp-demo-card { border-radius: 20px !important; }
  .tp-portal-root[data-demo="1"] .tp-demo-locked::after { width: 21px; height: 21px; background-size: 10px 10px; top: 8px; right: 8px; }
}
@media (max-width: 420px) {
  .tp-mentor-fab-label { display: none !important; }
  .tp-mentor-fab { padding: 5px !important; }
}

/* ── Language spans (English default; .tp-ur on the portal root flips to اردو) ── */
.tp-portal-root .tp-lang-ur { display: none !important; }
.tp-portal-root.tp-ur .tp-lang-en { display: none !important; }
.tp-portal-root.tp-ur .tp-lang-ur {
  display: inline !important;
  font-family: 'Noto Nastaliq Urdu','Noto Sans Arabic',serif !important;
  direction: rtl; unicode-bidi: embed;
  line-height: 2 !important;
}
.tp-portal-root.tp-ur .tp-demo-features li > span { direction: rtl; text-align: right; width: 100%; }
.tp-portal-root.tp-ur .tp-demo-card h3 .tp-lang-ur { font-size: 19px !important; }
.tp-portal-root.tp-ur .tp-demo-hero p,
.tp-portal-root.tp-ur .tp-demo-trust { line-height: 2 !important; }

/* ── Language switch pill (in the demo modal hero + tour card) ── */
.tp-lang-switch {
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  border: 1.5px solid rgba(255,255,255,.5) !important; border-radius: 100px !important;
  background: rgba(255,255,255,.14) !important; color: #ffffff !important;
  font-size: 11.5px !important; font-weight: 700 !important; line-height: 1 !important;
  padding: 6px 13px !important; cursor: pointer !important;
  -webkit-appearance: none !important; appearance: none !important;
  transition: background .15s !important;
  font-family: 'Noto Nastaliq Urdu','Inter',sans-serif !important;
}
.tp-lang-switch:hover { background: rgba(255,255,255,.28) !important; color: #ffffff !important; }
.tp-demo-hero .tp-lang-switch { position: absolute !important; top: 12px !important; left: 14px !important; z-index: 3; }

/* ── Mentor chat locked (demo) ── */
.tp-mentor-send-locked {
  background: linear-gradient(135deg, #F59E0B, #F97316) !important;
  box-shadow: 0 4px 12px rgba(245,158,11,.35) !important;
}
.tp-mentor-send-locked:hover { background: linear-gradient(135deg, #D97706, #EA580C) !important; }
.tp-mentor-locknote {
  font-size: 11px !important; color: #94A3B8 !important; text-align: center !important;
  margin: 8px 0 0 !important; line-height: 1.5 !important;
}

/* ── Guided tour ── */
.tp-tour-spot {
  display: none;
  position: fixed; z-index: 2147483100;
  border-radius: 16px;
  box-shadow: 0 0 0 9999px rgba(15,23,42,.72);
  transition: top .3s cubic-bezier(.4,0,.2,1), left .3s cubic-bezier(.4,0,.2,1),
              width .3s cubic-bezier(.4,0,.2,1), height .3s cubic-bezier(.4,0,.2,1);
  pointer-events: auto; /* swallows clicks so the page can't be used mid-tour */
}
.tp-tour-spot::after {
  content: ''; position: absolute; inset: -3px;
  border: 3px solid #22C55E; border-radius: 18px;
  box-shadow: 0 0 0 4px rgba(34,197,94,.3);
  animation: tpTourPulse 1.8s ease-in-out infinite;
}
@keyframes tpTourPulse { 0%,100% { box-shadow: 0 0 0 4px rgba(34,197,94,.3); } 50% { box-shadow: 0 0 0 9px rgba(34,197,94,.12); } }
.tp-tour-card {
  display: none;
  position: fixed; z-index: 2147483150;
  width: 340px; max-width: calc(100vw - 28px);
  background: #ffffff !important; border-radius: 20px !important;
  padding: 18px 18px 16px !important;
  font-family: 'Inter','Segoe UI',sans-serif !important;
  box-shadow: 0 24px 60px rgba(15,23,42,.4) !important;
  border: none !important;
  animation: tpDemoPop .22s ease-out;
  box-sizing: border-box;
}
.tp-tour-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.tp-tour-icon {
  width: 44px; height: 44px; border-radius: 14px;
  background: linear-gradient(135deg, #EFF4FF, #DBEAFE) !important;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.tp-tour-card .tp-lang-switch {
  border-color: #CBD5E1 !important; background: #F8FAFC !important; color: #334155 !important;
}
.tp-tour-card .tp-lang-switch:hover { background: #EFF4FF !important; color: #1D4ED8 !important; }
.tp-tour-title {
  display: block !important; font-family: 'Poppins',sans-serif !important;
  font-size: 16.5px !important; font-weight: 800 !important; color: #0F172A !important;
  letter-spacing: -.2px; margin: 0 0 6px !important;
}
.tp-tour-text {
  font-size: 13px !important; color: #475569 !important; line-height: 1.65 !important;
  margin: 0 0 12px !important; font-weight: 500 !important;
}
.tp-tour-ur .tp-tour-title,
.tp-tour-ur .tp-tour-text {
  font-family: 'Noto Nastaliq Urdu','Noto Sans Arabic',serif !important;
  direction: rtl; text-align: right;
}
.tp-tour-ur .tp-tour-title { line-height: 1.9 !important; }
.tp-tour-ur .tp-tour-text  { line-height: 2.2 !important; font-size: 13.5px !important; }
.tp-tour-dots { display: flex; gap: 5px; margin-bottom: 13px; }
.tp-tour-dots i {
  width: 7px; height: 7px; border-radius: 50%;
  background: #E2E8F0 !important; transition: all .2s;
}
.tp-tour-dots i.on { width: 20px; border-radius: 99px; background: #1D4ED8 !important; }
.tp-tour-btns { display: flex; align-items: center; gap: 8px; }
.tp-tour-spacer { flex: 1; }
.tp-tour-skip {
  background: none !important; border: none !important; cursor: pointer !important;
  color: #94A3B8 !important; font-size: 12px !important; font-weight: 600 !important;
  padding: 8px 4px !important;
  -webkit-appearance: none !important; appearance: none !important;
  font-family: inherit !important;
}
.tp-tour-skip:hover { color: #64748B !important; }
.tp-tour-back {
  background: #F1F5F9 !important; border: none !important; cursor: pointer !important;
  color: #334155 !important; font-size: 12.5px !important; font-weight: 700 !important;
  padding: 10px 16px !important; border-radius: 10px !important;
  -webkit-appearance: none !important; appearance: none !important;
  font-family: inherit !important;
}
.tp-tour-back:hover { background: #E2E8F0 !important; color: #0F172A !important; }
.tp-tour-next {
  background: #1D4ED8 !important; border: none !important; cursor: pointer !important;
  color: #ffffff !important; font-size: 12.5px !important; font-weight: 800 !important;
  padding: 10px 20px !important; border-radius: 10px !important;
  box-shadow: 0 4px 12px rgba(29,78,216,.35) !important;
  transition: transform .15s !important;
  -webkit-appearance: none !important; appearance: none !important;
  font-family: 'Inter','Noto Nastaliq Urdu',sans-serif !important;
}
.tp-tour-next:hover { transform: translateY(-1px); background: #1B3FB0 !important; color: #ffffff !important; }
.tp-tour-next.is-final {
  background: linear-gradient(135deg, #16A34A, #22C55E) !important;
  box-shadow: 0 5px 14px rgba(22,163,74,.4) !important;
}
.tp-tour-card.tp-tour-ur .tp-tour-btns { flex-direction: row-reverse; }
@media (max-width: 767px) {
  .tp-tour-card { width: auto; border-radius: 18px !important; padding: 16px 16px 14px !important; }
  .tp-tour-icon { width: 38px; height: 38px; font-size: 19px; }
  .tp-tour-title { font-size: 15.5px !important; }
}
