/* ============================================================================
   KNOWLATHON INTERACTIVE LABS — BY VISHAL VYAS (v3.0)
   Visual Architecture Inspired by Serko.ai, Hamol Studio, Revolut & Traced.life
   Features: Ambient Aurora Mesh, Spatial Grid, Frosted Glass Bento Cards,
   Smooth Scroll-Reveal, Inline Check-In Drawer (No Popups) & Marquee Ribbon
   ============================================================================ */

:root, [data-theme="light"] {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface2: #eef2f7;
  --line: rgba(15, 23, 42, 0.08);
  --fg: #0f172a;
  --muted: #5b6778;
  --accent: #0d7a78;
  --accent-fg: #ffffff;
  --accent-soft: rgba(13, 122, 120, 0.10);
  --accent-gradient: linear-gradient(135deg, #0d7a78 0%, #0284c7 100%);
  --info: #0284c7;
  --info-soft: rgba(2, 132, 199, 0.10);
  --ok: #059669;
  --ok-soft: rgba(5, 150, 105, 0.11);
  --warn: #d97706;
  --warn-soft: rgba(217, 119, 6, 0.12);
  --bad: #dc2626;
  --bad-soft: rgba(220, 38, 38, 0.11);
  --display: 'Plus Jakarta Sans', 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: var(--display);
  --font-body: var(--body);

  /* Semantic tokens */
  --bg-main: var(--bg);
  --bg-elevated: rgba(255, 255, 255, 0.88);
  --bg-card: rgba(255, 255, 255, 0.78);
  --bg-card-hover: rgba(255, 255, 255, 0.95);
  --bg-subtle: rgba(241, 245, 249, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.82);
  --text-main: var(--fg);
  --text-secondary: #334155;
  --text-muted: var(--muted);
  --accent-primary: var(--accent);
  --accent-primary-hover: #0a5e5c;
  --accent-secondary: var(--info);
  --accent-indigo: #4f46e5;
  --border-color: var(--line);
  --border-highlight: rgba(13, 122, 120, 0.45);
  --success: var(--ok);
  --warning: var(--warn);
  --danger: var(--bad);
  --shadow-card: 0 12px 32px -12px rgba(15, 23, 42, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --shadow-hover: 0 20px 42px -14px rgba(13, 122, 120, 0.14), inset 0 1px 0 rgba(255, 255, 255, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #060a12;
    --surface: #0d1422;
    --surface2: #141e30;
    --line: rgba(255, 255, 255, 0.085);
    --fg: #f1f5f9;
    --muted: #94a3b8;
    --accent: #2dd4bf;
    --accent-fg: #042f2e;
    --accent-soft: rgba(45, 212, 191, 0.13);
    --accent-gradient: linear-gradient(135deg, #14b8a6 0%, #38bdf8 55%, #6366f1 100%);
    --info: #38bdf8;
    --info-soft: rgba(56, 189, 248, 0.13);
    --ok: #34d399;
    --ok-soft: rgba(52, 211, 153, 0.13);
    --warn: #fbbf24;
    --warn-soft: rgba(251, 191, 36, 0.14);
    --bad: #f87171;
    --bad-soft: rgba(248, 113, 113, 0.14);

    --bg-main: var(--bg);
    --bg-elevated: rgba(13, 20, 34, 0.86);
    --bg-card: rgba(15, 23, 42, 0.64);
    --bg-card-hover: rgba(20, 30, 50, 0.82);
    --bg-subtle: rgba(20, 30, 48, 0.72);
    --bg-glass: rgba(10, 15, 27, 0.78);
    --text-main: var(--fg);
    --text-secondary: #cbd5e1;
    --text-muted: var(--muted);
    --accent-primary: var(--accent);
    --accent-primary-hover: #14b8a6;
    --accent-secondary: var(--info);
    --accent-indigo: #818cf8;
    --border-color: var(--line);
    --border-highlight: rgba(45, 212, 191, 0.45);
    --success: var(--ok);
    --warning: var(--warn);
    --danger: var(--bad);
    --shadow-card: 0 18px 40px -16px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.09);
    --shadow-hover: 0 24px 48px -14px rgba(45, 212, 191, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.16);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #060a12;
  --surface: #0d1422;
  --surface2: #141e30;
  --line: rgba(255, 255, 255, 0.085);
  --fg: #f1f5f9;
  --muted: #94a3b8;
  --accent: #2dd4bf;
  --accent-fg: #042f2e;
  --accent-soft: rgba(45, 212, 191, 0.13);
  --accent-gradient: linear-gradient(135deg, #14b8a6 0%, #38bdf8 55%, #6366f1 100%);
  --info: #38bdf8;
  --info-soft: rgba(56, 189, 248, 0.13);
  --ok: #34d399;
  --ok-soft: rgba(52, 211, 153, 0.13);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, 0.14);
  --bad: #f87171;
  --bad-soft: rgba(248, 113, 113, 0.14);

  --bg-main: var(--bg);
  --bg-elevated: rgba(13, 20, 34, 0.86);
  --bg-card: rgba(15, 23, 42, 0.64);
  --bg-card-hover: rgba(20, 30, 50, 0.82);
  --bg-subtle: rgba(20, 30, 48, 0.72);
  --bg-glass: rgba(10, 15, 27, 0.78);
  --text-main: var(--fg);
  --text-secondary: #cbd5e1;
  --text-muted: var(--muted);
  --accent-primary: var(--accent);
  --accent-primary-hover: #14b8a6;
  --accent-secondary: var(--info);
  --accent-indigo: #818cf8;
  --border-color: var(--line);
  --border-highlight: rgba(45, 212, 191, 0.45);
  --success: var(--ok);
  --warning: var(--warn);
  --danger: var(--bad);
  --shadow-card: 0 18px 40px -16px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.09);
  --shadow-hover: 0 24px 48px -14px rgba(45, 212, 191, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--body);
  font-size: 15px;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  isolation: isolate;
  transition: background-color 0.35s cubic-bezier(0.16, 1, 0.3, 1), color 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

body[data-view="player"] {
  overflow: hidden;
}

body[data-view="player"] > header.navbar,
body[data-view="player"] > footer,
body[data-view="player"] #inlineCheckinWrapper {
  display: none !important;
}

/* Custom Sleek Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.28);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.48);
}

/* ==========================================================================
   AMBIENT LIVING BACKGROUND (SERKO / HAMOL / REVOLUT / TRACED INSPIRED)
   ========================================================================== */
.ambient-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.ambient-grid-mesh {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(148, 163, 184, 0.16) 1px, transparent 0);
  background-size: 30px 30px;
  mask-image: radial-gradient(ellipse 85% 70% at 50% 30%, #000 35%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 85% 70% at 50% 30%, #000 35%, transparent 100%);
  opacity: 0.7;
}

.aurora-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  will-change: transform;
  opacity: 0.26;
  animation: auroraDrift 24s ease-in-out infinite alternate;
}

[data-theme="light"] .aurora-orb {
  opacity: 0.20;
  filter: blur(100px);
}

.aurora-orb-1 {
  width: 580px;
  height: 580px;
  top: -180px;
  left: -120px;
  background: radial-gradient(circle, #14b8a6 0%, #0284c7 65%, transparent 100%);
  animation-duration: 24s;
}

.aurora-orb-2 {
  width: 520px;
  height: 520px;
  top: 12%;
  right: -140px;
  background: radial-gradient(circle, #6366f1 0%, #38bdf8 65%, transparent 100%);
  animation-duration: 29s;
  animation-delay: -8s;
}

.aurora-orb-3 {
  width: 480px;
  height: 480px;
  bottom: -160px;
  left: 30%;
  background: radial-gradient(circle, #0d9488 0%, #818cf8 65%, transparent 100%);
  animation-duration: 21s;
  animation-delay: -14s;
}

@keyframes auroraDrift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(48px, 34px, 0) scale(1.09);
  }
  100% {
    transform: translate3d(-38px, 52px, 0) scale(0.94);
  }
}

/* Main portal layers use natural stacking so fullscreen player-shell (z-index: 150) is never trapped */

h1, h2, h3, h4, .brand-title, .hero-title, .kpi-value {
  font-family: var(--display);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* ==========================================================================
   FLOATING GLASS NAVBAR
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--border-color);
  transition: background 0.25s ease;
}

.nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--accent-gradient);
  color: #ffffff;
  font-family: var(--display);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
  box-shadow: 0 6px 16px -4px rgba(13, 122, 120, 0.45);
}

