/* Components — Dashboard widgets, history, share, writing, activate, group */

/* Logo Cú Aptis — luôn nền trong suốt */
.brand-logo,
.study-pdf-logo,
.share-card-brand-logo,
.auth-brand-logo,
.certificate-brand-logo {
    background: transparent !important;
    object-fit: contain;
}

/* ─── SHARED GRIDS ───────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.stat-card {
    padding: 1.25rem;
    text-align: center;
}
.stat-card span {
    display: block;
    font-size: 0.78rem;
    color: var(--muted);
    margin-bottom: 0.35rem;
}
.stat-card strong {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
}

/* Band pills (global) */
.band-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.35rem;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    border: 1px solid transparent;
}
.band-pill-a1, .band-pill-a1 { background: #ffedd5; color: #c2410c; border-color: rgba(234, 88, 12, 0.15); }
.band-pill-a2, .band-pill-a2 { background: #fef3c7; color: #b45309; border-color: rgba(217, 119, 6, 0.15); }
.band-pill-b1, .band-pill-b1 { background: #d1fae5; color: #047857; border-color: rgba(5, 150, 105, 0.15); }
.band-pill-b2, .band-pill-b2 { background: #dbeafe; color: #1d4ed8; border-color: rgba(37, 99, 235, 0.15); }
.band-pill-c, .band-pill-c  { background: #ede9fe; color: #5b21b6; border-color: rgba(109, 40, 217, 0.15); }
.band-pill-below-a1 { background: #fee2e2; color: #b91c1c; border-color: rgba(220, 38, 38, 0.15); }
.band-pill-muted { background: #f1f5f9; color: #94a3b8; border-color: #e2e8f0; font-weight: 600; }

/* Large band badge (dashboard) */
.band-badge-lg {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(160deg, #f5f3ff, #ede9fe);
    border: 2px solid rgba(109, 40, 217, 0.2);
    box-shadow: 0 4px 16px rgba(109, 40, 217, 0.12);
}
.band-badge-lg-kicker {
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #7c3aed;
}
.band-badge-lg-value {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1;
    color: #4c1d95;
}
.band-badge-lg[data-band="below-a1"] { background: linear-gradient(160deg, #fef2f2, #fee2e2); border-color: rgba(220,38,38,0.25); }
.band-badge-lg[data-band="below-a1"] .band-badge-lg-value { color: #b91c1c; }
.band-badge-lg[data-band="a1"] { background: linear-gradient(160deg, #fff7ed, #ffedd5); border-color: rgba(234,88,12,0.25); }
.band-badge-lg[data-band="a1"] .band-badge-lg-value { color: #c2410c; }
.band-badge-lg[data-band="a2"] { background: linear-gradient(160deg, #fffbeb, #fef3c7); border-color: rgba(217,119,6,0.25); }
.band-badge-lg[data-band="a2"] .band-badge-lg-value { color: #b45309; }
.band-badge-lg[data-band="b1"] { background: linear-gradient(160deg, #ecfdf5, #d1fae5); border-color: rgba(5,150,105,0.25); }
.band-badge-lg[data-band="b1"] .band-badge-lg-value { color: #047857; }
.band-badge-lg[data-band="b2"] { background: linear-gradient(160deg, #eff6ff, #dbeafe); border-color: rgba(37,99,235,0.25); }
.band-badge-lg[data-band="b2"] .band-badge-lg-value { color: #1d4ed8; }
.band-badge-lg[data-band="c"] { background: linear-gradient(160deg, #f5f3ff, #ede9fe); border-color: rgba(109,40,217,0.3); }
.band-badge-lg[data-band="c"] .band-badge-lg-value { color: #5b21b6; }

.band-scale-strip {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.3rem;
    margin-bottom: 1rem;
    padding: 0.35rem;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid var(--border-light);
}
.band-scale-strip-item {
    display: block;
    padding: 0.35rem 0;
    border-radius: 7px;
    font-size: 0.68rem;
    font-weight: 700;
    text-align: center;
    color: #94a3b8;
}
.band-scale-strip-item.is-active {
    color: #fff;
    background: linear-gradient(135deg, var(--brand), #5b21b6);
    box-shadow: 0 2px 8px rgba(109, 40, 217, 0.22);
}

.band-trend {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    margin-top: 0.25rem;
}
.band-trend-up   { color: var(--success); }
.band-trend-down { color: var(--error); }
.band-trend-stable { color: var(--muted); }

/* ─── DASHBOARD INSIGHTS ────────────────────────────── */
.dashboard-insights-lazy,
.dashboard-weak-spots-lazy {
    margin-bottom: 1.5rem;
}
.dashboard-insights-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}
.dashboard-insights-skeleton {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2.5rem 1.5rem;
    color: var(--muted);
    font-size: 0.9rem;
}
.dashboard-insights-spinner {
    width: 22px;
    height: 22px;
    border: 2.5px solid var(--border-light);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.dashboard-live-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.dashboard-weekly-card {
    padding: 1.1rem 1.25rem;
}
.dashboard-weekly-label {
    font-size: 0.8rem;
    color: var(--muted);
}
.dashboard-weekly-count {
    margin: 0.35rem 0 0.5rem;
    font-weight: 700;
    font-size: 1rem;
}
.dashboard-weekly-done {
    color: var(--success);
    font-size: 0.8rem;
}

.dashboard-stats {
    margin-bottom: 2rem;
    padding: 1.25rem 1.5rem;
}
.dashboard-stats-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.dashboard-stats-head h3 {
    margin: 0;
    font-size: 1rem;
}
.dashboard-recent-list {
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
    font-size: 0.9rem;
}
.dashboard-recent-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0;
    border-top: 1px solid var(--border-light);
}
.dashboard-recent-list a {
    color: var(--brand);
    font-weight: 600;
    font-size: 0.82rem;
    text-decoration: none;
}
.dashboard-recent-list a:hover { text-decoration: underline; }

.dashboard-notif-card {
    margin-bottom: 1.5rem;
    padding: 1.25rem 1.5rem;
}
.dashboard-notif-card h3 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
}
.notif-list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.notif-list li {
    border-top: 1px solid var(--border-light);
}
.notif-item {
    display: block;
    padding: 0.65rem 0;
    text-decoration: none;
    color: inherit;
    transition: color 0.15s;
}
.notif-item:hover { color: var(--brand); }

.dashboard-retention-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* ─── BAND PREDICTOR ─────────────────────────────────── */
.band-predictor-card {
    padding: 1.35rem 1.5rem 1.4rem;
    height: 100%;
    background: linear-gradient(155deg, #ffffff 0%, #faf8ff 55%, #f0f9ff 100%);
    border: 1px solid rgba(109, 40, 217, 0.12);
    box-shadow: 0 8px 28px rgba(109, 40, 217, 0.06);
}
.band-predictor-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}
.band-predictor-intro h3 {
    font-size: 1.05rem;
    margin: 0.15rem 0 0;
}
.band-predictor-sub {
    margin: 0.35rem 0 0;
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.45;
    max-width: 28ch;
}
.band-predictor-overall {
    text-align: center;
    flex-shrink: 0;
}
.band-predictor-overall small {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.68rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}
.band-predictor-band {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    color: var(--brand);
}
.band-goal-form {
    padding: 0.85rem 1rem;
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: var(--r);
    margin-bottom: 1rem;
}
.band-goal-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin-bottom: 0.4rem;
}
.band-goal-row {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}
.band-goal-select {
    flex: 1;
    min-width: 0;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: var(--r-sm);
    font-size: 0.9rem;
    font-weight: 600;
    background: #fff;
}
.band-goal-save {
    flex-shrink: 0;
    min-width: 7.5rem;
    padding: 0.55rem 1rem;
    font-weight: 700;
    border-radius: var(--r-sm);
    white-space: nowrap;
}
.band-predictor-cta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.55rem;
    margin-top: 0.85rem;
}
.band-skill-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.15rem;
    min-height: 3.4rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--r-sm);
    border: 1px solid transparent;
    text-decoration: none;
    transition: transform 0.18s var(--ease-out), box-shadow 0.18s;
}
.band-skill-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}
.band-skill-btn-label {
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}
.band-skill-btn-hint {
    font-size: 0.68rem;
    font-weight: 600;
    opacity: 0.85;
}
.band-skill-btn--reading {
    background: linear-gradient(145deg, #f5f3ff, #ede9fe);
    border-color: rgba(109, 40, 217, 0.2);
    color: #5b21b6;
}
.band-skill-btn--listening {
    background: linear-gradient(145deg, #eff6ff, #dbeafe);
    border-color: rgba(37, 99, 235, 0.2);
    color: #1d4ed8;
}
.band-skill-btn--writing {
    background: linear-gradient(145deg, #ecfdf5, #d1fae5);
    border-color: rgba(5, 150, 105, 0.2);
    color: #047857;
}
@media (max-width: 640px) {
    .band-predictor-cta {
        grid-template-columns: 1fr;
    }
    .band-skill-btn {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        min-height: 0;
        padding: 0.75rem 1rem;
    }
}
.band-predictor-gap {
    font-size: 0.82rem;
    color: #475569;
    margin: 0.65rem 0 0;
    line-height: 1.5;
}
.band-predictor-summary {
    font-size: 0.85rem;
    margin-bottom: 1rem;
    line-height: 1.55;
    color: #475569;
    padding: 0.65rem 0.85rem;
    background: rgba(109, 40, 217, 0.04);
    border-radius: var(--r-sm);
    border: 1px solid rgba(109, 40, 217, 0.08);
}
.band-predictor-skills {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.band-predictor-skill {
    padding: 0.7rem 0.9rem;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--r-sm);
    border-left: 3px solid #cbd5e1;
}
.band-predictor-skill[data-band="b1"] { border-left-color: #10b981; }
.band-predictor-skill[data-band="b2"] { border-left-color: #3b82f6; }
.band-predictor-skill[data-band="a1"] { border-left-color: #f97316; }
.band-predictor-skill[data-band="a2"] { border-left-color: #f59e0b; }
.band-predictor-skill[data-band="c"] { border-left-color: #7c3aed; }
.band-predictor-skill[data-band="below-a1"] { border-left-color: #ef4444; }
.band-predictor-skill-msg {
    display: block;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--muted);
}
.band-predictor-skill-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.15rem;
}
.band-predictor-skill-top strong {
    font-size: 0.88rem;
}
.band-predictor-skill small {
    display: block;
    font-size: 0.78rem;
    line-height: 1.45;
}

/* ─── EXAM MATRIX ───────────────────────────────────── */
.exam-matrix-visual {
    padding: 1.35rem 1.5rem;
    height: 100%;
}
.exam-matrix-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.1rem;
}
.exam-matrix-head h3 {
    font-size: 1.05rem;
    margin: 0.15rem 0 0;
}
.exam-matrix-skill-block {
    margin-bottom: 1.1rem;
}
.exam-matrix-skill-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin-bottom: 0.5rem;
}
.matrix-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
    gap: 0.35rem;
}
.matrix-grid-visual {
    max-width: 100%;
}
.matrix-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.65rem;
    font-weight: 700;
    border: 1px solid transparent;
    transition: transform 0.15s, box-shadow 0.15s;
}
.matrix-cell:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xs);
}
.matrix-cell-lg {
    min-height: 48px;
}
.matrix-num {
    font-size: 0.62rem;
    opacity: 0.75;
}
.matrix-pct {
    font-size: 0.72rem;
    font-weight: 800;
}
.matrix-pct-draft { opacity: 0.6; }
.matrix-pct-empty { opacity: 0.35; }
.matrix-pass    { background: #d1fae5; color: #047857; border-color: #a7f3d0; }
.matrix-mid     { background: #fef3c7; color: #b45309; border-color: #fde68a; }
.matrix-low     { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.matrix-progress { background: #e0e7ff; color: #4338ca; border-color: #c7d2fe; }
.matrix-empty   { background: #f1f5f9; color: #94a3b8; border-color: #e2e8f0; }
.matrix-legend-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    margin-top: 0.75rem;
    font-size: 0.72rem;
    color: var(--muted);
}
.matrix-legend {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    margin-right: 0.25rem;
    vertical-align: middle;
}

/* ─── WEAK SPOTS ─────────────────────────────────────── */
.weak-spots {
    margin-bottom: 1.5rem;
    padding: 1.25rem 1.5rem;
}
.weak-spots h2 {
    margin: 0.25rem 0 0.85rem;
    font-size: 1.05rem;
}
.weak-spots-bars {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.weak-spot-row {
    display: grid;
    grid-template-columns: 90px 1fr 56px;
    align-items: center;
    gap: 0.65rem;
}
.weak-spot-label {
    font-size: 0.82rem;
    font-weight: 600;
}
.weak-spot-bar-wrap {
    height: 8px;
    background: #f1f5f9;
    border-radius: 9999px;
    overflow: hidden;
}
.weak-spot-bar {
    height: 100%;
    border-radius: 9999px;
    background: linear-gradient(90deg, #f97316, #ef4444);
}
.weak-spot-pct {
    font-size: 0.75rem;
    font-weight: 600;
    color: #c2410c;
    text-align: right;
}
.weak-spots-recs {
    margin-top: 1rem;
}
.weak-spots-recs > p {
    font-size: 0.85rem;
    margin: 0 0 0.5rem;
}
.weak-spots-recs-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ─── UNLOCK BANNER ─────────────────────────────────── */
.dashboard-unlock-banner {
    margin-bottom: 1.5rem;
    padding: 1.35rem 1.5rem;
    background: linear-gradient(135deg, #faf5ff 0%, #eff6ff 100%);
    border: 1px solid rgba(109, 40, 217, 0.12);
    border-radius: var(--r-xl);
}
.dashboard-unlock-banner-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}
.dashboard-unlock-banner-title {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0.2rem 0;
}
.dashboard-unlock-banner-desc {
    font-size: 0.88rem;
    color: var(--muted);
    margin: 0;
    max-width: 52ch;
    line-height: 1.55;
}
.dashboard-unlock-strip-close {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: #fff;
    font-size: 1.25rem;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.15s;
}
.dashboard-unlock-strip-close:hover {
    background: #f1f5f9;
    color: var(--text);
}

/* ─── RESUME DRAFT BANNER ───────────────────────────── */
.resume-draft-banner {
    margin-bottom: 1.5rem;
}
.resume-draft-banner-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1.1rem 1.35rem;
    background: linear-gradient(135deg, #fffbeb, #fff);
    border-color: rgba(249, 115, 22, 0.2);
}
.resume-draft-banner-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(249, 115, 22, 0.12);
    color: #ea580c;
}
.resume-draft-banner-body { flex: 1; min-width: 180px; }
.resume-draft-banner-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #ea580c;
}
.resume-draft-banner-title {
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0.15rem 0;
}
.resume-draft-banner-meta {
    font-size: 0.82rem;
    color: var(--muted);
    margin: 0;
}
.resume-draft-banner-actions {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: flex-end;
}
.resume-draft-more summary {
    font-size: 0.82rem;
    color: var(--brand);
    cursor: pointer;
}
.resume-draft-more ul {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
    font-size: 0.85rem;
}
.resume-draft-more li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0;
    border-top: 1px solid var(--border-light);
}

/* ─── EXAM REMINDER ───────────────────────────────────── */
.exam-reminder-prefs {
    padding: 1.25rem 1.5rem;
}
.exam-reminder-prefs-head {
    margin-bottom: 0.85rem;
}
.exam-reminder-prefs-head h3 {
    font-size: 1rem;
    margin: 0.15rem 0;
}
.exam-reminder-desc {
    font-size: 0.85rem;
    color: var(--muted);
    margin: 0;
}
.exam-reminder-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* ─── HISTORY ───────────────────────────────────────── */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem 1.25rem;
}
.history-item-main {
    flex: 1;
    min-width: 160px;
}
.history-item-main strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 0.15rem;
}
.history-meta {
    font-size: 0.8rem;
    color: var(--muted);
}
.history-item-score {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}
.history-pct {
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 8px;
}
.history-pct.good { background: #d1fae5; color: #047857; }
.history-pct.mid  { background: #fef3c7; color: #b45309; }
.history-pct.low  { background: #fee2e2; color: #b91c1c; }
.history-writing-progress { margin-top: 0.5rem; }
.history-writing-progress-track {
    height: 6px;
    background: #f1f5f9;
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}
.history-writing-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--brand), var(--accent));
    border-radius: 9999px;
    transition: width 0.4s;
}
.part-stats-bars {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.part-stat-row {
    display: grid;
    grid-template-columns: 70px 1fr 44px;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.85rem;
}
.part-stat-bar {
    height: 8px;
    background: #f1f5f9;
    border-radius: 9999px;
    overflow: hidden;
}
.part-stat-bar > div {
    height: 100%;
    background: linear-gradient(90deg, var(--brand), var(--accent));
    border-radius: 9999px;
}

/* ─── PRACTICE PAGE ─────────────────────────────────── */
.practice-page .practice-tab-panel {
    margin-top: 0.5rem;
}
.practice-unlock-banner-head {
    margin-bottom: 0.5rem;
}
.practice-unlock-banner-title {
    font-size: 1rem;
    font-weight: 700;
}
.practice-unlock-banner-desc {
    font-size: 0.85rem;
    color: var(--muted);
}
.pool-empty-notice {
    padding: 1.5rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
}
.lesson-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.lesson-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1.1rem;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--r);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}
.lesson-item:hover {
    border-color: rgba(109, 40, 217, 0.2);
    background: var(--brand-dim);
}
.lesson-title { font-weight: 600; font-size: 0.9rem; }
.lesson-arrow { color: var(--brand); font-size: 1.1rem; }
.exam-mix-btn { margin-bottom: 1rem; }
.exam-mixed-hint {
    font-size: 0.82rem;
    color: var(--muted);
    margin-top: 0.35rem;
}
.text-warning { color: var(--warning); }

/* ─── SHARE CARD ────────────────────────────────────── */
.share-body {
    background: linear-gradient(165deg, #f8fafc 0%, #f3eeff 100%);
    min-height: 100dvh;
    padding: 2rem 1rem;
}
.share-page {
    max-width: 420px;
    margin: 0 auto;
}
.share-card-preview {
    padding: 2rem 1.75rem;
    text-align: center;
    margin-bottom: 1.25rem;
}
.share-card-brand { margin-bottom: 1rem; }
.share-card-brand-logo { height: 36px; margin: 0 auto; }
.share-card-tag {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--brand);
    margin-bottom: 0.5rem;
}
.share-card-preview h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--brand);
    margin: 0.25rem 0;
}
.share-card-score {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.share-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.share-card-meta,
.share-card-user,
.share-card-date {
    font-size: 0.82rem;
    color: var(--muted);
}
.share-card-cta {
    margin-top: 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--brand);
}
.share-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.share-actions .btn { width: 100%; justify-content: center; }

/* ─── GROUP MANAGE ──────────────────────────────────── */
.group-dashboard-card {
    margin-bottom: 1.5rem;
    padding: 1.35rem 1.5rem;
    border: 1px solid rgba(14, 165, 233, 0.18);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.06), rgba(109, 40, 217, 0.04));
}
.group-dashboard-card-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
}
.group-dashboard-copy h2 {
    margin: 0.15rem 0 0.35rem;
    font-size: 1.2rem;
}
.group-dashboard-hint {
    margin: 0.65rem 0 0;
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.5;
    max-width: 52ch;
}
.group-dashboard-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: stretch;
    min-width: min(100%, 220px);
}

.group-manage-page { max-width: 880px; }
.group-manage-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.75rem;
}
.group-manage-hero-copy h1 { margin: 0.2rem 0 0.45rem; letter-spacing: -0.02em; }
.group-manage-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(110px, 1fr));
    gap: 1rem 1.25rem;
    padding: 1rem 1.15rem;
    min-width: min(100%, 260px);
}
.group-manage-stat { display: flex; flex-direction: column; gap: 0.2rem; }
.group-manage-stat-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted-light);
}
.group-manage-stat strong { font-size: 1.05rem; color: var(--text); letter-spacing: -0.02em; }
.group-manage-stat-of { font-weight: 500; color: var(--muted); font-size: 0.9em; }
.group-seat-meter {
    height: 4px;
    border-radius: 999px;
    background: rgba(109, 40, 217, 0.08);
    overflow: hidden;
    margin-top: 0.4rem;
}
.group-seat-meter span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--brand), var(--accent));
    transition: width 0.6s var(--ease-out);
}

/* ── Invite showcase (premium) ── */
.group-invite-showcase {
    position: relative;
    margin-bottom: 1.5rem;
    border-radius: var(--r-xl);
    overflow: hidden;
    border: 1px solid rgba(109, 40, 217, 0.14);
    background: #fff;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 24px 64px rgba(109, 40, 217, 0.1),
        0 4px 16px rgba(15, 23, 42, 0.04);
}
.group-invite-showcase__mesh {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 70% 55% at 100% 0%, rgba(14, 165, 233, 0.14) 0%, transparent 55%),
        radial-gradient(ellipse 60% 50% at 0% 100%, rgba(109, 40, 217, 0.12) 0%, transparent 50%),
        linear-gradient(180deg, rgba(248, 250, 252, 0.5) 0%, transparent 40%);
}
.group-invite-showcase__inner {
    position: relative;
    padding: clamp(1.35rem, 4vw, 2rem);
}

.group-invite-showcase__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 1.35rem;
}
.group-invite-showcase__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--brand);
    margin-bottom: 0.5rem;
}
.group-invite-showcase__head-copy h2 {
    margin: 0 0 0.4rem;
    font-size: clamp(1.35rem, 3.5vw, 1.75rem);
    letter-spacing: -0.03em;
    line-height: 1.15;
}
.group-invite-showcase__head-copy p {
    margin: 0;
    font-size: 0.92rem;
    color: var(--muted);
    max-width: 42ch;
    line-height: 1.55;
}

.group-seat-ring {
    position: relative;
    width: 96px;
    height: 96px;
    flex-shrink: 0;
}
.group-seat-ring__svg {
    width: 100%;
    height: 100%;
    transform: rotate(0deg);
}
.group-seat-ring__track {
    stroke: rgba(109, 40, 217, 0.1);
}
.group-seat-ring__fill {
    stroke: url(#group-seat-gradient);
    stroke: var(--brand);
    stroke-linecap: round;
    transition: stroke-dasharray 0.7s var(--ease-out);
}
.group-seat-ring__center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.1;
}
.group-seat-ring__center strong {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text);
}
.group-seat-ring__center span {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin-top: 0.1rem;
}

.group-seat-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1.35rem;
    padding: 0.85rem 1rem;
    border-radius: var(--r-lg);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(109, 40, 217, 0.08);
    backdrop-filter: blur(8px);
}
.group-seat-slot {
    --slot-i: 0;
    animation: group-slot-in 0.45s var(--ease-out) both;
    animation-delay: calc(var(--slot-i) * 35ms);
}
@keyframes group-slot-in {
    from { opacity: 0; transform: scale(0.85) translateY(4px); }
    to { opacity: 1; transform: none; }
}
.group-seat-slot__avatar {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.78rem;
    font-weight: 700;
    transition: transform 0.25s var(--ease-out), box-shadow 0.25s;
}
.group-seat-slot.is-empty .group-seat-slot__avatar {
    border: 1.5px dashed rgba(109, 40, 217, 0.22);
    color: var(--muted-light);
    background: rgba(248, 250, 252, 0.8);
    font-size: 1rem;
    font-weight: 400;
}
.group-seat-slot.is-filled .group-seat-slot__avatar {
    background: linear-gradient(145deg, rgba(109, 40, 217, 0.15), rgba(14, 165, 233, 0.12));
    color: var(--brand-dark);
    border: 1.5px solid rgba(109, 40, 217, 0.18);
    box-shadow: 0 2px 8px rgba(109, 40, 217, 0.1);
}
.group-seat-slot.is-owner .group-seat-slot__avatar {
    background: linear-gradient(145deg, var(--brand), var(--brand-mid));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(109, 40, 217, 0.35);
}
.group-seat-slot.is-pending .group-seat-slot__avatar {
    background: linear-gradient(145deg, rgba(14, 165, 233, 0.12), rgba(109, 40, 217, 0.08));
    border-style: dashed;
    opacity: 0.85;
}
.group-seat-slot.is-filled:hover .group-seat-slot__avatar {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(109, 40, 217, 0.18);
}

.group-invite-composer { display: flex; flex-direction: column; gap: 1rem; }
.group-invite-composer__panel {
    padding: 1.15rem 1.2rem 1rem;
    border-radius: var(--r-lg);
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.07);
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
    transition: border-color 0.25s, box-shadow 0.25s;
}
.group-invite-composer__panel:focus-within {
    border-color: rgba(109, 40, 217, 0.22);
    box-shadow:
        0 0 0 4px rgba(167, 139, 250, 0.12),
        0 8px 24px rgba(109, 40, 217, 0.08);
}
.group-invite-composer__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}
.group-invite-composer__label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
}
.group-invite-composer__counter {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: var(--brand-dim);
    color: var(--brand);
    transition: background 0.2s, color 0.2s;
}
.group-invite-composer__counter.is-warning {
    background: rgba(217, 119, 6, 0.12);
    color: var(--warning);
}
.group-invite-composer__counter.is-error {
    background: rgba(220, 38, 38, 0.1);
    color: var(--error);
}

