/* ==========================================================================
   NoTheory – Senior Enterprise B2B Design System (Stripe × Notion Aesthetic)
   Authoritative Light Mode default (#F6F5F2 / #111111) + Precision Dark Mode
   Architectural 1px hairlines, editorial typography, zero AI clichés.
   ========================================================================== */

/* ---------- Color Tokens: Light (Stripe × Notion Default) ---------- */
:root,
[data-theme="light"] {
  color-scheme: light;
  --bg: #F6F5F2;
  --bg-2: #EFECE6;
  --surface: #FFFFFF;
  --surface-subtle: #EFECE6;
  --surface-hover: #FAF9F6;
  --panel: #FFFFFF;
  --panel-solid: #FFFFFF;
  --line: #E5E2DA;
  --line-strong: #D1CDC4;
  --text: #111111;
  --muted: #555550;
  --subtle: #888882;
  --card-bg: #FFFFFF;
  --card-border: #E5E2DA;
  --card-hover-border: #111111;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-lg: 0 4px 14px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 12px 28px -4px rgba(0, 0, 0, 0.08);
  --accent: #1D4ED8;
  --accent-hover: #1E40AF;
  --accent-subtle: #EFF6FF;
  --indigo: #1D4ED8;
  --indigo-2: #2563EB;
  --indigo-subtle: #EFF6FF;
  --emerald: #059669;
  --emerald-2: #10B981;
  --emerald-subtle: #ECFDF5;
  --amber: #B45309;
  --amber-subtle: #FFFBEB;
  --rose: #BE123C;
  --rose-subtle: #FFF1F2;
  --sky: #0369A1;
  --violet: #4338CA;
  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 8px;
  --grad: none;
}

/* ---------- Color Tokens: Dark Mode (Obsidian / Graphite) ---------- */
[data-theme="dark"],
html.dark {
  color-scheme: dark;
  --bg: #0C0D0E;
  --bg-2: #141618;
  --surface: #181A1D;
  --surface-subtle: #202327;
  --surface-hover: #24282D;
  --panel: #181A1D;
  --panel-solid: #141618;
  --line: #26292E;
  --line-strong: #383D45;
  --text: #F2F1EE;
  --muted: #9E9E98;
  --subtle: #686862;
  --card-bg: #181A1D;
  --card-border: #26292E;
  --card-hover-border: #4B5563;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.7);
  --accent: #3B82F6;
  --accent-hover: #60A5FA;
  --accent-subtle: rgba(59, 130, 246, 0.12);
  --indigo: #3B82F6;
  --indigo-2: #60A5FA;
  --indigo-subtle: rgba(59, 130, 246, 0.12);
  --emerald: #10B981;
  --emerald-2: #34D399;
  --emerald-subtle: rgba(16, 185, 129, 0.12);
  --amber: #F59E0B;
  --amber-subtle: rgba(245, 158, 11, 0.12);
  --rose: #F43F5E;
  --rose-subtle: rgba(244, 63, 94, 0.12);
  --sky: #38BDF8;
  --violet: #818CF8;
  --grad: none;
}

/* ---------- Global Reset & Typography ---------- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  max-width: 100%;
  background-color: var(--bg);
  color: var(--text);
  color-scheme: light;
}

html.dark,
[data-theme="dark"] {
  color-scheme: dark;
}

body {
  margin: 0;
  max-width: 100%;
  overflow-x: clip;
  background-color: transparent;
  color: var(--text);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: #111111;
  color: #FFFFFF;
}
html.dark ::selection {
  background: #3B82F6;
  color: #FFFFFF;
}

a {
  color: inherit;
}

.mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(136, 136, 130, 0.35) transparent;
}

*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

*::-webkit-scrollbar-thumb {
  background: rgba(136, 136, 130, 0.3);
  border-radius: 4px;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(136, 136, 130, 0.5);
}

*::-webkit-scrollbar-track {
  background: transparent;
}

/* ---------- Ambient Background: Architectural Hairline Grid ---------- */
.nt-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: transparent;
  background-image: 
    linear-gradient(to right, rgba(229, 226, 218, 0.45) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(229, 226, 218, 0.45) 1px, transparent 1px);
  background-size: 32px 32px;
}

html.dark .nt-bg,
[data-theme="dark"] .nt-bg {
  background-image: 
    linear-gradient(to right, rgba(38, 41, 46, 0.55) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(38, 41, 46, 0.55) 1px, transparent 1px);
}

.blob {
  display: none !important;
}

/* Eliminate AI blob artifacts */

/* ---------- Typography & Section Indexing ---------- */
.text-grad,
.text-grad-anim {
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  color: var(--text) !important;
}

.eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
}

.tech-index {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--subtle);
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

@media (max-width: 640px) {
  .tech-index {
    font-size: 0.66rem;
    letter-spacing: 0.07em;
  }
}

.tech-index .sep {
  color: var(--line-strong);
}

.divider {
  height: 1px;
  background: var(--line);
}

/* ---------- Bento Grid & Layout ---------- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.25rem;
}

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

/* ---------- Surfaces & Cards ---------- */
.glass {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

.glass-strong {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  color: var(--text);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.card-hover:hover {
  border-color: var(--card-hover-border);
  box-shadow: var(--shadow);
}

/* ---------- Buttons (Tactile Stripe × Notion Precision) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.86rem;
  line-height: 1.25;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
  text-decoration: none;
  user-select: none;
}

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

.btn:disabled,
.btn[aria-disabled='true'] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Primary Button: Solid Carbon in Light Mode, Crisp White in Dark Mode */
.btn-primary {
  color: #FFFFFF !important;
  background: #111111;
  border-color: #111111;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-primary:hover:not(:disabled) {
  background: #242424;
  border-color: #242424;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

html.dark .btn-primary,
[data-theme="dark"] .btn-primary {
  color: #111111 !important;
  background: #F2F1EE;
  border-color: #F2F1EE;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

html.dark .btn-primary:hover:not(:disabled),
[data-theme="dark"] .btn-primary:hover:not(:disabled) {
  background: #FFFFFF;
  border-color: #FFFFFF;
  box-shadow: 0 3px 10px rgba(255, 255, 255, 0.2);
}

/* Category filter count badge inside buttons (Light & Dark, Active & Inactive) */
.cat-pill-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  line-height: 1.1;
  background: rgba(15, 23, 42, 0.08);
  color: #111111 !important;
  border: 1px solid rgba(15, 23, 42, 0.14);
}

.btn-primary .cat-pill-count {
  background: rgba(255, 255, 255, 0.22);
  color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

html.dark .cat-pill-count,
[data-theme="dark"] .cat-pill-count {
  background: rgba(255, 255, 255, 0.1);
  color: #F2F1EE !important;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

html.dark .btn-primary .cat-pill-count,
[data-theme="dark"] .btn-primary .cat-pill-count {
  background: rgba(17, 17, 17, 0.14);
  color: #111111 !important;
  border: 1px solid rgba(17, 17, 17, 0.25);
}

.btn-emerald {
  color: #FFFFFF !important;
  background: #059669;
  border-color: #047857;
  box-shadow: 0 1px 2px rgba(5, 150, 105, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-emerald:hover:not(:disabled) {
  background: #047857;
  border-color: #065F46;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.3);
}

.btn-amber {
  color: #78350F !important;
  background: #FEF3C7;
  border-color: #FDE68A;
  font-weight: 600;
}

.btn-amber:hover:not(:disabled) {
  background: #FDE68A;
}

html.dark .btn-amber,
[data-theme="dark"] .btn-amber {
  color: #FEF3C7 !important;
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.4);
}

.btn-ghost {
  color: var(--text);
  background: transparent;
  border-color: var(--line);
  box-shadow: var(--shadow-xs);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--surface-subtle);
  border-color: var(--line-strong);
  color: var(--text);
}

.btn-danger {
  color: #BE123C !important;
  background: #FFF1F2;
  border-color: #FECDD3;
}

.btn-danger:hover:not(:disabled) {
  background: #E11D48;
  color: #FFFFFF !important;
  border-color: #E11D48;
}

html.dark .btn-danger,
[data-theme="dark"] .btn-danger {
  color: #FECDD3 !important;
  background: rgba(244, 63, 94, 0.14);
  border-color: rgba(244, 63, 94, 0.32);
}

html.dark .btn-danger:hover:not(:disabled),
[data-theme="dark"] .btn-danger:hover:not(:disabled) {
  background: #E11D48;
  color: #FFFFFF !important;
}

.btn-bug-report {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.7rem 0.95rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.8rem;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  color: #FFFFFF !important;
  background: linear-gradient(135deg, #DC2626 0%, #E11D48 100%);
  border: 1px solid #B91C1C;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn-bug-report:hover:not(:disabled) {
  filter: brightness(1.08);
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.38);
  transform: translateY(-1px);
}

.btn-bug-report:active:not(:disabled) {
  transform: scale(0.99);
}

.btn-bug-report-sm {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.36rem 0.72rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.76rem;
  line-height: 1.2;
  color: #FFFFFF !important;
  background: #DC2626;
  border: 1px solid #B91C1C;
  box-shadow: 0 1px 4px rgba(220, 38, 38, 0.25);
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.btn-bug-report-sm:hover:not(:disabled) {
  background: #B91C1C;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.38);
}

.btn-sm {
  padding: 0.36rem 0.72rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-xs {
  padding: 0.22rem 0.52rem;
  font-size: 0.72rem;
  border-radius: 4px;
  font-weight: 600;
  line-height: 1.2;
}

.btn-lg {
  padding: 0.7rem 1.35rem;
  font-size: 0.92rem;
  border-radius: var(--radius);
}

.btn-icon {
  padding: 0.45rem;
  border-radius: 8px;
}

.btn .spin {
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Form Fields ---------- */
.field {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border-radius: 9px;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

.field:focus {
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
  background: var(--bg-2);
}

.field::placeholder {
  color: var(--subtle);
}

.field.is-invalid {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.12);
}

select.field {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 52%, calc(100% - 11px) 52%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2rem;
}

select.field option {
  background: var(--bg-2);
  color: var(--text);
}

textarea.field {
  resize: vertical;
  line-height: 1.55;
}

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

.switcher {
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 0.35rem 0.55rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: border-color 0.18s;
}

.switcher:focus {
  border-color: var(--indigo);
}

.switcher option {
  background: var(--bg-2);
  color: var(--text);
}

/* ---------- Chips, Badges & Status Pills ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--surface-subtle);
  color: var(--text);
  white-space: nowrap;
}

.chip-indigo {
  background: var(--indigo-subtle);
  border-color: rgba(99, 102, 241, 0.25);
  color: #4338ca;
}

html.dark .chip-indigo,
[data-theme="dark"] .chip-indigo {
  color: #c7d2fe;
}

.chip-emerald {
  background: var(--emerald-subtle);
  border-color: rgba(16, 185, 129, 0.28);
  color: #065f46;
}

html.dark .chip-emerald,
[data-theme="dark"] .chip-emerald {
  color: #a7f3d0;
}

.chip-amber {
  background: var(--amber-subtle);
  border-color: rgba(245, 158, 11, 0.28);
  color: #92400e;
}

html.dark .chip-amber,
[data-theme="dark"] .chip-amber {
  color: #fde68a;
}

.chip-rose {
  background: var(--rose-subtle);
  border-color: rgba(244, 63, 94, 0.28);
  color: #9f1239;
}

html.dark .chip-rose,
[data-theme="dark"] .chip-rose {
  color: #fecdd3;
}

.chip-sky {
  background: #f0f9ff;
  border-color: rgba(14, 165, 233, 0.25);
  color: #075985;
}

html.dark .chip-sky,
[data-theme="dark"] .chip-sky {
  background: rgba(14, 165, 233, 0.15);
  color: #bae6fd;
}

.chip-violet {
  background: #f5f3ff;
  border-color: rgba(139, 92, 246, 0.25);
  color: #5b21b6;
}

html.dark .chip-violet,
[data-theme="dark"] .chip-violet {
  background: rgba(139, 92, 246, 0.15);
  color: #ddd6fe;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex: none;
}

.dot-live {
  background: var(--emerald);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55);
  }

  70% {
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* ---------- Motion & Reveals ---------- */
.reveal {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.fade-in {
  animation: fadeIn 0.2s ease both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.skeleton {
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.12) 25%, rgba(148, 163, 184, 0.24) 37%, rgba(148, 163, 184, 0.12) 63%);
  background-size: 400% 100%;
  animation: skeleton 1.4s ease infinite;
  border-radius: 8px;
}

@keyframes skeleton {
  0% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0 50%;
  }
}

/* ---------- Navigation Header ---------- */
.nav-blur {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  color: var(--text);
}

header.nav-blur {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
}

header.nav-blur.fixed {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100%;
  z-index: 50 !important;
}

html.dark .nav-blur,
[data-theme="dark"] .nav-blur {
  background: rgba(9, 13, 22, 0.92);
  border-bottom: 1px solid var(--line);
}

.nav-link {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.38rem 0.7rem;
  border-radius: 8px;
  transition: color 0.18s, background 0.18s;
}

.nav-link:hover {
  color: var(--text);
  background: var(--surface-subtle);
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: url('/brand/favicon.svg') center/cover no-repeat, #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  color: transparent;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25);
  flex-shrink: 0;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

html.dark .logo-mark,
[data-theme="dark"] .logo-mark {
  background: url('/brand/favicon.svg') center/cover no-repeat, #4f46e5;
  box-shadow: 0 2px 10px rgba(79, 70, 229, 0.35);
}

/* ---------- Toasts ---------- */
.nt-toasts {
  position: fixed;
  z-index: 9999;
  right: 18px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(420px, calc(100vw - 36px));
  pointer-events: none;
}

.nt-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 0.88rem;
  box-shadow: var(--shadow-lg);
  transform: translateY(10px);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nt-toast.show {
  transform: none;
  opacity: 1;
}

.nt-toast-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex: none;
  background: var(--indigo);
}

.nt-toast-success .nt-toast-dot {
  background: var(--emerald);
}

.nt-toast-error .nt-toast-dot {
  background: var(--rose);
}

.nt-toast-warn .nt-toast-dot {
  background: var(--amber);
}

/* ---------- Modal ---------- */
.nt-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 6vh 16px 16px;
  overflow-y: auto;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.nt-modal-overlay.show {
  opacity: 1;
}

.nt-modal {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-xl);
  color: var(--text);
  transform: translateY(10px) scale(0.99);
  transition: transform 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.nt-modal-overlay.show .nt-modal {
  transform: none;
}

.nt-modal-wide {
  max-width: 860px;
}

.nt-modal-x {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-subtle);
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  transition: background 0.18s, color 0.18s;
}

.nt-modal-x:hover {
  background: var(--line);
  color: var(--text);
}

.nt-confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10000;
}

/* ---------- Score Rings & Progress Bars ---------- */
.ring {
  --p: 0;
  --c: var(--emerald);
  --size: 110px;
  --w: 8px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--line) 0);
  position: relative;
  transition: --p 1s ease;
}

.ring::before {
  content: '';
  position: absolute;
  inset: var(--w);
  border-radius: 50%;
  background: var(--surface);
}

.ring>* {
  position: relative;
}

@property --p {
  syntax: '<number>';
  inherits: false;
  initial-value: 0;
}

.bar {
  height: 7px;
  border-radius: 7px;
  background: var(--line);
  overflow: hidden;
}

.bar>span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--indigo), var(--emerald));
  transition: width 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.seat-bar {
  height: 8px;
  border-radius: 9999px;
  background: var(--line);
  overflow: hidden;
  position: relative;
}

.seat-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--indigo), var(--accent));
  transition: width 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.seat-bar.full > span {
  background: linear-gradient(90deg, var(--amber), var(--rose));
}

