@keyframes ck-cta-pulse-key {
  0% { box-shadow: 0 0 0 0 rgba(59,130,246,0.35); transform: translateY(0); }
  70% { box-shadow: 0 0 0 8px rgba(59,130,246,0.0); transform: translateY(-1px); }
  100% { box-shadow: 0 0 0 0 rgba(59,130,246,0.0); transform: translateY(0); }
}
.ck-cta-pulse {
  position: relative;
  will-change: transform, box-shadow;
  animation: ck-cta-pulse-key 2.2s ease-out 0.6s 2;
}



/*
  Global system message card (guided end) — shared look across all chat widgets
  Matches premium style from Lesson 1, but scoped generically so it works everywhere.
  Lesson-specific pages can still override with stronger selectors if needed.
*/
/* System fonts only – removed Poppins for performance and consistency */

/* CwanyKot Brand Colors */
:root {
  --brand-green: #00B050;
  --brand-navy: #003366;
  --brand-white: #FFFFFF;
  --brand-light-green: #00D061;
  --brand-dark-navy: #002244;
  --brand-orange: #F59E0B; /* Amber 500 */
  --brand-orange-rgb: 245, 158, 11;
  --brand-orange-hover: #EC8802;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
}

/* Global Styles */
* {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, system-ui, sans-serif;
}

/* Ensure predictable sizing and prevent sideways scroll on mobile */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: hidden; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, system-ui, sans-serif;
  line-height: 1.6;
}

/* Improved readability for the AI explanation panel on lesson-01, slide 2 */
.ck-reading-comfort {
  line-height: 1.9; /* taller lines for easier scanning */
}
.ck-reading-comfort p {
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}
.ck-reading-comfort ul,
.ck-reading-comfort ol {
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}
.ck-reading-comfort li {
  margin-top: 0.35rem;
  margin-bottom: 0.35rem;
}

/* Accessible font scaling (A A A controls) */
/* Increased by ~20% across all scales for course readability */
html.ck-font-1 { font-size: 120%; }
html.ck-font-2 { font-size: 135%; } /* ~21.6px base */
html.ck-font-3 { font-size: 150%; } /* ~24px base for low vision */

/* Font controls in course header */
.ck-font-controls { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); border-radius: 9999px; padding: 4px 6px; }
.ck-font-btn { font-family: inherit; line-height: 1; background: transparent; border: none; color: rgba(255,255,255,0.9); cursor: pointer; padding: 2px 6px; border-radius: 6px; opacity: .85; transition: all .2s ease; }
.ck-font-btn:hover { opacity: 1; transform: translateY(-1px); }
.ck-font-btn-s { font-size: 0.8rem; }
.ck-font-btn-m { font-size: 1rem; }
.ck-font-btn-l { font-size: 1.2rem; font-weight: 700; }
.ck-font-btn.active { background: rgba(255,255,255,0.18); }

/* Brand Buttons */
.btn-primary {
  background-color: var(--brand-green);
  color: var(--brand-white);
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.btn-primary:hover {
  background-color: var(--brand-light-green);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 176, 80, 0.25);
}

.btn-secondary {
  background-color: var(--brand-navy);
  color: var(--brand-white);
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 6px;
  border: 2px solid var(--brand-navy);
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background-color: transparent;
  color: var(--brand-navy);
}

/* Miauczki UI */
.ck-miauczki-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 9999px;
  border: 1px solid var(--gray-200);
  background: linear-gradient(180deg, #ffffff, #f9fafb);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 0 0 4px rgba(0,176,80,0.06);
}
.btn-miauczki {
  background: linear-gradient(135deg, #10b981, #00b050);
  color: #fff;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
  box-shadow: 0 8px 20px rgba(16,185,129,0.22);
}
.btn-miauczki:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(16,185,129,0.26); }
.btn-miauczki:active { transform: translateY(0); filter: brightness(0.98); }

