/* ==========================================================================
   UKLICENCE.COM - Minimal Gray Dual Translation System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
    /* Light Mode Palette (Default) */
    --bg-surface: #f9f9fc;
    --bg-card: #ffffff;
    --bg-tertiary: #f3f3f6;
    
    --text-primary: #000e27;
    --text-secondary: #44474f;
    --text-muted: #747780;
    
    --brand-primary: #000e27;
    --brand-secondary: #0050cc;
    --brand-secondary-hover: #003fa4;
    --brand-tint: #d7e3ff;
    --brand-cyan: #0284c7;
    
    --border-color: #e2e2e5;
    --border-highlight: #c4c6d0;
    
    --shadow-card: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-hover: 0 8px 24px rgba(0, 35, 78, 0.12);
    
    --header-bg: rgba(249, 249, 252, 0.95);
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    /* Dark Mode Palette */
    --bg-surface: #000e27;
    --bg-card: #001a3a;
    --bg-tertiary: #0a264a;
    
    --text-primary: #f9f9fc;
    --text-secondary: #adc7fb;
    --text-muted: #728bbc;
    
    --brand-primary: #ffffff;
    --brand-secondary: #2563eb;
    --brand-secondary-hover: #3b82f6;
    
    --border-color: rgba(255, 255, 255, 0.12);
    --border-highlight: rgba(255, 255, 255, 0.25);
    
    --shadow-card: 0 4px 12px rgba(0,0,0,0.3);
    --shadow-hover: 0 8px 24px rgba(0,0,0,0.5);
    
    --header-bg: rgba(0, 14, 39, 0.95);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-surface);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.01em;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    outline: none;
}

/* ==========================================================================
   SLIM HEADER (100% Full Width)
   ========================================================================== */
.site-header {
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.header-inner {
    width: 100%;
    padding: 0.5rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.header-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.header-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.nav-categories-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-tertiary);
    padding: 0.3rem 0.5rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
}

.nav-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-full);
    transition: all 0.2s ease;
}

