/* ==========================================================================
   AtListen Components
   Buttons, Navigation, Cards, Forms, and more
   ========================================================================== */

/* Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    min-height: 44px;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    line-height: var(--leading-none);
    border-radius: var(--radius-lg);
    cursor: pointer;
    text-decoration: none;
    border: none;
    white-space: nowrap;
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-sm {
    padding: var(--space-2) var(--space-4);
    min-height: 44px;
    font-size: var(--text-xs);
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-base);
    border-radius: var(--radius-xl);
}

.btn-full {
    width: 100%;
}

.btn-primary {
    background: var(--gradient-brand);
    color: var(--color-white);
    box-shadow: var(--shadow-brand);
}

.btn-primary:hover {
    box-shadow: 0 6px 24px -4px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    background-color: var(--color-gray-900);
    color: var(--color-white);
}

.btn-secondary:hover {
    background-color: var(--color-gray-800);
}

.btn-ghost {
    background-color: transparent;
    color: var(--color-text-primary);
    border: 1px solid var(--color-gray-300);
}

.btn-ghost:hover {
    background-color: var(--color-gray-100);
    border-color: var(--color-gray-400);
}

.btn-ghost.light {
    color: var(--color-white);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-ghost.light:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Navigation
   ========================================================================== */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: var(--z-fixed);
    background-color: transparent;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

@media (min-width: 1024px) {
    .nav-container {
        padding: 0 var(--space-12);
    }
}

.nav-logo {
    display: flex;
    align-items: center;
}

.nav-logo img {
    height: 72px;
    width: auto;
}

.nav-links {
    display: none;
    align-items: center;
    gap: var(--space-8);
}

@media (min-width: 1024px) {
    .nav-links {
        display: flex;
    }
}

.nav-link {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-text-secondary);
    padding: var(--space-2) 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-text-primary);
}

.nav-cta {
    display: none;
}

@media (min-width: 1024px) {
    .nav-cta {
        display: block;
    }
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
}

@media (min-width: 1024px) {
    .mobile-menu-toggle {
        display: none;
    }
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-text-primary);
    border-radius: 1px;
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    z-index: var(--z-modal);
    display: flex;
    flex-direction: column;
    padding: var(--space-8) var(--space-6);
}

@media (min-width: 1024px) {
    .mobile-nav-overlay {
        display: none;
    }
}

.mobile-nav-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.mobile-nav-link {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    padding: var(--space-3) 0;
}

.mobile-nav-cta {
    margin-top: var(--space-6);
}

/* Section Headers
   ========================================================================== */
.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto var(--space-16);
}

.section-header.light .section-eyebrow,
.section-header.light .section-title,
.section-header.light .section-subtitle {
    color: var(--color-white);
}

.section-eyebrow {
    display: inline-block;
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    /* Solid dark token, not the gradient-clip treatment, so this small text meets contrast on white */
    color: var(--color-purple-dark);
    margin-bottom: var(--space-4);
}

.section-title {
    font-size: var(--text-4xl);
    font-weight: var(--font-bold);
    line-height: var(--leading-tight);
    color: var(--color-text-primary);
    margin-bottom: var(--space-4);
}

@media (min-width: 768px) {
    .section-title {
        font-size: var(--text-5xl);
    }
}

.section-subtitle {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    line-height: var(--leading-relaxed);
}

/* Cards
   ========================================================================== */

/* Problem Cards */
.problem-card {
    background-color: var(--color-white);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-md);
    text-align: center;
}

.problem-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-6);
    background: var(--gradient-subtle);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
}

.problem-icon svg {
    width: 32px;
    height: 32px;
    color: var(--color-purple);
}

.problem-title {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-3);
}

.problem-text {
    font-size: var(--text-base);
    color: var(--color-text-secondary);
    line-height: var(--leading-relaxed);
}

/* Use Case Cards */
.use-case-card {
    background-color: var(--color-white);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-md);
}

.use-case-icon {
    width: 56px;
    height: 56px;
    background: var(--gradient-brand);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-6);
}

.use-case-icon svg {
    width: 28px;
    height: 28px;
    color: var(--color-white);
}

.use-case-title {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-3);
}

.use-case-desc {
    font-size: var(--text-base);
    color: var(--color-text-secondary);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-4);
}