.seat-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.seat-dots > i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
  transition: background 0.2s ease;
}

.seat-dots > i.on {
  background: var(--accent);
}

/* ==========================================================================
   Dashboard Shell & Components
   ========================================================================== */
.dash-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  background: var(--bg);
}

.sidebar {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: var(--bg-2);
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 1.5px;
  z-index: 30;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.25) transparent;
}

.sidebar::-webkit-scrollbar {
  width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.25);
  border-radius: 4px;
}

.side-section {
  font-size: 0.63rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
  padding: 6px 8px 1px;
}

.side-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.18s, color 0.18s;
  position: relative;
}

.side-link:hover {
  background: var(--surface-subtle);
  color: var(--text);
}

.side-link.active {
  background: var(--indigo-subtle);
  color: var(--indigo);
  font-weight: 600;
}

.side-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--indigo);
}

.side-link .ico {
  width: 18px;
  text-align: center;
  display: inline-flex;
  justify-content: center;
}

.main-area {
  min-width: 0;
  padding: 24px clamp(16px, 3vw, 40px) 60px;
}

/* KPI Cards */
.kpi {
  padding: 18px;
  border-radius: var(--radius);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.kpi-value {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

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

/* Modern Enterprise Tables */
.nt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.nt-table th {
  text-align: left;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-subtle);
  white-space: nowrap;
}

.nt-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  color: var(--text);
}

.nt-table tbody tr {
  transition: background 0.15s;
}

.nt-table tbody tr:hover {
  background: var(--surface-subtle);
}

.matrix-cell {
  width: 32px;
  height: 26px;
  border-radius: 6px;
  display: inline-grid;
  place-items: center;
  font-size: 0.68rem;
  font-weight: 700;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.78rem;
  color: #ffffff;
  flex: none;
  background: linear-gradient(135deg, #4f46e5, #059669);
}

/* Training Map */
.track-card {
  position: relative;
  overflow: hidden;
}

.track-glow {
  display: none;
}

/* Remove glowing blobs */
.lesson-path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.lesson-node {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  border: 1px solid var(--line-strong);
  background: var(--card-bg);
  color: var(--muted);
  text-decoration: none;
  position: relative;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.lesson-node:hover:not(.locked) {
  transform: translateY(-2px);
  border-color: var(--indigo);
  box-shadow: 0 6px 16px -4px rgba(79, 70, 229, 0.3);
}

.lesson-node.passed {
  background: var(--emerald-subtle);
  border-color: var(--emerald);
  color: var(--emerald);
}

.lesson-node.current {
  border-color: var(--indigo);
  color: var(--indigo);
  background: var(--indigo-subtle);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.lesson-node.locked {
  opacity: 0.45;
  cursor: not-allowed;
}

.lesson-node .tip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--text);
  color: var(--bg);
  border: 1px solid var(--line-strong);
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  white-space: normal;
  max-width: 220px;
  width: max-content;
  text-align: center;
  line-height: 1.3;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
  z-index: 40;
}

#arenaSteps {
  scrollbar-width: thin;
}

#arenaSteps .lesson-node .tip {
  display: none;
}

.lesson-node:hover .tip {
  opacity: 1;
  transform: translateX(-50%);
}

.lesson-link {
  width: 12px;
  height: 2px;
  background: var(--line);
  border-radius: 2px;
}

.lesson-link.done {
  background: var(--emerald);
}

.banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
}

.banner-amber {
  background: var(--amber-subtle);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #92400e;
}

html.dark .banner-amber,
[data-theme="dark"] .banner-amber {
  color: #fde68a;
}

.banner-rose {
  background: var(--rose-subtle);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #9f1239;
}

html.dark .banner-rose,
[data-theme="dark"] .banner-rose {
  color: #fecdd3;
}

.banner-indigo {
  background: var(--indigo-subtle);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #4338ca;
}

html.dark .banner-indigo,
[data-theme="dark"] .banner-indigo {
  color: #c7d2fe;
}

.banner-emerald {
  background: var(--emerald-subtle);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #065f46;
}

html.dark .banner-emerald,
[data-theme="dark"] .banner-emerald {
  color: #a7f3d0;
}

/* Demo Role Banner & Top Dashboard Bar – Pinned on Scroll */
#banners {
  position: -webkit-sticky;
  position: sticky;
  top: 12px;
  z-index: 35;
}

@media (max-width: 1023px) {
  #banners {
    top: 64px;
  }
}

.demo-role-banner {
  opacity: 1 !important;
  transform: none !important;
  background: linear-gradient(135deg, rgba(240, 244, 255, 0.96) 0%, rgba(255, 255, 255, 0.98) 55%, rgba(250, 245, 255, 0.96) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid #D6E0FF;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.1);
}
[data-theme="dark"] .demo-role-banner,
html.dark .demo-role-banner {
  opacity: 1 !important;
  transform: none !important;
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.94) 0%, rgba(15, 23, 42, 0.96) 50%, rgba(59, 7, 100, 0.92) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(99, 102, 241, 0.35);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
}

.demo-role-icon {
  font-size: 1.5rem;
  display: inline-block;
  animation: pulse 2s infinite ease-in-out;
}

.demo-role-badge {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #3730A3;
}
[data-theme="dark"] .demo-role-badge,
html.dark .demo-role-badge {
  color: #A5B4FC;
}

.demo-role-hint {
  font-size: 0.84rem;
  color: #475569;
  margin-top: 1px;
}
[data-theme="dark"] .demo-role-hint,
html.dark .demo-role-hint {
  color: #CBD5E1;
}

.demo-role-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: #E8EEFB;
  border: 1px solid #D1D5DB;
}
[data-theme="dark"] .demo-role-switcher,
html.dark .demo-role-switcher {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(51, 65, 85, 0.7);
}

