:root {
    --navy-950: #09172a;
    --navy-900: #0f2542;
    --navy-800: #17365e;
    --blue-700: #1d4ed8;
    --blue-600: #2563eb;
    --blue-500: #3b82f6;
    --blue-100: #dbeafe;
    --blue-50: #eff6ff;
    --coral-600: #dc2626;
    --amber-600: #d97706;
    --amber-100: #fef3c7;
    --amber-50: #fffbeb;
    --emerald-600: #059669;
    --emerald-100: #d1fae5;
    --emerald-50: #ecfdf5;
    --purple-600: #7c3aed;
    --purple-100: #ede9fe;
    --purple-50: #f5f3ff;
    --bg-page: #f3f6fb;
    --bg-card: #ffffff;
    --border-light: #e2e8f0;
    --border-strong: #cbd5e1;
    --text-main: #0f172a;
    --text-secondary: #334155;
    --text-muted: #94a3b8;
    --text-subtle: #64748b;
    --radius-xl: 20px;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 2px 10px rgba(15, 23, 42, 0.045);
    --shadow-md: 0 10px 26px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 18px 40px rgba(15, 23, 42, 0.13);
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Lexend', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: var(--text-main);
    background-color: var(--bg-page);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.section-title,
.nav-link,
.brand-mark,
.footer-heading,
.footer-brand,
.step-pill-title,
.kpi-value {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.3;
    margin-top: 0;
}

a {
    color: var(--blue-700);
    text-decoration: none;
    transition: color 0.18s ease, transform 0.2s ease, box-shadow 0.2s ease, border-color 0.18s ease, background-color 0.18s ease;
}

img {
    max-width: 100%;
    display: block;
}

.ui-svg-icon {
    flex-shrink: 0;
    vertical-align: middle;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Topbar */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 16px rgba(15, 23, 42, 0.06);
}

.topbar {
    background: var(--navy-950);
    color: #e2e8f0;
    font-size: 0.85rem;
    padding: 7px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.topbar-left, .topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.us-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #dc2626, #2563eb);
    color: #fff;
    font-weight: 600;
    padding: 3px 11px;
    border-radius: 999px;
    font-size: 0.78rem;
    letter-spacing: 0.2px;
}

.db-sync-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(16, 185, 129, 0.16);
    border: 1px solid rgba(16, 185, 129, 0.38);
    color: #6ee7b7;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 600;
}

.speed-control {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: rgba(255, 255, 255, 0.08);
    padding: 3px 6px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.speed-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    color: #cbd5e1;
    padding: 0 5px;
}

.speed-btn {
    border: none;
    background: transparent;
    color: #cbd5e1;
    font-family: inherit;
    font-size: 0.76rem;
    padding: 3px 9px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.15s;
}

.speed-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
}

.speed-btn.active {
    background: var(--blue-600);
    color: #fff;
    font-weight: 600;
}

.streak-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(245, 158, 11, 0.18);
    border: 1px solid rgba(245, 158, 11, 0.45);
    color: #fde68a;
    padding: 3px 12px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.8rem;
}

.streak-pill:hover {
    background: rgba(245, 158, 11, 0.3);
    color: #fff;
}

.navbar {
    background: transparent;
    border-bottom: 1px solid var(--border-light);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
    gap: 14px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--navy-950);
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--navy-900), var(--blue-600));
    color: #fff;
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: -0.5px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.22);
}

.brand-mark span {
    color: #fbbf24;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-text strong {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.06rem;
    font-weight: 800;
    color: var(--navy-950);
}

.brand-text small {
    font-size: 0.78rem;
    color: var(--text-subtle);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 13px;
    border-radius: 10px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.89rem;
}

.nav-link:hover {
    background: var(--blue-50);
    color: var(--blue-700);
}

.nav-link.active {
    background: var(--navy-900);
    color: #fff;
    box-shadow: 0 4px 12px rgba(15, 37, 66, 0.18);
}

.nav-badge {
    background: var(--coral-600);
    color: #fff;
    font-size: 0.71rem;
    padding: 1px 7px;
    border-radius: 999px;
    font-weight: 700;
}

.mobile-menu-btn {
    display: none;
    background: var(--blue-50);
    color: var(--navy-900);
    border: 1px solid var(--blue-100);
    border-radius: 8px;
    padding: 8px 12px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    cursor: pointer;
}

/* Main Content */
.site-main {
    padding: 26px 0 60px;
    min-height: calc(100vh - 260px);
}