.use-case-tag {
    display: inline-block;
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    padding: var(--space-1) var(--space-3);
    background: var(--gradient-subtle);
    color: var(--color-purple);
    border-radius: var(--radius-full);
}

/* Pricing Cards */
.pricing-card {
    background-color: var(--color-white);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-md);
    position: relative;
}

.pricing-card.featured {
    border: 2px solid var(--color-purple);
    transform: scale(1.05);
}

@media (max-width: 1023px) {
    .pricing-card.featured {
        transform: none;
    }
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-brand);
    color: var(--color-white);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    padding: var(--space-1) var(--space-4);
    border-radius: var(--radius-full);
}

.pricing-name {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
}

.pricing-price {
    display: flex;
    align-items: baseline;
    gap: var(--space-1);
    margin-bottom: var(--space-2);
}

.price-amount {
    font-size: var(--text-5xl);
    font-weight: var(--font-bold);
    color: var(--color-text-primary);
}

.price-period {
    font-size: var(--text-base);
    color: var(--color-text-tertiary);
}

.pricing-desc {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-6);
}

.pricing-features {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

.pricing-feature {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.pricing-feature svg {
    width: 18px;
    height: 18px;
    color: var(--color-green);
    flex-shrink: 0;
}

/* Note: the AI Credits pill (.credits-pill*) styles its own markup by injecting a
   <style> block from scripts/credits-widget.js — kept there so the widget is immune to
   CSS caching. Don't redefine .credits-pill here. */

/* AI-provider logo strip in pricing cards (logos injected by scripts/provider-logos.js) */
.pricing-models {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-bottom: var(--space-6);
    padding-top: var(--space-5);
    border-top: 1px solid var(--color-gray-100);
}

.pricing-models-label {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-tertiary);
}

.pricing-models-logos {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.prov-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 4px 6px;
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-text-secondary);
    background: var(--color-white);
}

.prov-chip-logo,
.prov-chip-sm {
    display: inline-flex;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.prov-chip-logo svg,
.prov-chip-sm svg {
    width: 100%;
    height: 100%;
}

/* Comparison-table row: small logo before the provider name */
.prov-chip-sm {
    margin-right: 6px;
    vertical-align: -3px;
}

/* Billing interval toggle */
.billing-toggle {
    display: flex;
    justify-content: center;
    gap: var(--space-1);
    width: fit-content;
    margin: 0 auto var(--space-10);
    padding: var(--space-1);
    background-color: var(--color-gray-100);
    border-radius: var(--radius-full);
}

.billing-toggle-btn {
    padding: var(--space-2) var(--space-5);
    border: none;
    background: none;
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.billing-toggle-btn:hover {
    color: var(--color-text-primary);
}

.billing-toggle-btn.active {
    background-color: var(--color-white);
    color: var(--color-text-primary);
    box-shadow: var(--shadow-sm);
}

@media (max-width: 480px) {
    .billing-toggle-btn {
        padding: var(--space-2) var(--space-3);
        font-size: var(--text-xs);
    }
}

/* Billed-total line under the per-month price */
.pricing-billed {
    font-size: var(--text-sm);
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-2);
    min-height: 1.5em;
}

.pricing-save {
    display: inline-block;
    margin-left: var(--space-2);
    padding: 2px var(--space-2);
    border-radius: var(--radius-full);
    background-color: rgba(16, 185, 129, 0.12);
    color: var(--color-green-dark);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
}

/* Plan comparison table */
.pricing-compare {
    max-width: 1000px;
    margin: var(--space-16) auto 0;
}

.pricing-compare-title {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    text-align: center;
    margin-bottom: var(--space-6);
}

.pricing-compare-scroll {
    overflow-x: auto;
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-2xl);
    background-color: var(--color-white);
}

.pricing-compare-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    font-size: var(--text-sm);
}

.pricing-compare-table th,
.pricing-compare-table td {
    padding: var(--space-3) var(--space-4);
    text-align: center;
    border-bottom: 1px solid var(--color-gray-100);
}

.pricing-compare-table tbody tr:last-child th,
.pricing-compare-table tbody tr:last-child td {
    border-bottom: none;
}