.demo-role-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  background: transparent;
  color: #4B5563;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.demo-role-btn:hover:not(.active) {
  color: #111827;
  background: rgba(255, 255, 255, 0.7);
}
[data-theme="dark"] .demo-role-btn,
html.dark .demo-role-btn {
  color: #94A3B8;
}
[data-theme="dark"] .demo-role-btn:hover:not(.active),
html.dark .demo-role-btn:hover:not(.active) {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.08);
}

.demo-role-btn.active {
  background: #1D4ED8;
  color: #FFFFFF;
  box-shadow: 0 1px 4px rgba(29, 78, 216, 0.35);
  font-weight: 700;
  border-color: #1D4ED8;
}
[data-theme="dark"] .demo-role-btn.active,
html.dark .demo-role-btn.active {
  background: #3B82F6;
  color: #FFFFFF;
  box-shadow: 0 1px 6px rgba(59, 130, 246, 0.4);
  border-color: #3B82F6;
}

.demo-role-status {
  font-size: 0.72rem;
  opacity: 0.9;
  margin-left: 2px;
}

.demo-sandbox-footer {
  border-top: 1px solid #E2E8F0;
}
[data-theme="dark"] .demo-sandbox-footer,
html.dark .demo-sandbox-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.demo-sandbox-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: #111827;
}
[data-theme="dark"] .demo-sandbox-title,
html.dark .demo-sandbox-title {
  color: #FFFFFF;
}

.demo-sandbox-text {
  font-size: 0.76rem;
  color: #6B7280;
  margin-top: 2px;
  line-height: 1.4;
}
[data-theme="dark"] .demo-sandbox-text,
html.dark .demo-sandbox-text {
  color: #94A3B8;
}

/* Universal Segmented Tab Controls */
.tab-list {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border-radius: 10px;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.tab-btn:hover:not(.active) {
  color: var(--text);
  background: var(--surface-hover);
}
.tab-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  font-weight: 700;
  border-color: var(--line);
}
[data-theme="dark"] .tab-btn.active,
html.dark .tab-btn.active {
  background: var(--surface);
  border-color: var(--line-strong);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.tab-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.06);
  padding: 1px 6px;
  border-radius: 9999px;
  margin-left: 4px;
}

.tab-btn.active .tab-badge {
  color: var(--text);
  background: rgba(99, 102, 241, 0.14);
}

[data-theme="dark"] .tab-badge,
html.dark .tab-badge {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .tab-btn.active .tab-badge,
html.dark .tab-btn.active .tab-badge {
  color: #FFFFFF;
  background: rgba(99, 102, 241, 0.28);
}

/* ==========================================================================
   Arena (Split Screen: Clean Documentation Left + Professional Workspace Right)
   ========================================================================== */
.arena-shell {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}

.arena-shell .nav-blur {
  border-bottom: 1px solid var(--line);
}

.arena-split {
  flex: 1;
  min-height: 0;
  display: flex;
  position: relative;
}

/* Left Panel: Clean, crisp document panel */
.arena-left {
  width: var(--left-w, 31%);
  min-width: 280px;
  max-width: 58%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  position: relative;
  z-index: 5;
}

.arena-left-scroll {
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  min-height: 0;
}

.arena-left .panel {
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}

.arena-left .bubble-ai {
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  color: var(--text);
}

/* Resizing Divider */
.arena-divider {
  width: 8px;
  cursor: col-resize;
  flex: none;
  position: relative;
  background: var(--surface-subtle);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  transition: background 0.18s;
  z-index: 6;
}

.arena-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 36px;
  transform: translate(-50%, -50%);
  border-radius: 4px;
  background: var(--muted);
  opacity: 0.5;
  transition: all 0.18s;
}

.arena-divider:hover,
.arena-divider.dragging {
  background: var(--line);
}

.arena-divider:hover::after,
.arena-divider.dragging::after {
  background: var(--indigo);
  height: 50px;
  opacity: 1;
}

/* Right Panel: Focused, Clean Workspace */
.arena-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
  background: var(--bg);
  overflow: hidden;
}

.arena-right::before {
  display: none;
}

.arena-work {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.arena-foot {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  position: relative;
  z-index: 2;
}

/* Tasks & Interactive Rubrics */
.panel {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.task-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: background 0.18s, border-color 0.18s;
  cursor: pointer;
}

.task-row:hover {
  background: var(--surface-subtle);
  border-color: var(--line);
}

.task-ico {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  flex: none;
  margin-top: 1px;
  border: 1.5px solid var(--line-strong);
  color: var(--muted);
  transition: all 0.2s;
}

.task-row.ok .task-ico {
  background: var(--emerald);
  border-color: var(--emerald);
  color: #ffffff;
}

.task-row.partial .task-ico {
  border-color: var(--amber);
  color: var(--amber);
}

/* Quizzes & AI Tutor Chat */
.quiz-card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.quiz-card.is-ok {
  border-color: var(--emerald);
}

.quiz-card.is-bad {
  border-color: var(--rose);
}

.quiz-opt {
  width: 100%;
  text-align: left;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 11px 14px;
  margin-top: 8px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
}

.quiz-opt:hover:not(:disabled) {
  border-color: var(--indigo);
  background: var(--indigo-subtle);
}

.quiz-opt .letter {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  flex: none;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.78rem;
  background: var(--surface-subtle);
  color: var(--muted);
}

.quiz-opt.selected {
  border-color: var(--indigo);
  background: var(--indigo-subtle);
}

.quiz-opt.selected .letter {
  background: var(--indigo);
  color: #ffffff;
}

.quiz-opt.correct {
  border-color: var(--emerald);
  background: var(--emerald-subtle);
}

.quiz-opt.correct .letter {
  background: var(--emerald);
  color: #ffffff;
}

.quiz-opt.wrong {
  border-color: var(--rose);
  background: var(--rose-subtle);
}

.quiz-opt.wrong .letter {
  background: var(--rose);
  color: #ffffff;
}

.chat {
  display: flex;
  flex-direction: column;
  min-height: 260px;
}

.chat-log {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 2px 10px;
  max-height: 420px;
}

.bubble {
  max-width: 90%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.86rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.bubble-ai {
  align-self: flex-start;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  border-top-left-radius: 4px;
  color: var(--text);
}

.bubble-user {
  align-self: flex-end;
  background: var(--indigo);
  color: #ffffff;
  border-top-right-radius: 4px;
}

.bubble .hint {
  display: block;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--amber-subtle);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #92400e;
  font-size: 0.82rem;
}

html.dark .bubble .hint,
[data-theme="dark"] .bubble .hint {
  color: #fde68a;
}

/* Exam & Timer */
.exam-timer {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
}

.step-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
  gap: 8px;
}

.step-btn {
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--surface-subtle);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s;
  font-size: 0.84rem;
}

.step-btn:hover {
  border-color: var(--indigo);
}

.step-btn.done {
  background: var(--emerald-subtle);
  border-color: var(--emerald);
  color: var(--emerald);
}

.step-btn.active {
  background: var(--indigo);
  border-color: var(--indigo);
  color: #ffffff;
}

/* ==========================================================================
   Excel-like Grid (gridEngine.js)
   ========================================================================== */
#gridHost {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 600px;
}

.ntg {
  --cell-h: 30px;
  display: flex;
  flex-direction: column;
  flex: 1;
  background: #ffffff;
  color: #0f172a;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  box-shadow: var(--shadow);
  font-size: 13px;
  min-height: 580px;
  min-width: 0;
  max-width: 100%;
  width: 100%;
}

.ntg-bar {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  height: 38px;
  flex: none;
}

.ntg-name {
  width: 80px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  border-right: 1px solid #e2e8f0;
  background: #ffffff;
}

.ntg-fx {
  width: 38px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-style: italic;
  font-family: Georgia, serif;
  font-weight: 700;
  color: #059669;
  border-right: 1px solid #e2e8f0;
  user-select: none;
}

.ntg-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  padding: 0 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #0f172a;
  background: #ffffff;
}

.ntg-input:focus {
  box-shadow: inset 0 -2px 0 #4f46e5;
}

.ntg-input[readonly] {
  color: #64748b;
  background: #f8fafc;
}

.ntg-scroll {
  position: relative;
  overflow: auto;
  flex: 1;
  min-height: 480px;
  min-width: 0;
  max-width: 100%;
  max-height: none;
  outline: none;
  background: #ffffff;
  -webkit-overflow-scrolling: touch;
}

.ntg-table {
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  user-select: none;
  width: 100%;
  min-width: 100%;
}

.ntg-table th {
  position: sticky;
  z-index: 2;
  background: #f1f5f9;
  color: #64748b;
  font-weight: 600;
  font-size: 11px;
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  text-align: center;
  height: 26px;
  font-family: 'JetBrains Mono', monospace;
}

.ntg-table thead th {
  top: 0;
}

.ntg-table th.ntg-rowh {
  left: 0;
  width: 42px;
  min-width: 42px;
  z-index: 1;
}

.ntg-table th.ntg-corner {
  left: 0;
  top: 0;
  z-index: 3;
  width: 42px;
}

.ntg-table th.is-hl {
  background: #e0e7ff;
  color: #3730a3;
}

.ntg-cell {
  height: var(--cell-h);
  padding: 0 8px;
  border-right: 1px solid #edf2f7;
  border-bottom: 1px solid #edf2f7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: cell;
  position: relative;
  background: #ffffff;
}

.ntg-cell.is-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.ntg-cell.is-locked {
  background: #f8fafc;
  color: #334155;
}

.ntg-cell.is-head {
  background: #f1f5f9;
  color: #0f172a;
  font-weight: 700;
}

.ntg-cell.is-task {
  background: #fffbeb;
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.4);
}

.ntg-cell.is-ok {
  background: #ecfdf5 !important;
  color: #065f46;
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.5);
}

.ntg-cell.is-bad {
  background: #fff1f2 !important;
  color: #9f1239;
  box-shadow: inset 0 0 0 1px rgba(244, 63, 94, 0.5);
}

.ntg-cell.is-err {
  color: #be123c;
  font-weight: 600;
}

.ntg-cell.is-formula:not(.is-err) {
  color: #1e3a8a;
}

.ntg-cell.is-sel {
  box-shadow: inset 0 0 0 2px #4f46e5 !important;
  z-index: 1;
}

.ntg-compact,
.mock-window .ntg {
  --cell-h: 26px;
  min-height: 0 !important;
  flex: none;
}
.ntg-compact .ntg-scroll,
.mock-window .ntg-scroll {
  min-height: 0 !important;
  flex: none;
}
.ntg-compact .ntg-bar {
  height: 32px;
}
.ntg-compact .ntg-name {
  width: 60px;
  font-size: 11px;
}
.ntg-compact .ntg-fx {
  width: 32px;
  font-size: 11px;
}
.ntg-compact .ntg-table th {
  height: 24px;
  font-size: 10.5px;
}
.ntg-compact .ntg-cell {
  font-size: 12px;
  padding: 0 6px;
}