/* Executive Visual Hero Split */
.hero-card {
    background: linear-gradient(135deg, var(--navy-950) 0%, var(--navy-900) 55%, #1e3a8a 100%);
    color: #fff;
    border-radius: var(--radius-xl);
    padding: 32px;
    margin-bottom: 22px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.hero-card::after {
    content: '';
    position: absolute;
    right: -120px;
    top: -120px;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.24) 0%, rgba(59, 130, 246, 0) 70%);
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 28px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 14px;
}

.hero-title {
    font-size: 1.92rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: #fff;
    letter-spacing: -0.3px;
}

.hero-subtitle {
    color: #dbeafe;
    font-size: 0.99rem;
    margin: 0 0 22px;
    max-width: 670px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-visual-panel {
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.hero-scene-photo {
    position: relative;
    height: 195px;
    overflow: hidden;
}

.hero-scene-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-scene-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(9, 23, 42, 0.12) 0%, rgba(9, 23, 42, 0.86) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px 18px;
}

.hero-progress-body {
    padding: 16px 18px 18px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.progress-track {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #fbbf24, #34d399);
    border-radius: 999px;
    transition: width 0.4s ease;
}

.progress-track-light {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill-blue {
    height: 100%;
    background: linear-gradient(90deg, var(--blue-600), #10b981);
    border-radius: 999px;
}

/* KPI Metric Strip */
.kpi-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 15px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow-sm);
}

.kpi-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kpi-icon-blue { background: var(--blue-50); color: var(--blue-700); }
.kpi-icon-amber { background: var(--amber-50); color: var(--amber-600); }
.kpi-icon-emerald { background: var(--emerald-50); color: var(--emerald-600); }
.kpi-icon-purple { background: var(--purple-50); color: var(--purple-600); }

.kpi-value {
    font-size: 1.32rem;
    font-weight: 800;
    color: var(--navy-950);
    line-height: 1.15;
}

.kpi-label {
    font-size: 0.83rem;
    color: var(--text-subtle);
    margin-top: 2px;
}

/* Visual Media Cards (16:9 Realistic US Simulation Photos) */
a.media-card-link {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
    height: 100%;
}

a.media-card-link:hover {
    transform: translateY(-4px);
    border-color: var(--blue-600);
    box-shadow: var(--shadow-md);
    color: var(--text-main);
}

.media-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--navy-900);
}

.media-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

a.media-card-link:hover .media-thumb img {
    transform: scale(1.05);
}

.media-thumb-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(9, 23, 42, 0.82);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 0.76rem;
    font-weight: 600;
    padding: 4px 11px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.media-thumb-right {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--navy-950);
    font-size: 0.76rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
}

.media-body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Scene Banner inside Lesson & Speaking Studio */
.scene-banner {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 215px;
    margin-bottom: 18px;
    background: var(--navy-950);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: flex-end;
}

.scene-banner-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 32%;
}

.scene-banner-overlay {
    position: relative;
    z-index: 1;
    width: 100%;
    background: linear-gradient(90deg, rgba(9, 23, 42, 0.93) 0%, rgba(9, 23, 42, 0.76) 55%, rgba(9, 23, 42, 0.35) 100%);
    padding: 24px 26px;
    color: #fff;
}

/* 4-Step Guided Lesson Stepper Bar */
.stepper-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    padding: 10px;
    margin-bottom: 22px;
    box-shadow: var(--shadow-sm);
}

.stepper-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f8fafc;
    color: var(--text-main);
    border: 1px solid transparent;
}

.stepper-item:hover {
    background: var(--blue-50);
    border-color: var(--blue-100);
    color: var(--blue-700);
}

.stepper-num {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--navy-900);
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-pill-title {
    font-size: 0.85rem;
    font-weight: 700;
    display: block;
}

.step-pill-sub {
    font-size: 0.74rem;
    color: var(--text-subtle);
    display: block;
}

/* Daily Pipeline Step Cards on Homepage */
.pipeline-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 0.9rem;
    background: var(--navy-900);
    color: #fff;
}

/* SVG Visual Simulation Diagram Box */
.visual-sim-box {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 14px;
    padding: 14px 16px;
    margin: 16px 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.visual-sim-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    font-size: 0.92rem;
    color: var(--navy-950);
}

.sim-chip {
    background: var(--blue-50);
    color: var(--blue-700);
    border: 1px solid var(--blue-100);
    font-size: 0.74rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
}

.sim-chip-amber {
    background: var(--amber-50);
    color: var(--amber-600);
    border-color: var(--amber-100);
}

