/**
 * Try-It Plugin - MINIMAL CSS
 *
 * Only styles that are UNIQUE to the try-it quiz interaction.
 * Marketing sections should use your existing HP/theme classes.
 *
 * This file should be ~150 lines, not 500+
 */

/* ============================================
   LEVEL SELECTOR (hidden for now — simplified UX)
   ============================================ */
.tryit-level-selector,
.tryit-level-note {
    display: none !important;
}

.tryit-level-intro {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    text-align: center;
}

.tryit-level-subtitle {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0 0 1rem 0;
    text-align: center;
}

.tryit-level-selector {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    padding: 0 1rem;
}

.tryit-level-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 1.25rem;
    background: #f1f5f9;
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
    color: #64748b;
}

.tryit-level-pill:hover {
    border-color: #7d92ff;
    background: #e8ecff;
    color: #4b5563;
    transform: translateY(-2px);
}

.tryit-level-pill.is-active {
    background: linear-gradient(135deg, #7d92ff 0%, #6b7ff0 100%);
    border-color: #7d92ff;
    color: white;
}

.tryit-level-pill .pill-label {
    font-weight: 600;
    font-size: 0.95rem;
}

.tryit-level-pill .pill-hint {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-top: 2px;
}

.tryit-level-note {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0.5rem 0 1rem 0;
    text-align: center;
}

/* ============================================
   QUIZ CONTAINER - Match retail card styling
   ============================================ */
.tryit-quiz-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1rem;
    min-height: 400px;
    position: relative;
}

.tryit-quiz-slot {
    display: none;
}

.tryit-quiz-slot.is-active {
    display: block;
    background: #f7f7fb;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.14);
    padding: 2rem 2.5rem 2.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    /* Strip container's side padding — .tw-bs4 provides the gutters */
    .tryit-quiz-container {
        padding-left: 0;
        padding-right: 0;
    }

    /* Full-bleed card — same technique as retail .tw-bs4 in front.css:
       position + left/right offsets break out of any Kadence padding.
       Horizontal padding is stripped here — .tw-bs4 provides its own 14px
       gutter (matching retail). Only vertical padding is kept. */
    .tryit-quiz-slot.is-active {
        border-radius: 0;
        box-shadow: none;
        padding: 0 0 2rem;
        width: 100vw;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
        overflow-x: hidden;
    }

    /* front.css applies the same breakout to ALL .tw-bs4 on mobile.
       Inside the slot the slot ALREADY owns the full-bleed,
       so cancel the inner .tw-bs4 breakout to prevent double-offset. */
    .tryit-quiz-slot.is-active .tw-bs4 {
        position: static !important;
        left: auto !important;
        right: auto !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: visible !important;
    }
}

/* Force CEFR quiz visible */
.tryit-quiz-slot.is-active .single_word_container,
.tryit-quiz-slot.is-active .tw-bs4 {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Hide CEFR's login prompts - we use our own CTAs */
.tryit-experience .sir-login-prompt,
.tryit-experience .sir-guest-instruction,
.tryit-experience #practice-indicator {
    display: none !important;
}

/*
 * Hide audio player wrap until practice starts.
 * irl-quiz-ui.css forces .sir-start-audio-row .sir-audio-player { display:flex !important }
 * so we hide the wrapper instead — JS adds .is-unlocked when Start Practice is clicked.
 */
.tryit-experience .sir-audio-player-wrap {
    display: none !important;
}
.tryit-experience .sir-audio-player-wrap.is-unlocked {
    display: block !important;
}

/* ============================================
   HIDE CEFR ELEMENTS NOT NEEDED ON TRY-IT
   ============================================ */

/* Hide the slider container completely - users use level pills, not slider */
.tryit-experience .main-slider,
.tryit-experience .slider-container {
    display: none !important;
}

/* Hide the CEFR madlibs dropdown - try-it uses its own .tryit-transcript-help */
.tryit-experience .irl-difficulty-madlib,
.tryit-experience .irl-dropdown-overlay {
    display: none !important;
}

/* Hide the "Custom" level pill - slider doesn't work via AJAX load */
.tryit-experience .irl-level-pill[data-level="custom"],
.quizShortcode .irl-level-pill[data-level="custom"],
section.quizShortcode .irl-level-pill[data-level="custom"],
.tryit-quiz-slot .irl-level-pill[data-level="custom"],
button.irl-level-pill[data-level="custom"] {
    display: none !important;
}

