/* ================================================================
   ISHTAR Online Training — catalog, checkout, student portal,
   lesson player and lesson-content components.
   Builds on css/styles.css tokens (light/dark + RTL aware).
================================================================ */

/* ── Shared ──────────────────────────────────────────────────── */
.ot-section { padding: 56px 0 96px; }
.ot-notice { padding: 14px 18px; border-radius: var(--radius); font-size: .9rem; line-height: 1.6; margin: 0 0 22px; border: 1px solid var(--border-med); background: var(--bg3); color: var(--text); }
.ot-notice.ok { background: rgba(0,166,119,.08); border-color: rgba(0,166,119,.35); }
.ot-notice.err { background: rgba(217,43,43,.07); border-color: rgba(217,43,43,.35); }
.ot-notice strong { color: var(--white); }
.ot-muted { color: var(--text-muted); }
.ot-empty { text-align: center; padding: 72px 20px; color: var(--text-muted); max-width: 520px; margin: 0 auto; }
.ot-empty h2 { font-size: 1.3rem; color: var(--white); margin-bottom: 10px; }
.ot-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ── Catalog ─────────────────────────────────────────────────── */
.ot-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
.ot-toolbar p { margin: 0; color: var(--text-muted); font-size: .92rem; }
.ot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px; }
.ot-card { display: flex; flex-direction: column; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--card-shadow); color: inherit; text-decoration: none; transition: box-shadow var(--transition), border-color var(--transition); }
.ot-card:hover, .ot-card:focus-visible { box-shadow: var(--card-shadow-hover); border-color: var(--blue-border); }
.ot-thumb { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; display: block; background: var(--bg3); }
.ot-thumb-fallback { aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; background: radial-gradient(120% 120% at 80% 0%, #1A3A66 0%, #0D1A2E 55%, #08101D 100%); color: #F4EEE3; border-bottom: 2px solid #C9A06B; font-family: var(--f-display); font-size: 1.15rem; font-weight: 600; padding: 24px; text-align: center; line-height: 1.3; }
.ot-card-body { padding: 22px 24px 8px; flex: 1; }
.ot-card-body h3 { font-size: 1.12rem; line-height: 1.35; color: var(--white); margin-bottom: 10px; }
.ot-card-body p { font-size: .88rem; color: var(--text-muted); line-height: 1.65; margin: 0; }
.ot-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 24px 22px; }
.ot-duration { font-size: .8rem; color: var(--text-muted); display: inline-flex; align-items: center; gap: 6px; }
.ot-duration svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }
.ot-price { font-family: var(--f-display); font-weight: 700; font-size: 1.15rem; color: var(--blue-light); }

/* ── Course detail ───────────────────────────────────────────── */
.ot-detail { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 48px; align-items: start; }
.ot-detail-main .ot-thumb, .ot-detail-main .ot-thumb-fallback { border-radius: var(--radius-lg); margin-bottom: 32px; }
.ot-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 40px; }
.ot-fact { background: var(--bg-card); padding: 18px 20px; }
.ot-fact b { display: block; font-family: var(--f-display); font-size: 1.02rem; color: var(--white); margin-bottom: 2px; }
.ot-fact span { font-size: .8rem; color: var(--text-muted); }
.ot-block { margin-bottom: 40px; }
.ot-block h2 { font-size: 1.35rem; color: var(--white); margin-bottom: 14px; }
.ot-block p { color: var(--text); line-height: 1.85; margin: 0 0 1em; max-width: 70ch; }
.ot-benefits { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ot-benefits li { display: flex; gap: 12px; align-items: flex-start; line-height: 1.65; color: var(--text); }
.ot-benefits li::before { content: ''; flex: 0 0 20px; height: 20px; margin-top: 2px; border-radius: 50%; background: var(--blue-dim) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230052FF' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 12px no-repeat; border: 1px solid var(--blue-border); }
.ot-outline { list-style: none; padding: 0; margin: 0; counter-reset: ln; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.ot-outline li { counter-increment: ln; display: flex; gap: 14px; align-items: center; padding: 14px 18px; border-top: 1px solid var(--border); background: var(--bg-card); font-size: .94rem; }
.ot-outline li:first-child { border-top: 0; }
.ot-outline li::before { content: counter(ln); flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--bg3); color: var(--text-muted); display: flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 600; }
.ot-outline .ot-scr { margin-inline-start: auto; color: var(--text-dim); font-size: .78rem; white-space: nowrap; }

/* Buy box */
.ot-buy { position: sticky; top: 92px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--card-shadow); padding: 28px 26px; }
.ot-buy-price { font-family: var(--f-display); font-size: 2rem; font-weight: 700; color: var(--white); line-height: 1.1; }
.ot-buy-sub { font-size: .82rem; color: var(--text-muted); margin: 6px 0 22px; }
.ot-buy h3 { font-size: .95rem; color: var(--white); margin: 22px 0 10px; }
.ot-buy .form-group { margin-bottom: 14px; }
.ot-buy .form-group input { padding: 11px 13px; }
.ot-choice { display: grid; gap: 10px; }
.ot-opt { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px; border: 1.5px solid var(--input-border); border-radius: var(--radius); cursor: pointer; transition: border-color var(--transition), background var(--transition); }
.ot-opt input { margin-top: 3px; accent-color: var(--blue); flex: 0 0 auto; }
.ot-opt:has(input:checked) { border-color: var(--blue); background: var(--blue-dim); }
.ot-opt:focus-within { box-shadow: 0 0 0 3px var(--input-focus); }
.ot-opt-text { flex: 1; font-size: .88rem; line-height: 1.45; }
.ot-opt-text b { display: block; color: var(--white); font-weight: 600; }
.ot-opt-text small { color: var(--text-muted); font-size: .78rem; }
.ot-opt-price { font-weight: 700; font-size: .86rem; color: var(--blue-light); white-space: nowrap; }
.ot-paybox { margin-top: 12px; padding: 14px 16px; border-radius: var(--radius); background: var(--bg3); border: 1px dashed var(--border-med); font-size: .86rem; line-height: 1.7; }
.ot-paybox[hidden] { display: none; }
.ot-paybox dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; margin: 0; }
.ot-paybox dt { color: var(--text-muted); }
.ot-paybox dd { margin: 0; color: var(--white); font-weight: 600; overflow-wrap: anywhere; }
.ot-paybox p { margin: 8px 0 0; color: var(--text-muted); }
.ot-total { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0 4px; margin-top: 18px; border-top: 1px solid var(--border); }
.ot-total span { font-size: .86rem; color: var(--text-muted); }
.ot-total b { font-family: var(--f-display); font-size: 1.3rem; color: var(--white); }
.ot-file { font-size: .84rem; color: var(--text-muted); }
.ot-file input[type=file] { width: 100%; padding: 10px; border: 1.5px dashed var(--input-border); border-radius: var(--radius); background: var(--input-bg); color: var(--text); font-size: .82rem; }
.ot-buy .btn { width: 100%; justify-content: center; margin-top: 18px; }
.ot-fineprint { font-size: .76rem; color: var(--text-dim); margin-top: 12px; line-height: 1.6; }
.ot-confirm { max-width: 640px; margin: 0 auto; text-align: center; }
.ot-confirm h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 14px; }
.ot-confirm .ot-ref { display: inline-block; font-family: var(--f-mono); font-size: 1.1rem; letter-spacing: .06em; padding: 10px 18px; border-radius: var(--radius); background: var(--blue-dim); border: 1px solid var(--blue-border); color: var(--blue-light); margin: 8px 0 22px; }
.ot-confirm p { color: var(--text-muted); line-height: 1.8; }