.sim-svg {
    width: 100%;
    height: auto;
    display: block;
}

/* Scenario Sidebar Thumb List */
.scenario-nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 8px 10px;
    border-radius: 11px;
    background: #f8fafc;
    border: 1px solid var(--border-light);
    color: var(--text-main);
}

.scenario-nav-item:hover {
    border-color: var(--blue-600);
    background: var(--blue-50);
}

.scenario-nav-item.active {
    background: var(--navy-900);
    border-color: var(--navy-900);
    color: #fff;
}

.scenario-mini-thumb {
    width: 54px;
    height: 38px;
    border-radius: 7px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 11px;
    font-family: 'Lexend', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.18s ease;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--blue-600);
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    background: var(--blue-700);
    color: #fff;
    transform: translateY(-1px);
}

.btn-gold {
    background: #f59e0b;
    color: var(--navy-950);
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.btn-gold:hover {
    background: #fbbf24;
    color: var(--navy-950);
    transform: translateY(-1px);
}

.btn-emerald {
    background: var(--emerald-600);
    color: #fff;
}

.btn-emerald:hover {
    background: #047857;
    color: #fff;
}

.btn-danger {
    background: var(--coral-600);
    color: #fff;
}

.btn-outline {
    background: #fff;
    color: var(--navy-900);
    border-color: var(--border-strong);
}

.btn-outline:hover {
    border-color: var(--blue-600);
    color: var(--blue-700);
    background: var(--blue-50);
}

.btn-outline-light {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.btn-sm {
    padding: 7px 13px;
    font-size: 0.86rem;
    border-radius: 9px;
}

/* Section Headers */
.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.section-eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--blue-700);
    background: var(--blue-50);
    border: 1px solid var(--blue-100);
    padding: 2px 10px;
    border-radius: 999px;
    margin-bottom: 6px;
}

.section-title {
    font-size: 1.42rem;
    font-weight: 800;
    color: var(--navy-950);
    margin-bottom: 4px;
}

.section-desc {
    margin: 0;
    color: var(--text-subtle);
    font-size: 0.96rem;
}

/* Clickable Card Boxes (Strictly following AGENTS.md Rule 2) */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-sm);
}

a.card-box-link {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
    height: 100%;
}

a.card-box-link:hover {
    transform: translateY(-3px);
    border-color: var(--blue-600);
    box-shadow: var(--shadow-md);
    color: var(--text-main);
}

.card-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.79rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 11px;
    width: fit-content;
}

.tag-blue { background: var(--blue-50); color: var(--blue-700); border: 1px solid var(--blue-100); }
.tag-emerald { background: var(--emerald-50); color: var(--emerald-600); border: 1px solid var(--emerald-100); }
.tag-amber { background: var(--amber-50); color: var(--amber-600); border: 1px solid var(--amber-100); }
.tag-purple { background: var(--purple-50); color: var(--purple-600); border: 1px solid var(--purple-100); }

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--navy-950);
    margin-bottom: 8px;
}

.card-text {
    color: var(--text-secondary);
    font-size: 0.94rem;
    margin: 0 0 14px;
}

.card-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 0.89rem;
    color: var(--blue-700);
    margin-top: auto;
}

/* Sticky Sidebar Layout (Strictly following AGENTS.md Rule 3) */
.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 345px;
    gap: 26px;
    align-items: stretch;
}

.sidebar-col {
    position: relative;
}

.sidebar-inner {
    position: sticky;
    top: 96px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* LEGO Grammar Formula Blocks */
.formula-banner {
    background: linear-gradient(135deg, #eff6ff, #f8fafc);
    border: 1px solid #bfdbfe;
    border-left: 5px solid var(--blue-600);
    border-radius: 12px;
    padding: 16px 18px;
    margin: 14px 0;
}

.formula-label {
    font-size: 0.78rem;
    letter-spacing: 0.4px;
    color: var(--blue-700);
    font-weight: 700;
    display: block;
    margin-bottom: 4px;
}

.formula-code {
    font-weight: 700;
    color: var(--navy-950);
    font-size: 1.04rem;
}

.compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 14px 0;
}

.compare-wrong {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 14px;
}

.compare-right {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 12px;
    padding: 14px;
}

.ear-box {
    background: var(--amber-50);
    border: 1px solid #fde68a;
    border-left: 5px solid #f59e0b;
    border-radius: 12px;
    padding: 16px 18px;
    margin: 14px 0;
}

/* Sentence Rows with Audio & Save Flashcard */
.sentence-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sentence-item {
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 15px 18px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    transition: border-color 0.15s, background-color 0.15s;
}

.sentence-item:hover {
    border-color: #93c5fd;
    background: #fff;
}

.sentence-en {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--navy-950);
    margin-bottom: 3px;
}