/* Hide the slider tooltip */
.tryit-experience .slider-tooltip {
    display: none !important;
}

/* Hide yellow instruction banner - we have our own sample label */
.tryit-experience .sir-guest-instruction {
    display: none !important;
}

/* ============================================
   CEFR BUTTON OVERRIDES FOR TRY-IT
   ============================================ */

/* Keep Start Practice button purple, not red */
.tryit-experience #start-quiz-button {
    background: linear-gradient(135deg, #7d92ff 0%, #6b7ff0 100%) !important;
    border-color: #7d92ff !important;
    color: white !important;
}

.tryit-experience #start-quiz-button:hover {
    background: linear-gradient(135deg, #6b7ff0 0%, #5a6ee0 100%) !important;
}

.tryit-experience #start-quiz-button.is-active {
    background: linear-gradient(135deg, #6b7ff0 0%, #5a6ee0 100%) !important;
}

/* Fix play/pause button icon visibility */
.tryit-experience .sir-audio-play {
    background: #7d92ff !important;
    color: white !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 36px;
    min-height: 36px;
}

.tryit-experience .sir-audio-play i,
.tryit-experience .sir-audio-play svg {
    color: white !important;
    fill: white !important;
}

/* Fallback play icon if phosphor doesn't load */
.tryit-experience .sir-audio-play::before {
    content: "▶";
    font-size: 14px;
}

.tryit-experience .sir-audio-play.is-playing::before {
    content: "⏸";
}

/* Hide ::before if icon element exists */
.tryit-experience .sir-audio-play:has(i)::before,
.tryit-experience .sir-audio-play:has(svg)::before {
    display: none;
}

/* Ensure SVG icons in buttons are visible */
.tryit-experience #start-quiz-button svg {
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
}

/* Fix audio player visibility */
.tryit-experience .sir-audio-player {
    opacity: 1 !important;
    visibility: visible !important;
}

/* ============================================
   LOADING SPINNER
   ============================================ */
.tryit-quiz-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: #64748b;
    gap: 1rem;
}

.tryit-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: #7d92ff;
    border-radius: 50%;
    animation: tryit-spin 0.8s linear infinite;
}

@keyframes tryit-spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   LEVEL NAVIGATION (Easier / Harder)
   ============================================ */
.tryit-level-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 500px;
    margin: 1rem auto 2rem;
    padding: 0 1rem;
}

.tryit-nav-btn {
    padding: 0.75rem 1rem;
    background: #f1f5f9;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #475569;
}

.tryit-nav-btn:hover:not(:disabled) {
    border-color: #7d92ff;
    background: #e8ecff;
    color: #7d92ff;
}

.tryit-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f8fafc;
}

.tryit-nav-current {
    font-weight: 600;
    color: #7d92ff;
}

/* ============================================
   STICKY CTA BAR
   ============================================ */
.tryit-sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    padding: 0.875rem 1rem;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.tryit-sticky-cta.is-visible {
    transform: translateY(0);
}

.tryit-sticky-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.tryit-sticky-text {
    font-size: 0.9rem;
    text-align: center;
}

/* Completion actions */
.tryit-completion-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.tryit-completion-actions .tryit-btn-primary {
    width: 100%;
}

/* Ultra-subdued "Try again" — should not compete with main CTA */
.tryit-btn-link.tryit-btn-retry {
    color: #cbd5e1;
    font-size: 0.78rem;
    font-weight: 400;
    margin-top: 16px;
    cursor: pointer;
    pointer-events: auto;
    text-decoration: none;
}
.tryit-btn-link.tryit-btn-retry:hover {
    color: #cbd5e1;
    text-decoration: none;
}

/* Link-style button for "Try another clip" */
.tryit-btn-link {
    background: none;
    border: none;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
    text-decoration: underline;
    transition: color 0.2s;
}

.tryit-btn-link:hover {
    color: #7d92ff;
}

/* ============================================
   TRANSCRIPT HELP — "Challenge: [custom dropdown]"
   ============================================ */
.tryit-transcript-help {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.625rem;
    padding: 1.125rem 1rem;
    margin-bottom: 1rem;
    font-size: 1rem;
    color: #334155;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.tryit-th-text {
    font-weight: 600;
    color: #64748b;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
}

/* ── Custom dropdown ── */
.tryit-custom-dropdown {
    position: relative;
    display: inline-block;
}