/* Icon polish */
.icon-plus { display: inline-block; color: #ffffff; opacity: .95; transition: transform .18s ease, opacity .18s ease; }
.btn-miauczki:hover .icon-plus { transform: scale(1.05); opacity: 1; }

/* Enhance Miauczki pill for readability and visual weight */
.ck-miauczki-pill {
  box-shadow: 0 2px 8px rgba(0,0,0,0.045), 0 0 0 5px rgba(0,176,80,0.06);
  padding: 6px 10px;
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.ck-miauczki-pill span[data-el="credits-pill"] { font-size: 13px; letter-spacing: .2px; }

/* Click affordance and accessibility when pill acts as a button */
.ck-miauczki-pill:hover { background: linear-gradient(180deg, #ffffff, #f3f4f6); box-shadow: 0 3px 10px rgba(0,0,0,0.06), 0 0 0 5px rgba(0,176,80,0.08); }
.ck-miauczki-pill[role="button"]:focus-visible { outline: 2px solid rgba(0,176,80,0.45); outline-offset: 2px; }

/* Settings: Credits history polish */
#ck-settings-modal #ck-credits-wrap { font-variant-numeric: tabular-nums; }
#ck-settings-modal #ck-credits-history .border { transition: box-shadow .15s ease, border-color .15s ease; }
#ck-settings-modal #ck-credits-history .border:hover { border-color: var(--brand-orange); box-shadow: 0 2px 8px rgba(var(--brand-orange-rgb), .12); }
#ck-settings-modal #ck-credits-more[disabled] { opacity: .6; cursor: not-allowed; }

.btn-outline {
  background-color: transparent;
  color: var(--brand-navy);
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 6px;
  border: 2px solid var(--brand-navy);
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-outline:hover {
  background-color: var(--brand-navy);
  color: var(--brand-white);
}

/* Chat bubble micro-animations */
/* moved to chat-widget.css */

/* Alert Messages */
.alert-success {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.alert-error {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.alert-warning {
  background-color: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #856404;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.alert-info {
  background-color: #cce7f0;
  border: 1px solid #b6d7e8;
  color: #0c5460;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
}

/* Form Elements */
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 0.25rem;
}

.form-input {
  appearance: none;
  border: 1px solid var(--gray-300);
  border-radius: 0.375rem;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  width: 100%;
  background-color: var(--brand-white);
  color: var(--gray-900);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-input:focus {
  outline: none;
  border-color: var(--brand-green);
  box-shadow: 0 0 0 3px rgba(0, 176, 80, 0.1);
}

.form-input::placeholder {
  color: var(--gray-400);
}

/* Data Tables */
.data-table {
  min-width: 100%;
  border-collapse: collapse;
  background-color: var(--brand-white);
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.data-table th {
  background-color: var(--gray-50);
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--gray-200);
}

.data-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--gray-200);
  font-size: 0.875rem;
  color: var(--gray-900);
  vertical-align: middle;
}

.data-table tbody tr:hover {
  background-color: var(--gray-50);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* Hero Section */
.hero-gradient {
  background: linear-gradient(135deg, var(--brand-white) 0%, #f0f9f4 100%);
}

/* Feature Cards */
/* removed: .feature-card, .feature-icon (unused) */

/* Progress Bar */
.progress-container {
  background-color: var(--gray-200);
  border-radius: 1rem;
  height: 0.5rem;
  overflow: hidden;
}

.progress-fill {
  background: linear-gradient(90deg, var(--brand-green) 0%, var(--brand-light-green) 100%);
  height: 100%;
  border-radius: 1rem;
  transition: width 0.3s ease;
}

/* Course Curriculum */
/* removed: .lesson-item (+hover) (unused) */

.lesson-number {
  background-color: var(--brand-green);
  color: var(--brand-white);
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
}

/* removed: .testimonial-card (unused) */

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--gray-200);
  padding: 1.5rem 0;
}

.faq-question {
  font-weight: 600;
  color: var(--brand-navy);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-answer {
  color: var(--gray-600);
  margin-top: 0.5rem;
  line-height: 1.6;
}

/* removed: .guarantee-strip (unused) */

/* removed: .admin-nav and nested link styles (unused) */

.admin-card {
  background: var(--brand-white);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--gray-200);
  overflow: hidden; /* clip any child overflow on small screens */
}

/* Admin DnD helpers */
.opacity-60 { opacity: .6; }
.ck-dnd-over { outline: 2px dashed rgba(17,24,39,.25); outline-offset: 2px; transition: outline-color .15s ease; }

/* Generic code editor style used in admin */
.code-editor { font-family: 'Courier New', monospace; border: 1px solid #d1d5db; border-radius: 0.5rem; padding: 0.75rem; width: 100%; min-height: 60vh; background-color: #f9fafb; }

/* Small admin preview box */
.lesson-preview { max-height: 200px; overflow-y: auto; border: 1px solid #e5e7eb; border-radius: 0.375rem; padding: 1rem; background-color: #f9fafb; }

/* ========= Ultra-responsive helpers for very narrow screens ========= */
@media (max-width: 380px) {
  /* Reduce padding so cards fit on ultra-small devices */
  .admin-card { padding: 1rem; border-radius: 10px; }
  .btn-primary, .btn-secondary, .btn-outline { padding: 0.6rem 0.9rem; font-size: 0.82rem; min-height: 40px; }
  .brand-title { font-size: 1rem; }
  .logo-image { height: 40px; margin-right: 8px; }
}

/* Grid that progressively wraps without overflow */
.ck-grid-responsive {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
@media (max-width: 1024px) { .ck-grid-responsive { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .ck-grid-responsive { grid-template-columns: 1fr; } }
@media (max-width: 360px)  { .ck-grid-responsive { gap: 0.75rem; } }

/* Auto-fit variant: tiles flow to as many columns as fit */
.ck-grid-autofit {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
@media (max-width: 380px) { .ck-grid-autofit { grid-template-columns: 1fr; gap: 0.875rem; } }

/* Flex rows that can break neatly onto new lines */
.ck-row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ck-row-wrap > * { min-width: 0; }

/* Lessons mini-tiles grid */
.ck-grid-lessons { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 1rem; }
@media (max-width: 380px) { .ck-grid-lessons { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 0.75rem; } }

/* Courses page specific tweaks */
.courses-header h1 { overflow-wrap: anywhere; }
@media (max-width: 420px) {
  .courses-header .text-sm { font-size: 0.8rem; }
}
.courses-card-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Prevent interior elements from stretching container wider than viewport */
.admin-card *, .admin-content * { min-width: 0; max-width: 100%; }

/* Stat card layout: icon then text; wraps gracefully at small widths */
.ck-stat { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; }
@media (max-width: 360px) { .ck-stat { grid-template-columns: 1fr; gap: 6px; } }

/* Tighten text sizes on tiny screens for elegance */
@media (max-width: 360px) {
  .text-2xl { font-size: 1.25rem; }
  .text-lg { font-size: 1rem; }
  .text-sm { font-size: 0.8rem; }
}

/* Admin Panel Wide Layout */
.admin-users-table {
  min-width: 1020px;
}

/* Slimmer admin users table spacing */
.admin-users-table th,
.admin-users-table td {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

/* Make header slightly more compact */
.admin-users-table thead th {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

/* Narrow icon columns visually */
.admin-users-table .icon-badge {
  margin: 0 auto;
}

/* Admin font scale pills */
.ck-font-badges { white-space: nowrap; }
.ck-font-pill {
  border: 1px solid var(--gray-300);
  background: #fff;
  color: var(--gray-700);
  padding: 2px 6px;
  border-radius: 6px;
  line-height: 1;
  transition: all .15s ease-in-out;
}
.ck-font-pill:hover { background: var(--gray-50); }
.ck-font-pill.active {
  border-color: var(--brand-green);
  background: rgba(0,176,80,.08);
  color: var(--brand-navy);
  box-shadow: 0 0 0 2px rgba(0,176,80,.1) inset;
}

/* Admin Wide Container on Large Screens */
@media (min-width: 1400px) {
  .admin-wide-container {
    max-width: 1400px;
  }
}

@media (min-width: 1600px) {
  .admin-wide-container {
    max-width: 1600px;
  }
}

/* Compact Action Buttons for Admin Tables */
.compact-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  border: 1px solid;
  transition: all 0.2s ease;
  font-size: 12px;
}

.compact-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Icon-only badges for table columns */
.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 500;
  transition: all 0.15s ease-in-out;
}

.icon-badge:hover {
  transform: scale(1.05);
}

/* Course Page */
.course-header {
  background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-dark-navy) 100%);
  color: var(--brand-white);
}
/* Mobile-first layout polish for course header
   - Hide header roadmap on mobile per spec (desktop-only)
   - 2-row grid on small screens: [title | controls] / [roadmap full width]
   - Prevent overlaps and ensure airy spacing */
@media (max-width: 640px) {
  .course-header .max-w-4xl > .flex {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 8px 12px;
  }
  .course-header .max-w-4xl > .flex > :first-child {
    grid-column: 1 / 2;
    grid-row: 1;
    min-width: 0;
  }
  /* Hide roadmap on mobile for clean header like Step 1 */
  .course-header #ck-roadmap-header { display: none !important; }
  .course-header .max-w-4xl > .flex > :last-child {
    grid-column: 2 / 3;
    grid-row: 1;
    justify-self: end;
  }
  /* Subtitle: allow elegant two-line wrap on tiny screens */
  .course-header .chapter-title { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; }
  /* AAA font controls – refined glass look on dark header */
  .course-header .ck-font-controls {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.20);
    padding: 3px 8px;
    gap: 4px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
    backdrop-filter: blur(6px);
  }
  .course-header .ck-font-btn { color: rgba(255,255,255,0.95); }
  .course-header .ck-font-btn.active {
    background: rgba(255,255,255,0.22);
  }
}

.lesson-navigation {
  background: var(--brand-white);
  border-top: 1px solid var(--gray-200);
  padding: 1rem;
}

/* Unified slide sub-navigation under course header */
.lesson-subnav {
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  position: static; /* no sticky */
  z-index: 1;
}

/* Bottom variant (non-sticky), rendered above footer */
.lesson-subnav--bottom {
  position: relative;
  z-index: 10;
  border-bottom: none;
  border-top: 1px solid var(--gray-200);
  background: var(--gray-50);
  overflow-anchor: none; /* prevent scroll anchoring at bottom bar */
}

/* Legacy absolute-centered counter removed; now inline next to prev button */

/* Subtle tooltip (used for prev buttons) */
.ck-tooltip { position: relative; }
.ck-tooltip[data-ck-tooltip]:hover::after,
.ck-tooltip[data-ck-tooltip]:focus::after {
  content: attr(data-ck-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(17, 24, 39, 0.92); /* near brand navy */
  color: #fff;
  font-size: 0.95rem; /* scales with root size */
  line-height: 1.1;
  padding: 0.35em 0.55em;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 1200;
  pointer-events: none;
}
.ck-tooltip[data-ck-tooltip]:hover::before,
.ck-tooltip[data-ck-tooltip]:focus::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: rgba(17,24,39,0.92) transparent transparent transparent;
  z-index: 1200;
}

/* Top slide subnav: show tooltip BELOW button (only under header) */
.lesson-subnav .ck-tooltip[data-ck-tooltip]:hover::after,
.lesson-subnav .ck-tooltip[data-ck-tooltip]:focus::after {
  top: calc(100% + 6px);
  bottom: auto;
}
.lesson-subnav .ck-tooltip[data-ck-tooltip]:hover::before,
.lesson-subnav .ck-tooltip[data-ck-tooltip]:focus::before {
  top: calc(100% + 2px);
  bottom: auto;
  border-color: transparent transparent rgba(17,24,39,0.92) transparent;
}

/* Separator dot between prev button and counter (bottom nav) */
.ck-sep-dot {
  display: inline-block;
  margin: 0 10px; /* widened spacing between prev and counter */
  color: var(--gray-400);
  line-height: 1;
  user-select: none;
}
/* Top subnav: neutralize legacy negative offset; spacing is handled by separator */
.lesson-subnav #slide-title { margin-left: 0; }
/* Subtle forward hint badge (right-bottom corner of Next button) */
.ck-next-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.32em 0.8em;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  color: var(--brand-navy);
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 9999px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  /* Force single-line with graceful truncation across all breakpoints */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: .92;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}
/* Make the right-side primary button slightly bigger */
.lesson-subnav--bottom .ck-bottom-actions .btn-primary {
  padding: 0.7em 1.3em;
  font-size: 1rem;
  border-radius: 10px;
  border: none;
  box-shadow: none;
  outline: 1px solid transparent; /* helps avoid rendering seams */
  background-image: none;
  background-clip: padding-box; /* avoid subpixel seam on rounded edges */
  transform: none !important;
  /* Avoid forcing will-change; let browser decide */
  backface-visibility: hidden;
  overflow: hidden; /* clip any subpixel artifacts */
}

/* Scale prev button with font as well */
.lesson-subnav--bottom .btn-outline {
  padding: 0.55em 1.1em;
  font-size: 0.95rem;
  border-radius: 8px;
}

/* Wrap to allow badge to overlap the green button */
.ck-next-wrapper { position: relative; display: inline-block; }
.ck-next-wrapper .ck-next-hint {
  position: absolute;
  top: -22px;
  right: -10px;
  background: #ffffff;
  border-color: var(--gray-200);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06), 0 0 0 0.1875rem rgba(0,176,80,.08);
  z-index: 2;
  cursor: pointer;
}
.ck-next-wrapper:hover .ck-next-hint {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.08), 0 0 0 0.25rem rgba(0,176,80,.10);
  opacity: 1;
}

/* Stabilize footer next button and hint during font-size changes */
.lesson-subnav--bottom .ck-next-wrapper .ck-next-hint {
  backface-visibility: hidden;
}

/* Force visible state to prevent transient hiding during font reflow */
.lesson-subnav--bottom .ck-bottom-actions,
.lesson-subnav--bottom .btn-primary,
.lesson-subnav--bottom .ck-next-wrapper .ck-next-hint { visibility: visible !important; opacity: 1 !important; }

/* No sticky bottom subnav → no extra padding needed */
@media (max-width: 420px) {
  .ck-next-hint {
    padding: 0.22em 0.56em;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    opacity: .95;
  }
  .ck-next-wrapper .ck-next-hint {
    top: -16px;
    right: -8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06), 0 0 0 0.16rem rgba(0,176,80,.10);
  }

  /* Mobile: show full next-title above the button, single line within viewport */
  .lesson-subnav--bottom .ck-next-wrapper {
    position: static;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    width: 100%;
  }
  .lesson-subnav--bottom .ck-next-wrapper .ck-next-hint {
    position: static;
    right: auto;
    top: auto;
    transform: none;
    margin: 0 0 8px 0;
    max-width: calc(100vw - 16px);
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
  }

  /* Mirror hover state when .hover class is toggled via JS */
}

/* Mirror hover visuals for programmatic .hover state */
.btn-primary.hover {
  background-color: var(--brand-light-green);
  box-shadow: 0 4px 12px rgba(0, 176, 80, 0.25);
}

/* Compact sizing for slide sub-navigation (keeps header readable but slimmer) */
.lesson-subnav { --subnav-btn-vpad: 6px; --subnav-btn-hpad: 14px; }
.lesson-subnav .lesson-subnav-row { padding-top: 6px; padding-bottom: 6px; }
.lesson-subnav .btn-primary,
.lesson-subnav .btn-outline,
.lesson-subnav .btn-secondary {
  padding: var(--subnav-btn-vpad) var(--subnav-btn-hpad);
  font-size: 14px;
  border-radius: 6px;
}
.lesson-subnav #slide-counter { font-size: 0.9rem; }
.lesson-subnav #slide-title { font-size: 0.85rem; line-height: 1.2; }
.lesson-subnav .ck-chip { padding: 4px 10px; font-size: 10px; }

/* Force-hide legacy chapter badge that may be injected by cached JS on some devices */
.lesson-subnav #ck-chapter-badge,
.lesson-subnav .ck-chapter-badge { display: none !important; }

/* iOS/Safari safety: never collapse or hide the prev button on tiny screens */
.lesson-subnav #prev-slide {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  flex: 0 0 auto;
  min-width: 2.25em; /* keep a tappable hit area even when very tight */
}

/* Mobile-first refinements for step sub-navigation (top) */
@media (max-width: 640px) {
  /* Use grid for perfect alignment with three zones: prev/counter · filler · actions */
  .lesson-subnav .lesson-subnav-row {
    display: grid !important;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px;
  }
  /* Push the actions group (with Next button) to the right screen edge */
  .lesson-subnav .lesson-subnav-row > div:last-child {
    justify-self: end;
    margin-right: 0 !important;
    padding-right: 0 !important;
  }
  /* Tidy separator dot spacing/visibility on tight viewports */
  .lesson-subnav .ck-sep-dot { margin: 0 6px; opacity: .65; }
  /* Hide middle title on mobile – already truncated by markup, enforce consistently */
  .lesson-subnav #slide-title { display: none !important; }
  /* Hide the extra separator after counter when title is hidden on small screens */
  .lesson-subnav .ck-sep-title { display: none !important; }
}

/* Generic chips (used in lesson-01 Slide 6/7 model specs) */
.ck-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-navy);
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 9999px;
  white-space: nowrap;
}
.ck-example-text { font-size: clamp(0.95rem, 1.15rem + 0.2vw, 1.15rem); }
.ck-example-text .ck-example-keywords { margin-top: 0.85rem; margin-bottom: 0.35rem; font-weight: 800; color: var(--brand-navy); letter-spacing: .01em; }
.ck-keywords-cloud { display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: center; justify-content: flex-start; padding: 12px 6px 6px; }
/* Emphasis variant for key words (used in example + synced in animation) */
.ck-chip--emph {
  font-size: 16px;
  font-weight: 800;
  padding: 8px 16px;
  background: linear-gradient(135deg, #ffffff 0%, #fff7ed 100%);
  border-color: rgba(245,158,11,0.35);
  box-shadow: 0 6px 16px rgba(245,158,11,0.12), 0 0 0 2px rgba(245,158,11,0.10);
}
@media (max-width: 480px) {
  .ck-chip--emph { font-size: 15px; padding: 7px 12px; }
}
.ck-chip--navy { background: rgba(0,51,102,0.06); border-color: rgba(0,51,102,0.18); }
.ck-chip--green { background: rgba(0,176,80,0.10); border-color: rgba(0,176,80,0.25); color: var(--brand-navy); }
.ck-chip--orange { background: rgba(245,158,11,0.10); border-color: rgba(245,158,11,0.25); color: var(--brand-navy); }
.ck-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: currentColor;
  display: inline-block;
}

/* Compact model picker row */
.ck-model-picker { display: flex; flex-wrap: wrap; gap: 8px; }