.pricing-compare-table thead th {
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    background-color: var(--color-gray-50);
    border-bottom: 1px solid var(--color-gray-200);
}

.pricing-compare-table tbody th {
    text-align: left;
    font-weight: var(--font-medium);
    color: var(--color-text-secondary);
    white-space: nowrap;
}

.pricing-compare-table td {
    color: var(--color-text-secondary);
}

.pricing-compare-table .col-featured {
    background-color: rgba(139, 92, 246, 0.05);
}

/* Check / dash cells rendered from data-v so the markup stays terse */
.pricing-compare-table td[data-v]::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    vertical-align: middle;
}

.pricing-compare-table td[data-v="yes"]::before {
    background-color: var(--color-green);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat;
}

.pricing-compare-table td[data-v="no"]::before {
    background-color: var(--color-gray-300);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Forms
   ========================================================================== */
.form-group {
    margin-bottom: var(--space-5);
}

.form-group label {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-base);
    color: var(--color-text-primary);
    background-color: var(--color-white);
    border: 1px solid var(--color-gray-300);
    border-radius: var(--radius-lg);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:hover,
.form-group textarea:hover,
.form-group select:hover {
    border-color: var(--color-gray-400);
}

.form-group input:focus-visible,
.form-group textarea:focus-visible,
.form-group select:focus-visible {
    border-color: var(--color-purple);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--color-gray-400);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: var(--space-10);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238B5CF6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-4) center;
    background-size: 16px;
    cursor: pointer;
}

.form-group select:invalid {
    color: var(--color-gray-400);
}

.form-group select option {
    color: var(--color-text-primary);
}

/* Custom subject select (contact form) — progressively enhances #subject,
   see SubjectSelect in scripts/main.js. Native select stays in the DOM
   (invisibly overlaid) so form value + required validation still work. */
.custom-select {
    position: relative;
}

.custom-select-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    font: inherit;
    font-size: var(--text-base);
    color: var(--color-text-primary);
    background-color: var(--color-white);
    border: 1px solid var(--color-gray-300);
    border-radius: var(--radius-lg);
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.custom-select-trigger:hover {
    border-color: var(--color-gray-400);
}

.custom-select.open .custom-select-trigger,
.custom-select-trigger:focus-visible {
    outline: none;
    border-color: var(--color-purple);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.custom-select-value[data-empty="true"] {
    color: var(--color-gray-400);
}

.custom-select-chevron {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--color-purple);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-select.open .custom-select-chevron {
    transform: rotate(180deg);
}

.custom-select-native {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}

.custom-select-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    margin: 0;
    padding: var(--space-2);
    list-style: none;
    background-color: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl), var(--shadow-brand);
    max-height: 320px;
    overflow-y: auto;
    z-index: 20;
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
    transform-origin: top center;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.custom-select.open .custom-select-panel {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.custom-select-option {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-height: 44px;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--color-text-primary);
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease, background-color 0.15s ease;
}

.custom-select.open .custom-select-option {
    opacity: 1;
    transform: translateY(0);
    transition-delay: calc(var(--i, 0) * 30ms);
}

.custom-select-option:hover,
.custom-select-option:focus-visible,
.custom-select-option[aria-selected="true"] {
    outline: none;
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.1), rgba(59, 130, 246, 0.08));
}

.custom-select-option:focus-visible {
    box-shadow: inset 3px 0 0 var(--color-purple);
}

.custom-select-option-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    background-color: var(--color-gray-100);
    color: var(--color-gray-500);
    transition: background 0.15s ease, color 0.15s ease;
}

.custom-select-option-icon svg {
    width: 16px;
    height: 16px;
}

.custom-select-option:hover .custom-select-option-icon,
.custom-select-option:focus-visible .custom-select-option-icon,
.custom-select-option[aria-selected="true"] .custom-select-option-icon {
    background: var(--gradient-brand);
    color: var(--color-white);
}

.custom-select-option-label {
    flex: 1;
    font-size: var(--text-base);
}

.custom-select-check {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--color-green);
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.custom-select-option[aria-selected="true"] .custom-select-check {
    opacity: 1;
    transform: scale(1);
}

/* Study Cards (Hero) */
.study-card {
    background-color: var(--color-white);
    border-radius: var(--radius-xl);
    padding: var(--space-5);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.card-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-subtle);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-icon svg {
    width: 20px;
    height: 20px;
    color: var(--color-purple);
}

