/* ===== Base ===== */
:root {
    --primary: #4F46E5;
    --primary-dark: #3730A3;
    --accent: #06B6D4;
    --accent-light: #22D3EE;
    --dark: #0F172A;
    --dark-light: #1E293B;
    --surface: #F8FAFC;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #334155;
    background: var(--dark);
}

/* ===== Navbar ===== */
.navbar-glass {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.75rem 0;
    z-index: 1000;
}

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

.nav-link-custom {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link-custom:hover { color: #fff; }

.btn-accent {
    background: var(--accent);
    color: var(--dark);
    font-weight: 600;
    border: none;
    transition: all 0.2s;
}

.btn-accent:hover {
    background: var(--accent-light);
    color: var(--dark);
    transform: translateY(-1px);
}

/* ===== Hero ===== */
.hero-section {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--dark) 0%, #1a1a3e 50%, #0d2137 100%);
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-badge {
    display: inline-block;
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent);
    border: 1px solid rgba(6, 182, 212, 0.3);
    padding: 0.35rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.1;
    color: #fff;
}

.hero-gradient {
    background: linear-gradient(135deg, var(--accent) 0%, #818CF8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-subtitle {
    font-size: 1.2rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.6);
    max-width: 500px;
}

.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-graphic {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.2) 0%, rgba(6, 182, 212, 0.2) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: pulse-ring 4s ease-in-out infinite;
}

.hero-graphic::before {
    content: '';
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    border: 1px solid rgba(6, 182, 212, 0.1);
    animation: pulse-ring 4s ease-in-out infinite 0.5s;
}

.hero-graphic::after {
    content: '';
    position: absolute;
    inset: -44px;
    border-radius: 50%;
    border: 1px solid rgba(6, 182, 212, 0.05);
    animation: pulse-ring 4s ease-in-out infinite 1s;
}

.hero-graphic i {
    font-size: 5rem;
    background: linear-gradient(135deg, var(--accent), #818CF8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2.5rem;
}

.hero-stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
}

.hero-stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===== Curation / Generator ===== */
.generator-section {
    background: var(--surface);
    position: relative;
}

/* Curation Nav Pills */
.generator-section .nav-pills .nav-link {
    color: var(--dark);
    background: #E2E8F0;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    padding: 0.5rem 1.25rem;
}

.generator-section .nav-pills .nav-link.active {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
}

/* Curation Cards */
.curation-card {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    display: block;
    text-decoration: none;
    color: inherit;
}

.curation-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.curation-card .card-thumbnail-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #1E293B;
}

.curation-card .card-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.curation-card .card-body {
    padding: 1rem;
}

.curation-card .card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.95rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.25rem;
    line-height: 1.35;
}

.curation-card .card-meta {
    font-size: 0.8rem;
    color: rgba(51, 65, 85, 0.7);
}

.card-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    transition: opacity 0.2s;
    color: #fff;
    font-size: 2.5rem;
}

.curation-card:hover .card-play-overlay {
    opacity: 1;
}

.glass-card {
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 20px 50px -12px rgba(0, 0, 0, 0.08);
}

.glass-card .label-muted {
    color: rgba(15, 23, 42, 0.7);
}

.section-label {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--dark);
}

/* ===== Buttons ===== */
.btn-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%) !important;
    border: none !important;
    color: #fff !important;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.35) !important;
    color: #fff !important;
}

/* ===== How It Works ===== */
.steps-section {
    background: var(--dark);
    color: #fff;
}

.step-card {
    background: var(--dark-light);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s;
    height: 100%;
    touch-action: pan-y;
    position: relative;
    will-change: transform;
}