.ntg-editor {
  position: absolute;
  z-index: 10;
  box-sizing: border-box;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  line-height: normal;
  padding: 0 6px;
  border: 2px solid #4f46e5;
  border-radius: 2px;
  background: #ffffff;
  color: #0f172a;
  outline: none;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
}

[data-theme="dark"] .ntg-editor,
html.dark .ntg-editor {
  background: #181a1d;
  color: #f2f1ee;
  border-color: #818cf8;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
}

.ntg-handle {
  position: absolute;
  width: 7px;
  height: 7px;
  background: #4f46e5;
  border: 1px solid #ffffff;
  border-radius: 1px;
  cursor: crosshair;
  z-index: 5;
  box-sizing: border-box;
}

[data-theme="dark"] .ntg-handle,
html.dark .ntg-handle {
  background: #818cf8;
  border-color: #0f172a;
}

.ntg-fillpreview {
  position: absolute;
  border: 1px dashed #4f46e5;
  background: rgba(79, 70, 229, 0.08);
  pointer-events: none;
  z-index: 4;
  box-sizing: border-box;
}

[data-theme="dark"] .ntg-fillpreview,
html.dark .ntg-fillpreview {
  border-color: #818cf8;
  background: rgba(129, 140, 248, 0.12);
}

.ntg-cell.is-ref {
  box-shadow: inset 0 0 0 2px #3b82f6 !important;
  background: rgba(59, 130, 246, 0.08) !important;
}

.ntg-cell.is-deny {
  animation: ntgDeny 0.35s ease;
}

@keyframes ntgDeny {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

.ntg-cell.is-flash {
  animation: ntgFlash 0.5s ease;
}

@keyframes ntgFlash {
  0% { background-color: rgba(16, 185, 129, 0.35); }
  100% { background-color: transparent; }
}

[data-theme="dark"] .ntg,
html.dark .ntg {
  background: #111315;
  color: #f2f1ee;
  border-color: #26292e;
}
[data-theme="dark"] .ntg-bar,
html.dark .ntg-bar {
  background: #181a1d;
  border-color: #26292e;
}
[data-theme="dark"] .ntg-name,
html.dark .ntg-name {
  background: #111315;
  color: #9e9e98;
  border-color: #26292e;
}
[data-theme="dark"] .ntg-input,
html.dark .ntg-input {
  background: #181a1d;
  color: #f2f1ee;
}
[data-theme="dark"] .ntg-scroll,
html.dark .ntg-scroll {
  background: #111315;
}
[data-theme="dark"] .ntg-table th,
html.dark .ntg-table th {
  background: #181a1d;
  color: #9e9e98;
  border-color: #26292e;
}
[data-theme="dark"] .ntg-table th.is-hl,
html.dark .ntg-table th.is-hl {
  background: #312e81;
  color: #c7d2fe;
}
[data-theme="dark"] .ntg-cell,
html.dark .ntg-cell {
  background: #111315;
  color: #f2f1ee;
  border-color: #26292e;
}
[data-theme="dark"] .ntg-cell.is-locked,
html.dark .ntg-cell.is-locked {
  background: #181a1d;
  color: #9e9e98;
}
[data-theme="dark"] .ntg-cell.is-head,
html.dark .ntg-cell.is-head {
  background: #1c1f24;
  color: #ffffff;
}
[data-theme="dark"] .ntg-cell.is-task,
html.dark .ntg-cell.is-task {
  background: rgba(245, 158, 11, 0.08);
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.35);
}
[data-theme="dark"] .ntg-cell.is-ok,
html.dark .ntg-cell.is-ok {
  background: rgba(16, 185, 129, 0.12) !important;
  color: #34d399;
}
[data-theme="dark"] .ntg-cell.is-bad,
html.dark .ntg-cell.is-bad {
  background: rgba(244, 63, 94, 0.12) !important;
  color: #fb7185;
}
[data-theme="dark"] .ntg-cell.is-formula:not(.is-err),
html.dark .ntg-cell.is-formula:not(.is-err) {
  color: #93c5fd;
}
[data-theme="dark"] .ntg-status,
html.dark .ntg-status {
  background: #181a1d;
  color: #888882;
  border-color: #26292e;
}

.ntg-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 12px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  font-size: 11.5px;
  flex: none;
  font-family: 'JetBrains Mono', monospace;
}

/* Embedded Excel Ribbon & Live Sheet Charts */
.ntg-ribbon {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  flex: none;
  user-select: none;
}

.ntg-ribbon-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px 10px 0;
  background: linear-gradient(90deg, #065f46 0%, #047857 100%);
  color: #ecfdf5;
  font-size: 11.5px;
  font-weight: 600;
  overflow-x: auto;
}

.ntg-ribbon-brand {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 800;
  padding: 3px 9px 6px 4px;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.ntg-ribbon-tab {
  padding: 4px 10px 6px;
  border-radius: 6px 6px 0 0;
  color: rgba(236, 253, 245, 0.82);
  cursor: pointer;
  border: 0;
  background: transparent;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.14s;
}

.ntg-ribbon-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.ntg-ribbon-tab.is-active {
  background: #f8fafc;
  color: #065f46;
  font-weight: 700;
}

.ntg-ribbon-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: #f8fafc;
  border-top: 1px solid rgba(16, 185, 129, 0.18);
}

.ntg-tool-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-right: 8px;
  border-right: 1px solid #cbd5e1;
}

.ntg-tool-group:last-child {
  border-right: 0;
  padding-right: 0;
}

.ntg-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #1e293b;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s;
  white-space: nowrap;
}

.ntg-tool-btn:hover {
  border-color: #10b981;
  background: #ecfdf5;
  color: #065f46;
}

.ntg-tool-btn.is-active {
  border-color: #10b981;
  background: #10b981;
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(16, 185, 129, 0.3);
}

.ntg-sheet-canvas {
  padding: 14px 16px 20px 50px;
  background-image:
    linear-gradient(to right, rgba(148, 163, 184, 0.14) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.14) 1px, transparent 1px);
  background-size: 96px 28px;
  border-top: 1px dashed #cbd5e1;
}

.ntg-chart-frame {
  position: relative;
  background: #ffffff;
  border: 2px solid #0ea5e9;
  border-radius: 10px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.12);
  padding: 12px 14px;
}

.ntg-chart-handle {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #0284c7;
  z-index: 3;
  pointer-events: none;
}
.ntg-chart-handle.tl { top: -5px; left: -5px; }
.ntg-chart-handle.tr { top: -5px; right: -5px; }
.ntg-chart-handle.bl { bottom: -5px; left: -5px; }
.ntg-chart-handle.br { bottom: -5px; right: -5px; }
.ntg-chart-handle.tm { top: -5px; left: calc(50% - 4px); }
.ntg-chart-handle.bm { bottom: -5px; left: calc(50% - 4px); }

.ntg-float-btns {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ntg-float-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
  transition: all 0.14s;
}

.ntg-float-btn:hover,
.ntg-float-btn.is-active {
  border-color: #10b981;
  background: #ecfdf5;
  color: #047857;
}

.ntg-databar-bg {
  position: absolute;
  left: 3px;
  top: 4px;
  bottom: 4px;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.28), rgba(16, 185, 129, 0.12));
  border-left: 2px solid #10b981;
  pointer-events: none;
  z-index: 0;
}

.ntg-cell-val {
  position: relative;
  z-index: 1;
}

[data-theme="dark"] .ntg-ribbon,
html.dark .ntg-ribbon {
  background: #16181c;
  border-color: #26292e;
}

[data-theme="dark"] .ntg-ribbon-tab.is-active,
html.dark .ntg-ribbon-tab.is-active {
  background: #16181c;
  color: #34d399;
}

[data-theme="dark"] .ntg-ribbon-tools,
html.dark .ntg-ribbon-tools {
  background: #16181c;
}

[data-theme="dark"] .ntg-tool-group,
html.dark .ntg-tool-group {
  border-color: #2d3139;
}

[data-theme="dark"] .ntg-tool-btn,
html.dark .ntg-tool-btn {
  background: #1e2128;
  border-color: #333842;
  color: #e2e8f0;
}

[data-theme="dark"] .ntg-tool-btn:hover,
html.dark .ntg-tool-btn:hover {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
}

[data-theme="dark"] .ntg-tool-btn.is-active,
html.dark .ntg-tool-btn.is-active {
  background: #059669;
  border-color: #10b981;
  color: #ffffff;
}

[data-theme="dark"] .ntg-sheet-canvas,
html.dark .ntg-sheet-canvas {
  border-color: #26292e;
  background-image:
    linear-gradient(to right, rgba(148, 163, 184, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.07) 1px, transparent 1px);
}

[data-theme="dark"] .ntg-chart-frame,
html.dark .ntg-chart-frame {
  background: #16191e;
  border-color: #38bdf8;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
}

[data-theme="dark"] .ntg-chart-handle,
html.dark .ntg-chart-handle {
  background: #0f172a;
  border-color: #38bdf8;
}

[data-theme="dark"] .ntg-float-btn,
html.dark .ntg-float-btn {
  background: #1e2229;
  border-color: #334155;
  color: #e2e8f0;
}

[data-theme="dark"] .ntg-float-btn:hover,
[data-theme="dark"] .ntg-float-btn.is-active,
html.dark .ntg-float-btn:hover,
html.dark .ntg-float-btn.is-active {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

/* ==========================================================================
   Certificate (verify.html)
   ========================================================================== */
.cert-wrapper {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
}

.cert,
[data-theme="dark"] .cert,
.dark .cert {
  position: relative;
  width: 100%;
  min-height: 330px;
  background: #FFFFFF !important;
  color: #0F172A !important;
  border: 1px solid #E5E2DA !important;
  border-radius: 8px;
  padding: 32px 40px !important;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 16px 36px -8px rgba(0, 0, 0, 0.12) !important;
  font-family: 'Plus Jakarta Sans', sans-serif;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

[data-theme="dark"] .cert,
.dark .cert {
  background: #FFFFFF !important;
  color: #0F172A !important;
  border: 1px solid #E5E2DA !important;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 20px 48px -10px rgba(0, 0, 0, 0.7) !important;
}

.cert.cert-blurred {
  filter: blur(9px) saturate(0.65);
  -webkit-filter: blur(9px) saturate(0.65);
  user-select: none;
  pointer-events: none;
  opacity: 0.85;
}

.cert-trial-overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 4vw, 44px);
  text-align: center;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 16px;
  border: 2px dashed #f59e0b;
}

.cert::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 6px;
  pointer-events: none;
}

.cert::after {
  display: none;
}

.cert-watermark,
[data-theme="dark"] .cert .cert-watermark,
.dark .cert .cert-watermark {
  position: absolute !important;
  right: -30px !important;
  bottom: -40px !important;
  font-size: 220px !important;
  font-weight: 900 !important;
  color: rgba(15, 23, 42, 0.04) !important;
  letter-spacing: -0.06em !important;
  pointer-events: none !important;
  user-select: none !important;
  line-height: 1 !important;
}