.group-invite-composer__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.65rem;
    min-height: 0;
}
.group-email-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    background: linear-gradient(135deg, rgba(109, 40, 217, 0.08), rgba(14, 165, 233, 0.06));
    color: var(--brand-dark);
    border: 1px solid rgba(109, 40, 217, 0.12);
    animation: chip-pop 0.28s var(--ease-out);
}
.group-email-chip.is-invalid {
    background: rgba(220, 38, 38, 0.06);
    color: var(--error);
    border-color: rgba(220, 38, 38, 0.2);
}
@keyframes chip-pop {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: none; }
}

.group-invite-composer__field {
    position: relative;
}
.group-invite-composer__field-icon {
    position: absolute;
    top: 0.85rem;
    left: 0.9rem;
    color: var(--muted-light);
    pointer-events: none;
    transition: color 0.2s;
}
.group-invite-composer__panel:focus-within .group-invite-composer__field-icon {
    color: var(--brand-light);
}
.group-emails-input {
    width: 100%;
    min-height: 8.5rem;
    padding: 0.8rem 0.95rem 0.8rem 2.65rem;
    border: none;
    border-radius: var(--r-sm);
    font-size: 0.88rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    line-height: 1.65;
    resize: vertical;
    background: #fff;
    color: var(--text);
    transition: background 0.2s, box-shadow 0.2s;
}
.group-emails-input:focus {
    outline: none;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(109, 40, 217, 0.15);
}