.brand-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.08rem;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.brand-sub {
  font-size: 0.73rem;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.nav-btn {
  padding: 0.44rem 0.85rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.84rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

.nav-btn.active {
  background: var(--accent-soft);
  border-color: var(--border-highlight);
  color: var(--accent-primary);
}

.btn-primary {
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--accent-gradient);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.86rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  box-shadow: 0 8px 20px -6px rgba(13, 122, 120, 0.42);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 12px 26px -6px rgba(13, 122, 120, 0.55);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

.btn-secondary {
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.84rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-card-hover);
  border-color: var(--border-highlight);
  transform: translateY(-1px);
}

/* ==========================================================================
   LAYOUT & SCROLL-REVEAL CHOREOGRAPHY
   ========================================================================== */
.main-container {
  max-width: 1220px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

.kl-reveal {
  animation: klRevealUp 0.52s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.kl-delay-1, .kl-reveal-d1 { animation-delay: 0.06s; }
.kl-delay-2, .kl-reveal-d2 { animation-delay: 0.12s; }
.kl-delay-3, .kl-reveal-d3 { animation-delay: 0.18s; }

@keyframes klRevealUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   INLINE CHECK-IN DRAWER (NO POPUPS POLICY)
   ========================================================================== */
.inline-checkin-drawer {
  display: none;
  margin: 1rem 0 0.5rem;
}

.inline-checkin-drawer.open {
  display: block;
  animation: klRevealUp 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.inline-checkin-card {
  background: var(--bg-card);
  backdrop-filter: blur(24px) saturate(170%);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  border: 1px solid var(--border-highlight);
  border-radius: 20px;
  padding: 1.35rem 1.5rem;
  box-shadow: var(--shadow-hover);
}

/* ==========================================================================
   HERO SECTION (CURATED, SPACIOUS & EDITORIAL)
   ========================================================================== */
.hero-card {
  position: relative;
  overflow: hidden;
  background: var(--bg-card);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 2.2rem 2.4rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 2rem;
  display: grid;
  grid-template-columns: 1.38fr 1fr;
  gap: 2.2rem;
  align-items: center;
}

@media (max-width: 960px) {
  .hero-card {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }
}

.eyebrow-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--border-highlight);
  color: var(--accent-primary);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.hero-title {
  font-family: var(--display);
  font-size: clamp(1.85rem, 3.2vw, 2.55rem);
  font-weight: 800;
  letter-spacing: -0.028em;
  line-height: 1.14;
  margin: 0.65rem 0 0.75rem;
}

.hero-sub {
  font-size: 0.98rem;
  color: var(--text-secondary);
  margin: 0 0 1.2rem;
  max-width: 620px;
  line-height: 1.6;
}

.credential-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.35rem;
}

.cred-pill {
  padding: 0.28rem 0.72rem;
  border-radius: 999px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Instructor Spotlight Card inside Hero */
.instructor-card {
  background: var(--bg-subtle);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 1.35rem;
  position: relative;
  box-shadow: var(--shadow-card);
}

.instructor-photo-wrap {
  width: 76px;
  height: 76px;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid var(--accent-primary);
  flex-shrink: 0;
  background: var(--bg-card);
  box-shadow: 0 8px 20px -6px rgba(13, 122, 120, 0.35);
}

.instructor-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* ==========================================================================
   COMPACT 4-PILLAR BENTO STRIP
   ========================================================================== */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  gap: 0.95rem;
  margin-bottom: 2.2rem;
}

.benefit-card {
  background: var(--bg-card);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s ease, box-shadow 0.22s ease;
}

.benefit-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-highlight);
  box-shadow: var(--shadow-hover);
}

