/**
 * Sikshya Learn UI — SaaS learning workspace (long-session friendly).
 *
 * Notes:
 * - This file styles only the distraction-free Learn shell.
 * - Keep contrast comfortable (avoid pure black on pure white).
 */

:root {
  /* =========================================================
   * Sikshya Learn — STYLE GUIDE (Design Tokens)
   * =======================================================*/

  /* Layout */
  --sikshya-learn-topbar-h: 56px;
  --sikshya-learn-railhead-h: 52px;
  --sikshya-learn-railhead-pad: 16px;
  --sikshya-learn-sidebar-w: 400px;
  --sikshya-learn-sidebar-w-current: var(--sikshya-learn-sidebar-w);
  --sikshya-learn-gutter: 16px;
  /* Reserved bottom space inside the right learn column (lesson/quiz nav strip) */
  --sikshya-learn-content-nav-h: 72px;
  /* Offset for safe area; admin-bar is handled separately to avoid double-spacing */
  --sikshya-learn-top-offset: env(safe-area-inset-top, 0px);
  /* Topbar visibility multiplier (1 visible, 0 scrolled away) */
  --sikshya-learn-topbar-visible: 1;

  /* Curriculum sidebar — derived from Sikshya Learn tokens (brand blue, neutral surfaces) */
  --sikshya-curriculum-accent: var(--sikshya-learn-primary);
  --sikshya-curriculum-accent-strong: #1f4585;
  --sikshya-curriculum-section-open: rgba(15, 23, 42, 0.04);
  --sikshya-curriculum-row-active: rgba(44, 91, 168, 0.08);
  --sikshya-curriculum-row-hover: rgba(15, 23, 42, 0.04);
  --sikshya-curriculum-check-todo: rgba(17, 24, 39, 0.35);

  /* Color system (comfortable contrast) */
  --sikshya-learn-bg: #f5f8fc;
  --sikshya-learn-surface: #ffffff;
  --sikshya-learn-surface-2: #f8fafc;
  --sikshya-learn-surface-3: #e8f0fa;
  --sikshya-learn-text: #0f172a;
  --sikshya-learn-muted: #64748b;
  --sikshya-learn-border: #e2e8f0;
  /* Top bar — light surface (matches panels + public Sikshya aesthetic) */
  --sikshya-learn-topbar-bg: rgba(44, 91, 168, 0.08);
  --sikshya-learn-topbar-edge: rgba(15, 23, 42, 0.08);
  --sikshya-learn-topbar-shadow: 0 1px 0 rgba(15, 23, 42, 0.05), 0 6px 18px rgba(15, 23, 42, 0.05);

  /* Brand / actions */
  --sikshya-learn-primary: #2c5ba8;
  --sikshya-learn-primary-2: #a8c3e3;
  --sikshya-learn-danger: #dc2626;
  --sikshya-learn-success: #16a34a;

  /* Typography scale */
  --sikshya-learn-fs-11: 11px;
  --sikshya-learn-fs-12: 12px;
  --sikshya-learn-fs-13: 13px;
  --sikshya-learn-fs-14: 14px;
  --sikshya-learn-fs-15: 15px;
  --sikshya-learn-fs-16: 16px;
  --sikshya-learn-fs-18: 18px;
  --sikshya-learn-fs-22: 22px;

  /* Long-session typography */
  --sikshya-learn-lh-body: 1.65;
  --sikshya-learn-lh-tight: 1.25;
  --sikshya-learn-tracking-tight: -0.015em;

  /* Spacing scale */
  --sikshya-learn-space-6: 6px;
  --sikshya-learn-space-8: 8px;
  --sikshya-learn-space-10: 10px;
  --sikshya-learn-space-12: 12px;
  --sikshya-learn-space-14: 14px;
  --sikshya-learn-space-16: 16px;

  /* Radius + shadows */
  --sikshya-learn-radius-8: 8px;
  --sikshya-learn-radius-10: 10px;
  --sikshya-learn-radius-12: 12px;
  --sikshya-learn-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --sikshya-learn-shadow-md: 0 1px 2px rgba(16, 24, 40, 0.06), 0 10px 28px rgba(16, 24, 40, 0.08);
  --sikshya-learn-shadow-panel: 0 1px 3px rgba(16, 24, 40, 0.05), 0 6px 24px rgba(16, 24, 40, 0.04);

  /* Main column reading width (prose / tabs) */
  --sikshya-learn-prose-max: 52rem;

  /* Focus ring (accessibility) */
  --sikshya-learn-focus: var(--sikshya-learn-primary);
  --sikshya-learn-focus-shadow: 0 0 0 4px rgba(44, 91, 168, 0.16);

  /* UI neutrals for long-session states */
  --sikshya-learn-ink: rgba(15, 23, 42, 0.92);
  --sikshya-learn-hover: rgba(15, 23, 42, 0.04);
  --sikshya-learn-press: rgba(15, 23, 42, 0.06);
  --sikshya-learn-accent-wash: rgba(44, 91, 168, 0.06);
  --sikshya-learn-accent-wash-2: rgba(44, 91, 168, 0.10);
  --sikshya-learn-sidebar-active: rgba(44, 91, 168, 0.10);
}

/* Hub / shell-only mode: hide curriculum rail */
.sikshya-learning-shell--hub {
  --sikshya-learn-sidebar-w-current: 0px;
}

.sikshya-learning-shell--hub .sikshya-learnSidebar,
.sikshya-learning-shell--hub .sikshya-learnOverlay {
  display: none !important;
}

/* Collapsible sidebar (desktop + mobile) */
.sikshya-sidebarCollapsed {
  --sikshya-learn-sidebar-w-current: 0px;
}

/* WP adds layout offset for admin bar; don't double-count it */
.admin-bar.sikshya-learning-shell {
  --sikshya-learn-top-offset: 0px;
}

/* Base */
.sikshya-learning-shell,
.sikshya-learning-shell * {
  box-sizing: border-box;
}

.sikshya-learning-shell {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  font-size: var(--sikshya-learn-fs-15);
  line-height: var(--sikshya-learn-lh-body);
  background: var(--sikshya-learn-bg);
  color: var(--sikshya-learn-text);
  max-width: 100vw;
  overflow-x: hidden;
  scroll-padding-top: calc(var(--sikshya-learn-top-offset) + var(--sikshya-learn-topbar-h) + 8px);
}

.sikshya-learning-shell a {
  color: inherit;
}

.sikshya-muted {
  color: var(--sikshya-learn-muted);
}

.sikshya-zeroMargin {
  margin: 0;
}

.sikshya-learning-shell button,
.sikshya-learning-shell input,
.sikshya-learning-shell select,
.sikshya-learning-shell textarea {
  font: inherit;
}