/* ── Student portal ──────────────────────────────────────────── */
.ml-auth { max-width: 440px; margin: 0 auto; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--card-shadow); padding: 36px 34px; }
.ml-auth h1 { font-size: 1.6rem; margin-bottom: 8px; }
.ml-auth > p { color: var(--text-muted); font-size: .92rem; margin-bottom: 24px; line-height: 1.6; }
.ml-auth .btn { width: 100%; justify-content: center; }
.ml-auth-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; font-size: .84rem; flex-wrap: wrap; }
.ml-auth-links a { color: var(--blue-light); }
.ml-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
.ml-head h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0; }
.ml-head p { margin: 6px 0 0; color: var(--text-muted); }
.ml-head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ml-head-actions form { display: inline; }
.ml-list { display: grid; gap: 18px; }
.ml-item { display: grid; grid-template-columns: 220px minmax(0, 1fr) auto; gap: 24px; align-items: center; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--card-shadow); padding: 16px; }
.ml-item .ot-thumb, .ml-item .ot-thumb-fallback { border-radius: var(--radius); font-size: .95rem; }
.ml-item h2 { font-size: 1.15rem; color: var(--white); margin: 6px 0 12px; line-height: 1.35; }
.ml-meta { font-size: .8rem; color: var(--text-muted); margin-top: 8px; }
.ml-bar { height: 8px; border-radius: 99px; background: var(--bg3); overflow: hidden; }
.ml-bar i { display: block; height: 100%; background: var(--blue); border-radius: 99px; }
.ml-bar-row { display: flex; align-items: center; gap: 12px; max-width: 420px; }
.ml-bar-row .ml-bar { flex: 1; }
.ml-bar-row b { font-size: .82rem; color: var(--text-muted); min-width: 38px; }
.ml-pill { display: inline-block; font-size: .72rem; font-weight: 600; padding: 3px 10px; border-radius: 99px; border: 1px solid var(--border-med); color: var(--text-muted); }
.ml-pill.passed { color: var(--green); border-color: rgba(0,166,119,.4); background: rgba(0,166,119,.08); }
.ml-pill.exam { color: var(--blue-light); border-color: var(--blue-border); background: var(--blue-dim); }
.ml-pill.progress { color: var(--blue-light); border-color: var(--blue-border); }
.ml-pill.expired { color: var(--red); border-color: rgba(217,43,43,.4); }

