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

body {
    font-family: var(--font-body, Inter), system-ui, -apple-system, sans-serif;
    background-color: var(--paper-2, #FBFAF8);
    color: var(--ink, #0A2540);
    line-height: 1.6;
}

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

/* Header */
.header {
    background: white;
    border-bottom: 1px solid #E2E8F0;
    padding: 16px 0;
    margin-bottom: 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.logo-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 18px;
}

.logo-text-group {
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: #2D3748;
    line-height: 1;
}

.logo-tagline {
    font-size: 12px;
    font-weight: 500;
    color: #718096;
    letter-spacing: 0.5px;
}

/* Main Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.nav-item {
    color: #718096;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s;
    white-space: nowrap;
}

.nav-item:hover {
    color: #2D3748;
    background: #F7FAFC;
}

.nav-item.active {
    color: #FF8C42;
    background: #FFF5F5;
    font-weight: 600;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 3px;
    background: #2D3748;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.user-section {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.welcome-text {
    color: #718096;
    font-size: 16px;
}

.profile-btn {
    background: transparent;
    color: #718096;
    border: 1px solid #E2E8F0;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    font-size: 14px;
    font-family: inherit;
    display: inline-block;
    line-height: 1.2;
}

.profile-btn:hover {
    color: #2D3748;
    border-color: #CBD5E0;
}

.logout-btn {
    background: transparent;
    color: #718096;
    border: 1px solid #E2E8F0;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    line-height: 1.2;
}

.logout-btn:hover {
    color: #2D3748;
    border-color: #CBD5E0;
}

/* Sub Navigation */
.sub-nav {
    background: #F7FAFC;
    border-bottom: 1px solid #E2E8F0;
    padding: 16px 0;
    margin-bottom: 24px;
}

.sub-nav-items {
    display: flex;
    gap: 32px;
}

.sub-nav-item {
    color: #718096;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s;
}

.sub-nav-item:hover {
    color: #2D3748;
    background: #E2E8F0;
}

.sub-nav-item.active {
    color: #FF8C42;
    background: #FFF5F5;
    font-weight: 600;
}

/* Main content */
.container > main,
main.container {
    padding-top: 24px;
}

.page-title {
    font-family: var(--font-display, inherit);
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--ink, #0A2540);
    margin-bottom: 12px;
}

.page-subtitle {
    font-size: 1.05rem;
    color: var(--ink-2, #425466);
    margin-bottom: 36px;
}

.section-title {
    font-family: var(--font-display, inherit);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--ink, #0A2540);
    margin-bottom: 28px;
}

/* Practice intro section */
.practice-intro {
    margin-bottom: 32px;
}

.practice-intro h2 {
    font-family: var(--font-display, inherit);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--ink, #0A2540);
    margin-bottom: 8px;
}

.practice-intro p {
    font-size: 1rem;
    color: var(--ink-2, #425466);
    margin-bottom: 0;
}

/* Quiz cards */
.quiz-grid {
    display: grid;
    gap: 24px;
    margin-bottom: 48px;
}

.domain-quiz {
    background: #fff;
    border: 1px solid var(--line, #E3E8EE);
    padding: 22px;
    border-radius: var(--r-lg, 20px);
    box-shadow: var(--sh-1, 0 1px 2px rgba(10,37,64,.05));
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.domain-quiz:hover {
    box-shadow: var(--sh-2, 0 4px 12px rgba(10,37,64,.06));
    transform: translateY(-2px);
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.quiz-title {
    font-family: var(--font-display, inherit);
    font-size: 1.06rem;
    font-weight: 600;
    color: var(--ink, #0A2540);
    margin-bottom: 4px;
}

.status-badge {
    padding: 5px 12px;
    border-radius: var(--r-pill, 999px);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-transform: none;
}

.status-not-started {
    background: #EAEFF4;
    color: var(--ink-2, #425466);
}

.status-in-progress {
    background: var(--mango-tint, #FFF4E8);
    color: var(--mango, #EA580C);
}

.status-completed {
    background: var(--mint-tint, #E7F7F0);
    color: var(--mint, #0E9F6E);
}

/* Progress bar */
.progress-section {
    margin-bottom: 16px;
}

.progress-bar {
    width: 100%;
    height: 9px;
    background-color: var(--line-2, #EEF1F5);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 12px;
    display: flex;
}

.progress-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.progress-fill.correct {
    background: var(--mint, #0E9F6E);
}

.progress-fill.incorrect {
    background: var(--wrong, #E2574C);
}

.not-started { background: var(--line, #E3E8EE); }
.in-progress { background: var(--sunrise, #EA580C); }
.completed { background: var(--mint, #0E9F6E); }

.progress-text {
    font-size: 0.82rem;
    color: var(--ink-3, #697386);
    display: flex;
    justify-content: space-between;
}

/* Stats */
.stats {
    display: flex;
    gap: 24px;
    margin-bottom: 16px;
}

.stat-item {
    font-size: 14px;
}

.stat-label {
    color: #718096;
    display: block;
}

.stat-value {
    color: #2D3748;
    font-weight: 600;
    font-size: 18px;
}

/* Buttons */
.quiz-action {
    display: inline-block;
    background: var(--mango, #EA580C);
    color: white;
    padding: 12px 22px;
    border-radius: var(--r-md, 14px);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
    border: none;
    cursor: pointer;
    box-shadow: var(--sh-mango, 0 10px 28px rgba(234,88,12,.28));
}

.quiz-action:hover {
    background: var(--mango-bright, #F97316);
    transform: translateY(-1px);
    box-shadow: 0 14px 34px rgba(234, 88, 12, .34);
}

.quiz-action.secondary {
    background: #fff;
    color: var(--ink, #0A2540);
    border: 1px solid var(--line, #E3E8EE);
    box-shadow: none;
}

.quiz-action.secondary:hover {
    background: #fff;
    color: var(--ink, #0A2540);
    border-color: var(--ink-3, #697386);
    box-shadow: var(--sh-1, 0 1px 2px rgba(10,37,64,.05));
}

/* Collapse header nav earlier to avoid crowding on medium desktop widths */
@media (max-width: 1250px) {
    .container {
        padding: 0 12px;
    }

    /* Header */
    .header {
        padding: 12px 0;
    }

    .header-content {
        flex-wrap: wrap;
        gap: 12px;
    }

    .logo {
        align-items: center;
        order: 1;
    }

    .logo-icon {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .logo-text {
        font-size: 18px;
    }

    .logo-tagline {
        display: none;
    }

    /* Hamburger Menu - Show on mobile */
    .hamburger {
        display: flex;
        order: 2;
        margin-left: auto;
    }

    .user-section {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        order: 3;
    }

    .welcome-text {
        display: none;
    }

    .profile-btn {
        padding: 6px 10px;
        font-size: 12px;
    }

    .logout-btn {
        padding: 6px 10px;
        font-size: 12px;
    }

    /* Main Navigation - Dropdown on mobile */
    .main-nav {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: white;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        padding: 8px 0;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: all 0.3s ease;
        z-index: 1000;
        order: 4;
    }

    .main-nav.active {
        max-height: 400px;
        opacity: 1;
    }

    .nav-item {
        font-size: 15px;
        padding: 14px 24px;
        border-radius: 0;
        flex-shrink: 0;
        border-bottom: 1px solid #F7FAFC;
    }

    .nav-item:last-child {
        border-bottom: none;
    }

    /* Sub Navigation - Keep styles in case still used elsewhere */
    .sub-nav {
        padding: 12px 0;
        margin-bottom: 24px;
    }

    .sub-nav-items {
        gap: 20px;
    }

    .sub-nav-item {
        font-size: 14px;
        padding: 6px 12px;
    }
    
    /* Quiz Cards */
    .quiz-grid {
        gap: 16px;
        margin-bottom: 24px;
    }
    
    .domain-quiz {
        padding: 16px;
    }
    
    .quiz-header {
        margin-bottom: 12px;
    }
    
    .quiz-title {
        font-size: 16px;
        margin-bottom: 2px;
    }
    
    .status-badge {
        padding: 4px 8px;
        font-size: 12px;
        letter-spacing: 0.3px;
    }
    
    /* Progress */
    .progress-section {
        margin-bottom: 12px;
    }
    
    .progress-bar {
        height: 6px;
        margin-bottom: 8px;
    }
    
    .progress-text {
        font-size: 12px;
    }
    
    /* Stats */
    .stats {
        gap: 16px;
        margin-bottom: 12px;
    }
    
    .stat-item {
        font-size: 12px;
    }
    
    .stat-value {
        font-size: 16px;
    }
    
    /* Buttons */
    .quiz-action {
        padding: 10px 16px;
        font-size: 14px;
    }
}

/* Profile page styles */
.profile-container {
    max-width: 600px;
    margin: 2rem auto;
}

.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-header {
    background: #f8f9fa;
    padding: 1.5rem;
    border-bottom: 1px solid #dee2e6;
}

.card-header h1 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

.profile-info {
    margin-bottom: 2rem;
}

.profile-field {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.profile-field label {
    font-weight: 600;
    color: #555;
    width: 80px;
    margin-right: 1rem;
}

.profile-field span {
    color: #333;
}

.profile-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--r-md, 14px);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    display: inline-block;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.5;
    text-align: center;
    vertical-align: middle;
}

.btn-primary {
    background: var(--mango, #EA580C);
    color: white;
}

.btn-primary:hover {
    background: var(--mango-bright, #F97316);
}

.btn-secondary {
    background: #fff;
    color: var(--ink, #0A2540);
    border: 1px solid var(--line, #E3E8EE);
}

.btn-secondary:hover {
    background: #fff;
    border-color: var(--ink-3, #697386);
}

.btn-danger {
    background: var(--wrong, #E2574C);
    color: white;
}

.btn-danger:hover {
    background: #c8483e;
}