.tryit-dd-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.45rem 0.875rem;
    background: #f8faff;
    border: 2px solid #c7d2fe;
    border-radius: 99px !important;
    font-size: 0.88rem;
    font-weight: 600;
    color: #4f46e5 !important;  /* explicit — beat any theme button reset */
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    line-height: 1.4;
}

.tryit-dd-trigger:hover,
.tryit-dd-trigger:focus,
.tryit-dd-trigger:active {
    color: #4f46e5 !important;
    border-color: #7d92ff;
    background: #eef2ff;
    box-shadow: 0 2px 8px rgba(125, 146, 255, 0.18);
    outline: none;
}

.tryit-custom-dropdown.is-open .tryit-dd-trigger {
    border-color: #7d92ff;
    background: #eef2ff;
    border-radius: 99px;
}

.tryit-dd-chevron {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
    fill: #4f46e5;
    color: #4f46e5;
}

.tryit-custom-dropdown.is-open .tryit-dd-chevron {
    transform: rotate(180deg);
}

/* Floating menu — fully extended, no scroll */
.tryit-dd-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    min-width: 230px;
    background: #fff;
    border: 1px solid #e0e7ff;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.12), 0 2px 6px rgba(0,0,0,0.06);
    z-index: 9999;
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.tryit-custom-dropdown.is-open .tryit-dd-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Items — single line: label  ·  hint */
.tryit-dd-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: background 0.1s ease;
    gap: 8px;
}

