/* ═══════════════════════════════════════════════════
   AQA A-Level Chemistry Content Pages - Shared Styles
   Based on IB Chemistry styles, adapted with indigo (#6366f1) accent
   ═══════════════════════════════════════════════════ */

/* ── Layout ── */
.alevel-content {
    max-width: 860px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-lg);
}

.alevel-content__header {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding-bottom: var(--space-md);
    margin-bottom: var(--space-xl);
}

.alevel-content__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 .5rem;
    border-radius: 6px;
    background: #6366f1;
    color: #fff;
    font-weight: 800;
    font-size: .8rem;
    flex-shrink: 0;
}

.alevel-content__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-dark);
    margin: 0;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.alevel-content__subtitle {
    font-size: .9rem;
    color: var(--color-muted);
    margin: .25rem 0 0;
}

/* ── Year Badge ── */
.alevel-year-badge {
    display: inline-block;
    padding: .15rem .5rem;
    border-radius: 4px;
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.alevel-year-badge--as {
    background: rgba(99, 102, 241, .1);
    color: #6366f1;
}

.alevel-year-badge--a2 {
    background: rgba(168, 85, 247, .1);
    color: #a855f7;
}

/* ── Prose / article text ── */
.alevel-prose {
    color: var(--color-body);
    line-height: 1.75;
    font-size: .95rem;
}

.alevel-prose h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-dark);
    margin: 2.5rem 0 1rem;
    padding-left: .85rem;
    border-left: 3px solid #6366f1;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.alevel-prose h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-dark);
    margin: 2rem 0 .75rem;
}

.alevel-prose h4 {
    font-size: .95rem;
    font-weight: 600;
    color: var(--color-dark);
    margin: 1.75rem 0 .6rem;
}

.alevel-prose p {
    margin-bottom: 1rem;
}

.alevel-prose ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.alevel-prose li {
    margin-bottom: .4rem;
}

.alevel-prose strong {
    color: var(--color-dark);
}

/* ── Tables ── */
.alevel-prose table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--color-border, rgba(15, 23, 42, 0.08));
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
}

.alevel-prose table th,
.alevel-prose table td {
    padding: 0.8rem 1.1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border, rgba(15, 23, 42, 0.08));
    transition: background-color 0.2s ease;
}

.alevel-prose table thead tr {
    background: var(--color-surface-raised, #f8fafc);
}

.alevel-prose table th {
    color: #6366f1;
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #6366f1;
}

.alevel-prose table td {
    color: var(--color-text, #334155);
    vertical-align: middle;
}

.alevel-prose table td:first-child {
    font-weight: 600;
    color: var(--color-navy, #0f172a);
}

.alevel-prose table tbody tr:nth-child(even) td {
    background: rgba(15, 23, 42, 0.015);
}

.alevel-prose table tbody tr:hover td {
    background: rgba(99, 102, 241, 0.04);
}

.alevel-prose table thead tr:first-child th:first-child {
    border-top-left-radius: 12px;
}

.alevel-prose table thead tr:first-child th:last-child {
    border-top-right-radius: 12px;
}

.alevel-prose table tbody tr:last-child td {
    border-bottom: none;
}

.alevel-prose table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 12px;
}

.alevel-prose table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 12px;
}

/* ── Definition Box ── */
.alevel-definition-box {
    background: rgba(99, 102, 241, .06);
    border-left: 4px solid #6366f1;
    padding: 1rem 1.25rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .04);
}

.alevel-definition-box strong {
    color: #312e81;
}

.alevel-definition-box p {
    margin: .25rem 0 0;
    color: #4338ca;
    font-size: .9rem;
}

/* ── Grid Layouts ── */
.alevel-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.alevel-grid--2 {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.alevel-grid--3 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.alevel-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* ── Info Box ── */
.alevel-info-box {
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin: 1rem 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .04);
    transition: box-shadow .2s;
}

.alevel-info-box:hover {
    box-shadow: 0 3px 10px rgba(0, 0, 0, .07);
}

.alevel-info-box h4 {
    font-size: .95rem;
    font-weight: 600;
    color: var(--color-dark);
    margin: 0 0 .5rem;
}

.alevel-info-box p {
    font-size: .88rem;
    color: var(--color-body);
    margin: 0;
    line-height: 1.6;
}