.swipe-zone {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1;
    color: rgba(34, 211, 238, 0.35);
    font-size: 1.1rem;
    transition: filter 0.15s ease-out, background 0.15s ease-out;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.swipe-zone:hover {
    filter: brightness(1.6);
}

.swipe-hint-left {
    left: 0;
    background: linear-gradient(to right, rgba(6, 182, 212, 0.1), rgba(6, 182, 212, 0));
    border-radius: 16px 0 0 16px;
}

.swipe-hint-right {
    right: 0;
    background: linear-gradient(to left, rgba(6, 182, 212, 0.1), rgba(6, 182, 212, 0));
    border-radius: 0 16px 16px 0;
}

.tap-toggle-zone {
    position: absolute;
    top: 0;
    left: 36px;
    right: 36px;
    bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    background: transparent;
    transition: background 0.18s ease-out;
    -webkit-tap-highlight-color: transparent;
}

.tap-toggle-zone i {
    font-size: 4.5rem;
    color: rgba(199, 210, 254, 0.05);
    transition: color 0.18s ease-out, transform 0.18s ease-out;
    pointer-events: none;
}

.tap-toggle-zone:hover i {
    color: rgba(199, 210, 254, 0.28);
}

.tap-toggle-zone:active {
    background: radial-gradient(circle, rgba(129, 140, 248, 0.12), transparent 60%);
}

.tap-toggle-zone:active i {
    color: rgba(199, 210, 254, 0.55);
    transform: scale(0.94);
}

.transcript-content {
    position: relative;
    z-index: 3;
    pointer-events: none;
}

.step-card:hover {
    border-color: rgba(6, 182, 212, 0.3);
    transform: translateY(-4px);
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.875rem;
}

.step-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.step-connector {
    display: none;
}

@media (min-width: 768px) {
    .step-connector {
        display: flex;
        align-items: center;
        justify-content: center;
        color: rgba(255, 255, 255, 0.2);
        font-size: 1.5rem;
        padding: 0 0.5rem;
    }
}

/* ===== Benefits ===== */
.benefits-section {
    background: var(--surface);
    position: relative;
    overflow: hidden;
}

.bridge-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
}

.bridge-node {
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    min-width: 200px;
    transition: all 0.3s;
}

.bridge-node:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.bridge-arrow {
    color: #CBD5E1;
    font-size: 1.5rem;
    padding: 0 1rem;
}

.bridge-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
}

.bridge-example {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

@media (max-width: 767px) {
    .bridge-arrow {
        transform: rotate(90deg);
        padding: 0.5rem 0;
    }
}

/* ===== Footer ===== */
.footer-dark {
    background: var(--dark);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ===== HTMX Indicator ===== */
.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
    display: inline-block;
}

/* ===== Form Overrides ===== */
.form-control:focus, .btn-check:checked + .btn {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.15);
}

.input-group-text {
    background: var(--surface);
    border-color: #E2E8F0;
}

.form-control {
    border-color: #E2E8F0;
}

/* ===== Listening Page ===== */

.listening-page input[name="learningMode"]:checked + label {
    background: linear-gradient(135deg, var(--primary), var(--accent)) !important;
    color: #fff !important;
    border-color: transparent !important;
}

.listening-page .speed-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--accent)) !important;
    color: #fff !important;
    border-color: transparent !important;
}

.listening-page .form-check-input {
    background-color: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.2);
}

.listening-page .form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

.listening-page .form-switch .form-check-input {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

.listening-page .form-switch .form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

.listening-page ::-webkit-scrollbar {
    width: 4px;
}
.listening-page ::-webkit-scrollbar-track {
    background: transparent;
}
.listening-page ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
.listening-page ::-webkit-scrollbar-thumb:hover {
    background: rgba(6, 182, 212, 0.4);
}

.listening-page .step-card:hover {
    transform: none;
    border-color: rgba(255, 255, 255, 0.06);
}

@media (min-width: 768px) {
    .listening-page .step-card {
        padding: 1rem 1.25rem !important;
    }
}

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

.btn-player-nav {
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 40px;
    height: 40px;
}

.btn-player-nav:hover {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.8);
}

.btn-glass-sm {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.75rem;
}

.waveform-area {
    height: 50px;
    background: rgba(6, 182, 212, 0.05);
    border: 1px solid rgba(6, 182, 212, 0.1);
}

.waveform-area i {
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--accent), #818CF8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.segment-text {
    color: #F1F5F9;
    font-size: 1.05rem;
    line-height: 1.6;
}

.segment-translation {
    color: var(--accent-light);
    font-size: 0.9rem;
    line-height: 1.5;
}

.label-muted {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
}

/* QuotaBadge sits in the light-background curation section on Index; */
/* override the dark-context white tones (incl. the Pro-tier inline color) */
/* so the badge text stays readable. */
.quota-on-light .label-muted {
    color: rgba(15, 23, 42, 0.7) !important;
}