.nav-cat-pill:hover,
.nav-cat-pill.active {
    background: var(--bg-card);
    color: var(--brand-secondary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

@media (max-width: 840px) {
    .header-center {
        display: none;
    }
}

.brand-logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.brand-logo-img {
    height: 36px;
    width: 36px;
    object-fit: cover;
    border-radius: 6px;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.brand-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--brand-primary);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* 1. Language Dropdown */
.lang-selector-wrapper {
    position: relative;
}

.lang-select-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.85rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 0.825rem;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.lang-select-btn:hover {
    border-color: var(--brand-secondary);
}

.flag-icon-img {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
    display: inline-block;
    vertical-align: middle;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 260px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-hover);
    display: none;
    flex-direction: column;
    z-index: 1100;
    overflow: hidden;
}

.lang-dropdown.active {
    display: flex;
}

.lang-search-box {
    padding: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.lang-search-input {
    width: 100%;
    padding: 0.4rem 0.65rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.8rem;
    outline: none;
}

.lang-list {
    overflow-y: auto;
    max-height: 280px;
    padding: 0.25rem 0;
}

.lang-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 0.85rem;
    cursor: pointer;
    font-size: 0.825rem;
    color: var(--text-primary);
    transition: background var(--transition-fast);
}

.lang-option:hover {
    background: var(--bg-tertiary);
    color: var(--brand-secondary);
}

.lang-option.selected {
    font-weight: 700;
    background: rgba(0, 80, 204, 0.1);
    color: var(--brand-secondary);
}

/* 2. Theme Swipe Switch */
.theme-swipe-toggle {
    position: relative;
    width: 50px;
    height: 26px;
    background: #cbd5e1;
    border-radius: 26px;
    cursor: pointer;
    padding: 2px;
    transition: background-color var(--transition-normal);
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

[data-theme="dark"] .theme-swipe-toggle {
    background: #334155;
}

.theme-swipe-toggle .knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    transition: transform 0.25s ease;
    z-index: 2;
}

[data-theme="dark"] .theme-swipe-toggle .knob {
    transform: translateX(24px) !important;
    background: #1e293b;
}

/* Final mobile overrides: kept last so component styles cannot override them. */
@media (max-width: 640px) {
  html { font-size: 14px; }
  body { -webkit-text-size-adjust: 100%; }
  .main-content { padding-left: 0.8rem; padding-right: 0.8rem; }
  .lesson-grid-layout { display: flex; flex-direction: column; gap: 1rem; }
  .lesson-sidebar-col { display: contents; }
  .lesson-sidebar-col .sidebar-widget:first-child { order: -1; }
  .lesson-main-col { order: 0; }
  .lesson-sidebar-col .sidebar-widget:not(:first-child) { order: 1; }
  .lesson-card-box { padding: 1.1rem; }
  #rulesListContainer { width: 100%; touch-action: pan-y pinch-zoom; }
  form[action="/rule.html"] { min-width: 0 !important; width: 100%; }
  #ruleSearchInput { min-width: 0; width: 100%; }
  .rule-list-item-card { touch-action: pan-y pinch-zoom; }
  .slide-fullscreen-modal { width: 100vw; height: 100dvh; }
  .slide-modal-toolbar { padding: 0.4rem 0.55rem; gap: 0.4rem; }
  .slide-modal-info { display: none; }
  .slide-modal-actions { width: 100%; justify-content: space-between; gap: 0.3rem; }
  .slide-modal-btn, .slide-modal-nav-btn { padding: 0.4rem 0.5rem; font-size: 0.72rem; }
  .slide-modal-viewport { padding: 0; overflow: auto; touch-action: pan-x pan-y pinch-zoom; }
  .slide-modal-img-container, .slide-modal-img { max-width: 100vw; max-height: calc(100dvh - 48px); }
  .slide-modal-img { border-radius: 0; }
}

/* ===========================================================================
   ANDROID APP LANDING PAGE — Premium Redesign
   =========================================================================== */
.android-app-page { max-width: 100%; margin: 0 auto; overflow: hidden; }

/* ----- Hero ----- */
.andr-hero {
  position: relative;
  padding: 5rem 1.5rem 4rem;
  overflow: hidden;
}
.andr-hero-bg-glow {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(37,99,235,.12) 0%, transparent 70%);
  pointer-events: none;
}
[data-theme="dark"] .andr-hero-bg-glow {
  background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(37,99,235,.2) 0%, transparent 70%);
}
.andr-hero-inner {
  max-width: 1240px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 4rem;
  position: relative; z-index: 1;
}
.andr-hero-content { max-width: 600px; flex: 1 1 auto; }
.andr-hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(37,99,235,.08); border: 1px solid rgba(37,99,235,.2);
  border-radius: 999px; padding: .4rem 1rem; margin-bottom: 1.5rem;
  font-size: .75rem; font-weight: 700; color: #2563eb; text-transform: uppercase; letter-spacing: .06em;
}
[data-theme="dark"] .andr-hero-badge { background: rgba(37,99,235,.15); border-color: rgba(37,99,235,.35); color: #60a5fa; }
.andr-hero-badge-icon { width: 14px; height: 14px; }
.andr-hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 900; line-height: 1.08;
  color: #0f172a; margin-bottom: 1.25rem;
}
.andr-hero-title span { color: #2563eb; }
[data-theme="dark"] .andr-hero-title { color: #f1f5f9; }
[data-theme="dark"] .andr-hero-title span { color: #60a5fa; }
.andr-hero-desc { font-size: 1.1rem; line-height: 1.7; color: #475569; max-width: 520px; }
[data-theme="dark"] .andr-hero-desc { color: #94a3b8; }
.andr-hero-actions { display: flex; align-items: center; gap: 1.25rem; margin-top: 2rem; flex-wrap: wrap; }
.andr-hero-cta {
  display: inline-flex; align-items: center; gap: .75rem;
  background: #2563eb; color: #fff; text-decoration: none;
  padding: .85rem 1.75rem; border-radius: .85rem;
  font-weight: 700; font-size: .95rem;
  box-shadow: 0 8px 24px rgba(37,99,235,.3), inset 0 1px 0 rgba(255,255,255,.15);
  transition: all .25s cubic-bezier(.4,0,.2,1);
}
.andr-hero-cta:hover { background: #1d4ed8; transform: translateY(-2px); box-shadow: 0 12px 32px rgba(37,99,235,.4), inset 0 1px 0 rgba(255,255,255,.15); }
.andr-hero-cta-icon { width: 20px; height: 20px; }
.andr-hero-cta-text { display: flex; flex-direction: column; line-height: 1; }
.andr-cta-small { font-size: .6rem; font-weight: 500; opacity: .85; }
.andr-cta-big { font-size: 1.05rem; font-weight: 800; }
.andr-hero-note { font-size: .8rem; color: #64748b; }
[data-theme="dark"] .andr-hero-note { color: #64748b; }

/* Phone Mockup */
.andr-hero-visual { flex-shrink: 0; position: relative; }
.andr-phone-mockup {
  width: 260px; border-radius: .75rem;
  background: #0f172a; padding: 6px;
  box-shadow: 0 25px 60px rgba(15,23,42,.25), 0 0 0 1px rgba(255,255,255,.08);
  position: relative;
}
.andr-phone-mockup img { display: block; width: 100%; height: auto; border-radius: .5rem; }
.andr-phone-mockup::before {
  content: ''; position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 50px; height: 5px; background: #1e293b; border-radius: 999px; z-index: 2;
}

/* ----- Stats Bar ----- */
.andr-stats {
  background: #0f172a; border-top: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
[data-theme="dark"] .andr-stats { background: #020617; }
.andr-stats-inner {
  max-width: 1240px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  gap: 0; padding: 2rem 1.5rem;
}
.andr-stat {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: .25rem; text-align: center;
}
.andr-stat-number { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 900; color: #fff; }
.andr-stat-label { font-size: .78rem; font-weight: 600; color: #94a3b8; text-transform: uppercase; letter-spacing: .06em; }
.andr-stat-divider { width: 1px; height: 40px; background: rgba(255,255,255,.1); flex-shrink: 0; }

/* ----- Section Header ----- */
.andr-section-header { text-align: center; margin-bottom: 2.5rem; }
.andr-eyebrow {
  display: inline-block; font-size: .75rem; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase;
  color: #2563eb; margin-bottom: .5rem;
}
[data-theme="dark"] .andr-eyebrow { color: #60a5fa; }
.andr-section-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.5rem); font-weight: 900;
  color: #0f172a; line-height: 1.15; margin: 0;
}
[data-theme="dark"] .andr-section-header h2 { color: #f1f5f9; }
.andr-section-sub { color: #64748b; margin-top: .5rem; font-size: 1rem; }
[data-theme="dark"] .andr-section-sub { color: #94a3b8; }

/* ----- Features ----- */
.andr-features { padding: 4rem 1.5rem; max-width: 1240px; margin: 0 auto; }
.andr-feature-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem;
}
.andr-feature-card {
  padding: 1.75rem; border-radius: 1.25rem;
  border: 1px solid rgba(0,0,0,.06);
  background: #fff;
  transition: all .3s cubic-bezier(.4,0,.2,1);
  position: relative; overflow: hidden;
}
.andr-feature-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  border-radius: 1.25rem 1.25rem 0 0; opacity: 0;
  transition: opacity .3s ease;
}
.andr-feature-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,.08); }
.andr-feature-card:hover::before { opacity: 1; }
.andr-feature-card--accent1::before { background: linear-gradient(90deg, #2563eb, #3b82f6); }
.andr-feature-card--accent2::before { background: linear-gradient(90deg, #10b981, #34d399); }
.andr-feature-card--accent3::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.andr-feature-card--accent4::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.andr-feature-card--accent5::before { background: linear-gradient(90deg, #ec4899, #f472b6); }
.andr-feature-card--accent6::before { background: linear-gradient(90deg, #0ea5e9, #38bdf8); }
[data-theme="dark"] .andr-feature-card {
  background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.08);
}
[data-theme="dark"] .andr-feature-card:hover { background: rgba(255,255,255,.07); box-shadow: 0 12px 32px rgba(0,0,0,.3); }
.andr-feature-icon { font-size: 2rem; margin-bottom: .75rem; }
.andr-feature-card h3 { font-size: 1.05rem; font-weight: 800; color: #0f172a; margin-bottom: .4rem; }
[data-theme="dark"] .andr-feature-card h3 { color: #f1f5f9; }
.andr-feature-card p { font-size: .88rem; line-height: 1.55; color: #64748b; margin: 0; }
[data-theme="dark"] .andr-feature-card p { color: #94a3b8; }

/* ----- Gallery Carousel ----- */
.andr-gallery { padding: 4rem 1.5rem 3rem; max-width: 1240px; margin: 0 auto; }
.andr-carousel-wrapper { position: relative; }
.andr-carousel {
  display: flex; gap: 1.5rem; overflow-x: auto;
  scroll-snap-type: x mandatory; padding: 1rem .5rem 1.5rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}
.andr-carousel::-webkit-scrollbar { display: none; } /* Chrome/Safari */
.andr-carousel-item {
  flex: 0 0 auto; scroll-snap-align: center;
  margin: 0; display: flex; flex-direction: column; align-items: center; gap: .75rem;
}
.andr-carousel-phone {
  width: 220px; border-radius: .75rem;
  background: #0f172a; padding: 5px;
  box-shadow: 0 16px 40px rgba(15,23,42,.2), 0 0 0 1px rgba(255,255,255,.06);
  position: relative; transition: transform .3s ease, box-shadow .3s ease;
  cursor: pointer;
}
.andr-carousel-phone:hover { transform: translateY(-6px) scale(1.02); box-shadow: 0 24px 56px rgba(15,23,42,.3); }
.andr-carousel-phone::before {
  content: ''; position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 40px; height: 4px; background: #1e293b; border-radius: 999px; z-index: 2;
}
.andr-carousel-phone img { display: block; width: 100%; height: auto; border-radius: .5rem; }
.andr-carousel-item figcaption {
  font-size: .78rem; color: #64748b; text-align: center; max-width: 200px; line-height: 1.4;
}
[data-theme="dark"] .andr-carousel-item figcaption { color: #94a3b8; }

/* ----- Carousel Arrow Buttons ----- */
.andr-carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-60%); z-index: 5;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.95); border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .2s ease;
  color: #0f172a; padding: 0;
}
.andr-carousel-arrow svg { width: 20px; height: 20px; }
.andr-carousel-arrow:hover { background: #fff; box-shadow: 0 6px 24px rgba(0,0,0,.18); transform: translateY(-60%) scale(1.08); }
.andr-carousel-arrow--left { left: -8px; }
.andr-carousel-arrow--right { right: -8px; }
[data-theme="dark"] .andr-carousel-arrow {
  background: rgba(30,41,59,.9); border-color: rgba(255,255,255,.12);
  color: #e2e8f0; box-shadow: 0 4px 16px rgba(0,0,0,.4);
}
[data-theme="dark"] .andr-carousel-arrow:hover { background: rgba(51,65,85,.95); box-shadow: 0 6px 24px rgba(0,0,0,.5); }

/* ----- Lightbox ----- */
.andr-lightbox {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
}
.andr-lightbox[hidden] { display: none; }
.andr-lightbox-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.85); backdrop-filter: blur(8px);
}
.andr-lightbox-close {
  position: absolute; top: 1rem; right: 1rem; z-index: 3;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .2s ease; padding: 0;
}
.andr-lightbox-close svg { width: 22px; height: 22px; }
.andr-lightbox-close:hover { background: rgba(255,255,255,.25); transform: scale(1.1); }
.andr-lightbox-content {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  max-height: 90vh;
}
.andr-lightbox-content img {
  max-height: 80vh; max-width: 90vw; width: auto;
  border-radius: .5rem; box-shadow: 0 20px 60px rgba(0,0,0,.5);
  object-fit: contain;
}
.andr-lightbox-caption {
  color: rgba(255,255,255,.8); font-size: .88rem; text-align: center; margin: 0;
}
.andr-lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .2s ease; padding: 0;
}
.andr-lightbox-nav svg { width: 22px; height: 22px; }
.andr-lightbox-nav:hover { background: rgba(255,255,255,.2); transform: translateY(-50%) scale(1.1); }
.andr-lightbox-nav--prev { left: 1.5rem; }
.andr-lightbox-nav--next { right: 1.5rem; }

/* ----- Bottom CTA ----- */
.andr-bottom-cta {
  padding: 0 1.5rem; margin: 2rem auto; max-width: 1240px;
}
.andr-bottom-cta-inner {
  position: relative; text-align: center;
  padding: 3.5rem 2rem; border-radius: 1.5rem;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #3b82f6 100%);
  overflow: hidden;
}
.andr-bottom-cta-glow {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(255,255,255,.08) 0%, transparent 60%);
  pointer-events: none;
}
.andr-bottom-cta-inner h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 900; color: #fff; margin-bottom: .75rem; position: relative; }
.andr-bottom-cta-inner p { font-size: 1rem; color: rgba(255,255,255,.8); margin-bottom: 1.75rem; position: relative; }
.andr-bottom-cta-btn {
  background: #fff !important; color: #1e3a8a !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.2); margin: 0 auto;
}
.andr-bottom-cta-btn:hover { background: #f1f5f9 !important; transform: translateY(-2px); }
.andr-bottom-cta-btn .andr-hero-cta-icon { color: #2563eb; }
.andr-bottom-cta-btn .andr-cta-small { color: #64748b; }
.andr-bottom-cta-btn .andr-cta-big { color: #1e3a8a; }

/* ----- Disclaimer ----- */
.andr-disclaimer {
  max-width: 1240px; margin: 2rem auto; padding: 1.5rem 1.5rem;
}
.andr-disclaimer > * {
  max-width: 900px;
}
.andr-disclaimer h2 { font-size: 1rem; font-weight: 800; color: #1e3a8a; margin-bottom: .4rem; }
.andr-disclaimer p { font-size: .85rem; line-height: 1.6; color: #475569; }
.andr-disclaimer a { color: #2563eb; font-weight: 700; text-decoration: underline; }
[data-theme="dark"] .andr-disclaimer h2 { color: #60a5fa; }
[data-theme="dark"] .andr-disclaimer p { color: #94a3b8; }
[data-theme="dark"] .andr-disclaimer a { color: #60a5fa; }

/* ----- Responsive ----- */
@media (max-width: 860px) {
  .andr-hero-inner { flex-direction: column; text-align: center; gap: 2.5rem; }
  .andr-hero-content { max-width: 100%; }
  .andr-hero-desc { margin: 0 auto; }
  .andr-hero-actions { justify-content: center; }
  .andr-phone-mockup { width: 220px; }
  .andr-feature-grid { grid-template-columns: repeat(2, 1fr); }
  .andr-stats-inner { flex-wrap: wrap; gap: 1rem; }
  .andr-stat { flex: 0 0 calc(50% - .5rem); }
  .andr-stat-divider { display: none; }
  .andr-lightbox-nav--prev { left: .5rem; }
  .andr-lightbox-nav--next { right: .5rem; }
}
@media (max-width: 500px) {
  .andr-hero { padding: 3rem 1rem 2.5rem; }
  .andr-feature-grid { grid-template-columns: 1fr; }
  .andr-features, .andr-gallery { padding: 2.5rem 1rem; }
  .andr-bottom-cta-inner { padding: 2.5rem 1.25rem; }
  .andr-carousel-phone { width: 180px; }
  .andr-carousel-arrow { width: 36px; height: 36px; }
  .andr-carousel-arrow svg { width: 16px; height: 16px; }
  .andr-carousel-arrow--left { left: -4px; }
  .andr-carousel-arrow--right { right: -4px; }
  .andr-lightbox-nav { width: 40px; height: 40px; }
  .andr-lightbox-nav svg { width: 18px; height: 18px; }
  .andr-lightbox-content img { max-width: 95vw; }
}

/* Legacy compat */
.android-app-disclaimer { margin: 1rem; padding: 1.25rem; border-left: 4px solid #2563eb; background: #eff6ff; }
.android-app-disclaimer h2 { margin: 0 0 .4rem; color: #1e3a8a; font-size: 1.05rem; }
.android-app-disclaimer p { margin: 0; color: #475569; font-size: .85rem; line-height: 1.55; }
.android-app-disclaimer a { color: #1d4ed8; font-weight: 700; }

/* Mobile slide controls and zoom — final cascade layer. */
@media (max-width: 640px) {
  .slide-modal-toolbar {
    position: absolute;
    inset: 0 0 auto 0;
    z-index: 20;
    padding: .4rem .5rem;
    background: transparent !important;
    border: 0 !important;
    pointer-events: none;
  }
  .slide-modal-actions { pointer-events: auto; }
  .slide-modal-btn, .slide-modal-nav-btn, .slide-modal-close-btn,
  .slide-lang-select-wrapper, .slide-modal-actions .lang-select-btn {
    background: rgba(15, 23, 42, .38) !important;
    border-color: rgba(255,255,255,.25) !important;
    backdrop-filter: blur(5px);
  }
  .slide-modal-viewport { height: 100dvh; padding: 0; }
  .slide-modal-img-container { transform-origin: center; transition: transform .12s ease; }
  .slide-modal-img-container, .slide-modal-img { max-height: 100dvh; }
}

@media (max-width: 640px) {
  .slide-modal-toolbar {
    position: absolute;
    inset: 0 0 auto 0;
    z-index: 20;
    background: transparent !important;
    border: 0;
    pointer-events: none;
  }
  .slide-modal-actions { pointer-events: auto; }
  .slide-modal-btn, .slide-modal-nav-btn, .slide-modal-close-btn,
  .slide-lang-select-wrapper, .slide-modal-actions .lang-select-btn {
    background: rgba(15, 23, 42, .38) !important;
    border-color: rgba(255,255,255,.25) !important;
    backdrop-filter: blur(5px);
  }
  .slide-modal-viewport { height: 100dvh; padding: 0; }
  .slide-modal-img-container { transform-origin: center center; transition: transform .12s ease; }
  .slide-modal-img-container, .slide-modal-img { max-height: 100dvh; }
}

/* Mobile usability refinements */
footer { position: static !important; }

@media (max-width: 640px) {
  html { font-size: 14px; }
  body { -webkit-text-size-adjust: 100%; }
  .main-content { padding-left: 0.8rem; padding-right: 0.8rem; }
  .lesson-grid-layout { display: flex; flex-direction: column; gap: 1rem; }
  .lesson-sidebar-col { display: contents; }
  .lesson-sidebar-col .sidebar-widget:first-child { order: -1; }
  .lesson-main-col { order: 0; }
  .lesson-sidebar-col .sidebar-widget:not(:first-child) { order: 1; }
  .lesson-card-box { padding: 1.1rem; }
  .rule-list-item-card, #rulesListContainer { touch-action: pan-y pinch-zoom; }

  .slide-fullscreen-modal { width: 100vw; height: 100dvh; }
  .slide-modal-toolbar { padding: 0.4rem 0.55rem; gap: 0.4rem; }
  .slide-modal-info { display: none; }
  .slide-modal-actions { width: 100%; justify-content: space-between; gap: 0.3rem; }
  .slide-modal-btn, .slide-modal-nav-btn { padding: 0.4rem 0.5rem; font-size: 0.72rem; }
  .slide-modal-viewport { padding: 0; overflow: auto; touch-action: pan-x pan-y pinch-zoom; }
  .slide-modal-img-container, .slide-modal-img { max-width: 100vw; max-height: calc(100dvh - 48px); }
  .slide-modal-img { border-radius: 0; }
}

.theme-icon-sun, .theme-icon-moon {
    font-size: 0.75rem;
    z-index: 1;
    padding: 0 4px;
}

/* 3. Google Play Link Button */
.google-play-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.9rem;
    background: var(--brand-secondary);
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    color: #ffffff;
    text-decoration: none;
    transition: all var(--transition-fast);
    font-weight: 600;
}

.google-play-btn:hover {
    background: var(--brand-secondary-hover);
    transform: translateY(-1px);
}

.gp-icon {
    width: 18px;
    height: 18px;
    fill: #ffffff;
}

.gp-text-wrapper {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.gp-small {
    font-size: 0.6rem;
    text-transform: uppercase;
    opacity: 0.85;
}

.gp-large {
    font-size: 0.825rem;
    font-weight: 700;
}

/* Hidden Translate Container */
#google_translate_element { display: none !important; }
.goog-te-banner-frame, .skiptranslate { display: none !important; }
body { top: 0 !important; }

/* ==========================================================================
   HOMEPAGE HERO SECTION
   ========================================================================== */
.main-content {
    flex: 1;
    max-width: 1240px;
    width: 100%;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
}

.homepage-hero {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem 2.25rem;
    margin-bottom: 2.25rem;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.homepage-hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background: radial-gradient(circle at 100% 0%, rgba(0, 80, 204, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-badge-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.85rem;
    background: rgba(0, 80, 204, 0.08);
    border: 1px solid rgba(0, 80, 204, 0.2);
    border-radius: var(--radius-full);
    color: var(--brand-secondary);
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.homepage-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.65rem;
    line-height: 1.2;
}

.homepage-title span {
    color: var(--brand-secondary);
}

.homepage-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 780px;
    line-height: 1.55;
    margin-bottom: 0.85rem;
}

/* MINIMAL CLEAN GRAY HERO TRANSLATION BOX (NO Header/Badge) */
.hero-translation-box {
    max-width: 780px;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    font-size: 0.925rem;
    color: #334155;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}

[data-theme="dark"] .hero-translation-box {
    background: #1e293b;
    border-color: #334155;
    color: #cbd5e1;
}

.hero-stats-row {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    flex-wrap: wrap;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.hero-stat-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.hero-stat-num {
    font-weight: 800;
    color: var(--brand-secondary);
}

/* License Categories Filter Bar */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}

.license-tab-btn {
    padding: 0.6rem 1.2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all var(--transition-fast);
}

.license-tab-btn:hover {
    border-color: var(--brand-secondary);
    color: var(--text-primary);
}

.license-tab-btn.active {
    background: var(--brand-secondary);
    color: #ffffff;
    border-color: var(--brand-secondary);
}

/* ==========================================================================
   BENTO GRID & MINIMAL CLEAN GRAY TRANSLATION BOX (NO Header/Badge)
   ========================================================================== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
}

.category-card {
    grid-column: span 4;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
    cursor: pointer;
    box-shadow: var(--shadow-card);
}

.category-card:first-child,
.category-card.card-featured {
    grid-column: span 8;
}

.category-card:first-child .card-image-wrap,
.category-card.card-featured .card-image-wrap {
    height: 240px;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--border-highlight);
}

.card-image-wrap {
    position: relative;
    height: 190px;
    width: 100%;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.category-card:hover .card-img {
    transform: scale(1.04);
}

.card-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 14, 39, 0.88) 0%, transparent 65%);
}

.card-img-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.25rem;
    color: #ffffff;
}

.card-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #0050cc;
    color: #ffffff;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.card-title {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.25;
    color: #ffffff;
}

.card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.card-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 0.65rem;
}

/* MINIMAL CLEAN GRAY CATEGORY TRANSLATION BOX (NO Header/Badge) */
.translation-box {
    margin-top: 0.4rem;
    margin-bottom: 1.15rem;
    padding: 0.6rem 0.85rem;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: #334155;
    line-height: 1.45;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

[data-theme="dark"] .translation-box {
    background: #1e293b;
    border-color: #334155;
    color: #cbd5e1;
}

.translation-box-content {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.translation-box-title {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--text-primary);
}

[data-theme="dark"] .translation-box-title {
    color: #f8fafc;
}

/* Card Meta Footer */
.card-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.card-meta-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.progress-bar-bg {
    width: 100%;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--brand-secondary);
    border-radius: var(--radius-full);
}

/* Responsive Grid */
@media (max-width: 992px) {
    .category-card,
    .category-card:first-child,
    .category-card.card-featured {
        grid-column: span 6;
    }
}

@media (max-width: 640px) {
    .categories-grid {
        grid-template-columns: 1fr;
    }
    .category-card,
    .category-card:first-child,
    .category-card.card-featured {
        grid-column: span 1;
    }
}

/* ==========================================================================
   FOOTER & DISCLAIMER
   ========================================================================== */
.disclaimer-section {
    max-width: 1240px;
    margin: 2rem auto 0;
    padding: 0 1.5rem;
}

.disclaimer-box {
    background: rgba(234, 179, 8, 0.08);
    border: 1px solid rgba(234, 179, 8, 0.25);
    border-left: 4px solid #eab308;
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.site-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 3.5rem 1.5rem 2rem;
    margin-top: 3.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.footer-inner {
    max-width: 1240px;
    margin: 0 auto;
}

.footer-top-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.footer-brand-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--brand-primary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.footer-logo-mark {
    height: 32px;
    width: 32px;
    object-fit: cover;
    border-radius: 6px;
    display: inline-block;
    flex-shrink: 0;
}

.footer-brand-desc {
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1.25rem;
    max-width: 320px;
    color: var(--text-muted);
}

.footer-col-heading {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.footer-links-list {
    list-style: none;
}

.footer-links-list li {
    margin-bottom: 0.6rem;
}

.footer-links-list a {
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: color var(--transition-fast);
}

.footer-links-list a:hover {
    color: var(--brand-secondary);
}

.footer-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.825rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 1rem;
}

/* Modal Drawer */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active { display: flex; }

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
    color: var(--text-primary);
    box-shadow: var(--shadow-hover);
}

.modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.4rem;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 992px) {
    .footer-top-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .header-inner { padding: 0.5rem 1rem; }
    .brand-title { font-size: 1.15rem; }
    .gp-text-wrapper { display: none; }
    .main-content { padding: 1.5rem 1rem; }
    .homepage-title { font-size: 1.75rem; }
    .footer-top-grid { grid-template-columns: 1fr; }
}

/* Added by user request */
.category-card { border-bottom: 4px solid #2563eb !important; }


/* ==========================================================================
   ACCORDION & ANDROID CARDS STYLES
   ========================================================================== */

      .subpage-header {
        margin-bottom: 2rem;
        padding-bottom: 1.25rem;
        border-bottom: 1px solid var(--border-color);
      }
      .subpage-breadcrumb {
        font-size: 0.85rem;
        color: var(--brand-secondary);
        font-weight: 700;
        text-decoration: none;
      }
      .subpage-title {
        font-size: 1.8rem;
        font-weight: 800;
        color: var(--text-primary);
        margin-top: 0.5rem;
        margin-bottom: 0.4rem;
      }
      .accordion-wrapper {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 3rem;
      }
      .accordion-item {
        background: var(--bg-secondary);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-lg);
        overflow: hidden;
        transition: border-color var(--transition-normal);
      }
      .accordion-item.active {
        border-color: var(--brand-secondary);
        box-shadow: var(--shadow-sm);
      }
      .accordion-header {
        width: 100%;
        padding: 1.15rem 1.35rem;
        background: none;
        border: none;
        display: flex;
        align-items: center;
        justify-content: space-between;
        cursor: pointer;
        text-align: left;
        color: var(--text-primary);
        font-family: inherit;
      }
      .accordion-header-left {
        display: flex;
        align-items: center;
        gap: 1rem;
      }
      .accordion-num {
        font-size: 0.85rem;
        font-weight: 800;
        color: var(--brand-secondary);
        background: var(--bg-tertiary);
        padding: 0.35rem 0.65rem;
        border-radius: 8px;
      }
      .accordion-title {
        font-size: 1.15rem;
        font-weight: 700;
        color: var(--text-primary);
      }
      .accordion-tr-inline {
        font-size: 0.85rem;
        font-weight: 600;
        color: var(--text-secondary);
        background: var(--bg-tertiary);
        padding: 0.2rem 0.55rem;
        border-radius: 6px;
        display: none;
      }
      .accordion-badges {
        display: flex;
        gap: 0.5rem;
        margin-top: 0.3rem;
      }
      .badge-pill {
        font-size: 0.75rem;
        padding: 0.15rem 0.5rem;
        background: var(--bg-tertiary);
        border-radius: 10px;
        color: var(--text-secondary);
        font-weight: 600;
      }
      .accordion-icon {
        font-size: 0.85rem;
        color: var(--text-muted);
        transition: transform 0.3s ease;
      }
      .accordion-item.active .accordion-icon {
        transform: rotate(180deg);
        color: var(--brand-secondary);
      }
      .accordion-body {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s cubic-bezier(0, 1, 0, 1);
      }
      .accordion-item.active .accordion-body {
        max-height: 4000px;
        transition: max-height 0.5s ease-in-out;
      }
      .accordion-content {
        padding: 1.25rem 1.35rem 1.5rem 1.35rem;
        border-top: 1px solid var(--border-color);
        background: var(--bg-primary);
      }




/* ==========================================================================
   CIRCULAR BACK BUTTON & PREMIUM ACCORDION INNER CARD STYLES
   ========================================================================== */
.back-circle-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.back-circle-btn:hover {
    background: var(--brand-primary);
    color: #ffffff;
    border-color: var(--brand-primary);
    transform: translateX(-4px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.back-circle-btn svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

/* ==========================================================================
   STUNNING ACCORDION INNER DESIGN
   ========================================================================== */
.accordion-content {
    padding: 1.5rem 1.5rem 1.75rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.accordion-section-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
}

.section-pill {
    font-size: 0.725rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.section-pill.lesson-pill {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.section-pill.test-pill {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.divider-line {
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.accordion-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.15rem 1.35rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

.accordion-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
    transition: width 0.2s ease;
}

.accordion-card.lesson-card::before {
    background: linear-gradient(180deg, #3b82f6, #1d4ed8);
}

.accordion-card.test-card::before {
    background: linear-gradient(180deg, #10b981, #047857);
}

.accordion-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-highlight);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.accordion-card:hover::before {
    width: 6px;
}

.card-left {
    display: flex;
    align-items: center;
    gap: 1.1rem;
}

.card-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.accordion-card:hover .card-icon-box {
    transform: scale(1.08);
}

.lesson-icon-box {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.25));
    color: #2563eb;
}

.test-icon-box {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.25));
    color: #059669;
}

.card-text-group {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.card-title-bold {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.35;
}

.card-subtext {
    font-size: 0.835rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.card-right {
    display: flex;
    align-items: center;
    margin-left: 1rem;
}

.action-btn-pill {
    padding: 0.5rem 1rem;
    background: #2563eb;
    color: #ffffff;
    border-radius: 8px;
    font-size: 0.825rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.action-btn-pill.test-pill {
    background: #059669;
}

.accordion-card:hover .action-btn-pill {
    filter: brightness(1.1);
}

.accordion-card:hover .action-btn-pill .arrow {
    transform: translateX(4px);
}

.arrow {
    display: inline-block;
    transition: transform 0.2s ease;
}

/* ==========================================================================
   ACCORDION & ANDROID CARDS STYLES
   ========================================================================== */

      .subpage-header {
        margin-bottom: 2rem;
        padding-bottom: 1.25rem;
        border-bottom: 1px solid var(--border-color);
      }
      .subpage-breadcrumb {
        font-size: 0.85rem;
        color: var(--brand-secondary);
        font-weight: 700;
        text-decoration: none;
      }
      .subpage-title {
        font-size: 1.8rem;
        font-weight: 800;
        color: var(--text-primary);
        margin-top: 0.5rem;
        margin-bottom: 0.4rem;
      }
      .accordion-wrapper {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 3rem;
      }
      .accordion-item {
        background: var(--bg-secondary);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-lg);
        overflow: hidden;
        transition: border-color var(--transition-normal);
      }
      .accordion-item.active {
        border-color: var(--brand-secondary);
        box-shadow: var(--shadow-sm);
      }
      .accordion-header {
        width: 100%;
        padding: 1.15rem 1.35rem;
        background: none;
        border: none;
        display: flex;
        align-items: center;
        justify-content: space-between;
        cursor: pointer;
        text-align: left;
        color: var(--text-primary);
        font-family: inherit;
      }
      .accordion-header-left {
        display: flex;
        align-items: center;
        gap: 1rem;
      }
      .accordion-num {
        font-size: 0.85rem;
        font-weight: 800;
        color: var(--brand-secondary);
        background: var(--bg-tertiary);
        padding: 0.35rem 0.65rem;
        border-radius: 8px;
      }
      .accordion-title {
        font-size: 1.15rem;
        font-weight: 700;
        color: var(--text-primary);
      }
      .accordion-tr-inline {
        font-size: 0.85rem;
        font-weight: 600;
        color: var(--text-secondary);
        background: var(--bg-tertiary);
        padding: 0.2rem 0.55rem;
        border-radius: 6px;
        display: none;
      }
      .accordion-badges {
        display: flex;
        gap: 0.5rem;
        margin-top: 0.3rem;
      }
      .badge-pill {
        font-size: 0.75rem;
        padding: 0.15rem 0.5rem;
        background: var(--bg-tertiary);
        border-radius: 10px;
        color: var(--text-secondary);
        font-weight: 600;
      }
      .accordion-icon {
        font-size: 0.85rem;
        color: var(--text-muted);
        transition: transform 0.3s ease;
      }
      .accordion-item.active .accordion-icon {
        transform: rotate(180deg);
        color: var(--brand-secondary);
      }
      .accordion-body {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s cubic-bezier(0, 1, 0, 1);
      }
      .accordion-item.active .accordion-body {
        max-height: 4000px;
        transition: max-height 0.5s ease-in-out;
      }
      .accordion-content {
        padding: 1.25rem 1.35rem 1.5rem 1.35rem;
        border-top: 1px solid var(--border-color);
        background: var(--bg-primary);
      }

      /* ANDROID UI CARDS INSIDE ACCORDION (100% CLICKABLE ANCHORS) */
      .android-section-divider {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        margin-top: 1.25rem;
        margin-bottom: 0.85rem;
      }
      .dot-indicator {
        width: 9px;
        height: 9px;
        border-radius: 50%;
        background: #2563eb;
        display: inline-block;
      }
      .section-title {
        font-size: 0.9rem;
        font-weight: 700;
        color: #2563eb;
      }
      .divider-line {
        flex: 1;
        height: 1px;
        background: var(--border-color);
      }

      .category-card { border-bottom: 4px solid #2563eb !important; }

/* ==========================================================================
   INTERACTIVE QUIZ ENGINE STYLES
   ========================================================================== */
.quiz-container {
    max-width: 860px;
    margin: 0 auto;
}

.quiz-progress-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-card);
}

.quiz-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.quiz-progress-track {
    height: 10px;
    background: var(--bg-tertiary);
    border-radius: 5px;
    overflow: hidden;
}

.quiz-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2563eb, #10b981);
    transition: width 0.4s ease;
    border-radius: 5px;
}

.quiz-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin-bottom: 1.75rem;
    box-shadow: var(--shadow-card);
    transition: border-color 0.2s ease;
}

.quiz-question-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.quiz-q-num {
    background: rgba(37, 99, 235, 0.1);
    color: var(--brand-primary);
    font-weight: 800;
    font-size: 0.85rem;
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
}

.quiz-question-text {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.5;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
}

.quiz-media-box {
    margin-bottom: 1.25rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #0f172a;
    text-align: center;
    max-height: 320px;
}

.quiz-media-box img {
    max-height: 320px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.quiz-options-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quiz-option-label {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem 1.25rem;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.45;
    transition: all 0.2s ease;
    position: relative;
}

.quiz-option-label:hover:not(.disabled) {
    border-color: var(--brand-primary);
    background: rgba(37, 99, 235, 0.04);
}

.quiz-opt-letter {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.quiz-option-label.correct {
    background: rgba(16, 185, 129, 0.12) !important;
    border-color: #10b981 !important;
    color: var(--text-primary) !important;
}

.quiz-option-label.correct .quiz-opt-letter {
    background: #10b981 !important;
    color: #ffffff !important;
}

.quiz-option-label.incorrect {
    background: rgba(239, 68, 68, 0.12) !important;
    border-color: #ef4444 !important;
    color: var(--text-primary) !important;
}

.quiz-option-label.incorrect .quiz-opt-letter {
    background: #ef4444 !important;
    color: #ffffff !important;
}

.quiz-option-label.disabled {
    cursor: default;
    opacity: 0.9;
}

.quiz-explanation-box {
    display: none;
    margin-top: 1.25rem;
    padding: 1.1rem 1.35rem;
    background: rgba(37, 99, 235, 0.08);
    border-left: 4px solid var(--brand-primary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-size: 0.925rem;
    line-height: 1.6;
    color: var(--text-primary);
}

.quiz-explanation-box.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.quiz-score-banner {
    display: none;
    background: var(--bg-card);
    border: 2px solid var(--brand-primary);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    margin-top: 2.5rem;
    box-shadow: var(--shadow-hover);
}

.quiz-score-banner.active {
    display: block;
}

.quiz-score-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.quiz-score-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Practice test experience */
.quiz-page { padding-top: 1.6rem; padding-bottom: 3rem; }
.rule-text-summary { display:none; }
.privacy-notice { position:fixed; z-index:100; left:50%; bottom:18px; width:min(880px,calc(100vw - 36px)); transform:translateX(-50%); display:flex; align-items:center; justify-content:space-between; gap:1.5rem; padding:1rem 1.25rem; border:1px solid var(--border-color); border-radius:14px; color:var(--text-primary); background:var(--bg-card); box-shadow:0 12px 36px rgba(0,0,0,.22); }
.privacy-notice[hidden] { display: none !important; }
.privacy-notice p { margin:.25rem 0 0; color:var(--text-secondary); font-size:.86rem; line-height:1.45; }
.privacy-actions { display:flex; gap:.8rem; align-items:center; flex-shrink:0; }
.privacy-actions a { color:var(--brand-primary); font-weight:700; font-size:.85rem; }
.privacy-actions button { border:0; padding:.5rem .7rem; border-radius:7px; color:white; background:var(--brand-primary); font:inherit; font-weight:800; cursor:pointer; }
@media (max-width:560px) { .privacy-notice { bottom:10px; align-items:flex-start; flex-direction:column; gap:.7rem; }.privacy-actions { width:100%; justify-content:space-between; } }

/* Compact Card Frame for Slide Deck */
.lesson-study-slides {
  margin: 0 0 1.25rem 0;
  padding: 0.65rem;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: var(--bg-card);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.homepage-app-promo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0 auto 2rem;
    padding: 1rem 1.25rem;
    max-width: 1240px;
    border: 1px solid rgba(37, 99, 235, .25);
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(239, 246, 255, .96), rgba(219, 234, 254, .72));
}
.homepage-app-promo-icon img { border-radius: 1rem; box-shadow: 0 5px 14px rgba(15, 23, 42, .15); }
.homepage-app-promo-copy { flex: 1; min-width: 0; }
.homepage-app-promo-eyebrow { color: #1d4ed8; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.homepage-app-promo h2 { margin: .15rem 0 .25rem; color: #0f172a; font-size: 1.15rem; font-weight: 800; }
.homepage-app-promo p { margin: 0; color: #475569; font-size: .88rem; line-height: 1.45; }
.homepage-app-promo-button { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; padding: .7rem 1rem; border-radius: .7rem; background: #2563eb; color: #fff; text-decoration: none; box-shadow: 0 4px 10px rgba(37, 99, 235, .22); }
.homepage-app-promo-button:hover { background: #1d4ed8; }
.homepage-app-promo-button-label { font-size: .65rem; line-height: 1; }
.homepage-app-promo-button strong { font-size: .95rem; }
@media (max-width: 640px) {
    .homepage-app-promo { align-items: flex-start; flex-wrap: wrap; padding: .9rem; }
    .homepage-app-promo-copy { flex-basis: calc(100% - 80px); }
    .homepage-app-promo-button { margin-left: 80px; }
}

.lesson-slides-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.lesson-slides-heading-left {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.slide-deck-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--brand-secondary);
  text-transform: uppercase;
}

.slide-count-pill {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  background: rgba(37, 99, 235, 0.1);
  color: var(--brand-secondary);
  border-radius: var(--radius-full);
}

.lesson-slide-deck {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: #0f172a;
  border: 1px solid var(--border-color);
  height: 460px;
  min-height: 460px;
  max-height: 460px;
}

.slide-thumbnail-wrapper {
  position: relative;
  width: 100%;
  height: 460px;
  min-height: 460px;
  max-height: 460px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
  overflow: hidden;
  background: #090d16;
}

.lesson-slide-image {
  max-width: 100%;
  max-height: 460px;
  width: auto;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.slide-thumbnail-wrapper:hover .lesson-slide-image {
  transform: scale(1.02);
}

/* Hover Zoom Overlay */
.slide-zoom-hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.slide-thumbnail-wrapper:hover .slide-zoom-hover-overlay {
  opacity: 1;
}

/* Embedded Navigation Controls Floating Inside Slide Thumbnail */
.lesson-slide-inline-controls {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 0.85rem;
  background: rgba(7, 13, 26, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 99px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
}

.slide-inline-nav-btn {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  padding: 0.3rem 0.8rem;
  border-radius: 99px;
  font: 800 0.8rem/1 Inter, system-ui, sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.slide-inline-nav-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: #ffffff;
  transform: scale(1.04);
}

.slide-inline-counter {
  color: #f1f5f9;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
  user-select: none;
  padding: 0 0.2rem;
}

.slide-zoom-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 800;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transform: translateY(6px);
  transition: transform 0.25s ease;
}

.slide-thumbnail-wrapper:hover .slide-zoom-pill {
  transform: translateY(0);
}

.slide-loading {
  display: grid;
  min-height: 380px;
  place-items: center;
  color: #cbd5e1;
  font-weight: 700;
}

.lesson-slide-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.lesson-slide-controls button {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.5rem 0.9rem;
  color: var(--text-primary);
  background: var(--bg-primary);
  font: 700 0.825rem/1 Inter, sans-serif;
  cursor: pointer;
  transition: all 0.15s ease;
}

.lesson-slide-controls button:hover {
  border-color: var(--brand-secondary);
  color: var(--brand-secondary);
}

.slide-counter-span {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-secondary);
}

/* Fullscreen Slide Modal Lightbox */
.slide-fullscreen-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(7, 13, 26, 0.94);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.slide-fullscreen-modal.active {
  opacity: 1;
  visibility: visible;
}

.slide-modal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.5rem;
  background: rgba(15, 23, 42, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  gap: 1rem;
  flex-wrap: wrap;
}

.slide-modal-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.slide-modal-badge {
  font-size: 0.75rem;
  font-weight: 900;
  color: #60a5fa;
  letter-spacing: 0.05em;
  background: rgba(96, 165, 250, 0.12);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
}

.slide-modal-counter {
  font-size: 0.875rem;
  font-weight: 800;
  color: #e2e8f0;
}

.slide-modal-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.slide-lang-select-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  padding: 0.25rem 0.55rem;
}

.slide-lang-icon {
  font-size: 0.9rem;
}

.slide-lang-select {
  background: transparent;
  color: #ffffff;
  border: none;
  font: 700 0.82rem Inter, sans-serif;
  outline: none;
  cursor: pointer;
  padding: 0.2rem 0;
}

.slide-lang-select option {
  background: #0f172a;
  color: #ffffff;
}

.slide-modal-btn {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.08);
  font: 700 0.82rem/1 Inter, sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
}

.slide-modal-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.slide-modal-btn.active {
  background: #2563eb;
  border-color: #3b82f6;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.slide-modal-nav-btn {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 0.45rem 0.8rem;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  font: 700 0.82rem/1 Inter, sans-serif;
  cursor: pointer;
}

.slide-modal-nav-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.slide-modal-close-btn {
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  background: #ef4444;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.2s ease;
  margin-left: 0.5rem;
}

.slide-modal-close-btn:hover {
  transform: scale(1.1);
}

.slide-modal-viewport {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  overflow: auto;
  position: relative;
}

.slide-modal-img-container {
  position: relative;
  display: inline-block;
  max-width: 92vw;
  max-height: 82vh;
}

.slide-modal-img {
  display: block;
  max-width: 92vw;
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  background: #ffffff;
}

.slide-modal-text-overlay {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}

.slide-modal-text-box {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1px 3px;
  box-sizing: border-box;
  overflow: hidden;
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 6px;
  color: #07162e;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px) saturate(1.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  font-weight: 800;
  line-height: 1.12;
  text-align: center;
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.2s ease, transform 0.15s ease, background-color 0.2s ease;
}

.slide-modal-text-box:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  border-color: #2563eb;
}

/* Hidden Box State (Clicking box toggles this to hide individual box) */
.slide-modal-text-box.box-hidden {
  opacity: 0 !important;
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.slide-modal-text-box.box-hidden:hover {
  opacity: 0.45 !important;
  border: 1px dashed rgba(255, 255, 255, 0.8) !important;
  background: rgba(255, 255, 255, 0.2) !important;
}

@media(max-width:560px){
  .lesson-study-slides { padding: 0.85rem; }
  .lesson-slides-heading { align-items: flex-start; flex-direction: column; gap: 0.4rem; }
  .slide-thumbnail-wrapper { height: 180px; }
  .slide-modal-toolbar { padding: 0.65rem 0.85rem; gap: 0.5rem; }
  .slide-modal-btn { font-size: 0.74rem; padding: 0.35rem 0.6rem; }
}
/* Main Column Video Player Section (Right under slides) */
.lesson-video-section {
  margin: 0 0 1.5rem 0;
  padding: 0.65rem;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: var(--bg-card);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.lesson-video-section .uk-custom-player-wrapper {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: #090d16;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.lesson-video-section .player-screen-area {
  aspect-ratio: 16 / 9;
  width: 100%;
  position: relative;
  background: #030712;
  overflow: hidden;
}

/* Video Player OCR overlay text container */
.lesson-video-section .player-overlay-text-container {
  display: block;
}

/* Player Loading Spinner */
.player-loading-spinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(3, 7, 18, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 20;
  pointer-events: none;
}

.player-loading-spinner .spinner-circle {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(255, 255, 255, 0.25);
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: playerSpinnerRotate 0.8s linear infinite;
}

@keyframes playerSpinnerRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.lesson-video-section .player-center-play-btn {
  width: 64px;
  height: 64px;
  font-size: 1.8rem;
  box-shadow: 0 0 30px rgba(37, 99, 235, 0.75);
}

.lesson-video-section .player-subtitle-pill {
  position: absolute;
  bottom: 0.85rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.35rem 0.85rem;
  font-size: 0.875rem;
  max-width: 85%;
  border-radius: 8px;
  z-index: 10;
}

.lesson-video-section .player-controls-bar {
  padding: 0.75rem 1rem 0.85rem;
  background: #0b1120;
}

.lesson-video-section .player-timeline-wrapper {
  height: 16px;
  margin-bottom: 0.5rem;
}

.lesson-video-section .player-timeline-bg {
  height: 5px;
}

.lesson-video-section .player-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

.lesson-video-section .controls-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lesson-video-section .controls-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lesson-video-section .ctrl-btn {
  padding: 0.35rem 0.55rem;
  font-size: 0.9rem;
  border-radius: 6px;
}

.lesson-video-section .ctrl-btn.main-play-btn {
  font-size: 1.1rem;
}

.lesson-video-section .time-display {
  font-size: 0.82rem;
  font-weight: 700;
  color: #cbd5e1;
  margin-left: 0.25rem;
  white-space: nowrap;
}

.lesson-video-section .ctrl-btn.text-btn {
  font-size: 0.8rem;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
}
.quiz-layout { grid-template-columns:minmax(154px,1fr) minmax(0,860px); max-width:1100px; margin:0 auto; }.quiz-sticky-progress { max-width:1100px; margin-left:auto; margin-right:auto; }.quiz-hero { max-width:1100px; margin-left:auto; margin-right:auto; }
.quiz-breadcrumb-row { display:flex; align-items:center; gap:1rem; margin-bottom:1.4rem; flex-wrap:wrap; }
.quiz-breadcrumb-row nav { display:flex; gap:.55rem; flex-wrap:wrap; font-size:.88rem; color:var(--text-muted); }
.quiz-breadcrumb-row a { color:var(--brand-primary); text-decoration:none; font-weight:700; }
.quiz-hero { display:flex; justify-content:space-between; gap:2rem; align-items:center; padding:2rem; margin-bottom:1.2rem; border-radius:20px; color:white; background:linear-gradient(125deg,#102a55,#2563eb 58%,#19a974); box-shadow:0 14px 32px rgba(30,64,175,.2); }
.quiz-eyebrow { margin:0 0 .45rem; font-size:.73rem; font-weight:800; letter-spacing:.12em; color:inherit; opacity:.8; }
.quiz-hero h1 { margin:0; font-size:clamp(1.65rem,3vw,2.35rem); line-height:1.1; }
.quiz-hero p:not(.quiz-eyebrow) { max-width:680px; margin:.65rem 0 0; line-height:1.55; opacity:.92; }
.quiz-hero-stat { min-width:112px; padding:1rem; text-align:center; border:1px solid rgba(255,255,255,.3); border-radius:14px; background:rgba(255,255,255,.12); }
.quiz-hero-stat strong { display:block; font-size:2rem; line-height:1; }.quiz-hero-stat span { display:block; margin-top:.35rem; font-size:.75rem; opacity:.9; }
.quiz-sticky-progress { position:sticky; top:.65rem; z-index:8; margin-bottom:1.4rem; backdrop-filter:blur(12px); }
.quiz-layout { display:grid;  gap:1.25rem; justify-content:center; align-items:start; }
.quiz-sidebar { position:sticky; top:6.6rem; padding:.8rem; border:1px solid var(--border-color); border-radius:12px; background:var(--bg-card); box-shadow:var(--shadow-card); }
.quiz-sidebar-heading { display:flex; justify-content:space-between; align-items:center; margin-bottom:.85rem; color:var(--text-primary); }.quiz-sidebar-heading span { font-size:.78rem; color:var(--text-muted); }
.quiz-question-nav { display:grid; grid-template-columns:repeat(4,1fr); gap:.35rem; }.quiz-question-nav a { display:grid; place-items:center; aspect-ratio:1; border:1px solid var(--border-color); border-radius:7px; color:var(--text-secondary); background:var(--bg-primary); font-size:.72rem; font-weight:800; text-decoration:none; transition:.18s ease; }.quiz-question-nav a:hover { border-color:var(--brand-primary); color:var(--brand-primary); transform:translateY(-1px); }.quiz-question-nav a.is-correct { border-color:#10b981; background:#ecfdf5; color:#047857; }.quiz-question-nav a.is-incorrect { border-color:#ef4444; background:#fef2f2; color:#b91c1c; }.quiz-sidebar-hint { margin:.9rem 0 0; font-size:.72rem; line-height:1.8; color:var(--text-muted); }.quiz-dot { display:inline-block; width:8px; height:8px; margin-left:.3rem; border-radius:50%; background:var(--border-color); }.quiz-dot.answered { background:#10b981; }
.quiz-layout .quiz-container { width:100%; margin:0; }.quiz-card { scroll-margin-top:6.5rem; }.quiz-question-header { gap:.75rem; }.quiz-q-num small { font-weight:700; opacity:.65; }.quiz-status { margin-left:auto; padding:.3rem .55rem; border-radius:99px; background:var(--bg-tertiary); color:var(--text-muted); font-size:.72rem; font-weight:800; }.quiz-card[data-answered="true"] .quiz-status { color:#047857; background:#d1fae5; }
.quiz-question-text { font-size:clamp(1.1rem,2vw,1.32rem); line-height:1.45; }.quiz-option-label { width:100%; text-align:left; font:inherit; cursor:pointer; }.quiz-option-label .quiz-option-tick { margin-left:auto; width:19px; height:19px; border:2px solid currentColor; border-radius:50%; opacity:.28; }.quiz-option-label.correct .quiz-option-tick { opacity:1; background:currentColor; box-shadow:inset 0 0 0 3px var(--bg-card); }.quiz-option-label.incorrect .quiz-option-tick { opacity:1; }
.quiz-option-copy { display:flex; flex:1; min-width:0; flex-direction:column; gap:.35rem; }
.quiz-option-translation { display:none; padding:.4rem .55rem; border-radius:6px; background:rgba(37,99,235,.08); color:var(--text-secondary); font-size:.88rem; line-height:1.4; }
.quiz-explanation-box .translation-box { margin:.65rem 0 0; }
.quiz-card:not([data-answered="true"]) .quiz-explanation-box,
.quiz-card:not([data-answered="true"]) .quiz-explanation-box .trans-box { display:none !important; }
.quiz-result-actions { display:flex; justify-content:center; gap:.75rem; flex-wrap:wrap; }.quiz-primary-action,.quiz-secondary-action { border-radius:9px; padding:.7rem 1rem; font:inherit; font-weight:800; text-decoration:none; cursor:pointer; }.quiz-primary-action { border:0; color:#fff; background:var(--brand-primary); }.quiz-secondary-action { border:1px solid var(--border-color); color:var(--text-primary); background:var(--bg-primary); }
[data-theme="dark"] .quiz-question-nav a.is-correct { background:rgba(16,185,129,.15); color:#6ee7b7; } [data-theme="dark"] .quiz-question-nav a.is-incorrect { background:rgba(239,68,68,.15); color:#fca5a5; }.quiz-score-banner .quiz-eyebrow { color:var(--brand-primary); opacity:1; }
@media (max-width: 820px) { .quiz-layout { grid-template-columns:1fr; }.quiz-sidebar { position:static; }.quiz-question-nav { grid-template-columns:repeat(8,1fr); }.quiz-sidebar-hint { display:none; } }
@media (max-width: 560px) { .quiz-hero { padding:1.35rem; align-items:flex-start; flex-direction:column; gap:1rem; }.quiz-hero-stat { min-width:0; width:100%; text-align:left; }.quiz-hero-stat strong,.quiz-hero-stat span { display:inline; }.quiz-hero-stat span { margin-left:.35rem; }.quiz-question-nav { grid-template-columns:repeat(6,1fr); }.quiz-sticky-progress { top:0; border-radius:0; margin-left:-1rem; margin-right:-1rem; } }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
/* ==========================================================================
   TEMPLATE-LESSON.HTML TWO-COLUMN GRID & SIDEBAR WIDGET STYLES
   ========================================================================== */
.lesson-grid-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  margin-bottom: 3rem;
}
@media (max-width: 900px) {
  .lesson-grid-layout {
    grid-template-columns: 1fr;
  }
}
.lesson-main-col {
  min-width: 0;
}
.lesson-sidebar-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.lesson-card-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-sm);
}
.lesson-section-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.lesson-body-text {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}
.highlight-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-left: 4px solid #2563eb;
  border-radius: var(--radius-md);
  padding: 1rem;
}
.highlight-num {
  font-size: 1.3rem;
  font-weight: 800;
  color: #2563eb;
}
.highlight-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.widget-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}
.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.toc-list a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  transition: background 0.2s ease;
}
.toc-list a:hover {
  background: var(--bg-tertiary);
  color: #2563eb;
}

.transcript-section-card {
  padding: 1.25rem 1.5rem;
}
.transcript-details summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.transcript-details summary::-webkit-details-marker {
  display: none;
}
.transcript-badge {
  font-size: 0.75rem;
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-weight: 700;
}
.summary-arrow {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: transform 0.3s ease;
}
.transcript-details[open] .summary-arrow {
  transform: rotate(180deg);
}

/* ==========================================================================
   FULLSCREEN IMAGE LIGHTBOX MODAL (ZOOM ON CLICK)
   ========================================================================== */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    cursor: zoom-out;
}

.lightbox-modal.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-img-wrapper {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-img-wrapper img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transform: scale(0.92);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: #ffffff;
    padding: 0.5rem;
}

.lightbox-modal.active .lightbox-img-wrapper img {
    transform: scale(1);
}

.lightbox-caption {
    margin-top: 1rem;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    max-width: 600px;
}

.lightbox-close-btn {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #ef4444;
    color: white;
    border: none;
    font-size: 1.2rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

.lightbox-close-btn:hover {
    transform: scale(1.1);
}

.lesson-body-text img,
.quiz-media-box img,
.accordion-content img {
    cursor: zoom-in;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lesson-body-text img:hover,
.quiz-media-box img:hover,
.accordion-content img:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* ==========================================================================
   MARKDOWN LESSON CONTENT DESIGN SYSTEM (v2.5 Premium Typography & Cards)
   ========================================================================== */
.md-content-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    line-height: 1.75;
}

.md-heading-h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 1.75rem;
    margin-bottom: 0.85rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    letter-spacing: -0.01em;
}

.md-heading-h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 1.35rem;
    margin-bottom: 0.65rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.md-heading-icon {
    font-size: 1.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.md-paragraph {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 1.025rem;
    line-height: 1.75;
}

.md-bold {
    font-weight: 700;
    color: var(--text-primary);
}

.md-italic {
    font-style: italic;
    color: var(--text-secondary);
}

.md-code {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    background: rgba(37, 99, 235, 0.08);
    color: var(--brand-secondary);
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    border: 1px solid rgba(37, 99, 235, 0.15);
}

.md-link {
    color: var(--brand-secondary);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.md-link:hover {
    color: var(--brand-secondary-hover);
}

/* Clean, uncluttered list styling for Markdown */
.md-bullet-list,
.md-num-list {
    list-style: none;
    padding: 0;
    margin: 0.85rem 0 1.1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.md-bullet-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.35rem 0;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text-secondary);
}

.md-bullet-dot {
    color: var(--brand-secondary);
    font-size: 1.25rem;
    line-height: 1.3;
    flex-shrink: 0;
}

.md-bullet-content,
.md-num-content {
    font-size: 0.985rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

.md-num-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.35rem 0;
}

.md-num-badge {
    font-size: 0.75rem;
    font-weight: 800;
    color: white;
    background: var(--brand-secondary);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 0.2rem;
}


/* Callout Alerts (Note / Warning / Tip) */
.md-callout {
    padding: 1.1rem 1.35rem;
    border-radius: 12px;
    margin: 1.25rem 0;
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.md-callout-info {
    background: rgba(37, 99, 235, 0.06);
    border-color: rgba(37, 99, 235, 0.25);
    border-left: 4px solid var(--brand-secondary);
}

.md-callout-warning {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.3);
    border-left: 4px solid #f59e0b;
}

.md-callout-success {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.3);
    border-left: 4px solid #10b981;
}

.md-callout-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-primary);
}

/* ==========================================================================
   STRICT OVERFLOW & CONTAINMENT FIX FOR VIDEO PLAYER & SLIDE OVERLAYS
   ========================================================================== */
#customVideoPlayer,
.uk-custom-player-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: var(--radius-lg, 12px);
    background: #0f172a;
    cursor: pointer !important;
}

.player-screen-area {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: var(--radius-lg, 12px) var(--radius-lg, 12px) 0 0;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer !important;
}

.player-frame-img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    cursor: pointer !important;
}

.player-screen-area svg,
.player-screen-area image,
.player-screen-area img {
    max-width: 100% !important;
    position: relative;
}

body > img,
main > img,
.main-content > img:not(.md-img) {
    display: none !important;
}

/* ==========================================================================
   SCROLLBAR & OVERLAY STYLING FOR RULE TEXT BOXES
   ========================================================================== */
.rule-text-overlay {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: thin;
    scrollbar-color: var(--brand-secondary) rgba(0,0,0,0.05);
}

.rule-text-overlay::-webkit-scrollbar {
    width: 4px;
}

.rule-text-overlay::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
    border-radius: 4px;
}

.rule-text-overlay::-webkit-scrollbar-thumb {
    background: var(--brand-secondary);
    border-radius: 4px;
}

/* Full-width lesson slide deck matching the public lesson layout. */
.lesson-slides-full-width, .lesson-slides-fullwidth { width: 100%; }
.lesson-study-slides { margin: 0 0 1.25rem; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.lesson-slide-deck { width: 100%; height: auto; min-height: 0; max-height: none; aspect-ratio: 16 / 9; border: 1px solid var(--border-color); border-radius: 0; background: #090d16; overflow: hidden; }
.slide-thumbnail-wrapper { width: 100%; height: 100%; min-height: 0; max-height: none; border-radius: 0; }
.lesson-slide-image { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; border-radius: 0; transition: none !important; cursor: zoom-in; }
.slide-thumbnail-wrapper:hover .lesson-slide-image { transform: none; }
.slide-inline-actions { position: absolute; z-index: 26; top: 12px; right: 12px; display: flex; align-items: center; gap: .5rem; }
.slide-inline-action { min-height: 40px; padding: .55rem .8rem; border: 1px solid rgba(255,255,255,.24); border-radius: 8px; color: #fff; background: rgba(7,13,26,.82); backdrop-filter: blur(10px); font: 800 .8rem/1 Inter,system-ui,sans-serif; cursor: pointer; }
.slide-inline-action:hover { background: rgba(30,41,59,.94); }
.lesson-slide-inline-controls { border-radius: 99px; flex-wrap: nowrap; justify-content: center; }
.slide-inline-nav-btn, .slide-inline-nav-btn:hover { transform: none; }
.slide-filmstrip { display: none !important; }
.slide-filmstrip-item { flex: 0 0 92px; height: 58px; padding: 0; border: 2px solid transparent; border-radius: 0; overflow: hidden; background: #0f172a; cursor: pointer; }
.slide-filmstrip-item.active { border-color: #2563eb; }
.slide-filmstrip-item img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.lesson-slide-accessible-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.lesson-hero-stats { display:flex; gap:.6rem; flex-wrap:wrap; }
.lesson-hero-stats-below-slides { margin:0 0 1rem; }
.content-updated-date { margin:0 0 1.25rem; font-size:.8rem; color:var(--text-muted); }
.guide-page { max-width: 1000px; margin: 0 auto; padding: 2rem 1rem 4rem; }
.guide-page nav { margin-bottom: 1.5rem; color: var(--text-muted); font-size: .875rem; }
.guide-page article { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 16px; padding: clamp(1.25rem, 3vw, 2.5rem); box-shadow: var(--shadow-card); }
.guide-page h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; margin: 0 0 1rem; color: var(--text-primary); }
.guide-page h2 { margin: 2rem 0 .75rem; color: var(--text-primary); font-size: 1.35rem; }
.guide-page p, .guide-page li, .guide-page dd { color: var(--text-secondary); line-height: 1.75; }
.guide-page .guide-lead { font-size: 1.08rem; }
.guide-notice { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 12px; padding: 1rem; }
.guide-table-wrap { overflow-x: auto; }
.guide-page table { width: 100%; border-collapse: collapse; }
.guide-page th, .guide-page td { padding: .8rem; border: 1px solid var(--border-color); text-align: left; }
.guide-city-grid, .guide-feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .8rem; }
.guide-city-grid a, .guide-feature-grid > div { display: flex; flex-direction: column; gap: .25rem; padding: .9rem; border: 1px solid var(--border-color); border-radius: 10px; background: var(--bg-primary); text-decoration: none; }
.guide-city-grid small, .guide-feature-grid span { color: var(--text-muted); }
.slide-seo-content {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: normal !important;
  border: 0 !important;
}
.slide-seo-content summary { font-weight: 800; }
.slide-seo-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; margin-top: .8rem; }
.slide-seo-gallery figure { margin: 0; }
.slide-seo-gallery img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--border-color); border-radius: 0; }
.slide-seo-gallery figcaption { margin-top: .35rem; line-height: 1.45; }
.youtube-lesson-player { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.youtube-lesson-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lesson-grid-layout { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }
@media (max-width: 900px) { .lesson-grid-layout { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .slide-inline-actions { top: 7px; right: 7px; gap:.35rem; }
  .slide-inline-action { min-height:34px; padding:.4rem .55rem; font-size:.7rem; }
  .lesson-slide-inline-controls { bottom:7px; gap:.3rem; padding:.3rem .45rem; }
  .slide-inline-nav-btn { padding:.3rem .48rem; font-size:.7rem; }
  .slide-inline-counter { font-size:.7rem; }
}

/* Final mobile overrides */
footer { position: static !important; }
@media (max-width: 640px) {
  html { font-size: 14px; }
  body { -webkit-text-size-adjust: 100%; }
  .main-content { padding-left: 0.8rem; padding-right: 0.8rem; }
  .lesson-grid-layout { display: flex; flex-direction: column; gap: 1rem; }
  .lesson-sidebar-col { display: contents; }
  .lesson-sidebar-col .sidebar-widget:first-child { order: -1; }
  .lesson-main-col { order: 0; }
  .lesson-sidebar-col .sidebar-widget:not(:first-child) { order: 1; }
  .lesson-card-box { padding: 1.1rem; }
  #rulesListContainer { width: 100%; touch-action: pan-y pinch-zoom; }
  #ruleSearchInput { min-width: 0; width: 100%; }
  .rule-list-item-card { touch-action: pan-y pinch-zoom; }
  .slide-fullscreen-modal { width: 100vw; height: 100dvh; }
  .slide-modal-toolbar { padding: 0.4rem 0.55rem; gap: 0.4rem; }
  .slide-modal-info { display: none; }
  .slide-modal-actions { width: 100%; justify-content: space-between; gap: 0.3rem; }
  .slide-modal-btn, .slide-modal-nav-btn { padding: 0.4rem 0.5rem; font-size: 0.72rem; }
  .slide-modal-viewport { padding: 0; overflow: auto; touch-action: pan-x pan-y pinch-zoom; }
  .slide-modal-img-container, .slide-modal-img { max-width: 100vw; max-height: calc(100dvh - 48px); }
  .slide-modal-img { border-radius: 0; }
}

/* Mobile slide controls and zoom — final cascade layer. */
@media (max-width: 640px) {
  .slide-modal-toolbar {
    position: absolute;
    inset: 0 0 auto 0;
    z-index: 20;
    padding: .4rem .5rem;
    background: transparent !important;
    border: 0 !important;
    pointer-events: none;
  }
  .slide-modal-actions { pointer-events: auto; }
  .slide-modal-btn, .slide-modal-nav-btn, .slide-modal-close-btn,
  .slide-lang-select-wrapper, .slide-modal-actions .lang-select-btn {
    background: rgba(15, 23, 42, .38) !important;
    border-color: rgba(255,255,255,.25) !important;
    backdrop-filter: blur(5px);
  }
  .slide-modal-viewport { height: 100dvh; padding: 0; }
  .slide-modal-img-container { transform-origin: center; transition: transform .12s ease; }
  .slide-modal-img-container, .slide-modal-img { max-height: 100dvh; }
}



