/*
 * Demo kit styles — shared by /zoho_demo/ (Zoho Books) and /subscription_demo.
 * Self-contained: defines its own tokens so the pages do not depend on the lab/student stylesheets.
 * Every class is prefixed with "dk-" so lesson HTML (which carries its own class names) cannot clash.
 */
@import url('https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;700&display=swap');

:root {
  /* Brand colour. A student who comes from an institute gets that institute's colour
     (ATC Settings -> primary colour), set on <html> by demo-app.js. */
  --dk-brand: #305cde;
}

:root,
[data-theme="light"] {
  --dk-primary: #305cde;
  --dk-primary-strong: #2448b8;
  --dk-primary-soft: rgba(48, 92, 222, 0.1);
  --dk-btn-bg: #305cde;
  --dk-btn-bg-hover: #2448b8;
  --dk-grad-from: #1e3a8a;
  --dk-grad-to: #3b82f6;
  --dk-accent: #f97316;
  --dk-accent-btn: #ea580c;
  --dk-accent-btn-hover: #c2410c;
  --dk-accent-soft: rgba(249, 115, 22, 0.12);
  --dk-success: #16a34a;
  --dk-success-soft: rgba(22, 163, 74, 0.12);
  --dk-danger: #dc2626;
  --dk-danger-soft: rgba(220, 38, 38, 0.1);
  --dk-bg: #f6f7fb;
  --dk-surface: #ffffff;
  --dk-surface-2: #f1f4f9;
  --dk-text: #111827;
  --dk-muted: #5b6474;
  --dk-border: #e3e7ef;
  --dk-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --dk-shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.18);
  --dk-radius: 14px;
  --dk-radius-sm: 10px;
  --dk-sidebar-w: 320px;
  --dk-topbar-h: 60px;
  --dk-font: 'Google Sans', 'Noto Sans', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  color-scheme: light;
}

[data-theme="dark"] {
  --dk-primary: #7ea2ff;
  --dk-primary-strong: #a9c0ff;
  --dk-primary-soft: rgba(126, 162, 255, 0.14);
  --dk-btn-bg: #305cde;
  --dk-btn-bg-hover: #3d6cf0;
  --dk-grad-from: #1e3a8a;
  --dk-grad-to: #3b82f6;
  --dk-accent: #fb923c;
  --dk-accent-btn: #ea580c;
  --dk-accent-btn-hover: #f97316;
  --dk-accent-soft: rgba(251, 146, 60, 0.16);
  --dk-success: #4ade80;
  --dk-success-soft: rgba(74, 222, 128, 0.14);
  --dk-danger: #f87171;
  --dk-danger-soft: rgba(248, 113, 113, 0.14);
  --dk-bg: #0f141b;
  --dk-surface: #161c25;
  --dk-surface-2: #1e2530;
  --dk-text: #eef2f7;
  --dk-muted: #9aa6b8;
  --dk-border: #2a3341;
  --dk-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --dk-shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}