/* Spec rows under each model card (Slide 6) */
.ck-spec-row { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 520px) { .ck-spec-row { grid-template-columns: 1fr 1fr; } }
.ck-spec-block { background: #fff; border: 1px solid var(--gray-200); border-radius: 10px; padding: 8px 10px; }
.ck-spec-label { font-size: 11px; font-weight: 700; color: var(--gray-600); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .02em; }
.ck-spec-chips { display: flex; flex-wrap: wrap; gap: 6px; }

@media (min-width: 768px) {
  .lesson-subnav .lesson-subnav-row { padding-top: 8px; padding-bottom: 8px; }
  .lesson-subnav .btn-primary,
  .lesson-subnav .btn-outline,
  .lesson-subnav .btn-secondary { font-size: 15px; }
}

/* Override global mobile button sizing inside subnav to stay compact yet tappable */
@media (max-width: 768px) {
  .lesson-subnav .btn-primary,
  .lesson-subnav .btn-outline,
  .lesson-subnav .btn-secondary {
    min-height: 38px;
    padding: 6px 12px;
    font-size: 0.85rem;
  }
}

/* Inline info badge used in intro paragraph */
.ck-inline-info {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(59,130,246,.06), rgba(59,130,246,.04));
  border: 1px solid rgba(59,130,246,.22);
  color: #0f172a;
  line-height: 1.45;
  box-shadow: 0 2px 8px rgba(15,23,42,.04);
  vertical-align: middle;
  margin-top: 6px;
  margin-bottom: 6px;
}
.ck-inline-info .ck-i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 9999px;
  color: #2563eb;
  transition: transform .18s ease, box-shadow .18s ease;
}
.ck-inline-info .ck-i-svg {
  width: 100%;
  height: 100%;
  color: #2563eb; /* icon stroke/fill color */
  transition: color .18s ease, filter .18s ease;
}

/* Larger info variant for emphasis panels */
.ck-inline-info--lg { padding: 16px 18px; border-radius: 16px; }
.ck-inline-info--lg .ck-i { width: 64px; height: 64px; }
@media (min-width: 640px) { .ck-inline-info--lg .ck-i { width: 72px; height: 72px; } }
@media (max-width: 420px) {
  .ck-inline-info--lg { padding: 12px 16px; border-radius: 14px; }
  .ck-inline-info--lg .ck-i { width: 56px; height: 56px; }
}

/* Soft hero intro panel (used for friendly notices like "Hej, jeśli czujesz się zagubiony…")
   and unified step background for top sections across slides */
.ck-hero-intro,
.ck-step-background {
  background: linear-gradient(180deg, rgba(0, 51, 102, 0.055), rgba(0, 51, 102, 0.025)); /* subtle navy tint matching header */
  border: 1px solid rgba(0, 51, 102, 0.12);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

/* "JESTEŚ TUTAJ" badge in chapter plan */
.ck-here-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--brand-green);
  background: rgba(0,176,80,.10);
  border: 1px solid rgba(0,176,80,.28);
  border-radius: 9999px;
  text-transform: uppercase;
  margin-left: 6px;
  white-space: nowrap;
}
@media (min-width: 640px) { .ck-here-badge { font-size: 10px; padding: 3px 8px; } }

/* Conclusion panel (Maurycy) */
.ck-conclusion-panel {
  background: linear-gradient(180deg, rgba(0,176,80,.06), rgba(0,176,80,.03));
  border: 1px solid rgba(0,176,80,.20);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 12px 0 14px 0;
  overflow: visible; /* allow avatar slight overlap */
}
.ck-conclusion-panel .ck-conclusion-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(0,176,80,.25);
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  font-size: 18px;
}

/* Modern avatar for Maurycy in conclusion panel */
.ck-conclusion-panel .ck-avatar {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #fff;
  border: 2px solid rgba(0,176,80,.28);
  box-shadow: 0 8px 20px rgba(0,176,80,.18);
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: -6px;
  margin-top: -6px;
}
.ck-conclusion-panel .ck-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 480px) { .ck-conclusion-panel .ck-avatar { width: 44px; height: 44px; border-radius: 12px; margin-left: -4px; margin-top: -4px; } }

@media (max-width: 420px) {
  .ck-inline-info { gap: 10px; padding: 10px 14px; border-radius: 12px; }
  .ck-inline-info .ck-i { width: 44px; height: 44px; }
}

/* Ensure main content doesn't overlap sticky subnav at top on anchors/scrolls */
/* Increased to reflect taller header/subnav after global font bump */
main { scroll-margin-top: 80px; }

/* Header roadmap layout (minimal, consistent) */
.ck-header-navgrid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}
.ck-header-btn {
  justify-self: start;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.9);
  transition: all .2s ease;
}
.ck-header-btn:hover { background: rgba(255,255,255,0.12); transform: translateY(-1px); }
.ck-header-btn-ghost { backdrop-filter: blur(6px); }
.ck-header-navgrid .ck-roadmap { justify-self: center; }
.ck-roadmap--dark .ck-roadmap-dot { background: rgba(255,255,255,0.55); }
.ck-roadmap--dark .ck-roadmap-step.is-completed .ck-roadmap-dot { background: var(--brand-orange); opacity: .98; }
.ck-roadmap--dark .ck-roadmap-dot::after { background: rgba(255,255,255,0.25); }
.ck-roadmap--dark .ck-roadmap-step.is-active .ck-roadmap-label { color: rgba(255,255,255,0.96); }
.course-header .ck-roadmap { margin-left: 8px; margin-right: 8px; }
/* Adjust tooltip colors in dark header for readability */
.course-header .ck-roadmap .ck-roadmap-step::before {
  background: rgba(0,0,0,0.85);
}

/* Base roadmap styles (horizontal, compact, pretty dots) */
.ck-roadmap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  line-height: 1;
}
.ck-roadmap-step {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ck-roadmap-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.ck-roadmap-dot {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  background: var(--gray-300);
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.ck-roadmap-dot::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 9999px;
  background: rgba(0,0,0,0.06);
}
.ck-roadmap-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .2px;
}
.ck-roadmap-step.is-active .ck-roadmap-dot {
  transform: scale(1.08);
}
.ck-roadmap-link:hover .ck-roadmap-dot {
  transform: scale(1.06);
}
/* Tooltip for steps */
.ck-roadmap-step::before {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  bottom: 100%;
  padding: 4px 8px;
  border-radius: 6px;
  color: #fff;
  background: rgba(17,24,39,.9);
  font-size: 11px;
  line-height: 1.15;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity .15s ease;
}
.ck-roadmap-step:hover::before { opacity: 1; }

/* Scale roadmap with font-size root changes from font controls */
html.ck-font-2 .ck-roadmap { font-size: 1.125rem; }
html.ck-font-3 .ck-roadmap { font-size: 1.25rem; }
.ck-header-controls-slot { margin-top: 8px; }

/* Header compacting for roadmap-under-title layout */
.course-header .chapter-title { max-width: 48rem; }
/* Orange chapter heading */
.course-header .chapter-heading { color: var(--brand-orange); }
.course-header .chapter-kicker { white-space: nowrap; line-height: 1.1; }
@media (max-width: 640px) {
  .course-header .chapter-kicker { font-size: 0.75rem; }
}
@media (max-width: 640px) {
  .course-header .chapter-title { font-size: 0.95rem; }
}

/* Ensure chapter subtitle fits on a single line and remains fully visible */
.course-header .chapter-title {
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  font-size: clamp(0.9rem, 2.2vw, 1rem);
  line-height: 1.25;
}

@media (max-width: 640px) {
  .course-header .chapter-title {
    font-size: clamp(0.8rem, 3.8vw, 0.95rem);
  }
}

/* (Reverted) Keep chapter heading on mobile; header remains unchanged */

/* Glow bulb (💡) toggle — reusable across course */
.ck-bulb {
  position: relative;
  display: inline-block;
  line-height: 1;
  transition: transform .25s ease;
  cursor: pointer;
}
.ck-bulb::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 9999px;
  background: radial-gradient(circle, rgba(var(--brand-orange-rgb),0) 0%, rgba(var(--brand-orange-rgb),0) 60%, rgba(var(--brand-orange-rgb),0) 100%);
  opacity: 0;
  transition: opacity .25s ease, transform .25s ease, background .25s ease;
  pointer-events: none;
  filter: blur(0px);
}
.ck-bulb-emoji { transition: text-shadow .25s ease; }
.ck-bulb.is-on { transform: scale(1.03); }
.ck-bulb.is-on::after {
  opacity: 1;
  background: radial-gradient(circle, rgba(var(--brand-orange-rgb),.55) 0%, rgba(var(--brand-orange-rgb),.35) 35%, rgba(var(--brand-orange-rgb),0) 70%);
  filter: blur(4px);
}
.ck-bulb.is-on .ck-bulb-emoji {
  text-shadow: 0 0 8px rgba(var(--brand-orange-rgb), .85), 0 0 18px rgba(var(--brand-orange-rgb), .55);
}

/* Optional short label clickable area next to bulb */
.ck-bulb-label {
  cursor: pointer;
  user-select: none;
}

@media (max-width: 640px) {
  .ck-header-btn { font-size: 11px; padding: 6px 8px; }
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.125rem;
  }
  
  .feature-card {
    padding: 1.5rem;
  }

  .data-table th,
  .data-table td {
    padding: 0.5rem 0.75rem;
  }
}

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

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.spinner {
  border: 2px solid var(--gray-200);
  border-top: 2px solid var(--brand-green);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  display: inline-block;
  margin-right: 8px;
}

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

/* Utility Classes */
.text-brand-green { color: var(--brand-green); }
.text-brand-navy { color: var(--brand-navy); }
.bg-brand-green { background-color: var(--brand-green); }
.bg-brand-navy { background-color: var(--brand-navy); }
.text-brand-orange { color: var(--brand-orange); }
.bg-brand-orange { background-color: var(--brand-orange); }
.border-brand-orange { border-color: var(--brand-orange); }
.border-brand-green { border-color: var(--brand-green); } 

/* ==========================================
   FACTS SECTION (3 ciekawostki o AI) — unified hover header highlight
   ========================================== */
/* Section title stays static; hover heading coloring removed */

/* ==========================================
   STICKY VIDEO PLAYER
   ========================================== */

.video-container {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9; /* Replace Tailwind aspect-video */
}

 

 

 



 

 

 

 

 

 

/* ==========================================
   PREDICT DEMO (Lesson 1 – Slide 3)
   ========================================== */
.ck-predict-demo {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 60%, #eefcf4 100%);
  border: 1px dashed rgba(0,176,80,0.2);
  border-radius: 12px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  max-width: 100%;
}
.ck-demo-overlay {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  backdrop-filter: blur(10px) saturate(110%);
  background: radial-gradient(ellipse at 50% 40%, rgba(255,255,255,0.85), rgba(255,255,255,0.65) 60%, rgba(255,255,255,0.35) 100%);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05);
  transition: opacity 0.4s ease, transform 0.4s ease;
  opacity: 1;
  transform: scale(1.01);
}
.ck-demo-overlay.is-hiding { opacity: 0; transform: scale(1); pointer-events: none; }
.ck-demo-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 9999px;
  border: 1px solid rgba(0,176,80,0.25);
  background: linear-gradient(135deg, #10b981, #00b050);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 30px rgba(0,176,80,0.25), 0 0 0 6px rgba(0,176,80,0.10);
  transition: transform .2s ease, box-shadow .2s ease;
}
.ck-demo-cta:hover { transform: translateY(-1px); box-shadow: 0 12px 36px rgba(0,176,80,0.3), 0 0 0 8px rgba(0,176,80,0.12); }
.ck-demo-cta:active { transform: translateY(0); }
/* Subtle replay link under the badge */
.ck-replay-subtle {
  background: transparent;
  border: none;
  color: #6b7280;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  transition: color .2s ease, opacity .3s ease;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 4px 6px;
}
.ck-replay-subtle:hover { color: #374151; }
.ck-replay-subtle:focus { outline: 2px solid rgba(0,176,80,.25); outline-offset: 2px; }

.ck-sentence {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 8px;
  font-size: clamp(0.83rem, 1.9vw, 0.96rem);
  color: var(--brand-navy);
  font-weight: 700;
  position: relative;
  padding: 12px 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 6px 16px rgba(0,0,0,0.05);
  margin-bottom: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-align: center;
}
.ck-sentence #ck-target-slot {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
  padding: 8px 16px;
  min-width: 100px;
  min-height: 36px;
  line-height: 1;
  box-sizing: border-box;
  transition: none; /* avoid visual jump at transfer */
}
.ck-sentence #ck-target-slot.ck-chip--ghost {
  /* Keep exact box size while showing ghost styling */
  border-style: dashed;
  border-color: var(--gray-300);
  background: #fff;
  color: #6b7280;
  box-shadow: none;
}
.ck-sentence > * { flex: 0 0 auto; }