.tryit-dd-item:hover  { background: #f5f3ff; }
.tryit-dd-item.is-selected { background: #eef2ff; }

.tryit-dd-item-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    flex-shrink: 0;
}

.tryit-dd-item.is-selected .tryit-dd-item-label { color: #4f46e5; }

.tryit-dd-item-hint {
    font-size: 0.75rem;
    color: #94a3b8;
    flex: 1;
    white-space: nowrap;
}

.tryit-dd-check {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    fill: #4f46e5;
    color: #4f46e5;
    margin-left: auto;
}

.tryit-dd-check-placeholder {
    width: 13px;
    flex-shrink: 0;
    display: inline-block;
    margin-left: auto;
}

/* ============================================
   BUTTONS
   ============================================ */
.tryit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.tryit-btn-primary {
    background: linear-gradient(135deg, #7d92ff 0%, #6b7ff0 100%);
    color: white;
    border-color: #7d92ff;
}

.tryit-btn-primary:hover {
    background: linear-gradient(135deg, #6b7ff0 0%, #5a6ee0 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(125, 146, 255, 0.4);
}

.tryit-btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border-color: #cbd5e1;
}

.tryit-btn-secondary:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

.tryit-btn-sm {
    padding: 0.625rem 1rem;
    font-size: 0.9rem;
}

/* CTA button */
.tryit-cta-btn {
    font-weight: 700;
    font-size: 1rem;
    width: 100%;
    justify-content: center;
}

/* Trust line — "No card required · Cancel anytime" */
.tryit-cta-trust {
    font-size: 0.78rem;
    color: #94a3b8;
    font-weight: 400;
    margin: 0;
}

/* "it's free" trust label — outside button (legacy) */
.tryit-cta-free {
    font-size: 0.78rem;
    color: #475569;
    font-weight: 500;
    margin: 5px 0 0;
    text-align: center;
    line-height: 1;
}

/* ============================================
   TOP VIEWPORT PROGRESS BAR
   ============================================ */
#tryit-top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 999999;
    background: transparent;
    pointer-events: none;
    display: none;
}
#tryit-top-bar.is-visible { display: block; }
#tryit-top-bar-fill {
    height: 100%;
    width: 0%;
    background: #4f46e5;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease;
    border-radius: 0 2px 2px 0;
}
#tryit-top-bar-fill.is-complete { background: #10b981; }

/* ============================================
   CIRCULAR PROGRESS RING
   ============================================ */
.tryit-ring {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    flex-shrink: 0;
}
.tryit-ring > * { grid-area: 1 / 1; }
.tryit-ring-svg {
    width: 40px;
    height: 40px;
    transform: rotate(-90deg);
}
.tryit-ring-track { stroke: rgba(255,255,255,0.4); stroke-width: 2.8; fill: none; }
.tryit-ring-fill {
    stroke: #818cf8;
    stroke-width: 2.8;
    fill: none;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.45s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.3s ease;
}
.tryit-ring.is-complete .tryit-ring-fill { stroke: #10b981; }
.tryit-ring-label {
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
    white-space: nowrap;
    text-align: center;
    z-index: 1;
}
.tryit-ring.is-complete .tryit-ring-label svg {
    width: 16px !important;
    height: 16px !important;
    fill: #10b981;
    color: #10b981;
}

/* Desktop ring — inline with Start button */
.tryit-ring-wrap--desktop { display: none; }
.tryit-ring-wrap--desktop.is-visible { display: inline-flex; align-items: center; }
.tryit-ring-wrap--desktop .tryit-ring { width: 48px; height: 48px; min-width: 48px; }
.tryit-ring-wrap--desktop .tryit-ring-svg { width: 48px !important; height: 48px !important; }
.tryit-ring-wrap--desktop .tryit-ring-track { stroke: rgba(0,0,0,0.1); }
.tryit-ring-wrap--desktop .tryit-ring-fill  { stroke: #4f46e5; }
.tryit-ring-wrap--desktop .tryit-ring-label { color: #1e293b !important; font-size: 1.05rem !important; font-weight: 700 !important; }
.tryit-ring-wrap--desktop .tryit-ring.is-complete .tryit-ring-fill  { stroke: #10b981; }
.tryit-ring-wrap--desktop .tryit-ring.is-complete .tryit-ring-label { color: #059669 !important; }

@media (max-width: 767px) { .tryit-ring-wrap--desktop { display: none !important; } }

/* Mobile ring in controls bar */
#tryit-mb-ring { display: none; flex-shrink: 0; }
@media (max-width: 767px) {
    #tryit-mb-ring {
        display: inline-grid !important;
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        flex-shrink: 0 !important;
    }
    #tryit-mb-ring .tryit-ring-svg   { display: block !important; width: 40px !important; height: 40px !important; overflow: visible !important; }
    #tryit-mb-ring .tryit-ring-track { stroke: #e0e7ff !important; stroke-opacity: 1 !important; fill: none !important; }
    #tryit-mb-ring .tryit-ring-fill  { stroke: #4f46e5 !important; fill: none !important; }
    #tryit-mb-ring.is-complete .tryit-ring-fill  { stroke: #10b981 !important; }
    #tryit-mb-ring .tryit-ring-label { display: block !important; color: #4f46e5 !important; font-size: 11px !important; font-weight: 700 !important; z-index: 1; position: relative; }
    #tryit-mb-ring.is-complete .tryit-ring-label { color: #059669 !important; }
}

/* ============================================
   MOBILE CONTROLS BAR
   Shows during practice — play/pause, scrubber, ring, slow, hint
   ============================================ */
.tryit-mobile-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9000;
    background: #fff;
    border-top: 1px solid #e8ecff;
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.10);
    overflow: visible;
    padding: 10px 16px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    display: none;
    align-items: center;
    gap: 10px;
    transform: translateY(100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
@media (max-width: 767px) {
    .tryit-mobile-bar.is-visible {
        display: flex;
        transform: translateY(0);
    }
}

.tryit-mb-play {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 10px;
    border: none;
    background: #7d92ff;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
}
.tryit-mb-play:active { background: #6b7ff0; }

#tryit-mobile-bar button.tryit-mb-play svg {
    display: block !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    flex-shrink: 0 !important;
    pointer-events: none;
}

.tryit-mb-scrubber-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.tryit-mb-scrubber {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 9999px;
    background: #e0e7ff;
    cursor: pointer;
    outline: none;
}
.tryit-mb-scrubber::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 9999px;
    background: #7d92ff;
    box-shadow: 0 0 0 3px #eef2ff;
    cursor: pointer;
}
.tryit-mb-scrubber::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 9999px;
    background: #7d92ff;
    border: none;
    cursor: pointer;
}
.tryit-mb-time {
    font-size: 0.68rem;
    color: #94a3b8;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
/* Slow and hint share the same square button style */
.tryit-mb-slow,
.tryit-mb-hint {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 10px;
    border: 1.5px solid #c7d2fe;
    background: none;
    color: #6366f1 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0;
}
.tryit-mb-slow.is-active { background: #eef2ff; border-color: #6366f1; }

#tryit-mobile-bar button.tryit-mb-hint svg,
#tryit-mobile-bar button.tryit-mb-slow svg {
    display: block !important;
    width: 22px !important;
    height: 22px !important;
    fill: #6366f1 !important;
    color: #6366f1 !important;
    pointer-events: none;
}

/* ============================================
   COMPLETION CARD — premium styled
   ============================================ */
@keyframes tryit-slide-up {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.tryit-completion {
    background: #fff;
    border: 1px solid #e8ecff;
    border-top: 3px solid #6366f1;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(79, 70, 229, 0.12);
    padding: 28px 24px 24px;
    margin: 16px auto;
    max-width: 440px;
    text-align: center;
    animation: tryit-slide-up 0.35s ease both;
}
.tryit-completion-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: #4f46e5;
    background: #eef2ff;
    border-radius: 99px;
    padding: 3px 10px;
    margin-bottom: 10px;
}
.tryit-completion-headline {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 6px 0;
    line-height: 1.2;
}
.tryit-completion-sub {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0 0 14px 0;
    line-height: 1.5;
}
/* ── UP NEXT embedded recommendation card ── */
.tryit-next-section {
    text-align: left;
    margin: 20px 0 4px;
}
.tryit-next-label {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    color: #94a3b8;
    margin-bottom: 8px;
}
.tryit-next-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 3px solid #7d92ff;
    border-radius: 10px;
    padding: 14px 16px;
}
.tryit-next-card__source {
    font-size: 0.72rem;
    color: #64748b;
    font-style: italic;
    margin-bottom: 5px;
}
.tryit-next-card__title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
    line-height: 1.3;
}
.tryit-next-card__title--locked {
    color: #94a3b8;
}
.tryit-next-card__link {
    color: #7d92ff;
    text-decoration: none;
}
.tryit-next-card__link:hover { text-decoration: underline; }
.tryit-next-card__why {
    font-size: 0.78rem;
    color: #475569;
    font-style: italic;
    line-height: 1.45;
    margin-bottom: 8px;
}
.tryit-next-card__actions { margin-top: 4px; }
.tryit-next-card__go {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #7d92ff;
    background: #eef2ff;
    border-radius: 6px;
    padding: 3px 12px;
    text-decoration: none;
    transition: background 0.15s;
}
.tryit-next-card__go:hover { background: #e0e7ff; color: #5a6fd1; }

/* ── Coaching pitch line above CTA ── */
.tryit-coaching-pitch {
    font-size: 0.82rem;
    color: #64748b;
    margin: 16px 0 14px;
    line-height: 1.4;
}

/* Keep old hook styles in case teacher variant still uses them */
.tryit-completion-hook {
    margin: 0 0 20px 0;
    text-align: center;
    line-height: 1.75;
}
.tryit-hook-lead {
    display: block;
    font-size: 1.05rem;
    font-style: italic;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}
.tryit-hook-support {
    display: block;
    font-size: 0.85rem;
    font-style: normal;
    font-weight: 400;
    color: #94a3b8;
    letter-spacing: 0.02em;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 767px) {
    /* Pad bottom so content doesn't hide behind the fixed controls bar */
    .tryit-mobile-bar.is-visible ~ * .tryit-quiz-container,
    body.tryit-bar-active .tryit-experience {
        padding-bottom: 80px;
    }
    /* Simpler: always add bottom room when bar could be present */
    #tryit-experience {
        padding-bottom: 80px;
    }
}

@media (max-width: 480px) {
    /* Level pills stack vertically on mobile */
    .tryit-level-selector {
        flex-direction: column;
        align-items: stretch;
    }

    .tryit-level-pill {
        flex-direction: row;
        justify-content: space-between;
        min-width: 100%;
    }

    .tryit-level-pill .pill-hint {
        margin-top: 0;
        margin-left: auto;
    }

    /* Transcript help wraps on mobile */
    .tryit-transcript-help {
        flex-wrap: wrap;
        padding: 0.875rem 0.75rem;
        text-align: left;
        justify-content: flex-start;
    }

    /* Dropdown menu: compact sizing on mobile, opens downward */
    .tryit-dd-menu {
        top: calc(100% + 4px);
        bottom: auto;
        min-width: 200px;
    }
    .tryit-dd-item { padding: 0.45rem 0.625rem; }

    /* Level nav stacks on mobile */
    .tryit-level-nav {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .tryit-nav-btn {
        width: 100%;
    }

    /* Sticky CTA stacks on mobile */
    .tryit-sticky-inner {
        flex-direction: column;
        gap: 0.75rem;
    }

    .tryit-sticky-text {
        font-size: 0.85rem;
    }

    /* Completion actions stack on mobile */
    .tryit-completion-actions {
        flex-direction: column;
    }

    .tryit-completion-actions .tryit-btn {
        width: 100%;
    }
}