.cert-header {
  position: relative;
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  width: 100% !important;
}

.cert-eyebrow,
.cert .cert-eyebrow,
[data-theme="dark"] .cert .cert-eyebrow,
.dark .cert .cert-eyebrow {
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 0.68rem !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase !important;
  font-weight: 700 !important;
  color: #666660 !important;
  line-height: 1.2 !important;
  margin: 0 !important;
}

.cert-body {
  position: relative;
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  margin: 16px 0 !important;
  width: 100% !important;
}

.cert-title,
.cert .cert-title,
[data-theme="dark"] .cert .cert-title,
.dark .cert .cert-title {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-size: 1.35rem !important;
  line-height: 1.25 !important;
  font-weight: 800 !important;
  color: #0F172A !important;
  letter-spacing: -0.025em !important;
  margin: 0 !important;
}

.cert-name,
.cert .cert-name,
[data-theme="dark"] .cert .cert-name,
.dark .cert .cert-name {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-size: 1.85rem !important;
  line-height: 1.15 !important;
  font-weight: 800 !important;
  color: #0F172A !important;
  letter-spacing: -0.03em !important;
  margin-top: 12px !important;
  margin-bottom: 0 !important;
}

.cert-track,
.cert .cert-track,
[data-theme="dark"] .cert .cert-track,
.dark .cert .cert-track {
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 0.85rem !important;
  line-height: 1.4 !important;
  color: #475569 !important;
  margin-top: 6px !important;
  margin-bottom: 0 !important;
}

.cert-footer,
.cert .cert-footer,
[data-theme="dark"] .cert .cert-footer,
.dark .cert .cert-footer {
  margin-top: 0 !important;
  padding-top: 16px !important;
  border-top: 1px solid #E5E2DA !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 0.75rem !important;
  color: #666660 !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
}

.cert-seal,
.cert .cert-seal,
[data-theme="dark"] .cert .cert-seal,
.dark .cert .cert-seal {
  width: 68px !important;
  height: 68px !important;
  min-width: 68px !important;
  min-height: 68px !important;
  border-radius: 50% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  color: #FFFFFF !important;
  font-weight: 800 !important;
  font-size: 0.58rem !important;
  letter-spacing: 0.1em !important;
  line-height: 1.2 !important;
  text-transform: uppercase !important;
  background: radial-gradient(circle at 30% 30%, #3B82F6, #1D4ED8 70%) !important;
  box-shadow: 0 0 0 4px #DBEAFE, 0 8px 20px -4px rgba(29, 78, 216, 0.4) !important;
}

@media (max-width: 640px) {
  .cert,
  [data-theme="dark"] .cert,
  .dark .cert {
    padding: 24px 20px !important;
    min-height: auto !important;
  }
  .cert-title,
  .cert .cert-title,
  [data-theme="dark"] .cert .cert-title,
  .dark .cert .cert-title {
    font-size: 1.15rem !important;
  }
  .cert-name,
  .cert .cert-name,
  [data-theme="dark"] .cert .cert-name,
  .dark .cert .cert-name {
    font-size: 1.5rem !important;
    margin-top: 16px !important;
  }
  .cert-track,
  .cert .cert-track,
  [data-theme="dark"] .cert .cert-track,
  .dark .cert .cert-track {
    font-size: 0.78rem !important;
  }
  .cert-seal,
  .cert .cert-seal,
  [data-theme="dark"] .cert .cert-seal,
  .dark .cert .cert-seal {
    width: 58px !important;
    height: 58px !important;
    min-width: 58px !important;
    min-height: 58px !important;
    font-size: 0.52rem !important;
  }
}

.cert-seal.expired {
  background: radial-gradient(circle at 30% 30%, #f59e0b, #b45309 70%);
  box-shadow: 0 0 0 5px #fef3c7;
}

.cert-seal.revoked {
  background: radial-gradient(circle at 30% 30%, #f43f5e, #9f1239 70%);
  box-shadow: 0 0 0 5px #ffe4e6;
}

.cert-skill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 0.76rem;
  font-weight: 600;
  margin: 3px;
}

/* ==========================================================================
   Arena Lesson & Course Goal Boxes (Light & Dark Mode)
   ========================================================================== */
.arena-lesson-goal-box {
  background-color: #f0f9ff;
  border: 1px solid #bae6fd;
}
.arena-lesson-goal-title {
  color: #0369a1;
}
.arena-lesson-goal-text {
  color: #0c4a6e;
}
html.dark .arena-lesson-goal-box,
[data-theme="dark"] .arena-lesson-goal-box {
  background-color: rgba(8, 47, 73, 0.45);
  border-color: rgba(14, 165, 233, 0.35);
}
html.dark .arena-lesson-goal-title,
[data-theme="dark"] .arena-lesson-goal-title {
  color: #38bdf8;
}
html.dark .arena-lesson-goal-text,
[data-theme="dark"] .arena-lesson-goal-text {
  color: #e0f2fe;
}

.arena-course-goal-box {
  background-color: #f8fafc;
  border: 1px solid #cbd5e1;
}
.arena-course-goal-title {
  color: #334155;
}
.arena-course-goal-text {
  color: #0f172a;
}
html.dark .arena-course-goal-box,
[data-theme="dark"] .arena-course-goal-box {
  background-color: rgba(15, 23, 42, 0.75);
  border-color: #1e293b;
}
html.dark .arena-course-goal-title,
[data-theme="dark"] .arena-course-goal-title {
  color: #94a3b8;
}
html.dark .arena-course-goal-text,
[data-theme="dark"] .arena-course-goal-text {
  color: #cbd5e1;
}

.arena-work-goal-panel {
  background-color: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
}
.arena-work-goal-text {
  color: #0f172a !important;
}
html.dark .arena-work-goal-panel,
[data-theme="dark"] .arena-work-goal-panel {
  background-color: rgba(15, 23, 42, 0.9) !important;
  border-color: rgba(51, 65, 85, 0.6) !important;
}
html.dark .arena-work-goal-text,
[data-theme="dark"] .arena-work-goal-text {
  color: #f1f5f9 !important;
}

/* ==========================================================================
   Light Mode Utility Mappings for legacy text & dark surface classes
   Ensures high contrast across all courses, lessons, and simulators in Light Mode
   ========================================================================== */
html:not(.dark) .text-white:where(:not(.btn, .chip, .keep-white, [data-keep-white])),
html:not(.dark) .text-slate-100:where(:not(.btn, .chip, .keep-white, [data-keep-white])) {
  color: #0f172a !important;
}

html:not(.dark) .text-slate-200:where(:not(.keep-white, .btn, .chip)) {
  color: #1e293b !important;
}

html:not(.dark) .text-slate-300:where(:not(.keep-white, .btn, .chip)),
html:not(.dark) .text-white\/80:where(:not(.keep-white, .btn, .chip)),
html:not(.dark) .text-white\/90:where(:not(.keep-white, .btn, .chip)) {
  color: #334155 !important;
}

html:not(.dark) .text-slate-400:where(:not(.keep-white)) {
  color: #475569 !important;
}

html:not(.dark) .text-slate-500:where(:not(.keep-white)) {
  color: #64748b !important;
}

/* Pastel text classes in Light Mode -> crisp dark semantic shades */
html:not(.dark) .text-sky-200:where(:not(.btn)),
html:not(.dark) .text-sky-300:where(:not(.btn)),
html:not(.dark) .text-sky-400:where(:not(.btn)) {
  color: #0369a1 !important;
}

html:not(.dark) .text-indigo-100:where(:not(.btn)),
html:not(.dark) .text-indigo-200:where(:not(.btn)),
html:not(.dark) .text-indigo-300:where(:not(.btn)),
html:not(.dark) .text-indigo-400:where(:not(.btn)) {
  color: #3730a3 !important;
}

html:not(.dark) .text-emerald-100:where(:not(.btn)),
html:not(.dark) .text-emerald-200:where(:not(.btn)),
html:not(.dark) .text-emerald-300:where(:not(.btn)),
html:not(.dark) .text-emerald-400:where(:not(.btn)) {
  color: #065f46 !important;
}

html:not(.dark) .text-amber-200:where(:not(.btn)),
html:not(.dark) .text-amber-300:where(:not(.btn)),
html:not(.dark) .text-amber-300\/90:where(:not(.btn)),
html:not(.dark) .text-amber-400:where(:not(.btn)),
html:not(.dark) .text-orange-400:where(:not(.btn)) {
  color: #92400e !important;
}

html:not(.dark) .text-rose-100:where(:not(.btn)),
html:not(.dark) .text-rose-200:where(:not(.btn)),
html:not(.dark) .text-rose-300:where(:not(.btn)),
html:not(.dark) .text-rose-400:where(:not(.btn)) {
  color: #9f1239 !important;
}

html:not(.dark) .text-violet-300:where(:not(.btn)),
html:not(.dark) .text-violet-400:where(:not(.btn)),
html:not(.dark) .text-purple-300:where(:not(.btn)) {
  color: #5b21b6 !important;
}

html:not(.dark) .text-cyan-300:where(:not(.btn)) {
  color: #0e7490 !important;
}

/* Preserve white text on dark overlays (e.g. trial certificate lock overlay) */
html:not(.dark) .cert-trial-overlay h2,
html:not(.dark) .cert-trial-overlay p {
  color: #ffffff !important;
}

/* Dark slate & tinted surfaces -> clean light surfaces in Light Mode */
html:not(.dark) .bg-slate-900:where(:not(.keep-bg)),
html:not(.dark) .bg-slate-900\/40:where(:not(.keep-bg)),
html:not(.dark) .bg-slate-900\/50:where(:not(.keep-bg)),
html:not(.dark) .bg-slate-900\/60:where(:not(.keep-bg)),
html:not(.dark) .bg-slate-900\/70:where(:not(.keep-bg)),
html:not(.dark) .bg-slate-900\/80:where(:not(.keep-bg)),
html:not(.dark) .bg-slate-900\/90:where(:not(.keep-bg)),
html:not(.dark) .bg-slate-900\/95:where(:not(.keep-bg)),
html:not(.dark) .\!bg-slate-900\/95:where(:not(.keep-bg)),
html:not(.dark) .bg-slate-950:where(:not(.keep-bg)),
html:not(.dark) .bg-slate-950\/40:where(:not(.keep-bg)),
html:not(.dark) .bg-slate-950\/50:where(:not(.keep-bg)),
html:not(.dark) .bg-slate-950\/60:where(:not(.keep-bg)),
html:not(.dark) .bg-slate-950\/70:where(:not(.keep-bg)),
html:not(.dark) .bg-slate-950\/75:where(:not(.keep-bg)),
html:not(.dark) .bg-slate-950\/80:where(:not(.keep-bg)),
html:not(.dark) .bg-slate-950\/90:where(:not(.keep-bg)),
html:not(.dark) .bg-slate-800\/30:where(:not(.keep-bg)),
html:not(.dark) .bg-slate-800\/40:where(:not(.keep-bg)),
html:not(.dark) .bg-slate-800\/50:where(:not(.keep-bg)),
html:not(.dark) .bg-slate-800\/60:where(:not(.keep-bg)),
html:not(.dark) .bg-slate-800\/70:where(:not(.keep-bg)),
html:not(.dark) .bg-slate-800\/80:where(:not(.keep-bg)),
html:not(.dark) .bg-slate-800:where(:not(.keep-bg)) {
  background-color: #f8fafc !important;
}

html:not(.dark) .hover\:bg-slate-800\/30:hover,
html:not(.dark) .hover\:bg-slate-800\/40:hover,
html:not(.dark) .hover\:bg-slate-800\/50:hover,
html:not(.dark) .hover\:bg-slate-900\/50:hover {
  background-color: #e2e8f0 !important;
}

html:not(.dark) .bg-black\/20:where(:not(.keep-bg)) {
  background-color: #e2e8f0 !important;
  color: #0f172a !important;
}

html:not(.dark) .bg-sky-950\/15:not(.keep-bg),
html:not(.dark) .bg-sky-950\/40:not(.keep-bg),
html:not(.dark) .bg-sky-950\/50:not(.keep-bg),
html:not(.dark) .bg-sky-950\/70:not(.keep-bg),
html:not(.dark) .bg-blue-950\/40:not(.keep-bg) {
  background-color: #f0f9ff !important;
}

html:not(.dark) .bg-indigo-950\/35:not(.keep-bg),
html:not(.dark) .bg-indigo-950\/40:not(.keep-bg),
html:not(.dark) .bg-indigo-950\/50:not(.keep-bg),
html:not(.dark) .bg-indigo-950\/60:not(.keep-bg),
html:not(.dark) .bg-indigo-950\/70:not(.keep-bg) {
  background-color: #eef2ff !important;
}

html:not(.dark) .bg-emerald-950\/10:not(.keep-bg),
html:not(.dark) .bg-emerald-950\/15:not(.keep-bg),
html:not(.dark) .bg-emerald-950\/30:not(.keep-bg),
html:not(.dark) .bg-emerald-950\/35:not(.keep-bg),
html:not(.dark) .bg-emerald-950\/40:not(.keep-bg),
html:not(.dark) .bg-emerald-950\/50:not(.keep-bg) {
  background-color: #ecfdf5 !important;
}

html:not(.dark) .bg-amber-950\/10:not(.keep-bg),
html:not(.dark) .bg-amber-950\/15:not(.keep-bg),
html:not(.dark) .bg-amber-950\/30:not(.keep-bg),
html:not(.dark) .bg-amber-950\/40:not(.keep-bg),
html:not(.dark) .bg-amber-950\/60:not(.keep-bg) {
  background-color: #fffbeb !important;
}

html:not(.dark) .bg-rose-950\/20:not(.keep-bg),
html:not(.dark) .bg-rose-950\/25:not(.keep-bg),
html:not(.dark) .bg-rose-950\/30:not(.keep-bg),
html:not(.dark) .bg-rose-950\/80:not(.keep-bg) {
  background-color: #fff1f2 !important;
}

html:not(.dark) .bg-violet-950\/30:not(.keep-bg),
html:not(.dark) .bg-violet-950\/50:not(.keep-bg) {
  background-color: #f5f3ff !important;
}

html:not(.dark) .border-slate-700,
html:not(.dark) .border-slate-700\/30,
html:not(.dark) .border-slate-700\/40,
html:not(.dark) .border-slate-700\/50,
html:not(.dark) .border-slate-700\/60,
html:not(.dark) .border-slate-700\/80,
html:not(.dark) .border-slate-800,
html:not(.dark) .border-slate-800\/60,
html:not(.dark) .border-slate-800\/80,
html:not(.dark) .border-slate-800\/90 {
  border-color: #e2e8f0 !important;
}

/* Responsive */
@media (max-width: 1024px) {
  .dash-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    z-index: 60;
    left: 0;
    top: 0;
    width: 280px;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
  }

  .sidebar.open {
    transform: none;
    box-shadow: 25px 0 50px rgba(0, 0, 0, 0.2);
  }
}

@media (max-width: 900px) {
  .arena-shell {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .arena-split {
    flex-direction: column;
  }

  .arena-left {
    width: 100% !important;
    max-width: none;
    min-width: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: visible;
  }

  .arena-left-scroll {
    overflow: visible;
  }

  .arena-divider {
    display: none;
  }

  .arena-work {
    overflow: visible;
  }

  .ntg-scroll {
    max-height: 70vh;
  }
}

/* Landing page components */
.hero-grid-wrap {
  position: relative;
  max-width: 100%;
  min-width: 0;
}

.mock-window {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  max-width: 100%;
  min-width: 0;
}

.mock-window .mw-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-subtle);
}