.ck-predict-list {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 18px;
  position: relative;
  margin-top: 18px;
  margin-bottom: 6px;
  padding-top: 14px;
  padding-bottom: 12px;
  border-top: 1px solid rgba(0,0,0,0.06);
}
.ck-predict-rail { position: relative; height: 100%; min-height: 56px; }
.ck-predict-rows { display: flex; flex-direction: column; gap: 18px; }

@media (max-width: 480px) {
  .ck-sentence { font-size: clamp(0.72rem, 3.2vw, 0.86rem); gap: 6px; padding: 8px 12px; white-space: normal; flex-wrap: wrap; word-break: break-word; }
  .ck-sentence .ck-chip { padding: 4px 10px; font-size: 10px; }
  .ck-sentence .ck-chip--ghost { min-width: 44px; }
  .ck-predict-list { grid-template-columns: 28px 1fr; gap: 10px; }
  .ck-predict-row { min-height: auto; gap: 6px; align-items: flex-start; justify-content: center; flex-wrap: nowrap; }
  .ck-arrow { font-size: 1.25rem; height: 1.25rem; }
  .ck-sentence #ck-target-slot { font-size: 15px; padding: 7px 12px; min-width: 92px; min-height: 34px; }
  /* Stack probability below the chip for better visibility on narrow iPhones */
  .ck-predict-row { flex-direction: column; }
  .ck-predict-row .ck-prob { width: 100%; text-align: left; margin-top: 2px; font-size: 12px; transform: translateX(0); }
}

/* Ensure grid children can shrink and not overflow on mobile */
@media (max-width: 640px) {
  .ck-readable .grid > * { min-width: 0; }
  .ck-predict-demo { padding: 16px; min-height: 360px; }
}
.ck-predict-demo .ck-chip--ghost {
  opacity: 0.85;
  color: #6b7280;
  border: 1px dashed var(--gray-300);
  background: #fff;
}
.ck-predict-list { position: relative; }
.ck-predict-rail { position: relative; height: 100%; min-height: 56px; }
.ck-arrow { position: absolute; left: 0; top: 0; transform: translateY(0); font-size: 1.35rem; line-height: 1; color: #9ca3af; transition: transform 780ms cubic-bezier(0.22,0.61,0.36,1), color 390ms ease; height: 1.35rem; display: inline-flex; align-items: center; }
.ck-arrow.is-red { color: #ef4444; }
.ck-arrow.is-green { color: #10b981; }
.ck-predict-row { min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 18px; font-size: clamp(0.95rem, 1.8vw, 1.1rem); }
.ck-predict-row .ck-chip { white-space: nowrap; }
/* Ensure emphasized chips in prediction list visually pop similarly */
.ck-predict-row .ck-chip.ck-chip--emph { font-size: 16px; padding: 8px 16px; }
/* Hide probabilities and emphasis until JS starts computing */
.ck-predict-row .ck-prob { opacity: 0; transform: translateX(8px); }
.ck-predict-row.active .ck-prob { color: #111827; }
.ck-predict-row.is-red { background: rgba(239,68,68,0.06); }
.ck-predict-row.is-green { background: rgba(0,176,80,0.10); }
@keyframes ck-reject { 0%{ box-shadow: 0 0 0 0 rgba(239,68,68,.35);} 70%{ box-shadow: 0 0 0 12px rgba(239,68,68,0);} 100%{ box-shadow: 0 0 0 0 rgba(239,68,68,0);} }
@keyframes ck-success { 0%{ box-shadow: 0 0 0 0 rgba(0,176,80,.35);} 70%{ box-shadow: 0 0 0 12px rgba(0,176,80,0);} 100%{ box-shadow: 0 0 0 0 rgba(0,176,80,0);} }
/* Probability badge */
.ck-prob {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.38em 0.8em; border-radius: 9999px; font-size: 0.82em; font-weight: 800;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(0,0,0,0.06);
  opacity: 0; transform: translateX(8px);
  transition: opacity .28s ease, transform .28s ease, box-shadow .28s ease, border-color .28s ease, color .28s ease;
  white-space: nowrap;
}
.ck-predict-row.active .ck-prob { opacity: 1; transform: translateX(0); }
/* Keep visible after finishing */
.ck-predict-row.is-done .ck-prob { opacity: 1; transform: translateX(0); }
/* Neutral while computing */
.ck-predict-row.is-computing .ck-prob { color: #111827; border-color: rgba(0,0,0,0.28); box-shadow: 0 0 0 3px rgba(0,0,0,0.05); }
/* Colorize only when done */
.ck-predict-row.is-done.is-red .ck-prob { color: #ef4444; border-color: rgba(239,68,68,0.35); box-shadow: 0 0 0 3px rgba(239,68,68,0.08); }
.ck-predict-row.is-done.is-green .ck-prob { color: #10b981; border-color: rgba(16,185,129,0.35); box-shadow: 0 0 0 3px rgba(16,185,129,0.08); }

.ck-reject-blink { animation: ck-reject .85s ease-out; }
.ck-success-blink { animation: ck-success .85s ease-out; }
@keyframes ckArrowBlink {
  0%, 100% { opacity: 1; }
  25% { opacity: 0.25; }
  50% { opacity: 1; }
  75% { opacity: 0.25; }
}
.ck-arrow.ck-blink { animation: ckArrowBlink .95s ease-in-out 1; }
.ck-role-swap { transition: color .2s ease, transform .2s ease; color: var(--brand-green) !important; transform: scale(1.03); }

 

 

 

 

/* ==========================================
   MODERN ADMIN ENHANCEMENTS
   ========================================== */

/* Enhanced table hover effects */
.data-table tbody tr {
    transition: all 0.15s ease-in-out;
}

.data-table tbody tr:hover {
    background-color: var(--gray-50);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Enhanced form inputs with better focus states */
.form-input:focus {
    outline: none;
    border-color: var(--brand-green);
    box-shadow: 0 0 0 3px rgba(0, 176, 80, 0.1);
    transform: scale(1.01);
    transition: all 0.15s ease-in-out;
}

/* Improved button hover effects */
.btn-primary {
    transition: all 0.2s ease-in-out;
}

.btn-primary:hover {
    background-color: var(--brand-light-green);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 176, 80, 0.25);
}

/* Orange variant override for primary buttons with bg-brand-orange */
.btn-primary.bg-brand-orange:hover,
.btn-primary.bg-brand-orange.hover {
    background-color: var(--brand-orange-hover);
    color: #111827;
    box-shadow: 0 6px 18px rgba(var(--brand-orange-rgb), 0.28);
}

.btn-secondary:hover {
    background-color: var(--brand-dark-navy);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.25);
}

.btn-outline:hover {
    background-color: var(--brand-green);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 176, 80, 0.25);
}

/* Enhanced admin cards */
.admin-card {
    background: var(--brand-white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid var(--gray-200);
    transition: all 0.15s ease-in-out;
}

.admin-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

/* Modern search input with icon */
.form-input[type="text"]:focus,
.form-input[type="email"]:focus,
.form-input[type="search"]:focus {
    background-color: var(--brand-white);
    border-color: var(--brand-green);
    box-shadow: 0 0 0 3px rgba(0, 176, 80, 0.1);
}

/* Filter badge styling */
.filter-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    background-color: rgba(0, 176, 80, 0.1);
    color: var(--brand-green);
    border: 1px solid rgba(0, 176, 80, 0.2);
    transition: all 0.15s ease-in-out;
}

/* Enhanced progress bars */
.progress-fill {
    background: linear-gradient(90deg, var(--brand-green) 0%, var(--brand-light-green) 100%);
    height: 100%;
    border-radius: 1rem;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loading skeleton animation */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading-pulse 1.5s ease-in-out infinite;
    border-radius: 0.375rem;
}

@keyframes loading-pulse {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Enhanced table responsiveness */
@media (max-width: 1024px) {
    .data-table {
        font-size: 0.75rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem 0.75rem;
    }
}

@media (max-width: 768px) {
    .data-table th,
    .data-table td {
        padding: 0.5rem;
        font-size: 0.75rem;
    }
    
    .admin-card {
        padding: 1rem;
        border-radius: 8px;
    }
}

/* Action button enhancements */
.edit-user-btn,
.action-btn {
    transition: all 0.15s ease-in-out;
    font-weight: 500;
}

.edit-user-btn:hover {
    background-color: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
    transform: translateY(-1px);
}

/* Enhanced dropdown styling */
select.form-input {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Enhanced status badges */
.status-badge {
    transition: all 0.15s ease-in-out;
}

.status-badge:hover {
    transform: scale(1.05);
}

/* Toast notification positioning adjustments */
#toast-container {
    pointer-events: none;
}

#toast-container > * {
    pointer-events: auto;
}

/* ==========================================
   SMART ACTION DROPDOWNS
   ========================================== */

/* Ensure forms don't break layout */
form.inline {
    display: inline-block;
}

/* ==========================================
   TABLE SORTING ENHANCEMENTS
   ========================================== */

.sortable {
    position: relative;
    user-select: none;
}

.sortable:hover {
    background-color: var(--gray-100);
}

.sortable:active {
    transform: scale(0.98);
}

.sort-icon {
    transition: all 0.2s ease-in-out;
    min-width: 1rem;
}

.sortable:hover .sort-icon {
    opacity: 100 !important;
    color: var(--brand-green);
}

/* ==========================================
   RESPONSIVE TABLE DESIGN
   ========================================== */

/* Desktop - full table */
@media (min-width: 1024px) {
    .data-table {
        table-layout: fixed;
    }
    
    .data-table th:nth-child(1) { width: 80px; }    /* ID */
    .data-table th:nth-child(2) { width: 240px; }   /* Email */
    .data-table th:nth-child(3) { width: 160px; }   /* Role */
    .data-table th:nth-child(4) { width: 120px; }   /* Status */
    .data-table th:nth-child(5) { width: 140px; }   /* Progress */
    .data-table th:nth-child(6) { width: 160px; }   /* Advanced */
    .data-table th:nth-child(7) { width: 120px; }   /* Date */
    .data-table th:nth-child(8) { width: 80px; }    /* Actions */
}

/* Tablet - hide less important columns */
@media (max-width: 1023px) and (min-width: 768px) {
    .data-table th:nth-child(4),    /* Status kursu */
    .data-table td:nth-child(4) {
        display: none;
    }
    
    .data-table th:nth-child(6),    /* Zaawansowany kurs */
    .data-table td:nth-child(6) {
        display: none;
    }
}

/* Mobile - card layout */
@media (max-width: 767px) {
    .data-table,
    .data-table thead,
    .data-table tbody,
    .data-table th,
    .data-table td,
    .data-table tr {
        display: block;
    }
    
    .data-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .data-table tr {
        background: white;
        border: 1px solid var(--gray-200);
        border-radius: 8px;
        margin-bottom: 1rem;
        padding: 1rem;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        position: relative;
    }
    
    .data-table tr:hover {
        transform: none;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    
    .data-table td {
        border: none;
        position: relative;
        padding: 0.5rem 0;
        font-size: 0.875rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .data-table td:before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--gray-600);
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        min-width: 120px;
        padding-right: 1rem;
    }
    
    /* Mobile card specific styles */
    .data-table td:nth-child(1):before { content: "ID"; }
    .data-table td:nth-child(2):before { content: "Email"; }
    .data-table td:nth-child(3):before { content: "Rola"; }
    .data-table td:nth-child(4):before { content: "Status"; }
    .data-table td:nth-child(5):before { content: "Postęp"; }
    .data-table td:nth-child(6):before { content: "Zaawansowany"; }
    .data-table td:nth-child(7):before { content: "Data"; }
    .data-table td:nth-child(8):before { content: "Akcje"; }
    
    /* Hide less important data on mobile */
    .data-table td:nth-child(4),    /* Status kursu */
    .data-table td:nth-child(6) {   /* Zaawansowany kurs */
        display: none;
    }
    
    /* Action dropdown positioning for mobile */
    .data-table td:nth-child(8) {
        justify-content: center;
        padding-top: 1rem;
        border-top: 1px solid var(--gray-200);
        margin-top: 0.5rem;
    }
    
    .data-table td:nth-child(8):before {
        display: none;
    }
}

/* ==========================================
   SEARCH & FILTER RESPONSIVE
   ========================================== */

@media (max-width: 768px) {
    /* Stack search and filter vertically */
    .flex.flex-col.sm\\:flex-row {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    /* Full width search on mobile */
    .relative.flex-1.max-w-md {
        max-width: none;
    }
    
    /* Smaller filter select */
    select.form-input {
        font-size: 0.875rem;
        padding: 0.5rem 2rem 0.5rem 0.75rem;
    }
    
    /* Results counter styling */
    #results-count {
        font-size: 0.875rem;
        padding: 0.25rem 0.5rem;
    }
}

/* ==========================================
   TOAST NOTIFICATIONS RESPONSIVE
   ========================================== */

@media (max-width: 768px) {
    #toast-container {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        width: auto;
    }
    
    .toast {
        max-width: none;
        width: 100%;
        font-size: 0.875rem;
        padding: 0.75rem 1rem;
    }
}

/* ==========================================
   LOADING SKELETON RESPONSIVE
   ========================================== */

@media (max-width: 768px) {
    #loading-skeleton .flex.items-center.space-x-4 {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .loading-skeleton {
        height: 1rem;
        margin-bottom: 0.25rem;
    }
}

/* ==========================================
   BUTTONS & INTERACTIONS MOBILE
   ========================================== */

@media (max-width: 768px) {
    /* Larger touch targets */
    .btn-primary,
    .btn-secondary,
    .btn-outline {
        min-height: 44px;
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }
    
    /* Action dropdown button larger */
    .action-dropdown-btn {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
    }
    
    .action-dropdown-btn svg {
        width: 1.25rem;
        height: 1.25rem;
    }
}

/* ==========================================
   END-OF-CHAPTER CELEBRATION
   Powiększenie tekstu zakończenia o ~30% z lekką redukcją na mobile
   ========================================== */
.ck-celebration { font-size: 1.3em; }
@media (max-width: 640px) { .ck-celebration { font-size: 1.22em; } }

/* ==========================================
   SEARCH INPUT ENHANCEMENTS
   ========================================== */

.search-input-container {
    position: relative;
}

.search-input-container:focus-within .search-icon {
    color: var(--brand-green);
    transform: scale(1.1);
}

.search-icon {
    transition: all 0.2s ease-in-out;
}

/* Search input loading state */
.search-loading {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.search-loading.visible {
    opacity: 1;
}

/* ==========================================
   PERFORMANCE OPTIMIZATIONS
   ========================================== */

/* GPU acceleration for smooth animations */
.user-row,
.action-dropdown,
.dropdown-item,
.sortable,
.btn-primary,
.btn-secondary,
.btn-outline { will-change: transform, opacity; backface-visibility: hidden; }

/* ==========================================
   CHAT SLIM THEME (Maurycy Chat Widget)
   ========================================== */
/* moved to chat-widget.css */

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .user-row,
    .action-dropdown,
    .dropdown-item,
    .sortable,
    .sort-icon,
    .loading-skeleton,
    .toast {
        transition: none !important;
        animation: none !important;
        transform: none !important;
    }
}

/* ==========================================
   TOAST NOTIFICATIONS SYSTEM
   ========================================== */

.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid #e5e7eb;
    opacity: 1;
    transform: translateX(0);
    transition: all 0.3s ease;
    animation: slideInRight 0.3s ease;
}

.toast-notification.toast-success {
    border-left: 4px solid var(--brand-green);
}

.toast-notification.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-notification.toast-warning {
    border-left: 4px solid #f59e0b;
}

.toast-notification.toast-info {
    border-left: 4px solid #3b82f6;
}

.toast-content {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    gap: 12px;
}

.toast-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.toast-close:hover {
    color: #6b7280;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mobile responsive */
@media (max-width: 640px) {
    .toast-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .toast-content {
        padding: 12px 16px;
    }
    
    .toast-message {
        font-size: 13px;
    }
}

/* ===== MODERN ADMIN HEADER ===== */
.modern-admin-header {
    background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-dark-navy) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 51, 102, 0.15);
    --header-height: 72px; /* default tightened */
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

/* Brand Section */
.brand-section {
    flex-shrink: 0;
}
/* Allow brand to shrink gracefully on very small screens to avoid overflow */
@media (max-width: 480px) {
  .brand-section { flex: 1 1 auto; min-width: 0; }
  .brand-logo { min-width: 0; }
  .brand-text { min-width: 0; }
  .brand-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.brand-logo:hover {
    transform: translateY(-1px);
}

.logo-icon {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--brand-green) 0%, var(--brand-light-green) 100%);
    border-radius: 12px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 176, 80, 0.3);
}