.card-label {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
}

/* Depth Control Card */
.depth-control-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9ff 100%);
    border-radius: 28px;
    padding: var(--space-8);
    box-shadow: 
        0 20px 60px -20px rgba(139, 92, 246, 0.15),
        0 10px 30px -10px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.08);
    position: relative;
    overflow: hidden;
    width: 320px;
    min-width: 320px;
    max-width: 320px;
    min-height: 420px;
    box-sizing: border-box;
}

.depth-control-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-brand);
    opacity: 0.8;
}

.depth-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
    height: 50px;
}

.depth-title-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.depth-label {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-tertiary);
}

.depth-value {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    min-width: 120px;
    text-align: right;
}

.depth-icon {
    width: 44px;
    height: 44px;
    background: var(--gradient-subtle);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--duration-slow) var(--ease-spring);
}

.depth-icon svg {
    width: 22px;
    height: 22px;
    color: var(--color-purple);
    transition: all var(--duration-slow) var(--ease-spring);
}

.depth-control-card:hover .depth-icon svg {
    transform: scale(1.1);
}

/* Slider Styles */
.depth-slider-wrapper {
    margin-bottom: var(--space-8);
    position: relative;
}

.depth-slider-track {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 8px;
    background: var(--color-gray-200);
    border-radius: var(--radius-full);
    transform: translateY(-50%);
    overflow: hidden;
}

.depth-slider-fill {
    height: 100%;
    background: var(--gradient-brand);
    border-radius: var(--radius-full);
    width: 50%;
    transition: width var(--duration-slow) var(--ease-spring);
}

.depth-slider {
    width: 100%;
    height: 32px;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    outline: none;
    position: relative;
    z-index: 2;
    cursor: pointer;
}

.depth-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    background: var(--gradient-brand);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 
        0 4px 12px rgba(139, 92, 246, 0.4),
        0 0 0 4px rgba(139, 92, 246, 0.1);
    border: 3px solid white;
    transition: all var(--duration-fast) var(--ease-out);
}

.depth-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 
        0 6px 20px rgba(139, 92, 246, 0.5),
        0 0 0 6px rgba(139, 92, 246, 0.15);
}

.depth-slider::-webkit-slider-thumb:active {
    transform: scale(0.95);
}

.depth-slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
    background: var(--gradient-brand);
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid white;
    box-shadow:
        0 4px 12px rgba(139, 92, 246, 0.4),
        0 0 0 4px rgba(139, 92, 246, 0.1);
    transition: all var(--duration-fast) var(--ease-out);
}

.depth-slider:focus-visible::-webkit-slider-thumb {
    box-shadow:
        0 4px 12px rgba(139, 92, 246, 0.4),
        0 0 0 4px rgba(139, 92, 246, 0.1),
        0 0 0 7px rgba(139, 92, 246, 0.5);
}

.depth-slider:focus-visible::-moz-range-thumb {
    box-shadow:
        0 4px 12px rgba(139, 92, 246, 0.4),
        0 0 0 4px rgba(139, 92, 246, 0.1),
        0 0 0 7px rgba(139, 92, 246, 0.5);
}

.depth-marks {
    display: flex;
    margin-top: var(--space-3);
    position: relative;
}

.depth-mark {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
    transition: color 0.2s ease;
    width: 33.33%;
    flex-shrink: 0;
    background: none;
    border: none;
    padding: var(--space-1) 0;
    font: inherit;
}

.depth-mark:focus-visible {
    outline: 2px solid var(--color-purple);
    outline-offset: 3px;
    border-radius: var(--radius-md);
}

.depth-mark:nth-child(1) {
    align-items: flex-start;
    padding-left: 12px;
}

.depth-mark:nth-child(2) {
    align-items: center;
}

.depth-mark:nth-child(3) {
    align-items: flex-end;
    padding-right: 12px;
}

.mark-dot {
    width: 10px;
    height: 10px;
    background: var(--color-gray-300);
    border-radius: 50%;
    transition: transform 0.2s ease, background 0.2s ease;
}

.mark-label {
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: var(--color-text-tertiary);
    white-space: nowrap;
    text-align: center;
}