.mock-window .mw-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  opacity: 0.8;
}

.mock-window .mw-bar i:nth-child(1) {
  background: #E11D48;
}

.mock-window .mw-bar i:nth-child(2) {
  background: #D97706;
}

.mock-window .mw-bar i:nth-child(3) {
  background: #059669;
}

.price-card {
  position: relative;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

.price-card.highlight {
  border-color: #111111;
  box-shadow: var(--shadow-lg);
}

html.dark .price-card.highlight,
[data-theme="dark"] .price-card.highlight {
  border-color: #F2F1EE;
}

.price-card:hover {
  border-color: var(--card-hover-border);
  box-shadow: var(--shadow);
}

.feature-ico {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-size: 1rem;
  background: var(--surface-subtle);
  color: var(--text);
  border: 1px solid var(--line);
}

.logo-strip span {
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--muted);
  font-size: 0.95rem;
  transition: color 0.2s;
}

.logo-strip span:hover {
  color: var(--text);
}

.float {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

.shake {
  animation: shake 0.4s ease;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  20%,
  60% {
    transform: translateX(-5px);
  }

  40%,
  80% {
    transform: translateX(5px);
  }
}

.pop {
  animation: pop 0.35s cubic-bezier(0.2, 1.6, 0.4, 1);
}

@keyframes pop {
  0% {
    transform: scale(0.85);
  }

  100% {
    transform: scale(1);
  }
}

/* ==========================================================================
   Report Paper & Compliance Document
   ========================================================================== */
.report-paper {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 36px 40px;
  box-shadow: var(--shadow-lg);
  color: var(--text);
  max-width: 1060px;
  margin: 0 auto 40px auto;
}

.report-paper header {
  border-bottom: 2px solid var(--line);
  padding-bottom: 20px;
}

.report-paper h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  margin-top: 32px;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.report-paper .report-kpi {
  display: flex;
  flex-direction: column;
  padding: 14px 18px;
  border-radius: 10px;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  min-width: 0;
}

.report-paper .report-kpi b {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.report-paper .report-kpi span {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-top: 4px;
}

.report-paper table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.84rem;
}

.report-paper th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: var(--surface-subtle);
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.report-paper td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  vertical-align: middle;
}

.report-paper tr:last-child td {
  border-bottom: none;
}

.report-paper tbody tr:hover {
  background: var(--surface-hover);
}

.report-paper .st-certified {
  color: #059669;
  font-weight: 700;
}
[data-theme="dark"] .report-paper .st-certified,
html.dark .report-paper .st-certified {
  color: #34d399;
}

.report-paper .st-not_started {
  color: #e11d48;
  font-weight: 700;
}
[data-theme="dark"] .report-paper .st-not_started,
html.dark .report-paper .st-not_started {
  color: #fb7185;
}

.report-paper .st-in_progress {
  color: #d97706;
  font-weight: 700;
}
[data-theme="dark"] .report-paper .st-in_progress,
html.dark .report-paper .st-in_progress {
  color: #fcd34d;
}

/* Print (A4) */
@page {
  size: A4;
  margin: 14mm;
}

@media print {

  html,
  body {
    background: #ffffff !important;
    color: #0f172a !important;
  }

  body * {
    visibility: hidden;
  }

  #printArea,
  #printArea * {
    visibility: visible;
  }

  #printArea {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }

  .cert-wrapper,
  .cert-wrapper * {
    visibility: visible;
  }

  .cert.cert-blurred {
    filter: blur(14px) !important;
    opacity: 0.25 !important;
  }

  .cert-trial-overlay {
    display: flex !important;
    background: rgba(255, 255, 255, 0.95) !important;
    color: #0f172a !important;
    border: 2px dashed #d97706 !important;
    visibility: visible !important;
  }

  .cert-trial-overlay * {
    visibility: visible !important;
    color: #0f172a !important;
  }

  .nt-bg,
  .no-print,
  .nt-toasts {
    display: none !important;
  }

  .cert {
    box-shadow: none;
    border-radius: 0;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .cert-name,
  .cert-seal {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* ==========================================================================
   Interactive Demo Tour – Hand-drawn Marker Pen & Speech Bubbles
   ========================================================================== */
.demo-tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 99990;
  pointer-events: none;
}

.demo-tour-svg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

.demo-tour-dimmer {
  fill: rgba(15, 23, 42, 0.58);
  pointer-events: auto;
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
}
[data-theme="dark"] .demo-tour-dimmer,
html.dark .demo-tour-dimmer {
  fill: rgba(0, 0, 0, 0.72);
}

.demo-tour-marker-path {
  fill: rgba(245, 158, 11, 0.08);
  stroke: #F59E0B;
  stroke-width: 4px;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.45));
  stroke-dasharray: 2400;
  stroke-dashoffset: 2400;
  animation: markerDrawStroke 0.48s cubic-bezier(0.2, 0.8, 0.25, 1) forwards;
}

.demo-tour-arrow-path {
  fill: none;
  stroke: #F59E0B;
  stroke-width: 2.8px;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.4));
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: markerDrawStroke 0.35s ease-out 0.15s forwards;
}

@keyframes markerDrawStroke {
  from {
    stroke-dashoffset: 2400;
  }
  to {
    stroke-dashoffset: 0;
  }
}