.logo-image {
    height: 40px;
    width: auto;
    margin-right: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 176, 80, 0.2);
    transition: transform 0.3s ease;
}

.logo-image:hover {
    transform: scale(1.05);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--brand-white);
    margin: 0;
    line-height: 1;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.brand-subtitle:hover {
    color: var(--brand-white);
    text-decoration: none;
}

/* Main Navigation */
.main-navigation {
    flex: 1;
    display: flex;
    justify-content: center;
    max-width: 560px;
    margin: 0 2rem;
}

.nav-links {
    display: flex;
    gap: 6px;
    background: rgba(255, 255, 255, 0.08);
    padding: 6px;
    border-radius: 12px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--brand-green) 0%, var(--brand-light-green) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 12px;
}

.nav-link:hover::before,
.nav-link.active::before {
    opacity: 1;
}

.nav-link:hover,
.nav-link.active {
    color: var(--brand-white);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 176, 80, 0.35);
}

.nav-icon {
    font-size: 1rem;
    position: relative;
    z-index: 1;
}

.nav-text {
    position: relative;
    z-index: 1;
    font-weight: 600;
}

/* User Section */
.user-section {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--brand-green) 0%, var(--brand-light-green) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(0, 176, 80, 0.3);
}

.user-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--brand-white);
    line-height: 1;
}

.user-email {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1;
    margin-top: 2px;
}

.user-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.preview-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--brand-white);
}

.preview-btn:hover {
    background: var(--brand-green);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 176, 80, 0.4);
}

.logout-btn {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
}

.logout-btn:hover {
    background: #ef4444;
    color: var(--brand-white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 3px;
    background: var(--brand-white);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.open span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Navigation */
.mobile-navigation {
    display: none;
    background: var(--brand-dark-navy);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: fixed;
    top: 0; /* cover whole viewport; content offset with padding-top */
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100; /* above header */
    backdrop-filter: blur(12px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* Robust height for small iOS/Android viewports */
    min-height: 100vh;
    height: 100vh;
    height: 100dvh; /* dynamic viewport (newer Safari/Chrome) */
    max-height: 100svh; /* small viewport (Safari) */
    padding-top: var(--header-height, 80px); /* push content below header */
    overscroll-behavior: contain;
    touch-action: pan-y;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 24px);
    opacity: 0;
    pointer-events: none;
}

.mobile-navigation.open { display: block; transform: translateY(0); opacity: 1; pointer-events: auto; }

.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 30;
    backdrop-filter: blur(2px);
}
.mobile-overlay.open { display: block; }

.mobile-nav-links {
    padding: 1rem;
    padding-top: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
/* Extra bottom padding so last items (e.g., Wyloguj) are reachable on short phones */
.mobile-navigation .mobile-nav-links { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 24px); touch-action: pan-y; }
/* Add a bottom spacer that guarantees extra scroll range above the OS bar */
.mobile-navigation .mobile-nav-links::after { content: ""; display: block; height: calc(env(safe-area-inset-bottom, 0px) + 96px); }

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 12px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: linear-gradient(135deg, var(--brand-green) 0%, var(--brand-light-green) 100%);
    color: var(--brand-white);
    transform: translateX(4px);
}

.mobile-user-actions {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.08);
    color: var(--brand-white);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-action-btn:hover {
    background: var(--brand-green);
    transform: translateX(4px);
}

.mobile-action-btn.logout:hover {
    background: #ef4444;
}

/* Ensure labels visible inside mobile flyout despite global .nav-text hide on <=1024px */
.mobile-navigation .nav-text { display: inline; color: rgba(255,255,255,0.92); font-weight: 600; }
.mobile-navigation .nav-icon { color: rgba(255,255,255,0.92); }