.group-invite-full-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding: 0.95rem 1.1rem;
    border-radius: var(--r-lg);
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.1), rgba(249, 115, 22, 0.06));
    border: 1px solid rgba(217, 119, 6, 0.22);
}
.group-invite-full-banner__icon {
    flex-shrink: 0;
    color: var(--warning);
    margin-top: 0.1rem;
}
.group-invite-full-banner strong {
    display: block;
    font-size: 0.92rem;
    color: var(--text);
    margin-bottom: 0.2rem;
}
.group-invite-full-banner p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.45;
    max-width: 46ch;
}
.group-invite-full-banner .btn {
    margin-left: auto;
    align-self: center;
}
.group-emails-input::placeholder {
    color: var(--muted-light);
    font-family: var(--font);
    font-size: 0.84rem;
}
.group-invite-composer__hint {
    margin: 0.65rem 0 0;
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.45;
}
.group-invite-composer__hint.is-warning { color: var(--warning); }
.group-invite-composer__hint strong { color: var(--text); font-weight: 600; }

.group-invite-composer__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.group-invite-composer__steps {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
}
.group-invite-step {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
}
.group-invite-step__num {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.68rem;
    font-weight: 800;
    background: #fff;
    border: 1.5px solid rgba(109, 40, 217, 0.15);
    color: var(--brand);
    box-shadow: 0 1px 4px rgba(109, 40, 217, 0.08);
}
.group-invite-step__line {
    width: 1.25rem;
    height: 1px;
    background: linear-gradient(90deg, rgba(109, 40, 217, 0.2), rgba(14, 165, 233, 0.15));
    margin: 0 0.35rem;
}
.group-invite-submit {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.35rem;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    border-radius: var(--r-full);
    min-width: min(100%, 200px);
    justify-content: center;
}
.group-invite-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.group-invite-showcase__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.35rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(109, 40, 217, 0.08);
}
.group-invite-showcase__link-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin-bottom: 0.15rem;
}
.group-invite-showcase__link-copy p {
    margin: 0;
    font-size: 0.84rem;
    color: var(--muted);
}
.group-invite-url-row {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    min-width: min(100%, 320px);
    max-width: 420px;
}
.group-invite-url-input {
    flex: 1;
    min-width: 0;
    font-size: 0.76rem;
    padding: 0.6rem 0.85rem;
    border: 1px solid rgba(109, 40, 217, 0.12);
    border-radius: var(--r-full);
    background: rgba(255, 255, 255, 0.9);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.group-invite-url-input:focus {
    outline: none;
    border-color: var(--brand-light);
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.15);
}
.group-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: var(--r-full);
    white-space: nowrap;
    font-weight: 600;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.group-copy-btn.is-copied {
    border-color: var(--mint);
    color: var(--success);
    background: var(--mint-dim);
}
.group-copy-btn:active { transform: scale(0.97); }

.group-members-card { padding: 1.35rem 1.4rem; margin-bottom: 0; }
.group-panel-head {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 1rem;
}
.group-panel-head--compact {
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.85rem;
}
.group-panel-head h2 { margin: 0; font-size: 1.1rem; letter-spacing: -0.02em; }
.group-members-sub { margin: 0.15rem 0 0; font-size: 0.82rem; }
.group-member-email {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.82rem;
}
.group-role {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
}
.group-role-owner {
    color: var(--brand);
    background: var(--brand-dim);
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
}