.alevel-info-box ul {
    font-size: .88rem;
    padding-left: 1.25rem;
    margin: .5rem 0 0;
}

/* ── Examiner Tip Box ── */
.alevel-examiner-tip {
    background: linear-gradient(135deg, #fef3c7, #fef9c3);
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .05);
}

.alevel-examiner-tip__title {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-weight: 700;
    color: #92400e;
    margin-bottom: .75rem;
    font-size: 1rem;
}

.alevel-examiner-tip p,
.alevel-examiner-tip li {
    font-size: .85rem;
    color: #78350f;
}

.alevel-examiner-tip ol,
.alevel-examiner-tip ul {
    padding-left: 1.25rem;
}

.alevel-examiner-tip li {
    margin-bottom: .5rem;
}

/* ── Worked Example Card ── */
.alevel-worked-example {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .05);
}

.alevel-worked-example__title {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-weight: 700;
    color: #166534;
    margin-bottom: .75rem;
    font-size: 1rem;
}

.alevel-worked-example__problem {
    background: rgba(255, 255, 255, .6);
    border-radius: 6px;
    padding: .75rem 1rem .75rem 1.25rem;
    margin-bottom: 1rem;
    font-size: .85rem;
    font-style: italic;
    color: #14532d;
    border-left: 3px solid #22c55e;
    overflow: visible;
}

.alevel-worked-example p {
    font-size: .85rem;
    color: #15803d;
    margin-bottom: .5rem;
}

/* ── Key Equation Box ── */
.alevel-equation-box {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    padding: 1rem;
    background: #f1f5f9;
    border-radius: 8px;
    margin: 1rem 0;
}

/* ── Required Practical Box ── */
.alevel-practical-box {
    background: linear-gradient(135deg, #eff6ff, #f0f9ff);
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .05);
}

.alevel-practical-box__title {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: .75rem;
    font-size: 1rem;
}

.alevel-practical-box p {
    font-size: .85rem;
    color: #1e3a8a;
}

/* ── Topic Navigation (subtopic links) ── */
.alevel-topic-links {
    margin: 2rem 0;
}

.alevel-topic-link {
    display: block;
    padding: 1.25rem 1.5rem;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 10px;
    text-decoration: none;
    margin-bottom: .75rem;
    transition: box-shadow .2s, border-color .2s, transform .15s;
}

.alevel-topic-link:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, .06);
    border-color: #a5b4fc;
    transform: translateY(-1px);
}

.alevel-topic-link__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alevel-topic-link h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-dark);
    margin: 0 0 .2rem;
    transition: color .15s;
}

.alevel-topic-link:hover h3 {
    color: #4f46e5;
}

.alevel-topic-link p {
    font-size: .8rem;
    color: var(--color-muted);
    margin: 0;
}

.alevel-topic-link__arrow {
    font-size: 1.2rem;
    color: var(--color-muted);
    transition: transform .15s;
}

.alevel-topic-link:hover .alevel-topic-link__arrow {
    transform: translateX(3px);
}

/* ── Topic Card (for hub index pages) ── */
.alevel-topic-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: .75rem;
}

@media (min-width: 600px) {
    .alevel-topic-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.alevel-topic-card {
    display: block;
    position: relative;
    padding: 1.25rem 3rem 1.25rem 1.5rem;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 12px;
    text-decoration: none;
    transition: box-shadow .2s, border-color .2s, transform .15s;
    color: inherit;
}

.alevel-topic-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, .08);
    border-color: #a5b4fc;
    transform: translateY(-2px);
}

.alevel-topic-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-dark);
    margin: 0 0 .25rem;
    transition: color .15s;
}

.alevel-topic-card:hover h3 {
    color: #4f46e5;
}

.alevel-topic-card p {
    font-size: .82rem;
    color: var(--color-muted);
    margin: 0;
    line-height: 1.4;
}

.alevel-topic-card__arrow {
    position: absolute;
    top: 50%;
    right: 1.25rem;
    transform: translateY(-50%);
    font-size: 1.1rem;
    color: #cbd5e1;
    transition: transform .15s, color .15s;
}

.alevel-topic-card:hover .alevel-topic-card__arrow {
    transform: translateY(-50%) translateX(3px);
    color: #6366f1;
}