/* Responsive Design */
@media (max-width: 1024px) {
    .user-details {
        display: none;
    }
    
    .nav-text {
        display: none;
    }
    
    .nav-link {
        padding: 12px;
    }
    
    .action-btn {
        padding: 10px 12px;
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .header-container {
        height: 70px;
        padding: 0 1rem;
    }
    .modern-admin-header { --header-height: 70px; }
    
    .main-navigation {
        display: none;
    }
    
    .user-actions {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .mobile-navigation {
        display: block;
    }
    
    .brand-title {
        font-size: 1.25rem;
    }
    
    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .header-container {
        height: 64px;
        padding: 0 0.75rem;
    }
    .modern-admin-header { --header-height: 64px; }
    
    .brand-text {
        gap: 8px;
    }
    
    .brand-title {
        font-size: 1.1rem;
    }
    
    .brand-subtitle {
        font-size: 0.65rem;
    }
    
    .logo-icon {
        width: 36px;
        height: 36px;
        font-size: 1.3rem;
    }
}

/* Safe area support (iOS notches) */
@supports (padding: max(0px)) {
  .modern-admin-header { padding-top: max(0px, env(safe-area-inset-top)); }
  .modern-admin-footer { padding-bottom: max(0px, env(safe-area-inset-bottom)); }
  .mobile-navigation { padding-bottom: max(0px, env(safe-area-inset-bottom)); }
}

/* Lock page scroll when mobile nav is open */
html.menu-open, html.menu-open body { overflow: hidden; }

/* Mobile: ensure wide tables don't force horizontal scroll */
@media (max-width: 1024px) {
  .admin-users-table { min-width: 0 !important; }
}

/* Mobile readability for long text within table cards */
@media (max-width: 767px) {
  .data-table td, .data-table td * { overflow-wrap: anywhere; word-break: break-word; }
  .data-table td .truncate { white-space: normal; overflow: visible; text-overflow: clip; }
  .data-table-container { overflow-x: visible; }
}

/* Mobile modal panels: full-bleed, scrollable (admin only)
   Note: Scoped to .admin-body to avoid affecting landing purchase modal */
@media (max-width: 640px) {
  .admin-body .fixed.inset-0 .inline-block.align-bottom.bg-white { width: 100% !important; max-width: none !important; height: 100vh !important; margin: 0 !important; border-radius: 0 !important; overflow-y: auto !important; -webkit-overflow-scrolling: touch; }
}

/* Narrowest screens: tighten label width in mobile card table */
@media (max-width: 420px) {
  .data-table td:before { min-width: 92px; }
}

/* Header Content Spacing */
.admin-content {
    padding-top: 2rem;
    padding-bottom: 2rem;
}
/* Base horizontal padding for small screens; overridden by Tailwind at ≥sm */
.admin-content { padding-left: 1rem; padding-right: 1rem; }

/* ===== Extracted styles from course-footer.js to remove inline <style> ===== */
.ck-footer-link { position: relative; color: #334155; transition: color .2s ease; }
.ck-footer-link:hover { color: #0f172a; }
.ck-footer-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .25s ease; opacity: .6; }
.ck-footer-link:hover::after { transform: scaleX(1); }

.lesson-number { background-color: var(--brand-green); color: var(--brand-white); width: 2rem; height: 2rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.875rem; }
.ck-toc-lesson-number { background-color: var(--brand-orange); color: var(--brand-white); width: 2rem; height: 2rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.875rem; }
.ck-toc-active { border-color: var(--brand-orange) !important; box-shadow: 0 2px 8px rgba(var(--brand-orange-rgb), .15) !important; }

.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid #e5e7eb; border-radius: 50%; border-top-color: var(--brand-green); animation: spin 1s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.ck-toc-card-wrapper { margin-bottom: 10px; }
.ck-toc-card { display:flex; align-items:center; padding: 8px 10px; border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; transition: box-shadow .2s ease, border-color .2s ease; }
.ck-toc-card:hover { border-color: var(--brand-orange); box-shadow: 0 2px 8px rgba(var(--brand-orange-rgb), .12); }
.ck-toc-card.is-open { border-color: var(--brand-orange); box-shadow: 0 4px 14px rgba(var(--brand-orange-rgb), .16); }
.ck-toc-card .ck-toc-card-body { display:flex; align-items:center; gap: 12px; flex: 1 1 auto; background: transparent; border: 0; padding: 6px 2px; text-align: left; cursor: pointer; }
.ck-toc-title { font-size: 14px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ck-toc-subtitle { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ck-toc-actions { display:flex; align-items:center; gap: 8px; color: #6b7280; font-size: 12px; white-space: nowrap; }
.ck-toc-chevron { font-size: 12px; }
.ck-toc-quickjump { margin-left: 8px; font-size: 12px; color: var(--brand-green); text-decoration: none; }
.ck-toc-quickjump:hover { text-decoration: underline; }
.ck-toc-card--end { text-decoration: none; }
.ck-toc-card--end:hover { text-decoration: none; }

.ck-toc-steps { padding-left: 44px; padding-right: 6px; padding-bottom: 8px; }
.ck-steps-loading { display:flex; align-items:center; gap:8px; padding: 10px 0; }
.ck-steps-list { display:flex; flex-direction:column; gap:6px; margin-top: 8px; }
.ck-step-row { display:grid; grid-template-columns: 28px 1fr; align-items:center; gap:10px; padding: 8px 10px; border-radius: 8px; text-decoration: none; border:1px dashed transparent; }
.ck-step-row:hover { background: #f9fafb; border-color: #e5e7eb; }
.ck-step-index { width: 24px; height: 24px; border-radius: 9999px; background: var(--brand-green); color: white; font-weight: 700; font-size: 12px; display:flex; align-items:center; justify-content:center; }
.ck-step-main { min-width: 0; display:flex; align-items:center; justify-content: space-between; gap:10px; }
.ck-step-title { color: #111827; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ck-step-meta { color: var(--brand-green); font-size: 12px; white-space: nowrap; }
.ck-step-row.is-current { background: rgba(0, 176, 80, .08); border-color: rgba(0, 176, 80, .35); }
.ck-step-row.is-current .ck-step-index { background: var(--brand-green); box-shadow: 0 0 0 3px rgba(0, 176, 80, .14); }
.ck-step-row.is-completed .ck-step-index { background: var(--brand-green); opacity: 0.9; }
.ck-step-row.is-completed .ck-step-meta { color: var(--brand-green); }

@media (max-width: 640px) {
  .ck-toc-title { font-size: 13px; }
  .ck-toc-subtitle { display: none; }
  .ck-toc-quickjump { display: none; }
}
@media (max-width: 420px) {
  .ck-toc-title { font-size: 12.5px; }
  .ck-toc-actions { font-size: 11px; }
  .ck-toc-chevron { font-size: 11px; }
}
/* Recent users row: wrap gracefully and avoid overflow */
.recent-user-row { flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.recent-user-row .recent-email { overflow-wrap: anywhere; word-break: break-word; }
.recent-user-row .text-right { margin-left: auto; }

/* ==========================================
   COURSE CONSOLIDATED STYLES
   Merged from lesson-specific CSS (01–06)
   ========================================== */

/* Prevent scroll anchoring after slide changes */
main { overflow-anchor: none; }

/* CTA pulse + shine */
.btn-cta { position: relative; box-shadow: 0 8px 24px rgba(34,197,94,.25); transform: translateZ(0); animation: pulseGlow 2.2s ease-in-out infinite; overflow: hidden; }
@keyframes pulseGlow { 0%,100%{ box-shadow:0 8px 24px rgba(34,197,94,.25); transform:translateZ(0) scale(1)} 50%{ box-shadow:0 12px 36px rgba(34,197,94,.45); transform:translateZ(0) scale(1.02)} }
.btn-cta::after { content:""; position:absolute; inset:0; pointer-events:none; border-radius:inherit; background:linear-gradient(120deg,transparent 0%, rgba(255,255,255,.25) 15%, transparent 30%); transform:translateX(-130%); }
.btn-cta:hover::after { animation: shine .9s ease-out; }
@keyframes shine { to { transform: translateX(130%); } }

/* Subtle bounce helper */
.ck-bounce { animation: ckBounce .65s ease-out 1; }
@keyframes ckBounce { 0%{transform:translateY(0) scale(1)} 30%{transform:translateY(-4px) scale(1.01)} 60%{transform:translateY(0) scale(1)} 85%{transform:translateY(-2px)} 100%{transform:translateY(0)} }

/* Modern decision block + cards */
.ck-choice { position: relative; background: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%); border: 1px solid rgba(0,176,80,0.08); border-radius: 0.75rem; box-shadow: 0 20px 60px rgba(0,176,80,0.03), 0 8px 25px rgba(0,0,0,0.04), inset 0 1px 0 rgba(255,255,255,0.9); overflow: hidden; backdrop-filter: blur(1px); backface-visibility: hidden; }
.ck-choice::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 20% 20%, rgba(0,176,80,0.05) 0%, transparent 50%), radial-gradient(circle at 80% 80%, rgba(0,176,80,0.03) 0%, transparent 50%); pointer-events: none; border-radius: inherit; }

.choice-card { background: linear-gradient(135deg, #ffffff 0%, #fefefe 100%); border: 1px solid rgba(0,176,80,0.1); border-radius: 16px; padding: 20px; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); position: relative; overflow: hidden; cursor: pointer; backface-visibility: hidden; }
.choice-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.2) 100%); opacity: 0; transition: opacity 0.3s ease; border-radius: inherit; }
.choice-card:hover::before { opacity: 0.15; }
.choice-card:hover { transform: translateY(-6px) scale(1.02); box-shadow: 0 25px 50px rgba(0,176,80,0.08), 0 15px 35px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,0.9); border-color: rgba(0,176,80,0.25); }
.choice-card--primary { border: 2px solid var(--brand-green); box-shadow: 0 20px 40px rgba(0,176,80,0.15), 0 8px 25px rgba(0,0,0,0.04), inset 0 1px 0 rgba(255,255,255,0.9); position: relative; background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%); }
.choice-card--primary::after { content: ""; position: absolute; top: 0; right: 0; width: 60px; height: 60px; background: linear-gradient(135deg, rgba(0,176,80,0.1), rgba(0,176,80,0.05)); border-radius: 0 16px 0 60px; }
.choice-card--primary:hover { transform: translateY(-8px) scale(1.03); box-shadow: 0 30px 60px rgba(0,176,80,0.2), 0 20px 40px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.9); }
.choice-card--orange .choice-icon { background: linear-gradient(135deg, var(--brand-orange), #fb923c); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; filter: drop-shadow(0 2px 4px rgba(var(--brand-orange-rgb), 0.18)); }
.choice-card--orange .btn-outline:hover { background-color: var(--brand-orange); border-color: var(--brand-orange); color: #ffffff; box-shadow: 0 8px 24px rgba(var(--brand-orange-rgb), 0.25); }

.choice-divider { position: relative; align-items: center; justify-content: center; }
@media (min-width: 768px) {
  .choice-divider { display: flex; }
}
.choice-divider::before { content: ""; position: absolute; top: 20%; bottom: 20%; left: 50%; width: 2px; background: linear-gradient(180deg, transparent, rgba(0,176,80,0.15), transparent); transform: translateX(-50%); }

/* Decorative signpost image between decision cards */
.ck-choice .choice-divider img { display: block; pointer-events: none; filter: drop-shadow(0 14px 22px rgba(0,51,102,0.12)) drop-shadow(0 2px 6px rgba(0,51,102,0.08)); transform: translateZ(0); }

/* Unified soft slide background */
.ck-unified-slide-bg { background: linear-gradient(90deg, #f0fdf4 0%, #eff6ff 100%) !important; border: 1px solid #bbf7d0; box-shadow: none !important; }

/* Media cards: tighter mobile paddings around standalone images */
.ck-media-card { overflow: hidden; }
.ck-media-card > img,
.ck-media-card .ck-media { display: block; width: 100%; height: auto; }
@media (max-width: 640px) {
  .ck-media-card { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
  .ck-media-card.ck-media-edge { padding-left: 0 !important; padding-right: 0 !important; }
}
/* Progressive enhancement: auto‑tighten common white cards that are just image containers */
@media (max-width: 640px) {
  @supports selector(:has(*)) {
    .bg-white.rounded-xl.shadow-sm.p-6:has(> img) { padding-left: 0.5rem; padding-right: 0.5rem; }
    .bg-white.rounded-xl.border.p-5:has(img) { padding-left: 0.5rem; padding-right: 0.5rem; }
  }
}

/* Collapsible panels */
.ck-advanced-panel { overflow: hidden; max-height: 0; opacity: 0; transition: max-height .4s ease, opacity .3s ease; }
.ck-advanced-panel.is-open { opacity: 1; }
.ck-adv-icon { transition: transform .25s ease; }

/* Reveal helper */
.ck-reveal { opacity: 0; transform: translateY(10px) scale(0.995); filter: saturate(0.98); transition: opacity .55s ease, transform .55s cubic-bezier(0.22,0.61,0.36,1), filter .55s ease; backface-visibility: hidden; }
.ck-reveal.show { opacity: 1; transform: translateY(0) scale(1); filter: saturate(1); }
@media (prefers-reduced-motion: reduce) { .ck-reveal { transition: opacity .2s ease; transform: none; } .ck-reveal.show { transform: none; } }

/* Simple lesson header nav helpers */
.cheat-link { background:transparent; border:none; color:#6b7280; font-size:.82rem; padding:.45rem .6rem; border-radius:.375rem; transition:color .15s ease; }
.cheat-link:hover { color:#374151; }
.cheat-link:focus { outline:2px solid rgba(0,176,80,.25); outline-offset:2px; }
.ck-lesson-nav { background:#f8fafc; border-top:2px solid #e5e7eb; box-shadow: inset 0 1px 0 rgba(0,0,0,0.03); }
.ck-lesson-nav .cheat-link { color:#6b7280; }
.ck-lesson-nav .cheat-link:hover { color:#374151; }

/* Celebration/connection panel waves */
.ck-connection-panel { position: relative; overflow: hidden; }
.ck-connection-panel .ck-chip.ck-chip--celebration { font-size: 1.05rem; padding: 0.5em 1.1em; background: linear-gradient(135deg, #ffffff 0%, #ecfdf5 100%); border-color: rgba(0,176,80,0.25); box-shadow: 0 0 0 3px rgba(0,176,80,0.12), 0 10px 28px rgba(0,176,80,0.12); }
.ck-chip-button { cursor: pointer; -webkit-tap-highlight-color: transparent; }

.ck-connection-waves { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.ck-connection-waves::before,
.ck-connection-waves::after { content: ""; position: absolute; left: var(--origin-x, 50%); top: var(--origin-y, 40px); width: 28px; height: 28px; border-radius: 9999px; transform: translate(-50%, -50%) scale(0.5); background: radial-gradient(circle, rgba(16,185,129,0.42) 0%, rgba(16,185,129,0.28) 28%, rgba(16,185,129,0.16) 50%, rgba(16,185,129,0.00) 66% ); filter: blur(0.3px); animation: ck-radio-wave 3.8s cubic-bezier(.2,.55,.25,1) infinite; }
.ck-connection-waves::after { animation-delay: 1.1s; }
.ck-connection-waves .ck-wave-3 { position: absolute; left: var(--origin-x, 50%); top: var(--origin-y, 40px); width: 28px; height: 28px; border-radius: 9999px; transform: translate(-50%, -50%) scale(0.5); background: radial-gradient(circle, rgba(59,130,246,0.26) 0%, rgba(59,130,246,0.18) 30%, rgba(59,130,246,0.08) 55%, rgba(59,130,246,0.00) 68% ); filter: blur(0.3px); animation: ck-radio-wave 4.2s cubic-bezier(.2,.55,.25,1) infinite; animation-delay: 2.2s; }
.ck-connection-waves .ck-glow-ring { position: absolute; left: var(--origin-x, 50%); top: var(--origin-y, 40px); width: 14px; height: 14px; transform: translate(-50%, -50%); border-radius: 9999px; box-shadow: 0 0 0 0 rgba(16,185,129,0.28); animation: ck-ping-ring 2.8s ease-out infinite; }
@keyframes ck-radio-wave { 0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0.58; } 55% { opacity: 0.18; } 100% { transform: translate(-50%, -50%) scale(36); opacity: 0; } }
@keyframes ck-ping-ring { 0% { box-shadow: 0 0 0 0 rgba(16,185,129,0.26); } 60% { box-shadow: 0 0 0 14px rgba(16,185,129,0.08); } 100% { box-shadow: 0 0 0 24px rgba(16,185,129,0.00); } }

/* Right-side amber waves */
.ck-connection-waves.ck-connection-waves--right::before,
.ck-connection-waves.ck-connection-waves--right::after { content: ""; position: absolute; left: var(--origin-x-right, calc(100% - var(--origin-x, 50%))); top: var(--origin-y-right, var(--origin-y, 40px)); width: 28px; height: 28px; border-radius: 9999px; transform: translate(-50%, -50%) scale(0.5); background: radial-gradient(circle, rgba(245,158,11,0.38) 0%, rgba(245,158,11,0.24) 30%, rgba(245,158,11,0.12) 55%, rgba(245,158,11,0.00) 70% ); filter: blur(0.35px); animation: ck-radio-wave 4s cubic-bezier(.2,.55,.25,1) infinite; }
.ck-connection-waves.ck-connection-waves--right::after { animation-delay: 1.3s; }
.ck-connection-waves.ck-connection-waves--right .ck-wave-3--right { position: absolute; left: var(--origin-x-right, calc(100% - var(--origin-x, 50%))); top: var(--origin-y-right, var(--origin-y, 40px)); width: 28px; height: 28px; border-radius: 9999px; transform: translate(-50%, -50%) scale(0.5); background: radial-gradient(circle, rgba(255,196,71,0.26) 0%, rgba(255,196,71,0.18) 30%, rgba(255,196,71,0.08) 55%, rgba(255,196,71,0.00) 68% ); filter: blur(0.35px); animation: ck-radio-wave 4.4s cubic-bezier(.2,.55,.25,1) infinite; animation-delay: 2.4s; }
@keyframes ck-ping-ring-amber { 0% { box-shadow: 0 0 0 0 rgba(245,158,11,0.24); } 60% { box-shadow: 0 0 0 14px rgba(245,158,11,0.10); } 100% { box-shadow: 0 0 0 24px rgba(245,158,11,0.00); } }

/* Slide-specific gold info variant */
#slide-8 .ck-inline-info--gold { background: linear-gradient(180deg, rgba(245,158,11,.10), rgba(245,158,11,.05)); border: 1px solid rgba(245,158,11,.36); box-shadow: 0 2px 10px rgba(245,158,11,.08); }
#slide-8 .ck-inline-info--gold .ck-i-svg { color: var(--brand-orange); }
#slide-8 .ck-info-wide { display: flex; width: 100%; }
#slide-8 .ck-inline-info--gold .ck-i { width: 83px; height: 83px; }
@media (max-width: 480px) { #slide-8 .ck-inline-info--gold .ck-i { width: 70px; height: 70px; } }
/* ==========================================
   INSTRUCTION FRAME (Slide 8 and reusable)
   ========================================== */

.ck-instruction {
  margin-top: 0.75rem;
  margin-bottom: 1.25rem;
}

.ck-annotated-frame {
  position: relative;
  display: block;
  max-width: 100%;
  --ck-frame-radius: 18px;
  --ck-frame-edge: 12px;  /* orange edge thickness */
  --ck-frame-band: 18px;  /* inner navy band thickness */
}

.ck-annotated-frame .ck-edge {
  background: var(--brand-orange);
  padding: var(--ck-frame-edge);
  border-radius: calc(var(--ck-frame-radius) + 2px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.15), inset 0 0 0 1px rgba(0,0,0,0.06);
}

.ck-annotated-frame .ck-band {
  background: #14394a; /* deep teal/navy band */
  padding: var(--ck-frame-band);
  border-radius: calc(var(--ck-frame-radius) - 2px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

.ck-annotated-frame .ck-canvas {
  position: relative;
  background: #ffffff;
  border-radius: calc(var(--ck-frame-radius) - 8px);
  overflow: hidden;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ck-annotated-frame img.ck-shot {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  max-height: 64vh;
  pointer-events: none; /* never block marker dragging */
  position: relative;
  z-index: 1;
}

.ck-annotated-frame .ck-avatar {
  position: absolute;
  left: -10px;
  bottom: -10px;
  width: clamp(64px, 12vw, 96px);
  height: auto;
  transform: translate(-2px, 2px);
  filter: drop-shadow(0 10px 24px rgba(0,0,0,0.25));
  pointer-events: none;
}

.ck-annotated-frame .ck-canvas { position: relative; }

/* Numbered markers/hotspots placed over the screenshot */
.ck-annotated-frame .ck-marker {
  position: absolute;
  width: 34px;
  height: 34px;
  line-height: 34px;
  border-radius: 9999px;
  background: var(--brand-orange);
  color: #111827;
  font-weight: 800;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(0,0,0,0.35);
  box-shadow: 0 6px 16px rgba(0,0,0,0.22);
  transform: translate(-50%, -50%);
  user-select: none;
  z-index: 3;
  cursor: grab;
}
.ck-annotated-frame .ck-marker:active { cursor: grabbing; }

.ck-annotated-frame .ck-marker::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: rgba(17,24,39,0.92);
  color: #ffffff;
  font-size: 12px;
  line-height: 1.25;
  padding: 6px 8px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.ck-annotated-frame .ck-marker:hover::after,
.ck-annotated-frame .ck-marker.is-active::after {
  opacity: 1;
}

@keyframes ck-marker-pulse {
  0% { box-shadow: 0 0 0 0 rgba(var(--brand-orange-rgb), .55); }
  70% { box-shadow: 0 0 0 16px rgba(var(--brand-orange-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--brand-orange-rgb), 0); }
}

.ck-annotated-frame .ck-marker.is-active {
  animation: ck-marker-pulse 0.85s ease-out;
}

.ck-annotated-frame .ck-arrow {
  position: absolute;
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 28px solid var(--brand-orange);
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.25));
  transform-origin: 50% 100%;
}

.ck-instruction-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  font-size: 0.875rem;
  color: var(--gray-700);
}

.ck-instruction-legend a {
  color: var(--brand-navy);
  text-decoration: underline;
}

@media (max-width: 640px) {
  .ck-annotated-frame { --ck-frame-edge: 10px; --ck-frame-band: 14px; }
  .ck-annotated-frame .ck-marker {
    width: 30px; height: 30px; line-height: 30px; font-size: 13px;
  }
}

/* Inline admin editor toolbar */
.ck-editor-bar { margin-top: 6px; display: flex; }
.ck-editor-row { display: flex; align-items: center; gap: 6px; }

/* Admin toolbar under the frame (full-width, tidy grouping) */
.ck-admin-toolbar { margin-top: 10px; background: #fff; border: 1px solid var(--gray-200); border-radius: 10px; padding: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.04); }
.ck-admin-toolbar .ck-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ck-admin-toolbar .ck-tools .btn-primary, .ck-admin-toolbar .ck-tools .btn-secondary, .ck-admin-toolbar .ck-tools .btn-outline { padding: 6px 10px; font-size: 12px; }
.ck-admin-toolbar .ck-tools .sep { width: 1px; height: 24px; background: var(--gray-200); margin: 0 6px; }

/* === Steps sidebar layout === */
.ck-instruction--has-steps { display: grid; grid-template-columns: 1fr minmax(220px, 280px); gap: 12px; align-items: start; }
@media (max-width: 900px) { .ck-instruction--has-steps { grid-template-columns: 1fr; } }
.ck-steps-panel { background: #fff; border: 1px solid var(--gray-200); border-radius: 12px; padding: 10px; box-shadow: 0 4px 12px rgba(0,0,0,.04); }
.ck-steps-title { font-weight: 700; color: var(--brand-navy); font-size: 0.95rem; margin-bottom: 6px; }
.ck-steps-list { list-style: none; margin: 0; padding: 0; }
.ck-steps-item { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 8px; padding: 6px 6px; border-radius: 8px; cursor: pointer; }
.ck-steps-item:hover { background: var(--gray-50); }
.ck-steps-nr { width: 28px; height: 28px; border-radius: 9999px; background: rgba(245,158,11,.18); color: #7c2d12; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(245,158,11,.35); }
.ck-steps-text { font-size: 0.85rem; color: #374151; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ck-steps-tools { display: inline-flex; gap: 6px; }
.ck-steps-tools button { font-size: 11px; padding: 4px 6px; }

/* === Callout bubble + arrow === */
.ck-callout { position: absolute; display: inline-flex; align-items: center; gap: 8px; pointer-events: none; }
.ck-callout .ck-bubble { pointer-events: auto; background: rgba(17,24,39,.92); color: #fff; font-size: 12px; line-height: 1.25; padding: 6px 8px; border-radius: 6px; box-shadow: 0 6px 16px rgba(0,0,0,.25); }
.ck-callout .ck-arrow { pointer-events: none; }

/* Point navigation (prev/next buttons) */
.ck-point-nav { position: absolute; right: 12px; bottom: 12px; display: inline-flex; gap: 6px; z-index: 5; }

/* Caption editor under frame */
.ck-caption-editor { margin-top: 10px; }
.ck-caption-editor .form-label { font-size: 12px; color: #374151; margin-bottom: 4px; }

/* Floating Add Button (admin only, JS appends it) */
.ck-fab-add {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 56px;
  height: 56px;
  border-radius: 9999px;
  background: var(--brand-orange);
  color: #111827;
  font-weight: 900;
  font-size: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(0,0,0,0.35);
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  z-index: 50;
}
.ck-fab-add:hover { filter: brightness(0.95); transform: translateY(-1px); }
.ck-fab-add:active { transform: translateY(0); }
.ck-fab-plus { line-height: 1; transform: translateY(-1px); }

/* Delete button styling within frames */
.btn-danger-outline {
  background: rgba(255,255,255,0.9);
  color: #7c2d12;
  border: 1px solid rgba(124,45,18,0.35);
  padding: 6px 10px;
  font-weight: 700;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.btn-danger-outline:hover { background: rgba(254,242,242,0.95); border-color: rgba(185,28,28,0.55); }

/* Step badge (per-frame numbering inside each instruction section) */
.ck-step-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  min-width: 44px;
  padding: 0 16px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #ffffff 0%, #f3f4f6 100%);
  color: var(--brand-navy);
  font-weight: 800;
  font-size: 16px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border: 1px solid rgba(17,24,39,0.18);
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
  z-index: 6;
}
@media (max-width: 640px) {
  .ck-step-badge { height: 40px; min-width: 40px; font-size: 14px; padding: 0 12px; left: 12px; top: 12px; }
}

/* Subtle separator between screenshots (within one instruction section) */
.ck-separator {
  height: 1px;
  background: linear-gradient(to right, rgba(0,0,0,0), rgba(17,24,39,0.12), rgba(0,0,0,0));
  margin: 14px 0 18px 0;
}

/* Instruction frame — responsive scaling in sync with global font controls */
html.ck-font-2 .ck-annotated-frame { --ck-frame-edge: 14px; --ck-frame-band: 22px; --ck-frame-radius: 20px; }
html.ck-font-3 .ck-annotated-frame { --ck-frame-edge: 16px; --ck-frame-band: 24px; --ck-frame-radius: 22px; }

html.ck-font-2 .ck-annotated-frame img.ck-shot { max-height: 68vh; }
html.ck-font-3 .ck-annotated-frame img.ck-shot { max-height: 72vh; }

/* Prefer larger frame paddings on mobile to maintain tappable hit areas */
@media (max-width: 640px) {
  html.ck-font-2 .ck-annotated-frame { --ck-frame-edge: 12px; --ck-frame-band: 18px; }
  html.ck-font-3 .ck-annotated-frame { --ck-frame-edge: 14px; --ck-frame-band: 20px; }
  html.ck-font-2 .ck-annotated-frame img.ck-shot { max-height: 62vh; }
  html.ck-font-3 .ck-annotated-frame img.ck-shot { max-height: 66vh; }
}

html.ck-font-2 .ck-annotated-frame .ck-avatar { width: clamp(72px, 13vw, 108px); }
html.ck-font-3 .ck-annotated-frame .ck-avatar { width: clamp(80px, 14vw, 120px); }

html.ck-font-2 .ck-annotated-frame .ck-marker { width: 38px; height: 38px; line-height: 38px; font-size: 15px; border-width: 2px; }
html.ck-font-3 .ck-annotated-frame .ck-marker { width: 42px; height: 42px; line-height: 42px; font-size: 16px; border-width: 2px; }
html.ck-font-2 .ck-annotated-frame .ck-marker::after { font-size: 13px; padding: 7px 10px; }
html.ck-font-3 .ck-annotated-frame .ck-marker::after { font-size: 14px; padding: 8px 12px; }

html.ck-font-2 .ck-point-nav .btn-outline { font-size: 13px !important; padding: 6px 10px !important; }
html.ck-font-3 .ck-point-nav .btn-outline { font-size: 14px !important; padding: 7px 12px !important; }

html.ck-font-2 .ck-step-badge { height: 48px; min-width: 48px; font-size: 17px; }
html.ck-font-3 .ck-step-badge { height: 52px; min-width: 52px; font-size: 18px; }

html.ck-font-2 .ck-steps-title { font-size: 1rem; }
html.ck-font-3 .ck-steps-title { font-size: 1.075rem; }
html.ck-font-2 .ck-steps-text { font-size: 0.95rem; }
html.ck-font-3 .ck-steps-text { font-size: 1rem; }
html.ck-font-2 .ck-steps-nr { width: 30px; height: 30px; }
html.ck-font-3 .ck-steps-nr { width: 32px; height: 32px; }

html.ck-font-2 .ck-callout .ck-bubble { font-size: 13px; padding: 7px 10px; }
html.ck-font-3 .ck-callout .ck-bubble { font-size: 14px; padding: 8px 12px; }

/* Keep tooltip text comfortably readable under header scaling */
html.ck-font-2 .ck-annotated-frame .ck-marker::after { font-size: 13px; }
html.ck-font-3 .ck-annotated-frame .ck-marker::after { font-size: 14px; }

html.ck-font-2 .ck-caption-editor .form-label { font-size: 13px; }
html.ck-font-3 .ck-caption-editor .form-label { font-size: 14px; }

html.ck-font-2 .ck-admin-toolbar .ck-tools .btn-primary,
html.ck-font-2 .ck-admin-toolbar .ck-tools .btn-secondary,
html.ck-font-2 .ck-admin-toolbar .ck-tools .btn-outline { font-size: 13px; padding: 7px 12px; }
html.ck-font-3 .ck-admin-toolbar .ck-tools .btn-primary,
html.ck-font-3 .ck-admin-toolbar .ck-tools .btn-secondary,
html.ck-font-3 .ck-admin-toolbar .ck-tools .btn-outline { font-size: 14px; padding: 8px 12px; }

html.ck-font-2 .ck-fab-add { width: 60px; height: 60px; font-size: 30px; }
html.ck-font-3 .ck-fab-add { width: 64px; height: 64px; font-size: 32px; }

html.ck-font-2 .ck-delete-shot { padding: 7px 12px; font-size: 12px; }
html.ck-font-3 .ck-delete-shot { padding: 8px 12px; font-size: 13px; }

html.ck-font-2 .ck-instruction-legend { font-size: 0.95rem; }
html.ck-font-3 .ck-instruction-legend { font-size: 1rem; }

/* Widen steps sidebar at larger font scales for better readability */
html.ck-font-2 .ck-instruction--has-steps { grid-template-columns: 1fr minmax(240px, 320px); }
html.ck-font-3 .ck-instruction--has-steps { grid-template-columns: 1fr minmax(260px, 360px); }

/* Admin Body Layout */
body.admin-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ===== MODERN ADMIN FOOTER ===== */
.modern-admin-footer {
    background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-dark-navy) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
    backdrop-filter: blur(10px);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2.5rem 1rem 1.5rem;
}

/* Footer Content Grid */
.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Footer Brand */
.footer-brand {
    grid-column: span 1;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
}

.footer-logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--brand-green) 0%, var(--brand-light-green) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0, 176, 80, 0.3);
}

.footer-logo-image {
    height: 32px;
    width: auto;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 176, 80, 0.2);
    transition: transform 0.3s ease;
}

.footer-logo-image:hover {
    transform: scale(1.05);
}

.footer-brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--brand-white);
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
    max-width: 280px;
}

/* Footer Links */
.footer-links-title,
.footer-info-title,
.footer-external-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--brand-white);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-links-grid,
.footer-external-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-link,
.footer-external-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.875rem;
    padding: 0.375rem 0;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.footer-link:hover,
.footer-external-link:hover {
    color: var(--brand-green);
    transform: translateX(4px);
}

.footer-link-icon {
    font-size: 0.875rem;
    opacity: 0.8;
}

.footer-logout:hover {
    color: #ef4444;
}

/* Footer Info */
.footer-info-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.footer-info-label {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.footer-info-value {
    color: var(--brand-white);
    font-weight: 600;
}

.footer-status-active {
    color: var(--brand-green);
}

/* Footer Bottom */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 1rem;
}

.footer-copyright,
.footer-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-separator {
    color: rgba(255, 255, 255, 0.3);
}

.footer-user strong {
    color: var(--brand-green);
    font-weight: 600;
}

.footer-time {
    font-family: monospace;
}

/* Footer Spacer */
.footer-spacer {
    height: 1.5rem;
    background: var(--brand-dark-navy);
}

/* Responsive Footer */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
    
    .footer-brand {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .footer-container {
        padding: 2rem 1rem 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 1.5rem;
        padding-bottom: 1.5rem;
    }
    
    .footer-brand {
        grid-column: span 1;
        text-align: center;
    }
    
    .footer-logo {
        justify-content: center;
    }
    
    .footer-description {
        text-align: center;
        margin: 0 auto;
    }
    
    .footer-links-title,
    .footer-info-title,
    .footer-external-title {
        text-align: center;
        margin-bottom: 0.75rem;
    }
    
    .footer-info-item {
        justify-content: center;
        gap: 1rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .footer-container {
        padding: 1.5rem 0.75rem 0.75rem;
    }
    
    .footer-content {
        gap: 1rem;
        margin-bottom: 1rem;
        padding-bottom: 1rem;
    }
    
    .footer-copyright,
    .footer-meta {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .footer-separator {
        display: none;
    }
}

/* ——— Premium sound pulse for Maurycy speaker badge ——— */
.ck-sound-pulse { transform: translateZ(0); will-change: transform; }
.ck-sound-pulse::before,
.ck-sound-pulse::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 135%;
  height: 135%;
  transform: translate(-50%, -50%) scale(.9);
  transform-origin: center center;
  border-radius: 9999px;
  pointer-events: none;
  will-change: transform, opacity;
}
.ck-sound-pulse::before { border: 2px solid rgba(16,185,129,.45); animation: ckSoundWave 1.8s ease-out infinite; }
.ck-sound-pulse::after  { border: 2px solid rgba(245,158,11,.35); animation: ckSoundWave 2.4s ease-out infinite; animation-delay: .45s; }
@keyframes ckSoundWave { 0% { opacity: .55; transform: translate(-50%, -50%) scale(.9); } 60% { opacity: .2; transform: translate(-50%, -50%) scale(1.22); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.4); } }

/* Stabilize badge layout so the icon never shifts */
.maurycy-badge { display: inline-flex; align-items: center; justify-content: center; line-height: 0; box-sizing: content-box; transform: translateZ(0); }
.maurycy-panel .maurycy-badge.ck-sound-pulse { position: absolute; }
.maurycy-badge svg { display: block; }

/* —— Maurycy panel: mobile layout across steps —— */
@media (max-width: 640px) {
  .maurycy-panel { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 16px; }
  .maurycy-panel > .relative { justify-self: center; margin-bottom: 2px; }
  .maurycy-panel .maurycy-trigger { height: 110px; width: 110px; }
  .maurycy-panel .maurycy-badge { left: auto !important; right: -4px !important; bottom: -4px; transform: none; }
  .maurycy-panel .text-gray-800 { font-size: 0.95rem; }
  .maurycy-panel .font-semibold { text-align: center; font-size: 1rem; }
  .maurycy-panel .border-l-4 { border-left-width: 0 !important; border-top-width: 3px !important; padding-left: 0 !important; padding-top: 10px !important; }
  .maurycy-panel .border-brand-orange { border-color: var(--brand-orange) !important; }
  .maurycy-panel p { margin-bottom: .5rem; }
}

/* Prevent scroll chaining in chat scroller */
/* moved to chat-widget.css */

/* ==========================================
   Mobile edge-to-edge layout for course pages
   (remove horizontal gutters only on small screens)
   ========================================== */
@media (max-width: 640px) {
  /* Remove side paddings and max-width constraint on common wrappers */
  .course-header > .max-w-4xl,
  .lesson-subnav > .max-w-4xl,
  main.max-w-4xl,
  main > .max-w-4xl,
  .welcome-page .course-header > .max-w-4xl,
  .welcome-page main.max-w-4xl,
  .welcome-page main > .max-w-4xl {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: none !important;
  }

  /* Ensure top subnav doesn't reintroduce side padding */
  .lesson-subnav .lesson-subnav-row { padding-left: 0 !important; padding-right: 0 !important; }

  /* Make step panels full-bleed like welcome (no side gaps) */
  .ck-unified-slide-bg {
    /* Escape any parent gutters */
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    width: 100vw !important;
    max-width: 100vw !important;
    border-left-width: 0 !important;
    border-right-width: 0 !important;
    border-radius: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Step headings: tidy spacing on mobile only */
  .ck-unified-slide-bg > h2:first-child {
    margin-top: 10px !important;
    margin-bottom: 12px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    line-height: 1.25 !important;
  }
}

/* Hide step headings on desktop to avoid duplication with navbar */
@media (min-width: 641px) {
  .ck-unified-slide-bg > h2:first-child { display: none !important; }
}

