/**
 * Assessment Platform — refined theme
 * Mature, restrained palette; minimal motion; no glassmorphism / shimmer effects.
 */

:root {
    --primary-color: #1e3a5f;
    --primary-dark: #152a45;
    --primary-light: #2d5280;
    --accent-color: #8b6914;
    --secondary-color: #64748b;
    --success-color: #2d6a4f;
    --info-color: #0369a1;
    --warning-color: #b45309;
    --danger-color: #b91c1c;
    --light-color: #f7f7f5;
    --dark-color: #1c1917;

    --font-family-primary: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;

    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    --border-radius-sm: 0.25rem;
    --border-radius-md: 0.375rem;
    --border-radius-lg: 0.5rem;
    --border-radius-xl: 0.625rem;

    --shadow-xs: 0 1px 2px rgba(28, 25, 23, 0.04);
    --shadow-sm: 0 1px 3px rgba(28, 25, 23, 0.06);
    --shadow-md: 0 4px 12px rgba(28, 25, 23, 0.07);
    --shadow-lg: 0 8px 24px rgba(28, 25, 23, 0.08);

    --transition-fast: 0.15s ease;
    --transition-normal: 0.2s ease;

    --bg-primary: #ffffff;
    --bg-secondary: #f7f7f5;
    --bg-tertiary: #eceae6;
    --text-primary: #1c1917;
    --text-secondary: #57534e;
    --text-muted: #57534e;
    --border-color: #e7e5e4;
    --card-bg: #ffffff;
    --navbar-bg: #ffffff;
    --dropdown-bg: #ffffff;
}

[data-theme="dark"] {
    --bg-primary: #1c1917;
    --bg-secondary: #292524;
    --bg-tertiary: #44403c;
    --text-primary: #fafaf9;
    --text-secondary: #d6d3d1;
    --text-muted: #a8a29e;
    --border-color: #44403c;
    --card-bg: #292524;
    --navbar-bg: #1c1917;
    --dropdown-bg: #292524;
    --primary-color: #5b8fd4;
    --primary-dark: #4a7bc0;
}

/* ── Base ── */
body {
    font-family: var(--font-family-primary);
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: -0.015em;
}

.text-primary {
    color: var(--primary-color) !important;
}

a {
    color: var(--primary-color);
}

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

main {
    min-height: calc(100vh - 72px);
}

/* ── Navigation ── */
.navbar {
    background: var(--navbar-bg);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-xs);
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
}

.navbar-brand {
    font-weight: 600;
    font-size: var(--font-size-lg);
    color: var(--text-primary) !important;
    letter-spacing: -0.02em;
}

.navbar-brand i {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-right: 0.5rem;
}

.nav-link {
    font-weight: 500;
    font-size: var(--font-size-sm);
    color: var(--text-secondary) !important;
    padding: 0.5rem 0.875rem !important;
    border-radius: var(--border-radius-md);
    transition: color var(--transition-fast), background var(--transition-fast);
}

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

.nav-link.active {
    color: var(--primary-color) !important;
    background: rgba(30, 58, 95, 0.08);
    font-weight: 600;
}

[data-theme="dark"] .nav-link.active {
    background: rgba(91, 143, 212, 0.15);
}

.nav-link i {
    width: 1.125rem;
    text-align: center;
    margin-right: 0.375rem;
    opacity: 0.85;
}

.navbar-nav {
    align-items: center;
}

.nav-link--icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0 !important;
}

.nav-link--icon > i {
    margin-right: 0;
    width: auto;
    font-size: 1.0625rem;
    line-height: 1;
}

.nav-cart-link {
    position: relative;
}

.nav-cart-link .cart-badge {
    top: 0;
    right: 0;
    transform: translate(25%, -25%);
}

.dropdown-menu {
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius-lg);
    padding: 0.375rem 0;
    background: var(--dropdown-bg);
}

.dropdown-header {
    font-weight: 600;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    padding: 0.375rem 1rem;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-primary);
    transition: background var(--transition-fast);
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

.dropdown-item.active {
    background: rgba(30, 58, 95, 0.08);
    color: var(--primary-color);
}

.dropdown-divider {
    border-color: var(--border-color);
    margin: 0.25rem 0;
}