/* ── Breadcrumb ── */
.alevel-breadcrumb {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .8rem;
    color: var(--color-muted);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

.alevel-breadcrumb a {
    color: #6366f1;
    text-decoration: none;
}

.alevel-breadcrumb a:hover {
    text-decoration: underline;
}

/* ── Bottom nav ── */
.alevel-bottom-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(15, 23, 42, .08);
    gap: 1rem;
}

.alevel-bottom-nav a {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .85rem;
    font-weight: 600;
    color: #6366f1;
    text-decoration: none;
    padding: .5rem .75rem;
    border-radius: 6px;
    transition: background .15s;
}

.alevel-bottom-nav a:hover {
    background: rgba(99, 102, 241, .06);
}

/* ── Spec Reference Tag ── */
.alevel-spec-ref {
    display: inline-block;
    padding: .15rem .5rem;
    border-radius: 4px;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .03em;
    background: rgba(99, 102, 241, .08);
    color: #6366f1;
    margin-left: .5rem;
}

/* ── Quiz Widget ── */
.alevel-quiz {
    margin: 2rem 0;
}

.alevel-quiz__title {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--color-dark);
    padding-bottom: .5rem;
    border-bottom: 2px solid rgba(15, 23, 42, .08);
    margin-bottom: 1.5rem;
}

.alevel-quiz__question {
    margin-bottom: 1.5rem;
}

.alevel-quiz__question-text {
    font-weight: 600;
    font-size: .9rem;
    color: var(--color-dark);
    margin-bottom: .75rem;
    display: flex;
    gap: .4rem;
}

.alevel-quiz__options {
    display: grid;
    grid-template-columns: 1fr;
    gap: .5rem;
}

@media (min-width: 600px) {
    .alevel-quiz__options {
        grid-template-columns: 1fr 1fr;
    }
}

.alevel-quiz__option {
    text-align: left;
    padding: .7rem 1rem;
    border: 1px solid rgba(15, 23, 42, .12);
    border-radius: 8px;
    font-size: .85rem;
    background: #fff;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    color: var(--color-body);
    font-family: inherit;
}

.alevel-quiz__option:hover:not(:disabled) {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, .2);
}

.alevel-quiz__option:disabled {
    cursor: default;
}

.alevel-quiz__option--correct {
    background: #dcfce7 !important;
    border-color: #22c55e !important;
    color: #166534 !important;
}

.alevel-quiz__option--incorrect {
    background: #fee2e2 !important;
    border-color: #ef4444 !important;
    color: #991b1b !important;
}

.alevel-quiz__option--dimmed {
    opacity: .45;
}

.alevel-quiz__score {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    font-weight: 700;
    text-align: center;
    font-size: 1.05rem;
    display: none;
}

.alevel-quiz__score--show { display: block; }
.alevel-quiz__score--great { background: #dcfce7; color: #166534; }
.alevel-quiz__score--ok { background: #fef9c3; color: #854d0e; }
.alevel-quiz__score--bad { background: #fee2e2; color: #991b1b; }

/* ── Flashcard Widget ── */
.alevel-flashcards {
    margin: 2rem 0;
}

.alevel-flashcards__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.alevel-flashcards__title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--color-dark);
    display: flex;
    align-items: center;
    gap: .5rem;
}

.alevel-flashcards__counter {
    font-size: .8rem;
    font-family: monospace;
    background: #f1f5f9;
    padding: .25rem .75rem;
    border-radius: 20px;
    color: var(--color-muted);
}

.alevel-flashcards__card-area {
    perspective: 1200px;
    height: 300px;
    cursor: pointer;
    margin-bottom: 1rem;
}

.alevel-flashcards__card {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform .6s cubic-bezier(.4, 0, .2, 1);
}

.alevel-flashcards__card.flipped {
    transform: rotateY(180deg);
}

.alevel-flashcards__face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.alevel-flashcards__front {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .06);
}

.alevel-flashcards__front-label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #6366f1;
}

.alevel-flashcards__front h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-dark);
    margin: 0;
    line-height: 1.4;
}

.alevel-flashcards__front .hint {
    margin-top: 1rem;
    font-size: .8rem;
    color: var(--color-muted);
}

.alevel-flashcards__back {
    transform: rotateY(180deg);
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
}

.alevel-flashcards__back-label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255, 255, 255, .5);
}

.alevel-flashcards__back p {
    font-size: 1.15rem;
    font-weight: 500;
    line-height: 1.5;
    margin: 0;
}