.group-members-count {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.05);
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
}
.group-members-table-wrap { overflow-x: auto; }
.group-members-table {
    width: 100%;
    font-size: 0.85rem;
    border-collapse: collapse;
}
.group-members-table th {
    text-align: left;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--muted);
    padding: 0.5rem 0.65rem;
    border-bottom: 1px solid var(--border-light);
}
.group-members-table td {
    padding: 0.65rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
    vertical-align: middle;
}
.group-remove-btn { color: var(--rose); }
.group-status {
    display: inline-block;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
}
.group-status-active { background: #d1fae5; color: #047857; }
.group-status-invited { background: #e0e7ff; color: #4338ca; }

.group-manage-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1.5rem;
}

/* legacy aliases */
.group-manage-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.group-invite-card,
.group-emails-card { padding: 1.25rem; background: #fff; border: 1px solid var(--border-light); border-radius: var(--r-lg); }
.group-invite-url input { flex: 1; font-size: 0.82rem; }

/* ─── ACTIVATE KEY ──────────────────────────────────── */
.onboarding-page .onboarding-header h1 {
    font-size: clamp(1.65rem, 5vw, 2.15rem);
    letter-spacing: -0.02em;
}
.activate-layout {
    display: grid;
    grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}
.activate-sidebar {
    padding: 1.25rem;
    background: linear-gradient(165deg, #f8fafc 0%, #f5f3ff 100%);
    border-radius: var(--r-lg);
    border: 1px solid rgba(109, 40, 217, 0.1);
}
.activate-main {
    min-width: 0;
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(109, 40, 217, 0.12);
    background:
        radial-gradient(ellipse 70% 45% at 100% 0%, rgba(109, 40, 217, 0.06), transparent 55%),
        radial-gradient(ellipse 50% 40% at 0% 100%, rgba(14, 165, 233, 0.05), transparent 50%),
        #fff;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 12px 40px rgba(109, 40, 217, 0.08);
}
.activate-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 1.5rem;
    right: 1.5rem;
    height: 3px;
    border-radius: 0 0 4px 4px;
    background: linear-gradient(90deg, var(--brand), var(--accent));
    opacity: 0.85;
}
.activate-main-head {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.activate-main-copy h2 {
    margin: 0 0 0.25rem;
    font-size: 1.35rem;
}
.activate-main-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
}
.activate-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0.65rem;
    border-radius: var(--r-lg);
    background: rgba(248, 250, 252, 0.9);
    border: 1px solid rgba(15, 23, 42, 0.06);
}
.activate-step {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.8rem;
    border-radius: 9999px;
    background: transparent;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
    transition: background 0.25s var(--ease-out), color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.activate-step span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.07);
    font-size: 0.72rem;
    font-weight: 800;
    transition: background 0.25s var(--ease-out), color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.activate-step.is-active {
    background: var(--brand-dim);
    color: var(--brand-dark);
    transform: translateY(-1px);
}
.activate-step.is-active span {
    background: linear-gradient(145deg, var(--brand-mid), var(--brand));
    color: #fff;
    box-shadow: 0 4px 12px rgba(109, 40, 217, 0.28);
}
.activate-step.is-done {
    background: rgba(16, 185, 129, 0.08);
    color: #047857;
}
.activate-step.is-done span {
    background: linear-gradient(145deg, #10b981, #059669);
    color: #fff;
}
.activate-form { max-width: none; }
.activate-key-field { margin-bottom: 1.25rem; }
.activate-key-input-wrap {
    position: relative;
}
.activate-key-input-wrap::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: calc(var(--r-lg) + 1px);
    background: linear-gradient(135deg, rgba(109, 40, 217, 0.35), rgba(14, 165, 233, 0.25));
    opacity: 0;
    transition: opacity 0.25s var(--ease-out);
    pointer-events: none;
}
.activate-key-input-wrap:focus-within::before {
    opacity: 1;
}
.activate-key-input-wrap::after {
    content: '🔑';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    opacity: 0.45;
    pointer-events: none;
    z-index: 2;
}
.input-key {
    position: relative;
    z-index: 1;
    width: 100%;
    font-family: ui-monospace, 'SF Mono', Menlo, monospace;
    font-size: clamp(0.95rem, 3.8vw, 1.2rem);
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-align: center;
    padding: 1.15rem 2.75rem 1.15rem 1rem;
    border: 2px solid rgba(109, 40, 217, 0.14);
    border-radius: var(--r-lg);
    background: rgba(255, 255, 255, 0.98);
    color: var(--text);
    transition: border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.input-key::placeholder {
    color: #cbd5e1;
    font-weight: 600;
    letter-spacing: 0.1em;
}
.input-key:focus {
    outline: none;
    border-color: transparent;
    box-shadow: 0 8px 28px rgba(109, 40, 217, 0.12);
    transform: translateY(-2px);
}
.input-key.has-value {
    border-color: rgba(109, 40, 217, 0.28);
    background: #fff;
}
.activate-key-actions {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 0.65rem;
    margin-top: 1.25rem;
}
.activate-key-actions--single {
    grid-template-columns: 1fr;
}
.activate-steps--2 .activate-step { flex: 1; max-width: none; }
.activate-key-actions .btn {
    min-height: 50px;
    transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.activate-key-actions .btn:not(:disabled):hover {
    transform: translateY(-1px);
}
.activate-key-actions .btn-primary:not(:disabled) {
    box-shadow: 0 8px 28px rgba(109, 40, 217, 0.25);
}
.activate-key-preview {
    padding: 1rem 1.1rem;
    border-radius: var(--r-lg);
    font-size: 0.9rem;
    margin-top: 0.25rem;
    border: 1px solid transparent;
    line-height: 1.5;
    animation: activate-preview-in 0.35s var(--ease-out);
}
@keyframes activate-preview-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}
.activate-key-preview.is-success {
    background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
    border-color: rgba(5, 150, 105, 0.2);
}
.activate-key-preview.is-error {
    background: linear-gradient(135deg, #fef2f2, #fff1f2);
    border-color: rgba(220, 38, 38, 0.18);
}
.activate-key-preview-ok {
    margin: 0;
    color: #047857;
    font-weight: 600;
}
.activate-key-preview-err {
    margin: 0;
    color: #b91c1c;
    font-weight: 600;
}
.activate-footer-hints {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--muted);
}
.key-icon-wrap {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(145deg, var(--brand-dim), rgba(14, 165, 233, 0.08));
    color: var(--brand);
    flex-shrink: 0;
    margin-bottom: 0;
    border: 1px solid rgba(109, 40, 217, 0.12);
}
.how-to-buy { margin-top: 1.5rem; }
.how-to-list {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0;
    font-size: 0.88rem;
    color: var(--muted);
}
.how-to-list li {
    padding: 0.35rem 0;
    padding-left: 1.1rem;
    position: relative;
}
.how-to-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--brand);
}
.selected-package-card {
    padding: 1rem;
    background: var(--brand-dim);
    border-radius: var(--r);
    margin-bottom: 1rem;
}
.selected-package-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--brand);
}
.selected-package-desc {
    font-size: 0.88rem;
    margin-top: 0.25rem;
}

/* ─── WRITING AI ────────────────────────────────────── */
.writing-ai-page { max-width: 720px; }
.writing-ai-quota {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.85rem 1.1rem;
    margin-bottom: 1.25rem;
    font-size: 0.88rem;
}
.wai-inline-card { padding: 1.15rem 1.25rem; }
.wai-inline-hero {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 0.85rem;
}
.wai-inline-hero h3 { font-size: 1.75rem; font-weight: 800; }
.wai-inline-submit h3 { margin: 0 0 0.5rem; }

    padding: 1.5rem;
    margin-bottom: 1.25rem;
}
.writing-prompt-box {
    padding: 1rem 1.1rem;
    margin: 1rem 0;
    background: #f8fafc;
}
.writing-prompt-box strong {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin-bottom: 0.35rem;
}
.writing-pending-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border-light);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto 1rem;
}
.writing-ai-history { margin-top: 1.5rem; }
.writing-result-card { padding: 1.5rem; margin-bottom: 1.25rem; }
.writing-result-card--analysis { padding: 0; overflow: hidden; }
.writing-result-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}
.writing-original {
    margin-top: 1.25rem;
    border: 1px solid var(--border-light);
    border-radius: var(--r-sm);
    padding: 0.75rem 1rem;
}
.writing-original summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--brand);
}
.writing-original pre {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: inherit;
    font-size: 0.88rem;
    line-height: 1.55;
    margin: 0.75rem 0 0;
    padding: 0.85rem;
    background: #f8fafc;
    border-radius: var(--r-sm);
}

