/* ============================================================
   دِفتر — منصة تعلم المحاسبة المالية
   التصميم: نظام ألوان احترافي (كحلي × ذهبي) + دعم الوضع الليلي
   ============================================================ */

:root {
  --bg: #f4f7fb;
  --bg-soft: #eef2f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --ink: #0f172a;
  --muted: #5b6b85;
  --border: #e2e8f0;
  --primary: #1e3a8a;
  --primary-2: #312e81;
  --primary-3: #4338ca;
  --accent: #f59e0b;
  --accent-2: #fbbf24;
  --teal: #0d9488;
  --teal-soft: #d1fae5;
  --rose: #e11d48;
  --rose-soft: #ffe4e6;
  --gold-soft: #fef3c7;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, .08);
  --shadow: 0 10px 30px -12px rgba(15, 23, 42, .18);
  --shadow-lg: 0 24px 60px -20px rgba(15, 23, 42, .28);
  --grad: linear-gradient(135deg, #1e3a8a 0%, #312e81 45%, #4338ca 100%);
  --grad-accent: linear-gradient(135deg, #f59e0b, #fbbf24);
  --grad-teal: linear-gradient(135deg, #0d9488, #14b8a6);
  --radius: 18px;
  --radius-sm: 12px;
  --font: 'Tajawal', 'Cairo', 'Segoe UI', Tahoma, 'Noto Kufi Arabic', Arial, sans-serif;
  --transition: .25s cubic-bezier(.4, 0, .2, 1);
}

[data-theme="dark"] {
  --bg: #0b1120;
  --bg-soft: #0f172a;
  --surface: #131c31;
  --surface-2: #1a2438;
  --ink: #e8edf7;
  --muted: #94a3b8;
  --border: #243147;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .4);
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .5);
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .6);
  --grad: linear-gradient(135deg, #1e3a8a 0%, #312e81 45%, #4c1d95 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.85;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  transition: background .3s, color .3s;
}

::selection { background: rgba(245, 158, 11, .3); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-soft); }
::-webkit-scrollbar-thumb { background: linear-gradient(#1e3a8a, #4338ca); border-radius: 20px; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; }
img, svg { max-width: 100%; display: block; }

.container { width: min(1180px, 92%); margin-inline: auto; }

/* ---------- أدوات مساعدة ---------- */
.hidden { display: none !important; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 14px; border-radius: 999px;
  font-size: .82rem; font-weight: 700;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--muted);
}
.chip.gold { background: var(--gold-soft); border-color: #fcd34d; color: #92400e; }
.chip.teal { background: var(--teal-soft); border-color: #99f6e4; color: #115e59; }
.chip.blue { background: #dbeafe; border-color: #bfdbfe; color: #1e40af; }
.chip.rose { background: var(--rose-soft); border-color: #fecdd3; color: #9f1239; }

.section-head { margin: 0 0 14px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8rem; font-weight: 800; letter-spacing: .5px;
  color: var(--accent); text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--accent); border-radius: 2px; }
.section-title { font-size: clamp(1.5rem, 3.2vw, 2.1rem); font-weight: 800; margin: 6px 0 8px; line-height: 1.4; }
.section-sub { color: var(--muted); max-width: 640px; }

/* ---------- الأزرار ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 26px; border-radius: 14px;
  font-weight: 800; font-size: .98rem; letter-spacing: .2px;
  transition: var(--transition); position: relative; overflow: hidden;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: var(--grad); color: #fff;
  box-shadow: 0 10px 24px -10px rgba(49, 46, 129, .55);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -12px rgba(49, 46, 129, .6); }
.btn-accent {
  background: var(--grad-accent); color: #78350f;
  box-shadow: 0 10px 24px -10px rgba(245, 158, 11, .55);
}
.btn-accent:hover { transform: translateY(-2px); }
.btn-ghost {
  background: var(--surface); border: 1.5px solid var(--border); color: var(--ink);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); background: var(--surface-2); }
.btn-sm { padding: 9px 18px; font-size: .88rem; border-radius: 11px; }
.btn-block { width: 100%; }
.btn-danger {
  background: var(--rose, #e11d48); color: #fff; border: none;
  box-shadow: 0 10px 24px -12px rgba(225, 29, 72, .55);
}
.btn-danger:hover { transform: translateY(-2px); background: #be123c; }

/* ---------- قسم فيديو الشرح ---------- */
.video-sec { margin-top: 26px; }
.video-embed {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  border-radius: 16px; overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  box-shadow: var(--shadow-sm);
}
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.video-title { margin: 12px 2px 2px; font-weight: 800; color: var(--ink); font-size: .98rem; }
.video-channel { margin: 2px 2px 10px; font-size: .8rem; color: var(--muted); }
.video-note {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  background: #fefce8; border: 1px solid #fde68a; color: #78350f;
  border-radius: 14px; padding: 12px 16px; margin-top: 6px;
}
[data-theme="dark"] .video-note { background: #3f2d12; border-color: #78350f; color: #fde68a; }
.vn-text { flex: 1 1 260px; font-size: .85rem; line-height: 1.7; }
.vn-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.report-box {
  flex-basis: 100%; padding: 12px 14px; margin-top: 4px;
  background: rgba(225, 29, 72, .06); border: 1px dashed var(--rose, #e11d48);
  border-radius: 12px;
}
.report-box p { font-size: .85rem; margin-bottom: 10px; }
.report-box.hidden { display: none; }

/* ---------- شريط التنقل ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .3s;
}
.nav.scrolled { box-shadow: var(--shadow-sm); }
.nav-inner { display: flex; align-items: center; gap: 18px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.25rem; }
.brand .logo {
  width: 42px; height: 42px; border-radius: 13px;
  background: var(--grad); color: #fff;
  display: grid; place-items: center; font-size: 1.25rem;
  box-shadow: 0 8px 18px -8px rgba(49, 46, 129, .6);
}
.brand small { display: block; font-size: .62rem; font-weight: 700; color: var(--accent); letter-spacing: 1px; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.nav-link {
  padding: 9px 16px; border-radius: 10px; font-weight: 700; font-size: .93rem;
  color: var(--muted); transition: var(--transition); display: flex; align-items: center; gap: 7px;
}
.nav-link:hover { color: var(--ink); background: var(--surface-2); }
.nav-link.active { color: var(--primary); background: var(--surface-2); background: color-mix(in srgb, var(--primary) 9%, transparent); }

.theme-toggle {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center; font-size: 1.1rem;
  background: var(--surface-2); border: 1px solid var(--border);
  transition: var(--transition);
}
.theme-toggle:hover { transform: rotate(15deg) scale(1.05); }

.nav-progress { display: flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 700; color: var(--muted); }
.nav-progress .ring { width: 34px; height: 34px; }

.burger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.burger span { width: 22px; height: 2.5px; background: var(--ink); border-radius: 2px; transition: var(--transition); }

.mobile-menu {
  display: none; flex-direction: column; gap: 4px; padding: 10px 4% 18px;
  border-top: 1px solid var(--border);
}
.mobile-menu.open { display: flex; }
.mobile-menu .nav-link { padding: 12px 14px; }

/* ---------- الهيرو ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--grad);
  color: #fff; padding: clamp(60px, 9vw, 110px) 0 clamp(70px, 10vw, 130px);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 85% 15%, rgba(245, 158, 11, .28), transparent 38%),
    radial-gradient(circle at 12% 85%, rgba(20, 184, 166, .25), transparent 40%);
  pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}
.hero-grid {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22);
  padding: 7px 16px; border-radius: 999px; font-size: .85rem; font-weight: 700;
  backdrop-filter: blur(6px);
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; animation: pulse 2s infinite; }
.hero h1 {
  font-size: clamp(1.9rem, 4.6vw, 3.3rem); font-weight: 900; line-height: 1.35; margin: 18px 0 10px;
}
.hero h1 .gold { color: var(--accent-2); position: relative; white-space: nowrap; }
.hero h1 .gold::after {
  content: ""; position: absolute; right: 0; left: 0; bottom: 2px; height: 10px;
  background: rgba(245, 158, 11, .35); border-radius: 4px; z-index: -1;
}
.hero p.lead { font-size: clamp(1rem, 1.6vw, 1.18rem); color: rgba(255, 255, 255, .88); max-width: 620px; margin-bottom: 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 34px; }
.hero-cta .btn { font-size: 1.02rem; padding: 15px 30px; }
.hero-cta .btn-ghost-light {
  background: rgba(255, 255, 255, .1); color: #fff; border: 1.5px solid rgba(255, 255, 255, .35);
}
.hero-cta .btn-ghost-light:hover { background: rgba(255, 255, 255, .2); transform: translateY(-2px); }

.hero-stats { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: clamp(18px, 3vw, 44px); }
.stat { text-align: center; }
.stat b { display: block; font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 900; color: var(--accent-2); }
.stat span { font-size: .85rem; color: rgba(255, 255, 255, .78); font-weight: 600; }

/* بطاقات عائمة في الهيرو */
.hero-visual { position: relative; display: grid; place-items: center; min-height: 340px; }
.hero-card {
  position: absolute; background: #fff; color: var(--ink);
  border-radius: 18px; padding: 14px 18px; box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: .9rem;
  animation: floaty 5s ease-in-out infinite; width: max-content; max-width: 230px;
}
.hero-card .ic {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem; flex-shrink: 0;
}
.hero-card small { display: block; font-weight: 600; color: var(--muted); font-size: .74rem; }
.hero-card .val { color: var(--teal); font-size: .95rem; }
.hero-ring { width: 280px; height: 280px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--accent-2) 0 100%, rgba(255,255,255,.15) 0);
  position: relative; animation: pulse-ring 4s ease-in-out infinite; }
.hero-ring::before { content: ""; position: absolute; inset: 14px; border-radius: 50%; background: rgba(255,255,255,.1); backdrop-filter: blur(4px); }
.hero-ring .inner { position: relative; z-index: 2; text-align: center; }
.hero-ring .inner b { font-size: 2.6rem; font-weight: 900; color: #fff; display: block; }
.hero-ring .inner span { color: rgba(255,255,255,.85); font-weight: 700; font-size: .9rem; }
.hero-ring .inner em { display: block; font-style: normal; font-size: .7rem; color: var(--accent-2); font-weight: 800; margin-top: 4px; }

.hero-card.c1 { top: 6%; right: 4%; animation-delay: 0s; }
.hero-card.c2 { bottom: 10%; left: 0; animation-delay: .8s; }
.hero-card.c3 { bottom: -6%; right: 12%; animation-delay: 1.6s; }
.hero-card.c4 { top: 20%; left: 6%; animation-delay: 2.2s; }

/* ---------- أقسام عامة ---------- */
.section { padding: clamp(48px, 7vw, 84px) 0; }
.section.alt { background: var(--bg-soft); border-block: 1px solid var(--border); }
.section-head-center { text-align: center; }
.section-head-center .section-sub { margin-inline: auto; }
.section-head-center .eyebrow::before, .section-head-center .eyebrow::after { display: none; }

/* شريط مزايا */
.feature-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: -54px; position: relative; z-index: 5; }
.feature-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); transition: var(--transition); display: flex; gap: 14px; align-items: flex-start;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature-card .ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-size: 1.35rem; flex-shrink: 0; }
.feature-card b { display: block; font-size: .98rem; margin-bottom: 3px; }
.feature-card p { font-size: .82rem; color: var(--muted); line-height: 1.6; }

/* ---------- بطاقة المستوى ---------- */
.level-block {
  background: var(--surface); border: 1px solid var(--border); border-radius: 22px;
  padding: 26px; box-shadow: var(--shadow-sm); transition: var(--transition);
  scroll-margin-top: 100px;
}
.level-block:hover { box-shadow: var(--shadow); }
.level-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.level-icon {
  width: 62px; height: 62px; border-radius: 18px; display: grid; place-items: center;
  font-size: 1.9rem; color: #fff; flex-shrink: 0; box-shadow: var(--shadow);
}
.level-head h3 { font-size: 1.3rem; font-weight: 900; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.level-tag { font-size: .7rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; color: #fff; }
.level-desc { color: var(--muted); font-size: .9rem; margin-top: 4px; max-width: 720px; }

.level-meta { margin-inline-start: auto; text-align: center; }
.level-meta .ring { width: 74px; height: 74px; }
.level-meta b { display: block; font-size: .9rem; margin-top: 2px; }
.level-meta span { font-size: .72rem; color: var(--muted); }

.lesson-list { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.lesson-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface-2); border: 1.5px solid var(--border); border-radius: 14px;
  padding: 13px 16px; transition: var(--transition); text-align: start; width: 100%;
}
.lesson-row:hover { border-color: var(--primary); transform: translateX(-4px); box-shadow: var(--shadow-sm); }
.lesson-row.done { border-color: var(--teal); background: var(--teal-soft); border-color: color-mix(in srgb, var(--teal) 45%, var(--border)); background: color-mix(in srgb, var(--teal) 5%, var(--surface-2)); }
.lesson-row .lic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.2rem; background: var(--surface); border: 1px solid var(--border); flex-shrink: 0; }
.lesson-row .lbody { flex: 1; min-width: 0; }
.lesson-row .lbody b { display: block; font-size: .98rem; }
.lesson-row .lbody span { font-size: .78rem; color: var(--muted); }
.lesson-row .status { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font-size: .85rem; color: var(--muted); background: var(--surface); border: 1.5px solid var(--border); }
.lesson-row.done .status { background: var(--teal); border-color: var(--teal); color: #fff; }
.lesson-row .go { color: var(--muted); font-size: .9rem; transition: var(--transition); }
.lesson-row:hover .go { color: var(--primary); transform: translateX(-4px); }

/* ---------- محتوى الدرس ---------- */
.lesson-hero {
  background: var(--grad); color: #fff; padding: clamp(30px, 5vw, 54px) 0;
  position: relative; overflow: hidden;
}
.lesson-hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 90% 20%, rgba(245, 158, 11, .3), transparent 40%);
  pointer-events: none;
}
.crumb { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: rgba(255, 255, 255, .75); margin-bottom: 14px; position: relative; z-index: 2; }
.crumb a:hover { color: var(--accent-2); }
.crumb .sep { opacity: .5; }
.lesson-hero h1 { font-size: clamp(1.5rem, 3.6vw, 2.4rem); font-weight: 900; position: relative; z-index: 2; margin-bottom: 12px; }
.lesson-meta { display: flex; flex-wrap: wrap; gap: 10px; position: relative; z-index: 2; }
.meta-item { display: inline-flex; align-items: center; gap: 7px; background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.2); padding: 6px 14px; border-radius: 999px; font-size: .82rem; font-weight: 700; }

.lesson-body { display: grid; grid-template-columns: 250px 1fr; gap: 28px; padding: clamp(26px, 4vw, 44px) 0 70px; align-items: start; }

.toc {
  position: sticky; top: 92px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm);
}
.toc h4 { font-size: .85rem; color: var(--muted); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.toc a {
  display: block; padding: 8px 12px; border-radius: 9px; font-size: .86rem; font-weight: 700;
  color: var(--muted); transition: var(--transition); margin-bottom: 2px;
}
.toc a:hover { background: var(--surface-2); color: var(--primary); }
.toc a.active { background: color-mix(in srgb, var(--primary) 10%, transparent); color: var(--primary); }
.toc .toc-progress { margin-top: 14px; }

.progress-track { height: 8px; background: var(--bg-soft); border-radius: 99px; overflow: hidden; }
.progress-track .bar { height: 100%; border-radius: 99px; background: var(--grad-accent); transition: width .5s ease; }

.lesson-content { min-width: 0; }
.lesson-content > section { margin-bottom: 30px; scroll-margin-top: 100px; }
.lesson-content h3 { font-size: 1.25rem; font-weight: 900; display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--border); }
.lesson-content h3 .hnum { width: 30px; height: 30px; border-radius: 9px; background: var(--grad); color: #fff; font-size: .85rem; display: grid; place-items: center; flex-shrink: 0; }
.lesson-content h4 { font-size: 1.05rem; font-weight: 800; margin: 18px 0 8px; }
.lesson-content p { color: color-mix(in srgb, var(--ink) 85%, var(--muted)); margin-bottom: 10px; }
.lesson-content ul, .lesson-content ol { margin: 0 6px 14px 0; padding-right: 22px; color: color-mix(in srgb, var(--ink) 85%, var(--muted)); }
.lesson-content li { margin-bottom: 6px; }
.lesson-content li::marker { color: var(--accent); font-weight: 800; }
.lesson-content strong { color: var(--primary); }
[data-theme="dark"] .lesson-content strong { color: var(--accent-2); }
.lesson-content .highlight { background: var(--gold-soft); color: #92400e; padding: 1px 6px; border-radius: 6px; font-weight: 800; }
[data-theme="dark"] .lesson-content .highlight { color: #fbbf24; background: rgba(245, 158, 11, .15); }

.box { border-radius: var(--radius-sm); padding: 18px 20px; margin: 16px 0; border: 1px solid var(--border); position: relative; overflow: hidden; }
.box .box-title { font-weight: 900; font-size: .92rem; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.box p:last-child { margin-bottom: 0; }

.box.example { background: color-mix(in srgb, var(--teal) 6%, var(--surface)); border-color: color-mix(in srgb, var(--teal) 35%, var(--border)); }
.box.example .box-title { color: var(--teal); }
.box.tip { background: var(--gold-soft); border-color: #fcd34d; }
[data-theme="dark"] .box.tip { background: rgba(245, 158, 11, .1); }
.box.tip .box-title { color: #b45309; }
[data-theme="dark"] .box.tip .box-title { color: var(--accent-2); }
.box.formula { background: var(--grad); color: #fff; text-align: center; border: none; }
.box.formula .formula-text { font-size: clamp(1.1rem, 2.4vw, 1.5rem); font-weight: 900; letter-spacing: .5px; direction: ltr; }
.box.formula .box-title { justify-content: center; color: var(--accent-2); }
.box.note { background: #dbeafe; border-color: #bfdbfe; }
[data-theme="dark"] .box.note { background: rgba(59, 130, 246, .12); border-color: rgba(59, 130, 246, .3); }
.box.note .box-title { color: #1d4ed8; }
[data-theme="dark"] .box.note .box-title { color: #93c5fd; }

.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); margin: 14px 0; }
table.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 480px; }
.data-table th {
  background: var(--grad); color: #fff; padding: 11px 14px; text-align: start; font-weight: 800; white-space: nowrap;
}
.data-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.data-table tr:nth-child(even) td { background: var(--surface-2); }
.data-table tr:last-child td { border-bottom: none; }
.data-table td.num, .data-table th.num { text-align: start; font-variant-numeric: tabular-nums; direction: ltr; }
.data-table tr.total td { background: var(--gold-soft); font-weight: 900; }
[data-theme="dark"] .data-table tr.total td { background: rgba(245, 158, 11, .14); }

/* أهداف التعلم */
.objectives { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; margin: 20px 0; }
.objective {
  display: flex; gap: 10px; align-items: flex-start; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; font-size: .9rem; font-weight: 700;
}
.objective .check { width: 22px; height: 22px; border-radius: 50%; background: var(--grad-teal); color: #fff; display: grid; place-items: center; font-size: .75rem; flex-shrink: 0; margin-top: 2px; }

/* ---------- الاختبار ---------- */
.quiz-card {
  background: var(--surface); border: 2px solid var(--border); border-radius: 20px;
  padding: clamp(20px, 4vw, 30px); margin-top: 14px;
}
.quiz-q { font-weight: 900; font-size: 1.05rem; margin-bottom: 16px; display: flex; gap: 10px; align-items: flex-start; }
.quiz-q .qnum { background: var(--grad); color: #fff; border-radius: 9px; min-width: 30px; height: 30px; display: grid; place-items: center; font-size: .85rem; flex-shrink: 0; margin-top: 3px; }
.quiz-options { display: grid; gap: 10px; }
.quiz-opt {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px;
  border: 1.5px solid var(--border); border-radius: 13px; font-weight: 700; font-size: .94rem;
  background: var(--surface-2); transition: var(--transition); text-align: start; width: 100%;
}
.quiz-opt .letter { width: 28px; height: 28px; border-radius: 9px; background: var(--surface); border: 1.5px solid var(--border); display: grid; place-items: center; font-size: .78rem; font-weight: 800; color: var(--muted); flex-shrink: 0; transition: var(--transition); }
.quiz-opt:hover:not(:disabled) { border-color: var(--primary); transform: translateX(-3px); }
.quiz-opt:hover:not(:disabled) .letter { background: var(--primary); color: #fff; border-color: var(--primary); }
.quiz-opt.correct { background: var(--teal-soft); border-color: var(--teal); color: #115e59; }
.quiz-opt.correct .letter { background: var(--teal); color: #fff; border-color: var(--teal); }
.quiz-opt.wrong { background: var(--rose-soft); border-color: var(--rose); color: #9f1239; }
.quiz-opt.wrong .letter { background: var(--rose); color: #fff; border-color: var(--rose); }
.quiz-opt:disabled { cursor: default; opacity: .95; }
.quiz-feedback { margin-top: 14px; border-radius: 12px; padding: 12px 16px; font-size: .9rem; font-weight: 700; display: none; }
.quiz-feedback.show { display: block; animation: fadeUp .35s ease; }
.quiz-feedback.good { background: var(--teal-soft); color: #115e59; }
.quiz-feedback.bad { background: var(--rose-soft); color: #9f1239; }

.quiz-result {
  text-align: center; padding: 26px; border-radius: 18px; margin-top: 16px;
  background: var(--bg-soft); border: 1.5px dashed var(--border);
}
.quiz-result b { font-size: 1.5rem; display: block; }
.quiz-result .ring { width: 90px; height: 90px; margin: 0 auto 10px; }

/* ---------- التنقل بين الدروس ---------- */
.lesson-nav { display: flex; justify-content: space-between; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.lesson-nav .btn { max-width: 48%; }
.lesson-nav .btn span { font-size: .78rem; display: block; font-weight: 600; opacity: .75; }
.lesson-nav .btn b { font-size: .92rem; }
.lesson-nav .btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }

.complete-zone { margin-top: 26px; }

/* ---------- الأدوات التفاعلية ---------- */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 22px; }
.tool-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 22px;
  padding: 26px; box-shadow: var(--shadow-sm); transition: var(--transition); display: flex; flex-direction: column;
}
.tool-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.tool-head { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.tool-head .ic { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; font-size: 1.5rem; color: #fff; flex-shrink: 0; }
.tool-card h3 { font-size: 1.15rem; font-weight: 900; }
.tool-card > p { color: var(--muted); font-size: .88rem; margin-bottom: 16px; }

.calc-form { display: grid; gap: 12px; margin-top: 10px; }
.field label { display: block; font-size: .82rem; font-weight: 800; color: var(--muted); margin-bottom: 5px; }
.field input, .field select {
  width: 100%; padding: 11px 14px; border-radius: 11px; border: 1.5px solid var(--border);
  background: var(--surface-2); color: var(--ink); font-size: .95rem; font-weight: 700; transition: var(--transition);
  direction: ltr; text-align: right;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 12%, transparent); }
.field select { direction: rtl; }
.calc-result {
  margin-top: 14px; border-radius: 14px; background: var(--grad); color: #fff;
  padding: 16px 18px; display: none;
}
.calc-result.show { display: block; animation: fadeUp .35s ease; }
.calc-result .row { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; font-size: .9rem; }
.calc-result .row + .row { border-top: 1px dashed rgba(255,255,255,.25); }
.calc-result .row b { font-size: 1.05rem; font-weight: 900; color: var(--accent-2); }
.calc-result .row.total { font-size: 1.05rem; }
.calc-result .row.total b { font-size: 1.35rem; }

.legend-row { display: flex; align-items: center; justify-content: space-between; font-size: .85rem; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.legend-row b { color: var(--teal); }

/* مدرب القيود */
.trainer-stage {
  border: 1.5px dashed color-mix(in srgb, var(--primary) 45%, var(--border));
  border-radius: 16px; padding: 18px; background: var(--surface-2); margin-bottom: 14px;
}
.trainer-stage .tx { font-weight: 900; font-size: .98rem; margin-bottom: 6px; display: flex; gap: 8px; align-items: flex-start; }
.trainer-stage .tx .badge { background: var(--grad); color: #fff; border-radius: 8px; padding: 2px 10px; font-size: .72rem; flex-shrink: 0; }
.trainer-stage small { color: var(--muted); font-size: .8rem; }
.entry-line { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; margin-bottom: 10px; }
.entry-line .tag { font-weight: 800; font-size: .85rem; width: 100%; }
.feedback-line { font-size: .86rem; font-weight: 700; border-radius: 10px; padding: 9px 12px; margin-top: 8px; display: none; }
.feedback-line.show { display: block; }
.feedback-line.good { background: var(--teal-soft); color: #115e59; }
.feedback-line.bad { background: var(--rose-soft); color: #9f1239; }
.trainer-score { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--muted); font-size: .85rem; }

/* ---------- المسرد ---------- */
.glossary-search { position: relative; max-width: 520px; margin: 0 auto 26px; }
.glossary-search input {
  width: 100%; padding: 15px 20px 15px 50px; border-radius: 16px; border: 1.5px solid var(--border);
  background: var(--surface); font-size: 1rem; font-weight: 700; color: var(--ink);
  box-shadow: var(--shadow-sm); transition: var(--transition);
}
.glossary-search input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 5px color-mix(in srgb, var(--primary) 12%, transparent); }
.glossary-search .search-ic { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 1.1rem; }
.glossary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.term-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px;
  transition: var(--transition);
}
.term-card:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.term-card b { display: flex; align-items: center; gap: 8px; font-size: .98rem; margin-bottom: 4px; }
.term-card b .t-ic { font-size: 1rem; }
.term-card .en { font-size: .72rem; color: var(--accent); font-weight: 800; direction: ltr; display: inline-block; margin-bottom: 6px; }
.term-card p { font-size: .85rem; color: var(--muted); }
.term-card .ex { font-size: .8rem; color: var(--teal); font-weight: 700; margin-top: 8px; display: block; }

/* ---------- الموارد ---------- */
.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.res-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 24px;
  transition: var(--transition); display: block; position: relative; overflow: hidden;
}
.res-card::before { content: ""; position: absolute; top: 0; right: 0; left: 0; height: 4px; background: var(--grad-accent); opacity: 0; transition: var(--transition); }
.res-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.res-card:hover::before { opacity: 1; }
.res-card .ric { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-size: 1.4rem; margin-bottom: 12px; }
.res-card h3 { font-size: 1.02rem; font-weight: 900; margin-bottom: 6px; }
.res-card p { font-size: .85rem; color: var(--muted); margin-bottom: 10px; }
.res-card .tag { font-size: .72rem; font-weight: 800; color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, transparent); padding: 3px 10px; border-radius: 999px; }
[data-theme="dark"] .res-card .tag { color: #93c5fd; }

/* ---------- الشهادة ---------- */
.cert-wrap { display: grid; place-items: center; padding: 30px 0 10px; }
.certificate {
  width: min(860px, 100%); background: var(--surface); border-radius: 22px;
  border: 8px double var(--accent); padding: clamp(24px, 5vw, 50px); text-align: center;
  box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.certificate::before { content: "📜"; position: absolute; font-size: 3.4rem; opacity: .08; inset: 50% auto auto 50%; transform: translate(-50%, -50%) rotate(-12deg); }
.cert-badge { font-size: 2.6rem; margin-bottom: 8px; }
.certificate .platform { font-weight: 900; font-size: 1.2rem; color: var(--primary); letter-spacing: 1px; }
[data-theme="dark"] .certificate .platform { color: var(--accent-2); }
.certificate h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin: 10px 0 4px; }
.certificate .cert-name { font-size: clamp(1.5rem, 4vw, 2.4rem); font-weight: 900; color: var(--accent); margin: 12px 0; border-bottom: 2px dashed var(--border); display: inline-block; padding: 0 20px 6px; }
.certificate .cert-text { color: var(--muted); font-size: .95rem; max-width: 520px; margin: 0 auto 16px; }
.cert-stats { display: flex; justify-content: center; gap: 26px; margin: 18px 0; flex-wrap: wrap; }
.cert-stats div { font-size: .82rem; color: var(--muted); }
.cert-stats b { display: block; font-size: 1.15rem; color: var(--ink); }
.cert-sign { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 26px; gap: 20px; flex-wrap: wrap; }
.cert-sign .sig { text-align: center; font-size: .8rem; color: var(--muted); }
.cert-sign .sig .line { width: 170px; height: 2px; background: var(--border); margin-bottom: 6px; }
.cert-actions { display: flex; gap: 12px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }

/* ---------- إشعار الإنجاز ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 140%);
  background: var(--grad); color: #fff; padding: 14px 24px; border-radius: 14px;
  box-shadow: var(--shadow-lg); font-weight: 800; font-size: .95rem; z-index: 200;
  transition: transform .45s cubic-bezier(.34, 1.56, .64, 1); display: flex; align-items: center; gap: 10px;
}
.toast.show { transform: translate(-50%, 0); }
.toast .t-ic { font-size: 1.3rem; }

/* ---------- التذييل ---------- */
.footer { background: var(--bg-soft); border-top: 1px solid var(--border); padding: 44px 0 26px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; margin-bottom: 30px; }
.footer h4 { font-size: 1rem; font-weight: 900; margin-bottom: 12px; }
.footer p, .footer a { font-size: .86rem; color: var(--muted); }
.footer a:hover { color: var(--primary); }
.footer .flinks { display: grid; gap: 8px; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 20px; text-align: center; font-size: .8rem; color: var(--muted); }

/* ---------- رسائل فارغة / حالات ---------- */
.empty-state { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty-state .big { font-size: 3rem; margin-bottom: 10px; }

.loading { display: grid; place-items: center; padding: 80px 0; }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--border); border-top-color: var(--primary); animation: spin 1s linear infinite; }

/* ---------- الرسوم المتحركة ---------- */
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .5; transform: scale(1.35); } }
@keyframes pulse-ring { 0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, .45); } 50% { box-shadow: 0 0 0 22px rgba(245, 158, 11, 0); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal[data-delay="1"] { transition-delay: .1s; }
.reveal[data-delay="2"] { transition-delay: .2s; }
.reveal[data-delay="3"] { transition-delay: .3s; }

/* قطرات احتفالية */
.confetti { position: fixed; top: -12px; width: 10px; height: 16px; z-index: 300; pointer-events: none; border-radius: 3px; animation: confetti-fall linear forwards; }
@keyframes confetti-fall { to { transform: translateY(108vh) rotate(720deg); opacity: 0; } }

/* ---------- مركز الألعاب والمحاكيات ---------- */
.games-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.game-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px; overflow: hidden;
  transition: var(--transition); display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
}
.game-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.game-card .gc-head { padding: 22px 22px 0; display: flex; align-items: center; gap: 14px; }
.game-card .gc-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 1.7rem; color: #fff; flex-shrink: 0; }
.game-card h3 { font-size: 1.12rem; font-weight: 900; }
.game-card .gc-body { padding: 14px 22px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.game-card p { font-size: .86rem; color: var(--muted); }
.game-card .gc-meta { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.game-card .best { font-size: .76rem; font-weight: 800; color: var(--accent); background: var(--gold-soft); padding: 4px 10px; border-radius: 999px; }
.game-card .gc-cta { margin-top: 12px; }
.section-badge { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 800; padding: 5px 14px; border-radius: 999px; }

/* ---------- شاشات اللعب ---------- */
.game-screen { max-width: 760px; margin: 0 auto; }
.game-topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.game-topbar .gt-item { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: .92rem; background: var(--surface); border: 1px solid var(--border); padding: 9px 16px; border-radius: 12px; }
.game-topbar .gt-item b { color: var(--accent); font-size: 1.05rem; }
.game-stage { background: var(--surface); border: 1.5px solid var(--border); border-radius: 20px; padding: clamp(20px, 4vw, 30px); box-shadow: var(--shadow-sm); }
.game-stage h3.q { font-size: 1.2rem; font-weight: 900; margin-bottom: 18px; line-height: 1.7; }
.game-answers { display: grid; gap: 10px; }
.game-answer {
  padding: 14px 18px; border: 1.5px solid var(--border); border-radius: 13px; background: var(--surface-2);
  font-weight: 800; font-size: .98rem; text-align: start; transition: var(--transition);
}
.game-answer:hover:not(:disabled) { border-color: var(--primary); transform: translateX(-3px); }
.game-answer.correct { background: var(--teal-soft); border-color: var(--teal); color: #115e59; }
.game-answer.wrong { background: var(--rose-soft); border-color: var(--rose); color: #9f1239; }
.game-answer:disabled { cursor: default; opacity: .9; }
.game-feedback { margin-top: 14px; border-radius: 12px; padding: 12px 16px; font-weight: 800; font-size: .92rem; display: none; }
.game-feedback.show { display: block; animation: fadeUp .3s ease; }
.game-feedback.good { background: var(--teal-soft); color: #115e59; }
.game-feedback.bad { background: var(--rose-soft); color: #9f1239; }
.game-over { text-align: center; padding: 30px 10px; }
.game-over .big { font-size: 3.2rem; margin-bottom: 8px; }
.game-over h3 { font-size: 1.5rem; font-weight: 900; margin-bottom: 6px; }
.game-over p { color: var(--muted); margin-bottom: 18px; }
.game-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }

/* ترتيب الدورة */
.cycle-steps { display: grid; gap: 8px; }
.cycle-step {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--surface-2);
  border: 1.5px solid var(--border); border-radius: 12px; font-weight: 800; font-size: .92rem;
  transition: var(--transition); text-align: start; width: 100%;
}
.cycle-step:hover:not(:disabled) { border-color: var(--primary); transform: translateX(-3px); }
.cycle-step.picked { background: color-mix(in srgb, var(--teal) 10%, var(--surface-2)); border-color: var(--teal); color: var(--teal); cursor: default; }
.cycle-step.picked .cs-num { background: var(--teal); color: #fff; }
.cycle-step .cs-num { width: 30px; height: 30px; border-radius: 9px; background: var(--surface); border: 1.5px solid var(--border); display: grid; place-items: center; font-size: .8rem; flex-shrink: 0; transition: var(--transition); }
.cycle-order { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; min-height: 42px; }
.cycle-order .co-chip { background: var(--grad); color: #fff; padding: 8px 14px; border-radius: 999px; font-size: .82rem; font-weight: 800; animation: fadeUp .25s ease; }

/* بطاقات المطابقة */
.match-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.match-card { min-height: 110px; border-radius: 14px; border: 2px solid var(--border); background: var(--surface-2); display: grid; place-items: center; text-align: center; padding: 14px; font-weight: 800; font-size: .9rem; cursor: pointer; transition: var(--transition); position: relative; }
.match-card:hover:not(.flipped):not(.matched) { border-color: var(--primary); transform: scale(1.02); }
.match-card.flipped { background: var(--surface); border-color: var(--accent); cursor: default; }
.match-card.matched { background: var(--teal-soft); border-color: var(--teal); color: #115e59; cursor: default; opacity: .75; }
.match-card .mc-label { font-size: .68rem; color: var(--muted); font-weight: 700; position: absolute; top: 8px; right: 10px; }

/* المؤقت */
.timer-wrap { display: flex; align-items: center; gap: 10px; }
.timer-bar { width: 140px; height: 8px; background: var(--bg-soft); border-radius: 99px; overflow: hidden; }
.timer-bar .bar { height: 100%; background: var(--grad-accent); border-radius: 99px; transition: width .3s linear; }

/* ---------- المحاكيات ---------- */
.sim-screen { max-width: 820px; margin: 0 auto; }
.sim-panel { background: var(--surface); border: 1.5px solid var(--border); border-radius: 20px; padding: clamp(18px, 3.5vw, 26px); box-shadow: var(--shadow-sm); margin-bottom: 16px; }
.sim-panel h3 { font-size: 1.08rem; font-weight: 900; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.sim-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 14px 0; }
.sim-stat { background: var(--surface-2); border: 1px solid var(--border); border-radius: 13px; padding: 12px 14px; text-align: center; }
.sim-stat b { display: block; font-size: 1.2rem; color: var(--primary); }
[data-theme="dark"] .sim-stat b { color: var(--accent-2); }
.sim-stat span { font-size: .72rem; color: var(--muted); font-weight: 700; }
.sim-cash-positive { color: var(--teal) !important; }
.sim-cash-negative { color: var(--rose) !important; }
.sim-table { width: 100%; border-collapse: collapse; font-size: .86rem; margin-top: 10px; }
.sim-table th { background: var(--grad); color: #fff; padding: 9px 12px; text-align: start; font-weight: 800; }
.sim-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); }
.sim-table tr:last-child td { border-bottom: none; }
.sim-history { max-height: 220px; overflow-y: auto; border: 1px solid var(--border); border-radius: 12px; margin-top: 12px; }
.sim-history .h-row { display: flex; justify-content: space-between; gap: 10px; padding: 9px 14px; border-bottom: 1px dashed var(--border); font-size: .85rem; }
.sim-history .h-row:last-child { border-bottom: none; }
.sim-verdict { border-radius: 16px; padding: 22px; text-align: center; margin-top: 16px; font-weight: 800; }
.sim-verdict.good { background: var(--teal-soft); color: #115e59; }
.sim-verdict.bad { background: var(--rose-soft); color: #9f1239; }
.sim-verdict.neutral { background: var(--gold-soft); color: #92400e; }

/* شريط تقدم المحاكي */
.sim-progress { display: flex; gap: 6px; margin: 12px 0; }
.sim-progress .sp { flex: 1; height: 8px; border-radius: 99px; background: var(--bg-soft); border: 1px solid var(--border); }
.sim-progress .sp.done { background: var(--grad-accent); border-color: transparent; }

@media (max-width: 768px) {
  .match-grid { grid-template-columns: repeat(2, 1fr); }
  .game-topbar { justify-content: center; }
}

/* ---------- التجاوب ---------- */
@media (max-width: 1024px) {
  .lesson-body { grid-template-columns: 1fr; }
  .toc { position: static; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { min-height: 320px; margin-top: 10px; }
  .feature-strip { grid-template-columns: repeat(2, 1fr); margin-top: -30px; }
}

@media (max-width: 768px) {
  .nav-links, .nav-progress { display: none; }
  .burger { display: flex; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 18px; width: 100%; }
  .hero-card { transform: scale(.85); }
  .hero-card.c1 { right: 0; } .hero-card.c3 { right: 8%; }
  .feature-strip { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .level-meta { margin-inline-start: 0; }
  .lesson-nav .btn { max-width: 100%; }
}

@media (max-width: 480px) {
  .hero-visual { display: none; }
  .section { padding: 40px 0; }
  .tools-grid { grid-template-columns: 1fr; }
}