.alevel-flashcards__controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alevel-flashcards__btn {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-weight: 700;
    font-size: .85rem;
    color: var(--color-muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: .5rem;
    border-radius: 6px;
    transition: color .15s, background .15s;
    font-family: inherit;
}

.alevel-flashcards__btn:hover {
    color: #6366f1;
    background: rgba(99, 102, 241, .06);
}

.alevel-flashcards__dots {
    display: flex;
    gap: 4px;
}

.alevel-flashcards__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e2e8f0;
    transition: background .2s;
}

.alevel-flashcards__dot--active {
    background: #6366f1;
}

/* ── Indigo accent text ── */
.text-indigo { color: #6366f1; }

/* ── Coming Soon Banner ── */
.alevel-coming-soon {
    text-align: center;
    padding: 3rem 2rem;
    margin: 2rem 0;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(99,102,241,0.04), rgba(168,85,247,0.04));
    border: 1px solid rgba(99,102,241,0.12);
    position: relative;
    overflow: hidden;
}

.alevel-coming-soon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99,102,241,0.03) 0%, transparent 70%);
    animation: coming-soon-glow 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes coming-soon-glow {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(5%, 5%); }
}

.alevel-coming-soon__icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    position: relative;
    z-index: 1;
}

.alevel-coming-soon__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 1rem;
    border-radius: 20px;
    background: rgba(99,102,241,0.08);
    color: #6366f1;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.alevel-coming-soon__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6366f1;
    animation: dot-pulse 2s ease-in-out infinite;
}

@keyframes dot-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}

.alevel-coming-soon h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-dark);
    margin: 0 0 0.75rem;
    position: relative;
    z-index: 1;
}

.alevel-coming-soon__description {
    color: var(--color-body);
    opacity: 0.8;
    max-width: 480px;
    margin: 0 auto 2rem;
    font-size: 0.92rem;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.alevel-coming-soon__topics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.alevel-coming-soon__topic-tag {
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    background: rgba(99,102,241,0.06);
    border: 1px solid rgba(99,102,241,0.1);
    font-size: 0.78rem;
    color: #6366f1;
    font-weight: 500;
}

.alevel-coming-soon__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    background: #6366f1;
    color: #fff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.2s, transform 0.15s;
    position: relative;
    z-index: 1;
}

.alevel-coming-soon__cta:hover {
    background: #4f46e5;
    transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════
   DARK MODE OVERRIDES
   ═══════════════════════════════════════════════════ */

[data-theme="dark"] .alevel-content__title,
[data-theme="dark"] .alevel-prose h2,
[data-theme="dark"] .alevel-prose h3,
[data-theme="dark"] .alevel-prose h4,
[data-theme="dark"] .alevel-prose strong,
[data-theme="dark"] .alevel-info-box h4,
[data-theme="dark"] .alevel-topic-card h3,
[data-theme="dark"] .alevel-topic-link h3,
[data-theme="dark"] .alevel-quiz__title,
[data-theme="dark"] .alevel-quiz__question-text,
[data-theme="dark"] .alevel-flashcards__title,
[data-theme="dark"] .alevel-flashcards__front h3 {
    color: #e2e8f0;
}

[data-theme="dark"] .alevel-content__subtitle,
[data-theme="dark"] .alevel-topic-card p,
[data-theme="dark"] .alevel-topic-link p {
    color: #94a3b8;
}

[data-theme="dark"] .alevel-prose {
    color: #cbd5e1;
}

[data-theme="dark"] .alevel-prose table td {
    color: #cbd5e1;
}

[data-theme="dark"] .alevel-prose table td:first-child {
    color: #e2e8f0;
}

[data-theme="dark"] .alevel-prose table thead tr {
    background: rgba(30, 41, 59, .5);
}

[data-theme="dark"] .alevel-prose table tbody tr:nth-child(even) td {
    background: rgba(255, 255, 255, .02);
}

[data-theme="dark"] .alevel-prose table tbody tr:hover td {
    background: rgba(99, 102, 241, .06);
}

[data-theme="dark"] .alevel-info-box {
    background: rgba(30, 41, 59, .4);
    border-color: rgba(255, 255, 255, .06);
}

[data-theme="dark"] .alevel-info-box p,
[data-theme="dark"] .alevel-info-box ul {
    color: #94a3b8;
}

[data-theme="dark"] .alevel-topic-card,
[data-theme="dark"] .alevel-topic-link,
[data-theme="dark"] .alevel-flashcards__front {
    background: rgba(30, 41, 59, .4);
    border-color: rgba(255, 255, 255, .06);
}

[data-theme="dark"] .alevel-topic-card:hover,
[data-theme="dark"] .alevel-topic-link:hover {
    border-color: rgba(99, 102, 241, .4);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .3);
}