.sikshya-learning-app {
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

/* Lesson / quiz / in-course learn: fill viewport so the main row can split into two equal-height columns */
.sikshya-learning-shell--lesson .sikshya-learning-app,
.sikshya-learning-shell--quiz .sikshya-learning-app,
.sikshya-learning-shell--learn:not(.sikshya-learning-shell--hub) .sikshya-learning-app {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  /* Lock the shell to one viewport so the curriculum rail cannot stretch with page-length content */
  max-height: 100dvh;
  overflow: hidden;
}

/* Logged-in WP admin bar sits above the shell — shorten the workspace so nothing clips under it */
.admin-bar.sikshya-learning-shell--lesson .sikshya-learning-app,
.admin-bar.sikshya-learning-shell--quiz .sikshya-learning-app,
.admin-bar.sikshya-learning-shell--learn:not(.sikshya-learning-shell--hub) .sikshya-learning-app {
  max-height: calc(100dvh - 32px);
}

.sikshya-learning-shell--lesson .sikshya-learnLayout,
.sikshya-learning-shell--quiz .sikshya-learnLayout,
.sikshya-learning-shell--learn:not(.sikshya-learning-shell--hub) .sikshya-learnLayout {
  flex: 1 1 auto;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
}

/* Pin the workspace row to the viewport so the curriculum sidebar does not stretch with content height */
.sikshya-learning-shell--lesson .sikshya-learnLayout > .sikshya-learnMain,
.sikshya-learning-shell--quiz .sikshya-learnLayout > .sikshya-learnMain,
.sikshya-learning-shell--learn:not(.sikshya-learning-shell--hub) .sikshya-learnLayout > .sikshya-learnMain {
  min-height: 0;
}

/* Layout shell */
.sikshya-learnLayout {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
  min-height: 100dvh;
}

/* Top bar — light chrome: brand, current context, exit (Sikshya Learn) */
.sikshya-learnTopbar {
  position: sticky;
  top: var(--sikshya-learn-top-offset);
  z-index: 50;
  height: var(--sikshya-learn-topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 0;
  padding-bottom: 0;
  padding-left: max(var(--sikshya-learn-railhead-pad), env(safe-area-inset-left));
  padding-right: max(var(--sikshya-learn-railhead-pad), env(safe-area-inset-right));
  background: color-mix(in srgb, var(--sikshya-learn-surface) 72%, transparent);
  backdrop-filter: saturate(1.2) blur(12px);
  -webkit-backdrop-filter: saturate(1.2) blur(12px);
  color: var(--sikshya-learn-text);
  border-bottom: 1px solid var(--sikshya-learn-topbar-edge);
  box-shadow: var(--sikshya-learn-topbar-shadow);
}

.sikshya-learnTopbar__left {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.sikshya-learnTopbar .sikshya-iconBtn {
  flex: 0 0 auto;
  color: var(--sikshya-learn-text);
  border-radius: var(--sikshya-learn-radius-10);
}

.sikshya-learnTopbar .sikshya-iconBtn:hover {
  background: var(--sikshya-learn-accent-wash);
  color: var(--sikshya-learn-primary);
}

.sikshya-learnTopbar .sikshya-iconBtn:active {
  background: var(--sikshya-learn-accent-wash-2);
}

.sikshya-learnTopbar__brand {
  flex: 0 0 auto;
  font-weight: 800;
  font-size: var(--sikshya-learn-fs-14);
  letter-spacing: var(--sikshya-learn-tracking-tight);
  color: var(--sikshya-learn-text);
  text-decoration: none;
  white-space: nowrap;
  padding: 6px 8px;
  margin: 0 2px 0 0;
  border-radius: var(--sikshya-learn-radius-8);
  transition: color 0.15s ease, background 0.15s ease;
}

.sikshya-learnTopbar__brand:hover {
  color: var(--sikshya-learn-primary);
  background: var(--sikshya-learn-accent-wash);
}

.sikshya-learnTopbar__brand:focus-visible {
  outline: 2px solid var(--sikshya-learn-focus);
  outline-offset: 2px;
}

.sikshya-learnTopbar__title {
  min-width: 0;
  flex: 1 1 auto;
  margin: 0;
  padding: 4px 0 4px 14px;
  border-left: 1px solid var(--sikshya-learn-border);
  font-weight: 600;
  font-size: var(--sikshya-learn-fs-13);
  line-height: var(--sikshya-learn-lh-tight);
  letter-spacing: var(--sikshya-learn-tracking-tight);
  color: var(--sikshya-learn-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sikshya-learnTopbar__right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

/* Topbar progress (center) */
.sikshya-learnTopbar__middle {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none; /* allow clicks only on button */
}

.sikshya-learnTopbar__middle > * {
  pointer-events: auto;
}

@media (max-width: 640px) {
  .sikshya-learnTopbar__middle {
    display: none;
  }
}

.sikshya-learnTopbar__right .sikshya-btn {
  border-radius: var(--sikshya-learn-radius-10);
}

@media (max-width: 1023px) {
  .sikshya-learnTopbar__title {
    max-width: min(52vw, 280px);
  }
}

@media (max-width: 480px) {
  .sikshya-learnTopbar__brand {
    max-width: 38vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* =========================================================
 * Buttons (Learn Style Guide Component)
 * - Primary: main CTA (Continue, Mark complete, Start quiz)
 * - Outline: secondary actions on light chrome (Exit learning)
 * - Light: subtle actions on dark surfaces (Prev/Next on player)
 * - Dark: optional contrast on dark surfaces
 * =======================================================*/
.sikshya-learning-shell .sikshya-btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  font-weight: 750;
  letter-spacing: var(--sikshya-learn-tracking-tight);
  border-radius: var(--sikshya-learn-radius-10);
  padding: 10px 14px;
  font-size: var(--sikshya-learn-fs-14);
  line-height: var(--sikshya-learn-lh-tight);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  box-shadow: none;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 120ms ease;
}

.sikshya-learning-shell .sikshya-btn:active {
  transform: translateY(1px);
}

.sikshya-learning-shell .sikshya-btn:focus-visible {
  outline: 2px solid var(--sikshya-learn-focus);
  outline-offset: 2px;
  box-shadow: var(--sikshya-learn-focus-shadow);
}

.sikshya-learning-shell .sikshya-btn[aria-disabled="true"],
.sikshya-learning-shell .sikshya-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
}

/* Size */
.sikshya-learning-shell .sikshya-btn--sm {
  padding: 8px 12px;
  font-size: var(--sikshya-learn-fs-13);
}

/* Primary */
.sikshya-learning-shell .sikshya-btn--primary {
  background: var(--sikshya-learn-primary);
  color: #fff;
  border-color: rgba(44, 91, 168, 0.26);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.16) inset;
}

.sikshya-learning-shell .sikshya-btn--primary:hover {
  background: var(--sikshya-curriculum-accent-strong);
}

/* Outline — secondary actions (e.g. Exit learning on light top bar) */
.sikshya-learning-shell .sikshya-btn--outline {
  background: var(--sikshya-learn-surface);
  color: var(--sikshya-learn-text);
  border-color: var(--sikshya-learn-border);
  font-weight: 700;
  box-shadow: none;
}

.sikshya-learning-shell .sikshya-btn--outline:hover {
  background: var(--sikshya-learn-surface-2);
  border-color: rgba(44, 91, 168, 0.20);
  color: var(--sikshya-learn-text);
}

.sikshya-learning-shell .sikshya-btn--outline:active {
  background: var(--sikshya-learn-surface-3);
}

/* Dark — reserved for future dark surfaces (e.g. embedded players); not used on light top bar */
.sikshya-learning-shell .sikshya-btn--dark {
  background: #1f2937;
  color: #f9fafb;
  border-color: rgba(15, 23, 42, 0.5);
}

.sikshya-learning-shell .sikshya-btn--dark:hover {
  background: #111827;
  border-color: #111827;
}

/* Light */
.sikshya-learning-shell .sikshya-btn--light {
  background: var(--sikshya-learn-surface-2);
  color: var(--sikshya-learn-text);
  border-color: var(--sikshya-learn-border);
}

.sikshya-learning-shell .sikshya-btn--light:hover {
  background: var(--sikshya-learn-surface-3);
  border-color: rgba(44, 91, 168, 0.16);
}

/* Icon sizing inside buttons */
.sikshya-learning-shell .sikshya-btn svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.sikshya-iconBtn {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--sikshya-learn-radius-10);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.sikshya-iconBtn:hover {
  background: var(--sikshya-learn-press);
}

.sikshya-iconBtn:active {
  transform: translateY(1px);
}

.sikshya-iconBtn:focus-visible {
  outline: 2px solid var(--sikshya-learn-focus);
  outline-offset: 2px;
}

.sikshya-iconBtn svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* Main area — lesson/quiz / in-course learn: two columns; hub mode unchanged */
.sikshya-learnMain {
  position: relative;
  min-width: 0;
}

@media (min-width: 1024px) {
  .sikshya-learning-shell--lesson .sikshya-learnMain,
  .sikshya-learning-shell--quiz .sikshya-learnMain,
  .sikshya-learning-shell--learn:not(.sikshya-learning-shell--hub) .sikshya-learnMain {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    flex: 1 1 auto;
    min-height: 0;
  }
}

/*
 * Sidebar: position fixed + top/bottom pins full height under the sticky top bar.
 * (Matches “sticky” learner expectation: column stays put while main content scrolls.)
 */
.sikshya-learnSidebar {
  position: fixed;
  top: calc(var(--sikshya-learn-top-offset) + (var(--sikshya-learn-topbar-h) * var(--sikshya-learn-topbar-visible)));
  left: 0;
  bottom: 0;
  width: var(--sikshya-learn-sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--sikshya-learn-surface);
  border-right: 1px solid var(--sikshya-learn-border);
  z-index: 40;
  /* Sidebar itself should NOT scroll; only the outline area scrolls. */
  overflow: hidden;
  /* Prevent scroll-chaining from sidebar → main content. */
  overscroll-behavior: contain;
  box-shadow: 1px 0 0 rgba(15, 23, 42, 0.03), 6px 0 32px rgba(15, 23, 42, 0.04);
  will-change: transform;
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 1024px) {
  .sikshya-learning-shell--lesson .sikshya-learnSidebar,
  .sikshya-learning-shell--quiz .sikshya-learnSidebar,
  .sikshya-learning-shell--learn:not(.sikshya-learning-shell--hub) .sikshya-learnSidebar {
    position: relative;
    top: auto;
    left: auto;
    bottom: auto;
    flex: 0 0 var(--sikshya-learn-sidebar-w-current);
    width: var(--sikshya-learn-sidebar-w-current);
    max-width: var(--sikshya-learn-sidebar-w);
    align-self: stretch;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
    transform: none !important;
    transition: flex-basis 240ms cubic-bezier(0.22, 1, 0.36, 1), width 240ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  /* Course Builder default: entire sidebar column scrolls (previous behaviour). */
  .sikshya-learning-shell--lesson .sikshya-learnSidebar:not([data-sik-curriculum-scroll="1"]),
  .sikshya-learning-shell--quiz .sikshya-learnSidebar:not([data-sik-curriculum-scroll="1"]),
  .sikshya-learning-shell--learn:not(.sikshya-learning-shell--hub) .sikshya-learnSidebar:not([data-sik-curriculum-scroll="1"]) {
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  /* Collapse class is on `<html>`; shell variant is on `<body>` — use descendants, not a compound selector. */
  .sikshya-sidebarCollapsed .sikshya-learning-shell--lesson .sikshya-learnSidebar,
  .sikshya-sidebarCollapsed .sikshya-learning-shell--quiz .sikshya-learnSidebar,
  .sikshya-sidebarCollapsed .sikshya-learning-shell--learn:not(.sikshya-learning-shell--hub) .sikshya-learnSidebar {
    flex-basis: 0;
    width: 0;
    max-width: 0;
    overflow: hidden;
    border-right: 0;
    padding: 0;
    box-shadow: none;
    pointer-events: none;
  }
}

.sikshya-sidebarCollapsed .sikshya-learnSidebar {
  transform: translateX(calc(-1 * var(--sikshya-learn-sidebar-w)));
}

@media (min-width: 1024px) {
  /* Collapse class is on `<html>`; shell variant is on `<body>` — use descendants, not a compound selector. */
  .sikshya-sidebarCollapsed .sikshya-learning-shell--lesson .sikshya-learnSidebar,
  .sikshya-sidebarCollapsed .sikshya-learning-shell--quiz .sikshya-learnSidebar,
  .sikshya-sidebarCollapsed .sikshya-learning-shell--learn:not(.sikshya-learning-shell--hub) .sikshya-learnSidebar {
    transform: none;
  }
}

.sikshya-learnSidebar__inner {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

@media (min-width: 1024px) {
  /* Sidebar scroll OFF: outline + footer flow; outer column scrolls. */
  .sikshya-learning-shell--lesson .sikshya-learnSidebar:not([data-sik-curriculum-scroll="1"]) .sikshya-learnSidebar__inner,
  .sikshya-learning-shell--quiz .sikshya-learnSidebar:not([data-sik-curriculum-scroll="1"]) .sikshya-learnSidebar__inner,
  .sikshya-learning-shell--learn:not(.sikshya-learning-shell--hub) .sikshya-learnSidebar:not([data-sik-curriculum-scroll="1"]) .sikshya-learnSidebar__inner {
    overflow: visible;
    height: auto;
    max-height: none;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  .sikshya-learning-shell--lesson .sikshya-learnSidebar:not([data-sik-curriculum-scroll="1"]) .sikshya-learnSidebar__scroll,
  .sikshya-learning-shell--quiz .sikshya-learnSidebar:not([data-sik-curriculum-scroll="1"]) .sikshya-learnSidebar__scroll,
  .sikshya-learning-shell--learn:not(.sikshya-learning-shell--hub) .sikshya-learnSidebar:not([data-sik-curriculum-scroll="1"]) .sikshya-learnSidebar__scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: visible;
    max-height: none;
  }

  /* Sidebar scroll ON (Course Builder): fixed rail, curriculum list scrolls only. */
  .sikshya-learning-shell--lesson .sikshya-learnSidebar[data-sik-curriculum-scroll="1"] .sikshya-learnSidebar__inner,
  .sikshya-learning-shell--quiz .sikshya-learnSidebar[data-sik-curriculum-scroll="1"] .sikshya-learnSidebar__inner,
  .sikshya-learning-shell--learn:not(.sikshya-learning-shell--hub) .sikshya-learnSidebar[data-sik-curriculum-scroll="1"] .sikshya-learnSidebar__inner {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    height: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
  }

  .sikshya-learning-shell--lesson .sikshya-learnSidebar[data-sik-curriculum-scroll="1"] .sikshya-learnSidebar__scroll,
  .sikshya-learning-shell--quiz .sikshya-learnSidebar[data-sik-curriculum-scroll="1"] .sikshya-learnSidebar__scroll,
  .sikshya-learning-shell--learn:not(.sikshya-learning-shell--hub) .sikshya-learnSidebar[data-sik-curriculum-scroll="1"] .sikshya-learnSidebar__scroll {
    flex: 1 1 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    max-height: none;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
    /* Stop wheel/trackpad scroll from propagating into the right content column. */
    overscroll-behavior: contain;
  }
}

.sikshya-learnSidebar__head {
  /* Was fixed-height single-line. Now stacks course title + "Course content"
   * kicker, so let it grow vertically with a comfortable two-line layout. */
  min-height: var(--sikshya-learn-railhead-h);
  padding: 10px var(--sikshya-learn-railhead-pad);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  border-bottom: 1px solid var(--sikshya-learn-border);
  background: var(--sikshya-learn-surface);
}

/* Course title — primary text; truncated on overflow with full title shown
 * via the `title` attribute. Tighter font-size than the old heading so the
 * two-line header stays compact in a 400px-wide drawer. */
.sikshya-learnSidebar__heading {
  font-size: var(--sikshya-learn-fs-13);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--sikshya-learn-text);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Course title link — inherits the heading's color; underline appears on
 * hover/focus only to keep the header calm by default. */
.sikshya-learnSidebar__courseLink {
  color: inherit;
  text-decoration: none;
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}
.sikshya-learnSidebar__courseLink:hover,
.sikshya-learnSidebar__courseLink:focus-visible {
  color: var(--sikshya-learn-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* "Course content" kicker — small muted uppercase label under the title. */
.sikshya-learnSidebar__kicker {
  font-size: var(--sikshya-learn-fs-11);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sikshya-learn-muted);
  line-height: 1.2;
}

.sikshya-sidebarAction {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--sikshya-learn-muted);
  font-weight: 700;
  font-size: var(--sikshya-learn-fs-12);
  cursor: pointer;
  padding: 6px 8px;
  border-radius: var(--sikshya-learn-radius-10);
}

.sikshya-sidebarAction:hover {
  background: var(--sikshya-learn-surface-2);
  color: var(--sikshya-learn-text);
}

.sikshya-learnSidebar__scroll {
  flex: 1;
  overflow: visible;
  /* Footer widgets (Q&A, etc.) live outside the scroll area. */
  padding: 10px 12px 16px;
}

.sikshya-learnSidebar__scroll:has(.sikshya-curriculumOutline) {
  padding: 0;
}

.sikshya-learnSidebar__scroll::-webkit-scrollbar {
  width: 8px;
}

.sikshya-learnSidebar__scroll::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.20);
  border-radius: 4px;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.sikshya-learnSidebar__scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 23, 42, 0.30);
}

.sikshya-learnSidebar__scroll::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.03);
  border-radius: 4px;
}

/* =========================================================
 * Sidebar footer widgets (Pro add-ons hook into
 * `sikshya_learn_sidebar_footer`: Reports, Activity log,
 * Certificates, Coupons, Discussions/Q&A, etc.)
 * =======================================================*/
.sikshya-learnSidebar__inner > .sikshya-sidebarWidget,
.sikshya-learnSidebar__inner > .sikshya-sidebarDisc {
  flex: 0 0 auto;
}

/* Community discussions widgets: sidebar footer (Q&A) uses fixed docking; Discussion lives in-flow under the lesson tab panel. */
.sikshya-sidebarDisc {
  border-top: 1px solid var(--sikshya-learn-border);
  background: var(--sikshya-learn-surface);
  display: flex;
  flex-direction: column;
  min-height: 0;
  font-size: var(--sikshya-learn-fs-13, 13px);
  flex: 0 0 auto;
  max-height: none;
}

.sikshya-sidebarDisc[data-sik-disc-placement="sidebar"] {
  /* Treat Q&A as a true sidebar footer (pinned by flex layout). */
  position: static;
  width: auto;
  z-index: 1;
  margin-top: auto;
}

.sikshya-sidebarDisc--inContent[data-sik-disc-placement="content"] {
  position: static;
  left: auto;
  bottom: auto;
  width: 100%;
  max-width: 100%;
  z-index: auto;
  border-top: none;
  background: transparent;
  flex: 1 1 auto;
  min-height: 280px;
}

.sikshya-sidebarDisc--inContent.sikshya-discMessenger[data-sik-disc-placement="content"] {
  min-height: 0;
}

.sikshya-sidebarDisc--inContent[data-sik-disc-placement="content"] .sikshya-sidebarDisc__composeDock .sikshya-sidebarDisc__compose {
  border-top: 0;
  padding-top: 6px;
}

/* Sidebar dock: hide sheet until Q&A footer tab opens it */
.sikshya-sidebarDisc[data-sik-disc-placement="sidebar"] .sikshya-sidebarDisc__sheet {
  display: none !important;
}

.sikshya-sidebarDisc[data-sik-disc-placement="sidebar"] .sikshya-sidebarDisc__contentArea {
  display: none !important;
}

/* Open sidebar: sheet is flex transcript column (sizes with composer + footer tabs below). */
.sikshya-sidebarDisc[data-sik-disc-placement="sidebar"][data-sik-disc-open="true"] .sikshya-sidebarDisc__sheet {
  display: flex !important;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.sikshya-sidebarDisc[data-sik-disc-placement="sidebar"][data-sik-disc-mode="discussion"] .sikshya-sidebarDisc__contentArea[data-discussion-panel],
.sikshya-sidebarDisc[data-sik-disc-placement="sidebar"][data-sik-disc-mode="qa"] .sikshya-sidebarDisc__contentArea[data-qa-panel] {
  display: flex !important;
}

/* Content tab: Discussion sheet follows [hidden]; when visible, stretch in the panel */
.sikshya-sidebarDisc--inContent[data-sik-disc-placement="content"] .sikshya-sidebarDisc__sheet[hidden] {
  display: none !important;
}

.sikshya-sidebarDisc--inContent[data-sik-disc-placement="content"] .sikshya-sidebarDisc__sheet:not([hidden]) {
  display: flex !important;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.sikshya-sidebarDisc--inContent[data-sik-disc-placement="content"] .sikshya-sidebarDisc__contentArea[data-discussion-panel] {
  display: flex !important;
}

/* Ensure the content areas within the sheet are properly styled */
.sikshya-sidebarDisc__sheet .sikshya-sidebarDisc__contentArea {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.sikshya-sidebarDisc__sheet .sikshya-sidebarDisc__contentArea .sikshya-sidebarDisc__threadScroll {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 120px;
}

.sikshya-sidebarDisc__panelHead {
  flex: 0 0 auto;
  padding: 0 2px 10px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--sikshya-learn-border, #e2e8f0);
}

.sikshya-sidebarDisc__panelTitle {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--sikshya-learn-text);
}

.sikshya-sidebarDisc__panelDesc {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--sikshya-learn-muted, #64748b);
}

.sikshya-sidebarDisc__contentArea {
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
}

/* Only show content areas when explicitly marked as active */
.sikshya-sidebarDisc__contentArea[data-discussion-panel].is-active,
.sikshya-sidebarDisc__contentArea[data-qa-panel].is-active {
  display: flex;
}

/* Discussion + Q&A compose chrome (dock / legacy markup) */
.sikshya-sidebarDisc__compose--discussion,
.sikshya-sidebarDisc__compose--qa {
  border-top: 1px solid var(--sikshya-learn-border);
  padding: 12px 0 0;
}

.sikshya-sidebarDisc__composeHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.sikshya-sidebarDisc__composeLabel {
  font-weight: 600;
  color: var(--sikshya-learn-text);
  font-size: 14px;
}

.sikshya-sidebarDisc__composeType {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 12px;
  background: var(--sikshya-learn-primary, #2c5ba8);
  color: white;
  font-weight: 500;
}

.sikshya-sidebarDisc__post--discussion,
.sikshya-sidebarDisc__post--qa {
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 500;
}

.sikshya-sidebarDisc__post--discussion {
  background: var(--sikshya-learn-primary, #2c5ba8);
}

.sikshya-sidebarDisc__post--qa {
  background: var(--sikshya-learn-primary, #2c5ba8);
}

.sikshya-sidebarDisc__post--discussion:hover,
.sikshya-sidebarDisc__post--qa:hover {
  opacity: 0.9;
}

.sikshya-sidebarDisc__post--discussion:disabled,
.sikshya-sidebarDisc__post--qa:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.sikshya-sidebarDisc__sheet[data-discussion-panel].is-active,
.sikshya-sidebarDisc__sheet[data-qa-panel].is-active {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 12px 12px;
  min-height: 0;
  flex: 1 1 auto;
}

/* Sheet visibility is driven by the [hidden] attribute and the data-state
 * attribute on the section, not by a class — keeps SSR + JS in sync. */
.sikshya-sidebarDisc[data-sik-disc-placement="sidebar"][data-sik-disc-open="false"] .sikshya-sidebarDisc__sheet {
  display: none;
}

/* Open state: sidebar column = sheet (scroll) | composer dock | footer tabs */
.sikshya-sidebarDisc[data-sik-disc-placement="sidebar"][data-sik-disc-open="true"] {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sikshya-learn-sidebar-w-current);
  z-index: 25;
  background: var(--sikshya-learn-surface);
  display: flex;
  flex-direction: column;
}

/* No need to lock sidebar scrolling since we're expanding upward from footer */

.sikshya-sidebarDisc[data-sik-disc-placement="sidebar"][data-sik-disc-open="true"] .sikshya-sidebarDisc__composeDock {
  flex: 0 0 auto;
}

.sikshya-sidebarDisc[data-sik-disc-placement="sidebar"][data-sik-disc-open="true"] .sikshya-sidebarDisc__tabsSection {
  border-top: 1px solid var(--sikshya-learn-border);
  flex: 0 0 auto;
}

/* Let the thread list grow to fill the available space in the sidebar sheet */
.sikshya-sidebarDisc[data-sik-disc-placement="sidebar"][data-sik-disc-open="true"] .sikshya-sidebarDisc__threadScroll {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
}

/* Sidebar Discussion / Q&A footer: same chrome as lesson player (.sikshya-tabsBar + .sikshya-tabBtn) */

.sikshya-sidebarDisc__tabsSection.sikshya-tabsSection {
  margin-top: 0;
  flex: 0 0 auto;
}

.sikshya-sidebarDisc .sikshya-sidebarDisc__tabsBar.sikshya-tabsBar {
  margin-bottom: 0;
  flex-wrap: nowrap;
  gap: 0;
  border-bottom-color: transparent;
  background: var(--sikshya-learn-surface-2, rgba(15, 23, 42, 0.03));
  /* Align footer strip with Prev/Next rail in main column */
  min-height: var(--sikshya-learn-content-nav-h);
  position: relative;
  z-index: 1;
  overflow: visible;
}

.sikshya-sidebarDisc .sikshya-sidebarDisc__tabsBar .sikshya-tabBtn {
  flex: 1 1 50%;
  margin-bottom: 0;
  border-radius: 0;
  text-align: center;
  justify-content: center;
  font-size: var(--sikshya-learn-fs-12, 12px);
}

/*
 * Discussion + Q&A unread counts — Messenger / Facebook-style red badge (pill + halo).
 * Applies to sidebar Q&A footer tab and main “Discussion” content tab (same primitives).
 */
.sikshya-tabBtn--withUnreadBadge {
  position: relative;
  overflow: visible;
  isolation: isolate;
  padding-right: 28px;
}

.sikshya-tabBtn--withUnreadBadge .sikshya-tabBtn__label {
  display: inline-block;
}

/* Slight emphasis when tab has unread and is not focused — draws the eye without noise */
.sikshya-tabBtn--withUnreadBadge.sikshya-tabBtn--hasUnread:not(.is-active) {
  color: var(--sikshya-learn-text);
}

.sikshya-unreadBadge {
  --sikshya-cd-unread: #fa383e;
  --sikshya-cd-unread-ring: var(--sikshya-learn-surface, #fff);
  position: absolute;
  top: 2px;
  right: 4px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--sikshya-cd-unread);
  background: radial-gradient(circle at 30% 25%, #ff8186 0%, var(--sikshya-cd-unread) 62%);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 22px;
  letter-spacing: -0.02em;
  text-align: center;
  box-sizing: border-box;
  border: 2px solid var(--sikshya-cd-unread-ring);
  box-shadow:
    0 0 0 1px rgba(250, 56, 62, 0.35),
    0 2px 6px rgba(0, 0, 0, 0.12),
    0 4px 12px rgba(250, 56, 62, 0.4);
  pointer-events: none;
  z-index: 3;
  animation: sikshya-cd-unread-glow 2.4s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .sikshya-unreadBadge {
    animation: none;
  }
}

@keyframes sikshya-cd-unread-glow {
  0%,
  100% {
    box-shadow:
      0 0 0 1px rgba(250, 56, 62, 0.35),
      0 2px 6px rgba(0, 0, 0, 0.12),
      0 4px 12px rgba(250, 56, 62, 0.38);
    transform: scale(1);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(250, 56, 62, 0.5),
      0 2px 8px rgba(0, 0, 0, 0.14),
      0 5px 16px rgba(250, 56, 62, 0.52);
    transform: scale(1.03);
  }
}

/*
 * Main column tab strip: scrolls with the page (non-sticky) so long assignment panels
 * do not leave tabs floating over content.
 */
.sikshya-learning-shell--lesson .sikshya-learnContent > .sikshya-tabsSection .sikshya-tabsBar,
.sikshya-learning-shell--quiz .sikshya-learnContent > .sikshya-tabsSection .sikshya-tabsBar {
  position: static;
  top: auto;
  overflow: visible;
  /* Transparent strip — the bar reads as a thin separator under the tabs,
   * not a white card that bleeds past where the tab buttons end. */
  background-color: transparent;
  margin-bottom: 0;
  border-bottom-color: var(--sikshya-learn-border);
  box-shadow: none;
}

/* Sidebar / compact discussion tabs reuse .sikshya-tabsBar but are not direct children — keep unobtrusive layering */
.sikshya-learnContent .sikshya-tabsSection .sikshya-tabsBar {
  overflow: visible;
}

.sikshya-learnContent .sikshya-tabsSection .sikshya-tabBtn--withUnreadBadge {
  overflow: visible;
}

@media (max-width: 1023px) {
  .sikshya-sidebarDisc[data-sik-disc-placement="sidebar"] {
    width: 100%;
    left: 0;
  }
}

.sikshya-sidebarDisc__sheet {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 12px 8px;
  min-height: 0;
  flex: 1 1 auto;
}

/* Honor the [hidden] attribute even though we set display:flex above. */
.sikshya-sidebarDisc__sheet[hidden] {
  display: none;
}

/* Compact composer bar directly above Discussion / Q&A tabs */
.sikshya-sidebarDisc__composeDock {
  flex: 0 0 auto;
  background: var(--sikshya-learn-surface-2, rgba(15, 23, 42, 0.025));
  border-top: 1px solid var(--sikshya-learn-border);
  padding: 10px 12px 8px;
}

.sikshya-sidebarDisc__composeDock[hidden] {
  display: none !important;
}

.sikshya-sidebarDisc__composeSlot[hidden] {
  display: none !important;
}

.sikshya-sidebarDisc__composeSlot:not([hidden]) {
  display: block;
}

.sikshya-sidebarDisc__composeDock .sikshya-sidebarDisc__compose {
  border-top: 0;
  padding-top: 0;
  gap: 8px;
}

.sikshya-sidebarDisc__composeDock .sikshya-sidebarDisc__textarea {
  min-height: 72px;
}

.sikshya-sidebarDisc__composeDock .sikshya-sidebarDisc__composeFoot {
  margin-top: 2px;
}

.sikshya-sidebarDisc__threadScroll {
  flex: 1 1 auto;
  min-height: 120px;
  max-height: 32vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
}

@media (min-width: 1024px) {
  .sikshya-learning-shell--lesson .sikshya-sidebarDisc__threadScroll,
  .sikshya-learning-shell--quiz .sikshya-sidebarDisc__threadScroll {
    max-height: none;
  }
}

.sikshya-sidebarDisc__threadScroll::-webkit-scrollbar {
  width: 6px;
}

.sikshya-sidebarDisc__threadScroll::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.12);
  border-radius: 999px;
}

/* ------------------------------------------------------------------
 * Messenger-style Discussion / Q&A — one scroll viewport, sticky composer
 * ------------------------------------------------------------------*/

.sikshya-discMessenger__srOnly {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.sikshya-discMessenger[data-sik-disc-placement="content"] {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.sikshya-learning-shell--lesson .sikshya-tabPanel[data-sikshya-panel="discussion"].is-active,
.sikshya-learning-shell--quiz .sikshya-tabPanel[data-sikshya-panel="discussion"].is-active {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  min-height: min(560px, calc(100dvh - 168px));
  max-height: min(620px, calc(100dvh - 140px));
  height: min(560px, calc(100dvh - 152px));
  overflow: hidden;
}

.sikshya-learning-shell--lesson .sikshya-tabPanel[data-sikshya-panel="discussion"].is-active .sikshya-contentPanel--plain,
.sikshya-learning-shell--quiz .sikshya-tabPanel[data-sikshya-panel="discussion"].is-active .sikshya-contentPanel--plain {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-top: 8px;
}

.sikshya-discMessenger[data-sik-disc-placement="content"] > .sikshya-discMessenger__sheet:not([hidden]) {
  gap: 0;
  flex: 1 1 auto;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border-radius: var(--sikshya-learn-radius-12);
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: var(--sikshya-learn-surface);
  box-shadow: var(--sikshya-learn-shadow-panel);
}

.sikshya-discMessenger[data-sik-disc-placement="content"] > .sikshya-discMessenger__composeDock:not([hidden]) {
  flex: 0 0 auto;
  margin-top: 10px;
  padding: 10px 4px 2px;
  border-top: none;
  background: transparent;
}

.sikshya-discMessenger__head.sikshya-sidebarDisc__panelHead {
  padding: 10px 12px;
  margin: 0;
  flex: 0 0 auto;
  border-bottom-color: rgba(15, 23, 42, 0.07);
}

.sikshya-discMessenger__title.sikshya-sidebarDisc__panelTitle {
  margin: 0;
  font-size: var(--sikshya-learn-fs-16);
  flex: 1 1 auto;
  min-width: 0;
}

.sikshya-discMessenger__subtitle {
  margin: 6px 0 0;
  font-size: var(--sikshya-learn-fs-12);
  line-height: 1.4;
  color: var(--sikshya-learn-muted);
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Transcript fills space between toolbar and composer — only this region scrolls */
.sikshya-discMessenger__threadViewport.sikshya-sidebarDisc__threadScroll {
  gap: 0;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 116, 139, 0.45) transparent;
  padding-top: 4px;
  padding-bottom: 8px;
  padding-right: 6px;
  padding-inline: 10px;
  background:
    radial-gradient(115% 70% at 12% -6%, rgba(44, 91, 168, 0.07), transparent 55%),
    linear-gradient(180deg, var(--sikshya-learn-surface) 0%, #f3f6fd 42%, #eff2f9 100%);
}

.sikshya-discMessenger:not(.sikshya-discMessenger--qa) .sikshya-sidebarDisc__chatBubble--discussion,
.sikshya-discMessenger.sikshya-discMessenger--qa .sikshya-sidebarDisc__chatBubble--qa {
  border-left-width: 0;
  border-radius: 17px;
  border: 1px solid rgba(15, 23, 42, 0.05);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.sikshya-discMessenger[data-sik-disc-placement="sidebar"][data-sik-disc-open="true"] .sikshya-sidebarDisc__contentArea[data-qa-panel] {
  min-height: 0;
}

.sikshya-discMessenger[data-sik-disc-placement="sidebar"][data-sik-disc-open="true"] .sikshya-sidebarDisc__threadScroll.sikshya-discMessenger__threadViewport {
  padding-inline: 8px;
}

.sikshya-discMessenger[data-sik-disc-placement="sidebar"][data-sik-disc-open="true"] .sikshya-discMessenger__composeDock:not([hidden]) {
  padding: 10px 12px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(248, 250, 252, 0.98);
}

.sikshya-discMessenger form.sikshya-discMessenger__composeForm.sikshya-sidebarDisc__compose {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sikshya-discMessenger__composerWrap {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 6px;
  margin: 0;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.sikshya-discMessenger__composerWrap:focus-within {
  border-color: rgba(44, 91, 168, 0.35);
  box-shadow: 0 0 0 4px rgba(44, 91, 168, 0.1);
}

.sikshya-discMessenger__composerMeta {
  padding: 2px 4px 0;
  min-height: 1rem;
}

.sikshya-discMessenger__metaHint {
  font-size: 11px;
  line-height: 1.35;
  color: var(--sikshya-learn-muted);
}

.sikshya-discMessenger__composerInput.sikshya-sidebarDisc__textarea {
  flex: 1 1 auto;
  min-width: 0;
  resize: none;
  overflow-y: auto;
  min-height: 44px;
  max-height: 120px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 18px;
  border: none;
  background: var(--sikshya-learn-surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.sikshya-discMessenger__composerInput.sikshya-sidebarDisc__textarea:focus {
  outline: 0;
  box-shadow: inset 0 0 0 1px rgba(44, 91, 168, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.sikshya-discMessenger__composeDock .sikshya-sidebarDisc__textarea.sikshya-discMessenger__composerInput {
  min-height: 44px;
}

.sikshya-discMessenger__send.sikshya-sidebarDisc__post,
.sikshya-discMessenger__send--qa.sikshya-sidebarDisc__post--qa {
  flex: 0 0 auto;
  align-self: center;
  padding: 0 16px;
  min-height: 40px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  background: var(--sikshya-learn-primary);
  box-shadow: 0 1px 4px rgba(44, 91, 168, 0.28);
}

.sikshya-discMessenger__send.sikshya-sidebarDisc__post:hover:not(:disabled),
.sikshya-discMessenger__send--qa.sikshya-sidebarDisc__post--qa:hover:not(:disabled) {
  filter: brightness(1.03);
}

.sikshya-discMessenger__headRow {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.sikshya-discMessenger__headActions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  margin-inline-start: auto;
}

.sikshya-discMessenger__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--sikshya-learn-muted, #64748b);
  cursor: pointer;
  flex-shrink: 0;
}

.sikshya-discMessenger__close:hover {
  background: rgba(15, 23, 42, 0.06);
  color: var(--sikshya-learn-text);
}

.sikshya-discMessenger__close:focus-visible {
  outline: 2px solid var(--sikshya-learn-primary, #2c5ba8);
  outline-offset: 2px;
}

.sikshya-discMessenger__closeIcon {
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
}

.sikshya-discMessenger__scopePill {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--sikshya-learn-primary);
  background: var(--sikshya-learn-accent-wash);
  border: 1px solid rgba(44, 91, 168, 0.14);
}

.sikshya-discMessenger--qa[data-sik-disc-placement="sidebar"][data-sik-disc-open="true"] {
  top: 0;
  bottom: auto;
  height: calc(100dvh - var(--sikshya-learn-top-offset) - (var(--sikshya-learn-topbar-h) * var(--sikshya-learn-topbar-visible)));
  max-height: none;
  box-shadow: none;
  border-radius: 0;
}

.sikshya-discMessenger--qa[data-sik-disc-placement="sidebar"][data-sik-disc-open="true"] > .sikshya-sidebarDisc__sheet.sikshya-discMessenger__sheet {
  gap: 0;
  flex: 1 1 auto;
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border-radius: 0;
  border: none;
  background: var(--sikshya-learn-surface);
  box-shadow: none;
  overflow: hidden;
}

.sikshya-discMessenger--qa[data-sik-disc-placement="sidebar"][data-sik-disc-open="true"]
  .sikshya-sidebarDisc__panelHead.sikshya-discMessenger__head {
  padding: 12px 12px 10px;
  margin: 0;
  border-bottom: 1px solid var(--sikshya-learn-border, rgba(15, 23, 42, 0.08));
  background: var(--sikshya-learn-surface);
}

.sikshya-discMessenger--qa[data-sik-disc-placement="sidebar"][data-sik-disc-open="true"]
  > .sikshya-sidebarDisc__composeDock.sikshya-discMessenger__composeDock:not([hidden]) {
  padding: 10px 12px;
  margin: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: none;
  border-radius: 0;
  border-top: 1px solid var(--sikshya-learn-border, rgba(15, 23, 42, 0.08));
  background: var(--sikshya-learn-surface-2, rgba(248, 250, 252, 0.95));
}

.sikshya-discMessenger--qa[data-sik-disc-placement="sidebar"][data-sik-disc-open="true"] .sikshya-sidebarDisc__tabsSection {
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  background: transparent;
}

.sikshya-discMessenger--qa[data-sik-disc-placement="sidebar"][data-sik-disc-open="false"] > .sikshya-sidebarDisc__tabsSection {
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  background: transparent;
}

@media (max-width: 480px) {
  .sikshya-learning-shell--lesson .sikshya-tabPanel[data-sikshya-panel="discussion"].is-active,
  .sikshya-learning-shell--quiz .sikshya-tabPanel[data-sikshya-panel="discussion"].is-active {
    min-height: min(420px, calc(100dvh - 120px));
    max-height: min(520px, calc(100dvh - 100px));
    height: min(440px, calc(100dvh - 116px));
  }

  .sikshya-discMessenger__composerWrap {
    gap: 6px;
  }

  .sikshya-discMessenger__send.sikshya-sidebarDisc__post {
    padding: 0 12px;
  }
}

.sikshya-sidebarDisc__empty {
  margin: 0;
  padding: 12px 10px;
  text-align: center;
  color: var(--sikshya-learn-muted, #64748b);
  font-size: 12px;
  line-height: 1.45;
  background: var(--sikshya-learn-surface-2, #f8fafc);
  border-radius: 8px;
}

.sikshya-sidebarDisc__lock {
  margin: 0;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.4;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 8px;
}

/* --- Discussion / Q&A: chat-thread transcript -------------------------------- */
.sikshya-sidebarDisc__thread {
  display: block;
  margin: 0 0 14px;
  padding: 0;
}

.sikshya-sidebarDisc__thread:last-child {
  margin-bottom: 6px;
}

.sikshya-sidebarDisc__chatRow {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.sikshya-sidebarDisc__avatar {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #fff;
  background: linear-gradient(135deg, var(--sikshya-learn-primary, #2c5ba8) 0%, #7a2e80 100%);
  box-shadow: 0 2px 6px rgba(44, 91, 168, 0.25);
  user-select: none;
}

.sikshya-sidebarDisc__chatCol {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sikshya-sidebarDisc__chatBubble {
  position: relative;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 12px 12px 12px 6px;
  padding: 10px 12px;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04), 0 8px 20px rgba(15, 23, 42, 0.04);
}

.sikshya-sidebarDisc__chatBubble--discussion {
  border-left: 3px solid var(--sikshya-learn-primary, #2c5ba8);
}

.sikshya-sidebarDisc__chatBubble--qa {
  border-left: 3px solid rgba(44, 91, 168, 0.35);
}

.sikshya-sidebarDisc__chatHead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-bottom: 8px;
}

.sikshya-sidebarDisc__chatTime {
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  color: var(--sikshya-learn-muted, #64748b);
  background: rgba(15, 23, 42, 0.05);
  white-space: nowrap;
}

/* Thread rail + stacked replies */
.sikshya-sidebarDisc__threadRail {
  display: flex;
  align-items: stretch;
  gap: 10px;
  padding-left: 4px;
  margin-top: 2px;
}

.sikshya-sidebarDisc__railLine {
  flex: 0 0 2px;
  width: 2px;
  align-self: stretch;
  margin-top: 4px;
  margin-bottom: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.6) 0%, rgba(148, 163, 184, 0.12) 100%);
}

.sikshya-sidebarDisc__repliesCol {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sikshya-sidebarDisc__repliesLabel {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sikshya-learn-muted, #94a3b8);
}

.sikshya-sidebarDisc__replyRow {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.sikshya-sidebarDisc__replyRow--instr {
  background: rgba(44, 91, 168, 0.04);
  border-color: rgba(44, 91, 168, 0.12);
}

.sikshya-sidebarDisc__replyRow.is-pending {
  opacity: 0.88;
  border-style: dashed;
}

.sikshya-sidebarDisc__replyAvatar {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 800;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.08);
  color: var(--sikshya-learn-text);
  user-select: none;
}

.sikshya-sidebarDisc__replyRow--instr .sikshya-sidebarDisc__replyAvatar {
  background: var(--sikshya-learn-primary, #2c5ba8);
  color: #fff;
}

.sikshya-sidebarDisc__replyBody {
  flex: 1 1 auto;
  min-width: 0;
}

.sikshya-sidebarDisc__replyTop {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 4px;
}

.sikshya-sidebarDisc__replyName {
  font-size: 11px;
  font-weight: 800;
  color: var(--sikshya-learn-text);
}

.sikshya-sidebarDisc__replyTime {
  font-size: 10px;
  font-weight: 700;
  color: var(--sikshya-learn-muted, #94a3b8);
}

.sikshya-sidebarDisc__replyMsg {
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--sikshya-learn-text);
}

/* Footer: edit hint + actions */
.sikshya-sidebarDisc__bubbleFoot {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sikshya-sidebarDisc__editHintWrap {
  min-height: 0;
}

.sikshya-sidebarDisc__editHint {
  font-size: 10px;
  font-weight: 700;
  color: var(--sikshya-learn-muted, #64748b);
}

.sikshya-sidebarDisc__modBar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.sikshya-sidebarDisc__bubbleActions {
  margin: 0;
  display: flex;
  align-items: center;
}

.sikshya-sidebarDisc__bubbleActions-inner {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sikshya-sidebarDisc__bubbleBtn {
  appearance: none;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.95);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--sikshya-learn-text);
  transition: background 0.12s ease, border-color 0.12s ease;
}

.sikshya-sidebarDisc__bubbleBtn:hover {
  background: rgba(15, 23, 42, 0.03);
}

.sikshya-sidebarDisc__bubbleBtn--muted {
  border-color: transparent;
  background: transparent;
  color: var(--sikshya-learn-muted, #64748b);
}

.sikshya-sidebarDisc__bubbleBtn--muted:hover {
  background: rgba(15, 23, 42, 0.05);
  color: var(--sikshya-learn-text);
}

.sikshya-sidebarDisc__bubbleBtn--danger {
  color: #b91c1c;
}

.sikshya-sidebarDisc__bubbleBtn--danger:hover {
  background: rgba(239, 68, 68, 0.08);
}

/* Instructor reply composer — full-width field + send (readable on narrow sidebar) */
.sikshya-sidebarDisc__replyStrip {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.02);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.sikshya-sidebarDisc__replyStrip .sikshya-sidebarDisc__replyTa {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 52px;
  margin: 0;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  line-height: 1.45;
  border: 1px solid var(--sikshya-learn-border);
  background: var(--sikshya-learn-surface);
  border-radius: 10px;
  box-sizing: border-box;
  resize: vertical;
}

.sikshya-sidebarDisc__replyStrip .sikshya-sidebarDisc__replyTa:focus {
  outline: 2px solid rgba(44, 91, 168, 0.25);
  outline-offset: 0;
}

.sikshya-sidebarDisc__replySend {
  flex: 0 0 auto;
  align-self: flex-end;
  appearance: none;
  border: 0;
  background: var(--sikshya-learn-primary, #2c5ba8);
  color: #fff;
  font-weight: 800;
  font-size: 11px;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.sikshya-sidebarDisc__replySend:hover {
  filter: brightness(0.95);
}

/* Legacy bubble shells (still referenced for older markup in edge cases). */
.sikshya-sidebarDisc__bubble {
  background: #fff;
  border: 1px solid var(--sikshya-learn-border, #e2e8f0);
  border-radius: 10px;
  padding: 10px 10px 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  border-left: 3px solid var(--sikshya-learn-primary, #2c5ba8);
}

.sikshya-sidebarDisc__bubble--qa {
  border-left-color: var(--sikshya-learn-primary, #2c5ba8);
}

.sikshya-sidebarDisc__bubble--discussion {
  border-left-color: var(--sikshya-learn-primary, #2c5ba8);
}

.sikshya-sidebarDisc__bubble--qa .sikshya-sidebarDisc__tag,
.sikshya-sidebarDisc__chatBubble--qa .sikshya-sidebarDisc__tag {
  color: var(--sikshya-learn-primary);
  background: rgba(44, 91, 168, 0.1);
}

.sikshya-sidebarDisc__chatBubble--discussion .sikshya-sidebarDisc__tag {
  color: var(--sikshya-learn-primary, #2c5ba8);
  background: rgba(44, 91, 168, 0.1);
}

.sikshya-sidebarDisc__bubbleMeta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-bottom: 8px;
}

.sikshya-sidebarDisc__time {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  color: var(--sikshya-learn-muted, #64748b);
  white-space: nowrap;
}

.sikshya-sidebarDisc__author {
  font-size: 12px;
  color: var(--sikshya-learn-text);
}

.sikshya-sidebarDisc__tag {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--sikshya-learn-primary, #2c5ba8);
  background: rgba(44, 91, 168, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
}

.sikshya-sidebarDisc__pending {
  font-size: 10px;
  font-weight: 700;
  color: #b45309;
}

.sikshya-sidebarDisc__bubbleBody {
  font-size: 13px;
  line-height: 1.45;
  color: var(--sikshya-learn-text);
  white-space: pre-wrap;
  word-break: break-word;
}

.sikshya-sidebarDisc__editPanel {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}

.sikshya-sidebarDisc__editPanel[hidden] {
  display: none !important;
}

.sikshya-sidebarDisc__editTa {
  width: 100%;
  font: inherit;
  font-size: 13px;
  line-height: 1.45;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--sikshya-learn-border, #e2e8f0);
  resize: vertical;
  min-height: 64px;
  box-sizing: border-box;
  color: var(--sikshya-learn-text);
  background: #fff;
}

.sikshya-sidebarDisc__editBar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.sikshya-sidebarDisc__editSave {
  background: var(--sikshya-learn-primary, #2c5ba8) !important;
  color: #fff !important;
  border-color: transparent !important;
}

.sikshya-sidebarDisc__editSave:hover {
  filter: brightness(0.95);
}

.sikshya-sidebarDisc__editCancel:hover {
  background: var(--sikshya-learn-surface-2, #f8fafc);
}

.sikshya-sidebarDisc__repliesHead {
  margin: 10px 0 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--sikshya-learn-muted, #64748b);
}

.sikshya-sidebarDisc__replies {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sikshya-sidebarDisc__reply {
  padding: 8px 10px;
  background: var(--sikshya-learn-surface-2, #f8fafc);
  border-radius: 8px;
  border-left: 3px solid var(--sikshya-learn-primary, #2c5ba8);
}

.sikshya-sidebarDisc__reply.is-pending {
  border-left-color: rgba(100, 116, 139, 0.55);
  opacity: 0.95;
}

.sikshya-sidebarDisc__replyMeta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
}

.sikshya-sidebarDisc__replyAuthor {
  font-size: 11px;
  font-weight: 800;
  color: var(--sikshya-learn-muted, #64748b);
}

.sikshya-sidebarDisc__replyText {
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.sikshya-sidebarDisc__bubble .sikshya-sidebarDisc__bubbleActions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.sikshya-sidebarDisc__miniBtn {
  appearance: none;
  border: 1px solid var(--sikshya-learn-border, #e2e8f0);
  background: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--sikshya-learn-text);
}

.sikshya-sidebarDisc__miniBtn:hover {
  background: var(--sikshya-learn-surface-2, #f8fafc);
}

.sikshya-sidebarDisc__replyBox {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}

.sikshya-sidebarDisc__replyLabel {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--sikshya-learn-muted, #64748b);
}

.sikshya-sidebarDisc__replyTa {
  width: 100%;
  font: inherit;
  font-size: 12px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--sikshya-learn-border, #e2e8f0);
  resize: vertical;
  min-height: 52px;
  box-sizing: border-box;
}

.sikshya-sidebarDisc__replyBtn {
  appearance: none;
  justify-self: start;
  border: 0;
  background: var(--sikshya-learn-primary, #2c5ba8);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
}

.sikshya-sidebarDisc__compose {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 4px;
  border-top: 1px solid var(--sikshya-learn-border);
  margin: 0;
}

.sikshya-sidebarDisc__composeLabel {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--sikshya-learn-muted, #64748b);
}

.sikshya-sidebarDisc__textarea {
  width: 100%;
  font: inherit;
  border: 1px solid var(--sikshya-learn-border, #e2e8f0);
  border-radius: 8px;
  padding: 10px 10px;
  background: #fff;
  color: var(--sikshya-learn-text);
  box-sizing: border-box;
  min-height: 88px;
  resize: vertical;
  line-height: 1.45;
  font-size: 13px;
}

.sikshya-sidebarDisc__textarea:disabled {
  background: #f1f5f9;
  color: var(--sikshya-learn-muted, #64748b);
  cursor: not-allowed;
}

.sikshya-sidebarDisc__composeFoot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.sikshya-sidebarDisc__hint {
  font-size: 11px;
  color: var(--sikshya-learn-muted, #64748b);
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  line-height: 1.4;
}

.sikshya-sidebarDisc__composeNote {
  display: block;
  margin: 0;
  padding: 6px 8px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--sikshya-learn-muted, #475569);
  background: rgba(15, 23, 42, 0.04);
  border-radius: 6px;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.sikshya-sidebarDisc__post {
  appearance: none;
  border: 0;
  background: var(--sikshya-learn-primary, #2c5ba8);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  padding: 8px 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
  flex: 0 0 auto;
}

.sikshya-sidebarDisc__post:hover:not(:disabled) {
  background: var(--sikshya-learn-primary-hover, #1f4585);
}

.sikshya-sidebarDisc__post:focus-visible {
  outline: 2px solid var(--sikshya-learn-primary, #2c5ba8);
  outline-offset: 2px;
}

.sikshya-sidebarDisc__post:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.sikshya-sidebarDisc__status {
  display: block;
  font-size: 11px;
  color: var(--sikshya-learn-muted, #64748b);
  min-height: 1.2em;
}

.sikshya-learnOverlay {
  position: fixed;
  top: calc(var(--sikshya-learn-top-offset) + (var(--sikshya-learn-topbar-h) * var(--sikshya-learn-topbar-visible)));
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 39;
}

@media (max-width: 1023px) {
  .sikshya-learnSidebar {
    width: min(var(--sikshya-learn-sidebar-w), 92vw);
    transform: translateX(-105%);
    transition: transform 0.22s ease;
  }
  .sikshya-outlineOpen .sikshya-learnSidebar {
    transform: translateX(0);
  }

  /*
   * Long curricula: scroll outline inside the drawer.
   * `sikshya-outlineOpen` is toggled on `<html>` (`document.documentElement`); shell `--lesson|--quiz|--learn`
   * lives on `<body>`. A compound `.outlineOpen.shell--lesson` never matched, so scrolling never activated.
   */
  .sikshya-outlineOpen .sikshya-learning-shell--lesson .sikshya-learnSidebar .sikshya-learnSidebar__inner,
  .sikshya-outlineOpen .sikshya-learning-shell--quiz .sikshya-learnSidebar .sikshya-learnSidebar__inner,
  .sikshya-outlineOpen .sikshya-learning-shell--learn:not(.sikshya-learning-shell--hub) .sikshya-learnSidebar .sikshya-learnSidebar__inner {
    /* basis 0 so this column shrinks inside the fixed drawer; auto basis lets content dictate height and disables scrolling */
    flex: 1 1 0;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .sikshya-outlineOpen .sikshya-learning-shell--lesson .sikshya-learnSidebar .sikshya-learnSidebar__scroll,
  .sikshya-outlineOpen .sikshya-learning-shell--quiz .sikshya-learnSidebar .sikshya-learnSidebar__scroll,
  .sikshya-outlineOpen .sikshya-learning-shell--learn:not(.sikshya-learning-shell--hub) .sikshya-learnSidebar .sikshya-learnSidebar__scroll {
    flex: 1 1 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    touch-action: pan-y;
  }
}

@media (min-width: 1024px) {
  .sikshya-learnOverlay {
    display: none !important;
  }

  .sikshya-learnSidebar {
    transform: translateX(0);
  }
}

/* =========================================================
 * Main content column (right of curriculum sidebar)
 * =======================================================*/
/* Right column: main learning area + scoped bottom navigation (lesson/quiz) */
.sikshya-learnContentCol {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  max-width: none;
  width: 100%;
}

@media (min-width: 1024px) {
  .sikshya-learning-shell--lesson .sikshya-learnContentCol,
  .sikshya-learning-shell--quiz .sikshya-learnContentCol,
  .sikshya-learning-shell--learn:not(.sikshya-learning-shell--hub) .sikshya-learnContentCol {
    min-height: 0;
    overflow: hidden;
    border-left: 1px solid var(--sikshya-learn-border);
    background: var(--sikshya-learn-bg);
    box-shadow: inset 1px 0 0 rgba(15, 23, 42, 0.03);
  }
}

.sikshya-learnContent {
  min-width: 0;
  padding: 0 22px calc(var(--sikshya-learn-content-nav-h) + 24px);
  padding-right: max(22px, env(safe-area-inset-right));
  padding-left: max(22px, env(safe-area-inset-left));
  max-width: none;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
}

/* Legacy: main column direct under .sikshya-learnMain — pad for fixed sidebar width (unused when .sikshya-learnContentCol wraps content) */
.sikshya-learnMain > .sikshya-learnContent {
  padding-left: calc(var(--sikshya-learn-sidebar-w-current) + max(22px, env(safe-area-inset-left)));
  transition: padding-left 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

@media (max-width: 1023px) {
  .sikshya-learnMain > .sikshya-learnContent {
    padding-left: max(16px, env(safe-area-inset-left));
  }
}

@media (min-width: 1024px) {
  .sikshya-learning-shell--lesson .sikshya-learnContentCol > .sikshya-learnContent,
  .sikshya-learning-shell--quiz .sikshya-learnContentCol > .sikshya-learnContent,
  .sikshya-learning-shell--learn:not(.sikshya-learning-shell--hub) .sikshya-learnContentCol > .sikshya-learnContent {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 1023px) {
  .sikshya-learnContent {
    padding: 0 16px 20px;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }

  .sikshya-learning-shell--lesson .sikshya-learnContentCol > .sikshya-learnContent,
  .sikshya-learning-shell--quiz .sikshya-learnContentCol > .sikshya-learnContent,
  .sikshya-learning-shell--learn:not(.sikshya-learning-shell--hub) .sikshya-learnContentCol > .sikshya-learnContent {
    overflow: visible;
  }
}

/* Lesson, quiz, and in-course learn home: comfortable reading measure (professional courseware rhythm) */
.sikshya-learning-shell--lesson .sikshya-learnContent > .sikshya-contentSection,
.sikshya-learning-shell--lesson .sikshya-learnContent > .sikshya-tabsSection,
.sikshya-learning-shell--quiz .sikshya-learnContent > .sikshya-contentSection,
.sikshya-learning-shell--learn:not(.sikshya-learning-shell--hub) .sikshya-learnContent > .sikshya-contentSection {
  width: 100%;
  margin-inline: auto;
}

.sikshya-learning-shell--lesson .sikshya-learnContent > .sikshya-contentSection--centered,
.sikshya-learning-shell--quiz .sikshya-learnContent > .sikshya-contentSection--centered {
  max-width: min(40rem, 100%);
}

/* Prev / Next — fixed position footer for proper navigation */
.sikshya-learnContentNav {
  position: fixed;
  bottom: 0;
  left: var(--sikshya-learn-sidebar-w-current);
  right: 0;
  z-index: 30;
  min-height: var(--sikshya-learn-content-nav-h);
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  gap: 12px;
  padding: 10px max(22px, env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom, 0px)) max(22px, env(safe-area-inset-left));
  background: color-mix(in srgb, var(--sikshya-learn-surface) 88%, transparent);
  backdrop-filter: saturate(1.15) blur(12px);
  -webkit-backdrop-filter: saturate(1.15) blur(12px);
  border-top: 1px solid var(--sikshya-learn-border);
  box-shadow: 0 -2px 8px rgba(15, 23, 42, 0.08);
}

.sikshya-learnContentNav__side {
  flex: 0 1 min(44%, 520px);
  display: flex;
  align-items: center;
  align-self: stretch;
  min-width: 0;
}

.sikshya-learnContentNav__side--prev {
  justify-content: flex-start;
}

.sikshya-learnContentNav__side--next {
  justify-content: flex-end;
}

.sikshya-learnContentNav__center {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  align-self: stretch;
}

/* Pro add-ons: keep controls natural height; spacer fills the bar instead */
.sikshya-learnContentNav__center > *:not(.sikshya-learnContentNav__spacer) {
  align-self: center;
}

/* Spacer is rendered when no Pro addon (Discussion / Q&A) hooks the dock's
 * center slot. The previous treatment drew a visible 40%-wide translucent
 * rectangle as a "reserved space" indicator — confusing dead chrome for end
 * users. Hidden now: flex layout already spreads prev / next to the edges
 * without it. When a Pro addon injects real content, the addon's element
 * (matched by the sibling rule above) renders normally. */
.sikshya-learnContentNav__spacer {
  display: none;
}

@media (max-width: 1023px) {
  .sikshya-learnContentNav {
    left: 0;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
}

.sikshya-learnDock__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: min(44%, 520px);
  padding: 10px 12px;
  border-radius: var(--sikshya-learn-radius-12);
  text-decoration: none;
  color: var(--sikshya-learn-text);
  background: transparent;
  border: 1px solid transparent;
}

.sikshya-learnDock__btn:hover {
  background: var(--sikshya-learn-hover);
  border-color: rgba(15, 23, 42, 0.08);
}

.sikshya-learnDock__btn:focus-visible {
  outline: 2px solid var(--sikshya-learn-focus);
  outline-offset: 2px;
}

.sikshya-learnDock__btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.sikshya-learnDock__icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: var(--sikshya-learn-muted);
}

.sikshya-learnDock__meta {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.sikshya-learnDock__kicker {
  font-size: var(--sikshya-learn-fs-11);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sikshya-learn-muted);
  line-height: 1.2;
}

.sikshya-learnDock__title {
  font-size: var(--sikshya-learn-fs-13);
  font-weight: 650;
  color: var(--sikshya-learn-text);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sikshya-learnDock__btn--next {
  margin-left: auto;
  text-align: right;
  justify-content: flex-end;
}

.sikshya-learnDock__btn--next .sikshya-learnDock__meta {
  text-align: right;
}

/* Learn hub ( /learn/ ) and bundle learn shell course grid.
 * `auto-fit` (not auto-fill) so when a bundle has only 2 courses the cards
 * EXPAND to fill the available row instead of leaving a giant empty gap
 * on the right side of the column. */
.sikshya-learnHubGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.sikshya-learnHubSection {
  margin-top: 22px;
}

.sikshya-learnHubSection__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sikshya-learnHubSection__title {
  margin: 0;
  font-size: var(--sikshya-learn-fs-18);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.sikshya-learnHubCard {
  background: var(--sikshya-learn-surface);
  border: 1px solid var(--sikshya-learn-border);
  border-radius: var(--sikshya-learn-radius-12);
  overflow: hidden;
  box-shadow: var(--sikshya-learn-shadow-panel);
  display: flex;
  flex-direction: column;
  min-height: 0;
  transition: box-shadow 160ms ease, transform 160ms ease, border-color 160ms ease;
}

.sikshya-learnHubCard:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 23, 42, 0.14);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 18px 46px rgba(15, 23, 42, 0.10);
}

.sikshya-learnHubCard__media {
  background: var(--sikshya-learn-surface-2);
  aspect-ratio: 16 / 9;
}

.sikshya-learnHubCard__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sikshya-learnHubCard__ph {
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, var(--sikshya-learn-surface-2), var(--sikshya-learn-surface-3));
}

.sikshya-learnHubCard__body {
  padding: 14px 16px;
  min-width: 0;
  display: grid;
  gap: 12px;
}

.sikshya-learnHubCard__title {
  margin: 0;
  font-size: var(--sikshya-learn-fs-16);
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.sikshya-learnHubCard__title a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sikshya-learnHubCard__title a {
  color: inherit;
  text-decoration: none;
}

.sikshya-learnHubCard__title a:hover {
  text-decoration: underline;
}

.sikshya-learnHubCard__progress {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sikshya-learnHubCard__bar {
  flex: 1 1 auto;
  height: 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.sikshya-learnHubCard__bar span {
  display: block;
  height: 100%;
  background: color-mix(in srgb, var(--sikshya-learn-primary) 80%, #22c55e);
}

.sikshya-learnHubCard__pct {
  font-size: var(--sikshya-learn-fs-12);
  font-weight: 700;
  color: var(--sikshya-learn-muted);
  flex: 0 0 auto;
}

.sikshya-learnHubCard__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 640px) {
  .sikshya-learnHubCard__media {
    height: 140px;
  }
}

/* Hub header: center vertically within the header rail */
.sikshya-learning-shell--hub .sikshya-contentPanel--header .sikshya-learnHeader__titles {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.sikshya-learning-shell--hub .sikshya-contentPanel--header .sikshya-learnHeader__kicker {
  margin: 0;
  line-height: 1.1;
}

.sikshya-learning-shell--hub .sikshya-contentPanel--header .sikshya-learnHeader__title {
  margin: 0;
  line-height: 1.2;
}

/* Vertical gap between sections matches the column's horizontal 22px
 * padding so the visual rhythm above / below / left / right of any section
 * (header bar, video band, tabs panel) is symmetric. */
.sikshya-contentSection {
  margin-top: 22px;
  margin-bottom: 22px;
}

.sikshya-contentSection:first-child {
  margin-top: 0;
}

.sikshya-contentSection:last-child {
  margin-bottom: 0;
}

.sikshya-contentPanel {
  background: var(--sikshya-learn-surface);
  border: 1px solid var(--sikshya-learn-border);
  border-radius: var(--sikshya-learn-radius-12);
  padding: 20px 22px;
  min-height: 0;
  box-shadow: var(--sikshya-learn-shadow-panel);
}

.sikshya-contentPanel--plain {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

/* Right content area: keep a clean minimum reading canvas */
.sikshya-learnContent .sikshya-contentPanel--plain {
  display: flex;
  flex-direction: column;
  padding-top: var(--sikshya-learn-railhead-pad);
}

.sikshya-learnContent .sikshya-contentPanel--plain > :last-child {
  margin-bottom: 0;
}

/* Empty / error state (content area only) */
.sikshya-contentSection--centered {
  min-height: calc(100dvh - (var(--sikshya-learn-top-offset) + (var(--sikshya-learn-topbar-h) * var(--sikshya-learn-topbar-visible))));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  margin-bottom: 0;
  padding: 28px 0;
}

.sikshya-contentPanel--emptyState {
  border-radius: var(--sikshya-learn-radius-16);
  padding: 28px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 18px 44px rgba(15, 23, 42, 0.08);
  max-width: 560px;
  width: 100%;
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.sikshya-contentPanel--notice {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  margin-bottom: 12px;
}

.sikshya-learnNotice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--sikshya-learn-radius-12);
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.sikshya-learnNotice__icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
}

.sikshya-learnNotice__icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.sikshya-learnNotice__body {
  min-width: 0;
}

.sikshya-learnNotice__title {
  margin: 0;
  font-size: var(--sikshya-learn-fs-14);
  font-weight: 900;
  line-height: 1.25;
  color: var(--sikshya-learn-text);
}

.sikshya-learnNotice__message {
  margin: 4px 0 0;
  font-size: var(--sikshya-learn-fs-13);
  line-height: 1.45;
  color: var(--sikshya-learn-muted);
}

.sikshya-learnNotice--warning {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(255, 251, 235, 0.92);
}

.sikshya-learnNotice--warning .sikshya-learnNotice__icon {
  background: rgba(245, 158, 11, 0.18);
  color: #b45309;
}

.sikshya-learnEmptyState {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 14px;
  align-items: start;
}

.sikshya-learnEmptyState__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.30);
  color: #b45309;
}

.sikshya-learnEmptyState__icon svg {
  width: 20px;
  height: 20px;
}

.sikshya-learnEmptyState__title {
  margin: 0;
  font-size: var(--sikshya-learn-fs-18);
  line-height: var(--sikshya-learn-lh-tight);
  letter-spacing: var(--sikshya-learn-tracking-tight);
  font-weight: 800;
  color: var(--sikshya-learn-text);
}

.sikshya-learnEmptyState__message {
  margin: 8px 0 0;
  color: var(--sikshya-learn-muted);
}

.sikshya-learnEmptyState__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

@media (max-width: 640px) {
  .sikshya-contentPanel--emptyState {
    padding: 20px;
    max-width: 520px;
  }
}

/* Content column: prefer plain, unboxed reading experience */
.sikshya-learning-shell .sikshya-learnContent .sikshya-contentPanel {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

/* The 22px section margin already provides the vertical gap between sections.
 * Removing the panel's extra padding-top so the gap above the panel equals
 * the gap on the left/right of the panel (column padding 22px) — symmetric
 * rhythm above / below / left / right of every section. */
.sikshya-learning-shell .sikshya-learnContent .sikshya-contentPanel--plain {
  padding-top: 0;
}

/* BUT: inside a tab panel the strip above (.sikshya-tabsBar) has margin-bottom:0
 * on the lesson surface, so the body would sit flush against the tabs underline.
 * Add the same 22px breathing room here so the gap from tabs strip to content
 * matches the gap from the column edges to the content. */
.sikshya-learning-shell .sikshya-learnContent .sikshya-tabPanel > .sikshya-contentPanel--plain {
  padding-top: 22px;
}

.sikshya-learning-shell .sikshya-learnContent .sikshya-contentPanel--header {
  background: var(--sikshya-learn-surface);
  border-bottom: 1px solid var(--sikshya-learn-border);
  padding-left: var(--sikshya-learn-railhead-pad);
  padding-right: max(var(--sikshya-learn-railhead-pad), env(safe-area-inset-right));
}

.sikshya-contentPanel--header {
  height: var(--sikshya-learn-railhead-h);
  padding: 0 var(--sikshya-learn-railhead-pad);
  border-radius: 0;
  box-shadow: none;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  border-bottom: 1px solid var(--sikshya-learn-border);
  display: flex;
  align-items: center;
  position: sticky;
  /* Scrollport is `.sikshya-learnContent` on desktop (overflow-y: auto); `top` must be non-auto for sticky to engage. */
  top: 0;
  z-index: 44;
  /* Bleed through column padding so header strip touches edges */
  margin-left: -22px;
  margin-right: calc(-1 * max(22px, env(safe-area-inset-right)));
  backdrop-filter: saturate(1.05) blur(6px);
}

/* Hub (and any view where the main column does not create its own scrollport): stick under the Learn top bar. */
.sikshya-learning-shell--hub .sikshya-learnContent .sikshya-contentPanel--header {
  top: calc(var(--sikshya-learn-top-offset) + (var(--sikshya-learn-topbar-h) * var(--sikshya-learn-topbar-visible)));
}

@media (max-width: 1023px) {
  .sikshya-contentPanel--header {
    margin-left: -16px;
    margin-right: -16px;
  }

  /* Document-level scroll: offset by sticky top bar so the header does not slide under it. */
  .sikshya-learning-shell--lesson .sikshya-learnContent .sikshya-contentPanel--header,
  .sikshya-learning-shell--quiz .sikshya-learnContent .sikshya-contentPanel--header,
  .sikshya-learning-shell--learn:not(.sikshya-learning-shell--hub) .sikshya-learnContent .sikshya-contentPanel--header {
    top: calc(var(--sikshya-learn-top-offset) + (var(--sikshya-learn-topbar-h) * var(--sikshya-learn-topbar-visible)));
  }
}

/* -----------------------------------------------------------------------
 * Mobile lesson/quiz header — hide non-essentials, keep the 52px row
 *
 * On desktop the header is a fixed 52px row showing icon + title +
 * chapter + 5 meta pills (Assessment / N questions / N min / Pass% /
 * Attempts) on the left, plus focus toggle + timer + Start-quiz on
 * the right. On a 430px phone all of that cannot fit, so the inner
 * row wrapped to 2-3 lines while the panel stayed at 52px height
 * with `align-items: center`, causing the top of the wrapped content
 * to render ABOVE the panel's content-box and get clipped behind the
 * sticky topbar (z-index 50 > panel z-index 44).
 *
 * Fix: keep the panel at 52px and HIDE the non-essential chrome on
 * mobile so the single-row layout still fits. Kept visible: title,
 * timer (critical for quiz), Start-quiz button (the primary CTA).
 * Hidden: the 5 meta pills (info is in the quiz body), the chapter
 * inline label (already in sidebar), and the focus-mode toggle (not
 * meaningful on a phone — there's no sidebar to hide).
 * --------------------------------------------------------------------- */
@media (max-width: 768px) {
  /* The 5 quiz meta pills (Assessment, N questions, N min, Pass%,
   * Attempts) — same info shows in the quiz intro body below. */
  .sikshya-contentPanel--header .sikshya-learnHeader__metaInline {
    display: none;
  }

  /* Chapter "Chapter 1" inline pill next to the title — visible in the
   * sidebar outline already. */
  .sikshya-contentPanel--header .sikshya-learnHeader__chapterInline {
    display: none;
  }

  /* Focus-mode toggle — the action collapses the desktop sidebar, which
   * is already a drawer on mobile, so the button is redundant. */
  .sikshya-contentPanel--header .sikshya-learnHeader__focusBtn {
    display: none;
  }
}

.sikshya-contentPanel--header .sikshya-learnHeader {
  width: 100%;
  margin-bottom: 0;
  gap: 0;
}

.sikshya-contentPanel--header .sikshya-learnHeader__title {
  font-size: var(--sikshya-learn-fs-16);
  line-height: 1.3;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sikshya-contentPanel--header .sikshya-learnHeader__top {
  align-items: center;
}

.sikshya-contentPanel--header .sikshya-learnHeader__actions {
  padding-top: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

/* Quiz timer (visible, near Start quiz button) */
.sikshya-quizTimer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 12px;
  border: 1px solid rgba(44, 91, 168, 0.22);
  background: rgba(44, 91, 168, 0.08);
  color: var(--sikshya-learn-text);
  line-height: 1;
  white-space: nowrap;
}

.sikshya-quizTimer__label {
  font-size: 11px;
  font-weight: 700;
  color: var(--sikshya-learn-muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.sikshya-quizTimer__value {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  font-size: 14px;
  font-weight: 800;
  color: var(--sikshya-learn-accent, #2c5ba8);
}

/* -------------------------------------------------------------------------
   Rate course prompt (after completion)
   ------------------------------------------------------------------------- */
.sikshya-rateCourse{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--sik-f-border, #e2e8f0);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--sikshya-shadow);
  margin: 0 0 16px;
}
.sikshya-rateCourse__title{
  font-weight: 800;
  color: var(--sik-f-text, #0f172a);
  margin-bottom: 2px;
}
.sikshya-rateCourse__subtitle{
  font-size: 0.875rem;
  color: var(--sik-f-text-muted, #64748b);
}
.sikshya-rateCourse__stars{
  display:inline-flex;
  align-items:center;
  gap: 4px;
  flex-wrap: nowrap;
}
.sikshya-rateCourse__star{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--sik-f-border, #e2e8f0);
  background: #fff;
  color: #f5a623;
  text-decoration:none;
  font-size: 1.15rem;
  line-height: 1;
}
.sikshya-rateCourse__star:hover{
  background: #fff7e6;
  border-color: #f5a623;
}
.sikshya-rateCourse__dismiss{
  color: var(--sik-f-text-muted, #64748b);
  font-size: 0.875rem;
  text-decoration: none;
  white-space: nowrap;
}
.sikshya-rateCourse__dismiss:hover{ text-decoration: underline; }
@media (max-width: 640px){
  .sikshya-rateCourse{ flex-direction: column; align-items: flex-start; }
  .sikshya-rateCourse__stars{ width: 100%; }
}

.sikshya-learnHeader__metaInline {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: min(48vw, 540px);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  align-self: center;
}

.sikshya-learnHeader__metaInline::-webkit-scrollbar {
  display: none;
}

.sikshya-learnHeader__metaInline .sikshya-pill {
  padding: 5px 9px;
  font-size: 11px;
  border-radius: 999px;
  white-space: nowrap;
}

.sikshya-contentPanel--header .sikshya-learnHeader__titles {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.sikshya-learnHeader__titleRow {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.sikshya-learnHeader__titleRow--withMeta {
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.sikshya-learnHeader__titleLeft {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.sikshya-learnHeader__chapterInline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 34ch;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--sikshya-learn-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sikshya-learnHeader__chapterInline .sikshya-learnHeader__chapterIcon {
  opacity: 0.85;
}

.sikshya-learnHeader__typeIcon {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(44, 91, 168, 0.18);
  color: var(--sikshya-learn-primary);
}

.sikshya-learnHeader__typeIcon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.sikshya-contentPanel--header .sikshya-learnHeader__chapter {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--sikshya-learn-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sikshya-learnHeader__chapterIcon {
  display: inline-flex;
  color: var(--sikshya-learn-muted);
  opacity: 0.9;
}

.sikshya-learnHeader__chapterIcon svg {
  width: 14px;
  height: 14px;
  display: block;
}

.sikshya-learnContent > .sikshya-contentPanel[role="alert"] {
  border-color: rgba(220, 38, 38, 0.35);
  background: rgba(254, 242, 242, 0.85);
  box-shadow: var(--sikshya-learn-shadow-sm);
}

.sikshya-learnContent > .sikshya-contentPanel[role="alert"] p {
  margin: 0;
  color: var(--sikshya-learn-text);
  font-size: var(--sikshya-learn-fs-14);
  line-height: 1.55;
}

/* Content header + meta */
.sikshya-learnHeader {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.sikshya-learnHeader__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  position: relative;
}

.sikshya-learnHeader__titles {
  min-width: 0;
}

.sikshya-learnHeader__actions {
  flex: 0 0 auto;
  padding-top: 2px;
}

.sikshya-quizLockInline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: min(480px, 90vw);
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.28);
  border-radius: 12px;
  padding: 8px 10px;
}

.sikshya-quizLockInline__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--sikshya-learn-fs-12);
  font-weight: 700;
  color: #991b1b;
  white-space: nowrap;
}

.sikshya-quizLockInline__badge svg {
  width: 14px;
  height: 14px;
}

.sikshya-quizLockInline__text {
  font-size: var(--sikshya-learn-fs-12);
  line-height: 1.35;
  color: #7f1d1d;
}

.sikshya-tooltipWrap {
  display: inline-flex;
  position: relative;
}

.sikshya-tooltipWrap > .sikshya-btn[disabled] {
  cursor: not-allowed;
  opacity: 0.92;
}

.sikshya-tooltip {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: max-content;
  max-width: min(340px, calc(100vw - 32px));
  background: rgba(15, 23, 42, 0.96);
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: var(--sikshya-learn-fs-12);
  line-height: 1.35;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.22);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
  z-index: 80;
}

.sikshya-tooltip::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 14px;
  width: 10px;
  height: 10px;
  background: rgba(15, 23, 42, 0.96);
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  transform: rotate(45deg);
}

.sikshya-tooltipWrap:hover .sikshya-tooltip,
.sikshya-tooltipWrap:focus-within .sikshya-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.sikshya-quizLockNotice {
  margin-bottom: 16px;
  border-radius: 14px;
  border: 1px solid rgba(239, 68, 68, 0.3);
  background: linear-gradient(180deg, rgba(254, 242, 242, 0.95) 0%, rgba(254, 226, 226, 0.92) 100%);
  padding: 14px 16px;
}

.sikshya-quizLockNotice__title {
  margin: 0 0 6px;
  font-size: var(--sikshya-learn-fs-15);
  font-weight: 700;
  color: #991b1b;
}

.sikshya-quizLockNotice__desc {
  margin: 0;
  font-size: var(--sikshya-learn-fs-14);
  line-height: 1.5;
  color: #7f1d1d;
}

/* Header progress (center) */
.sikshya-learnHeader__progressWrap {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
}

.sikshya-learnHeader__progressBtn {
  appearance: none;
  border: 1px solid rgba(44, 91, 168, 0.22);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.05) blur(6px);
  border-radius: 999px;
  padding: 8px 10px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: var(--sikshya-learn-text);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 10px 24px rgba(15, 23, 42, 0.06);
  transition: transform 120ms ease, background 160ms ease, border-color 160ms ease;
}

.sikshya-learnHeader__progressBtn:hover {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(44, 91, 168, 0.34);
}

.sikshya-learnHeader__progressBtn:active {
  transform: translateY(1px);
}

.sikshya-learnHeader__progressBar {
  width: 170px;
  height: 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.14);
  overflow: hidden;
  position: relative;
}

.sikshya-learnHeader__progressFill {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--sikshya-learn-success);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.sikshya-learnHeader__progressPct {
  font-size: var(--sikshya-learn-fs-12);
  font-weight: 800;
  letter-spacing: var(--sikshya-learn-tracking-tight);
  color: var(--sikshya-learn-ink);
  min-width: 3ch;
  text-align: right;
}

.sikshya-learnHeader__progressCount {
  font-size: var(--sikshya-learn-fs-12);
  font-weight: 800;
  color: var(--sikshya-learn-muted);
  min-width: 5.5ch;
  text-align: right;
}

.sikshya-progressPopover {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: min(360px, calc(100vw - 32px));
  /* Solid, opaque card — was rgba(255,255,255,0.96) which blended into
   * the page content underneath, making the popover read as a faint
   * overlay rather than a confident floating card. */
  background: var(--sikshya-learn-surface, #ffffff);
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 14px;
  /* Stronger shadow so the card visually detaches from the topbar. */
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08),
              0 18px 40px rgba(15, 23, 42, 0.18);
  padding: 12px 12px;
  /* Bumped high so the popover always sits above any page chrome. The
   * topbar has `backdrop-filter` which creates a stacking context — the
   * popover (descendant) is still bounded by that context, but the
   * higher z-index ensures it tops everything WITHIN the topbar layer
   * (active tab indicator, badges, etc.). */
  z-index: 200;
  /* New stacking context so internal sub-elements never bleed through
   * (e.g. the bar fill gradient with overflow tricks). */
  isolation: isolate;
}

.sikshya-progressPopover[hidden] {
  display: none !important;
}

.sikshya-progressPopover__title {
  margin: 0;
  font-size: var(--sikshya-learn-fs-13);
  font-weight: 900;
  color: var(--sikshya-learn-text);
}

.sikshya-progressPopover__meta {
  margin-top: 2px;
  font-size: var(--sikshya-learn-fs-12);
  color: var(--sikshya-learn-muted);
}

.sikshya-progressPopover__bar {
  margin-top: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.sikshya-progressPopover__bar > span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--sikshya-learn-success);
}

.sikshya-progressPopover__grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (min-width: 1024px) {
  .sikshya-progressPopover__grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.sikshya-progressPopover__stat {
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(248, 250, 252, 0.7);
  border-radius: 12px;
  padding: 10px;
}

.sikshya-progressPopover__k {
  font-size: var(--sikshya-learn-fs-11);
  color: var(--sikshya-learn-muted);
  margin: 0;
}

.sikshya-progressPopover__v {
  margin: 3px 0 0;
  font-size: var(--sikshya-learn-fs-14);
  font-weight: 900;
  color: var(--sikshya-learn-text);
}

@media (max-width: 640px) {
  .sikshya-learnHeader__progressBar {
    width: 132px;
  }
}

/* Disabled button polish (Learn UI) */
.sikshya-learning-shell .sikshya-btn[disabled],
.sikshya-learning-shell .sikshya-btn[aria-disabled="true"] {
  opacity: 0.65;
  cursor: not-allowed;
  box-shadow: none !important;
  transform: none !important;
  filter: grayscale(0.08);
}

.sikshya-learning-shell .sikshya-btn[disabled]:hover,
.sikshya-learning-shell .sikshya-btn[aria-disabled="true"]:hover {
  background: inherit;
}

.sikshya-learnHeader__kicker {
  font-size: var(--sikshya-learn-fs-12);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sikshya-learn-muted);
  margin-bottom: 6px;
}

.sikshya-learnHeader__chapter {
  margin-top: 6px;
  font-size: var(--sikshya-learn-fs-13);
  font-weight: 700;
  color: var(--sikshya-learn-muted);
  line-height: 1.35;
}

.sikshya-learnHeader__title {
  margin: 0;
  font-size: var(--sikshya-learn-fs-22);
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.02em;
  color: var(--sikshya-learn-text);
  /* Long titles must truncate so they never push the focus / mark-complete
   * action cluster off-screen on narrow viewports. Full title still
   * available via the browser tooltip from the parent's `title` attribute. */
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sikshya-learnMetaRow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sikshya-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--sikshya-learn-border);
  background: var(--sikshya-learn-surface-2);
  color: var(--sikshya-learn-text);
  font-size: var(--sikshya-learn-fs-12);
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.sikshya-pill:hover {
  border-color: rgba(44, 91, 168, 0.22);
  background: var(--sikshya-learn-surface-3);
}

.sikshya-pill--emphasis {
  background: rgba(44, 91, 168, 0.12);
  border-color: rgba(44, 91, 168, 0.32);
  color: var(--sikshya-learn-accent, #2c5ba8);
}

.sikshya-progress {
  display: grid;
  gap: 10px;
  padding-top: 4px;
}

.sikshya-progress__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: var(--sikshya-learn-fs-13);
}

.sikshya-progress__top strong {
  font-weight: 800;
  color: var(--sikshya-learn-text);
}

.sikshya-progress__bar {
  height: 8px;
  border-radius: 999px;
  background: var(--sikshya-learn-surface-2);
  overflow: hidden;
  border: 1px solid rgba(44, 91, 168, 0.12);
}

.sikshya-progress__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sikshya-learn-primary), var(--sikshya-learn-primary-2));
}

/* Video player (lesson shell) */
.sikshya-videoMock {
  margin-top: 16px;
  width: 100%;
  max-width: 100%;
  border: 0;
  border-radius: var(--sikshya-learn-radius-12);
  overflow: hidden;
  background: #0b1220;
  box-shadow: none;
}

/* 16:9 stage: constrained height for long sessions */
.sikshya-videoMock__stage {
  position: relative;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  max-height: min(60vh, 520px);
  overflow: hidden;
  background: radial-gradient(1200px 600px at 50% 10%, rgba(96, 165, 250, 0.35), transparent 60%),
    radial-gradient(800px 400px at 10% 90%, rgba(44, 91, 168, 0.35), transparent 60%),
    #0b1220;
}

.sikshya-videoMock__center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  color: rgba(255, 255, 255, 0.92);
}

.sikshya-videoMock__embed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.sikshya-videoMock__badge {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: var(--sikshya-learn-fs-12);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}

.sikshya-videoMock__play {
  display: inline-grid;
  place-items: center;
  width: 80px;
  height: 80px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  font-size: var(--sikshya-learn-fs-13);
  font-weight: 800;
}

.sikshya-videoMock__controls {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: rgba(15, 23, 42, 0.65);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: var(--sikshya-learn-fs-12);
  font-variant-numeric: tabular-nums;
}

.sikshya-videoMock__scrub {
  height: 5px;
  flex: 1;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.sikshya-videoMock__spacer {
  width: 4px;
}

/* Lists + split columns */
.sikshya-learnSplit {
  display: grid;
  gap: 20px;
  margin-top: 18px;
  padding-top: 4px;
}

@media (min-width: 1024px) {
  .sikshya-learnSplit {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
}

.sikshya-learnH3 {
  margin: 0 0 12px;
  font-size: var(--sikshya-learn-fs-14);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--sikshya-learn-text);
}

/* ------------------------------------------------------------------
 * Learn notes tab — multiple private notes per lesson/quiz (REST)
 * ------------------------------------------------------------------ */
.sikshya-learnNotes__hint {
  margin: 0 0 8px;
  font-size: var(--sikshya-learn-fs-13);
  line-height: 1.45;
}

.sikshya-learnNotes__empty {
  margin: 10px 0 0;
  font-size: var(--sikshya-learn-fs-13);
}

.sikshya-learnNotes__list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sikshya-learnNotes__card {
  padding: 12px 14px;
  border-radius: var(--sikshya-learn-radius-8);
  border: 1px solid var(--sikshya-learn-border);
  background: var(--sikshya-learn-surface-2, rgba(248, 250, 252, 0.9));
}

.sikshya-learnNotes__meta {
  margin-bottom: 8px;
}

.sikshya-learnNotes__time {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sikshya-learn-muted);
}

.sikshya-learnNotes__body {
  font-size: var(--sikshya-learn-fs-13);
  line-height: 1.55;
  color: var(--sikshya-learn-text);
  white-space: pre-wrap;
  word-break: break-word;
}

.sikshya-learnNotes__edit {
  width: 100%;
  margin-top: 4px;
}

.sikshya-learnNotes__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

/* All four note-card buttons (Edit / Save / Cancel / Delete) inherit the
 * .sikshya-btn .sikshya-btn--outline base so they share the same height,
 * padding rhythm, border weight, and border-radius. Tone modifiers below
 * only change colour. */
.sikshya-learnNotes__btn {
  font-size: 12px;
  padding: 6px 12px;
  min-height: 32px;
}

/* Muted tone (e.g. Cancel) — keeps the outline shape, softens the label. */
.sikshya-learnNotes__btn--muted {
  color: var(--sikshya-learn-muted) !important;
}

/* Danger tone (Delete) — outline shape preserved, border + label go red. */
.sikshya-learnNotes__btn--danger {
  color: #b91c1c !important;
  border-color: rgba(185, 28, 28, 0.35) !important;
}
.sikshya-learnNotes__btn--danger:hover {
  background: rgba(185, 28, 28, 0.06) !important;
  border-color: rgba(185, 28, 28, 0.5) !important;
  color: #b91c1c !important;
}

.sikshya-learnNotes__composer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--sikshya-learn-border);
}

.sikshya-learnNotes__composerLabel {
  display: block;
  margin-bottom: 6px;
  font-size: var(--sikshya-learn-fs-13);
  font-weight: 600;
  color: var(--sikshya-learn-text);
}

.sikshya-learnList {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--sikshya-learn-text);
  font-size: var(--sikshya-learn-fs-14);
  line-height: 1.55;
}

.sikshya-learnList li {
  margin: 8px 0;
  padding-left: 2px;
}

.sikshya-learnList li::marker {
  color: var(--sikshya-learn-primary);
}

.sikshya-resList {
  margin: 0;
  padding-left: 1.15rem;
  font-size: var(--sikshya-learn-fs-14);
  line-height: 1.6;
}

.sikshya-resList li {
  margin: 10px 0;
}

.sikshya-resLink {
  color: var(--sikshya-learn-primary);
  font-weight: 600;
  text-decoration: none;
  text-underline-offset: 2px;
}

.sikshya-resLink:hover {
  text-decoration: underline;
  color: #1f4585;
}

/* Notes + announcements + reviews */
.sikshya-noteMock {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--sikshya-learn-border);
  border-radius: var(--sikshya-learn-radius-10);
  background: var(--sikshya-learn-surface-2);
  margin-bottom: 12px;
}

.sikshya-noteMock:last-of-type {
  margin-bottom: 0;
}

.sikshya-noteMock__time {
  font-weight: 800;
  font-size: var(--sikshya-learn-fs-12);
  font-variant-numeric: tabular-nums;
  color: var(--sikshya-learn-muted);
}

.sikshya-noteMock__text {
  font-size: var(--sikshya-learn-fs-14);
  line-height: 1.5;
  color: var(--sikshya-learn-text);
}

.sikshya-announce {
  border: 1px solid var(--sikshya-learn-border);
  border-radius: var(--sikshya-learn-radius-10);
  padding: 14px 16px;
  background: var(--sikshya-learn-surface-2);
}

.sikshya-announce__title {
  font-weight: 800;
  font-size: var(--sikshya-learn-fs-14);
  margin-bottom: 6px;
  color: var(--sikshya-learn-text);
}

.sikshya-announce__meta {
  font-size: var(--sikshya-learn-fs-12);
  margin-bottom: 10px;
}

/* Quiz landing (before questions are revealed) */
.sikshya-contentPanel--quizIntro {
  padding: 0;
  border-style: dashed;
  background: linear-gradient(180deg, rgba(44, 91, 168, 0.06), transparent 42%);
}

.sikshya-quizIntro {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(28px, 5vw, 48px) clamp(18px, 4vw, 40px) clamp(32px, 5vw, 52px);
  max-width: 560px;
  margin: 0 auto;
}

.sikshya-quizIntro__notice {
  order: -1;
  margin: 0 0 16px;
  padding: 10px 14px;
  max-width: 100%;
  font-size: var(--sikshya-learn-fs-14);
  line-height: 1.45;
  text-align: center;
  color: var(--sikshya-learn-text);
  background: rgba(44, 91, 168, 0.08);
  border: 1px solid rgba(44, 91, 168, 0.22);
  border-radius: var(--sikshya-learn-radius-md, 10px);
}

.sikshya-quizIntro__eyebrow {
  margin: 0 0 8px;
  font-size: var(--sikshya-learn-fs-12);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sikshya-learn-accent, #2c5ba8);
}

.sikshya-quizIntro__title {
  margin: 0 0 12px;
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--sikshya-learn-text);
}

.sikshya-quizIntro__lead {
  margin: 0 0 20px;
  font-size: var(--sikshya-learn-fs-15);
  line-height: 1.6;
  color: var(--sikshya-learn-muted);
  max-width: 46ch;
}

.sikshya-quizIntro__facts {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  width: 100%;
  max-width: 42ch;
  text-align: left;
}

.sikshya-quizIntro__facts li {
  position: relative;
  padding: 10px 0 10px 28px;
  font-size: var(--sikshya-learn-fs-14);
  line-height: 1.45;
  color: var(--sikshya-learn-text);
  border-bottom: 1px solid var(--sikshya-learn-border);
}

.sikshya-quizIntro__facts li:last-child {
  border-bottom: 0;
}

.sikshya-quizIntro__facts li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 15px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--sikshya-learn-accent, #2c5ba8);
  opacity: 0.85;
}

.sikshya-quizIntro__cta {
  min-width: min(100%, 220px);
  padding: 12px 28px;
  font-size: var(--sikshya-learn-fs-15);
  font-weight: 800;
}

.sikshya-quizIntro__hint {
  margin: 14px 0 0;
  max-width: 40ch;
  font-size: var(--sikshya-learn-fs-12);
  line-height: 1.55;
  color: var(--sikshya-learn-muted);
}

/* Quiz preview (quiz shell) */
.sikshya-quizMock {
  margin-top: 16px;
}

.sikshya-quizMock__card {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.sikshya-quizMock__qTitle {
  font-weight: 800;
  font-size: var(--sikshya-learn-fs-14);
  line-height: 1.45;
  margin-bottom: 12px;
  color: var(--sikshya-learn-text);
}

.sikshya-quizMock__opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--sikshya-learn-radius-10);
  border: 0;
  background: transparent;
  margin-bottom: 8px;
  font-size: var(--sikshya-learn-fs-14);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.sikshya-quizMock__opt:hover {
  background: rgba(44, 91, 168, 0.03);
}

.sikshya-quizMock__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--sikshya-learn-border);
}

/* Quiz: advanced question types (learn form) */
.sikshya-quizQ {
  margin: 12px 0;
  padding: 14px 14px 12px;
  border-radius: var(--sikshya-learn-radius-12, 12px);
  border: 1px solid var(--sikshya-learn-border);
  background: var(--sikshya-learn-surface-2);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
}

.sikshya-quizQ:first-child {
  margin-top: 0;
}

.sikshya-quizQ__title {
  margin: 0 0 10px;
  padding: 0;
  font-size: calc(var(--sikshya-learn-fs-14) + 1px);
  font-weight: 800;
  line-height: 1.4;
  color: var(--sikshya-learn-text);
}

.sikshya-quizQ:focus-within {
  border-color: rgba(44, 91, 168, 0.28);
  box-shadow: 0 0 0 3px rgba(44, 91, 168, 0.08);
}

.sikshya-quizQ__opt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 10px;
  margin: 0 0 8px;
  border-radius: var(--sikshya-learn-radius-10, 10px);
  border: 1px solid var(--sikshya-learn-border);
  background: #fff;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.sikshya-quizQ__opt:last-child {
  margin-bottom: 0;
}

.sikshya-quizQ__opt:hover {
  background: rgba(44, 91, 168, 0.03);
  border-color: rgba(44, 91, 168, 0.22);
}

.sikshya-quizQ__opt:focus-within {
  border-color: rgba(44, 91, 168, 0.35);
  box-shadow: 0 0 0 3px rgba(44, 91, 168, 0.08);
}

.sikshya-quizQ__opt input[type='radio'],
.sikshya-quizQ__opt input[type='checkbox'] {
  margin-top: 2px;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  accent-color: var(--sikshya-learn-accent, #2c5ba8);
}

.sikshya-quizQ__opt span {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  font-size: calc(var(--sikshya-learn-fs-14) + 1px);
  line-height: 1.5;
  color: var(--sikshya-learn-text);
}

/* Checked state (modern browsers) */
.sikshya-quizQ__opt:has(input:checked) {
  border-color: rgba(44, 91, 168, 0.35);
  background: rgba(44, 91, 168, 0.06);
}

/* Checked state fallback */
.sikshya-quizQ__opt input:checked + span {
  font-weight: 700;
}

.sikshya-quizQ__textarea {
  width: 100%;
  min-height: 88px;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: var(--sikshya-learn-radius-10, 10px);
  border: 1px solid var(--sikshya-learn-border);
  font-size: calc(var(--sikshya-learn-fs-14) + 1px);
  background: #fff;
  color: var(--sikshya-learn-text);
  box-sizing: border-box;
}

.sikshya-quizQ__textarea:focus {
  outline: none;
  border-color: rgba(44, 91, 168, 0.35);
  box-shadow: 0 0 0 3px rgba(44, 91, 168, 0.08);
}

.sikshya-ordering {
  margin: 8px 0 0;
  padding-left: 1.25rem;
  list-style: decimal;
}

.sikshya-ordering__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--sikshya-learn-border);
}

.sikshya-ordering__item:hover {
  background: rgba(44, 91, 168, 0.03);
}

.sikshya-ordering__item:last-child {
  border-bottom: 0;
}

.sikshya-ordering__text {
  flex: 1;
  min-width: 0;
  font-size: var(--sikshya-learn-fs-14);
}

.sikshya-ordering__controls {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
}

/* Move-up / move-down need a comfortable touch target — current
 * `.sikshya-btn--sm` (8px/12px padding with a glyph) renders ~28px,
 * below WCAG 2.5.5 spacing comfort. Lock to 36px square with a calm
 * hover surface so they read as a button cluster, not a glyph. */
.sikshya-learning-shell .sikshya-ordering__up,
.sikshya-learning-shell .sikshya-ordering__down {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 16px;
  line-height: 1;
  border-radius: var(--sikshya-learn-radius-8);
  background: var(--sikshya-learn-surface-2);
  color: var(--sikshya-learn-text);
  border: 1px solid var(--sikshya-learn-border);
  transition: background 160ms ease, border-color 160ms ease, transform 120ms ease;
}

.sikshya-learning-shell .sikshya-ordering__up:hover,
.sikshya-learning-shell .sikshya-ordering__down:hover {
  background: var(--sikshya-learn-accent-wash, var(--sikshya-learn-surface-2));
  border-color: var(--sikshya-learn-primary);
}

.sikshya-learning-shell .sikshya-ordering__up:active,
.sikshya-learning-shell .sikshya-ordering__down:active {
  transform: translateY(1px);
}

.sikshya-learning-shell .sikshya-ordering__up:disabled,
.sikshya-learning-shell .sikshya-ordering__down:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.sikshya-matching {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sikshya-matching__row {
  display: grid;
  grid-template-columns: 1fr minmax(120px, 1fr);
  gap: 12px;
  align-items: center;
  font-size: var(--sikshya-learn-fs-14);
}

.sikshya-matching__left {
  font-weight: 700;
  color: var(--sikshya-learn-text);
}

.sikshya-matching__select {
  width: 100%;
  min-height: 40px;
  padding: 6px 10px;
  border-radius: var(--sikshya-learn-radius-10, 10px);
  border: 1px solid var(--sikshya-learn-border);
  background: #fff;
  color: var(--sikshya-learn-text);
}

.sikshya-matching__select:focus {
  outline: none;
  border-color: rgba(44, 91, 168, 0.35);
  box-shadow: 0 0 0 3px rgba(44, 91, 168, 0.08);
}

@media (max-width: 640px) {
  .sikshya-matching__row {
    grid-template-columns: 1fr;
  }
}

.sikshya-quizPager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0 16px;
  padding: 10px 12px;
  border-radius: var(--sikshya-learn-radius-10, 10px);
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid var(--sikshya-learn-border);
}

.sikshya-quizPager__label {
  margin: 0;
  font-size: var(--sikshya-learn-fs-13);
  font-weight: 600;
  color: var(--sikshya-learn-muted);
}

/* Quiz results panel (rendered by quiz-taker.js) */
.sikshya-quiz-result--panel {
  margin-top: 12px;
}

/* Per-type score breakdown rendered inside the results card. Each row is
 * one question type ("Multiple choice", "Essay", …) with a calm
 * "earned/total · pct%" detail. Helps learners see strengths vs. gaps. */
.sikshya-quizResults__breakdown {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--sikshya-learn-border);
  border-radius: var(--sikshya-learn-radius-10);
  background: var(--sikshya-learn-surface-2);
}

.sikshya-quizResults__breakdownHead {
  margin: 0 0 8px;
  font-size: var(--sikshya-learn-fs-13);
  font-weight: 700;
  letter-spacing: var(--sikshya-learn-tracking-tight);
  color: var(--sikshya-learn-muted-strong, var(--sikshya-learn-muted));
  text-transform: uppercase;
}

.sikshya-quizResults__breakdownRow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  font-size: var(--sikshya-learn-fs-14);
  color: var(--sikshya-learn-text);
}

.sikshya-quizResults__breakdownRow + .sikshya-quizResults__breakdownRow {
  border-top: 1px dashed color-mix(in srgb, var(--sikshya-learn-border) 80%, transparent);
}

.sikshya-quizResults__breakdownLabel {
  font-weight: 600;
}

.sikshya-quizResults__breakdownDetail {
  color: var(--sikshya-learn-muted-strong, var(--sikshya-learn-muted));
  font-variant-numeric: tabular-nums;
}

/* Per-question explanation injected after grading on "Review answers".
 * Calm tinted disclosure so it reads as supplemental, not a correction. */
.sikshya-quizQ__explanation {
  margin-top: 10px;
  border: 1px solid color-mix(in srgb, var(--sikshya-learn-primary) 22%, var(--sikshya-learn-border));
  background: color-mix(in srgb, var(--sikshya-learn-primary) 5%, var(--sikshya-learn-surface));
  border-radius: var(--sikshya-learn-radius-10);
}

.sikshya-quizQ__explanationSummary {
  cursor: pointer;
  padding: 8px 12px;
  font-weight: 600;
  font-size: var(--sikshya-learn-fs-13);
  color: var(--sikshya-learn-primary);
  list-style: none;
}

.sikshya-quizQ__explanationSummary::-webkit-details-marker { display: none; }

.sikshya-quizQ__explanationBody {
  padding: 0 12px 12px;
  font-size: var(--sikshya-learn-fs-14);
  line-height: 1.6;
  color: var(--sikshya-learn-text);
}

/* Validation error variant: shown when validateForm() flags unanswered
 * questions on submit. Calm warning surface, not a hard red — we don't
 * want to scold; we want to nudge the learner back to the question. */
.sikshya-quiz-result--error {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--sikshya-learn-radius-12);
  border: 1px solid color-mix(in srgb, var(--sikshya-learn-warn, #d97706) 35%, var(--sikshya-learn-border));
  background: color-mix(in srgb, var(--sikshya-learn-warn, #d97706) 8%, var(--sikshya-learn-surface));
  color: var(--sikshya-learn-text);
}

.sikshya-quiz-result--error .sikshya-quiz-result__heading {
  margin: 0 0 4px;
  font-weight: 700;
}

.sikshya-quiz-result--error .sikshya-quiz-result__missing {
  margin: 0;
  font-size: var(--sikshya-learn-fs-13);
  color: var(--sikshya-learn-muted-strong, var(--sikshya-learn-muted));
}

.sikshya-quizResults {
  padding: 14px 14px;
  border-radius: var(--sikshya-learn-radius-12);
  border: 1px solid var(--sikshya-learn-border);
  background: var(--sikshya-learn-surface);
  box-shadow: var(--sikshya-learn-shadow-sm);
}

.sikshya-quizResults__title {
  margin: 0;
  font-size: var(--sikshya-learn-fs-16);
  font-weight: 800;
  letter-spacing: var(--sikshya-learn-tracking-tight);
}

.sikshya-quizResults__score,
.sikshya-quizResults__req,
.sikshya-quizResults__pass,
.sikshya-quizResults__fail {
  margin: 6px 0 0;
}

.sikshya-quizResults__score {
  font-weight: 700;
}

.sikshya-quizResults__req {
  color: var(--sikshya-learn-muted);
  font-size: var(--sikshya-learn-fs-14);
}

.sikshya-quizResults__pass {
  font-weight: 800;
  color: var(--sikshya-learn-success);
}

.sikshya-quizResults__fail {
  font-weight: 800;
  color: var(--sikshya-learn-danger);
}

.sikshya-quizResults__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

/* Tabs — clearer “course player” chrome */
.sikshya-tabsSection {
  margin-top: 10px;
}

/* --- Tab strip — polished underline pattern ---------------------------
 * DESIGN INVARIANTS (all four must hold simultaneously):
 *   1) The full-width 2px gray baseline is ALWAYS visible across the
 *      whole strip, including the area to the right of the last tab.
 *   2) The active tab's 2px brand underline REPLACES the gray under it
 *      (no double line, no thickness step-up).
 *   3) No state change reflows text — only `color` and the indicator's
 *      color animate.
 *   4) Works whether the strip's overflow is `visible` (desktop) or
 *      `auto` (mobile horizontal-scroll).
 *
 * IMPLEMENTATION:
 *   - Gray baseline is a REAL `border-bottom` on the strip. Borders are
 *     painted as part of the element's own box, so they cannot be
 *     neutralized by the strip's own overflow setting.
 *   - Active indicator is a child `::after` pseudo positioned at the
 *     button's bottom with `bottom: -2px`, so it sits ON TOP of the
 *     strip's border-bottom band. On desktop (overflow:visible) this
 *     renders fine. On mobile the strip's overflow is `clip`+margin (set
 *     below in the mobile media-query block) so the indicator survives.
 *
 * TYPOGRAPHY:
 *   - SINGLE `font-weight: 550` across all states (active uses color,
 *     not weight) so text width never changes between states.
 *   - `font-synthesis: none` blocks UA from auto-bolding on focus.
 *   - 14px size matches Coursera / Notion / Linear at this density.
 */
.sikshya-tabsBar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  background: transparent;
  /* The "main gray border" the user can see across the full strip width.
   * Real border (not a pseudo) — paints with the strip's own box, so
   * cannot be neutralized by overflow clipping. */
  border-bottom: 2px solid var(--sikshya-learn-border);
  margin-bottom: 18px;
  padding-bottom: 0;
}

.sikshya-tabBtn {
  position: relative;
  appearance: none;
  border: 0;
  background: transparent;
  margin-bottom: 0;
  padding: 11px 16px;
  font-size: var(--sikshya-learn-fs-14, 14px);
  font-weight: 550;
  font-synthesis: none;
  letter-spacing: 0.005em;
  line-height: 1.4;
  cursor: pointer;
  color: var(--sikshya-learn-muted);
  transition: color 160ms ease;
}

/* The 2px active/hover indicator lives inside the button at its bottom
 * edge — directly ABOVE the strip's 2px gray border-bottom. Both lines
 * stay visible: gray spans the full strip width as the baseline, and the
 * brand indicator stacks just above it under the active tab. */
.sikshya-tabBtn::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;             /* inside the button, just above the gray strip border */
  height: 2px;
  background: transparent;
  pointer-events: none;
  transition: background-color 160ms ease;
}

.sikshya-tabBtn:hover:not(.is-active) {
  color: var(--sikshya-learn-text);
}

.sikshya-tabBtn:hover:not(.is-active)::after {
  background-color: color-mix(in srgb, var(--sikshya-learn-primary) 45%, transparent);
}

.sikshya-tabBtn.is-active {
  color: var(--sikshya-learn-primary);
}

.sikshya-tabBtn.is-active::after {
  background-color: var(--sikshya-learn-primary);
}

/* Suppress the UA-default focus outline on mouse-click. Browsers paint a
 * subtle ring on `:focus` even when the standard signals it as
 * non-keyboard interaction; we only want the focus chrome to appear when
 * a keyboard user actually tabs to it (handled by `:focus-visible`). */
.sikshya-tabBtn:focus {
  outline: none;
}

.sikshya-tabBtn:focus-visible {
  /* Inset outline so the focus ring lives inside the tab and doesn't
   * cut through the strip's bottom border. */
  outline: 2px solid var(--sikshya-learn-focus);
  outline-offset: -2px;
  border-radius: var(--sikshya-learn-radius-6, 6px);
}

/* Pressed state (mousedown). Without this rule the browser may flash its
 * own default pressed shading between click and class-swap. Underline is
 * painted via the same `::after` pseudo so there is zero geometry shift
 * between pressed / hover / active. */
.sikshya-tabBtn:active {
  color: var(--sikshya-learn-primary);
}

.sikshya-tabBtn:active::after {
  background-color: var(--sikshya-learn-primary);
}

/* Belt-and-suspenders: WebKit's tap-highlight + button inner-border can
 * still leak through on iOS / Android. */
.sikshya-tabBtn {
  -webkit-tap-highlight-color: transparent;
}
.sikshya-tabBtn::-moz-focus-inner {
  border: 0;
  padding: 0;
}

.sikshya-tabPanel {
  display: none;
}

.sikshya-tabPanel.is-active {
  display: block;
}

.sikshya-tabPanel .sikshya-contentPanel {
  max-width: none;
  width: 100%;
}

/* WordPress / rich text inside panels */
.sikshya-learnContent .sikshya-contentPanel :where(p) {
  margin: 0 0 1em;
  font-size: var(--sikshya-learn-fs-15);
  line-height: var(--sikshya-learn-lh-body);
  color: var(--sikshya-learn-text);
}

.sikshya-learnContent .sikshya-contentPanel :where(p):last-child {
  margin-bottom: 0;
}

.sikshya-learnContent .sikshya-contentPanel p a,
.sikshya-learnContent .sikshya-contentPanel li a,
.sikshya-learnContent .sikshya-contentPanel blockquote a,
.sikshya-learnContent .sikshya-contentPanel td a,
.sikshya-learnContent .sikshya-contentPanel figcaption a {
  color: var(--sikshya-learn-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sikshya-learnContent .sikshya-contentPanel p a:hover,
.sikshya-learnContent .sikshya-contentPanel li a:hover,
.sikshya-learnContent .sikshya-contentPanel blockquote a:hover,
.sikshya-learnContent .sikshya-contentPanel td a:hover,
.sikshya-learnContent .sikshya-contentPanel figcaption a:hover {
  color: #1f4585;
}

.sikshya-learnContent .sikshya-contentPanel :where(ul, ol) {
  margin: 0 0 1em;
  padding-left: 1.25rem;
  font-size: var(--sikshya-learn-fs-15);
  line-height: var(--sikshya-learn-lh-body);
}

.sikshya-learnContent .sikshya-contentPanel :where(li) {
  margin: 0.35em 0;
}

.sikshya-learnContent .sikshya-contentPanel :where(h2, h3, h4) {
  margin: 1.25em 0 0.5em;
  font-weight: 800;
  line-height: var(--sikshya-learn-lh-tight);
  letter-spacing: var(--sikshya-learn-tracking-tight);
  color: var(--sikshya-learn-text);
}

.sikshya-learnContent .sikshya-contentPanel :where(h2) {
  font-size: var(--sikshya-learn-fs-18);
}

.sikshya-learnContent .sikshya-contentPanel :where(h3) {
  font-size: var(--sikshya-learn-fs-16);
}

.sikshya-learnContent .sikshya-contentPanel :where(h4) {
  font-size: var(--sikshya-learn-fs-14);
}

.sikshya-learnContent .sikshya-contentPanel :where(h2):first-child,
.sikshya-learnContent .sikshya-contentPanel :where(h3):first-child,
.sikshya-learnContent .sikshya-contentPanel :where(h4):first-child {
  margin-top: 0;
}

.sikshya-learnContent .sikshya-contentPanel :where(img) {
  max-width: 100%;
  height: auto;
  border-radius: var(--sikshya-learn-radius-10);
}

.sikshya-learnContent .sikshya-contentPanel :where(pre) {
  margin: 1em 0;
  padding: 14px 16px;
  border-radius: var(--sikshya-learn-radius-12);
  background: rgba(2, 6, 23, 0.92);
  color: rgba(248, 250, 252, 0.92);
  overflow: auto;
  font-size: 13px;
  line-height: 1.55;
}

.sikshya-learnContent .sikshya-contentPanel :where(code) {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.92em;
}

.sikshya-learnContent .sikshya-contentPanel :where(:not(pre) > code) {
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(44, 91, 168, 0.08);
  color: #1f4585;
}

.sikshya-learnContent .sikshya-contentPanel :where(table) {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: var(--sikshya-learn-fs-14);
}

.sikshya-learnContent .sikshya-contentPanel :where(th, td) {
  border-bottom: 1px solid var(--sikshya-learn-border);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

.sikshya-learnContent .sikshya-contentPanel :where(th) {
  font-weight: 800;
  color: var(--sikshya-learn-text);
}

/* Native / embedded players in lesson prose — full width, locked 16:9 */
.sikshya-learnContent .sikshya-contentPanel :where(video) {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: #0b1220;
  border-radius: var(--sikshya-learn-radius-10);
}

.sikshya-learnContent .sikshya-contentPanel iframe[src*="youtube.com/embed"],
.sikshya-learnContent .sikshya-contentPanel iframe[src*="youtube-nocookie.com/embed"],
.sikshya-learnContent .sikshya-contentPanel iframe[src*="player.vimeo.com/video"] {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: var(--sikshya-learn-radius-10);
}

/*
 * Hosted lesson player (LessonLearnContent) — iframe + height:auto + aspect-ratio often collapses
 * to zero height inside the Learn column (flex/min-height chains). Wrap uses :has(); link-only fallbacks omit it.
 */
.sikshya-learnContent .sikshya-contentPanel .sikshya-lesson-embed--video:has(iframe),
.sikshya-learnContent .sikshya-contentPanel .sikshya-lesson-embed--video:has(video) {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 0 1rem;
  aspect-ratio: 16 / 9;
  border-radius: var(--sikshya-learn-radius-10);
  background: #0b1220;
  overflow: hidden;
}

.sikshya-learnContent .sikshya-contentPanel .sikshya-lesson-embed--video iframe,
.sikshya-learnContent .sikshya-contentPanel .sikshya-lesson-embed--video video {
  display: block;
  border: 0;
  border-radius: inherit;
}

.sikshya-learnContent .sikshya-contentPanel .sikshya-lesson-embed--video:has(iframe) iframe,
.sikshya-learnContent .sikshya-contentPanel .sikshya-lesson-embed--video:has(video) video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: unset;
}

.sikshya-learnContent .sikshya-contentPanel .sikshya-lesson-embed--video:has(iframe) :where(.wp-block-embed, .wp-block-embed__wrapper, figure) {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
}

.sikshya-learnContent .sikshya-contentPanel .sikshya-lesson-embed--video :where(.wp-block-embed, figure) iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.sikshya-learnContent .sikshya-contentPanel .sikshya-lesson-embed--audio:has(audio) {
  width: 100%;
  margin: 0 0 1rem;
}

.sikshya-learnContent .sikshya-contentPanel .sikshya-lesson-embed--audio audio {
  display: block;
  width: 100%;
}

/* Calm "couldn't load this media" fallback — emitted hidden alongside every
 * video/audio embed; revealed by `learn.js` on a player `error` event.
 *
 * IMPORTANT: scope `display:flex` to `:not([hidden])` so the `hidden` HTML
 * attribute keeps its UA default of `display:none`. Setting `display:flex`
 * unconditionally would override `[hidden]` and flash the fallback on
 * first paint before the player has had a chance to load. */
.sikshya-lesson-embed__fallback[hidden] {
  display: none !important;
}

.sikshya-lesson-embed__fallback:not([hidden]) {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  padding: 14px 16px;
  background: var(--sikshya-learn-surface-2);
  border: 1px solid var(--sikshya-learn-border);
  border-radius: var(--sikshya-learn-radius-10);
  color: var(--sikshya-learn-text);
  font-size: var(--sikshya-learn-fs-14);
}

.sikshya-lesson-embed__fallback-msg {
  margin: 0;
  color: var(--sikshya-learn-muted);
}

.sikshya-lesson-embed__fallback-link {
  font-weight: 600;
  color: var(--sikshya-learn-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sikshya-lesson-embed__fallback-link:hover,
.sikshya-lesson-embed__fallback-link:focus-visible {
  color: var(--sikshya-learn-primary-strong, var(--sikshya-learn-primary));
}

/* Optional transcript disclosure, rendered below video/audio embeds when
 * `_sikshya_lesson_transcript_url` or `_sikshya_lesson_transcript_text`
 * is set. Closed-by-default; opens to a calm reading panel. */
.sikshya-lesson-transcript {
  margin-top: 14px;
  border: 1px solid var(--sikshya-learn-border);
  border-radius: var(--sikshya-learn-radius-10);
  background: var(--sikshya-learn-surface-2);
}

.sikshya-lesson-transcript__summary {
  cursor: pointer;
  padding: 10px 14px;
  font-weight: 600;
  color: var(--sikshya-learn-text);
  list-style: none;
  position: relative;
}

.sikshya-lesson-transcript__summary::-webkit-details-marker { display: none; }

.sikshya-lesson-transcript__summary::after {
  content: '▾';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  transition: transform 160ms ease;
  color: var(--sikshya-learn-muted);
}

.sikshya-lesson-transcript[open] .sikshya-lesson-transcript__summary::after {
  transform: translateY(-50%) rotate(0deg);
}

.sikshya-lesson-transcript__body,
.sikshya-lesson-transcript__download {
  padding: 0 14px 14px;
  margin: 0;
  font-size: var(--sikshya-learn-fs-14);
  line-height: 1.65;
  color: var(--sikshya-learn-text);
}

.sikshya-lesson-transcript__download a {
  font-weight: 600;
  color: var(--sikshya-learn-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/*
 * SCORM/H5P player (Pro) — mounted via `sikshya_lesson_above_tabs`; keep iframe from collapsing in flex layouts.
 */
/* Align with hosted video strip — player.css defaults add vertical margin. */
.sikshya-learnContent .sikshya-contentSection--lessonInteractive .sik-player {
  margin-top: 0;
  margin-bottom: 0;
}

.sikshya-learnContent .sikshya-contentSection--lessonInteractive .sik-player__frame {
  min-height: min(72vh, 560px);
}

/* On phones the desktop `min(72vh, 560px)` is the wrong rhythm — the SCORM/
 * H5P shell pushes the rest of the lesson off-screen. Clamp it down to a
 * comfortable in-page block on small viewports so learners can still see
 * the tabs + body content below the player without an awkward jump. */
@media (max-width: 768px) {
  .sikshya-learnContent .sikshya-contentSection--lessonInteractive .sik-player__frame {
    min-height: min(56vh, 420px);
  }
}

/* Live class — the Join button cluster lives in `.sik-live-lesson__actions`.
 * Pro CSS lays it out as a row; on phones it overflows. Wrap + stack. */
@media (max-width: 640px) {
  .sikshya-learning-shell .sik-live-lesson__actions {
    flex-wrap: wrap;
    gap: 8px;
  }
  .sikshya-learning-shell .sik-live-lesson__actions > .sik-live-btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}

.sikshya-learnContent .sikshya-contentSection--lessonInteractive .sik-player__iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  border: 0;
  border-radius: var(--sikshya-learn-radius-10);
  background: var(--sikshya-learn-surface);
}

.sikshya-learnContent .sikshya-contentPanel :where(blockquote) {
  margin: 1em 0;
  padding: 12px 16px;
  border-left: 3px solid rgba(44, 91, 168, 0.45);
  background: var(--sikshya-learn-surface-2);
  border-radius: 0 var(--sikshya-learn-radius-8) var(--sikshya-learn-radius-8) 0;
  color: var(--sikshya-learn-text);
}

/* Course content — curriculum accordion + lesson rows (Sikshya Learn) */
.sikshya-curriculumOutline {
  margin: 0;
  padding: 0;
}

.sikshya-curriculumOutline__empty {
  margin: 0;
  padding: var(--sikshya-learn-space-16);
  font-size: var(--sikshya-learn-fs-14);
  line-height: 1.5;
  color: var(--sikshya-learn-muted);
}

.sikshya-curriculumOutline__chapter {
  border-bottom: 1px solid var(--sikshya-learn-border);
  margin: 0;
}

.sikshya-curriculumOutline__sectionSummary {
  cursor: pointer;
  list-style: none;
  padding: 0;
  margin: 0;
  background: var(--sikshya-learn-surface);
  user-select: none;
  transition: background 0.15s ease;
}

.sikshya-curriculumOutline__sectionSummary:hover {
  background: var(--sikshya-learn-hover);
}

.sikshya-curriculumOutline__sectionSummary:focus-visible {
  outline: 2px solid var(--sikshya-learn-focus);
  outline-offset: -2px;
  border-radius: var(--sikshya-learn-radius-10);
}

.sikshya-curriculumOutline__sectionSummary::-webkit-details-marker,
.sikshya-curriculumOutline__sectionSummary::marker {
  display: none;
}

.sikshya-curriculumOutline__chapter[open] > .sikshya-curriculumOutline__sectionSummary {
  background: var(--sikshya-curriculum-section-open);
}

.sikshya-curriculumOutline__chapter[data-sikshya-current-chapter="1"] > .sikshya-curriculumOutline__sectionSummary {
  background: var(--sikshya-learn-sidebar-active);
  box-shadow: inset 4px 0 0 var(--sikshya-curriculum-accent);
}

.sikshya-curriculumOutline__chapter[data-sikshya-current-chapter="1"] > .sikshya-curriculumOutline__sectionSummary .sikshya-curriculumOutline__sectionTitle {
  color: var(--sikshya-curriculum-accent-strong);
}

.sikshya-curriculumOutline__chapter[data-sikshya-current-chapter="1"] > .sikshya-curriculumOutline__sectionSummary .sikshya-curriculumOutline__sectionChevron {
  color: var(--sikshya-curriculum-accent-strong);
}

.sikshya-curriculumOutline__chapter[data-sikshya-current-chapter="1"] > .sikshya-curriculumOutline__sectionSummary:hover {
  background: rgba(44, 91, 168, 0.12);
}

.sikshya-curriculumOutline__chapter[open] > .sikshya-curriculumOutline__sectionSummary:hover {
  background: var(--sikshya-curriculum-section-open);
}

.sikshya-curriculumOutline__sectionHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px var(--sikshya-learn-space-16) 12px;
  min-height: 48px;
}

.sikshya-curriculumOutline__sectionIcon {
  flex: 0 0 auto;
  margin-top: 2px;
  color: var(--sikshya-learn-muted);
}

.sikshya-curriculumOutline__sectionIcon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.sikshya-curriculumOutline__sectionText {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 10px;
  row-gap: 4px;
  min-width: 0;
  flex: 1;
}

.sikshya-curriculumOutline__sectionLabel {
  display: block;
  grid-column: 1 / -1;
  font-size: var(--sikshya-learn-fs-12);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sikshya-learn-muted);
}

.sikshya-curriculumOutline__sectionTitle {
  display: block;
  grid-column: 1 / 2;
  font-size: var(--sikshya-learn-fs-14);
  font-weight: 700;
  line-height: 1.35;
  color: var(--sikshya-learn-text);
  letter-spacing: -0.01em;
}

.sikshya-curriculumOutline__sectionMeta {
  display: block;
  grid-column: 2 / 3;
  align-self: center;
  text-align: right;
  white-space: nowrap;
  font-size: var(--sikshya-learn-fs-12);
  font-weight: 500;
  line-height: 1.35;
  color: var(--sikshya-learn-muted);
  font-variant-numeric: tabular-nums;
}

.sikshya-curriculumOutline__sectionChevron {
  flex: 0 0 auto;
  color: var(--sikshya-learn-muted);
  margin-top: 2px;
  transition: transform 0.2s ease, color 0.15s ease;
}

.sikshya-curriculumOutline__sectionSummary:hover .sikshya-curriculumOutline__sectionChevron {
  color: var(--sikshya-learn-text);
}

.sikshya-curriculumOutline__sectionChevron svg {
  width: 16px;
  height: 16px;
  display: block;
}

.sikshya-curriculumOutline__chapter[open] .sikshya-curriculumOutline__sectionChevron {
  transform: rotate(180deg);
  color: var(--sikshya-learn-text);
}

.sikshya-curriculumOutline__list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--sikshya-learn-surface);
}

.sikshya-curriculumOutline__item {
  margin: 0;
  padding: 0;
}

.sikshya-curriculumOutline__row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding-right: 6px;
  border-top: 1px solid var(--sikshya-learn-border);
  background: var(--sikshya-learn-surface);
  transition: background 0.15s ease;
}

.sikshya-curriculumOutline__row.is-current {
  background: var(--sikshya-curriculum-row-active);
  box-shadow: inset 3px 0 0 var(--sikshya-curriculum-accent);
}

.sikshya-curriculumOutline__row:focus-within {
  background: var(--sikshya-learn-accent-wash);
}

.sikshya-curriculumOutline__row.is-current:focus-within {
  background: var(--sikshya-learn-accent-wash-2);
}

.sikshya-curriculumOutline__row:not(.is-current):hover {
  background: var(--sikshya-learn-hover);
}

.sikshya-curriculumOutline__link {
  flex: 1;
  min-width: 0;
  display: flex;
  /* Center-align so completed (filled circle) and todo (empty circle) indicators
   * and the content-type icon share a baseline regardless of internal sizes. */
  align-items: center;
  gap: 12px;
  padding: 12px 8px 12px var(--sikshya-learn-space-16);
  text-decoration: none;
  color: var(--sikshya-learn-text);
  border: 0;
  box-shadow: none;
  border-radius: 0;
}

.sikshya-curriculumOutline__link.is-locked {
  cursor: not-allowed;
  opacity: 0.88;
}

.sikshya-curriculumOutline__link.is-locked .sikshya-curriculumOutline__lessonTitle {
  color: var(--sikshya-learn-muted);
}

.sikshya-curriculumOutline__link.is-locked .sikshya-curriculumOutline__itemIcon {
  opacity: 0.6;
}

.sikshya-curriculumOutline__lock {
  flex: 0 0 auto;
  margin-top: 2px;
  margin-inline-start: auto;
  padding-inline-start: 6px;
  color: var(--sikshya-learn-muted);
  display: inline-flex;
  align-items: center;
}

.sikshya-curriculumOutline__lock svg {
  display: block;
}

/* Indicators (todo circle, completed check) and the content-type icon all render
 * at 20x20 so the row layout is stable across completed/todo states and the
 * content icon doesn't shift horizontally between rows. Full opacity + the
 * shared --sikshya-learn-muted token gives parity with single-course + admin. */
.sikshya-curriculumOutline__itemIcon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  color: var(--sikshya-learn-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sikshya-curriculumOutline__itemIcon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.sikshya-curriculumOutline__check {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid var(--sikshya-curriculum-check-todo);
  background: var(--sikshya-learn-surface);
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sikshya-curriculumOutline__check.is-done {
  /* Strip border entirely so the 20px width = content area = SVG size.
   * Leaving the 2px transparent border in place was making the content area
   * 16x16 and the SVG render slightly inset, making the green disc visually
   * smaller than the empty 20px ring. */
  border: 0;
  background: transparent;
  color: var(--sikshya-learn-success);
  width: 18px;
  height: 18px;
  padding: 0;
}

.sikshya-curriculumOutline__check.is-done svg {
  width: 18px;
  height: 18x;
  display: block;
}

.sikshya-curriculumOutline__linkBody {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.sikshya-curriculumOutline__lessonTitle {
  font-size: var(--sikshya-learn-fs-14);
  font-weight: 500;
  line-height: 1.45;
  color: var(--sikshya-learn-text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.sikshya-curriculumOutline__row.is-current .sikshya-curriculumOutline__lessonTitle {
  font-weight: 500;
  color: var(--sikshya-curriculum-accent-strong);
}

.sikshya-curriculumOutline__lessonSub {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--sikshya-learn-fs-12);
  line-height: 1.25;
  color: var(--sikshya-learn-muted);
}

.sikshya-curriculumOutline__dur {
  font-size: var(--sikshya-learn-fs-12);
  color: var(--sikshya-learn-muted);
  font-variant-numeric: tabular-nums;
}

.sikshya-curriculumOutline__dripHint {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.3;
  color: var(--sikshya-learn-muted);
  font-variant-numeric: tabular-nums;
}

.sikshya-curriculumOutline__resourcesBtn {
  appearance: none;
  flex: 0 0 auto;
  align-self: flex-end;
  margin: 2px 0 6px 0;
  padding: 4px 8px;
  min-height: 0;
  border-radius: 6px;
  border: 1px solid rgba(44, 91, 168, 0.32);
  background: var(--sikshya-learn-surface);
  color: var(--sikshya-curriculum-accent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  line-height: 1.3;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.sikshya-curriculumOutline__resourcesBtn:hover {
  border-color: var(--sikshya-curriculum-accent);
  background: rgba(44, 91, 168, 0.06);
  color: var(--sikshya-curriculum-accent-strong);
}

.sikshya-curriculumOutline__resourcesBtn:active {
  transform: translateY(1px);
}

.sikshya-curriculumOutline__resourcesBtnInner {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.sikshya-curriculumOutline__resourcesBtnInner svg {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
}

.sikshya-curriculumOutline__link:focus-visible {
  outline: 2px solid var(--sikshya-learn-focus);
  outline-offset: -2px;
  border-radius: var(--sikshya-learn-radius-8);
}

.sikshya-curriculumOutline__resourcesBtn:focus-visible {
  outline: 2px solid var(--sikshya-learn-focus);
  outline-offset: 2px;
  box-shadow: var(--sikshya-learn-focus-shadow);
}

/* -------------------------------------------------------------------
 * Pro: SCORM / H5P embeds (sikshya-pro — scorm_h5p_pro)
 * ------------------------------------------------------------------- */
.sikshya-learning-shell .sik-pro-embed {
  margin: 0 0 var(--sikshya-learn-space-16);
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: var(--sikshya-learn-radius-12);
  background: var(--sikshya-learn-surface);
  box-shadow: var(--sikshya-learn-shadow-sm);
  overflow: hidden;
}

.sikshya-learning-shell .sik-pro-embed--scorm {
  border-color: rgba(15, 23, 42, 0.12);
}

.sikshya-learning-shell .sik-pro-embed--h5p {
  border-color: rgba(44, 91, 168, 0.2);
  background: linear-gradient(180deg, rgba(44, 91, 168, 0.03) 0%, var(--sikshya-learn-surface) 32%);
}

.sikshya-learning-shell .sik-pro-embed__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sikshya-learn-space-8) var(--sikshya-learn-space-12);
  padding: var(--sikshya-learn-space-10) var(--sikshya-learn-space-12);
  background: var(--sikshya-learn-surface-2);
  border-bottom: 1px solid var(--sikshya-learn-border);
}

.sikshya-learning-shell .sik-pro-embed--h5p .sik-pro-embed__toolbar {
  background: rgba(44, 91, 168, 0.06);
  border-bottom-color: rgba(44, 91, 168, 0.12);
}

.sikshya-learning-shell .sik-pro-embed__label {
  font-size: var(--sikshya-learn-fs-13);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--sikshya-learn-text);
}

.sikshya-learning-shell .sik-pro-embed__sublabel {
  margin-left: auto;
  font-size: var(--sikshya-learn-fs-12);
  font-weight: 500;
  color: var(--sikshya-learn-muted);
}

.sikshya-learning-shell .sik-pro-embed--h5p .sik-pro-embed__label {
  color: #1f4585;
}

.sikshya-learning-shell .sik-pro-embed__actions {
  display: flex;
  align-items: center;
  gap: var(--sikshya-learn-space-6);
  flex: 0 0 auto;
}

.sikshya-learning-shell .sik-pro-embed__hint {
  margin: 0;
  padding: var(--sikshya-learn-space-8) var(--sikshya-learn-space-12) 0;
  font-size: var(--sikshya-learn-fs-12);
  line-height: 1.45;
  color: var(--sikshya-learn-muted);
}

.sikshya-learning-shell .sik-pro-embed__hint--h5p {
  padding-bottom: var(--sikshya-learn-space-6);
}

.sikshya-learning-shell .sik-pro-embed__frame {
  position: relative;
  width: 100%;
  min-height: min(70vh, 800px);
  max-height: 85vh;
  background: #0b1220;
  margin-top: var(--sikshya-learn-space-8);
}

.sikshya-learning-shell .sik-pro-embed__iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #0b1220;
}

.sikshya-learning-shell .sik-pro-embed__h5p {
  margin: 0;
  padding: 0 var(--sikshya-learn-space-12) var(--sikshya-learn-space-12);
  min-height: 320px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.sikshya-learning-shell .sik-pro-embed__h5p iframe,
.sikshya-learning-shell .sik-pro-embed__h5p object,
.sikshya-learning-shell .sik-pro-embed__h5p embed {
  max-width: 100%;
  border-radius: var(--sikshya-learn-radius-8);
}

.sikshya-learning-shell .sik-pro-embed__h5p :where(.h5p-iframe-wrapper, .h5p-content) {
  max-width: 100%;
}

@media (min-width: 64rem) {
  .sikshya-learning-shell .sik-pro-embed__h5p {
    min-height: 400px;
  }
}

/* Respect reduced motion on Learn surfaces only (this sheet loads on Learn templates) */
@media (prefers-reduced-motion: reduce) {
  .sikshya-learning-shell,
  .sikshya-learning-shell * {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* —— Assignment panel (Learn) —— */
.sikshya-learning-shell .sikshya-assignmentPanel {
  margin-top: var(--sikshya-learn-space-16);
  padding-top: var(--sikshya-learn-space-16);
  border-top: 1px solid var(--sikshya-learn-border);
}

.sikshya-learning-shell .sikshya-assignmentPanel__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sikshya-learn-space-8);
  margin-bottom: var(--sikshya-learn-space-12);
}

.sikshya-learning-shell .sikshya-assignmentPanel__chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: var(--sikshya-learn-fs-12);
  font-weight: 600;
  background: var(--sikshya-learn-surface-3);
  color: var(--sikshya-learn-text);
}

.sikshya-learning-shell .sikshya-assignmentPanel__chip--warn {
  background: rgba(220, 38, 38, 0.12);
  color: var(--sikshya-learn-danger);
}

.sikshya-learning-shell .sikshya-assignmentPanel__status {
  margin-bottom: var(--sikshya-learn-space-16);
}

.sikshya-learning-shell .sikshya-assignmentPanel__grade {
  margin: 10px 0 0;
  font-size: var(--sikshya-learn-fs-15);
  font-weight: 600;
  color: var(--sikshya-learn-text);
}

.sikshya-learning-shell .sikshya-assignmentPanel__subhead {
  margin: 14px 0 6px;
  font-size: var(--sikshya-learn-fs-13);
  color: var(--sikshya-learn-text);
}

.sikshya-learning-shell .sikshya-assignmentPanel__feedbackBody,
.sikshya-learning-shell .sikshya-assignmentPanel__submittedContent .sikshya-prose {
  font-size: var(--sikshya-learn-fs-14);
  line-height: var(--sikshya-learn-lh-body);
  color: var(--sikshya-learn-text);
}

.sikshya-learning-shell .sikshya-assignmentPanel__urlInput {
  display: block;
  width: 100%;
  max-width: 32rem;
  margin-top: 6px;
  font-size: var(--sikshya-learn-fs-14);
}

.sikshya-learning-shell .sikshya-assignmentDropzone {
  position: relative;
  max-width: 36rem;
  margin-top: 8px;
}

.sikshya-learning-shell .sikshya-assignmentDropzone__native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sikshya-learning-shell .sikshya-assignmentDropzone__surface {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 140px;
  padding: var(--sikshya-learn-space-16);
  text-align: center;
  border: 2px dashed var(--sikshya-learn-border);
  border-radius: var(--sikshya-learn-radius-10);
  background: var(--sikshya-learn-surface-2);
  color: var(--sikshya-learn-muted);
  font-size: var(--sikshya-learn-fs-14);
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease,
    box-shadow 0.15s ease;
}

.sikshya-learning-shell .sikshya-assignmentDropzone__surface:hover {
  border-color: rgba(44, 91, 168, 0.45);
  background: var(--sikshya-learn-surface-3);
}

.sikshya-learning-shell .sikshya-assignmentDropzone.is-dragover .sikshya-assignmentDropzone__surface {
  border-color: var(--sikshya-learn-primary);
  background: rgba(44, 91, 168, 0.06);
  box-shadow: 0 0 0 3px rgba(44, 91, 168, 0.12);
}

.sikshya-learning-shell .sikshya-assignmentDropzone__title {
  margin: 0;
  font-size: var(--sikshya-learn-fs-15);
  font-weight: 600;
  color: var(--sikshya-learn-text);
}

.sikshya-learning-shell .sikshya-assignmentDropzone__hint {
  margin: 0;
  font-size: var(--sikshya-learn-fs-13);
  line-height: 1.45;
}

.sikshya-learning-shell .sikshya-assignmentDropzone__browse {
  margin-top: 4px;
  font-size: var(--sikshya-learn-fs-13);
  font-weight: 600;
  color: var(--sikshya-learn-primary);
  text-decoration: underline;
}

.sikshya-learning-shell .sikshya-assignmentDropzone__list {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  width: 100%;
  text-align: left;
  font-size: var(--sikshya-learn-fs-12);
  color: var(--sikshya-learn-text);
}

.sikshya-learning-shell .sikshya-assignmentDropzone__list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  margin-top: 6px;
  border-radius: var(--sikshya-learn-radius-8);
  background: var(--sikshya-learn-surface);
  border: 1px solid var(--sikshya-learn-border);
}

.sikshya-learning-shell .sikshya-assignmentDropzone__remove {
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: var(--sikshya-learn-danger);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

/* ============================================================
 * Course-mode polish (learn shell course landing)
 * ----------------------------------------------------------
 * Cleans up the visual when a learner lands on `?p=COURSE` in
 * the learn shell — manual excerpt becomes a lead paragraph
 * separate from the body, empty-content state gets a soft
 * notice instead of a blank panel, and addon-contributed
 * blocks under `sikshya_learn_after_hero` inherit the
 * comfortable content-column padding rhythm.
 * ============================================================ */
.sikshya-learnCoursesumLead {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--sikshya-learn-text-muted, #475569);
  margin: 0 0 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px dashed var(--sikshya-learn-border);
}

.sikshya-learnCoursesumEmpty {
  margin: 0;
  padding: 1.25rem 0;
  text-align: center;
  color: var(--sikshya-learn-text-muted, #64748b);
  font-style: italic;
}

/* Calendar teaser + any other addon block that hooks into
 * sikshya_learn_after_hero now lives INSIDE .sikshya-learnContentCol.
 * Make sure those blocks share the content column's horizontal
 * rhythm so they line up with the panels below them. */
.sikshya-learnContentCol > .sik-cal-teaser,
.sikshya-learnContentCol > [class*='sik-cal-teaser'],
.sikshya-learnContentCol > .sikshya-learnAfterHero {
  margin: 18px 22px 0;
  padding: 14px 16px;
  background: var(--sikshya-learn-surface);
  border: 1px solid var(--sikshya-learn-border);
  border-radius: var(--sikshya-learn-radius-12);
  box-shadow: var(--sikshya-learn-shadow-panel);
}

@media (max-width: 1023px) {
  .sikshya-learnContentCol > .sik-cal-teaser,
  .sikshya-learnContentCol > [class*='sik-cal-teaser'],
  .sikshya-learnContentCol > .sikshya-learnAfterHero {
    margin: 16px 14px 0;
  }
}

/* Extras row at the bottom of the learn content column — CSV exports,
 * activity log, certificate shortcuts. Pre-fix these were inside
 * .sikshya-learnSidebar and looked unstyled. */
.sikshya-learnContentExtras {
  display: grid;
  gap: 16px;
  margin: 24px 22px calc(var(--sikshya-learn-content-nav-h) + 32px);
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .sikshya-learnContentExtras {
    grid-template-columns: repeat(2, 1fr);
  }
}

.sikshya-learnContentExtras:empty {
  display: none;
}

/* Each direct child becomes a uniform card. Catches the legacy widgets
 * that ship with `.sik-acc-panel`, `.sikshya-learnSidebarAct`,
 * `.sikshya-learnExport`, and plain divs. */
.sikshya-learnContentExtras > * {
  background: var(--sikshya-learn-surface);
  border: 1px solid var(--sikshya-learn-border);
  border-radius: var(--sikshya-learn-radius-12);
  padding: 16px 18px;
  box-shadow: var(--sikshya-learn-shadow-panel);
  margin: 0;
}

.sikshya-learnContentExtras > * > :first-child {
  margin-top: 0;
}
.sikshya-learnContentExtras > * > :last-child {
  margin-bottom: 0;
}

/* Strip the inline border/margin hacks the legacy widgets carried so they
 * don't double up with the container styling above. */
.sikshya-learnContentExtras .sikshya-learnSidebarAct,
.sikshya-learnContentExtras .sik-acc-panel,
.sikshya-learnContentExtras .sik-acc-activity {
  border-top: 0 !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  border-width: 0 !important;
  background: transparent !important;
}

.sikshya-learnContentExtras h2,
.sikshya-learnContentExtras h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--sikshya-learn-text);
}

.sikshya-learnContentExtras p {
  margin: 0 0 8px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--sikshya-learn-text-muted, #475569);
}

.sikshya-learnContentExtras button,
.sikshya-learnContentExtras .sik-acc-btn,
.sikshya-learnContentExtras .sikshya-learner-export-btn {
  display: inline-flex;
  align-items: center;
  margin: 4px 6px 0 0;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--sikshya-learn-surface-muted, #f1f5f9);
  color: var(--sikshya-learn-text);
  border: 1px solid var(--sikshya-learn-border);
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 120ms ease;
}

.sikshya-learnContentExtras button:hover,
.sikshya-learnContentExtras .sik-acc-btn:hover {
  background: var(--sikshya-learn-border);
}

/* =========================================================
 * Sikshya Learn — Distraction-Free Rework (additive only)
 * =========================================================
 * Drives:
 *   - Skip link
 *   - New layout / drawer / pill tokens; stronger muted contrast
 *   - Sidebar rail mode (`html.sikshya-sidebarCollapsed`)
 *   - More toggle + off-canvas drawer (`html.sikshya-moreOpen`)
 *   - Focus mode body class (`html.sikshya-focusMode`)
 *   - Topbar auto-hide on scroll (`html.sikshya-chromeHidden`)
 *   - Floating Mark-Complete pill (threshold-fade-in)
 *   - Per-content-type variants (text reading well, audio sticky bar)
 *   - Inert legacy footer
 * Pro-addon compat: only NEW selectors; no existing rules edited.
 * ========================================================= */

:root {
  /* Stronger muted text for small-size states (notes meta, announcement meta).
   * Used by `.sikshya-muted--strong` and `.sikshya-learnNotes__hint`. */
  --sikshya-learn-muted-strong: #475569;
  /* Floating Mark-complete pill tokens. Used by `.sikshya-learnCompletePill`. */
  --sikshya-learn-pill-bg: var(--sikshya-learn-primary);
  --sikshya-learn-pill-text: #ffffff;
  --sikshya-learn-pill-shadow: 0 6px 20px rgba(44, 91, 168, 0.28), 0 1px 2px rgba(15, 23, 42, 0.08);
}

/* --- Skip link ---------------------------------------------------------- */
.sikshya-skipLink {
  position: absolute;
  left: 12px;
  top: -64px;
  z-index: 1100;
  background: var(--sikshya-learn-surface);
  color: var(--sikshya-learn-text);
  padding: 10px 14px;
  border-radius: var(--sikshya-learn-radius-8);
  box-shadow: var(--sikshya-learn-shadow-md);
  font-weight: 600;
  font-size: var(--sikshya-learn-fs-14);
  text-decoration: none;
  transition: top 120ms ease;
}
.sikshya-skipLink:focus,
.sikshya-skipLink:focus-visible {
  top: 12px;
  outline: 2px solid var(--sikshya-learn-focus);
  outline-offset: 2px;
}

/* --- Sidebar hide (desktop): defer to legacy `.sikshya-sidebarCollapsed`
 * rules at lines ~559-571 which set flex-basis/width to 0. The earlier
 * "rail mode" override (72px sliver) caused the hamburger toggle to feel
 * unresponsive — the sidebar didn't appear to hide because a rail was
 * still visible. Removed; full hide restored.
 *
 * The content well needs to actually reflow into the freed space when
 * collapsed; this rule un-clamps the content column padding so the prose
 * recenters cleanly across the available width.
 */
@media (min-width: 1024px) {
  html.sikshya-sidebarCollapsed .sikshya-learnContentCol {
    margin-left: 0;
  }
  html.sikshya-sidebarCollapsed .sikshya-learnSidebar {
    transition: flex-basis 180ms ease, width 180ms ease, padding 180ms ease;
  }
}

/* --- Overview-well: top-of-content reading slab ------------------------ */
.sikshya-contentSection--overview {
  padding-top: 8px;
}
/* (Removed) `.sikshya-overviewWell` rules — stragglers from the reverted
 * More-drawer rework. The Overview content now uses the normal tab-panel
 * + contentPanel--plain stack and fills the column edge-to-edge like the
 * other tab panels. */

/* --- Focus mode -------------------------------------------------------- */
html.sikshya-focusMode .sikshya-learnTopbar,
html.sikshya-focusMode .sikshya-learnSidebar,
html.sikshya-focusMode .sikshya-learnOverlay,
html.sikshya-focusMode .sikshya-learnHeader__chapterInline,
html.sikshya-focusMode .sikshya-learnHeader__typeIcon,
html.sikshya-focusMode .sikshya-learnContentNav__center > :not(.sikshya-learnContentNav__spacer) {
  display: none !important;
}
html.sikshya-focusMode .sikshya-learnMain {
  --sikshya-learn-topbar-h: 0px;
  --sikshya-learn-sidebar-w-current: 0px;
}
html.sikshya-focusMode .sikshya-learnContentNav {
  background: rgba(255, 255, 255, 0.92);
  /* Dock was moved outside .sikshya-learning-app, so it no longer inherits
   * the --sikshya-learn-sidebar-w-current: 0px override that focus mode
   * sets on .sikshya-learnMain. Force left: 0 here so the dock spans the
   * full viewport width in focus mode (no leftover 400px gutter from the
   * sidebar variable on desktop). */
  left: 0 !important;
}

/* Focus mode — keep tabs bar at the prose-readable width instead of letting
 * it stretch full-width across the freed-up content area (sidebar + topbar
 * are hidden so the column gets wider). The tabs strip looking massively
 * wide than the body looks unbalanced; clamp it to the same reading rhythm. */
html.sikshya-focusMode .sikshya-learnContent > .sikshya-tabsSection {
  max-width: var(--sikshya-learn-prose-max);
  margin-inline: auto;
}
html.sikshya-focusMode .sikshya-learnContent > .sikshya-tabsSection > .sikshya-tabsBar {
  max-width: 100%;
  margin-inline: auto;
}

/* Focus button — pressed state + icon swap. */
.sikshya-learnHeader__focusBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: var(--sikshya-learn-muted-strong);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}
.sikshya-learnHeader__focusBtn:hover {
  background: var(--sikshya-learn-hover);
  color: var(--sikshya-learn-text);
}
.sikshya-learnHeader__focusBtn:focus-visible {
  outline: 2px solid var(--sikshya-learn-focus);
  outline-offset: 2px;
}
.sikshya-learnHeader__focusBtn-exit {
  display: none;
}
html.sikshya-focusMode .sikshya-learnHeader__focusBtn {
  color: var(--sikshya-learn-primary);
  background: var(--sikshya-learn-accent-wash);
  border-color: var(--sikshya-learn-accent-wash-2);
}
html.sikshya-focusMode .sikshya-learnHeader__focusBtn-enter {
  display: none;
}
html.sikshya-focusMode .sikshya-learnHeader__focusBtn-exit {
  display: inline-flex;
}

/* --- Floating Mark-Complete pill --------------------------------------- */
.sikshya-learnCompletePill {
  position: fixed;
  right: 14px;
  bottom: calc(var(--sikshya-learn-content-nav-h) + 14px);
  z-index: 75;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: var(--sikshya-learn-fs-13);
  font-weight: 600;
  line-height: 1.2;
  color: var(--sikshya-learn-pill-text);
  background: var(--sikshya-learn-pill-bg);
  border: none;
  border-radius: 999px;
  box-shadow: var(--sikshya-learn-pill-shadow);
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 220ms ease, transform 220ms ease;
}
.sikshya-learnCompletePill .sikshya-btn__icon svg {
  width: 12px;
  height: 12px;
  display: block;
}
.sikshya-learnCompletePill[hidden] {
  display: none;
}
.sikshya-learnCompletePill.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.sikshya-learnCompletePill:hover {
  transform: translateY(-1px);
  box-shadow: var(--sikshya-learn-pill-shadow), 0 0 0 4px rgba(44, 91, 168, 0.22);
}
.sikshya-learnCompletePill:focus-visible {
  outline: 2px solid var(--sikshya-learn-focus);
  outline-offset: 2px;
}
@media (max-width: 640px) {
  .sikshya-learnCompletePill {
    right: 10px;
    bottom: calc(var(--sikshya-learn-content-nav-h) + 10px);
    padding: 5px 10px;
    font-size: var(--sikshya-learn-fs-12);
  }
}

/* --- Topbar auto-hide on scroll-down ----------------------------------- */
.sikshya-learnTopbar {
  transition: transform 220ms ease, opacity 220ms ease;
  will-change: transform;
}
html.sikshya-chromeHidden:not(.sikshya-focusMode) .sikshya-learnTopbar {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

/* --- Per-content-type variants ----------------------------------------- */
/* (Removed) `.sikshya-overviewWell` size bump for text lessons — class no
 * longer rendered after the reverted More-drawer rework. */
.sikshya-learning-shell--type-text .sikshya-learnHeader__typeIcon {
  display: none;
}
.sikshya-learning-shell--type-audio .sikshya-lesson-embed--audio {
  position: sticky;
  top: 8px;
  z-index: 20;
  background: var(--sikshya-learn-surface);
  padding: 8px 0;
  border-bottom: 1px solid var(--sikshya-learn-border);
}

/* --- Stronger muted token on small-text states ------------------------- */
.sikshya-muted--strong,
.sikshya-learnNotes__hint,
.sikshya-learnNotes__meta,
.sikshya-announce__meta {
  color: var(--sikshya-learn-muted-strong);
}

/* --- Inert legacy footer (defensive) ----------------------------------- */
.sikshya-learning-footer:empty {
  display: none;
}

/* =========================================================
 * Sikshya Learn — Responsive Refinements (any-device polish)
 * =========================================================
 * Mobile-first additive fixes. No existing selectors edited.
 *
 *   1. New touch-min token (Apple HIG 44px)
 *   2. Tab strip: 44px touch target + horizontal scroll (kills
 *      wrap-to-2-rows that stole vertical space on phones)
 *   3. Topbar progress: keep visible on mobile (compact bar)
 *   4. Prose well + body typography: clamp() so large screens
 *      use available space and small screens stay comfortable
 *   5. Mark-complete pill: respects safe-area-inset-bottom
 *   6. Curriculum row + dock: 44px touch target on mobile
 *   7. Sidebar drawer + skip-link: respect safe-area on
 *      notched phones (left + bottom insets)
 *   8. prefers-reduced-motion: kill animations for users who
 *      opted out at OS level
 *   9. Wide screens (1600px+): content well sits comfortably
 *      without stretching past the prose-readable width
 * ========================================================= */

:root {
  /* Minimum touch target (Apple HIG / WCAG 2.5.5 Target Size). */
  --sikshya-learn-touch-min: 44px;
}

/* --- 0a. CRITICAL: zero the sidebar width var on mobile ----------------
 * The base CSS var `--sikshya-learn-sidebar-w-current` is set to 400px
 * globally (line 19) and only reset to 0 for hub mode (line 104), desktop
 * collapsed state (line 114), and focus mode. There's no mobile reset, so
 * on mobile lesson/quiz the var stays at 400px and:
 *   - the fixed dock at line 2333 (left: var(...)) shifts 400px right,
 *     pushing prev / next off-screen on every viewport < 768px;
 *   - the content padding-left calc at line 2282 inflates by 400px (the
 *     mobile media-query override at line 2287 only resets `.sikshya-learnMain
 *     > .sikshya-learnContent` — not the var itself).
 * Reset the var to 0 on mobile so the dock spans the full width and the
 * padding calculations behave naturally. */
@media (max-width: 1023px) {
  .sikshya-learning-shell--lesson,
  .sikshya-learning-shell--quiz,
  .sikshya-learning-shell--learn {
    --sikshya-learn-sidebar-w-current: 0px;
  }
}

/* --- 0c. CRITICAL: collapse grid/flex layouts to block on mobile -------
 * `.sikshya-learnLayout` is a CSS grid with `grid-template-rows: auto
 * minmax(0, 1fr)` (line 201-206 + 187-191) and `.sikshya-learning-app`
 * is `display: flex; flex-direction: column` (line 170-171). Both are
 * designed for a viewport-locked desktop two-pane layout. On mobile they
 * keep capping content height to one viewport — even when overflow is
 * visible, the grid 1fr row only takes its share of viewport space. That
 * makes content past the first 1fr's worth essentially unreachable.
 *
 * Forcing `display: block` on mobile turns the whole shell into ordinary
 * document flow: topbar (sticky), then main, then content, then dock
 * (position: fixed). Everything scrolls naturally with body. */
@media (max-width: 1023px) {
  .sikshya-learning-shell--lesson .sikshya-learning-app,
  .sikshya-learning-shell--quiz .sikshya-learning-app,
  .sikshya-learning-shell--learn:not(.sikshya-learning-shell--hub) .sikshya-learning-app,
  .sikshya-learning-shell--lesson .sikshya-learnLayout,
  .sikshya-learning-shell--quiz .sikshya-learnLayout,
  .sikshya-learning-shell--learn:not(.sikshya-learning-shell--hub) .sikshya-learnLayout,
  .sikshya-learning-shell--lesson .sikshya-learnMain,
  .sikshya-learning-shell--quiz .sikshya-learnMain,
  .sikshya-learning-shell--learn:not(.sikshya-learning-shell--hub) .sikshya-learnMain,
  .sikshya-learning-shell--lesson .sikshya-learnContentCol,
  .sikshya-learning-shell--quiz .sikshya-learnContentCol,
  .sikshya-learning-shell--learn:not(.sikshya-learning-shell--hub) .sikshya-learnContentCol {
    display: block !important;
    min-height: auto !important;
    max-height: none !important;
    flex: none !important;
  }
}

/* --- 0d. CRITICAL: restore document scroll on mobile ------------------
 * Two existing rules conspire to clip mobile content:
 *   - Lines 167-176 lock `.sikshya-learning-app` to `max-height: 100dvh;
 *     overflow: hidden` so the desktop curriculum rail can't stretch.
 *   - Lines 179-183 (`.admin-bar.sikshya-learning-shell--X ...`) hard-cap
 *     it to `calc(100dvh - 32px)` for logged-in admins. THIS has 0,3,0
 *     specificity, which beat my earlier 0,2,0 mobile override — meaning
 *     when the WP admin bar is showing, content was still clipped on
 *     mobile.
 * Mobile has no in-flow sidebar (it's an off-canvas drawer), so neither
 * lock makes sense. !important nukes both — mobile uses natural document
 * scroll regardless of admin-bar / future class additions. */
@media (max-width: 1023px) {
  .sikshya-learning-shell--lesson .sikshya-learning-app,
  .sikshya-learning-shell--quiz .sikshya-learning-app,
  .sikshya-learning-shell--learn:not(.sikshya-learning-shell--hub) .sikshya-learning-app {
    max-height: none !important;
    overflow: visible !important;
    min-height: 100dvh;
  }
  .sikshya-learning-shell--lesson .sikshya-learnContentCol > .sikshya-learnContent,
  .sikshya-learning-shell--quiz .sikshya-learnContentCol > .sikshya-learnContent,
  .sikshya-learning-shell--learn:not(.sikshya-learning-shell--hub) .sikshya-learnContentCol > .sikshya-learnContent {
    overflow: visible !important;
    -webkit-overflow-scrolling: auto;
  }
  .sikshya-learnMain {
    overflow: visible !important;
    min-height: 0;
  }
  .sikshya-learnContentCol {
    overflow: visible !important;
  }
  /* Bottom dock (position:fixed, 72px tall) covers the bottom of the
   * scrollable area. We need enough padding-bottom so the last paragraph
   * sits ABOVE the dock — not behind it. */
  
  /* Belt + suspenders: an actual block-level pseudo-element at the end of
   * the lesson section. The padding-bottom above SHOULD be enough on its
   * own, but if some other rule wins the cascade, this physical spacer
   * still guarantees the last paragraph has room above the fixed dock.
   * Pseudo-elements aren't affected by padding overrides. */
  .sikshya-learnContent::after {
    content: '';
    display: block;
    height: calc(var(--sikshya-learn-content-nav-h) + 32px + env(safe-area-inset-bottom, 0px));
    width: 100%;
    pointer-events: none;
  }
  /* Document scroll target: ONLY html scrolls. Setting overflow-y on both
   * html and body creates two scrollports — Safari mobile positions
   * `position: fixed` elements relative to body in that case, not the
   * viewport, which puts the dock below the visible area. Single scroll
   * port on html keeps fixed-positioning anchored to viewport. */
  html.sikshya-learning-shell {
    overflow-x: hidden;
    overflow-y: auto;
    height: auto !important;
    min-height: 100dvh;
  }
  body.sikshya-learning-shell {
    overflow: visible !important;
    height: auto !important;
    min-height: 100dvh;
  }
  /* MAXIMUM-FORCE dock visibility on mobile.
   * Specificity bumped to 0,2,2 (html + body element + 2 classes) so this
   * beats every existing rule. Every property the dock needs to render is
   * forced with !important — display, position, anchor, size, z-index,
   * visibility, opacity, transform, background. If after this CSS file
   * loads the dock STILL isn't visible, the element isn't in the DOM at
   * all (PHP didn't render it) — and the bug is in the template or model. */
  html body.sikshya-learning-shell--lesson .sikshya-learnContentNav,
  html body.sikshya-learning-shell--quiz .sikshya-learnContentNav,
  html body.sikshya-learning-shell--learn:not(.sikshya-learning-shell--hub) .sikshya-learnContentNav {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 72px !important;
    max-height: none !important;
    /* z-index 1100 sits above all in-flow elements (top stacking value in
     * this stylesheet is around 80). Above-1100 reserved for full-screen
     * modals / system overlays. Was previously 999999 — paranoia from the
     * dock-debugging session; not needed now that the dock is a direct
     * child of <body>. */
    z-index: 1100 !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
    background: var(--sikshya-learn-surface) !important;
    border-top: 1px solid var(--sikshya-learn-border) !important;
  }
}

/* --- 1. Tab strip: touch-friendly + horizontal scroll -----------------
 * CSS spec quirk: when one overflow axis is non-visible the OTHER axis
 * cannot remain `visible` — UA promotes it to `auto`/`clip`. The old
 * `overflow-x: auto / overflow-y: visible` therefore silently clipped
 * the buttons' bottom 2px (where the active brand underline lives),
 * making the indicator invisible.
 *
 * Fix: only apply horizontal scrolling on narrow screens where it's
 * actually needed. On desktop / tablet the tabs fit on one row (or wrap
 * via the base rule) and the strip keeps its default `overflow: visible`
 * so the active indicator can paint over the strip's border-bottom.
 */
@media (max-width: 640px) {
  .sikshya-learning-shell--lesson .sikshya-learnContent > .sikshya-tabsSection > .sikshya-tabsBar,
  .sikshya-learning-shell--quiz .sikshya-learnContent > .sikshya-tabsSection > .sikshya-tabsBar {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    /* Space inside the strip so snapped tabs aren't hidden under the
     * edge-fade overlay (the overlay sits on the section, ~28px wide). */
    scroll-padding-inline: 28px;
    scrollbar-width: none;
  }

  /* Scroll-affordance fades on the leading + trailing edges of the
   * tabs strip — signals "more tabs here, scroll to reveal" without
   * needing a visible scrollbar. Positioned on the SECTION (not the
   * scrolling strip itself) so the fades stay pinned to the viewport
   * edges instead of scrolling with the tabs.
   *
   * pointer-events: none keeps them visual-only — touches always pass
   * through to the tabs underneath. */
  .sikshya-learning-shell--lesson .sikshya-learnContent > .sikshya-tabsSection,
  .sikshya-learning-shell--quiz .sikshya-learnContent > .sikshya-tabsSection {
    position: relative;
  }
  .sikshya-learning-shell--lesson .sikshya-learnContent > .sikshya-tabsSection::before,
  .sikshya-learning-shell--lesson .sikshya-learnContent > .sikshya-tabsSection::after,
  .sikshya-learning-shell--quiz .sikshya-learnContent > .sikshya-tabsSection::before,
  .sikshya-learning-shell--quiz .sikshya-learnContent > .sikshya-tabsSection::after {
    content: '';
    position: absolute;
    top: 0;
    /* Cover the strip itself (text band + border-bottom) but stop above
     * the tab panels below. ~46px = 14px text * 1.4 line-height + 11px
     * top + 11px bottom + 2px border. */
    height: 46px;
    width: 28px;
    pointer-events: none;
    z-index: 2;
  }
  .sikshya-learning-shell--lesson .sikshya-learnContent > .sikshya-tabsSection::before,
  .sikshya-learning-shell--quiz .sikshya-learnContent > .sikshya-tabsSection::before {
    left: 0;
    background: linear-gradient(
      to right,
      var(--sikshya-learn-surface, #fff) 35%,
      transparent
    );
  }
  .sikshya-learning-shell--lesson .sikshya-learnContent > .sikshya-tabsSection::after,
  .sikshya-learning-shell--quiz .sikshya-learnContent > .sikshya-tabsSection::after {
    right: 0;
    background: linear-gradient(
      to left,
      var(--sikshya-learn-surface, #fff) 35%,
      transparent
    );
  }
}
.sikshya-learning-shell--lesson .sikshya-learnContent > .sikshya-tabsSection > .sikshya-tabsBar::-webkit-scrollbar,
.sikshya-learning-shell--quiz .sikshya-learnContent > .sikshya-tabsSection > .sikshya-tabsBar::-webkit-scrollbar {
  height: 0;
  display: none;
}
.sikshya-learning-shell--lesson .sikshya-learnContent > .sikshya-tabsSection > .sikshya-tabsBar > .sikshya-tabBtn,
.sikshya-learning-shell--quiz .sikshya-learnContent > .sikshya-tabsSection > .sikshya-tabsBar > .sikshya-tabBtn {
  flex-shrink: 0;
  min-height: var(--sikshya-learn-touch-min);
  scroll-snap-align: start;
  white-space: nowrap;
}

/* --- 2. Topbar progress visible on mobile (compact) -------------------
 * Compact chip in the centre of the topbar; full popover stays available
 * via tap. The desktop layout is unchanged. */
@media (max-width: 640px) {
  .sikshya-learnTopbar__middle {
    display: flex !important;
    flex: 0 1 auto;
    min-width: 0;
  }
  .sikshya-learnHeader__progressBtn {
    padding: 4px 8px;
    gap: 6px;
  }
  .sikshya-learnHeader__progressCount {
    display: none;
  }
  .sikshya-learnHeader__progressBar {
    width: 56px;
  }
}

/* --- 2b. Mobile sticky behaviour: content header stays, topbar scrolls
 *
 * GOAL: on mobile the main learn topbar (Sikshya brand + progress + Exit)
 * scrolls away with the page; the content header panel (lesson / quiz
 * title + pills + Start button) takes over as the persistent sticky
 * header — and ONLY that panel sticks, not the whole content section.
 *
 * WHY THE SECTION-LEVEL STICKY WAS WRONG:
 *   The wrapping `.sikshya-contentSection` actually contains MULTIPLE
 *   sibling panels: the header card, the quiz-intro card ("Ready when
 *   you are"), and the quiz-form panel. Putting sticky on the section
 *   makes ALL of that stick together — the quiz body content gets
 *   glued to the header. Wrong.
 *
 * FIX:
 *   `position: sticky` on `.sikshya-contentPanel--header` only. The
 *   containing block is the section, which IS tall enough (header +
 *   intro + form combined) so sticky has plenty of pin range — the
 *   header stays stuck while the intro + form content scrolls past
 *   underneath it.
 *
 * Topbar stays static so it scrolls away with the page.
 * --------------------------------------------------------------------- */
@media (max-width: 768px) {
  /* Main topbar scrolls away with the page. Use `relative` (NOT
   * `static`) so the topbar's `backdrop-filter` stacking context can
   * be lifted above the sticky content header below — otherwise the
   * progress popover (a descendant) gets visually pinned below the
   * sticky `.sikshya-contentPanel--header` (z-index 44) and the tabs
   * strip, even with its own z-index: 200 inside the topbar context.
   *
   * `position: relative` keeps the element in normal flow (so it scrolls
   * away with the page exactly like `static` would) but allows z-index
   * to apply. `isolation: isolate` forces a clean stacking context
   * separately from `will-change`/`backdrop-filter` so the high z-index
   * is actually honoured. */
  .sikshya-learnTopbar {
    position: relative !important;
    top: auto !important;
    z-index: 9999 !important;
    isolation: isolate;
  }

  /* Compact stats in the progress popover so "Completed / Remaining /
   * Total" all fit in a single row on phones. The base rule sets a
   * 2-column grid (which wraps Total to a second row); the desktop rule
   * promotes to 3 columns only at 1024px+. Force 3 columns at all
   * mobile widths so the stat trio stays on one line. */
  .sikshya-progressPopover__grid {
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 6px !important;
  }
  .sikshya-progressPopover__stat {
    padding: 6px 4px !important;
    text-align: center;
  }
  .sikshya-progressPopover__k {
    font-size: 10px !important;
    letter-spacing: 0.02em;
  }
  .sikshya-progressPopover__v {
    font-size: 14px !important;
  }

  /* Only the header panel sticks — its sibling panels (intro / form)
   * stay in normal flow and scroll past underneath. Several belt-and-
   * suspenders here:
   *   - HTML+body in selector → 0,5,2 specificity (cannot be beaten
   *     by another author rule short of !important on a higher-spec
   *     selector that doesn't exist in this file).
   *   - -webkit-sticky fallback for iOS Safari 12 and below.
   *   - !important on every sticky-relevant property so the cascade
   *     order never matters.
   *   - The parent `.sikshya-contentSection` is FORCED to
   *     `display: block` and `overflow: visible` so neither flex/grid
   *     nor an inherited clip can break sticky's containing block.
   *   - Solid white background so the sticky panel doesn't appear
   *     translucent when scrolled content passes beneath it. */
  /* THE ROOT CAUSE on the lesson page:
   *   `.sikshya-contentPanel--header` lives inside a `.sikshya-contentSection`
   *   that contains ONLY the header panel — the lesson player and tabs
   *   live in SIBLING `.sikshya-contentSection` blocks, not inside the
   *   same one. So `position: sticky` on the panel has ZERO stickable
   *   range: its containing block (the parent section) is the same
   *   height as the panel itself.
   *
   * THE FIX:
   *   Collapse the wrapping section out of the layout tree with
   *   `display: contents`. The header panel then becomes a direct
   *   visual child of `.sikshya-learnContent` (which is tall — it
   *   wraps every section on the page). Sticky now has the full
   *   content column as its stickable range — pins on scroll, stays
   *   pinned all the way through the lesson body / quiz body / tabs.
   *
   *   Works for the quiz page too (the section there wraps header +
   *   intro + form): all three panels become direct children of
   *   learnContent, the header pins as the user scrolls past intro
   *   and form, and the existing tab panels continue to scroll past
   *   underneath as expected.
   *
   *   `display: contents` was a real risk before 2022 (screen readers
   *   stripped roles); modern Chromium / Safari / Firefox all preserve
   *   ARIA correctly on display: contents now, so this is safe.
   *
   *   `:has(> .sikshya-contentPanel--header)` scopes the collapse to
   *   ONLY the section that contains the header — other sections (the
   *   lesson player, the interactive player, the tabs strip wrapper)
   *   keep their normal block layout untouched. */
  body.sikshya-learning-shell--lesson .sikshya-learnContent > .sikshya-contentSection:has(> .sikshya-contentPanel--header),
  body.sikshya-learning-shell--quiz .sikshya-learnContent > .sikshya-contentSection:has(> .sikshya-contentPanel--header),
  body.sikshya-learning-shell--learn:not(.sikshya-learning-shell--hub) .sikshya-learnContent > .sikshya-contentSection:has(> .sikshya-contentPanel--header) {
    display: contents !important;
  }

  /* True sticky on the panel — in flow until the threshold, pinned at
   * top: 0 once scrolled past. */
  body.sikshya-learning-shell--lesson .sikshya-learnContent .sikshya-contentPanel--header,
  body.sikshya-learning-shell--quiz .sikshya-learnContent .sikshya-contentPanel--header,
  body.sikshya-learning-shell--learn:not(.sikshya-learning-shell--hub) .sikshya-learnContent .sikshya-contentPanel--header {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 44 !important;
    background: var(--sikshya-learn-surface) !important;
    box-shadow: 0 4px 12px -8px rgba(15, 23, 42, 0.18);
  }
}

/* Progress popover: never clip on the smallest phones. */
@media (max-width: 380px) {
  .sikshya-progressPopover {
    width: calc(100vw - 24px);
    max-width: 320px;
    right: 12px;
  }
}

/* --- 3. (Removed) Prose-well fluid expansion -------------------------- *
 * Originally clamped `.sikshya-tabPanel .sikshya-contentPanel--plain` to
 * 52-68rem and centered it. That created visible gaps on each side because
 * the sticky header bar (.sikshya-contentPanel--header) uses negative
 * margins to bleed through `.sikshya-learnContent`'s 22px column padding,
 * but the prose panel inside the tab was centered with a clamp width —
 * inconsistent edges. Reverted: panels now fill the column edge-to-edge
 * matching the header bar. The column's own 22px padding gives breathing
 * room on every surface. Long-form readability on ultra-wide screens is
 * still managed by `--sikshya-learn-prose-max` (legacy) applied inside
 * specific prose blocks, not at the panel level. */

/* --- 4. Fluid body typography ----------------------------------------- */
.sikshya-learning-shell {
  font-size: clamp(15px, calc(13px + 0.18vw), 17px);
}
.sikshya-learnHeader__title {
  font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.5rem);
  line-height: 1.3;
}

/* --- 5. Mark-complete pill: safe-area inset (size set in base rule) -- */
.sikshya-learnCompletePill {
  bottom: calc(var(--sikshya-learn-content-nav-h) + 14px + env(safe-area-inset-bottom, 0px));
}
@media (max-width: 640px) {
  .sikshya-learnCompletePill {
    bottom: calc(var(--sikshya-learn-content-nav-h) + 10px + env(safe-area-inset-bottom, 0px));
  }
}

/* --- 6. Curriculum row + dock: 44px touch target ---------------------- */
@media (max-width: 1023px) {
  .sikshya-curriculumOutline__row {
    min-height: var(--sikshya-learn-touch-min);
  }
  .sikshya-learnDock__btn {
    min-height: var(--sikshya-learn-touch-min);
  }
}

/* Dock label tightening on smallest phones (so prev/next still readable). */
@media (max-width: 480px) {
  .sikshya-learnDock__btn {
    padding: 8px 10px;
    gap: 8px;
  }
  .sikshya-learnDock__title {
    font-size: 12px;
  }
  .sikshya-learnDock__kicker {
    font-size: 10px;
  }
}

/* --- 7. Safe-area awareness (notch / home-indicator phones) ----------- */
.sikshya-learnSidebar {
  padding-left: env(safe-area-inset-left, 0px);
}
.sikshya-learnContentNav {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (max-width: 640px) {
  .sikshya-skipLink {
    padding: 12px 16px;
    font-size: var(--sikshya-learn-fs-14);
  }
}

/* --- 8. prefers-reduced-motion: respect OS setting -------------------- */
@media (prefers-reduced-motion: reduce) {
  .sikshya-learnTopbar,
  .sikshya-learnCompletePill,
  .sikshya-learnSidebar,
  .sikshya-tabBtn,
  .sikshya-learnDock__btn,
  .sikshya-iconBtn,
  .sikshya-skipLink {
    transition: none !important;
    animation: none !important;
  }
}

/* --- 9. (Removed) Ultra-wide section padding -------------------------- *
 * Previously added `padding-inline: 32px` on `.sikshya-contentSection` at
 * 1600px+ which created a 32px gap that the header bar's `-22px` negative
 * margin (designed to bleed through the column's 22px padding) couldn't
 * cancel. Reverted: header / tab strip / panels all touch the column
 * padding edges consistently at every viewport width. */

/* --- 10. Hamburger icon swap: ☰ → × when drawer is open --------------- */
/* Both glyphs sit in the same button; CSS toggles which is visible based on
 * the state classes that learn.js puts on the <html> element:
 *   - sikshya-outlineOpen      → mobile drawer is OPEN
 *   - sikshya-sidebarCollapsed → desktop sidebar is collapsed (hidden)
 * Show × when sidebar/drawer is visible (i.e. a close affordance);
 * show ☰ when it's hidden (i.e. an open affordance). */
.sikshya-iconBtn--menuToggle .sikshya-iconBtn__menuOpen,
.sikshya-iconBtn--menuToggle .sikshya-iconBtn__menuClose {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
/* Default state (drawer closed on mobile, sidebar visible on desktop): */
.sikshya-iconBtn--menuToggle .sikshya-iconBtn__menuClose {
  display: none;
}
/* On desktop the sidebar is visible by default, so the hamburger means
 * "click to collapse" — show the X. */
@media (min-width: 1024px) {
  .sikshya-iconBtn--menuToggle .sikshya-iconBtn__menuOpen {
    display: none;
  }
  .sikshya-iconBtn--menuToggle .sikshya-iconBtn__menuClose {
    display: inline-flex;
  }
  /* When the desktop sidebar is collapsed, flip back to ☰ (means "open"). */
  html.sikshya-sidebarCollapsed .sikshya-iconBtn--menuToggle .sikshya-iconBtn__menuOpen {
    display: inline-flex;
  }
  html.sikshya-sidebarCollapsed .sikshya-iconBtn--menuToggle .sikshya-iconBtn__menuClose {
    display: none;
  }
}
/* On mobile, swap when the drawer is open. */
html.sikshya-outlineOpen .sikshya-iconBtn--menuToggle .sikshya-iconBtn__menuOpen {
  display: none;
}
html.sikshya-outlineOpen .sikshya-iconBtn--menuToggle .sikshya-iconBtn__menuClose {
  display: inline-flex;
}

/* --- Mobile drawer ↔ dock overlap fix ---------------------------------
 * On mobile the curriculum drawer is `position: fixed; bottom: 0` and the
 * dock is also `position: fixed; bottom: 0`. They overlap at the bottom,
 * hiding the last curriculum items behind the dock.
 * Padding-bottom on the inner scroll area pushes the list content up so
 * the last items clear the dock. */
@media (max-width: 1023px) {
  .sikshya-learnSidebar__scroll {
    padding-bottom: calc(var(--sikshya-learn-content-nav-h) + 16px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

