/* ==========================================
   雅思学习平台 - 爱听写风格 (idictation.cn inspired)
   简洁白底 · 小圆角 · 轻阴影 · 14px基础字号
   ========================================== */

:root {
    /* Typography */
    --font-base: 14px;
    --font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    --line-height: 1.57;

    /* Radii */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Shadows */
    --shadow-sm: 0 1px 4px rgba(0,0,0,0.06);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);

    /* Page colors */
    --bg-page: #f7f8fa;
    --bg-card: #ffffff;
    --text-1: #1d2129;
    --text-2: #4e5969;
    --text-3: #86909c;
    --border: #e5e6eb;

    /* Brand / primary */
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --accent: #1e40af;
    --bg-tint: #eff6ff;
    --bg-tint-dark: #dbeafe;

    /* Section theme colors */
    --c-listening: #7c3aed;
    --c-listening-dark: #6d28d9;
    --c-listening-bg: #f5f3ff;
    --c-reading: #2563eb;
    --c-reading-dark: #1d4ed8;
    --c-reading-bg: #eff6ff;
    --c-writing: #db2777;
    --c-writing-dark: #be185d;
    --c-writing-bg: #fdf2f8;
    --c-speaking: #2563eb;
    --c-speaking-dark: #1d4ed8;
    --c-speaking-bg: #eff6ff;
    --c-tests: #d97706;
    --c-tests-dark: #b45309;
    --c-tests-bg: #fffbeb;
    --c-wanglu: #667eea;
    --c-wanglu-dark: #5a67d8;
    --c-wanglu-bg: #eef2ff;

    /* Legacy compat */
    --shadow: var(--shadow-md);
    --shadow-sm-old: var(--shadow-sm);
    --radius: var(--radius-lg);
    --radius-sm-old: var(--radius-md);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-family);
    font-size: var(--font-base);
    line-height: var(--line-height);
    color: var(--text-1);
    background: var(--bg-page);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* ---- Navigation (48px compact) ---- */
.main-nav {
    background: var(--bg-card);
    box-shadow: 0 1px 0 var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 48px;
}

.nav-brand {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary) !important;
    text-decoration: none !important;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
}

.nav-link {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-2) !important;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s;
    text-decoration: none !important;
    white-space: nowrap;
}

.nav-link:hover {
    background: var(--bg-page);
    color: var(--primary) !important;
}

.nav-link.nav-active {
    background: var(--bg-tint);
    color: var(--primary) !important;
    font-weight: 600;
}

.nav-login {
    background: var(--primary);
    color: white !important;
    border-radius: var(--radius-sm);
    padding: 6px 16px;
    font-size: 13px;
}

.nav-login:hover {
    background: var(--primary-dark);
    color: white !important;
}

.nav-user-menu {
    position: relative;
    cursor: pointer;
}

.nav-user-name {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    background: var(--bg-tint);
}

.nav-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    min-width: 140px;
    padding: 4px 0;
    z-index: 100;
}

.nav-user-menu:hover .nav-dropdown,
.nav-user-menu.open .nav-dropdown {
    display: block;
}

/* More dropdown */
.nav-more-menu {
    position: relative;
    cursor: pointer;
}

.nav-more-trigger {
    user-select: none;
}

.nav-more-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    min-width: 130px;
    padding: 4px 0;
    z-index: 100;
}

.nav-more-menu:hover .nav-more-dropdown,
.nav-more-menu.open .nav-more-dropdown {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 8px 16px;
    color: var(--text-2) !important;
    font-size: 13px;
    text-decoration: none !important;
    transition: background 0.15s;
}

.dropdown-item:hover {
    background: var(--bg-page);
    color: var(--primary) !important;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.3em;
    cursor: pointer;
    color: var(--text-2);
    padding: 4px;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 48px;
        left: 0;
        right: 0;
        background: var(--bg-card);
        flex-direction: column;
        padding: 8px;
        box-shadow: var(--shadow-md);
        border-top: 1px solid var(--border);
    }
    .nav-links.show { display: flex; }
    .nav-toggle { display: block; }
}