.sentence-spoken {
    font-size: 0.9rem;
    color: #b45309;
    font-weight: 500;
    margin-bottom: 4px;
}

.sentence-vi {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.sentence-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.icon-btn {
    border: 1px solid var(--border-strong);
    background: #fff;
    color: var(--navy-900);
    border-radius: 8px;
    padding: 7px 11px;
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s;
}

.icon-btn:hover {
    background: var(--blue-50);
    border-color: var(--blue-600);
    color: var(--blue-700);
}

.icon-btn.playing {
    background: var(--blue-600);
    color: #fff;
    border-color: var(--blue-600);
}

/* Microphone & AI Speaking Box */
.mic-studio {
    background: linear-gradient(180deg, #ffffff 0%, #f0f7ff 100%);
    border: 2px solid #bfdbfe;
    border-radius: 16px;
    padding: 22px;
}

.mic-record-btn {
    background: var(--coral-600);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 13px 26px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.98rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 6px 18px rgba(220, 38, 38, 0.28);
    transition: all 0.2s;
}

.mic-record-btn:hover {
    transform: scale(1.02);
    background: #b91c1c;
}

.mic-record-btn.recording {
    background: #1e293b;
    animation: pulseMic 1.3s infinite;
}

@keyframes pulseMic {
    0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.55); }
    70% { box-shadow: 0 0 0 14px rgba(220, 38, 38, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

.ai-feedback-card {
    background: #fff;
    border: 1px solid #93c5fd;
    border-radius: 14px;
    padding: 18px;
    margin-top: 16px;
}

.score-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.score-pill {
    background: var(--blue-50);
    border: 1px solid var(--blue-100);
    color: var(--navy-950);
    padding: 6px 12px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.88rem;
}

/* Word Scramble LEGO Builder */
.word-bank, .word-dropzone {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 52px;
    padding: 12px;
    border-radius: 12px;
    border: 1.5px dashed var(--border-strong);
    background: #f8fafc;
    margin-bottom: 12px;
}

.word-dropzone {
    background: #fff;
    border-style: solid;
    border-color: #93c5fd;
}

.word-chip {
    background: #fff;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    padding: 7px 13px;
    font-weight: 600;
    font-size: 0.96rem;
    cursor: pointer;
    user-select: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.word-chip:hover {
    border-color: var(--blue-600);
    background: var(--blue-50);
}

.word-chip.placed {
    background: var(--navy-900);
    color: #fff;
    border-color: var(--navy-900);
}

/* Roadmap 365 Grid */
.filter-bar {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 22px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.form-control {
    padding: 10px 14px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.96rem;
    color: var(--text-main);
    background: #fff;
}

.form-control:focus {
    outline: none;
    border-color: var(--blue-600);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.days-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

a.day-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 14px;
    padding: 16px 18px;
    color: var(--text-main);
    position: relative;
    box-shadow: var(--shadow-sm);
}

a.day-card:hover {
    border-color: var(--blue-600);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

a.day-card.is-completed {
    border-color: #6ee7b7;
    background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
}

a.day-card.is-today {
    border: 2px solid var(--blue-600);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.15);
}

.day-num-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.day-num {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--blue-700);
}

/* Roleplay Chat Window */
.chat-box {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 540px;
    overflow-y: auto;
    padding: 18px;
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: 14px;
    margin-bottom: 16px;
}

.chat-turn {
    max-width: 86%;
    padding: 14px 16px;
    border-radius: 14px;
}

.chat-turn.ai {
    align-self: flex-start;
    background: #fff;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.chat-turn.user {
    align-self: flex-end;
    background: var(--navy-900);
    color: #fff;
}

.coach-inline-note {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--emerald-50);
    border: 1px solid var(--emerald-100);
    color: #065f46;
    font-size: 0.9rem;
}

/* Leitner 5-Box SRS Bar */
.leitner-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 22px;
}

.leitner-box {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 12px 14px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.leitner-box strong {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.25rem;
    color: var(--navy-950);
}

.leitner-box span {
    font-size: 0.78rem;
    color: var(--text-subtle);
}

/* Flashcard Flip Card */
.flashcard-stage {
    background: linear-gradient(145deg, #ffffff, #f1f5f9);
    border: 2px solid #cbd5e1;
    border-radius: 20px;
    padding: 36px 28px;
    text-align: center;
    min-height: 290px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-md);
}

/* Global Audio Toast */
.audio-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1200;
    background: var(--navy-950);
    color: #fff;
    padding: 10px 16px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-lg);
    font-size: 0.9rem;
}

.audio-toast[hidden] {
    display: none !important;
}

.toast-stop-btn {
    background: #ef4444;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

/* Footer (Strictly following AGENTS.md Rule 1: color: var(--text-muted)) */
.ftco-footer {
    background: var(--navy-950);
    color: var(--text-muted);
    padding: 44px 0 26px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.1fr;
    gap: 32px;
    margin-bottom: 28px;
}

.footer-brand {
    color: #fff;
    font-weight: 800;
    font-size: 1.15rem;
    margin-bottom: 10px;
}

.footer-heading {
    color: #e2e8f0;
    font-size: 1rem;
    margin-bottom: 12px;
}

.footer-desc, .footer-tips {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin: 0;
}

.footer-tips {
    padding-left: 18px;
}

.footer-tips li {
    margin-bottom: 6px;
}

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

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.93rem;
}

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 1040px) {
    .hero-grid,
    .layout-with-sidebar,
    .footer-grid,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    .kpi-strip,
    .stepper-bar {
        grid-template-columns: repeat(2, 1fr);
    }
    .sidebar-inner {
        position: static;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }
    .main-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        padding: 12px 0;
    }
    .main-nav.open {
        display: flex;
    }
    .navbar-inner {
        flex-wrap: wrap;
        padding: 10px 20px;
    }
    .grid-2,
    .compare-grid,
    .kpi-strip,
    .stepper-bar {
        grid-template-columns: 1fr;
    }
    .leitner-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-card {
        padding: 22px;
    }
    .hero-title {
        font-size: 1.5rem;
    }
    .sentence-item {
        flex-direction: column;
    }
    .scene-banner-overlay {
        background: rgba(9, 23, 42, 0.84);
        padding: 18px;
    }
}