.demo-tour-bubble {
  position: fixed;
  z-index: 99999;
  pointer-events: auto;
  width: 420px;
  max-width: calc(100vw - 32px);
  background: var(--surface, #FFFFFF);
  color: var(--text, #1E293B);
  border: 1px solid var(--line, #E2E8F0);
  border-top: 3.5px solid #F59E0B;
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(245, 158, 11, 0.2);
  animation: tourBubblePop 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: top 0.25s ease, left 0.25s ease;
  box-sizing: border-box;
  overflow: hidden;
}

[data-theme="dark"] .demo-tour-bubble,
html.dark .demo-tour-bubble {
  background: #111827;
  border-color: rgba(255, 255, 255, 0.12);
  border-top-color: #FBBF24;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(251, 191, 36, 0.25);
}

@keyframes tourBubblePop {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.demo-tour-bubble-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.demo-tour-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 9999px;
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FDE68A;
}
[data-theme="dark"] .demo-tour-badge,
html.dark .demo-tour-badge {
  background: rgba(245, 158, 11, 0.22);
  color: #FCD34D;
  border-color: rgba(245, 158, 11, 0.35);
}

.demo-tour-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-muted, #94A3B8);
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  transition: all 0.15s ease;
}
.demo-tour-close:hover {
  background: var(--surface-subtle, #F1F5F9);
  color: var(--text, #0F172A);
}

.demo-tour-title {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text, #0F172A);
  margin-bottom: 8px;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.demo-tour-text {
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text-subtle, #475569);
  margin-bottom: 12px;
}
[data-theme="dark"] .demo-tour-text,
html.dark .demo-tour-text {
  color: #94A3B8;
}

.demo-tour-tip {
  font-size: 0.78rem;
  line-height: 1.45;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--surface-subtle, #F8FAFC);
  border-left: 3px solid #F59E0B;
  color: var(--text-subtle, #475569);
  margin-bottom: 16px;
}
[data-theme="dark"] .demo-tour-tip,
html.dark .demo-tour-tip {
  background: rgba(255, 255, 255, 0.04);
  color: #CBD5E1;
}

.demo-tour-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  margin-top: 6px;
  border-top: 1px solid var(--line, #E2E8F0);
  flex-wrap: nowrap;
  width: 100%;
  box-sizing: border-box;
}
[data-theme="dark"] .demo-tour-footer,
html.dark .demo-tour-footer {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.demo-tour-dots {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.demo-tour-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line, #CBD5E1);
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  flex-shrink: 0;
}
.demo-tour-dot.active {
  width: 16px;
  border-radius: 9999px;
  background: #F59E0B;
}
.demo-tour-dot.done {
  background: #10B981;
}

.demo-tour-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.demo-tour-btn-skip {
  font-size: 0.78rem;
  color: var(--text-muted, #94A3B8);
  padding: 4px 8px;
  white-space: nowrap;
}
.demo-tour-btn-skip:hover {
  color: var(--text, #0F172A);
}

.demo-tour-btn-prev {
  font-size: 0.82rem;
  padding: 6px 12px !important;
  white-space: nowrap;
}

.demo-tour-btn-next {
  background: #F59E0B !important;
  border-color: #F59E0B !important;
  color: #111827 !important;
  font-weight: 700 !important;
  padding: 6px 14px !important;
  font-size: 0.82rem;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}
.demo-tour-btn-next:hover {
  background: #D97706 !important;
  border-color: #D97706 !important;
}

.demo-tour-btn-finish {
  background: #10B981 !important;
  border-color: #10B981 !important;
  color: #FFFFFF !important;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.35);
}
.demo-tour-btn-finish:hover {
  background: #059669 !important;
  border-color: #059669 !important;
}

/* ==========================================================================
   Mobile & Responsive Polish
   ========================================================================== */
@media (max-width: 768px) {
  /* Prevent horizontal scroll bleed on mobile */
  *, *::before, *::after {
    box-sizing: border-box;
  }
  
  /* Touch target sizes for mobile sliders */
  input[type="range"].range {
    height: 10px;
    cursor: pointer;
  }
  input[type="range"].range::-webkit-slider-thumb {
    width: 26px;
    height: 26px;
  }

  /* Table scrollbar on mobile */
  .ntg-scroll::-webkit-scrollbar {
    height: 5px;
  }
  .ntg-scroll::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.04);
  }
  .ntg-scroll::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
  }
  html.dark .ntg-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
  }
  html.dark .ntg-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
  }
}

/* Mobile Navigation Drawer */
#mobileDrawer {
  display: none;
}
#mobileDrawer.is-active {
  display: flex !important;
}
#mobileDrawerBackdrop {
  transition: opacity 0.25s ease;
  opacity: 0;
}
#mobileDrawerPanel {
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
#mobileDrawer.is-active #mobileDrawerBackdrop {
  opacity: 1;
}
#mobileDrawer.is-active #mobileDrawerPanel {
  transform: translateX(0);
}

/* ---------- Advanced Excel In-Cell Visuals (Conditional Formatting, Auditing, Tables) ---------- */
.ntg-iconset {
  display: inline-block;
  margin-right: 5px;
  font-size: 0.72rem;
  vertical-align: middle;
}
.ntg-filter-arrow {
  float: right;
  margin-left: 6px;
  padding: 0 3px;
  border-radius: 3px;
  font-size: 0.62rem;
  background: rgba(100, 116, 139, 0.18);
  color: inherit;
}
.ntg-trace-badge {
  display: inline-block;
  margin-right: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  vertical-align: middle;
}
.ntg-invalid-circle {
  display: inline-block;
  padding: 0 6px;
  border: 2px solid #ef4444;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.12);
}
.ntg-cell.is-row-rule {
  background-color: rgba(244, 63, 94, 0.13) !important;
}
.ntg-table-styled tbody tr:nth-child(even) td.ntg-cell:not(.is-row-rule) {
  background-color: rgba(16, 185, 129, 0.05);
}
.ntg-table-styled td.ntg-cell.is-head {
  background: rgba(16, 185, 129, 0.18) !important;
  color: #065f46;
}
html.dark .ntg-table-styled td.ntg-cell.is-head,
[data-theme="dark"] .ntg-table-styled td.ntg-cell.is-head {
  background: rgba(16, 185, 129, 0.22) !important;
  color: #a7f3d0;
}