[data-theme="dark"] .alevel-topic-card:hover h3,
[data-theme="dark"] .alevel-topic-link:hover h3 {
    color: #a5b4fc;
}

[data-theme="dark"] .alevel-bottom-nav {
    border-top-color: rgba(255, 255, 255, .06);
}

[data-theme="dark"] .alevel-bottom-nav a {
    color: #a5b4fc;
}

[data-theme="dark"] .alevel-bottom-nav a:hover {
    background: rgba(99, 102, 241, .1);
}

[data-theme="dark"] .alevel-breadcrumb a {
    color: #a5b4fc;
}

[data-theme="dark"] .alevel-definition-box {
    background: rgba(99, 102, 241, .08);
    border-color: rgba(99, 102, 241, .3);
}

[data-theme="dark"] .alevel-definition-box strong {
    color: #c7d2fe;
}

[data-theme="dark"] .alevel-definition-box p {
    color: #a5b4fc;
}

[data-theme="dark"] .alevel-quiz__option {
    background: rgba(30, 41, 59, .4);
    border-color: rgba(255, 255, 255, .08);
    color: #cbd5e1;
}

[data-theme="dark"] .alevel-quiz__option:hover:not(:disabled) {
    background: rgba(30, 41, 59, .6);
    border-color: rgba(255, 255, 255, .15);
}

[data-theme="dark"] .alevel-flashcards__counter {
    background: rgba(30, 41, 59, .6);
    color: #94a3b8;
}

[data-theme="dark"] .alevel-flashcards__dot {
    background: rgba(255, 255, 255, .1);
}

[data-theme="dark"] .alevel-flashcards__dot--active {
    background: #6366f1;
}

[data-theme="dark"] .alevel-equation-box {
    background: rgba(30, 41, 59, .5);
    color: #e2e8f0;
}

[data-theme="dark"] .alevel-examiner-tip {
    background: rgba(120, 53, 15, .15);
    border-color: rgba(253, 230, 138, .2);
}

[data-theme="dark"] .alevel-examiner-tip__title {
    color: #fbbf24;
}

[data-theme="dark"] .alevel-examiner-tip p,
[data-theme="dark"] .alevel-examiner-tip li {
    color: #fcd34d;
}

[data-theme="dark"] .alevel-worked-example {
    background: rgba(22, 101, 52, .1);
    border-color: rgba(34, 197, 94, .2);
}

[data-theme="dark"] .alevel-worked-example__title { color: #4ade80; }
[data-theme="dark"] .alevel-worked-example p { color: #86efac; }
[data-theme="dark"] .alevel-worked-example__problem { 
    background: rgba(0, 0, 0, .15); 
    color: #bbf7d0; 
    border-left-color: #22c55e; 
}

[data-theme="dark"] .alevel-practical-box {
    background: rgba(30, 64, 175, .1);
    border-color: rgba(96, 165, 250, .2);
}

[data-theme="dark"] .alevel-practical-box__title { color: #60a5fa; }
[data-theme="dark"] .alevel-practical-box p { color: #93c5fd; }

[data-theme="dark"] .alevel-coming-soon {
    background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(168,85,247,0.08));
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .alevel-coming-soon__badge {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
}

[data-theme="dark"] .alevel-coming-soon__dot {
    background: #a5b4fc;
}

[data-theme="dark"] .alevel-coming-soon__topic-tag {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
}

[data-theme="dark"] .alevel-coming-soon__cta {
    background: #6366f1;
}

[data-theme="dark"] .alevel-coming-soon__cta:hover {
    background: #4f46e5;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .alevel-content {
        padding: var(--space-lg) var(--space-md);
    }

    .alevel-content__title {
        font-size: 1.25rem;
    }

    .alevel-bottom-nav {
        flex-direction: column;
        align-items: stretch;
    }

    .alevel-bottom-nav a {
        justify-content: center;
    }
}