/* ---- Flash Messages ---- */
.flash-container {
    max-width: 1200px;
    margin: 8px auto;
    padding: 0 20px;
}

.flash-msg {
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
}

.flash-warning { background: #fff8e6; color: #7d6200; border: 1px solid #ffe58f; }
.flash-info { background: #e8f7ff; color: #0e5a8a; border: 1px solid #91d5ff; }
.flash-success { background: #e8fff3; color: #13674b; border: 1px solid #87e8c7; }
.flash-danger, .flash-error { background: #fff2f0; color: #a8071a; border: 1px solid #ffa39e; }

/* ---- Breadcrumb ---- */
.breadcrumb-bar {
    max-width: 1200px;
    margin: 8px auto 0;
    padding: 0 20px;
}

.breadcrumb-bar nav {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-3);
    flex-wrap: wrap;
}

.breadcrumb-bar a { color: var(--text-2); text-decoration: none; }
.breadcrumb-bar a:hover { color: var(--primary); }
.breadcrumb-bar .sep { color: var(--text-3); }
.breadcrumb-bar .current { color: var(--text-1); font-weight: 500; }

/* ---- Main Content ---- */
.main-content-wrapper {
    min-height: calc(100vh - 48px);
}

/* ============================================
   Shared IELTS Column Page Components
   ============================================ */

/* Page wrapper — replaces gradient backgrounds */
.page-wrapper {
    background: var(--bg-page);
    min-height: calc(100vh - 48px);
    padding: 16px 20px 40px;
}

.page-wrapper .container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Back link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 16px;
    color: var(--text-3);
    text-decoration: none;
    font-size: 13px;
    padding: 4px 0;
    transition: color 0.15s;
}

.back-link:hover { color: var(--primary); }

/* Page header card */
.page-header {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px 32px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    border-left: 3px solid var(--primary);
}

.page-header h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 4px;
}

.page-header p {
    color: var(--text-3);
    font-size: 13px;
}

/* Page content card */
.page-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

/* Section cards (generic) */
.section-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

/* Book tabs (for column pages) */
.book-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.book-tab {
    padding: 6px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-card);
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.15s;
    white-space: nowrap;
    color: var(--text-2);
}

.book-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.book-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Collapsible intro */
.intro-card {
    background: var(--bg-page);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.intro-card summary {
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-1);
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    user-select: none;
}

.intro-card summary::-webkit-details-marker { display: none; }
.intro-card summary .arrow { margin-left: auto; transition: transform 0.3s; color: var(--text-3); }
.intro-card[open] summary .arrow { transform: rotate(180deg); }

.intro-card .intro-body {
    padding: 0 20px 16px;
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.7;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
}

.btn-primary:hover { background: var(--primary-dark); color: white; text-decoration: none; }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 20px;
    background: var(--bg-card);
    color: var(--text-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}

.btn-secondary:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }

/* Subject-colored buttons */
.btn-accent {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.15s;
    white-space: nowrap;
    color: white;
}

.btn-accent:hover { opacity: 0.85; text-decoration: none; color: white; }
.btn-accent.listening { background: var(--c-listening); }
.btn-accent.reading { background: var(--c-reading); }
.btn-accent.writing { background: var(--c-writing); }
.btn-accent.tests { background: var(--c-tests); }
.btn-accent.speaking { background: var(--c-speaking); }
.btn-accent.wanglu { background: var(--c-wanglu); }
.btn-accent.disabled { background: #e5e7eb; color: #9ca3af; cursor: not-allowed; pointer-events: none; }

/* Section title */
.section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-1);
    margin: 0 0 16px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bg-page);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-divider {
    margin: 24px 0;
    border: none;
    border-top: 1px solid var(--border);
}

/* ---- Dashboard ---- */
.dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 24px;
}

.dashboard-header h1 {
    color: var(--text-1);
    font-size: 22px;
    margin-bottom: 6px;
}

.welcome-text {
    color: var(--text-3);
    font-size: 14px;
}