.benefit-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent-primary);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ==========================================================================
   CURATED BENTO COURSE CARDS & COMPACT SIMULATOR ROWS
   ========================================================================== */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.25rem;
}

@media (max-width: 600px) {
  .courses-grid {
    grid-template-columns: 1fr;
  }
}

.course-card {
  background: var(--bg-card);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 1.45rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s ease, box-shadow 0.26s ease;
  cursor: pointer;
}

.course-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-highlight);
  box-shadow: var(--shadow-hover);
}

/* Compact Simulator Row inside Course Bento Card */
.sim-compact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.68rem 0.85rem;
  border-radius: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  margin-bottom: 0.5rem;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.sim-compact-row:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-highlight);
  transform: translateX(2px);
}

.sim-compact-title {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  min-width: 0;
  flex: 1 1 0%;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.38;
}

.sim-compact-title-text {
  min-width: 0;
  flex: 1;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.benefit-desc-text,
.instructor-bio-text,
.course-desc-text,
.testimonial-quote-text {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Guarantee full text visibility by default and on hover across all boxes */
.benefit-card:hover *,
.instructor-card:hover *,
.course-card:hover *,
.sim-compact-row:hover *,
.sim-card:hover *,
.testimonial-card:hover * {
  -webkit-line-clamp: unset !important;
  text-overflow: clip !important;
}

.sim-compact-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.sim-compact-launch {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-primary);
  padding: 0.22rem 0.58rem;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--border-highlight);
  transition: background 0.18s ease, color 0.18s ease;
}

.sim-compact-row:hover .sim-compact-launch {
  background: var(--accent-primary);
  color: #ffffff;
}