.admin-badge {
    background: var(--primary-color);
    color: #fff;
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.125rem 0.375rem;
    border-radius: var(--border-radius-sm);
    margin-left: 0.375rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.user-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: var(--font-size-sm);
    background: var(--primary-color);
    color: #fff;
}

.cart-badge {
    position: absolute;
    background: var(--danger-color);
    color: #fff;
    border-radius: 50%;
    min-width: 1.125rem;
    height: 1.125rem;
    font-size: 0.625rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--navbar-bg);
}

.theme-switch {
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    line-height: 1;
    flex-shrink: 0;
}

.theme-switch:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
    border-radius: 999px;
}

.theme-switch:hover .theme-switch__track {
    border-color: var(--text-muted);
}

.theme-switch__track {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    width: 4.5rem;
    height: 2.125rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 2px;
    box-shadow: inset 0 1px 2px rgba(28, 25, 23, 0.04);
}

.theme-switch__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    color: var(--text-muted);
    z-index: 1;
    transition: color 0.2s ease;
    pointer-events: none;
}

.theme-switch:not(.is-dark) .theme-switch__icon--light {
    color: var(--primary-color);
}

.theme-switch.is-dark .theme-switch__icon--dark {
    color: var(--primary-color);
}

.theme-switch__thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: calc(50% - 2px);
    height: calc(100% - 4px);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.22s ease;
    pointer-events: none;
}

.theme-switch.is-dark .theme-switch__thumb {
    transform: translateX(calc(100% + 2px));
}

[data-theme="dark"] .theme-switch__track {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}

[data-theme="dark"] .theme-switch__thumb {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .theme-switch:not(.is-dark) .theme-switch__icon--light {
    color: #fbbf24;
}

[data-theme="dark"] .theme-switch.is-dark .theme-switch__icon--dark {
    color: #93c5fd;
}

/* ── Cards ── */
.card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xs);
    background: var(--card-bg);
    transition: box-shadow var(--transition-normal);
}

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

.card-header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
}

/* ── Buttons ── */
.btn {
    border-radius: var(--border-radius-md);
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: var(--font-size-sm);
    letter-spacing: 0.01em;
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
    box-shadow: none;
}

.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.btn-success {
    background: var(--success-color);
    border-color: var(--success-color);
}

.btn-outline-secondary {
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.btn-outline-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--text-muted);
    color: var(--text-primary);
}

.btn-lg {
    padding: 0.625rem 1.25rem;
    font-size: var(--font-size-base);
}

/* ── Tables ── */
.table {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    margin-bottom: 0;
}