/* ─────────────────────────────────────────────────────────────
   NoTheory Realistic Application Simulator Styles
   (Microsoft Copilot, Google Gemini Gems, PowerPoint, Word, Outlook, Teams, Excel, Make)
───────────────────────────────────────────────────────────── */
.app-simulator-window {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: #0f172a;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
  transition: all 0.2s ease;
}
html:not(.dark) .app-simulator-window {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
}
.app-sim-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  background: #1e293b;
  color: #f1f5f9;
}
html:not(.dark) .app-sim-titlebar {
  background: linear-gradient(90deg, #f8fafc 0%, #f1f5f9 60%, #e2e8f0 100%) !important;
  color: #0f172a !important;
  border-bottom: 1px solid #cbd5e1 !important;
}
html:not(.dark) .app-sim-titlebar .chip-emerald {
  background: #d1fae5 !important;
  border-color: #6ee7b7 !important;
  color: #065f46 !important;
}
html:not(.dark) .app-sim-titlebar .chip-amber {
  background: #fef3c7 !important;
  border-color: #fcd34d !important;
  color: #92400e !important;
}
html:not(.dark) .app-sim-titlebar .chip-sky {
  background: #e0f2fe !important;
  border-color: #7dd3fc !important;
  color: #075985 !important;
}
html:not(.dark) .app-sim-titlebar .chip-violet {
  background: #ede9fe !important;
  border-color: #c4b5fd !important;
  color: #5b21b6 !important;
}
html:not(.dark) .app-sim-titlebar .chip-indigo {
  background: #e0e7ff !important;
  border-color: #a5b4fc !important;
  color: #3730a3 !important;
}
html:not(.dark) .app-sim-titlebar .chip-rose {
  background: #ffe4e6 !important;
  border-color: #fda4af !important;
  color: #9f1239 !important;
}
html:not(.dark) .app-sim-titlebar .chip-slate {
  background: #e2e8f0 !important;
  border-color: #cbd5e1 !important;
  color: #1e293b !important;
}
.app-sim-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}
.app-sim-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.app-sim-dot.red { background: #ef4444; }
.app-sim-dot.yellow { background: #f59e0b; }
.app-sim-dot.green { background: #10b981; }

html.dark .app-sim-titlebar.powerpoint { background: #8f2d12; color: #fff; }
html.dark .app-sim-titlebar.word { background: #185abd; color: #fff; }
html.dark .app-sim-titlebar.excel { background: #107c41; color: #fff; }
html.dark .app-sim-titlebar.outlook { background: #0078d4; color: #fff; }
html.dark .app-sim-titlebar.teams { background: #464eb8; color: #fff; }
html.dark .app-sim-titlebar.gemini { background: linear-gradient(90deg, #1e1b4b, #312e81, #1e293b); color: #c7d2fe; }
html.dark .app-sim-titlebar.make { background: #5025d1; color: #fff; }
html.dark .app-sim-titlebar.soft-skills { background: linear-gradient(90deg, #4c0519 0%, #1e1b4b 60%, #0f172a 100%); border-bottom-color: rgba(244, 63, 94, 0.3); color: #fff; }
html.dark .app-sim-titlebar.time-mgmt { background: linear-gradient(90deg, #064e3b 0%, #1e1b4b 60%, #0f172a 100%); border-bottom-color: rgba(16, 185, 129, 0.3); color: #fff; }
html.dark .app-sim-titlebar.eq-conflict { background: linear-gradient(90deg, #4c1d95 0%, #311042 55%, #0f172a 100%); border-bottom-color: rgba(167, 139, 250, 0.35); color: #fff; }
html.dark .app-sim-titlebar.leadership { background: linear-gradient(90deg, #1e1b4b 0%, #0f172a 55%, #064e3b 100%); border-bottom-color: rgba(99, 102, 241, 0.35); color: #fff; }
html.dark .app-sim-titlebar.critical-thinking { background: linear-gradient(90deg, #0c4a6e 0%, #1e1b4b 55%, #0f172a 100%); border-bottom-color: rgba(56, 189, 248, 0.35); color: #fff; }
html.dark .app-sim-titlebar.cybersec { background: linear-gradient(90deg, #064e3b 0%, #0f172a 50%, #1e1b4b 100%); border-bottom-color: rgba(16, 185, 129, 0.3); color: #fff; }
html.dark .app-sim-titlebar.compliance { background: linear-gradient(90deg, #1e1b4b 0%, #312e81 50%, #0f172a 100%); border-bottom-color: rgba(99, 102, 241, 0.35); color: #fff; }

.app-sim-ribbon {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 14px;
  font-size: 0.74rem;
  background: rgba(30, 41, 59, 0.6);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  overflow-x: auto;
}
html:not(.dark) .app-sim-ribbon {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}
.app-sim-ribbon-tab {
  padding: 3px 8px;
  border-radius: 6px;
  color: #94a3b8;
  cursor: default;
  white-space: nowrap;
  font-weight: 500;
}
html:not(.dark) .app-sim-ribbon-tab {
  color: #475569;
}
.app-sim-ribbon-tab.active {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  font-weight: 700;
}
html:not(.dark) .app-sim-ribbon-tab.active {
  background: #e0e7ff;
  color: #4338ca;
}
.app-sim-copilot-pill {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.3), rgba(79, 70, 229, 0.3));
  border: 1px solid rgba(168, 85, 247, 0.5);
  color: #e9d5ff;
}
html:not(.dark) .app-sim-copilot-pill {
  background: linear-gradient(135deg, #f3e8ff, #ede9fe);
  border-color: #c084fc;
  color: #6b21a8;
}

.app-sim-workspace {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  position: relative;
}
@media (min-width: 1024px) {
  .app-sim-workspace.split {
    display: grid;
    grid-template-columns: 1fr 340px;
  }
}
.app-sim-main {
  padding: 16px;
  flex: 1;
  overflow: auto;
}
.app-sim-aside {
  border-left: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  flex-direction: column;
}
html:not(.dark) .app-sim-aside {
  background: #f8fafc;
  border-left-color: #e2e8f0;
}
.app-code-block {
  margin: 12px 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: #020617;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
}
.app-code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: #0f172a;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  font-size: 0.68rem;
}
.app-code-block pre {
  margin: 0;
  padding: 12px;
  overflow-x: auto;
  color: #34d399;
  line-height: 1.5;
  white-space: pre;
}


/* ==========================================================================
   Real Desktop Program Simulators (Normal Full-Size Dimensions)
   ========================================================================== */

.app-simulator-window {
  margin-bottom: 1.25rem;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: #090d16;
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  min-height: 640px;
  width: 100%;
}
@media (min-width: 1024px) {
  .app-simulator-window {
    min-height: 720px;
  }
}
html:not(.dark) .app-simulator-window {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

/* Ribbons & Toolbars */
.app-sim-ribbon-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-size: 0.72rem;
  background: rgba(15, 23, 42, 0.7);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  overflow-x: auto;
}
html:not(.dark) .app-sim-ribbon-tools {
  background: #f1f5f9;
  border-color: #e2e8f0;
}
.app-sim-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 500;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(148, 163, 184, 0.15);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.app-sim-tool-btn:hover {
  background: rgba(99, 102, 241, 0.2);
  color: #ffffff;
}
html:not(.dark) .app-sim-tool-btn {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #334155;
}
html:not(.dark) .app-sim-tool-btn:hover {
  background: #ede9fe;
  color: #4338ca;
}
.app-sim-tool-sep {
  width: 1px;
  height: 20px;
  background: rgba(148, 163, 184, 0.2);
  margin: 0 4px;
}

/* Gemini Gem Builder Styles */
.gem-builder-shell {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 640px;
}
.gem-nav-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.gem-tab-btn {
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #94a3b8;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}
.gem-tab-btn.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.4);
  color: #c7d2fe;
}
html:not(.dark) .gem-tab-btn {
  color: #475569;
}
html:not(.dark) .gem-tab-btn.active {
  background: #e0e7ff;
  border-color: #a5b4fc;
  color: #3730a3;
}
.gem-avatar-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.35);
}
html:not(.dark) .gem-avatar-badge {
  background: #e0e7ff;
  border-color: #a5b4fc;
}
.gem-field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 6px;
}
html:not(.dark) .gem-field-label {
  color: #0f172a;
}
.gem-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
}
html:not(.dark) .gem-chip {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #1e293b;
}
.gem-sidebar-nav {
  width: 220px;
  background: rgba(15, 23, 42, 0.85);
  border-right: 1px solid rgba(148, 163, 184, 0.15);
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
html:not(.dark) .gem-sidebar-nav {
  background: #f8fafc;
  border-right-color: #cbd5e1;
}
.gem-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 500;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
}
.gem-nav-item.active {
  background: rgba(99, 102, 241, 0.2);
  color: #c7d2fe;
  font-weight: 700;
}
html:not(.dark) .gem-nav-item.active {
  background: #ede9fe;
  color: #4338ca;
}

/* PowerPoint Stage Styles */
.ppt-shell {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 680px;
}
.ppt-body-split {
  display: grid;
  grid-template-columns: 180px 1fr 320px;
  flex: 1;
  min-height: 540px;
}
@media (max-width: 1024px) {
  .ppt-body-split {
    grid-template-columns: 1fr;
  }
}
.ppt-thumbnails-sidebar {
  padding: 12px;
  border-right: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(15, 23, 42, 0.75);
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}
html:not(.dark) .ppt-thumbnails-sidebar {
  background: #f8fafc;
  border-right-color: #cbd5e1;
}
.ppt-thumb-card {
  padding: 8px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(30, 41, 59, 0.5);
  cursor: pointer;
  transition: all 0.15s ease;
}
.ppt-thumb-card.active {
  border-color: #f97316;
  background: rgba(249, 115, 22, 0.12);
}
html:not(.dark) .ppt-thumb-card {
  background: #ffffff;
  border-color: #cbd5e1;
}
html:not(.dark) .ppt-thumb-card.active {
  border-color: #ea580c;
  background: #fff7ed;
}
.ppt-thumb-preview {
  border-radius: 5px;
  background: rgba(15, 23, 42, 0.8);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.15);
}
html:not(.dark) .ppt-thumb-preview {
  background: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
}
.ppt-slide-stage {
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
  flex: 1;
  overflow: auto;
}
html:not(.dark) .ppt-slide-stage {
  background: radial-gradient(circle at center, #f1f5f9 0%, #e2e8f0 100%);
}
.ppt-slide-canvas {
  width: 100%;
  max-width: 820px;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #0b1120 0%, #1e1b4b 100%);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08);
  padding: 28px 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
html:not(.dark) .ppt-slide-canvas {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #cbd5e1;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.05);
}
html:not(.dark) .ppt-slide-canvas .bg-white\/10 {
  background-color: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}
html:not(.dark) .ppt-slide-canvas .border-white\/10,
html:not(.dark) .ppt-slide-canvas .border-white\/15 {
  border-color: #cbd5e1 !important;
}
.ppt-notes-bar {
  width: 100%;
  max-width: 820px;
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.72rem;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.18);
}
html:not(.dark) .ppt-notes-bar {
  background: #ffffff;
  border-color: #cbd5e1;
}

/* Word Document Stage Styles */
.word-shell {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 680px;
}
.word-page-stage {
  padding: 32px 18px;
  background: #0b0f19;
  display: flex;
  justify-content: center;
  flex: 1;
  overflow-y: auto;
}
html:not(.dark) .word-page-stage {
  background: #e2e8f0;
}
.word-doc-sheet {
  width: 100%;
  max-width: 800px;
  min-height: 620px;
  background: #ffffff;
  color: #1e293b;
  border-radius: 4px;
  padding: 48px 56px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  font-family: 'Calibri', 'Inter', -apple-system, sans-serif;
  line-height: 1.65;
}
@media (max-width: 640px) {
  .word-doc-sheet {
    padding: 24px 20px;
  }
}
.word-copilot-draft-banner {
  padding: 14px 16px;
  border-radius: 12px;
  background: #f5f3ff;
  border: 1px solid #d8b4fe;
  color: #3b0764;
}
.word-ruler-bar {
  display: flex;
  align-items: center;
  height: 18px;
  background: #1e293b;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  padding: 0 14px;
  font-size: 0.62rem;
  color: #64748b;
  font-family: monospace;
}
html:not(.dark) .word-ruler-bar {
  background: #e2e8f0;
  color: #64748b;
}

/* Outlook 3-Column Styles */
.outlook-shell-window {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 680px;
}
.outlook-shell {
  display: grid;
  grid-template-columns: 180px 260px 1fr;
  flex: 1;
  min-height: 600px;
}
@media (max-width: 1024px) {
  .outlook-shell {
    grid-template-columns: 240px 1fr;
  }
  .outlook-folders-rail {
    display: none;
  }
}
@media (max-width: 768px) {
  .outlook-shell {
    grid-template-columns: 1fr;
  }
}
.outlook-inbox-col {
  padding: 12px;
  border-right: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(15, 23, 42, 0.65);
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}
html:not(.dark) .outlook-inbox-col {
  background: #f8fafc;
  border-right-color: #cbd5e1;
}
.outlook-msg-item {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(30, 41, 59, 0.45);
  cursor: pointer;
  transition: all 0.15s ease;
}
.outlook-msg-item.active {
  background: rgba(14, 165, 233, 0.15);
  border-color: rgba(14, 165, 233, 0.4);
}
html:not(.dark) .outlook-msg-item {
  background: #ffffff;
  border-color: #cbd5e1;
}
html:not(.dark) .outlook-msg-item.active {
  background: #f0f9ff;
  border-color: #38bdf8;
}
.outlook-preview-col {
  padding: 16px 20px;
  background: rgba(9, 13, 22, 0.85);
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
}
html:not(.dark) .outlook-preview-col {
  background: #ffffff;
}
.outlook-copilot-summary {
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.3);
}
html:not(.dark) .outlook-copilot-summary {
  background: #f0f9ff;
  border-color: #bae6fd;
}

/* Teams Meeting Normal Size */
.teams-shell {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 680px;
}
.teams-meeting-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  flex: 1;
  margin-bottom: 12px;
}
@media (max-width: 640px) {
  .teams-meeting-grid {
    grid-template-columns: 1fr;
  }
}
.teams-video-tile {
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  background: #191c2e;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid rgba(148, 163, 184, 0.2);
  min-height: 150px;
}
.teams-video-tile.speaking {
  border-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}
.teams-tile-label {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.85);
  color: #f8fafc !important;
  font-size: 0.7rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.teams-tile-label span {
  color: #f8fafc !important;
}
.teams-transcript-pane {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 0.75rem;
  line-height: 1.5;
  max-height: 220px;
  overflow-y: auto;
}
html:not(.dark) .teams-transcript-pane {
  background: #ffffff;
  border-color: #cbd5e1;
}

/* Excel Normal Size */
.excel-shell {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 680px;
}

/* Make.com Normal Size */
.make-shell {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 680px;
}
.make-canvas {
  padding: 36px 24px;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  background: radial-gradient(circle at center, #1e1b4b 0%, #0f172a 100%);
}
html:not(.dark) .make-canvas {
  background: radial-gradient(circle at center, #f5f3ff 0%, #ede9fe 100%);
}
.make-node-circle {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border-width: 3px;
  border-style: solid;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  color: #ffffff !important;
  font-size: 1.35rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}
.make-node-badge {
  position: absolute;
  bottom: -22px;
  white-space: nowrap;
  font-size: 0.68rem;
  font-weight: 700;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.85);
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.25);
}
html:not(.dark) .make-node-badge {
  background: #ffffff;
  color: #1e293b;
  border-color: #cbd5e1;
}
.make-connector-line {
  width: 36px;
  height: 3px;
  background: rgba(139, 92, 246, 0.5);
  border-radius: 2px;
}
html:not(.dark) .make-connector-line {
  background: #8b5cf6;
}

/* General AI Normal Size */
.general-ai-shell {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 680px;
}