.depth-mark:hover .mark-label {
    color: var(--color-purple);
}

.depth-mark.active .mark-dot {
    background: var(--gradient-brand);
    transform: scale(1.3);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
}

.depth-mark.active .mark-label {
    color: var(--color-purple);
    font-weight: var(--font-semibold);
}

/* Stats Section - Fixed Layout */
.depth-stats {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding-top: var(--space-6);
    border-top: 1px solid rgba(139, 92, 246, 0.1);
    min-height: 240px;
}

.depth-stat {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-3) var(--space-4);
    background: var(--color-white);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(139, 92, 246, 0.08);
    height: 64px;
    box-sizing: border-box;
}

.stat-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-subtle);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 20px;
    height: 20px;
    color: var(--color-purple);
}

.stat-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-value {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--color-text-primary);
    min-width: 70px;
    display: inline-block;
}

.stat-label {
    font-size: var(--text-sm);
    color: var(--color-text-tertiary);
}

/* Time Estimate */
.depth-time {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    margin-top: var(--space-6);
    padding-top: var(--space-5);
    border-top: 1px dashed var(--color-gray-200);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.depth-time svg {
    width: 16px;
    height: 16px;
    color: var(--color-purple);
}

.depth-time span {
    font-weight: var(--font-medium);
}
}

/* Study Preview Card */
.study-preview-card {
    background: var(--color-white);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    width: 400px;
    padding: var(--space-5);
    border: 1px solid var(--color-gray-200);
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--color-gray-200);
}

.preview-subject {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
}

.preview-progress {
    font-size: var(--text-xs);
    color: var(--color-text-tertiary);
    background: var(--color-gray-100);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
}

.preview-tabs {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-5);
}

.preview-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-3) var(--space-2);
    background: var(--color-gray-50);
    border: 2px solid transparent;
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all 0.2s ease;
}

.preview-tab svg {
    width: 20px;
    height: 20px;
    color: var(--color-text-tertiary);
}

.preview-tab span {
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: var(--color-text-tertiary);
}

.preview-tab:hover {
    background: var(--color-gray-100);
}

.preview-tab:focus-visible {
    outline: 2px solid var(--color-purple);
    outline-offset: 2px;
}

.preview-tab.active {
    background: var(--gradient-subtle);
    border-color: var(--color-purple);
}

.preview-tab.active svg,
.preview-tab.active span {
    color: var(--color-purple);
}

.preview-content {
    height: 220px;
    margin-bottom: var(--space-4);
    position: relative;
}

.preview-view {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.preview-view.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Flashcard Widget with 3D Flip */
.flashcard-widget {
    width: 100%;
    height: 220px;
    perspective: 1000px;
    cursor: pointer;
}

.flashcard-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.flashcard-widget.flipped .flashcard-inner {
    transform: rotateY(180deg);
}

.flashcard-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--radius-xl);
    padding: var(--space-5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    box-sizing: border-box;
    color: var(--color-white);
    text-align: center;
}

.flashcard-face.front {
    background: linear-gradient(135deg, var(--color-purple) 0%, var(--color-blue) 100%);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.3);
}

.flashcard-face.back {
    background: linear-gradient(135deg, var(--color-green) 0%, var(--color-blue) 100%);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
    transform: rotateY(180deg);
}

.flashcard-q {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    line-height: 1.4;
    margin: 0;
}

.flashcard-a {
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    line-height: 1.4;
    margin: 0;
}

.flashcard-label {
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.9;
}

.flashcard-action {
    font-size: var(--text-xs);
    opacity: 0.8;
    background: rgba(0, 0, 0, 0.25);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
}

/* Summary Widget */
.summary-widget {
    background: var(--color-gray-50);
    border-radius: var(--radius-xl);
    padding: var(--space-4);
    height: 220px;
    box-sizing: border-box;
    overflow-y: auto;
}