/* ===== Content Preview Card (Loading State) ===== */

.preview-card {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.5rem;
    max-width: 680px;
    margin: 0 auto;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    /* entrance animation start state */
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.preview-card--visible {
    opacity: 1;
    transform: translateY(0);
}

/* Topic summary */
.preview-card__topic {
    margin-bottom: 1.25rem;
}

.preview-card__topic-label {
    display: inline-block;
    background: rgba(6, 182, 212, 0.12);
    color: var(--accent);
    border: 1px solid rgba(6, 182, 212, 0.25);
    padding: 0.2rem 0.7rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    margin-bottom: 0.6rem;
}

.preview-card__topic-text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* Divider */
.preview-card__divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin: 1rem 0;
}

/* Vocabulary section */
.preview-card__vocab-label {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
}

.preview-card__vocab-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.preview-card__vocab-item {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.4rem 0.6rem;
}

.preview-card__vocab-word {
    color: #F1F5F9;
    font-weight: 700;
    font-size: 0.9rem;
}

.preview-card__vocab-meaning {
    display: inline-block;
    background: rgba(79, 70, 229, 0.2);
    color: #818CF8;
    border: 1px solid rgba(79, 70, 229, 0.25);
    padding: 0.1rem 0.55rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.preview-card__vocab-example {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.78rem;
    font-style: italic;
    width: 100%;
    margin: 0;
    padding-left: 0.1rem;
}

/* Transcript toggle */
.preview-card__transcript-toggle {
    list-style: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.2s;
}

.preview-card__transcript-toggle::-webkit-details-marker { display: none; }
.preview-card__transcript-toggle::marker { display: none; }

.preview-card__transcript-toggle::before {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 4px 0 4px 6px;
    border-color: transparent transparent transparent rgba(255,255,255,0.35);
    transition: transform 0.2s;
}

details[open] .preview-card__transcript-toggle::before {
    transform: rotate(90deg);
}

.preview-card__transcript-details {
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 0.15rem 0.5rem;
    margin-top: 0.75rem;
}

.preview-card__transcript-body {
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.preview-card__transcript-text {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.82rem;
    line-height: 1.65;
    margin: 0;
    white-space: pre-wrap;
}

.preview-card__transcript-warning {
    margin-top: 0.75rem;
    color: rgba(255, 200, 100, 0.55);
    font-size: 0.72rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* Mobile: full width, slight horizontal padding */
@media (max-width: 575px) {
    .preview-card {
        border-radius: 12px;
        padding: 1.1rem 1rem;
        margin: 0 0.25rem;
    }

    .preview-card__vocab-item {
        flex-direction: column;
        gap: 0.25rem;
    }
}

/* ===== Content Preview — Listening Page Panel ===== */

.preview-gradient-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: linear-gradient(135deg, var(--accent), #818CF8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.preview-toggle-btn {
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.75rem;
    padding: 0.3rem 0.75rem;
    transition: all 0.2s;
}
.preview-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.6);
}
.preview-toggle-btn[aria-expanded="true"] {
    background: rgba(6, 182, 212, 0.08);
    border-color: rgba(6, 182, 212, 0.2);
    color: rgba(255, 255, 255, 0.65);
}
.preview-toggle-btn[aria-expanded="true"] .preview-chevron {
    transform: rotate(180deg);
}
.preview-chevron {
    transition: transform 0.25s;
}

.listening-page .preview-vocab-item {
    border-radius: 6px;
    transition: background 0.15s;
}
.listening-page .preview-vocab-item:hover {
    background: rgba(6, 182, 212, 0.06);
}

.listening-page #listeningPreviewPanel .step-card {
    transform: none !important;
}