/* =========================================================
   MOBILE APP DOWNLOAD (APK) & HEADER PILLS
   ========================================================= */
.app-topbar-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #059669, #10b981);
    color: #fff;
    padding: 3px 11px;
    border-radius: 999px;
    font-size: 0.77rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.28);
}

.app-topbar-pill:hover {
    background: linear-gradient(135deg, #047857, #059669);
    color: #fff;
    transform: translateY(-1px);
}

.app-topbar-active {
    background: rgba(59, 130, 246, 0.22);
    border: 1px solid rgba(96, 165, 250, 0.45);
    color: #bfdbfe;
    box-shadow: none;
}

.nav-link.nav-app-cta {
    background: var(--amber-50);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.4);
    font-weight: 700;
}

.nav-link.nav-app-cta:hover,
.nav-link.nav-app-cta.active {
    background: var(--navy-900);
    color: #fbbf24;
    border-color: var(--navy-900);
}

.app-promo-banner {
    background: linear-gradient(135deg, #09172a 0%, #102a52 62%, #1d4ed8 100%);
    border-radius: var(--radius-xl);
    padding: 24px 28px;
    color: #fff;
    margin-bottom: 34px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.app-banner-grid {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 22px;
}

.app-icon-showcase {
    width: 78px;
    height: 78px;
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
    border: 2px solid rgba(245, 158, 11, 0.5);
    flex-shrink: 0;
}

.app-qr-mini {
    background: #fff;
    padding: 8px;
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
    flex-shrink: 0;
}

.app-qr-mini img {
    width: 96px;
    height: 96px;
    display: block;
    margin: 0 auto 4px;
}

.app-qr-mini span {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--navy-950);
}

.app-hero-box {
    background: linear-gradient(135deg, #09172a 0%, #0f2342 55%, #1e40af 100%);
    color: #fff;
    border-radius: var(--radius-xl);
    padding: 30px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-lg);
}

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

.app-spec-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px dashed var(--border-light);
    font-size: 0.9rem;
}

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

.install-step-card {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.install-step-num {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: var(--navy-900);
    color: #fbbf24;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.checksum-box {
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 10px 12px;
    font-family: Consolas, Monaco, monospace;
    font-size: 0.76rem;
    color: var(--text-secondary);
    word-break: break-all;
    margin-top: 10px;
}

@media (max-width: 920px) {
    .app-banner-grid {
        grid-template-columns: 1fr;
        text-align: left;
    }
    .app-qr-mini {
        display: none;
    }
}