@supports (color: color-mix(in srgb, red 50%, blue)) {
  :root, [data-theme="light"] {
    --dk-primary: var(--dk-brand);
    --dk-primary-strong: color-mix(in srgb, var(--dk-brand) 78%, black);
    --dk-primary-soft: color-mix(in srgb, var(--dk-brand) 11%, transparent);
    --dk-btn-bg: var(--dk-brand);
    --dk-btn-bg-hover: color-mix(in srgb, var(--dk-brand) 80%, black);
    --dk-grad-from: color-mix(in srgb, var(--dk-brand) 55%, black);
    --dk-grad-to: color-mix(in srgb, var(--dk-brand) 72%, white);
  }
  [data-theme="dark"] {
    --dk-primary: color-mix(in srgb, var(--dk-brand) 55%, white);
    --dk-primary-strong: color-mix(in srgb, var(--dk-brand) 35%, white);
    --dk-primary-soft: color-mix(in srgb, var(--dk-brand) 22%, transparent);
    --dk-btn-bg: var(--dk-brand);
    --dk-btn-bg-hover: color-mix(in srgb, var(--dk-brand) 85%, white);
    --dk-grad-from: color-mix(in srgb, var(--dk-brand) 50%, black);
    --dk-grad-to: color-mix(in srgb, var(--dk-brand) 80%, white);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { height: 100%; }

body.dk-body {
  margin: 0;
  font-family: var(--dk-font);
  background: var(--dk-bg);
  color: var(--dk-text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

/* :where() keeps this at zero specificity so button colour classes (white text) always win. */
:where(.dk-body) :where(button, input, select) { font: inherit; color: inherit; }
.dk-body a:not(.dk-btn) { color: var(--dk-primary); }

.gsym {
  font-family: 'Google Symbols', 'Material Symbols Rounded', sans-serif;
  font-weight: normal;
  font-style: normal;
  font-size: 1.25rem;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  font-feature-settings: 'liga';
  vertical-align: middle;
  user-select: none;
}

.dk-sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- Buttons ---------- */
.dk-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--dk-border); background: var(--dk-surface); color: var(--dk-text);
  font-weight: 600; font-size: 0.92rem; cursor: pointer; text-decoration: none;
  transition: background .2s, border-color .2s, transform .15s, box-shadow .2s;
  white-space: nowrap;
}
.dk-btn:hover { border-color: var(--dk-primary); background: var(--dk-primary-soft); }
.dk-btn:active { transform: translateY(1px); }
.dk-btn:disabled { opacity: .45; cursor: not-allowed; }
.dk-btn:focus-visible, .dk-icon-btn:focus-visible, .dk-lesson-item:focus-visible, .dk-chapter-btn:focus-visible {
  outline: 3px solid var(--dk-primary-soft); outline-offset: 2px; box-shadow: 0 0 0 2px var(--dk-primary);
}
.dk-btn-primary, [data-theme="dark"] .dk-btn-primary { background: var(--dk-btn-bg); border-color: var(--dk-btn-bg); color: #fff; }
.dk-btn-primary:hover, [data-theme="dark"] .dk-btn-primary:hover { background: var(--dk-btn-bg-hover); border-color: var(--dk-btn-bg-hover); color: #fff; }
.dk-btn-accent, [data-theme="dark"] .dk-btn-accent { background: var(--dk-accent-btn); border-color: var(--dk-accent-btn); color: #fff; }
.dk-btn-accent:hover, [data-theme="dark"] .dk-btn-accent:hover { background: var(--dk-accent-btn-hover); border-color: var(--dk-accent-btn-hover); color: #fff; }
.dk-btn-primary .gsym, .dk-btn-accent .gsym, .dk-btn-wa .gsym { color: #fff !important; }
.dk-btn-ghost { background: transparent; border-color: transparent; }
.dk-btn-block { width: 100%; }
.dk-btn-lg { min-height: 48px; padding: 0 22px; font-size: 1rem; }
.dk-btn-sm { min-height: 32px; padding: 0 12px; font-size: 0.82rem; }

.dk-icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent;
  color: var(--dk-muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background .2s, color .2s; flex-shrink: 0;
}
.dk-icon-btn:hover { background: var(--dk-surface-2); color: var(--dk-primary); }

/* ---------- Layout ---------- */
.dk-layout {
  display: grid;
  grid-template-columns: var(--dk-sidebar-w) minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  transition: grid-template-columns .3s ease;
}
.dk-layout.dk-collapsed { grid-template-columns: 0 minmax(0, 1fr); }
.dk-layout.dk-collapsed .dk-sidebar { visibility: hidden; }

.dk-sidebar {
  background: var(--dk-surface);
  border-right: 1px solid var(--dk-border);
  display: flex; flex-direction: column;
  min-height: 0; overflow: hidden;
}
.dk-sidebar-head { padding: 16px 16px 12px; border-bottom: 1px solid var(--dk-border); }
.dk-brand { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.dk-brand img { height: 34px; width: auto; max-width: 140px; object-fit: contain; }
.dk-brand-text { font-weight: 700; font-size: 1rem; line-height: 1.25; }
.dk-brand-sub { display: block; font-weight: 500; font-size: 0.76rem; color: var(--dk-muted); }
.dk-sidebar-close { margin-left: auto; display: none; }

.dk-course-card {
  margin-top: 12px; padding: 14px; border-radius: var(--dk-radius);
  background: var(--dk-surface-2);
  background: linear-gradient(135deg, color-mix(in srgb, var(--dk-grad-from) 16%, transparent), color-mix(in srgb, var(--dk-grad-to) 6%, transparent)), var(--dk-surface-2);
  border: 1px solid var(--dk-border);
}
.dk-course-title { margin: 0 0 4px; font-size: 1.02rem; font-weight: 700; line-height: 1.3; }
.dk-course-meta { font-size: 0.8rem; color: var(--dk-muted); display: flex; flex-wrap: wrap; gap: 6px 10px; }
.dk-progress { margin-top: 10px; display: flex; align-items: center; gap: 10px; font-size: 0.78rem; color: var(--dk-muted); }
.dk-progress-track { flex: 1; height: 6px; border-radius: 99px; background: var(--dk-border); overflow: hidden; }
.dk-progress-fill { height: 100%; width: 0; background: var(--dk-success); border-radius: 99px; transition: width .4s ease; }

.dk-legend { display: flex; gap: 12px; padding: 10px 16px 0; font-size: 0.74rem; color: var(--dk-muted); flex-wrap: wrap; }
.dk-legend span { display: inline-flex; align-items: center; gap: 4px; }
.dk-legend .gsym { font-size: 0.95rem; }

.dk-chapters { flex: 1; overflow-y: auto; padding: 10px 10px 16px; overscroll-behavior: contain; }
.dk-group-label {
  margin: 14px 8px 6px; font-size: 0.72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--dk-muted);
}
.dk-chapter { border-radius: var(--dk-radius-sm); margin-bottom: 4px; }
.dk-chapter-btn {
  width: 100%; display: flex; align-items: flex-start; gap: 10px; text-align: left;
  padding: 10px 10px; border: 0; background: transparent; border-radius: var(--dk-radius-sm); cursor: pointer;
  color: var(--dk-text); font-weight: 600; font-size: 0.9rem; line-height: 1.35;
}
.dk-chapter-btn:hover { background: var(--dk-surface-2); }
.dk-chapter-num {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 700; background: var(--dk-surface-2); color: var(--dk-muted); border: 1px solid var(--dk-border);
}
.dk-chapter.is-open .dk-chapter-num, .dk-chapter.has-free .dk-chapter-num { background: var(--dk-primary-soft); color: var(--dk-primary); border-color: transparent; }
.dk-chapter-name { flex: 1; min-width: 0; overflow-wrap: anywhere; padding-top: 3px; }
.dk-chapter-tail { display: inline-flex; align-items: center; gap: 4px; padding-top: 2px; color: var(--dk-muted); }
.dk-chapter.is-locked .dk-chapter-name { color: var(--dk-muted); font-weight: 500; }
.dk-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px;
  font-size: 0.68rem; font-weight: 700; letter-spacing: .02em; white-space: nowrap;
}
.dk-chip-free { background: var(--dk-success-soft); color: var(--dk-success); }
.dk-chip-lock { background: var(--dk-surface-2); color: var(--dk-muted); }
.dk-chip-accent { background: var(--dk-accent-soft); color: var(--dk-accent); }

.dk-lessons { list-style: none; margin: 2px 0 8px; padding: 0 0 0 18px; display: none; }
.dk-chapter.is-open .dk-lessons { display: block; }
.dk-lesson-item {
  position: relative; display: flex; align-items: flex-start; gap: 8px; width: 100%; text-align: left;
  padding: 8px 10px 8px 16px; border: 0; background: transparent; border-radius: 8px; cursor: pointer;
  font-size: 0.86rem; color: var(--dk-muted); line-height: 1.35;
}
.dk-lesson-item::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--dk-border); border-radius: 2px;
}
.dk-lesson-item:hover { background: var(--dk-surface-2); color: var(--dk-text); }
.dk-lesson-item .gsym { font-size: 1.05rem; margin-top: 1px; }
.dk-lesson-item .dk-lesson-label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.dk-lesson-item.is-free { color: var(--dk-text); }
.dk-lesson-item.is-free .gsym { color: var(--dk-success); }
.dk-lesson-item.is-done .gsym { color: var(--dk-success); }
.dk-lesson-item.is-active { background: var(--dk-primary-soft); color: var(--dk-primary); font-weight: 700; }
.dk-lesson-item.is-active::before { background: var(--dk-primary); }
.dk-lesson-item.is-locked { opacity: .75; }
.dk-lesson-item.is-locked:hover { opacity: 1; }

.dk-sidebar-foot { padding: 12px 16px 16px; border-top: 1px solid var(--dk-border); background: var(--dk-surface); }
.dk-sidebar-foot p { margin: 0 0 10px; font-size: 0.8rem; color: var(--dk-muted); }

.dk-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }

.dk-topbar {
  height: var(--dk-topbar-h); flex-shrink: 0; display: flex; align-items: center; gap: 8px;
  padding: 0 12px 0 8px; background: var(--dk-surface); border-bottom: 1px solid var(--dk-border); position: relative; z-index: 20;
}
.dk-crumbs { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--dk-muted); overflow: hidden; }
.dk-crumbs b { color: var(--dk-text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-crumbs span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dk-top-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.dk-lang {
  position: relative; display: inline-flex; align-items: center; gap: 4px; height: 38px; padding: 0 6px 0 10px;
  border: 1px solid var(--dk-border); border-radius: 999px; background: var(--dk-surface-2); color: var(--dk-text);
}
.dk-lang .gsym { font-size: 1.1rem; color: var(--dk-muted); }
.dk-lang select {
  appearance: none; -webkit-appearance: none; border: 0; background: transparent; padding: 0 22px 0 2px; height: 36px;
  font-size: 0.86rem; font-weight: 600; cursor: pointer; max-width: 128px; outline: none; color: var(--dk-text);
}
.dk-lang select option { color: #111; background: #fff; }
.dk-lang::after {
  content: ''; position: absolute; right: 12px; top: 50%; width: 6px; height: 6px; margin-top: -5px;
  border-right: 2px solid var(--dk-muted); border-bottom: 2px solid var(--dk-muted); transform: rotate(45deg); pointer-events: none;
}
.dk-lang.is-busy .gsym { animation: dk-spin 1s linear infinite; }

.dk-theme-btn .gsym { font-size: 1.3rem; }

.dk-scroll { flex: 1; overflow-y: auto; scroll-behavior: smooth; overscroll-behavior: contain; }
.dk-content { max-width: 980px; margin: 0 auto; padding: 28px 28px 80px; }

.dk-institute-strip {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin-bottom: 18px;
  border-radius: var(--dk-radius); background: var(--dk-surface); border: 1px solid var(--dk-border); font-size: 0.86rem;
}
.dk-institute-strip img { width: 36px; height: 36px; object-fit: contain; border-radius: 8px; background: #fff; }
.dk-institute-strip .dk-grow { flex: 1; min-width: 0; }
.dk-institute-strip b { display: block; }
.dk-institute-strip small { color: var(--dk-muted); }

.dk-lesson-head { margin-bottom: 22px; }
.dk-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--dk-muted); font-weight: 600; margin-bottom: 8px; }
.dk-lesson-title { margin: 0; font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.dk-lesson-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* ---------- Lesson body ---------- */
.dk-lesson {
  background: var(--dk-surface); border: 1px solid var(--dk-border); border-radius: 18px; padding: 28px 32px;
  box-shadow: var(--dk-shadow); font-size: 1rem; line-height: 1.75; overflow-wrap: break-word;
}
.dk-lesson > *:first-child { margin-top: 0; }
.dk-lesson h1, .dk-lesson h2, .dk-lesson h3, .dk-lesson h4, .dk-lesson h5, .dk-lesson h6 {
  color: var(--dk-text); line-height: 1.3; margin: 1.6em 0 .6em; font-weight: 700;
}
.dk-lesson h1 { font-size: 1.6rem; } .dk-lesson h2 { font-size: 1.4rem; } .dk-lesson h3 { font-size: 1.25rem; }
.dk-lesson h4 { font-size: 1.15rem; } .dk-lesson h5 { font-size: 1.05rem; } .dk-lesson h6 { font-size: 1rem; }
.dk-lesson p { margin: 0 0 1em; }
.dk-lesson ul, .dk-lesson ol { padding-left: 1.4em; margin: 0 0 1em; }
.dk-lesson li { margin: .3em 0; }
.dk-lesson li::marker { color: var(--dk-primary); }
.dk-lesson img { max-width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--dk-border); margin: 1em 0; cursor: zoom-in; display: block; background: #fff; }
.dk-lesson a:not(.dk-btn) { color: var(--dk-primary); font-weight: 600; }
.dk-lesson code { background: var(--dk-surface-2); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
.dk-lesson pre { background: var(--dk-surface-2); padding: 14px; border-radius: 12px; overflow-x: auto; }
.dk-lesson blockquote { margin: 1em 0; padding: 10px 16px; border-left: 4px solid var(--dk-primary); background: var(--dk-primary-soft); border-radius: 0 10px 10px 0; }
.dk-table-wrap { overflow-x: auto; margin: 1em 0 1.4em; border: 1px solid var(--dk-border); border-radius: 12px; }
.dk-lesson table { border-collapse: collapse; width: 100%; min-width: 480px; font-size: .92rem; }
.dk-lesson th, .dk-lesson td { border-bottom: 1px solid var(--dk-border); padding: 10px 12px; text-align: left; vertical-align: top; background: transparent !important; }
.dk-lesson th { background: var(--dk-surface-2) !important; font-weight: 700; }
.dk-lesson tr:last-child td { border-bottom: 0; }
.dk-lesson .note, .dk-lesson .alert {
  padding: 12px 16px; border-radius: 12px; background: var(--dk-primary-soft); border: 1px solid var(--dk-border); margin: 1em 0;
}

/* Translated pages: Indic scripts need a little more room and must wrap. */
html.translated-ltr .dk-lesson, html.translated-rtl .dk-lesson { line-height: 1.95; }
html.translated-ltr .dk-chapter-name, html.translated-ltr .dk-lesson-label { line-height: 1.5; }
html.translated-rtl .dk-lesson { direction: rtl; text-align: right; }

/* ---------- Simulation frames ---------- */
.dk-sim {
  margin: 1.4em 0; border: 1px solid var(--dk-border); border-radius: 16px; overflow: hidden; background: var(--dk-surface-2);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}
.dk-sim-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px 8px 14px;
  background: var(--dk-surface); border-bottom: 1px solid var(--dk-border); font-size: 0.82rem; line-height: 1.3;
}
.dk-sim-badge { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--dk-accent); }
.dk-sim-badge .gsym { font-size: 1.05rem; }
.dk-sim-title { color: var(--dk-muted); flex: 1; min-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-sim-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.dk-sim-stage { position: relative; height: min(78vh, 760px); min-height: 480px; background: #fff; }
.dk-sim-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.dk-sim-cover {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: var(--dk-surface-2); color: var(--dk-muted); text-align: center; padding: 24px; transition: opacity .35s ease;
}
.dk-sim-cover p { margin: 0; max-width: 360px; font-size: 0.9rem; }
.dk-sim-cover b { color: var(--dk-text); font-size: 1rem; }
.dk-sim.is-loaded .dk-sim-cover { opacity: 0; pointer-events: none; }
.dk-sim-cover .dk-sim-slow { display: none; }
.dk-sim.is-slow .dk-sim-cover .dk-sim-slow { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.dk-sim:fullscreen { border-radius: 0; display: flex; flex-direction: column; }
.dk-sim:fullscreen .dk-sim-stage { flex: 1; height: auto; }
.dk-spinner {
  width: 38px; height: 38px; border-radius: 50%; border: 4px solid var(--dk-border); border-top-color: var(--dk-primary);
  animation: dk-spin .9s linear infinite;
}
@keyframes dk-spin { to { transform: rotate(360deg); } }

/* ---------- Practice questions ---------- */
.dk-quiz { margin-top: 26px; }
.dk-quiz-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.dk-quiz-head h2 { margin: 0; font-size: 1.2rem; flex: 1; }
.dk-score { font-size: .85rem; font-weight: 700; color: var(--dk-muted); }
.dk-mcq {
  background: var(--dk-surface); border: 1px solid var(--dk-border); border-radius: 16px; padding: 18px 18px 14px; margin: 0 0 14px;
}
.dk-lesson .dk-mcq { box-shadow: none; }
.dk-mcq-q { display: flex; gap: 10px; margin: 0 0 12px; font-weight: 700; font-size: 1rem; line-height: 1.5; }
.dk-mcq-q .dk-qnum {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 8px; background: var(--dk-primary-soft); color: var(--dk-primary);
  display: inline-flex; align-items: center; justify-content: center; font-size: .8rem;
}
.dk-mcq-options { display: grid; gap: 8px; }
.dk-opt {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 11px 14px; border-radius: 12px;
  border: 1px solid var(--dk-border); background: var(--dk-surface); cursor: pointer; font-size: .94rem; line-height: 1.45;
  transition: border-color .15s, background .15s;
}
.dk-opt:hover:not(:disabled) { border-color: var(--dk-primary); background: var(--dk-primary-soft); }
.dk-opt:disabled { cursor: default; }
.dk-opt-key {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--dk-border);
  display: inline-flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 700; color: var(--dk-muted);
}
.dk-opt-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.dk-opt .dk-opt-icon { display: none; }
.dk-opt.is-correct { border-color: var(--dk-success); background: var(--dk-success-soft); }
.dk-opt.is-correct .dk-opt-key { background: var(--dk-success); border-color: var(--dk-success); color: #fff; }
.dk-opt.is-correct .dk-opt-icon.ok { display: inline-block; color: var(--dk-success); }
.dk-opt.is-wrong { border-color: var(--dk-danger); background: var(--dk-danger-soft); }
.dk-opt.is-wrong .dk-opt-key { background: var(--dk-danger); border-color: var(--dk-danger); color: #fff; }
.dk-opt.is-wrong .dk-opt-icon.bad { display: inline-block; color: var(--dk-danger); }
.dk-mcq-feedback {
  display: none; margin-top: 12px; padding: 10px 14px; border-radius: 12px; font-size: .9rem; line-height: 1.55;
  background: var(--dk-surface-2); border: 1px solid var(--dk-border);
}
.dk-mcq.is-answered .dk-mcq-feedback { display: block; }
.dk-mcq-feedback b.ok { color: var(--dk-success); }
.dk-mcq-feedback b.bad { color: var(--dk-danger); }

/* ---------- Pager & upsell ---------- */
.dk-pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.dk-pager .dk-btn { min-height: 48px; max-width: 100%; }
.dk-pager .dk-btn span.dk-pager-label { overflow: hidden; text-overflow: ellipsis; max-width: 260px; display: inline-block; }

.dk-upsell {
  margin-top: 28px; padding: 22px; border-radius: 18px; border: 1px solid var(--dk-border);
  background: linear-gradient(135deg, var(--dk-grad-from), var(--dk-grad-to)); color: #fff; border-color: transparent;
  box-shadow: 0 12px 30px color-mix(in srgb, var(--dk-grad-from) 30%, transparent);
}
.dk-upsell h3 { margin: 0 0 6px; font-size: 1.15rem; color: #fff; }
.dk-upsell p { margin: 0 0 14px; color: rgba(255, 255, 255, .85); font-size: .92rem; }
.dk-upsell .dk-btn:not(.dk-btn-accent) { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .45); color: #fff; }
.dk-upsell .dk-btn:not(.dk-btn-accent):hover { background: rgba(255, 255, 255, .24); }
.dk-upsell .dk-btn:not(.dk-btn-accent) .gsym { color: #fff; }
.dk-upsell-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.dk-upsell-list button {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .12); font-size: .82rem; cursor: pointer; color: #fff;
}
.dk-upsell-list button:hover { background: rgba(255, 255, 255, .22); border-color: rgba(255, 255, 255, .7); }
.dk-upsell-list .gsym { font-size: 1rem; color: rgba(255, 255, 255, .85) !important; }
.dk-upsell-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Skeleton / states ---------- */
.dk-skel { border-radius: 10px; background: linear-gradient(90deg, var(--dk-surface-2) 25%, var(--dk-border) 37%, var(--dk-surface-2) 63%); background-size: 400% 100%; animation: dk-shimmer 1.4s ease infinite; }
@keyframes dk-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.dk-skel-line { height: 14px; margin: 10px 0; }
.dk-empty { text-align: center; padding: 48px 20px; color: var(--dk-muted); }
.dk-empty .gsym { font-size: 2.6rem; color: var(--dk-border); }

/* ---------- Scrim (mobile sidebar) ---------- */
.dk-scrim { position: fixed; inset: 0; background: rgba(5, 10, 20, .5); z-index: 90; opacity: 0; pointer-events: none; transition: opacity .25s; }
.dk-scrim.is-on { opacity: 1; pointer-events: auto; }

/* ---------- Modal ---------- */
.dk-modal {
  position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(5, 10, 20, .55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .2s ease;
}
.dk-modal.is-open { opacity: 1; }
.dk-modal-card {
  position: relative; width: 100%; max-width: 520px; max-height: calc(100dvh - 32px); overflow-y: auto;
  background: var(--dk-surface); color: var(--dk-text); border-radius: 22px; box-shadow: var(--dk-shadow-lg);
  padding: 28px 26px 24px; transform: translateY(12px) scale(.98); transition: transform .25s cubic-bezier(.2, .9, .3, 1.2);
}
.dk-modal.is-open .dk-modal-card { transform: none; }
.dk-modal-wide .dk-modal-card { max-width: 920px; padding: 0; overflow: hidden; }
.dk-modal-close { position: absolute; top: 12px; right: 12px; }
.dk-modal-icon {
  width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
  background: var(--dk-accent-soft); color: var(--dk-accent);
}
.dk-modal-icon .gsym { font-size: 1.8rem; }
.dk-modal h2 { margin: 0 0 8px; font-size: 1.35rem; line-height: 1.3; padding-right: 30px; }
.dk-modal p.dk-lead { margin: 0 0 16px; color: var(--dk-muted); font-size: .95rem; }
.dk-benefits { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 8px; }
.dk-benefits li { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.dk-benefits .gsym { color: var(--dk-success); font-size: 1.15rem; }
.dk-modal-actions { display: grid; gap: 10px; }
.dk-modal-note { margin: 14px 0 0; font-size: .82rem; color: var(--dk-muted); text-align: center; }

.dk-inst-card { border: 1px solid var(--dk-border); border-radius: 16px; padding: 14px; margin: 0 0 16px; background: var(--dk-surface-2); }
.dk-inst-top { display: flex; gap: 12px; align-items: center; }
.dk-inst-top img { width: 52px; height: 52px; border-radius: 12px; object-fit: contain; background: #fff; border: 1px solid var(--dk-border); flex-shrink: 0; }
.dk-inst-top .dk-ph { width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--dk-primary-soft); color: var(--dk-primary); font-weight: 700; font-size: 1.2rem; flex-shrink: 0; }
.dk-inst-name { font-weight: 700; line-height: 1.3; }
.dk-inst-loc { font-size: .82rem; color: var(--dk-muted); margin-top: 2px; }
.dk-inst-lines { margin: 12px 0 0; display: grid; gap: 6px; font-size: .86rem; }
.dk-inst-lines div { display: flex; gap: 8px; align-items: flex-start; overflow-wrap: anywhere; }
.dk-inst-lines .gsym { font-size: 1.05rem; color: var(--dk-muted); }
.dk-inst-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-top: 14px; }
.dk-inst-actions .dk-btn { min-height: 40px; }
.dk-btn-wa { background: #25d366; border-color: #25d366; color: #fff; }
.dk-btn-wa:hover { background: #1fb457; border-color: #1fb457; color: #fff; }

.dk-video { width: 100%; aspect-ratio: 16 / 9; background: #000; display: block; }
.dk-video-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px 12px 20px; border-bottom: 1px solid var(--dk-border); }
.dk-video-head h3 { margin: 0; flex: 1; font-size: 1rem; }

.dk-lightbox img { width: 100%; height: auto; display: block; border-radius: 0; background: #fff; }

/* ---------- Toast ---------- */
.dk-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); z-index: 3000; opacity: 0;
  background: #111827; color: #fff; padding: 12px 18px; border-radius: 12px; font-size: .9rem; box-shadow: var(--dk-shadow-lg);
  transition: opacity .25s, transform .25s; max-width: calc(100vw - 32px); pointer-events: none;
}
.dk-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Onboarding tour ---------- */
.dk-tour { position: fixed; inset: 0; z-index: 2500; pointer-events: none; }
.dk-tour-shade { position: absolute; inset: 0; background: rgba(5, 10, 20, .6); pointer-events: auto; transition: opacity .2s; }
.dk-tour.has-target .dk-tour-shade { background: transparent; }
.dk-tour-hole {
  position: absolute; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(5, 10, 20, .6), 0 0 0 3px var(--dk-accent);
  transition: all .3s ease; pointer-events: none; display: none;
}
.dk-tour.has-target .dk-tour-hole { display: block; }
.dk-tour-card {
  position: absolute; width: min(360px, calc(100vw - 24px)); background: var(--dk-surface); color: var(--dk-text);
  border-radius: 18px; box-shadow: var(--dk-shadow-lg); padding: 18px 18px 14px; pointer-events: auto;
  transition: top .3s ease, left .3s ease; border: 1px solid var(--dk-border);
}
.dk-tour-card.is-center { left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); width: min(440px, calc(100vw - 24px)); padding: 26px 24px 18px; }
.dk-tour-step { font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--dk-accent); margin-bottom: 6px; }
.dk-tour-card h3 { margin: 0 0 6px; font-size: 1.08rem; line-height: 1.35; }
.dk-tour-card.is-center h3 { font-size: 1.35rem; }
.dk-tour-card p { margin: 0 0 14px; font-size: .9rem; color: var(--dk-muted); line-height: 1.55; }
.dk-tour-hero { width: 60px; height: 60px; border-radius: 18px; display: flex; align-items: center; justify-content: center; background: var(--dk-primary-soft); color: var(--dk-primary); margin-bottom: 14px; }
.dk-tour-hero .gsym { font-size: 2rem; }
.dk-tour-foot { display: flex; align-items: center; gap: 8px; }
.dk-tour-dots { display: flex; gap: 5px; flex: 1; }
.dk-tour-dots i { width: 6px; height: 6px; border-radius: 99px; background: var(--dk-border); transition: all .2s; }
.dk-tour-dots i.on { width: 18px; background: var(--dk-primary); }
.dk-tour-arrow { position: absolute; width: 14px; height: 14px; background: var(--dk-surface); transform: rotate(45deg); border: 1px solid var(--dk-border); }

/* ---------- Google Translate: hide Google's own UI, keep our selector ---------- */
.dk-gt-host { position: absolute !important; left: -9999px !important; top: 0 !important; width: 1px; height: 1px; overflow: hidden; }
body { top: 0 !important; }
body > .skiptranslate, iframe.skiptranslate, .goog-te-banner-frame, #goog-gt-tt, .goog-te-balloon-frame,
.VIpgJd-ZVi9od-ORHb-OEVmcd, .VIpgJd-ZVi9od-aZ2wEe-wOHMyf, .VIpgJd-yAWNEb-L7lbkb { display: none !important; }
.goog-text-highlight, .VIpgJd-yAWNEb-VIpgJd-fmcmS-sn54Q { background: none !important; box-shadow: none !important; }
font { background: transparent !important; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .dk-layout, .dk-layout.dk-collapsed { grid-template-columns: minmax(0, 1fr); }
  .dk-layout.dk-collapsed .dk-sidebar { visibility: visible; }
  .dk-sidebar {
    position: fixed; top: 0; bottom: 0; left: 0; width: min(340px, 88vw); z-index: 100;
    transform: translateX(-102%); transition: transform .28s ease; box-shadow: var(--dk-shadow-lg);
  }
  .dk-sidebar.is-open { transform: none; }
  .dk-sidebar-close { display: inline-flex; }
  .dk-content { padding: 18px 14px 80px; }
  .dk-lesson { padding: 20px 16px; border-radius: 14px; }
  .dk-crumbs .dk-crumb-chapter, .dk-crumbs .dk-crumb-sep { display: none; }
  .dk-hide-sm { display: none !important; }
  .dk-sim-stage { height: 72vh; min-height: 420px; }
}
@media (max-width: 560px) {
  .dk-topbar { gap: 4px; padding: 0 6px; }
  .dk-lang select { max-width: 84px; }
  .dk-lang { padding-left: 8px; }
  .dk-cta-text { display: none; }
  .dk-pager .dk-btn { flex: 1; }
  .dk-pager .dk-btn span.dk-pager-label { max-width: 110px; }
  .dk-modal-card { padding: 24px 18px 18px; border-radius: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