/* ---------- Segment AI Assist panel ---------- */
.assist-panel {
    margin-top: 0.5rem;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(6, 182, 212, 0.18);
    border-radius: 14px;
    overflow: hidden;
    animation: assist-fade-in 0.3s ease-out;
}
@keyframes assist-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
.assist-panel--error {
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.82rem;
    background: rgba(248, 113, 113, 0.06);
    border-color: rgba(248, 113, 113, 0.2);
}
.assist-header {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.assist-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: rgba(6, 182, 212, 0.14);
    margin-right: 0.5rem;
}
.assist-badge i {
    font-size: 0.65rem;
    color: var(--accent);
}
.assist-close {
    font-size: 0.55rem;
    opacity: 0.3;
}
.assist-close:hover {
    opacity: 0.7;
}
.assist-section {
    padding: 0.75rem 0.9rem;
}
.assist-section-label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.45rem;
}
.assist-section-label i {
    font-size: 0.7rem;
}
.assist-rationale {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.88rem;
    line-height: 1.6;
}
.assist-empty {
    margin: 0;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.82rem;
}
.assist-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
    margin: 0 0.9rem;
}
.vocab-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.vocab-card {
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.vocab-head {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 0.3rem;
}
.vocab-word {
    color: #F1F5F9;
    font-size: 0.9rem;
    font-weight: 600;
}
.vocab-sep {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.75rem;
}
.vocab-meaning {
    color: var(--accent-light);
    font-size: 0.82rem;
}
.vocab-context {
    margin: 0 0 0.3rem 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.8rem;
    line-height: 1.5;
}
.vocab-examples {
    margin: 0;
    padding-left: 1.1rem;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.78rem;
    line-height: 1.5;
}
.vocab-examples li {
    margin-bottom: 0.15rem;
}
.htmx-indicator {
    display: none;
}
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
    display: inline-block;
}
.assist-collapse {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    width: 100%;
    padding: 0.6rem 0.85rem;
    margin: 0;
    background: rgba(255, 255, 255, 0.025);
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.assist-collapse:hover,
.assist-collapse:focus {
    background: rgba(6, 182, 212, 0.08);
    color: rgba(255, 255, 255, 0.8);
    outline: none;
}
.assist-collapse i {
    font-size: 0.75rem;
}

/* ---------- Gesture hints inline ---------- */
.gesture-hints-inline {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}
.gesture-hints-inline span {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.2);
    letter-spacing: 0.04em;
    pointer-events: none;
    user-select: none;
}
.gesture-hints-inline i {
    font-size: 0.7rem;
}

/* ===== Hero Trust Row ===== */
.hero-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem 1.25rem;
    font-size: 0.83rem;
    color: rgba(255, 255, 255, 0.72);
}
.hero-trust-row span { white-space: nowrap; }

/* ===== Personas Section ===== */
.personas-section {
    background: linear-gradient(180deg, var(--dark) 0%, #111836 100%);
    color: #fff;
}
.personas-section .section-title {
    color: #fff;
}
.persona-card {
    height: 100%;
    padding: 1.5rem 1.25rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.persona-card:hover {
    transform: translateY(-3px);
    border-color: rgba(6, 182, 212, 0.35);
    background: rgba(255, 255, 255, 0.05);
}
.persona-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 0.85rem;
}
.persona-title {
    color: #fff;
    font-weight: 700;
    margin-bottom: 0.35rem;
    font-size: 1rem;
}
.persona-desc {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
}

/* ===== Why Loop Section ===== */
.why-loop-section {
    background: linear-gradient(180deg, #0d1330 0%, var(--dark) 100%);
    color: #fff;
}
.loop-step-card {
    height: 100%;
    padding: 1.5rem 1.25rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.07);
    transition: transform .2s ease;
}
.loop-step-card:hover { transform: translateY(-3px); }
.loop-step-card--accent {
    border-color: rgba(6, 182, 212, 0.45);
    background: rgba(6, 182, 212, 0.06);
    box-shadow: 0 0 24px rgba(6, 182, 212, 0.08);
}
.loop-step-num {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.15);
    color: #a5b4fc;
    font-weight: 700;
    font-size: 0.82rem;
    margin-bottom: 0.85rem;
    letter-spacing: 0.02em;
}
.loop-step-num--accent {
    background: rgba(6, 182, 212, 0.18);
    color: var(--accent);
}
.loop-step-title {
    color: #fff;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}
.loop-step-desc {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.85rem;
    line-height: 1.55;
    margin: 0;
}

.why-loop-vs .vs-card {
    padding: 1.5rem 1.5rem;
    border-radius: 16px;
    height: 100%;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.07);
}
.vs-card--bad { opacity: 0.78; }
.vs-card--good {
    border-color: rgba(16, 185, 129, 0.35);
    background: rgba(16, 185, 129, 0.05);
}
.vs-tag {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}
.vs-card--bad .vs-tag { color: rgba(255, 255, 255, 0.5); }
.vs-card--good .vs-tag { color: #34D399; }
.vs-list {
    list-style: none;
    padding: 0;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.9rem;
}
.vs-list li {
    padding: 0.4rem 0 0.4rem 1.4rem;
    position: relative;
}
.vs-card--bad .vs-list li::before {
    content: "·";
    position: absolute;
    left: 0.5rem;
    color: rgba(255, 255, 255, 0.35);
    font-weight: 700;
}
.vs-card--good .vs-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #34D399;
    font-weight: 700;
}