.sim-preview-box {
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  margin-bottom: 0.55rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.sim-preview-box:hover {
  border-color: var(--border-highlight);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.sim-benefit-list {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.sim-benefit-list li {
  margin-bottom: 0.2rem;
}

/* Curated Simulator Card inside Course Detail */
.sim-card {
  background: var(--bg-card);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 1.45rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s ease, box-shadow 0.25s ease;
}

.sim-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-highlight);
  box-shadow: var(--shadow-hover);
}

/* Progressive Disclosure Details Drawer */
details.kl-details {
  border-radius: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  padding: 0.55rem 0.85rem;
  margin-bottom: 0.5rem;
  font-size: 0.81rem;
}

details.kl-details summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--accent-primary);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

details.kl-details summary::-webkit-details-marker {
  display: none;
}

details.kl-details summary::after {
  content: '+ View Key Outcomes';
  font-size: 0.72rem;
  opacity: 0.8;
}

details.kl-details[open] summary::after,
details.kl-details:hover summary::after,
.sim-card:hover details.kl-details summary::after {
  content: '− Hide';
}

.kl-details-body {
  padding-top: 0.55rem;
}

/* Reveal Key Outcomes automatically when hovering on the box or details drawer */
details.kl-details:not([open]):hover .kl-details-body,
.sim-card:hover details.kl-details:not([open]) .kl-details-body {
  display: block;
}

/* ==========================================================================
   SMOOTH HORIZONTAL TESTIMONIAL MARQUEE RIBBON
   ========================================================================== */
.marquee-viewport {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 0.5rem 0 0.75rem;
  mask-image: linear-gradient(to right, transparent 0%, #000 6%, #000 94%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 6%, #000 94%, transparent 100%);
}

.marquee-track {
  display: flex;
  gap: 1rem;
  width: max-content;
  animation: klMarqueeScroll 52s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

@keyframes klMarqueeScroll {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

.testimonial-card {
  width: 330px;
  flex-shrink: 0;
  background: var(--bg-card);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 1.2rem 1.3rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.testimonial-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-highlight);
}

/* ==========================================================================
   BADGES & PILLS
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.62rem;
  border-radius: 999px;
  font-size: 0.71rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-free {
  background: var(--ok-soft);
  color: var(--ok);
}

.badge-paid {
  background: var(--warn-soft);
  color: var(--warn);
}

.badge-version {
  background: var(--info-soft);
  color: var(--info);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.badge-kind {
  background: var(--accent-soft);
  color: var(--accent-primary);
}

/* ==========================================================================
   FULLSCREEN SIMULATOR PLAYER SHELL
   ========================================================================== */
.player-shell {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  z-index: 150;
  background: var(--bg-main);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.player-topbar {
  min-height: 54px;
  padding: 0.4rem 1.15rem;
  background: var(--bg-glass);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.heartbeat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.75rem;
  border-radius: 99px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  font-size: 0.78rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.55);
  animation: pulseGreen 1.8s infinite;
}

.pulse-dot.paused {
  background: var(--warn);
  animation: none;
}

@keyframes pulseGreen {
  0% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(5, 150, 105, 0); }
  100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}

.player-iframe {
  flex: 1;
  width: 100%;
  border: none;
  background: var(--bg-main);
}

/* ==========================================================================
   ADMIN DASHBOARD TABLES, FORMS & TOAST
   ========================================================================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.kpi-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow-card);
}

.kpi-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
}

.kpi-value {
  font-family: var(--display);
  font-size: 1.75rem;
  font-weight: 800;
  margin: 0.25rem 0 0.15rem;
  letter-spacing: -0.02em;
}

.data-table-wrap {
  overflow-x: auto;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table th, .data-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.data-table th {
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.data-table tr:hover td {
  background: var(--bg-subtle);
}

/* Modals (Reserved only for Admin Console / QR Studio) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(6, 10, 18, 0.58);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.modal-card {
  width: 100%;
  max-width: 480px;
  background: var(--bg-elevated);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 1.65rem;
  box-shadow: 0 24px 48px -12px rgba(6, 10, 18, 0.38);
}

.form-group {
  margin-bottom: 0.9rem;
}

.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 0.32rem;
  color: var(--text-muted);
}

.form-input {
  width: 100%;
  padding: 0.58rem 0.78rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-main);
  color: var(--text-main);
  font-size: 0.9rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.upload-dropzone {
  border: 2px dashed var(--border-color);
  border-radius: 16px;
  padding: 1.75rem;
  text-align: center;
  background: var(--bg-subtle);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.upload-dropzone:hover, .upload-dropzone.dragover {
  border-color: var(--accent-primary);
  background: var(--accent-soft);
}

.toast-notification {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  background: rgba(15, 23, 42, 0.92);
  color: #f8fafc;
  border: 1px solid rgba(45, 212, 191, 0.35);
  backdrop-filter: blur(16px);
  padding: 0.68rem 1.2rem;
  border-radius: 999px;
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.38);
  font-weight: 600;
  font-size: 0.85rem;
  display: none;
  align-items: center;
  gap: 0.5rem;
}