.summary-widget h4 {
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    color: var(--color-text-primary);
    margin: 0 0 var(--space-3) 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.summary-point {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
}

.summary-point:last-child {
    margin-bottom: 0;
}

.point-num {
    width: 20px;
    height: 20px;
    background: var(--gradient-brand);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: var(--font-bold);
    color: var(--color-white);
    flex-shrink: 0;
}

.summary-point p {
    font-size: 13px;
    color: var(--color-text-secondary);
    line-height: 1.4;
    margin: 0;
}

/* Quiz Widget */
.quiz-widget {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    height: 220px;
    box-sizing: border-box;
    overflow-y: auto;
}

.quiz-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    background: var(--color-gray-50);
    border-radius: var(--radius-lg);
    border: 2px solid transparent;
    flex-shrink: 0;
}

.quiz-item.correct {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--color-green);
}

.quiz-num {
    width: 24px;
    height: 24px;
    background: var(--color-gray-200);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: var(--font-bold);
    color: var(--color-text-secondary);
    flex-shrink: 0;
}

.quiz-item.correct .quiz-num {
    background: var(--color-green);
    color: var(--color-white);
}

.quiz-item p {
    font-size: 13px;
    color: var(--color-text-primary);
    margin: 0;
    flex: 1;
}

.quiz-item strong {
    color: var(--color-green);
    font-weight: var(--font-semibold);
}

/* Preview Progress Bar */
.preview-bar {
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-gray-200);
}

.progress-track {
    height: 6px;
    background: var(--color-gray-200);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-brand);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

/* Mission Card */
.about-mission-card {
    position: relative;
    overflow: hidden;
    background: var(--gradient-brand);
    border-radius: var(--radius-2xl);
    padding: var(--space-10);
    color: var(--color-white);
    transform-style: preserve-3d;
    will-change: transform;
}

.mission-glare {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.about-mission-card:hover .mission-glare {
    opacity: 1;
}

.mission-icon {
    width: 64px;
    height: 64px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-6);
}

.mission-icon svg {
    width: 32px;
    height: 32px;
    color: var(--color-white);
}

.mission-title {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-4);
}

.mission-text {
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
    opacity: 0.95;
}

/* Contact Methods */
.contact-method {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.contact-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-subtle);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-icon svg {
    width: 24px;
    height: 24px;
    color: var(--color-purple);
}

.contact-detail {
    display: flex;
    flex-direction: column;
}

.contact-label {
    font-size: var(--text-sm);
    color: var(--color-text-tertiary);
}

.contact-value {
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    color: var(--color-text-primary);
}

.contact-qr {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    width: fit-content;
    margin-top: var(--space-4);
    padding: var(--space-4);
    background-color: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

.contact-qr-img {
    width: 140px;
    height: 140px;
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.contact-qr-label {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-text-secondary);
    max-width: 150px;
    line-height: var(--leading-snug);
}

/* Footer */
.main-footer {
    background-color: var(--color-gray-50);
    border-top: 1px solid var(--color-gray-200);
    padding: var(--space-16) 0 var(--space-8);
}

.footer-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

@media (min-width: 1024px) {
    .footer-container {
        padding: 0 var(--space-12);
    }
}

.footer-main {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-12);
    margin-bottom: var(--space-12);
}

@media (min-width: 768px) {
    .footer-main {
        grid-template-columns: 1.5fr 2fr;
    }
}

.footer-logo {
    display: inline-block;
    margin-bottom: var(--space-4);
}

.footer-logo img {
    height: 80px;
    width: auto;
}

.footer-tagline {
    font-size: var(--text-base);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-6);
}

.footer-social {
    display: flex;
    gap: var(--space-3);
}

.social-link {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    color: var(--color-text-secondary);
    background-color: var(--color-white);
}

.social-link svg {
    width: 20px;
    height: 20px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-8);
}

@media (min-width: 640px) {
    .footer-links {
        grid-template-columns: repeat(3, 1fr);
    }
}

.footer-heading {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-4);
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.footer-links a {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.footer-links a:hover {
    color: var(--color-text-primary);
}

.footer-particle-banner {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    height: 180px;
    margin-bottom: var(--space-8);
}

@media (min-width: 768px) {
    .footer-particle-banner {
        height: 280px;
    }
}

@media (min-width: 1024px) {
    .footer-particle-banner {
        height: 360px;
    }
}

.footer-bottom {
    padding-top: var(--space-8);
    border-top: 1px solid var(--color-gray-200);
    text-align: center;
}

.footer-copyright {
    font-size: var(--text-sm);
    color: var(--color-text-tertiary);
}