/* ===== FAQ Section ===== */
.faq-section {
    background: var(--surface);
}
.faq-accordion .accordion-item {
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 14px !important;
    margin-bottom: 12px;
    overflow: hidden;
}
.faq-accordion .accordion-button {
    background: #fff;
    color: var(--dark);
    font-weight: 600;
    font-size: 1rem;
    padding: 1.1rem 1.25rem;
    box-shadow: none;
}
.faq-accordion .accordion-button:not(.collapsed) {
    background: #F1F5F9;
    color: var(--dark);
    box-shadow: none;
}
.faq-accordion .accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.12);
}
.faq-accordion .accordion-body {
    padding: 0.25rem 1.25rem 1.25rem;
    color: #475569;
    font-size: 0.92rem;
    line-height: 1.65;
}

/* ===== Final CTA Section ===== */
.final-cta-section {
    background: linear-gradient(135deg, var(--dark) 0%, #1a1a3e 50%, #0d2137 100%);
    color: #fff;
}
.final-cta-card {
    padding: 3rem 1.5rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(6, 182, 212, 0.25);
    box-shadow: 0 0 40px rgba(6, 182, 212, 0.1);
}
.final-cta-guarantee {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem 1.5rem;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.62);
    margin-top: 0.5rem;
}

/* ===== Footer (extended) ===== */
.footer-col-title {
    color: #fff;
    font-weight: 700;
    font-size: 0.88rem;
    margin-bottom: 0.85rem;
    letter-spacing: 0.02em;
}
.footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-list li { margin-bottom: 0.5rem; }
.footer-list a {
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    font-size: 0.87rem;
    transition: color .15s ease;
}
.footer-list a:hover { color: var(--accent); }
.footer-divider {
    border-color: rgba(255, 255, 255, 0.08);
    margin: 1rem 0 1.25rem;
}

/* ===== Mobile polish for new sections ===== */
@media (max-width: 576px) {
    .final-cta-card { padding: 2rem 1.25rem; border-radius: 18px; }
    .persona-card, .loop-step-card { padding: 1.25rem 1rem; }
    .hero-trust-row { justify-content: center; }
}

/* ===== Admin Layout ===== */
.admin-shell {
    display: flex;
    min-height: calc(100vh - 70px);
    padding-top: 70px; /* fixed-top navbar height */
}

.admin-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--dark-light);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    padding: 1.5rem 0;
    position: sticky;
    top: 70px;
    align-self: flex-start;
    height: calc(100vh - 70px);
    overflow-y: auto;
}

.admin-sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 1.25rem 1rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--accent);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0 0.75rem;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.92rem;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.admin-nav-link:hover {
    background: rgba(6, 182, 212, 0.08);
    color: var(--accent-light);
}

.admin-nav-link.active {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent);
    font-weight: 600;
}

.admin-nav-link i {
    font-size: 1rem;
    width: 1.25rem;
    text-align: center;
}

.admin-content {
    flex: 1;
    min-width: 0;
    padding: 2rem 2rem 4rem;
    color: #e2e8f0;
}

@media (max-width: 767px) {
    .admin-shell {
        flex-direction: column;
    }
    .admin-sidebar {
        width: 100%;
        height: auto;
        position: static;
        padding: 1rem 0;
    }
    .admin-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .admin-content {
        padding: 1.25rem 1rem 2.5rem;
    }
}