/* Course overview */
.co-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
.co-lessons { list-style: none; padding: 0; margin: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-card); }
.co-lesson { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-top: 1px solid var(--border); }
.co-lesson:first-child { border-top: 0; }
.co-state { flex: 0 0 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--bg3); color: var(--text-muted); font-size: .82rem; font-weight: 700; }
.co-state svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.co-lesson.done .co-state { background: rgba(0,166,119,.12); color: var(--green); }
.co-lesson.current .co-state { background: var(--blue); color: #fff; }
.co-lesson.locked { opacity: .55; }
.co-lesson-main { flex: 1; min-width: 0; }
.co-lesson-main b { display: block; color: var(--white); font-size: .98rem; line-height: 1.4; }
.co-lesson-main small { color: var(--text-muted); font-size: .8rem; }
.co-side { position: sticky; top: 92px; display: grid; gap: 18px; }
.co-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--card-shadow); }
.co-card h3 { font-size: 1.05rem; color: var(--white); margin-bottom: 10px; }
.co-card p { font-size: .88rem; color: var(--text-muted); line-height: 1.65; margin: 0 0 14px; }
.co-card .btn { width: 100%; justify-content: center; }
.co-big { font-family: var(--f-display); font-size: 2.4rem; font-weight: 700; color: var(--white); line-height: 1; margin-bottom: 12px; }

/* ── Exam ────────────────────────────────────────────────────── */
.ex-wrap { max-width: 760px; margin: 0 auto; }
.ex-q { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px 24px; margin-bottom: 16px; }
.ex-q legend { font-weight: 600; color: var(--white); line-height: 1.55; padding: 0; margin-bottom: 14px; display: flex; gap: 12px; }
.ex-q legend b { color: var(--blue-light); font-family: var(--f-display); }
.ex-q fieldset { border: 0; padding: 0; margin: 0; }
.ex-opt { display: flex; gap: 12px; align-items: flex-start; padding: 11px 13px; border: 1.5px solid var(--input-border); border-radius: var(--radius); margin-bottom: 8px; cursor: pointer; line-height: 1.5; }
.ex-opt input { margin-top: 4px; accent-color: var(--blue); }
.ex-opt:has(input:checked) { border-color: var(--blue); background: var(--blue-dim); }
.ex-result { text-align: center; padding: 20px 0 10px; }
.ex-score { font-family: var(--f-display); font-size: 4rem; font-weight: 700; line-height: 1; margin: 10px 0; }
.ex-score.pass { color: var(--green); }
.ex-score.fail { color: var(--red); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .ot-detail, .co-layout { grid-template-columns: 1fr; }
  .ot-buy, .co-side { position: static; }
}
@media (max-width: 720px) {
  .ml-item { grid-template-columns: 1fr; }
  .ml-auth { padding: 28px 22px; }
}
@media (prefers-reduced-motion: reduce) {
}

/* ================================================================
   ISHTAR branded lesson player + lesson content
   Brand: Ishtar Gate navy and the gold arc from the logo.
   Every course renders inside this frame, so all packs look alike.
================================================================ */