.vip-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: white;
    padding: 1px 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 700;
    margin-left: 4px;
}

.vip-info { color: #d97706; font-weight: 600; margin-left: 4px; font-size: 13px; }
.upgrade-link { color: var(--primary) !important; font-weight: 600; }

.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.module-card {
    display: block;
    background: var(--bg-card);
    padding: 20px;
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    text-decoration: none !important;
    color: var(--text-1) !important;
}

.module-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.module-card-gold {
    border-left-color: var(--c-tests);
    background: var(--c-tests-bg);
}
.module-card-gold:hover { box-shadow: 0 2px 12px rgba(217,119,6,0.15); }
.module-card-gold h2 { color: var(--c-tests-dark); }
.feature-tag-gold { background: #fef3c7; color: var(--c-tests); }

.module-card-purple { border-left-color: var(--c-wanglu); }
.module-card-purple:hover { box-shadow: 0 2px 12px rgba(102,126,234,0.15); }

.module-icon {
    font-size: 2em;
    margin-bottom: 10px;
}

.module-card h2 {
    color: var(--text-1);
    margin-bottom: 6px;
    font-size: 16px;
}

.module-card p {
    color: var(--text-3);
    font-size: 13px;
    margin-bottom: 10px;
}

.feature-tag {
    display: inline-block;
    background: var(--bg-tint);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
}

.module-card-purple .feature-tag {
    background: var(--c-wanglu-bg);
    color: var(--c-wanglu);
}

/* ---- Status Section ---- */
.status-section { margin-top: 24px; }

.status-section h3 {
    color: var(--text-1);
    margin-bottom: 12px;
    font-size: 15px;
}

.status-cards {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.status-card {
    background: var(--bg-card);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    min-width: 130px;
    border: 1px solid var(--border);
}

.status-label { color: var(--text-3); font-size: 12px; margin-bottom: 4px; }
.status-value { color: var(--primary); font-size: 18px; font-weight: 700; }

/* ---- Pricing Page ---- */
.pricing-page { max-width: 1000px; margin: 0 auto; padding: 24px 20px; }
.pricing-header { text-align: center; margin-bottom: 24px; }
.pricing-header h1 { color: var(--text-1); font-size: 22px; margin-bottom: 6px; }
.pricing-header p { color: var(--text-3); font-size: 14px; }

.current-status { text-align: center; margin-bottom: 20px; }
.status-active, .status-expired { display: inline-block; padding: 8px 20px; border-radius: var(--radius-md); font-size: 13px; }
.status-active { background: #e8fff3; color: #13674b; }
.status-expired { background: #fff8e6; color: #7d6200; }

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.pricing-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    position: relative;
    transition: transform 0.2s;
    border: 1px solid var(--border);
}

.pricing-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.pricing-card-popular {
    border: 2px solid var(--primary);
    box-shadow: var(--shadow-md);
}

.popular-tag {
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 3px 16px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
}

.plan-name { font-size: 16px; font-weight: 700; color: var(--text-1); margin-bottom: 12px; }
.plan-price { font-size: 32px; font-weight: 800; color: var(--primary); margin-bottom: 4px; }
.plan-price span { font-size: 13px; color: var(--text-3); font-weight: 400; }
.plan-save { color: #16a34a; font-weight: 600; margin-bottom: 12px; font-size: 13px; }

.plan-features { list-style: none; text-align: left; margin: 16px 0; }
.plan-features li { padding: 6px 0; color: var(--text-2); font-size: 13px; border-bottom: 1px solid var(--bg-page); }

.plan-btn {
    display: inline-block; width: 100%; padding: 10px;
    border: 1px solid var(--primary); background: var(--bg-card);
    color: var(--primary); border-radius: var(--radius-sm);
    font-weight: 600; font-size: 14px; cursor: pointer; transition: all 0.15s;
}
.plan-btn:hover { background: var(--bg-tint); }

.plan-btn-primary {
    background: var(--primary); color: white; border-color: var(--primary);
}
.plan-btn-primary:hover { background: var(--primary-dark); }

/* ---- Comparison Table ---- */
.pricing-comparison { margin-top: 32px; }
.pricing-comparison h2 { text-align: center; color: var(--text-1); margin-bottom: 16px; font-size: 18px; }

.comparison-table {
    width: 100%; border-collapse: collapse; background: var(--bg-card);
    border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}
.comparison-table th { background: var(--primary); color: white; padding: 12px 16px; text-align: center; font-size: 13px; }
.comparison-table th:first-child { text-align: left; }
.comparison-table td { padding: 10px 16px; text-align: center; border-bottom: 1px solid var(--border); font-size: 13px; }
.comparison-table td:first-child { text-align: left; font-weight: 500; }
.highlight-row td { background: var(--bg-tint); }
.vip-check { color: var(--primary); font-weight: 700; }

/* ---- IELTS Page Wrapper ---- */
.ielts-page-wrapper { }

/* ---- Shared IELTS Animations ---- */
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: 0.6; } }
@keyframes dots { 0%,20% { content: '.'; } 40%,60% { content: '..'; } 80%,100% { content: '...'; } }

/* ---- Shared IELTS Loading Spinner ---- */
.loading-spinner { text-align: center; padding: 60px; color: var(--text-3); }
.loading-spinner .spinner {
    border: 3px solid var(--border); border-top: 3px solid var(--primary);
    border-radius: 50%; width: 32px; height: 32px;
    animation: spin 0.8s linear infinite; margin: 0 auto 12px;
}

/* ---- Footer ---- */
.site-footer {
    background: #1e293b;
    color: #94a3b8;
    padding: 20px;
    text-align: center;
    font-size: 13px;
}

.footer-container { max-width: 1200px; margin: 0 auto; }

.footer-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.footer-links a { color: #cbd5e1 !important; text-decoration: none !important; font-size: 13px; }
.footer-links a:hover { color: white !important; }
.footer-copy { color: #64748b; font-size: 12px; }

/* ============================================
   Column Page Specific Styles
   ============================================ */

/* Test card (tests_column) */
.test-card {
    background: var(--bg-page);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    transition: box-shadow 0.15s;
}

.test-card:hover { box-shadow: var(--shadow-sm); }

.test-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.test-card-title .progress-summary {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-3);
    margin-left: auto;
}

/* Subject rows */
.subject-row {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--bg-page);
}
.subject-row:last-child { border-bottom: none; }

.subject-icon {
    width: 36px; height: 36px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    margin-right: 12px; font-size: 1.1em; flex-shrink: 0;
}
.subject-icon-listening { background: var(--c-listening-bg); color: var(--c-listening); }
.subject-icon-reading { background: var(--c-reading-bg); color: var(--c-reading); }
.subject-icon-writing { background: var(--c-writing-bg); color: var(--c-writing); }

.subject-info { flex: 1; }
.subject-name { font-weight: 600; color: var(--text-1); font-size: 14px; }
.subject-desc { font-size: 12px; color: var(--text-3); }

.subject-status { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.done-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; flex-shrink: 0; }
.done-text { font-size: 12px; color: #22c55e; font-weight: 600; }

.subject-btn {
    display: inline-block; padding: 6px 16px; border-radius: var(--radius-sm);
    font-weight: 600; font-size: 13px; text-decoration: none; transition: all 0.15s;
    white-space: nowrap; color: white;
}
.subject-btn:hover { opacity: 0.85; text-decoration: none; color: white; }
.subject-btn-listening { background: var(--c-listening); }
.subject-btn-reading { background: var(--c-reading); }
.subject-btn-writing { background: var(--c-writing); }
.subject-btn-disabled { background: #e5e7eb; color: #9ca3af; cursor: not-allowed; pointer-events: none; }

.full-exam-btn {
    display: block; width: 100%; padding: 10px; border-radius: var(--radius-sm);
    background: var(--c-tests); color: white;
    text-align: center; font-weight: 600; font-size: 14px;
    text-decoration: none; transition: all 0.15s; margin-bottom: 12px;
    border: none; cursor: pointer;
}
.full-exam-btn:hover { background: var(--c-tests-dark); text-decoration: none; color: white; }

.coming-soon-tag { font-size: 12px; color: var(--text-3); font-weight: 500; }

/* ---- Column page item cards ---- */
.item-card {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    margin-bottom: 8px;
    background: var(--bg-card);
    transition: all 0.15s;
    text-decoration: none !important;
    color: var(--text-1) !important;
    gap: 12px;
}

.item-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* ---- Writing column cards ---- */
.writing-module-card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: var(--radius-md);
    border-left: 3px solid var(--c-writing);
    transition: all 0.15s;
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.writing-module-card:hover {
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

.writing-module-card h3 {
    color: var(--text-1);
    font-size: 15px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.writing-module-card p {
    color: var(--text-3);
    font-size: 13px;
    margin: 0;
    line-height: 1.5;
}

/* Featured cards (writing column) */
.featured-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 0;
}

.featured-card {
    padding: 20px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    display: block;
    border: none;
}

.featured-card:hover { box-shadow: var(--shadow-md); text-decoration: none; }
.featured-card h3 { color: white; font-size: 16px; margin-bottom: 6px; }
.featured-card p { color: rgba(255,255,255,0.85); font-size: 13px; margin: 0; }
.featured-card .badge {
    display: inline-block; padding: 2px 8px; border-radius: var(--radius-sm);
    font-size: 11px; font-weight: 700; vertical-align: middle;
}
.card-task2 { background: linear-gradient(135deg, #9d174d, #db2777); }
.card-task2 .badge { background: #fbbf24; color: #9d174d; }
.card-task1 { background: linear-gradient(135deg, #064e3b, #065f46); }
.card-task1 .badge { background: #34d399; color: #064e3b; }

/* Practice table (shared) */
.practice-table {
    width: 100%; border-collapse: collapse; border-radius: var(--radius-md);
    overflow: hidden; border: 1px solid var(--border); margin-top: 12px;
}
.practice-table thead { background: var(--c-writing); color: white; }
.practice-table th { padding: 10px 16px; text-align: left; font-weight: 600; font-size: 13px; }
.practice-table td { padding: 10px 16px; border-bottom: 1px solid var(--border); font-size: 13px; }
.practice-table tbody tr { transition: background 0.15s; }
.practice-table tbody tr:hover { background: var(--c-writing-bg); }

/* Test / book panel structure (listening, reading columns) */
.book-panel { display: none; }
.book-panel.active { display: block; }

.test-section { margin-bottom: 16px; }

.test-header-row {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--bg-page);
}

.score-tag {
    display: inline-block;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
}

/* Section-scoped table color overrides */
.practice-table.listening thead { background: var(--c-listening); }
.practice-table.listening tbody tr:hover { background: var(--c-listening-bg); }
.practice-table.reading thead { background: var(--c-reading); }
.practice-table.reading tbody tr:hover { background: var(--c-reading-bg); }

.table-btn {
    display: inline-block; background: var(--c-writing); color: white;
    padding: 4px 12px; border-radius: var(--radius-sm);
    text-decoration: none; font-weight: 600; font-size: 12px; transition: all 0.15s;
}
.table-btn:hover { background: var(--c-writing-dark); color: white; text-decoration: none; }

.topic-tag {
    display: inline-block; padding: 2px 8px; border-radius: var(--radius-sm);
    font-size: 12px; font-weight: 600;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .page-wrapper { padding: 12px 12px 32px; }
    .page-header { padding: 16px 20px; }
    .page-header h1 { font-size: 18px; }
    .page-content { padding: 16px; }
    .module-grid { grid-template-columns: 1fr; gap: 12px; }
    .featured-grid { grid-template-columns: 1fr; }
    .subject-row { flex-wrap: wrap; gap: 8px; }
    .subject-status { width: 100%; justify-content: flex-end; }
    .status-cards { gap: 8px; }
    .status-card { min-width: 100px; padding: 12px 16px; }
}