.table thead th {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table tbody td {
    padding: 0.875rem 1rem;
    border-top: 1px solid var(--border-color);
    vertical-align: middle;
    color: var(--text-primary);
    font-size: var(--font-size-sm);
}

.table tbody tr:hover {
    background: var(--bg-secondary);
}

[data-theme="dark"] .table thead th {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

[data-theme="dark"] .table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* ── Forms ── */
.form-control {
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    padding: 0.5rem 0.875rem;
    font-size: var(--font-size-base);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.12);
    outline: none;
}

.form-label,
label {
    font-weight: 600;
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    margin-bottom: 0.375rem;
}

.input-group-text {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

[data-theme="dark"] .form-control {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .form-control:focus {
    box-shadow: 0 0 0 3px rgba(91, 143, 212, 0.2);
}

/* ── Alerts ── */
.alert {
    border: 1px solid transparent;
    border-radius: var(--border-radius-lg);
    padding: 1rem 1.25rem;
    font-size: var(--font-size-sm);
}

.alert-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.alert-danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.alert-warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.alert-info {
    background: #f0f9ff;
    border-color: #bae6fd;
    color: #075985;
}

/* ── Badges ── */
.badge {
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 0.6875rem;
    padding: 0.35em 0.6em;
    letter-spacing: 0.02em;
    line-height: 1.35;
}

.badge-primary,
.badge-info {
    background-color: var(--primary-color) !important;
    color: #fff !important;
}

.badge-success {
    background-color: var(--success-color) !important;
    color: #fff !important;
}

.badge-danger {
    background-color: var(--danger-color) !important;
    color: #fff !important;
}

.badge-secondary {
    background-color: var(--secondary-color) !important;
    color: #fff !important;
}

.badge-warning {
    background-color: var(--warning-color) !important;
    color: #fff !important;
}

.badge-dark {
    background-color: var(--dark-color) !important;
    color: #fff !important;
}

.badge-light {
    background-color: #e7e5e4 !important;
    color: #1c1917 !important;
    border: 1px solid #d6d3d1;
}

/* High-contrast labels in tables (e.g. Selected Label on result pages) */
.badge-answer,
.table .badge-info,
.table .badge-primary {
    background-color: #dce6f0 !important;
    color: #152a45 !important;
    border: 1px solid #b8c9dc;
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: normal;
    text-align: left;
    max-width: 100%;
}

[data-theme="dark"] .badge-answer,
[data-theme="dark"] .table .badge-info,
[data-theme="dark"] .table .badge-primary {
    background-color: #334155 !important;
    color: #f1f5f9 !important;
    border-color: #475569;
}

.badge-light.text-muted {
    color: #1c1917 !important;
}

/* Muted text on light surfaces — improve legibility */
.bg-light .text-muted,
.card.bg-light .text-muted,
.table .text-muted {
    color: var(--text-secondary) !important;
}

.impact-area-card .impact-area-meta {
    color: #334155;
}

.impact-area-card .impact-area-body {
    color: #1f2937;
}

[data-theme="dark"] .impact-area-card .impact-area-meta,
[data-theme="dark"] .impact-area-card .impact-area-body {
    color: #e7e5e4;
}

/* ── Modals ── */
.modal-content {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    background: var(--card-bg);
}

.modal-header {
    background: var(--bg-primary);
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
}

.modal-header.bg-primary {
    background: var(--primary-color) !important;
    color: #fff;
    border-bottom: none;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    background: var(--bg-primary);
}

/* ── Pagination ── */
.page-link {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 0.375rem 0.75rem;
    color: var(--text-secondary);
    background: var(--bg-primary);
    margin: 0 0.125rem;
}

.page-link:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
    border-color: var(--border-color);
}

.page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* ── Progress ── */
.progress {
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    height: 0.375rem;
}

.progress-bar {
    background: var(--primary-color);
}

.progress-bar.bg-success {
    background: var(--success-color);
}

/* ── Breadcrumb ── */
.breadcrumb {
    background: transparent;
    padding: 0;
    font-size: var(--font-size-sm);
}

.breadcrumb-item a {
    color: var(--text-muted);
}

.breadcrumb-item.active {
    color: var(--text-primary);
}

/* ── Dark mode overrides ── */
[data-theme="dark"] body {
    background: var(--bg-primary);
    color: var(--text-primary);
}

[data-theme="dark"] .navbar {
    background: var(--navbar-bg);
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .nav-link {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .nav-link:hover {
    color: var(--primary-color) !important;
    background: var(--bg-secondary);
}

[data-theme="dark"] .dropdown-menu {
    background: var(--dropdown-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .dropdown-item {
    color: var(--text-primary);
}

[data-theme="dark"] .dropdown-item:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

[data-theme="dark"] .card,
[data-theme="dark"] .modal-content {
    background: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .card-header,
[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .bg-white {
    background: var(--card-bg) !important;
}

[data-theme="dark"] .bg-light {
    background: var(--bg-secondary) !important;
}

[data-theme="dark"] .text-muted {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .text-gray-800 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .btn-outline-secondary {
    border-color: var(--border-color);
    color: var(--text-secondary);
}

[data-theme="dark"] .alert-success {
    background: rgba(45, 106, 79, 0.15);
    border-color: rgba(45, 106, 79, 0.3);
    color: #86efac;
}

[data-theme="dark"] .alert-danger {
    background: rgba(185, 28, 28, 0.15);
    border-color: rgba(185, 28, 28, 0.3);
    color: #fca5a5;
}

/* ── Page sections ── */
.page-header {
    margin-bottom: var(--spacing-xl);
}

.page-header h1,
.page-header h2 {
    margin-bottom: 0.25rem;
}

.page-header .lead,
.page-header p {
    color: var(--text-muted);
    margin-bottom: 0;
}

.section-title {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--text-muted);
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
}

/* ── Welcome / marketing ── */
.page-main--hero {
    padding-top: 0 !important;
}

.navbar:has(+ main.page-main--hero) {
    border-bottom-color: #152a45;
    box-shadow: none;
}

.hero-section {
    background: linear-gradient(165deg, #152a45 0%, #1e3a5f 48%, #243f66 100%);
    color: #fff;
    margin: 0 0 var(--spacing-2xl);
    width: 100%;
    border-radius: 0;
    border-top: 3px solid #c4a35a;
}

.hero-section .hero-section__container {
    padding-top: clamp(2.5rem, 6vw, 4.5rem);
    padding-bottom: clamp(2rem, 4vw, 3rem);
    padding-left: max(1.25rem, env(safe-area-inset-left));
    padding-right: max(1.25rem, env(safe-area-inset-right));
    max-width: 100%;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: center;
}

.hero-copy {
    min-width: 0;
}

.hero-eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 1rem;
}

.hero-section h1 {
    color: #fff;
    font-weight: 600;
    font-size: clamp(1.875rem, 4.8vw, 3rem);
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
}

.hero-lead {
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(1rem, 2vw, 1.125rem);
    line-height: 1.65;
    max-width: 34rem;
    margin-bottom: 1.5rem;
}

.hero-points {
    list-style: none;
    padding: 0;
    margin: 0 0 1.75rem;
    max-width: 32rem;
}

.hero-points li {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.625rem;
    line-height: 1.45;
}

.hero-points li i {
    color: #c4a35a;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.hero-meta {
    margin: 1.25rem 0 0;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.6);
}

.hero-actions .btn {
    width: 100%;
    font-weight: 600;
    padding: 0.65rem 1.35rem;
}

@media (min-width: 576px) {
    .hero-actions .btn {
        width: auto;
    }
}

.btn-hero-primary {
    background: #fff;
    color: var(--primary-dark);
    border: none;
}

.btn-hero-primary:hover {
    background: #f5f5f4;
    color: var(--primary-dark);
}

.btn-hero-secondary {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.45);
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: #fff;
    color: #fff;
}

/* Report preview panel */
.hero-visual {
    min-width: 0;
    width: 100%;
}

.hero-report {
    background: #fff;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.22);
    padding: 1.25rem 1.35rem 1rem;
    max-width: 100%;
}

.hero-report__header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.875rem;
    border-bottom: 1px solid var(--border-color);
}

.hero-report__tag {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.hero-report__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
}

.hero-report__profile {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 0.75rem 0.875rem;
    margin-bottom: 1rem;
}

.hero-report__score {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.hero-report__score-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hero-report__score strong {
    font-size: 0.9375rem;
    color: var(--success-color);
}

.hero-report__code {
    font-size: 0.6875rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.hero-report__domains {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.hero-report__domain-head {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
    color: var(--text-secondary);
}

.hero-report__domain-val {
    font-weight: 600;
    color: var(--text-primary);
}

.hero-report__bar {
    height: 0.375rem;
    background: var(--bg-tertiary);
    overflow: hidden;
}

.hero-report__bar span {
    display: block;
    height: 100%;
    background: var(--primary-color);
}

.hero-report__footer {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 0.875rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.hero-report__footer i {
    margin-right: 0.35rem;
    color: var(--primary-color);
}

.hero-trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem 0;
    margin-top: clamp(2rem, 4vw, 3rem);
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 0.02em;
}

.hero-trust span:not(:last-child)::after {
    content: " · ";
    opacity: 0.45;
    margin: 0 0.35rem;
}

@media (min-width: 992px) {
    .hero-trust {
        justify-content: flex-start;
    }
}

@media (min-width: 992px) {
    .hero-grid {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
        gap: 3.5rem;
    }

    .hero-copy {
        text-align: left;
    }

    .hero-actions {
        justify-content: flex-start;
    }

    .hero-lead {
        margin-left: 0;
        margin-right: 0;
    }

    .hero-visual {
        display: flex;
        justify-content: flex-end;
    }

    .hero-report {
        max-width: 24rem;
        width: 100%;
    }
}

@media (max-width: 991.98px) {
    .hero-copy {
        text-align: center;
    }

    .hero-lead,
    .hero-points {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-points li {
        text-align: left;
    }

    .hero-actions {
        justify-content: center;
    }
}

@media (min-width: 1200px) {
    .hero-section .hero-section__container {
        max-width: 1140px;
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .hero-grid {
        gap: 4.5rem;
    }

    .hero-report {
        max-width: 26rem;
        padding: 1.5rem;
    }
}

@media (min-width: 1400px) {
    .hero-section .hero-section__container {
        max-width: 1280px;
    }
}

[data-theme="dark"] .hero-report {
    background: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .hero-report__profile {
    background: var(--bg-secondary);
}

.assessment-card .card-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
}

.assessment-card .card-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--border-radius-md);
    background: rgba(30, 58, 95, 0.08);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-icon-box {
    width: 3rem;
    height: 3rem;
    border-radius: var(--border-radius-lg);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.team-card .card-header {
    background: var(--primary-color);
    color: #fff;
    border-bottom: none;
}

.team-card .card-header h5 {
    color: #fff;
}

/* ── Dashboard metrics ── */
.metric-card {
    border: 1px solid var(--border-color);
}

.metric-card .metric-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--border-radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.metric-icon-primary { background: rgba(30, 58, 95, 0.1); color: var(--primary-color); }
.metric-icon-success { background: rgba(45, 106, 79, 0.1); color: var(--success-color); }
.metric-icon-warning { background: rgba(180, 83, 9, 0.1); color: var(--warning-color); }
.metric-icon-danger { background: rgba(185, 28, 28, 0.1); color: var(--danger-color); }

.border-left-primary { border-left: 3px solid var(--primary-color) !important; }
.border-left-success { border-left: 3px solid var(--success-color) !important; }
.border-left-info { border-left: 3px solid var(--info-color) !important; }
.border-left-warning { border-left: 3px solid var(--warning-color) !important; }
.border-left-danger { border-left: 3px solid var(--danger-color) !important; }

.text-gray-800 { color: var(--text-primary) !important; }
.text-gray-300 { color: var(--text-muted) !important; }
.text-xs { font-size: 0.6875rem; letter-spacing: 0.04em; text-transform: uppercase; }

/* ── Loading ── */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

[data-theme="dark"] .loading-overlay {
    background: rgba(28, 25, 23, 0.92);
}

.loading-spinner {
    width: 2rem;
    height: 2rem;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Accessibility ── */
.skip-nav {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: #fff;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: var(--border-radius-md);
    z-index: 1000;
    font-weight: 500;
    font-size: var(--font-size-sm);
}

.skip-nav:focus {
    top: 6px;
    color: #fff;
    text-decoration: none;
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ── Mobile nav ── */
@media (max-width: 767.98px) {
    .navbar-collapse {
        background: var(--navbar-bg);
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius-lg);
        box-shadow: var(--shadow-md);
        margin-top: 0.5rem;
        padding: 0.5rem 0;
    }

    .navbar-nav .nav-link {
        padding: 0.625rem 1rem !important;
        border-bottom: 1px solid var(--border-color);
    }

    .navbar-nav .nav-link--icon {
        width: auto;
        height: auto;
        justify-content: flex-start;
    }

    .navbar-nav .nav-link--icon > i {
        margin-right: 0.375rem;
    }

    .nav-cart-link .cart-badge {
        position: static;
        transform: none;
        margin-left: 0.375rem;
    }

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

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Bootstrap primary override */
.bg-primary { background-color: var(--primary-color) !important; }
.bg-gradient-primary { background: var(--primary-color) !important; }
.bg-gradient-optimism { background: var(--primary-color) !important; }
.btn-primary,
.btn-primary.disabled,
.btn-primary:disabled { background-color: var(--primary-color); border-color: var(--primary-color); }
.text-success { color: var(--success-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-danger { color: var(--danger-color) !important; }

/* ── Assessment flow (question pages) ── */
.assessment-container {
    max-width: 42rem;
    margin: 0 auto;
}

.progress-section { margin-bottom: 1.5rem; }

.options-container { margin-bottom: 1.5rem; }

.question-card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    background: var(--card-bg);
}

.question-header {
    background: var(--primary-color);
    color: #fff;
    padding: 1.25rem 1.5rem;
    border: none;
}

.question-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.question-number {
    background: rgba(255, 255, 255, 0.15);
    padding: 0.25rem 0.75rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.8125rem;
    margin-right: 0.75rem;
    font-weight: 500;
}

.assessment-info {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-md);
    margin-top: 0.75rem;
    font-size: 0.875rem;
}

.question-content {
    padding: 2rem 1.5rem;
}

.question-text {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 1.75rem;
    line-height: 1.6;
}

.progress-bar-custom {
    height: 0.375rem;
    border-radius: var(--border-radius-sm);
    background: var(--bg-tertiary);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--success-color);
    border-radius: var(--border-radius-sm);
    transition: width 0.3s ease;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.option-label {
    display: block;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: border-color var(--transition-fast), background var(--transition-fast);
    font-size: 0.9375rem;
    color: var(--text-primary);
    margin: 0 0 0.625rem;
    position: relative;
}

.option-label::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: var(--bg-primary);
}

.option-input:checked + .option-label {
    background: rgba(45, 106, 79, 0.08);
    border-color: var(--success-color);
}

.option-input:checked + .option-label::before {
    border-color: var(--success-color);
    box-shadow: inset 0 0 0 3px var(--bg-primary);
    background: var(--success-color);
}

.option-label:hover {
    border-color: var(--text-muted);
    background: var(--bg-primary);
}

.action-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
}

/* ── Report pages ── */
.report-card .card-header {
    background: var(--primary-color);
    color: #fff;
    border-bottom: none;
}

.report-card .card-header h4,
.report-card .card-header h5 {
    color: #fff;
}

.score-circle-large { flex: 0 0 auto; }

/* ── Subscriptions ── */
.subscriptions-page {
    padding-top: var(--spacing-lg);
    padding-bottom: var(--spacing-2xl);
}

.purchase-card {
    border-top: 3px solid var(--primary-color);
}

.purchase-card__header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.purchase-card__subtitle {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-top: 0.25rem;
    font-weight: 400;
}

.purchase-card__footer {
    background: var(--bg-secondary);
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.5rem 0;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    border-bottom: 1px solid var(--border-color);
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-list li i {
    color: var(--success-color);
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.checkout-progress__bar {
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 999px;
    overflow: hidden;
}

.checkout-progress__bar .progress-bar {
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.checkout-progress__steps {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.625rem;
}

.checkout-progress__step {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.checkout-progress__step.is-active {
    color: var(--primary-color);
    font-weight: 600;
}

.order-summary-card .card-header,
.cart-panel .card-header {
    background: var(--primary-color);
    color: #fff;
    border-bottom: none;
}

.order-summary-card .card-header i,
.cart-panel .card-header i {
    opacity: 0.9;
}

.order-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.order-summary-label {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.125rem;
}

.order-summary-total {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    color: var(--primary-color);
    line-height: 1.2;
}

.wallet-balance-panel {
    padding: 0.875rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    font-size: var(--font-size-sm);
}

.checkout-security-note {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.sticky-sidebar {
    position: sticky;
    top: 5rem;
}

.assessment-picker-card {
    background: var(--bg-primary);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.assessment-picker-card:hover {
    border-color: var(--text-muted);
    box-shadow: var(--shadow-sm);
}

.assessment-picker-card__desc {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    min-height: 2.5rem;
}

.assessment-picker-card__price {
    display: flex;
    align-items: baseline;
    gap: 0.375rem;
}

.cart-item {
    padding: 0.875rem;
    margin-bottom: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
}

.cart-item:last-of-type {
    margin-bottom: 0;
}

.cart-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
}

.cart-empty i {
    font-size: 2rem;
    opacity: 0.35;
    margin-bottom: 0.75rem;
    display: block;
}

.stack-sm > * + * {
    margin-top: 0.625rem;
}

.required::after {
    content: " *";
    color: var(--danger-color);
}

@media (max-width: 991.98px) {
    .sticky-sidebar {
        position: relative;
        top: 0;
    }
}

[data-theme="dark"] .order-summary-card .card-header,
[data-theme="dark"] .cart-panel .card-header {
    background: var(--primary-dark);
}

[data-theme="dark"] .purchase-card__header,
[data-theme="dark"] .purchase-card__footer {
    background: var(--bg-tertiary);
}