.lp {
  --ib-navy: #164476;
  --ib-navy-deep: #0F274D;
  --ib-navy-ink: #102A52;
  --ib-gold: #C49A5E;
  --ib-gold-light: #E2C493;
  --ib-gold-wash: rgba(196,154,94,.14);
  --ib-bg: #E9EEF6;
  --ib-paper: #FFFFFF;
  --ib-ink: #16233D;
  --ib-muted: #56637D;
  --ib-line: #DCE3EE;
  --ib-navy-wash: rgba(22,68,118,.07);
  --ib-ok: #0E8A62;
  --ib-bad: #C0392B;
  --ib-warn: #B7791F;
  background: var(--ib-bg);
  color: var(--ib-ink);
  min-height: 100vh;
  display: flex; flex-direction: column;
}
[data-theme="dark"] .lp {
  --ib-bg: #08101F;
  --ib-paper: #101B30;
  --ib-ink: #E6ECF6;
  --ib-muted: #9DAAC2;
  --ib-line: rgba(255,255,255,.10);
  --ib-navy-wash: rgba(110,160,230,.10);
  --ib-navy-ink: #CFDDF3;
  --ib-gold: #D6AF73;
  --ib-ok: #2FBF8F;
  --ib-bad: #F06A5B;
  --ib-warn: #E0A84A;
}
.lp-preview-flag { background: var(--ib-gold); color: #1d1408; text-align: center; font-size: .82rem; font-weight: 600; padding: 7px 12px; }

/* ── Navy band (replaces the site nav while studying) ── */
body:has(.lp) > .navbar { display: none; }
.lp-band { background: linear-gradient(180deg, var(--ib-navy-deep) 0%, #133766 100%); color: #fff; padding: 14px 0 0; position: sticky; top: 0; z-index: 60; box-shadow: 0 6px 24px rgba(8,20,45,.25); }
.lp-band-in { width: min(1100px, calc(100% - 32px)); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.lp-brand { display: flex; align-items: center; gap: 12px; color: #fff; min-width: 0; text-decoration: none; }
.lp-brand img { width: 44px; height: 44px; flex: 0 0 auto; background: #fff; border-radius: 50%; padding: 4px; object-fit: contain; }
.lp-brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.lp-brand-text b { font-family: var(--f-display); font-size: 1rem; letter-spacing: .02em; }
.lp-brand-text small { color: var(--ib-gold-light); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-band-meta { display: flex; align-items: center; gap: 18px; font-size: .82rem; white-space: nowrap; }
.lp-lesson-of { color: rgba(255,255,255,.75); }
.lp-exit { color: #fff; border: 1px solid rgba(255,255,255,.3); padding: 7px 14px; border-radius: 999px; transition: background .2s; }
.lp-exit:hover { background: rgba(255,255,255,.12); }
.lp-track { display: flex; gap: 5px; width: 100%; padding: 14px 0 16px; }
.lp-track i { flex: 1; height: 5px; border-radius: 3px; background: rgba(255,255,255,.16); transition: background .35s ease; }
.lp-track i.seen { background: rgba(226,196,147,.55); }
.lp-track i.now { background: var(--ib-gold-light); box-shadow: 0 0 0 1px rgba(226,196,147,.4), 0 0 10px rgba(226,196,147,.45); }

/* ── The page ── */
.lp-stage { flex: 1; padding: 36px 16px 130px; }
.lp-page { position: relative; max-width: 860px; margin: 0 auto; background: var(--ib-paper); border-radius: 18px; border-top: 5px solid var(--ib-gold); box-shadow: 0 1px 2px rgba(10,25,55,.06), 0 18px 48px rgba(10,25,55,.10); overflow: hidden; }
.lp-page[hidden] { display: none; }
.lp-page::after { /* faint gate watermark */
  content: ''; position: absolute; inset-inline-end: -40px; bottom: 40px; width: 260px; height: 260px;
  background: url('../lms-brand/ishtar-mark-384.png') center / contain no-repeat; opacity: .035; pointer-events: none;
}
.lp-page-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 44px; border-bottom: 1px solid var(--ib-line); font-size: .82rem; color: var(--ib-muted); }
.lp-page-lesson { font-weight: 600; color: var(--ib-navy-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-count { white-space: nowrap; font-variant-numeric: tabular-nums; }
.lp-sheet { position: relative; z-index: 1; padding: 40px 44px 28px; }
.lp-sheet > section.screen { display: none; }
.lp-sheet > section.screen.active { display: block; animation: lp-in .35s ease; }
@keyframes lp-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.lp-page-foot { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; margin: 0 44px; padding: 16px 0 20px; border-top: 1px solid var(--ib-line); font-size: .76rem; color: var(--ib-muted); }
.lp-page-foot img { width: 26px; height: 26px; object-fit: contain; }
.lp-folio { margin-inline-start: auto; font-weight: 600; color: var(--ib-navy-ink); font-variant-numeric: tabular-nums; }

/* ── Lesson cover (first screen of every lesson) ── */
.lp-cover { position: relative; display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 28px; min-height: 230px; padding: 40px 44px 34px; background: radial-gradient(120% 140% at 85% 0%, #1D548F 0%, var(--ib-navy) 40%, var(--ib-navy-deep) 100%); color: #fff; overflow: hidden; }
.lp-cover[hidden] { display: none; }
.lp-cover-art { position: absolute; inset-inline-end: -10px; top: 0; height: 100%; width: auto; opacity: .9; pointer-events: none; }
html[dir="rtl"] .lp-cover-art { transform: scaleX(-1); }
.lp-cover-art .arc { fill: none; stroke: var(--ib-gold-light); stroke-width: 3; stroke-linecap: round; opacity: .85; }
.lp-cover-art .star { fill: var(--ib-gold-light); }
.lp-cover-art .gate { fill: none; stroke: rgba(226,196,147,.35); stroke-width: 2.5; }
.lp-cover-num { position: relative; font-family: var(--f-display); font-weight: 700; font-size: clamp(4.5rem, 10vw, 7rem); line-height: .8; color: var(--ib-gold-light); }
.lp-cover-text { position: relative; max-width: 30ch; }
.lp-cover-kicker { display: block; font-size: .85rem; color: var(--ib-gold-light); margin-bottom: 6px; }
.lp-cover h1 { font-family: var(--f-display); font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.2; color: #fff; margin: 0 0 10px; }
.lp-cover-sub { font-size: .82rem; color: rgba(255,255,255,.7); }

/* ── Completion page ── */
.lp-done { text-align: center; padding: 56px 32px 48px; }
.lp-done-mark { width: 120px; height: 120px; object-fit: contain; margin: 0 auto 18px; display: block; }
.lp-done h2 { font-family: var(--f-display); font-size: 1.8rem; color: var(--ib-navy-ink); margin-bottom: 10px; }
.lp-done p { color: var(--ib-muted); margin: 0 auto 22px; max-width: 46ch; line-height: 1.7; }
.lp-done .lp-done-back { margin-top: 18px; font-size: .88rem; }
.lp-done .lp-done-back a { color: var(--ib-navy-ink); text-decoration: underline; }

/* ── Controls ── */
.lp-controls { position: fixed; inset-inline: 0; bottom: 0; z-index: 70; background: color-mix(in srgb, var(--ib-paper) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--ib-line); padding: 12px 16px; }
.lp-controls[hidden] { display: none; }
.lp-controls-row { max-width: 860px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.lp-hint { flex: 1; text-align: center; font-size: .82rem; color: var(--ib-muted); }
.lp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 128px; padding: 12px 26px; border-radius: 999px; font: 600 .9rem var(--f-display); cursor: pointer; border: 1.5px solid transparent; text-decoration: none; transition: background .2s, border-color .2s, transform .15s; }
.lp-btn-go { background: var(--ib-navy); color: #fff; box-shadow: 0 6px 18px rgba(22,68,118,.28); }
.lp-btn-go:hover { background: #1B5290; }
.lp-btn-go:active { transform: translateY(1px); }
.lp.is-last .lp-btn-go#lp-next { background: var(--ib-gold); color: #1d1408; box-shadow: 0 6px 18px rgba(196,154,94,.35); }
.lp-btn-ghost { background: transparent; color: var(--ib-navy-ink); border-color: var(--ib-line); }
.lp-btn-ghost:hover { border-color: var(--ib-navy); }
.lp-btn[disabled] { opacity: .4; cursor: not-allowed; box-shadow: none; transform: none; }
.lp-btn:focus-visible, .lp-exit:focus-visible, .lp .kc-opt:focus-visible, .lp .tab-btn:focus-visible { outline: 3px solid var(--ib-gold); outline-offset: 2px; }
body:has(.lp) .wa-float { bottom: 92px !important; }

/* ================================================================
   Lesson content
================================================================ */
.lc { font-size: 1.04rem; line-height: 1.85; color: var(--ib-ink); }
.lc > *:first-child { margin-top: 0; }
.lc h2 { font-family: var(--f-display); font-size: clamp(1.45rem, 2.6vw, 1.9rem); line-height: 1.25; color: var(--ib-navy-ink); margin: 0 0 22px; padding-bottom: 14px; position: relative; }
.lc h2::after { content: ''; position: absolute; inset-inline-start: 0; bottom: 0; width: 48px; height: 3px; border-radius: 2px; background: var(--ib-gold); }
.lc h3 { font-family: var(--f-display); font-size: 1.2rem; color: var(--ib-navy-ink); margin: 30px 0 10px; line-height: 1.35; }
.lc h4 { font-size: 1rem; color: var(--ib-navy-ink); margin: 22px 0 8px; }
.lc p { margin: 0 0 1.1em; max-width: 68ch; }
.lc ul, .lc ol { margin: 0 0 1.2em; padding-inline-start: 1.4em; }
.lc li { margin-bottom: .45em; }
.lc ul > li::marker { color: var(--ib-gold); }
.lc a { color: var(--ib-navy); text-decoration: underline; }
[data-theme="dark"] .lc a { color: var(--ib-gold-light); }
.lc strong { color: var(--ib-navy-ink); }
.lc .lead { font-size: 1.16rem; color: var(--ib-muted); line-height: 1.75; }

.lc figure { margin: 26px 0; padding: 14px; background: #fff; border: 1px solid var(--ib-line); border-radius: 14px; text-align: center; }
.lc img { max-width: 100%; max-height: 420px; width: auto; height: auto; margin: 0 auto; display: block; border-radius: 8px; }
.lc figcaption { font-size: .84rem; color: #56637D; margin-top: 10px; }

.lc table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 18px 0 24px; font-size: .93rem; display: block; overflow-x: auto; border: 1px solid var(--ib-line); border-radius: 12px; }
.lc th, .lc td { padding: 11px 14px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--ib-line); }
.lc tr:last-child td { border-bottom: 0; }
.lc th { background: var(--ib-navy); color: #fff; font-weight: 600; }
.lc tr:nth-child(even) td { background: var(--ib-navy-wash); }

/* Callouts */
.lc .callout { position: relative; background: var(--ib-navy-wash); border-radius: 12px; padding: 18px 22px 18px 22px; margin: 24px 0; border-inline-start: 4px solid var(--ib-navy); }
.lc .callout > *:last-child { margin-bottom: 0; }
.lc .callout-title { display: block; font: 700 .95rem var(--f-display); color: var(--ib-navy-ink); margin-bottom: 6px; }
.lc .callout.tip { background: rgba(14,138,98,.08); border-color: var(--ib-ok); }
.lc .callout.tip .callout-title { color: var(--ib-ok); }
.lc .callout.warn { background: rgba(183,121,31,.10); border-color: var(--ib-warn); }
.lc .callout.warn .callout-title { color: var(--ib-warn); }

/* Reveal */
.lc details { border: 1px solid var(--ib-line); border-radius: 12px; margin: 12px 0; background: var(--ib-paper); overflow: hidden; }
.lc details > summary { cursor: pointer; padding: 15px 18px; font-weight: 600; color: var(--ib-navy-ink); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.lc details > summary::-webkit-details-marker { display: none; }
.lc details > summary::after { content: '+'; flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--ib-gold-wash); color: var(--ib-gold); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; line-height: 1; }
.lc details[open] > summary { background: var(--ib-navy-wash); }
.lc details[open] > summary::after { content: '–'; }
.lc details > *:not(summary) { padding: 0 18px; }
.lc details > summary + * { padding-top: 14px; }
.lc details > *:last-child { padding-bottom: 16px; margin-bottom: 0; }

/* Tabs */
.lc .tabs { margin: 24px 0; border: 1px solid var(--ib-line); border-radius: 14px; overflow: hidden; }
.lc .tab-list { display: flex; gap: 4px; padding: 6px; background: var(--ib-navy-wash); overflow-x: auto; }
.lc .tab-btn { flex: 1 0 auto; background: none; border: 0; border-radius: 9px; padding: 10px 16px; font: 600 .88rem var(--f-display); color: var(--ib-muted); cursor: pointer; white-space: nowrap; }
.lc .tab-btn:hover { color: var(--ib-navy-ink); }
.lc .tab-btn[aria-selected="true"] { background: var(--ib-navy); color: #fff; box-shadow: 0 3px 10px rgba(22,68,118,.25); }
.lc .tab { padding: 18px 22px 6px; }
.lc .tab[hidden] { display: none; }
.lc .tabs:not(.ready) .tab { border-top: 1px solid var(--ib-line); }

/* Steps */
.lc ol.steps { list-style: none; padding: 0; counter-reset: st; margin: 18px 0; }
.lc ol.steps > li { counter-increment: st; position: relative; padding: 5px 0 22px; padding-inline-start: 58px; min-height: 40px; }
.lc ol.steps > li::before { content: counter(st); position: absolute; inset-inline-start: 0; top: 0; width: 38px; height: 38px; border-radius: 50%; background: var(--ib-navy); color: #fff; display: flex; align-items: center; justify-content: center; font: 700 .9rem var(--f-display); box-shadow: 0 0 0 4px var(--ib-gold-wash); }
.lc ol.steps > li::after { content: ''; position: absolute; inset-inline-start: 18px; top: 44px; bottom: 4px; width: 2px; background: linear-gradient(var(--ib-gold), transparent); }
.lc ol.steps > li:last-child::after { display: none; }
.lc ol.steps.ready > li.pending { display: none; }
.lc .steps-next { display: inline-flex; align-items: center; gap: 8px; margin: 2px 0 20px; padding: 9px 18px; border-radius: 999px; border: 1.5px solid var(--ib-gold); background: var(--ib-gold-wash); color: var(--ib-navy-ink); font: 600 .86rem var(--f-display); cursor: pointer; }
.lc .steps-next:hover { background: var(--ib-gold); color: #1d1408; }

/* Knowledge check */
.lc .kc { border: 1px solid var(--ib-line); border-radius: 16px; margin: 26px 0; background: var(--ib-paper); overflow: hidden; box-shadow: 0 8px 26px rgba(10,25,55,.07); }
.lc .kc-label { display: flex; align-items: center; gap: 10px; background: var(--ib-navy); color: var(--ib-gold-light); font: 600 .84rem var(--f-display); padding: 12px 22px; margin: 0; }
.lc .kc-label::before { content: '?'; flex: 0 0 22px; height: 22px; border-radius: 50%; background: var(--ib-gold); color: var(--ib-navy-deep); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; }
.lc .kc-q { font-weight: 600; font-size: 1.08rem; color: var(--ib-navy-ink); margin: 18px 22px 14px; }
.lc .kc-options { list-style: none; padding: 0 22px; margin: 0; display: grid; gap: 10px; }
.lc .kc-options li { margin: 0; }
.lc .kc-opt { width: 100%; display: flex; align-items: center; gap: 14px; text-align: start; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--ib-line); background: var(--ib-paper); color: var(--ib-ink); font: inherit; font-size: .98rem; cursor: pointer; transition: border-color .2s, background .2s; }
.lc .kc-opt:hover { border-color: var(--ib-navy); }
.lc .kc-key { flex: 0 0 30px; height: 30px; border-radius: 8px; background: var(--ib-navy-wash); color: var(--ib-navy-ink); display: flex; align-items: center; justify-content: center; font: 700 .82rem var(--f-display); }
.lc .kc-opt.right { border-color: var(--ib-ok); background: rgba(14,138,98,.09); }
.lc .kc-opt.right .kc-key { background: var(--ib-ok); color: #fff; }
.lc .kc-opt.wrong { border-color: var(--ib-bad); background: rgba(192,57,43,.07); }
.lc .kc-opt.wrong .kc-key { background: var(--ib-bad); color: #fff; }
.lc .kc-opt:disabled { cursor: default; }
.lc .kc-msg { margin: 14px 22px 0; font-weight: 600; font-size: .95rem; }
.lc .kc-msg:empty { display: none; }
.lc .kc-msg.right { color: var(--ib-ok); }
.lc .kc-msg.wrong { color: var(--ib-bad); }
.lc .kc-explain { display: none; margin: 8px 22px 0; color: var(--ib-muted); font-size: .95rem; }
.lc .kc.solved .kc-explain { display: block; }
.lc .kc > *:last-child { margin-bottom: 20px; }

.lc .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 18px 0; }

/* ── Player responsive ── */
@media (max-width: 720px) {
  .lp-stage { padding: 0 0 110px; }
  .lp-page { border-radius: 0; box-shadow: none; }
  .lp-page-head { padding: 14px 20px; }
  .lp-sheet { padding: 28px 20px 20px; }
  .lp-page-foot { margin: 0 20px; }
  .lp-cover { padding: 30px 20px 26px; gap: 18px; min-height: 190px; }
  .lp-cover-art { opacity: .45; }
  .lp-lesson-of { display: none; }
  .lp-brand-text small { max-width: 52vw; }
  .lp-hint { display: none; }
  .lp-btn { min-width: 0; padding: 12px 22px; }
  .lc .cols { grid-template-columns: 1fr; }
  body:has(.lp) .wa-float { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .lp-sheet > section.screen.active { animation: none; }
  .lp-track i { transition: none; }
}
.lc p, .lc li, .lc td { color: var(--ib-ink); }
.lc .lead, .lc .kc-explain { color: var(--ib-muted); }
.lc section.screen > *:first-child,
.lc section.screen > .lang-en > *:first-child,
.lc section.screen > .lang-ar > *:first-child { margin-top: 0; }
.lp-switch { display: inline-flex; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; overflow: hidden; }
.lp-switch .lang-btn { background: transparent; border: 0; color: rgba(255,255,255,.75); padding: 6px 11px; font: 700 .72rem var(--f-display); cursor: pointer; border-radius: 0; height: auto; }
.lp-switch .lang-btn.active { background: var(--ib-gold-light); color: var(--ib-navy-deep); }
.lp-theme { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); background: transparent; color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.lp-theme svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
@media (max-width: 720px) { .lp-exit { display: none; } .lp-band-meta { gap: 8px; } }
.lc table { display: table; }
@media (max-width: 720px) { .lc table { display: block; } }
.lc ol.steps > li:has(+ li.pending)::after { display: none; }
.lp-band .lp-theme, [data-theme="dark"] .lp-band .lp-theme { background: transparent; border: 1px solid rgba(255,255,255,.3); color: #fff; box-shadow: none; }
.lp-band .lp-theme:hover { background: rgba(255,255,255,.12); }

.lp.is-done .lp-track i { background: var(--ib-gold-light); }
@media (max-width: 720px) { .lp-page::after { width: 180px; height: 180px; opacity: .03; } }
.lp-band { top: env(safe-area-inset-top, 0px); }
.lp-controls { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }

/* ── Catalog: featured row, categories, tag filters, badges ── */
.ot-card[hidden], .ot-empty[hidden], .ot-clear[hidden] { display: none !important; }
.ot-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.ot-head h2 { font-size: 1.4rem; color: var(--white); margin: 0; }
.ot-featured { margin-bottom: 56px; }
.ot-grid-feat { grid-template-columns: repeat(3, 1fr); }
.ot-card-feat { border-color: rgba(201, 162, 75, .55); box-shadow: 0 0 0 1px rgba(201, 162, 75, .25), var(--card-shadow); }
.ot-card-feat:hover, .ot-card-feat:focus-visible { border-color: #C9A24B; }
.ot-thumb-wrap { position: relative; }
.ot-badges { position: absolute; top: 12px; inset-inline-start: 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; pointer-events: none; }
.ot-badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 999px; font-size: .74rem; font-weight: 700; letter-spacing: .02em; line-height: 1.2; box-shadow: 0 4px 12px rgba(0, 0, 0, .25); }
.ot-badge svg { width: 13px; height: 13px; fill: currentColor; }
.ot-badge-feat { background: #C9A24B; color: #1d1608; }
.ot-badge-sale { background: var(--red); color: #fff; }
.ot-price { display: inline-flex; align-items: baseline; gap: 8px; }
.ot-was { font-size: .8rem; font-weight: 500; color: var(--text-dim); text-decoration: line-through; }
.ot-buy-price .ot-was { font-size: 1.05rem; margin-inline-end: 6px; }
.ot-sale-pill { display: inline-block; margin-top: 8px; padding: 4px 10px; border-radius: 999px; background: var(--red); color: #fff; font-size: .76rem; font-weight: 700; }
.ot-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.ot-card-tags span { font-size: .72rem; padding: 3px 9px; border-radius: 999px; background: var(--bg3); border: 1px solid var(--border); color: var(--text-muted); }

.ot-cats { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; margin-bottom: 14px; scrollbar-width: thin; border-bottom: 1px solid var(--border); }
.ot-cat { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--border-med); background: var(--bg-card); color: var(--text); font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; transition: background var(--transition), color var(--transition), border-color var(--transition); }
.ot-cat i { font-style: normal; font-size: .72rem; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--bg3); color: var(--text-muted); }
.ot-cat:hover { border-color: var(--blue-border); }
.ot-cat.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.ot-cat.on i { background: rgba(255, 255, 255, .22); color: #fff; }
.ot-cat:focus-visible, .ot-tag:focus-visible, .ot-clear:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.ot-filters { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; margin-bottom: 14px; }
.ot-search { position: relative; flex: 0 1 280px; min-width: 220px; }
.ot-search svg { position: absolute; top: 50%; inset-inline-start: 12px; width: 17px; height: 17px; transform: translateY(-50%); stroke: var(--text-muted); fill: none; stroke-width: 2; pointer-events: none; }
.ot-search input { width: 100%; padding: 10px 14px; padding-inline-start: 38px; border-radius: 999px; border: 1.5px solid var(--input-border); background: var(--input-bg); color: var(--text); font: inherit; font-size: .9rem; }
.ot-search input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--input-focus); }
.ot-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; flex: 1 1 400px; }
.ot-tags-label { font-size: .82rem; color: var(--text-muted); margin-inline-end: 2px; }
.ot-tag { padding: 6px 13px; border-radius: 999px; border: 1px dashed var(--border-med); background: transparent; color: var(--text); font: inherit; font-size: .8rem; cursor: pointer; transition: background var(--transition), border-color var(--transition), color var(--transition); }
.ot-tag:hover { border-color: var(--blue-border); color: var(--blue-light); }
.ot-tag.on { border-style: solid; border-color: var(--blue); background: var(--blue-dim); color: var(--blue-light); font-weight: 600; }
.ot-resultbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; margin-bottom: 18px; font-size: .86rem; color: var(--text-muted); }
.ot-clear { padding: 6px 12px; border: 0; background: none; color: var(--blue-light); font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.ot-nomatch { padding: 48px 20px; }

@media (max-width: 1000px) { .ot-grid-feat { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); } }
@media (max-width: 600px) {
  .ot-search { flex: 1 1 100%; }
  .ot-head h2 { font-size: 1.2rem; }
}

/* ── Video in lessons ── */
.lc video{display:block;width:100%;max-width:100%;height:auto;border-radius:14px;background:#0b1f3a;margin:14px 0 6px;box-shadow:0 6px 24px rgba(16,39,79,.14)}
.lc .yt-frame{position:relative;width:100%;aspect-ratio:16/9;margin:14px 0 6px;border-radius:14px;overflow:hidden;background:#0b1f3a;box-shadow:0 6px 24px rgba(16,39,79,.14)}
.lc .yt-frame iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.lc .video-caption{font-size:13px;color:#5b6b82;margin:4px 0 14px}

/* ── Free preview, offline study and course documents (lms-4) ── */
.lp-sample-flag { display: flex; gap: 6px 14px; align-items: center; justify-content: center; flex-wrap: wrap; }
.lp-sample-flag a { color: #1d1408; font-weight: 700; text-decoration: underline; }
.lp-sample-cta { margin: 22px auto 6px; max-width: 460px; padding: 18px 20px; border-radius: 16px; background: var(--ib-gold-wash); border: 1px solid var(--ib-gold); display: flex; flex-direction: column; gap: 12px; align-items: center; text-align: center; }
.lp-sample-cta b { color: var(--ib-navy-deep); line-height: 1.5; }
.ot-free-pill { display: inline-block; margin-inline-start: 8px; padding: 2px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; background: var(--blue-dim); color: var(--blue); border: 1px solid var(--blue-border); text-decoration: none; white-space: nowrap; vertical-align: middle; }
.ot-free-pill:hover { background: var(--blue); color: #fff; }
.ot-try { width: 100%; justify-content: center; margin: 4px 0 18px; }
.ot-docs { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.ot-docs a { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-card); color: var(--text); text-decoration: none; transition: border-color .2s; }
.ot-docs a:hover { border-color: var(--blue-border); }
.ot-doc-ic { flex: 0 0 42px; height: 42px; border-radius: 10px; background: var(--blue-dim); color: var(--blue); font-size: .68rem; font-weight: 800; letter-spacing: .04em; display: flex; align-items: center; justify-content: center; }
.ot-doc-t { display: flex; flex-direction: column; font-weight: 600; font-size: .92rem; line-height: 1.4; }
.ot-doc-t small { font-weight: 400; color: var(--text-dim); font-size: .78rem; }
.ot-docs-sm a { padding: 9px 10px; }
.ot-docs-sm .ot-doc-ic { flex-basis: 36px; height: 36px; }
.co-dl { display: flex; gap: 8px; margin-bottom: 12px; }
.co-card .co-dl .btn { width: auto; flex: 1; }
.co-offline-form { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border); }
.co-check { display: flex; gap: 10px; align-items: flex-start; font-size: .86rem; color: var(--text); line-height: 1.55; cursor: pointer; }
.co-check input { margin-top: 4px; flex: 0 0 auto; }
.co-check:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.co-card p.co-ok { color: var(--ib-ok, #0E8A62); font-weight: 600; margin: 0; }
.co-card .btn:disabled { opacity: .5; cursor: not-allowed; }
.co-side { position: static; }
html[dir="rtl"] .ot-thumb-fallback, html[dir="rtl"] .lp-wrap h1, html[dir="rtl"] .lp-wrap h2 { font-family: var(--f-ar-display); }

/* ── Hands-on courses: code / copy blocks, keys, field names ── */
.lc code { font: 500 .88em var(--f-mono, 'IBM Plex Mono', monospace); background: var(--ib-navy-wash); color: var(--ib-navy-ink); padding: 2px 6px; border-radius: 6px; direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.lc .copy-wrap { position: relative; margin: 14px 0 18px; }
.lc pre { direction: ltr; text-align: left; white-space: pre-wrap; word-break: break-word; margin: 14px 0 18px; padding: 16px 18px; border-radius: 12px; background: #0F1B2E; color: #E8EEF7; font: 14px/1.6 var(--f-mono, 'IBM Plex Mono', monospace); border: 1px solid #22324D; }
.lc pre[dir="rtl"] { direction: rtl; text-align: right; font-family: var(--f-ar, 'IBM Plex Sans Arabic', sans-serif); }
.lc .copy-wrap pre { margin: 0; padding-top: 40px; }
.lc .copy-btn { position: absolute; top: 8px; inset-inline-end: 8px; font: 600 12.5px var(--f-body, sans-serif); color: #0F1B2E; background: var(--ib-gold-light); border: 0; border-radius: 8px; padding: 5px 12px; cursor: pointer; }
.lc .copy-btn.ok { background: #8FD3B0; }
.lc kbd { font: 600 .85em var(--f-mono, monospace); padding: 2px 7px; border-radius: 6px; border: 1px solid var(--ib-line); border-bottom-width: 3px; background: #fff; color: var(--ib-ink); direction: ltr; unicode-bidi: isolate; }
.lc .ui { font-weight: 700; color: var(--ib-navy-ink); background: var(--ib-gold-wash); padding: 1px 6px; border-radius: 5px; unicode-bidi: isolate; }
.lc figure.shot img { border-radius: 10px; }
.lc .checklist { list-style: none; padding: 0; }
.lc .checklist li { position: relative; padding-inline-start: 32px; margin: 8px 0; }
.lc .checklist li::before { content: ''; position: absolute; inset-inline-start: 0; top: 3px; width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--ib-gold); }