/* Writing coaching blocks */
.writing-feedback-main {
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 1rem;
    color: #334155;
}
.writing-coaching-block {
    padding: 0.85rem 1rem;
    border-radius: var(--r-sm);
    margin-bottom: 0.65rem;
    border: 1px solid var(--border-light);
}
.writing-coaching-block h4 {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0 0 0.5rem;
    font-size: 0.88rem;
}
.writing-coaching-strengths { background: #ecfdf5; border-color: rgba(16, 185, 129, 0.2); }
.writing-coaching-weaknesses { background: #fef2f2; border-color: rgba(239, 68, 68, 0.15); }
.writing-coaching-fixes { background: #eff6ff; border-color: rgba(59, 130, 246, 0.15); }
.writing-coaching-growth { background: #f5f3ff; border-color: rgba(109, 40, 217, 0.12); }
.writing-coaching-rewrite { background: #fffbeb; border-color: rgba(245, 158, 11, 0.25); grid-column: 1 / -1; }
.writing-suggested-rewrite-text {
    margin: 0 0 0.5rem;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--text-primary, #1e293b);
    white-space: pre-wrap;
}
.writing-suggested-rewrite-note {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-muted, #64748b);
    font-style: italic;
}
.writing-diff-legend {
    margin: 0 0 0.65rem;
    font-size: 0.78rem;
    color: var(--text-muted, #64748b);
}
.wdiff-legend-sample {
    display: inline-block;
    padding: 0 0.35rem;
    border-radius: 4px;
    font-style: normal;
}
.writing-diff-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    margin-bottom: 0.5rem;
}
.writing-diff-col {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    padding: 0.55rem 0.65rem;
    background: rgba(255, 255, 255, 0.65);
}
.writing-diff-col-suggested {
    border-color: rgba(245, 158, 11, 0.35);
    background: rgba(255, 251, 235, 0.85);
}
.writing-diff-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted, #64748b);
    margin-bottom: 0.35rem;
}
.writing-diff-body {
    font-size: 0.88rem;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}
.wdiff-del {
    text-decoration: line-through;
    text-decoration-color: #dc2626;
    color: #991b1b;
    background: rgba(254, 226, 226, 0.55);
    border-radius: 2px;
}
.wdiff-add {
    background: rgba(187, 247, 208, 0.75);
    color: #14532d;
    border-radius: 2px;
    padding: 0 0.1em;
}
.writing-rewrite-why {
    margin-top: 0.75rem;
    padding-top: 0.65rem;
    border-top: 1px dashed rgba(0, 0, 0, 0.1);
}
.writing-rewrite-why-title {
    margin: 0 0 0.45rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted, #64748b);
}
.writing-rewrite-changes {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.writing-rewrite-change {
    font-size: 0.86rem;
    line-height: 1.5;
}
.writing-rewrite-arrow {
    color: var(--text-muted, #64748b);
    font-weight: 700;
}
.writing-rewrite-reason {
    color: var(--text-muted, #64748b);
    font-size: 0.84rem;
}
@media (max-width: 640px) {
    .writing-diff-pair { grid-template-columns: 1fr; }
}
.writing-coaching-icon { font-weight: 800; }
.writing-feedback-list {
    margin: 0;
    padding-left: 1.1rem;
    font-size: 0.86rem;
    line-height: 1.5;
    color: #475569;
}
.writing-feedback-list li + li { margin-top: 0.25rem; }

/* BC criteria chart */
.writing-bc-block {
    margin: 1.25rem 0;
    padding: 1.1rem 1.15rem;
    background: #fafbff;
    border: 1px solid rgba(109, 40, 217, 0.1);
    border-radius: var(--r-md);
}
.writing-bc-head { margin-bottom: 0.85rem; }
.writing-bc-head h4 { margin: 0.2rem 0 0; font-size: 1rem; }
.writing-bc-layout {
    display: grid;
    grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}
.writing-bc-radar { width: 100%; height: auto; }
.writing-bc-grid { stroke: #e2e8f0; stroke-width: 1; }
.writing-bc-axis { stroke: #e2e8f0; stroke-width: 1; }
.writing-bc-fill { fill: rgba(109, 40, 217, 0.22); stroke: #6d28d9; stroke-width: 2; }
.writing-bc-label { font-size: 11px; fill: #64748b; font-weight: 700; }
.writing-bc-bars { display: flex; flex-direction: column; gap: 0.65rem; }
.writing-bc-bars-inline { margin: 0.75rem 0; }
.writing-bc-bar-row {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.82rem;
}
.writing-bc-bar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.writing-bc-bar-title { font-weight: 600; color: #334155; }
.writing-bc-bar-track {
    height: 8px;
    background: #f1f5f9;
    border-radius: 9999px;
    overflow: hidden;
}
.writing-bc-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #6d28d9, #0ea5e9);
    border-radius: 9999px;
}
.writing-bc-comment {
    margin: 0.15rem 0 0;
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.45;
}

/* ─── Writing AI analysis tabs ─────────────────────── */
.wai-analysis { padding: 1.35rem 1.5rem 1.5rem; }
.wai-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 200px);
    gap: 1.25rem;
    align-items: end;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 1rem;
}
.wai-hero-band {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.35rem;
}
.wai-hero-score {
    margin: 0;
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
}
.wai-hero-score span {
    font-size: 1rem;
    font-weight: 600;
    color: var(--muted);
}
.wai-hero-range,
.wai-hero-meta {
    margin: 0.35rem 0 0;
    font-size: 0.84rem;
    color: var(--muted);
}
.wai-band-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    padding: 0.35rem 0.65rem;
    border-radius: var(--r-sm);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}
.wai-band-badge--a1, .wai-band-badge--a2 { background: #fef3c7; color: #b45309; }
.wai-band-badge--b1 { background: #d1fae5; color: #047857; }
.wai-band-badge--b2 { background: #dbeafe; color: #1d4ed8; }
.wai-band-badge--c { background: #ede9fe; color: #6d28d9; }
.wai-band-badge--below-a1 { background: #fee2e2; color: #b91c1c; }
.wai-meter-track {
    height: 10px;
    background: #f1f5f9;
    border-radius: 9999px;
    overflow: hidden;
}
.wai-meter-fill {
    height: 100%;
    border-radius: 9999px;
    background: linear-gradient(90deg, #6d28d9, #0ea5e9);
}
.wai-meter-fill--a1, .wai-meter-fill--a2 { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.wai-meter-fill--b1 { background: linear-gradient(90deg, #10b981, #34d399); }
.wai-meter-fill--b2 { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.wai-meter-fill--c { background: linear-gradient(90deg, #7c3aed, #a78bfa); }
.wai-meter-ticks {
    display: flex;
    justify-content: space-between;
    margin-top: 0.35rem;
    font-size: 0.68rem;
    color: var(--muted);
    font-weight: 600;
}
.wai-part-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem;
    margin-bottom: 1rem;
}
.wai-part-chip {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: var(--r-sm);
    background: #fff;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}
.wai-part-chip:hover {
    border-color: rgba(109, 40, 217, 0.25);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}
.wai-part-chip-num {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--brand);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.wai-part-chip-score { font-size: 1rem; font-weight: 800; }
.wai-part-chip-weight { font-size: 0.68rem; color: var(--muted); }
.wai-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.25rem;
    background: #f8fafc;
    border-radius: var(--r-md);
    margin-bottom: 1rem;
}
.wai-tab {
    flex: 1 1 auto;
    min-width: 5.5rem;
    padding: 0.55rem 0.85rem;
    border: none;
    border-radius: var(--r-sm);
    background: transparent;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--muted);
    cursor: pointer;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}
.wai-tab:hover { color: var(--brand); }
.wai-tab.is-active {
    background: #fff;
    color: var(--brand);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}
.wai-panel { display: none; }
.wai-panel.is-active { display: block; }
.wai-overview-summary {
    font-size: 0.92rem;
    line-height: 1.6;
    color: #334155;
    margin: 0 0 1rem;
    padding: 0.85rem 1rem;
    background: rgba(109, 40, 217, 0.04);
    border-radius: var(--r-sm);
    border-left: 3px solid var(--brand);
}
.wai-holistic-note,
.wai-grader-foot {
    font-size: 0.8rem;
    margin-top: 1rem;
}
.wai-part-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--border-light);
}
.wai-part-head h3 { margin: 0; font-size: 1.1rem; }
.wai-part-score-card {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
    flex-shrink: 0;
}
.wai-part-score-card strong { font-size: 1.35rem; }
.wai-question-card {
    padding: 1rem 1.05rem;
    margin-bottom: 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: var(--r-md);
    background: #fff;
}
.wai-question-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}
.wai-question-head h4 { margin: 0; font-size: 0.92rem; }
.wai-question-score {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--brand);
    white-space: nowrap;
}
.wai-prompt,
.wai-answer {
    margin-bottom: 0.65rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--r-sm);
    font-size: 0.86rem;
    line-height: 1.55;
}
.wai-prompt { background: #f8fafc; border: 1px solid #eef2f7; }
.wai-answer { background: #fffbeb; border: 1px solid #fef3c7; }
.wai-prompt-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin-bottom: 0.25rem;
}
.wai-prompt p,
.wai-answer p { margin: 0; }
.wai-part-feedback {
    font-size: 0.88rem;
    line-height: 1.55;
    color: #334155;
    margin: 0.65rem 0;
}
.wai-criteria-mini {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    margin: 0.65rem 0;
}
.wai-criteria-row {
    padding: 0.55rem 0.65rem;
    background: #f8fafc;
    border-radius: var(--r-sm);
    border: 1px solid #eef2f7;
}
.wai-criteria-head {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    margin-bottom: 0.3rem;
}
.wai-criteria-bc {
    font-weight: 800;
    color: var(--brand);
    min-width: 1.75rem;
}
.wai-criteria-name { flex: 1; color: #475569; }
.wai-criteria-score { font-size: 0.78rem; }
.wai-criteria-track {
    height: 5px;
    background: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
}
.wai-criteria-fill {
    height: 100%;
    background: var(--brand);
    border-radius: 9999px;
}
.wai-criteria-note {
    margin: 0.3rem 0 0;
    font-size: 0.72rem;
    color: var(--muted);
    line-height: 1.4;
}
@media (max-width: 768px) {
    .wai-hero { grid-template-columns: 1fr; }
    .wai-part-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wai-bc-layout,
    .writing-bc-layout { grid-template-columns: 1fr; }
    .wai-criteria-mini { grid-template-columns: 1fr; }
    .wai-tabs { overflow-x: auto; flex-wrap: nowrap; }
    .wai-tab { flex: 0 0 auto; }
}

/* ─── APTIS BAND SCALE ──────────────────────────────── */
.aptis-band-scale-ref {
    margin-top: 1rem;
    font-size: 0.85rem;
}
.aptis-band-scale-ref summary {
    cursor: pointer;
    color: var(--brand);
    font-weight: 600;
}
.aptis-band-scale-body { margin-top: 0.75rem; }
.aptis-band-scale-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}
.aptis-band-scale-table th,
.aptis-band-scale-table td {
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--border-light);
    text-align: center;
}
.aptis-band-scale-table th {
    background: #f8fafc;
    font-weight: 600;
}
.aptis-band-scale-current {
    margin-top: 0.65rem;
    font-size: 0.85rem;
}
.aptis-band-scale-note {
    margin-top: 0.5rem;
    font-size: 0.78rem;
}

/* ─── STUDY PLAN EMPTY ──────────────────────────────── */
.study-plan-empty {
    padding: 1.5rem;
    text-align: center;
}
.study-plan-empty-body {
    font-size: 0.9rem;
    color: var(--muted);
}

/* ─── DASHBOARD POLISH ──────────────────────────────── */
.page-header .status-badge {
    padding: 0.55rem 1rem;
    font-size: 0.82rem;
    border: 1px solid transparent;
}
.page-header .status-active {
    background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
    border-color: rgba(5, 150, 105, 0.22);
    color: #047857;
}
.page-header .status-inactive {
    background: linear-gradient(135deg, #fff7ed, #fffbeb);
    border-color: rgba(249, 115, 22, 0.22);
    color: #c2410c;
}

.subscription-expired-banner {
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff7ed, #fff);
    border-color: rgba(249, 115, 22, 0.25);
}
.subscription-expired-text {
    margin: 0.35rem 0 0;
    font-size: 0.88rem;
    line-height: 1.55;
}
.subscription-expired-text a {
    color: var(--brand);
    font-weight: 600;
}

.skill-card.glass-card {
    padding: 1.25rem 1.1rem 1.1rem;
    text-decoration: none;
    color: inherit;
}

.gamification-streak-icon {
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.1rem;
}

.study-plan-card {
    padding: 1.35rem 1.5rem;
    margin-bottom: 1.5rem;
}

.exam-reminder-prefs-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.35rem;
}
.exam-reminder-prefs-head h3 {
    font-size: 1.05rem;
    margin: 0.15rem 0 0;
}

.band-predictor-card {
    background: linear-gradient(160deg, #fff 0%, #faf8ff 100%);
    border: 1px solid rgba(109, 40, 217, 0.1);
}
.exam-matrix-visual {
    background: linear-gradient(160deg, #fff 0%, #f0f9ff 100%);
    border: 1px solid rgba(14, 165, 233, 0.1);
}

.dashboard-stats .stat-card {
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: var(--r);
    padding: 1rem 0.75rem;
}
.dashboard-stats .stat-card:nth-child(1) strong { color: #6d28d9; }
.dashboard-stats .stat-card:nth-child(2) strong { color: #0284c7; }
.dashboard-stats .stat-card:nth-child(3) strong { color: #059669; }

.dashboard-weekly-card {
    background: linear-gradient(135deg, #faf8ff, #fff);
    border: 1px solid rgba(109, 40, 217, 0.1);
}

/* ─── NAV EXTRAS ────────────────────────────────────── */
.nav-cta-unlock { margin-left: 0.15rem; }
/* ─── RESPONSIVE ────────────────────────────────────── */
@media (max-width: 900px) {
    .dashboard-insights-grid { grid-template-columns: 1fr; }
    .activate-layout { grid-template-columns: 1fr; }
    .activate-main { padding: 1.35rem; }
    .activate-key-actions { grid-template-columns: 1fr; }
    .group-manage-hero { flex-direction: column; }
    .group-manage-stats { width: 100%; min-width: 0; }
    .group-invite-showcase__head { flex-direction: column; }
    .group-seat-ring { align-self: flex-start; }
    .group-invite-composer__footer { flex-direction: column; align-items: stretch; }
    .group-invite-composer__steps { justify-content: center; margin-bottom: 0.25rem; }
    .group-invite-submit { width: 100%; }
    .group-invite-showcase__link { flex-direction: column; align-items: stretch; }
    .group-invite-url-row { max-width: none; }
    .group-members-table thead { display: none; }
    .group-members-table tr {
        display: block;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border-light);
    }
    .group-members-table td {
        display: flex;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0.35rem 0;
        border: none;
    }
    .group-members-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--muted);
        font-size: 0.72rem;
        text-transform: uppercase;
    }
    .group-members-table td:last-child { justify-content: flex-end; }
    .group-members-table td:last-child::before { display: none; }
    .group-dashboard-card-inner { flex-direction: column; }
    .group-dashboard-actions { width: 100%; }
    .weak-spot-row { grid-template-columns: 80px 1fr 50px; }
}
@media (max-width: 640px) {
    .resume-draft-banner-inner { flex-direction: column; align-items: stretch; }
    .resume-draft-banner-actions { align-items: stretch; }
    .history-item { flex-direction: column; align-items: flex-start; }
    .stats-grid { grid-template-columns: 1fr; }
}

/* ─── STUDY MATERIALS (đáp án đề) ─────────────────── */
.study-promo-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(16, 185, 129, 0.2);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.06), rgba(109, 40, 217, 0.04));
}
.study-promo-banner p { margin: 0.25rem 0 0; font-size: 0.88rem; }
.study-promo-banner--speaking {
    border-color: rgba(13, 148, 136, 0.22);
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.06), rgba(109, 40, 217, 0.04));
}
.study-promo-banner--speaking strong { color: #0f766e; }
.study-promo-banner--locked {
    border-color: rgba(148, 163, 184, 0.35);
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.06), rgba(100, 116, 139, 0.04));
}
.study-promo-banner--locked strong { color: var(--muted); }
.study-dashboard-card {
    margin-bottom: 1.25rem;
    padding: 1.15rem 1.35rem;
    border: 1px solid rgba(16, 185, 129, 0.22);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.07), rgba(109, 40, 217, 0.04));
}
.study-dashboard-card-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.study-dashboard-card h2 {
    margin: 0.2rem 0 0.35rem;
    font-size: 1.1rem;
}
.study-dashboard-card p { margin: 0; font-size: 0.88rem; }
.study-skill-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}
.study-skill-tab {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--muted);
    border: 1px solid var(--border-light);
    background: #fff;
}
.study-skill-tab.is-active {
    color: #fff;
    background: var(--brand);
    border-color: var(--brand);
}
.study-part-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.85rem;
}
.study-part-card {
    display: block;
    padding: 1.1rem 1.15rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.study-part-card:hover {
    border-color: rgba(109, 40, 217, 0.25);
    box-shadow: var(--shadow-sm);
}
.study-part-card.is-empty { opacity: 0.55; pointer-events: none; }
.study-part-card h2 {
    margin: 0.35rem 0;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
}
.study-part-card__num {
    display: inline-flex;
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--brand);
    background: rgba(109, 40, 217, 0.1);
}
.study-part-card__meta { margin: 0; font-size: 0.82rem; color: var(--muted); }
.study-set-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.65rem;
}
.study-set-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 88px;
    padding: 0.85rem;
    text-decoration: none;
    color: inherit;
    text-align: center;
}
.study-set-card__badge {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--brand);
}
.study-set-card__cta {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--muted);
}
.study-back-link {
    display: inline-block;
    margin-bottom: 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
}
.study-back-link:hover { color: var(--brand); }
.study-view-hint { margin-top: 0.25rem; }
.study-view-nav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.study-instruction,
.study-passage,
.study-topic {
    margin-bottom: 1rem;
    padding: 1rem 1.15rem;
}
.study-block-title {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
    font-weight: 700;
}
.study-passage-text {
    margin: 0;
    line-height: 1.65;
    color: #334155;
}
.study-qa-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.35rem;
}
.study-merged-page .study-qa-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.study-qa-card {
    display: flex;
    flex-direction: column;
    padding: 0.75rem 0.9rem;
    min-height: 0;
}
.study-qa-head {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.35rem;
    flex-wrap: wrap;
}
.study-passage-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    border: 1px solid rgba(109, 40, 217, 0.22);
    background: rgba(109, 40, 217, 0.06);
    color: var(--brand);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    list-style: none;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.study-passage-details {
    margin-top: 0.5rem;
    width: 100%;
}
.study-passage-details > summary {
    list-style: none;
}
.study-passage-details > summary::-webkit-details-marker {
    display: none;
}
.study-passage-details[open] > summary.study-passage-btn {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    border-radius: 10px 10px 0 0;
}
.study-passage-details[open] .study-passage-panel {
    border-top: none;
    border-radius: 0 0 12px 12px;
    margin-top: 0;
}
.study-passage-btn:hover {
    background: rgba(109, 40, 217, 0.12);
}
.study-passage-panel {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(109, 40, 217, 0.18);
    background: #fff;
    overflow: hidden;
}
.study-passage-panel-label {
    padding: 0.55rem 1rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
    background: #f8fafc;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}
.study-passage-panel-body {
    padding: 0.75rem 0.9rem;
    font-size: 0.9rem;
    line-height: 1.45;
    color: #334155;
    width: 100%;
    box-sizing: border-box;
}
.study-passage-panel-body.aptis-passage {
    display: block;
    padding: 0.75rem 0.9rem;
    gap: 0;
}
.study-passage-panel-body .aptis-opinion-body {
    font-size: 0.88rem;
    line-height: 1.45;
    text-align: left;
}
.study-passage-panel-body .aptis-opinion {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}
.study-passage-panel-body .aptis-opinion-marker {
    flex-shrink: 0;
}
.study-passage-panel-body .aptis-opinion-body {
    flex: 1;
    min-width: 0;
}
.study-passage-panel-body .aptis-keyword,
.study-passage-panel-body strong.aptis-keyword {
    font-weight: 800;
    background: rgba(250, 204, 21, 0.4);
    padding: 0.08rem 0.25rem;
    border-radius: 4px;
}
.study-passage-panel-body .aptis-part1-passage {
    font-size: 0.9rem;
    line-height: 1.45;
}
.study-passage-panel-body .aptis-part4-paragraph-text {
    font-size: 0.88rem;
    line-height: 1.45;
}
.study-qa-options {
    flex: 1;
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.study-qa-num {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--brand);
}
.study-qa-tag {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    background: rgba(14, 165, 233, 0.1);
    color: #0284c7;
}
.study-qa-prompt {
    margin: 0 0 0.4rem;
    font-weight: 600;
    line-height: 1.4;
    font-size: 0.9rem;
    color: #1e293b;
}
.study-qa-quote {
    margin: 0 0 0.4rem;
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    background: #f8fafc;
    border-left: 3px solid rgba(109, 40, 217, 0.25);
    font-size: 0.86rem;
    line-height: 1.4;
    color: #334155;
}
.study-qa-quote strong,
.study-qa-quote .aptis-keyword {
    font-weight: 800;
    background: rgba(250, 204, 21, 0.35);
    padding: 0.05rem 0.2rem;
    border-radius: 4px;
}
.study-qa-option {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    padding: 0.4rem 0.55rem;
    border-radius: 8px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    background: #fafbfc;
}
.study-qa-option.is-correct {
    border-color: rgba(16, 185, 129, 0.35);
    background: rgba(16, 185, 129, 0.08);
}
.study-qa-letter {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 800;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
}
.study-qa-option.is-correct .study-qa-letter {
    background: #059669;
    border-color: #059669;
    color: #fff;
}
.study-qa-option-text {
    flex: 1;
    font-size: 0.86rem;
    line-height: 1.4;
    word-break: break-word;
}
.study-qa-check {
    flex-shrink: 0;
    color: #059669;
    font-weight: 800;
}
.study-qa-answer-only { margin: 0; font-size: 0.9rem; }
.study-qa-answer-badge {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
    font-weight: 700;
}
.study-view-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
}
@media (max-width: 640px) {
    .study-promo-banner { flex-direction: column; align-items: flex-start; }
    .study-dashboard-card-inner { flex-direction: column; align-items: flex-start; }
    .study-part-grid { grid-template-columns: 1fr; }
    .study-set-grid { grid-template-columns: repeat(3, 1fr); }
    .study-toc-links { gap: 0.3rem; }
}
.study-toc {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1rem;
    margin-bottom: 1.25rem;
    padding: 0.85rem 1rem;
    position: sticky;
    top: calc(var(--sh-header-h, 56px) + var(--sh-top, 0px) + 0.5rem);
    z-index: 20;
}
.study-toc-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    flex-shrink: 0;
}
.study-toc-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}
.study-toc-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.1rem;
    padding: 0.3rem 0.45rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--brand);
    background: rgba(109, 40, 217, 0.08);
    border: 1px solid rgba(109, 40, 217, 0.12);
}
.study-toc-link:hover {
    background: rgba(109, 40, 217, 0.14);
}
.study-pdf-grid {
    margin-bottom: 1rem;
    padding: 1rem 1.1rem;
}
.study-pdf-grid-head {
    margin-bottom: 0.75rem;
}
.study-pdf-grid-title {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 800;
    color: var(--brand);
}
.study-pdf-grid-hint {
    margin: 0;
    font-size: 0.84rem;
}
.study-pdf-grid-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
    gap: 0.45rem;
}
.study-pdf-set-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem 0.65rem;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    color: #4c1d95;
    background: #fff;
    border: 1px solid rgba(109, 40, 217, 0.22);
    box-shadow: var(--shadow-xs);
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}
.study-pdf-set-btn:hover {
    background: rgba(109, 40, 217, 0.08);
    border-color: rgba(109, 40, 217, 0.35);
    color: var(--brand);
    transform: translateY(-1px);
}
.study-pdf-grid-links--topics {
    grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
}
.study-pdf-set-btn--topic {
    justify-content: flex-start;
    text-align: left;
    font-size: 0.78rem;
    line-height: 1.3;
    padding: 0.45rem 0.55rem;
}
.study-pdf-set-btn--topic span {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.study-listening-p4-done {
    margin: 0.25rem 0 0;
    font-size: 0.82rem;
    padding: 0.35rem 0.5rem;
}
.study-reading-p5-done {
    margin: 0.25rem 0 0;
    font-size: 0.82rem;
    padding: 0.35rem 0.5rem;
}
.study-reading-order-done {
    margin: 0.25rem 0 0;
    font-size: 0.82rem;
    padding: 0.35rem 0.5rem;
}
/* Reading Part 2/3 — study correct order */
.study-exam-preview .aptis-order-study-answer-key {
    padding: 0.5rem 1rem 0.85rem;
}
.study-exam-preview .aptis-order-study-answer-title {
    margin: 0 0 0.5rem;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #059669;
}
.study-exam-preview .aptis-order-study-given {
    margin: 0 0 0.55rem;
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    background: #f8fafc;
    border-left: 3px solid #6d28d9;
    font-size: 0.88rem;
    line-height: 1.5;
}
.study-exam-preview .aptis-order-study-passage {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.study-exam-preview .aptis-order-study-row {
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: 0.45rem 0.5rem;
    align-items: start;
    padding: 0.45rem 0.6rem;
    border-radius: 10px;
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
}
.study-exam-preview .aptis-order-study-pos {
    width: 1.5rem;
    height: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 800;
    color: #fff;
    background: #059669;
    flex-shrink: 0;
}
.study-exam-preview .aptis-order-study-key {
    font-weight: 800;
    color: #6d28d9;
    min-width: 1.1rem;
    padding-top: 0.15rem;
}
.study-exam-preview .aptis-order-study-text {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.5;
    color: #0f172a;
}
/* Reading Part 5 — study answer order */
.study-exam-preview .aptis-part5-study-answer-key {
    padding: 0.5rem 1rem 0.85rem;
}
.study-exam-preview .aptis-part5-study-answer-title {
    margin: 0 0 0.5rem;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #059669;
}
.study-exam-preview .aptis-part5-study-order-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    counter-reset: part5pos;
}
.study-exam-preview .aptis-part5-study-order-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.45rem 0.6rem;
    border-radius: 10px;
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    font-size: 0.88rem;
    line-height: 1.4;
}
.study-exam-preview .aptis-part5-study-pos {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 800;
    color: #fff;
    background: #059669;
}
.study-exam-preview .aptis-part5-study-letter {
    flex-shrink: 0;
    font-weight: 800;
    color: #6d28d9;
    min-width: 1.1rem;
}
.study-exam-preview .aptis-part5-study-heading {
    flex: 1;
    color: #0f172a;
    font-weight: 600;
}
/* Listening P4 — study preview card */
.study-exam-preview--listening .aptis-listening-p4--study-only {
    margin: 0;
}
.study-exam-preview--listening .aptis-listening-p4-study-card {
    padding: 0.75rem 1rem 0.85rem;
}
.study-exam-preview--listening .aptis-listening-p4-study-topic-banner {
    margin-bottom: 0.5rem;
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    background: linear-gradient(135deg, #f5f3ff, #ede9fe);
    border: 1px solid rgba(109, 40, 217, 0.18);
}
.study-exam-preview--listening .aptis-listening-p4-study-topic-kicker {
    display: block;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #7c3aed;
    margin-bottom: 0.15rem;
}
.study-exam-preview--listening .aptis-listening-p4-study-topic-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: #4c1d95;
    line-height: 1.3;
}
.study-exam-preview--listening .aptis-listening-p4-study-meta {
    margin: 0 0 0.65rem;
    font-size: 0.8rem;
    color: #64748b;
}
.study-exam-preview--listening .aptis-listening-p4-study-questions {
    display: grid;
    gap: 0.55rem;
}
.study-exam-preview--listening .aptis-listening-p4-study-q {
    padding: 0.5rem 0.6rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 10px;
    background: #fafafa;
}
.study-exam-preview--listening .aptis-listening-p4-study-qhead {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--brand);
    margin-bottom: 0.35rem;
}
.study-exam-preview--listening .aptis-listening-p4-study-options {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.study-exam-preview--listening .aptis-listening-p4-study-opt {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 0.3rem 0.45rem;
    border-radius: 8px;
    font-size: 0.82rem;
    line-height: 1.35;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.06);
}
.study-exam-preview--listening .aptis-listening-p4-study-opt.is-correct {
    background: #ecfdf5;
    border-color: #6ee7b7;
    font-weight: 600;
}
.study-exam-preview--listening .aptis-listening-p4-study-opt-key {
    flex-shrink: 0;
    font-weight: 800;
    color: #64748b;
    min-width: 1.1rem;
}
.study-exam-preview--listening .aptis-listening-p4-study-opt-check {
    margin-left: auto;
    color: #059669;
    font-weight: 800;
}
.study-set-section {
    margin-bottom: 1.35rem;
    scroll-margin-top: calc(var(--sh-header-h, 56px) + var(--sh-top, 0px) + 4.5rem);
}
.study-set-section-head {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    margin-bottom: 0.45rem;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid rgba(109, 40, 217, 0.15);
}
.study-set-section-ordinal {
    font-size: 0.78rem;
    font-weight: 600;
    color: #94a3b8;
}
.study-set-pdf-btn {
    margin-left: auto;
    flex-shrink: 0;
}
.study-set-section-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--brand);
}
.study-set-section-topic {
    font-size: 0.88rem;
    font-weight: 600;
    color: #0284c7;
}
.study-set-empty {
    padding: 1rem 1.15rem;
}
.study-merged-page .study-instruction,
.study-merged-page .study-passage {
    margin-bottom: 0.35rem;
}
/* ─── STUDY MATERIALS (đáp án đề) ─────────────────── */
.container.study-merged-page,
.container.study-view-page,
.container.study-page {
    max-width: min(98vw, 1360px);
    width: 100%;
}
.study-set-passage {
    width: 100%;
    margin-bottom: 0;
}
.study-set-section .study-set-passage + .study-qa-list,
.study-view-page .study-set-passage + .study-qa-list {
    margin-top: 0.5rem;
    padding-top: 0;
    border-top: none;
}
.study-exam-preview {
    margin-bottom: 0;
    width: 100%;
}
.study-exam-preview .aptis-paper,
.study-exam-preview .aptis-paper--study-preview {
    max-width: none;
    width: 100%;
    margin: 0;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
}
.study-exam-preview .aptis-exam-part-block {
    margin-bottom: 0;
}
.study-exam-preview .aptis-instruction {
    padding: 0.6rem 1rem 0.45rem;
}
.study-exam-preview .aptis-instruction p {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.45;
}
.study-exam-preview .aptis-passage {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.5rem 1rem 0.45rem;
}
.study-exam-preview .aptis-opinion {
    height: auto;
    margin: 0;
    padding: 0.65rem 0.75rem;
    gap: 0.65rem;
    align-items: flex-start;
}
.study-exam-preview .aptis-opinion-marker {
    width: 32px;
    height: 32px;
    font-size: 0.82rem;
    border-radius: 8px;
}
.study-exam-preview .aptis-opinion-heading {
    margin: 0 0 0.25rem;
    font-size: 0.72rem;
}
.study-exam-preview .aptis-opinion-body {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.45;
    text-align: left;
}
.study-exam-preview .aptis-part1-passage {
    padding: 0.75rem 1rem;
    font-size: 0.92rem;
    line-height: 1.55;
}
.study-exam-preview .aptis-part4-passage-wrap,
.study-exam-preview .aptis-part4-headings,
.study-exam-preview .aptis-part4-intro,
.study-exam-preview .aptis-part5-topic {
    padding-left: 1rem;
    padding-right: 1rem;
}
.study-exam-preview .aptis-part4-paragraph-text,
.study-exam-preview .aptis-part5-position {
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: left;
}
.study-exam-preview .aptis-part5-passages .aptis-question {
    padding: 0.5rem 1rem;
    margin: 0;
}
.study-exam-preview .aptis-part5-passages {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding-bottom: 0.5rem;
}
.study-exam-preview .aptis-part4-snippet-guide {
    padding: 0.35rem 1rem 0.25rem;
    margin: 0;
}
.study-exam-preview .aptis-part4-snippet-guide p {
    margin: 0 0 0.25rem;
    font-size: 0.86rem;
    line-height: 1.4;
}
/* Listening study preview */
.study-exam-preview--listening .aptis-listening-p2-pool-study,
.study-exam-preview--listening .aptis-listening-p3-statements-study {
    padding: 0.5rem 1rem 0.65rem;
}
.study-exam-preview--listening .aptis-listening-p2-pool-study-title,
.study-exam-preview--listening .aptis-listening-p3-match-title {
    margin: 0 0 0.4rem;
    font-size: 0.88rem;
}
.study-exam-preview--listening .aptis-listening-p2-pool-study-list,
.study-exam-preview--listening .aptis-listening-p3-statements-study {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.study-exam-preview--listening .aptis-listening-p2-pool-study-list li,
.study-exam-preview--listening .aptis-listening-p3-statements-study li {
    font-size: 0.88rem;
    line-height: 1.4;
    padding: 0.35rem 0.5rem;
    background: #f8fafc;
    border-radius: 8px;
}
.study-exam-preview--listening .aptis-listening-p2-pool-key,
.study-exam-preview--listening .aptis-listening-p3-study-num {
    font-weight: 800;
    color: var(--brand);
    margin-right: 0.35rem;
}
.study-exam-preview--listening .aptis-listening-p4-screens {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem 1rem 0.65rem;
}
.study-exam-preview--listening .aptis-listening-p4-screen[hidden] {
    display: block !important;
}
.study-exam-preview--listening .aptis-listening-p4-audio-bar {
    display: none;
}
.study-exam-preview--listening .aptis-listening-p4-topic-head,
.study-exam-preview--listening .aptis-listening-p3-topic-memo {
    margin-bottom: 0.25rem;
}
.study-exam-preview--listening .aptis-listening-p4-study-hint {
    margin: 0;
    font-size: 0.82rem;
}
.study-pdf-btn-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
}
.study-pdf-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.study-opinions { padding: 1rem 1.15rem; margin-bottom: 0.75rem; }
.study-opinions-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.study-opinion {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}
.study-opinion-marker {
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--brand);
    background: rgba(109, 40, 217, 0.1);
}
.study-opinion-heading {
    margin: 0 0 0.35rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.study-opinion-body p {
    margin: 0;
    line-height: 1.65;
    color: #334155;
}
.study-opinion-body strong,
.study-opinion-body .aptis-keyword {
    color: #0f172a;
    font-weight: 800;
    background: rgba(250, 204, 21, 0.35);
    padding: 0.05rem 0.2rem;
    border-radius: 4px;
}
.study-statements,
.study-order-pool,
.study-headings { padding: 1rem 1.15rem; margin-bottom: 0.75rem; }
.study-statements-list,
.study-order-items,
.study-headings-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.study-statement,
.study-order-items li,
.study-headings-list li {
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
    font-size: 0.9rem;
    line-height: 1.5;
}
.study-statement-letter,
.study-order-key,
.study-heading-letter {
    flex-shrink: 0;
    font-weight: 800;
    color: var(--brand);
    min-width: 1.25rem;
}
.study-gap-answer {
    display: inline;
    padding: 0.1rem 0.35rem;
    border-radius: 6px;
    background: rgba(16, 185, 129, 0.15);
    color: #047857;
    font-weight: 700;
}
.study-notice,
.study-part4-guide {
    margin-bottom: 0.75rem;
    padding: 0.85rem 1rem;
    font-size: 0.88rem;
    line-height: 1.5;
}
.study-notice p,
.study-part4-guide p { margin: 0; }
.study-part4-guide p + p { margin-top: 0.35rem; }

/* ─── REFERRAL / AFFILIATE ───────────────────────────── */
.referral-page,
.referral-withdraw-page {
    max-width: 920px;
}

.referral-hero {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 1.25rem;
    align-items: stretch;
    margin-bottom: 1.25rem;
    padding: 1.35rem 1.4rem;
    border-radius: 20px;
    background:
        radial-gradient(ellipse 80% 60% at 100% 0%, rgba(109, 40, 217, 0.12), transparent 55%),
        radial-gradient(ellipse 60% 50% at 0% 100%, rgba(16, 185, 129, 0.1), transparent 50%),
        linear-gradient(145deg, #fff 0%, #f8fafc 100%);
    border: 1px solid rgba(109, 40, 217, 0.12);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.referral-hero-copy h1 {
    margin: 0.35rem 0 0.65rem;
    font-size: clamp(1.45rem, 3.5vw, 1.95rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.referral-hero-accent {
    background: linear-gradient(135deg, #6d28d9, #059669);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.referral-hero-lead {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--muted);
    max-width: 34rem;
}

.referral-hero-actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-top: 1.1rem;
}

.referral-hero-min {
    font-size: 0.82rem;
    color: var(--muted);
}

.referral-hero-balance {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.25rem 1.35rem;
    border: 1px solid rgba(16, 185, 129, 0.2);
    background: linear-gradient(160deg, rgba(16, 185, 129, 0.08), rgba(255, 255, 255, 0.9));
}

.referral-hero-balance-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #047857;
}

.referral-hero-balance-value {
    margin: 0.35rem 0 0.65rem;
    font-size: clamp(1.75rem, 4vw, 2.35rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #065f46;
    line-height: 1.1;
}

.referral-hero-balance-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.82rem;
    color: var(--muted);
}

.referral-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.7rem;
    margin-bottom: 1.25rem;
}

.referral-stat-card {
    padding: 0.95rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    border: 1px solid var(--border-light);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.referral-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.referral-stat-card--mint {
    border-color: rgba(16, 185, 129, 0.25);
    background: linear-gradient(160deg, rgba(16, 185, 129, 0.06), #fff);
}

.referral-stat-icon {
    font-size: 1.1rem;
    line-height: 1;
    margin-bottom: 0.15rem;
}

.referral-stat-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.referral-stat-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
}

.referral-share-card {
    padding: 1.25rem 1.35rem;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(109, 40, 217, 0.14);
    background: linear-gradient(180deg, rgba(109, 40, 217, 0.03), #fff 40%);
}

.referral-share-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.referral-share-head h2 {
    margin: 0 0 0.25rem;
    font-size: 1.15rem;
}

.referral-code-badge {
    flex-shrink: 0;
    padding: 0.45rem 0.75rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #6d28d9;
    background: rgba(109, 40, 217, 0.1);
    border: 1px dashed rgba(109, 40, 217, 0.35);
}

.referral-share-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.15rem;
}

.referral-share-step {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.6rem;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
    background: #f8fafc;
    border: 1px solid var(--border-light);
}

.referral-share-step span {
    width: 1.35rem;
    height: 1.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 800;
    color: #64748b;
    background: #fff;
    border: 1px solid var(--border-light);
    flex-shrink: 0;
}

.referral-share-step--highlight {
    color: #047857;
    background: #ecfdf5;
    border-color: #6ee7b7;
}

.referral-share-step--highlight span {
    color: #fff;
    background: #059669;
    border-color: #059669;
}

.referral-link-block + .referral-link-block {
    margin-top: 0.85rem;
}

.referral-field-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text);
}

.referral-url-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.referral-url-input {
    flex: 1;
    min-width: 12rem;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    font-size: 0.86rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    background: #f8fafc;
    color: #0f172a;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.referral-url-input:focus {
    outline: none;
    border-color: rgba(109, 40, 217, 0.45);
    box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.1);
}

.referral-share-tip {
    margin: 1rem 0 0;
    padding: 0.65rem 0.8rem;
    border-radius: 10px;
    font-size: 0.84rem;
    line-height: 1.5;
    color: var(--muted);
    background: #f8fafc;
    border-left: 3px solid #6d28d9;
}

.js-copy-ref.is-copied {
    background: #059669 !important;
    border-color: #059669 !important;
    color: #fff !important;
}

.referral-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.referral-panel {
    padding: 1.1rem 1.2rem;
    min-height: 12rem;
}

.referral-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

.referral-panel-head h2 {
    margin: 0;
    font-size: 1.05rem;
}

.referral-panel-count {
    min-width: 1.75rem;
    height: 1.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    color: #6d28d9;
    background: rgba(109, 40, 217, 0.1);
}

.referral-empty {
    text-align: center;
    padding: 1.5rem 0.75rem;
}

.referral-empty-icon {
    display: block;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.85;
}

.referral-empty p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

.referral-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.referral-list-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid transparent;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.referral-list-item:hover {
    background: #fff;
    border-color: var(--border-light);
}

.referral-list-main {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.referral-list-main strong {
    font-size: 0.9rem;
}

.referral-list-main .text-muted {
    font-size: 0.8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.referral-list-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    flex-shrink: 0;
}

.referral-list-meta time {
    font-size: 0.75rem;
    color: var(--muted);
    white-space: nowrap;
}

.referral-money {
    font-weight: 800;
    font-size: 0.88rem;
    color: #059669;
    white-space: nowrap;
}

.referral-status {
    display: inline-block;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.referral-status--pending { background: #fef3c7; color: #92400e; }
.referral-status--approved { background: #dbeafe; color: #1d4ed8; }
.referral-status--paid { background: #d1fae5; color: #047857; }
.referral-status--rejected { background: #fee2e2; color: #b91c1c; }

/* Withdraw page */
.referral-withdraw-top {
    margin-bottom: 1.25rem;
}

.referral-back-link {
    display: inline-block;
    margin-bottom: 0.85rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
}

.referral-back-link:hover {
    color: #6d28d9;
}

.referral-withdraw-balance {
    padding: 1.35rem 1.4rem;
    text-align: center;
    border: 1px solid rgba(16, 185, 129, 0.22);
    background: linear-gradient(160deg, rgba(16, 185, 129, 0.07), #fff);
}

.referral-withdraw-balance-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #047857;
}

.referral-withdraw-balance-value {
    display: block;
    margin: 0.4rem 0 0.35rem;
    font-size: clamp(2rem, 5vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #065f46;
    line-height: 1.1;
}

.referral-withdraw-grid {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 1rem;
    align-items: start;
}

.referral-withdraw-form-card {
    padding: 1.25rem 1.35rem;
}

.referral-withdraw-form-card h2 {
    margin: 0 0 0.35rem;
}

.referral-withdraw-form-lead {
    margin: 0 0 1rem;
    font-size: 0.88rem;
}

.referral-quick-amounts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 1rem;
}

.referral-quick-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
    margin-right: 0.15rem;
}

.referral-quick-btn {
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid var(--border-light);
    background: #fff;
    color: var(--text);
    cursor: pointer;
    transition: all 0.15s ease;
}

.referral-quick-btn:hover,
.referral-quick-btn.is-active {
    border-color: #6d28d9;
    background: rgba(109, 40, 217, 0.08);
    color: #6d28d9;
}

.referral-withdraw-form .form-group {
    margin-bottom: 0.9rem;
}

.referral-withdraw-form label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.84rem;
    font-weight: 600;
}

.referral-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.referral-amount-input {
    font-size: 1.15rem !important;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.btn-block {
    width: 100%;
    margin-top: 0.25rem;
}

.referral-withdraw-warn {
    margin: 0.85rem 0 0;
    padding: 0.65rem 0.8rem;
    border-radius: 10px;
    font-size: 0.86rem;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
}

.referral-withdraw-aside {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.referral-withdraw-info,
.referral-withdraw-recent {
    padding: 1.1rem 1.2rem;
}

.referral-withdraw-info h3,
.referral-withdraw-recent h3 {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
}

.referral-info-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.referral-info-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.86rem;
    line-height: 1.45;
    color: var(--muted);
}

.referral-info-num {
    flex-shrink: 0;
    min-width: 2.5rem;
    padding: 0.15rem 0.35rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 800;
    text-align: center;
    color: #6d28d9;
    background: rgba(109, 40, 217, 0.1);
}

.referral-info-icon {
    flex-shrink: 0;
    width: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
}

.referral-mini-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.referral-mini-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.86rem;
}

.referral-mini-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.referral-mini-list strong {
    display: block;
    font-size: 0.9rem;
}

.referral-mini-list .text-muted {
    font-size: 0.75rem;
}

@media (max-width: 900px) {
    .referral-hero { grid-template-columns: 1fr; }
    .referral-stats-grid { grid-template-columns: 1fr 1fr; }
    .referral-share-steps { grid-template-columns: 1fr 1fr; }
    .referral-panels { grid-template-columns: 1fr; }
    .referral-withdraw-grid { grid-template-columns: 1fr; }
    .referral-form-row { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
    .referral-stats-grid { grid-template-columns: 1fr; }
    .referral-share-steps { grid-template-columns: 1fr; }
    .referral-share-head { flex-direction: column; }
    .referral-list-item { flex-direction: column; }
    .referral-list-meta { align-items: flex-start; flex-direction: row; justify-content: space-between; width: 100%; }
}

/* Speaking study materials */
.study-speaking-topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.85rem;
}
.study-speaking-topic-card {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 1.1rem 1.15rem;
    text-decoration: none;
    color: inherit;
    min-height: 100%;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.study-speaking-topic-card:hover {
    border-color: rgba(109, 40, 217, 0.25);
    box-shadow: var(--shadow-sm);
}
.study-speaking-topic-card__thumb {
    margin: -0.15rem -0.15rem 0.35rem;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: #f4f4f5;
}
.study-speaking-topic-card__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.study-speaking-images {
    padding: 1rem;
    display: grid;
    gap: 0.85rem;
}
.study-speaking-images--compare {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.study-speaking-image {
    margin: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #f4f4f5;
    border: 1px solid var(--border-light);
}
.study-speaking-image img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: contain;
    margin: 0 auto;
}
.study-speaking-topic-card__num {
    display: inline-flex;
    align-self: flex-start;
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 800;
    color: #0d9488;
    background: rgba(13, 148, 136, 0.1);
}
.study-speaking-topic-card__thumb--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #fafafa, #f0f0f1);
    border: 1px dashed rgba(0, 0, 0, 0.12);
}
.study-speaking-topic-card__thumb--empty span {
    font-size: 1.75rem;
    opacity: 0.45;
}
.study-speaking-topic-card__badge {
    display: inline-flex;
    align-self: flex-start;
    padding: 0.18rem 0.45rem;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}
.study-speaking-topic-card__badge--warn {
    color: #c2410c;
    background: #ffedd5;
    border: 1px solid #fdba74;
}
.study-speaking-topic-card h2 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
}
.study-speaking-topic-card__preview {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.45;
    flex: 1;
}
.study-speaking-topic-card__cta {
    margin-top: 0.25rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--brand);
}
.study-speaking-qa-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.study-speaking-qa-card {
    padding: 1.15rem 1.25rem;
}
.study-speaking-qa-card__q {
    margin: 0 0 0.35rem;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}
.study-speaking-qa-card__prompt {
    margin: 0 0 1rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
}
.study-speaking-qa-card__label {
    margin: 0 0 0.5rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: #15803d;
}
.study-speaking-answer {
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--text);
}
.study-speaking-answer--highlight {
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.22);
    color: #166534;
}
.study-speaking-followup {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border-light);
}
.study-speaking-followup__q {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.45;
}
