@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400..700;1,400..700&family=Outfit:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  /* Brand Theme Tokens */
  --brand-primary: #ffffff; /* Pure White */
  --brand-secondary: rgba(214, 213, 212, 0.85); /* Left Nav Light Silver */
  --brand-glow: rgba(255, 255, 255, 0.12);
  
  --bg-dark: #0d0e0f;
  --bg-deep: #0f1011;
  --panel-bg: rgba(214, 213, 212, 0.035);
  --panel-border: rgba(214, 213, 212, 0.08);
  --panel-border-glow: rgba(214, 213, 212, 0.18);
  
  --accent-primary: var(--brand-primary);
  --accent-indigo: rgba(214, 213, 212, 0.85);
  --accent-indigo-light: rgba(255, 255, 255, 0.06);
  --accent-secondary: var(--brand-secondary);
  
  /* Constitution Cognitive State Tokens (Section 3.1) */
  --mastery-green: #10b981; /* Emerald 500 - Concept Mastered */
  --review-amber: #f59e0b; /* Amber 500 - Needs Spaced Review */
  --challenge-indigo: #ffffff; /* Indigo 500 - Active Challenge */
  --alert-rose: #f43f5e; /* Rose 500 - Misconception Detected */
  
  --accent-emerald: var(--mastery-green);
  --accent-rose: var(--alert-rose);
  --accent-amber: var(--review-amber);
  
  /* Constitution Strict 8px Spatial Scale Tokens (Section 4) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  
  --text-primary: #ffffff;
  --text-secondary: rgba(214, 213, 212, 0.82);
  --text-muted: rgba(214, 213, 212, 0.55);
  
  /* Typography System (Constitution Section 1.1) */
  --font-display: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  --font-sans: 'Plus Jakarta Sans', sans-serif;
  --font-serif: 'Lora', 'Georgia', serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  --shadow-sm: 0 2px 8px -2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 20px -4px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 10px 40px -10px rgba(0, 0, 0, 0.9);
  
  --transition-fast: 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.25s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-slow: 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.hidden {
  display: none !important;
}

/* Constitution Focus Rings & Universal Accessibility (Section 8.2) */
:focus-visible {
  outline: 2px solid var(--brand-primary) !important;
  outline-offset: 2px !important;
  border-radius: 4px;
}

*:focus:not(:focus-visible) {
  outline: none;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

/* Scrollbar Customization */
*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
}
*::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

body {
  background-color: var(--bg-dark);
  background-image: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* App Container & 3-Column Layout */
#app.app-layout {
  display: flex;
  flex-direction: row;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  position: relative;
}

/* ═══════════════════════════════════════════════ */
/* LEFT NAVIGATION BAR (~220px — Perplexity style)  */
/* ═══════════════════════════════════════════════ */
.app-left-nav {
  width: 200px;
  min-width: 200px;
  flex-shrink: 0;
  background: rgba(214, 213, 212, 0.035);
  border-right: 1px solid rgba(214, 213, 212, 0.07);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  z-index: 30;
  backdrop-filter: blur(20px);
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), min-width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-left-nav.collapsed {
  width: 50px;
  min-width: 50px;
}

.app-left-nav.collapsed .logo-title,
.app-left-nav.collapsed .nav-new-session-btn,
.app-left-nav.collapsed .nav-scroll-area {
  display: none !important;
}

.app-left-nav.collapsed .nav-logo-section {
  padding: 14px 10px;
  justify-content: center;
  cursor: pointer;
}

.app-left-nav.collapsed .logo-left-cluster {
  display: flex;
}

.app-left-nav.collapsed .sidebar-toggle-btn {
  display: none;
}

.app-left-nav.collapsed .nav-logo-section:hover .logo-left-cluster {
  display: none;
}

.app-left-nav.collapsed .nav-logo-section:hover .sidebar-toggle-btn {
  display: flex;
}

.nav-logo-section {
  padding: 12px 14px 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-left-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-toggle-btn {
  background: transparent;
  border: none;
  color: rgba(214, 213, 212, 0.65);
  width: 30px;
  height: 30px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sidebar-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

/* Perplexity Style "+ New" Button */
.nav-new-session-btn {
  margin: 4px 10px 14px 10px;
  height: 36px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(214, 213, 212, 0.12);
  border-radius: 8px;
  color: #ffffff;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-new-btn-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-shortcut-badge {
  font-size: 11px;
  color: rgba(214, 213, 212, 0.45);
  font-family: monospace;
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 5px;
  border-radius: 4px;
}

.nav-new-session-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(214, 213, 212, 0.2);
  color: #ffffff;
}

.nav-new-session-btn:active {
  transform: translateY(1px);
}

.nav-scroll-area {
  flex: 1;
  overflow-y: auto;
  padding: 0 10px 20px 10px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Nav Section Header (Perplexity Style: (icon) Header) */
.nav-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-section-header {
  display: flex;
  align-items: center;
  padding: 8px 6px 6px 6px;
  color: rgba(214, 213, 212, 0.75);
  font-size: 14px;
  font-weight: 500;
  cursor: default;
  user-select: none;
}

.nav-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-section-title svg {
  opacity: 0.8;
  flex-shrink: 0;
}

.nav-section-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Navigation Items (Clean Text Items - No Icons per row) */
.nav-item {
  padding: 5px 8px;
  min-height: 32px;
  border-radius: 6px;
  color: rgba(214, 213, 212, 0.82);
  font-size: 13.5px;
  font-weight: 400;
  line-height: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: all var(--transition-fast);
  text-decoration: none;
  border: 1px solid transparent;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.nav-item.active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-weight: 500;
}

.nav-item {
  position: relative;
  justify-content: space-between;
}

.nav-item-title-container {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.nav-item-star-icon {
  color: #f59e0b;
  font-size: 0.78rem;
  flex-shrink: 0;
}

.nav-item-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 22px;
  width: 100%;
}

.nav-item-options-btn {
  background: transparent;
  border: none;
  color: rgba(214, 213, 212, 0.55);
  width: 22px;
  height: 22px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
  margin-left: 4px;
}

.nav-item:hover .nav-item-options-btn,
.nav-item.active .nav-item-options-btn,
.nav-item-options-btn.menu-open {
  opacity: 1;
}

.nav-item-options-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

/* Glassmorphic Context Menu Popup */
.nav-context-menu {
  position: fixed;
  background: rgba(15, 16, 17, 0.96);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(214, 213, 212, 0.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65), 0 2px 8px rgba(0, 0, 0, 0.4);
  border-radius: 9px;
  padding: 5px;
  min-width: 145px;
  z-index: 9999;
  animation: contextMenuPop 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes contextMenuPop {
  from { opacity: 0; transform: scale(0.95) translateY(-4px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.nav-context-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  font-size: 0.82rem;
  color: rgba(214, 213, 212, 0.85);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  user-select: none;
}

.nav-context-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.nav-context-item.danger {
  color: #f87171;
}

.nav-context-item.danger:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.nav-more-toggle-btn {
  padding: 5px 10px;
  font-size: 0.81rem;
  color: rgba(214, 213, 212, 0.55);
  cursor: pointer;
  border-radius: 6px;
  margin: 2px 0 4px 0;
  transition: all 0.15s ease;
  user-select: none;
}

.nav-more-toggle-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}



.nav-item-sub {
  font-size: 11px;
  color: rgba(214, 213, 212, 0.45);
  padding-left: 21px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-node-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.nav-node-item.active {
  color: var(--accent-primary);
  font-weight: 600;
}

/* Main Content Wrapper */
.main-content-wrapper {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

/* Header */
header.app-header {
  position: absolute;
  top: 10px;
  right: 16px;
  z-index: 100;
  height: 0;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  backdrop-filter: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  pointer-events: none;
}

.header-right-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  pointer-events: auto;
}

.header-split-toggle-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(214, 213, 212, 0.65);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.header-split-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.15);
}

.header-split-toggle-btn.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-session-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 400px;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon-wrapper {
  width: 32px;
  height: 32px;
  background: #ffffff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  box-shadow: none;
  transition: transform var(--transition-fast);
}

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

.logo-mark {
  color: #0d0e0f;
  line-height: 1;
}

.logo-text-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.logo-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.5px;
  color: #ffffff;
}

.logo-badge {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--accent-primary);
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.header-status {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

/* Constitution Section 7.2: Mastery Progress Ring Component */
.mastery-ring-wrapper {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(214, 213, 212, 0.035);
  border: 1px solid rgba(214, 213, 212, 0.08);
  padding: 4px 10px 4px 6px;
  border-radius: 99px;
  backdrop-filter: blur(8px);
}

.mastery-ring-svg {
  transform: rotate(-90deg);
  display: block;
}

.mastery-ring-label {
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.2px;
}

.calibration-badge {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 99px;
  padding: 5px 12px;
  font-size: 0.8rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.calibration-level {
  font-weight: 600;
  color: var(--mastery-green);
  text-transform: capitalize;
}

/* Screens Wrapper */
.screen-wrapper {
  flex: 1;
  position: relative;
  overflow: hidden;
}

/* Landing / Onboarding Screen */
.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.screen.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.98);
}

/* ═══════════════════════════════════════════════ */
/* WELCOME SCREEN (Stage 1 — Perplexity style)   */
/* ═══════════════════════════════════════════════ */
#welcome-screen {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px;
  background: rgba(214, 213, 212, 0.035);
  backdrop-filter: blur(20px);
}

.welcome-content {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: -30px;
  animation: fadeIn 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.welcome-hero {
  text-align: center;
}

.welcome-title {
  font-family: var(--font-sans);
  font-size: 2.2rem;
  font-weight: 300;
  line-height: 1.3;
  color: #ffffff;
  letter-spacing: -0.6px;
}

/* Input card — Perplexity teardown specs */
.welcome-input-card {
  width: 100%;
  background: rgba(214, 213, 212, 0.035);
  border: 1px solid rgba(214, 213, 212, 0.12);
  border-radius: 16px;
  padding: 14px 18px 12px 18px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(24px);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.welcome-input-card:focus-within {
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.45);
}

.welcome-textarea-container {
  width: 100%;
}

.welcome-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1.02rem;
  line-height: 1.5;
  padding: 2px 0;
  resize: none;
  min-height: 48px;
}

.welcome-input::placeholder {
  color: var(--text-muted);
}

/* Integrated Composer Toolbar */
.welcome-composer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.toolbar-left-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
}

.welcome-attach-icon-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(214, 213, 212, 0.75);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.welcome-attach-icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.15);
}

.focus-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-primary);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 5px 11px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
}

.toolbar-right-cluster {
  display: flex;
  align-items: center;
}


.welcome-send-btn,
.send-btn,
.sidebar-send-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--text-primary, #ffffff);
  color: #0f1011;
  border: none;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  flex-shrink: 0;
  margin-bottom: 2px;
  transition: all 0.15s ease;
}

.welcome-send-btn:hover,
.send-btn:hover,
.sidebar-send-btn:hover {
  background: rgba(255, 255, 255, 0.85);
  transform: scale(1.04);
}

.welcome-send-btn:active,
.send-btn:active,
.sidebar-send-btn:active {
  transform: scale(0.95);
}





.welcome-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.welcome-attach-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 0.82rem;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 8px;
  transition: all 0.15s ease;
  background: transparent;
  border: 1px solid transparent;
}

.welcome-attach-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

/* Suggestion chips */
.welcome-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.suggestion-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  color: var(--text-secondary);
  font-size: 0.82rem;
  padding: 7px 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-sans);
  white-space: nowrap;
}

.suggestion-chip:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--text-primary);
  transform: translateY(-1px);
}

/* Shared upload/file components */
.file-upload-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  padding: 8px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
}

.file-upload-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.15);
}

.file-upload-btn input {
  display: none;
}







.uploaded-files-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0;
  margin-bottom: 6px;
}

.uploaded-file-tag {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 6px;
  animation: scaleIn 0.2s ease-out;
}

.remove-file-btn {
  cursor: pointer;
  color: var(--accent-rose);
  font-weight: bold;
}


/* Workspace Screen (2-Column Split Screen: AI Chat Left, Canvas Right) */
#workspace-screen {
  display: flex;
  flex-direction: row;
  height: 100%;
  width: 100%;
  overflow: hidden;
  position: relative;
}

/* Sidebar Chat Panel (Left Side - Column 1: AI Text Area) */
.chat-sidebar {
  width: 45%;
  min-width: 360px;
  max-width: 750px;
  background: rgba(214, 213, 212, 0.035);
  border-right: 1px solid rgba(214, 213, 212, 0.07);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  position: relative;
  transition: width 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
  flex-shrink: 0;
  z-index: 10;
  backdrop-filter: blur(20px);
}

.chat-sidebar.resizing {
  transition: none !important;
}

.chat-sidebar.collapsed {
  display: none !important;
}

/* Canvas View Panel (Right Side - Column 2: Canvas) */
.canvas-panel {
  flex: 1;
  min-width: 0;
  background: rgba(214, 213, 212, 0.035);
  position: relative;
  overflow: hidden;
  height: 100%;
  transition: opacity 0.2s ease;
  backdrop-filter: blur(20px);
}

.canvas-panel.collapsed {
  display: none !important;
}

.icon-toggle-btn {
  background: transparent;
  border: 1px solid var(--panel-border);
  color: var(--text-secondary);
  border-radius: 8px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.icon-toggle-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Panel Resizer Handle (Cursor & Antigravity IDE Gutter Lock Standard) */
.panel-resizer {
  width: 12px;
  height: 100%;
  background: transparent;
  cursor: col-resize;
  position: relative;
  z-index: 20;
  flex-shrink: 0;
  margin: 0 -6px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  touch-action: none;
}

.panel-resizer::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 5px;
  width: 1px;
  background: var(--panel-border);
  transition: background 0.15s ease, width 0.15s ease;
}

.panel-resizer:hover::after,
.panel-resizer.resizing::after {
  background: rgba(255, 255, 255, 0.25);
  width: 2px;
  left: 5px;
}

.gutter-toggle-btn {
  position: absolute;
  top: 14px;
  z-index: 25;
  background: rgba(15, 16, 17, 0.95);
  border: 1px solid rgba(214, 213, 212, 0.08);
  color: var(--text-secondary);
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  opacity: 0.7;
  transition: all 0.15s ease;
}

.panel-resizer:hover .gutter-toggle-btn,
.gutter-toggle-btn:hover {
  opacity: 1;
  color: var(--text-primary);
  border-color: rgba(214, 213, 212, 0.2);
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.08);
}

/* Floating Expand Panel Buttons */
.expand-panel-btn {
  position: absolute;
  top: 20px;
  z-index: 15;
  background: rgba(15, 16, 17, 0.95);
  border: 1px solid rgba(214, 213, 212, 0.14);
  color: var(--text-primary);
  padding: 8px 14px;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-fast);
}

.expand-chat-btn {
  right: 20px;
}

.expand-canvas-btn {
  left: 20px;
}

.expand-panel-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.sidebar-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--panel-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.sidebar-node-title-el {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(214, 213, 212, 0.55);
  letter-spacing: -0.2px;
  margin: 0;
}

.sidebar-header .node-badge {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 6px;
  color: var(--accent-primary);
  font-weight: bold;
}

.chat-history {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0; /* Ensures flex container allows scroll overflow */
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}

.chat-history::-webkit-scrollbar {
  width: 6px;
}
.chat-history::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 3px;
}
.chat-history::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}
.chat-history::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* Message Bubbles */
.message-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
  animation: messageSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.message-wrapper.user {
  align-items: flex-end;
  width: 100%;
  margin-bottom: 18px;
}

.message-wrapper.assistant {
  align-items: flex-start;
}

.message-bubble {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.user .message-bubble {
  width: fit-content;
  max-width: 85%;
  align-self: flex-end;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  border: 1px solid rgba(214, 213, 212, 0.12);
  border-radius: 18px;
  padding: 10px 18px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.5;
  word-break: break-word;
  box-shadow: none;
}

/* Flat Screen AI Responses (ChatGPT / Perplexity Style) */
.assistant .message-bubble {
  max-width: 100%;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 2px 0;
  color: var(--text-primary);
  border-radius: 0;
  font-family: var(--font-serif);
  font-size: 1.02rem;
  line-height: 1.65;
  letter-spacing: 0.01em;
}

.assistant .message-bubble p {
  margin-bottom: 12px;
}
.assistant .message-bubble p:last-child {
  margin-bottom: 0;
}

/* Claude.ai / ChatGPT style typewriter streaming text cursor */
.typing-cursor {
  display: inline-block;
  width: 7px;
  height: 15px;
  background-color: #60a5fa;
  margin-left: 3px;
  vertical-align: middle;
  border-radius: 1px;
  box-shadow: 0 0 8px rgba(96, 165, 250, 0.6);
  animation: typing-cursor-blink 0.8s infinite;
}

@keyframes typing-cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.15; }
}

/* Code block & Markdown syntax styling inside AI messages */
.message-bubble pre {
  background: rgba(214, 213, 212, 0.04);
  border: 1px solid rgba(214, 213, 212, 0.12);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 12px 0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: #ffffff;
  line-height: 1.5;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.message-bubble pre code {
  background: transparent;
  padding: 0;
  border: none;
  border-radius: 0;
  color: inherit;
}

.message-bubble code {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(214, 213, 212, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: #ffffff;
}

.message-bubble ul, .message-bubble ol {
  margin: 8px 0 12px 20px;
  padding: 0;
}

.message-bubble li {
  margin-bottom: 6px;
  line-height: 1.6;
}

.message-bubble blockquote {
  border-left: 3px solid rgba(255, 255, 255, 0.5);
  margin: 10px 0;
  padding: 4px 12px;
  color: rgba(214, 213, 212, 0.75);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 0 6px 6px 0;
}

/* Constitution Section 5.1: Active Recall Blur Masks & Citation Chips */
.active-recall-blur {
  filter: blur(4.5px);
  background: rgba(255, 255, 255, 0.22);
  color: transparent;
  padding: 1px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  display: inline-block;
}

.active-recall-blur:hover, .active-recall-blur.revealed {
  filter: blur(0);
  background: rgba(16, 185, 129, 0.18);
  color: var(--mastery-green);
  text-shadow: none;
}

.citation-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brand-primary);
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  padding: 1px 5px;
  margin: 0 2px;
  cursor: pointer;
  vertical-align: super;
  line-height: 1;
  transition: all 0.15s ease;
}

.citation-chip:hover {
  background: var(--brand-primary);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Monospaced Code Blocks inside Assistant Explanations */
.assistant .message-bubble pre {
  background: rgba(214, 213, 212, 0.04);
  border: 1px solid rgba(214, 213, 212, 0.12);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 12px 0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.5;
  color: #ffffff;
}

.assistant .message-bubble code {
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.88rem;
}

/* Assessment Card inside chat */
.assessment-card {
  margin-top: 14px;
  background: var(--accent-indigo-light);
  border: 1px dashed var(--accent-indigo);
  border-radius: 12px;
  padding: 16px;
  width: 100%;
}

.assessment-header {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent-primary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Auto-expanding Textareas & Composers */
.auto-expand-textarea {
  resize: none;
  overflow-y: auto;
  max-height: 160px;
  min-height: 24px;
  box-sizing: border-border;
  scrollbar-width: thin;
}

/* Sidebar Input */
.sidebar-input-area {
  padding: 16px;
  border-top: 1px solid var(--panel-border);
  background: rgba(13, 14, 15, 0.4);
}

.input-box-wrapper {
  background: rgba(214, 213, 212, 0.035);
  border: 1px solid rgba(214, 213, 212, 0.12);
  border-radius: 14px;
  display: flex;
  align-items: flex-end;
  padding: 8px 12px;
  gap: 8px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-box-wrapper:focus-within {
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: none;
}

.attachment-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  margin-bottom: 2px;
  transition: all var(--transition-fast);
}

.attachment-btn:hover {
  color: var(--accent-primary);
  background: rgba(255, 255, 255, 0.1);
}

.input-box-wrapper textarea {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  padding: 4px 0;
  line-height: 1.5;
}





/* Canvas View Panel */
.canvas-panel {
  background: rgba(214, 213, 212, 0.035);
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
  height: 100%;
}

/* Persistent App Header & Top-Right Split Toggle Button */
.app-header {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 18px;
  z-index: 100;
  pointer-events: none;
}

.header-right-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}

.header-split-toggle-btn {
  width: 32px;
  height: 32px;
  background: rgba(15, 16, 17, 0.85);
  border: 1px solid rgba(214, 213, 212, 0.12);
  border-radius: 8px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--transition-fast);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.header-split-toggle-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.header-split-toggle-btn.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Canvas View Panel Controls (Floating cleanly on right side below app header) */
.canvas-controls {
  position: absolute;
  top: 56px;
  right: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 20;
}

.canvas-btn {
  width: 36px;
  height: 36px;
  background: rgba(24, 26, 28, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
  font-weight: 600;
  font-size: 1.1rem;
}

.canvas-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Canvas Overlay UI */
.canvas-title-overlay {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 5;
  background: rgba(15, 16, 17, 0.9);
  border: 1px solid rgba(214, 213, 212, 0.12);
  padding: 10px 16px;
  border-radius: 12px;
  backdrop-filter: blur(14px);
  max-width: 300px;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.5);
}

.canvas-title-overlay h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 2px;
}

.canvas-title-overlay p {
  font-family: var(--font-sans);
  font-size: 0.76rem;
  color: rgba(214, 213, 212, 0.65);
}

/* Interactive SVG Concept Tree */
#concept-svg {
  width: 100%;
  height: 100%;
  cursor: grab;
  background: transparent;
}

#concept-svg:active {
  cursor: grabbing;
}

.canvas-grid-bg {
  pointer-events: none;
}

/* SVG Node Group & Card Styles */
.svg-node-group {
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.svg-node-group:hover {
  transform: translateY(-2px);
}

.svg-node-bg {
  fill: #16181a;
  stroke: rgba(255, 255, 255, 0.09);
  stroke-width: 1.5;
  transition: fill 0.2s ease, stroke 0.2s ease;
}

.svg-node-group:hover .svg-node-bg {
  stroke: rgba(255, 255, 255, 0.6);
  fill: #1c1e21;
}

.svg-node-group.completed .svg-node-bg {
  stroke: rgba(16, 185, 129, 0.35);
  fill: #111b19;
}

.svg-node-group.active .svg-node-bg {
  stroke: #ffffff;
  fill: #1c1e21;
}

.svg-node-group.available .svg-node-bg {
  stroke: rgba(255, 255, 255, 0.4);
  fill: #181a1c;
}

.svg-node-group.locked .svg-node-bg {
  opacity: 0.45;
  cursor: not-allowed;
  fill: #121416;
  stroke: rgba(255, 255, 255, 0.05);
}

/* Left Indicator Status Accent Bar */
.svg-node-accent-bar {
  transition: fill 0.2s ease;
}

.svg-node-accent-bar.completed {
  fill: #10b981;
}

.svg-node-accent-bar.active {
  fill: #ffffff;
}

.svg-node-accent-bar.available {
  fill: #e5e7eb;
}

.svg-node-accent-bar.locked {
  fill: #334155;
}

/* Typography & Subtext */
.svg-node-text-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  fill: #ffffff;
  letter-spacing: -0.2px;
}

.svg-node-group.locked .svg-node-text-title {
  fill: rgba(214, 213, 212, 0.4);
}

.svg-node-text-desc {
  font-family: var(--font-serif);
  font-size: 11px;
  fill: rgba(214, 213, 212, 0.72);
}

.svg-node-group.locked .svg-node-text-desc {
  fill: rgba(214, 213, 212, 0.35);
}

/* Sequence Badge Pill */
.svg-node-badge-bg {
  fill: rgba(255, 255, 255, 0.06);
}

.svg-node-badge-bg.completed {
  fill: rgba(16, 185, 129, 0.15);
}

.svg-node-badge-bg.active {
  fill: rgba(255, 255, 255, 0.2);
}

.svg-node-badge-text {
  font-family: var(--font-sans);
  font-size: 8.5px;
  font-weight: 700;
  fill: rgba(255, 255, 255, 0.65);
  letter-spacing: 0.5px;
}

.svg-node-badge-bg.completed + .svg-node-badge-text {
  fill: #34d399;
}

.svg-node-badge-bg.active + .svg-node-badge-text {
  fill: #e5e7eb;
}

/* Icon Container Background */
.svg-node-icon-bg {
  transition: fill 0.2s ease;
}

.svg-node-icon-bg.completed {
  fill: rgba(16, 185, 129, 0.12);
}

.svg-node-icon-bg.active {
  fill: rgba(255, 255, 255, 0.18);
}

.svg-node-icon-bg.available {
  fill: rgba(255, 255, 255, 0.12);
}

.svg-node-icon-bg.locked {
  fill: rgba(255, 255, 255, 0.03);
}

/* SVG Line Connections & Flow */
.svg-edge-path {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  transition: stroke 0.3s ease;
}

.svg-edge-path.active,
.svg-edge-path.available {
  stroke-dasharray: 6 5;
  animation: pathDashFlow 16s linear infinite;
}

@keyframes pathDashFlow {
  from { stroke-dashoffset: 100; }
  to { stroke-dashoffset: 0; }
}

/* Progress Spinner Overlay */
.progress-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(13, 14, 15, 0.85);
  backdrop-filter: blur(10px);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  border-top-color: var(--accent-primary);
  animation: spin 1s ease infinite;
}

.progress-text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text-primary);
  text-align: center;
}

/* Keyframes */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

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

@keyframes pathFlow {
  from { stroke-dashoffset: 100; }
  to { stroke-dashoffset: 0; }
}

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

/* Discovery Mode & Full AI Text Mode layout rules */
#workspace-screen.discovery-mode,
#workspace-screen.chat-only-mode {
  background: rgba(214, 213, 212, 0.035);
  backdrop-filter: blur(20px);
}

#workspace-screen.discovery-mode .canvas-panel,
#workspace-screen.discovery-mode #panel-resizer,
#workspace-screen.chat-only-mode .canvas-panel,
#workspace-screen.chat-only-mode #panel-resizer {
  display: none !important;
}

#workspace-screen.discovery-mode .chat-sidebar,
#workspace-screen.chat-only-mode .chat-sidebar {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  border-right: none;
  background: transparent;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#workspace-screen.discovery-mode .sidebar-header,
#workspace-screen.discovery-mode .chat-history,
#workspace-screen.discovery-mode .sidebar-input-area,
#workspace-screen.chat-only-mode .sidebar-header,
#workspace-screen.chat-only-mode .chat-history,
#workspace-screen.chat-only-mode .sidebar-input-area {
  width: 100%;
  max-width: 800px;
  box-sizing: border-box;
}

/* In discovery mode: hide the node context header (title/badge) */
#workspace-screen.discovery-mode .sidebar-header {
  border-bottom: none;
  background: transparent;
  padding-bottom: 0;
}

#workspace-screen.discovery-mode .sidebar-node-title-el,
#workspace-screen.discovery-mode #sidebar-node-status {
  display: none;
}

/* In discovery mode: make the input area feel like a hero chat bar */
#workspace-screen.discovery-mode .sidebar-input-area {
  border-top: none;
  background: transparent;
  padding: 16px 0 24px;
}

#workspace-screen.discovery-mode .input-box-wrapper {
  border-color: rgba(214, 213, 212, 0.12);
  background: rgba(214, 213, 212, 0.035);
  border-radius: 16px;
  padding: 12px 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

#workspace-screen.discovery-mode .input-box-wrapper:focus-within {
  border-color: #ffffff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2), 0 4px 24px rgba(0, 0, 0, 0.3);
}

/* Inline thinking indicator dots animation */
.thinking-dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: var(--accent-primary);
  margin: 2px 0;
}

.thinking-dots span {
  width: 8px;
  height: 8px;
  background: #ffffff;
  border-radius: 50%;
  display: inline-block;
  animation: thinkingBounce 1.4s infinite ease-in-out both;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.thinking-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.thinking-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

.thinking-dots span:nth-child(3) {
  animation-delay: 0s;
}

@keyframes thinkingBounce {
  0%, 80%, 100% {
    transform: scale(0.5);
    opacity: 0.3;
  }
  40% {
    transform: scale(1.25);
    opacity: 1;
  }
}


.welcome-input,
.welcome-input:focus,
.welcome-input:focus-visible,
.input-box-wrapper textarea,
.input-box-wrapper textarea:focus,
.input-box-wrapper textarea:focus-visible {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
}

/* Task Sandbox Drawer & Execution Workspace */
.task-sandbox-container {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 440px;
  max-width: calc(100% - 32px);
  max-height: calc(100% - 32px);
  background: rgba(15, 16, 17, 0.96);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(214, 213, 212, 0.14);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #ffffff;
  font-family: var(--font-sans);
}

.task-sandbox-container.hidden {
  display: none !important;
}

.sandbox-header {
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(214, 213, 212, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sandbox-title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sandbox-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-primary, #ffffff);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.sandbox-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
}

.sandbox-close-btn {
  background: transparent;
  border: none;
  color: rgba(214, 213, 212, 0.6);
  font-size: 22px;
  cursor: pointer;
  padding: 0 6px;
  border-radius: 6px;
  line-height: 1;
}

.sandbox-close-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.sandbox-body {
  padding: 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sandbox-instructions h5 {
  margin: 0 0 6px 0;
  font-size: 13px;
  color: #ffffff;
  font-weight: 600;
}

.sandbox-instructions p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(214, 213, 212, 0.85);
}

.sandbox-rubric {
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid rgba(214, 213, 212, 0.4);
  border-radius: 4px;
  font-size: 12px;
  color: rgba(214, 213, 212, 0.85);
}

.sandbox-editor-wrapper {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(214, 213, 212, 0.12);
  border-radius: 10px;
  overflow: hidden;
}

.sandbox-editor-header {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 11px;
  color: rgba(214, 213, 212, 0.65);
  font-family: monospace;
  border-bottom: 1px solid rgba(214, 213, 212, 0.08);
}

.sandbox-editor-textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px;
  background: rgba(214, 213, 212, 0.035);
  color: #ffffff;
  border: none;
  font-family: monospace;
  font-size: 13px;
  line-height: 1.5;
  resize: vertical;
  outline: none;
}

.sandbox-submit-btn {
  width: 100%;
  padding: 10px 16px;
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sandbox-submit-btn:hover {
  background: #3b82f6;
}

.sandbox-submit-btn:disabled {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.4);
  cursor: not-allowed;
}

.sandbox-result-badge {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.feedback-pass {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.feedback-refine {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.sandbox-result-text {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
}

.sandbox-misconceptions {
  margin-top: 10px;
  font-size: 12px;
  color: #fb7185;
}

.sandbox-eval-spinner {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
}

/* ════════════════════════════════════════════════════════════════
   Ghostly Translucent Agent Thinking HUD & SVG Canvas Animations
   Anthropic-Grade Glassmorphic Architecture & Performance
   ════════════════════════════════════════════════════════════════ */

.canvas-thinking-hud {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 50;
  width: 320px;
  max-width: calc(100% - 40px);
  background: rgba(15, 16, 17, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(214, 213, 212, 0.12);
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  font-family: var(--font-sans);
  color: rgba(214, 213, 212, 0.88);
  pointer-events: none;
  transform: translateZ(0);
  will-change: transform, opacity;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.canvas-thinking-hud.hidden {
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
  pointer-events: none;
}

@supports not (backdrop-filter: blur(1px)) {
  .canvas-thinking-hud {
    background: rgba(14, 16, 20, 0.96) !important;
    backdrop-filter: none !important;
  }
}

.thinking-hud-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.thinking-hud-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #60a5fa;
  box-shadow: 0 0 10px #3b82f6;
  animation: agentGlowPulse 1.8s infinite ease-in-out;
}

.thinking-hud-dot.verified {
  background: #34d399;
  box-shadow: 0 0 10px #10b981;
  animation: none;
}

.thinking-hud-dot.error {
  background: #fb7185;
  box-shadow: 0 0 10px #f43f5e;
  animation: none;
}

.thinking-hud-agent {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #93c5fd;
}

.thinking-hud-stream {
  font-family: 'Lora', Georgia, serif;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(241, 245, 249, 0.88);
  transition: opacity 0.2s ease;
}

.thinking-hud-stream.error-text {
  font-family: var(--font-sans);
  color: #fca5a5;
}

/* --- SVG Progressive Canvas Animations --- */

@keyframes svgPathDraw {
  from {
    stroke-dashoffset: var(--path-len, 300);
  }
  to {
    stroke-dashoffset: 0;
  }
}

.svg-edge-path.animated {
  stroke-dasharray: var(--path-len, 300);
  stroke-dashoffset: var(--path-len, 300);
  animation: svgPathDraw 0.45s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes svgNodePopIn {
  0% {
    opacity: 0;
    transform: scale(0.86);
  }
  70% {
    transform: scale(1.02);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.svg-node-group.animated {
  opacity: 0;
  animation: svgNodePopIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes svgNodeDissolve {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.85);
    filter: grayscale(1) opacity(0.2);
  }
}

.svg-node-group.dissolving {
  animation: svgNodeDissolve 0.35s ease-out forwards !important;
}

@keyframes agentGlowPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.35);
    opacity: 1;
  }
}

/* --- Reduced Motion Accessibility Fallback --- */
@media (prefers-reduced-motion: reduce) {
  .svg-edge-path.animated {
    stroke-dasharray: none !important;
    stroke-dashoffset: 0 !important;
    animation: none !important;
  }

  .svg-node-group.animated {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  .svg-node-group.dissolving {
    opacity: 0 !important;
    transform: none !important;
    animation: none !important;
  }

  .thinking-hud-dot {
    animation: none !important;
  }
}

/* --- Secondary Related Edge Styling --- */
.svg-edge-path.related {
  stroke-dasharray: 6 4 !important;
  stroke: rgba(148, 163, 184, 0.55) !important;
  stroke-width: 1.8px !important;
  opacity: 0.65 !important;
  transition: opacity 0.2s ease;
}

.svg-edge-path.related:hover {
  opacity: 1 !important;
  stroke: rgba(199, 210, 254, 0.9) !important;
}

/* --- Canvas Hover-to-Expand Glassmorphic Tooltip --- */
.canvas-hover-tooltip {
  position: fixed;
  z-index: 99999;
  pointer-events: none;
  background: rgba(15, 16, 17, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(214, 213, 212, 0.14);
  box-shadow: 0 16px 36px -6px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 12px 16px;
  max-width: 320px;
  color: rgba(214, 213, 212, 0.85);
  font-family: var(--font-sans);
  opacity: 0;
  transform: translateY(6px) scale(0.96);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.canvas-hover-tooltip.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.canvas-hover-tooltip .tooltip-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #93c5fd;
  margin-bottom: 6px;
}

.canvas-hover-tooltip .tooltip-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: #ffffff;
  margin-bottom: 6px;
}

.canvas-hover-tooltip .tooltip-desc {
  font-family: var(--font-serif);
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(214, 213, 212, 0.88);
}

/* --- Task Sandbox & Challenge Card Components (Seamless No-Card Layout) --- */
.task-sandbox-container {
  position: absolute;
  inset: 16px;
  z-index: 100;
  background: rgba(16, 17, 19, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(214, 213, 212, 0.14);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sandbox-header {
  padding: 20px 24px 12px;
  border-bottom: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  background: transparent;
}

.sandbox-badge {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  display: inline-block;
  margin-bottom: 4px;
}

.sandbox-title {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.3px;
  line-height: 1.35;
}

.sandbox-close-btn {
  background: transparent;
  border: none;
  color: rgba(214, 213, 212, 0.6);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.sandbox-close-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.sandbox-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sandbox-instructions {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
}

.sandbox-instructions h5 {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 8px;
  letter-spacing: -0.1px;
  text-transform: none;
}

.sandbox-instructions p {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  line-height: 1.6;
  color: rgba(214, 213, 212, 0.78);
}

.sandbox-rubric {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(214, 213, 212, 0.08);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  color: rgba(214, 213, 212, 0.75);
}

.sandbox-editor-wrapper {
  background: rgba(10, 11, 12, 0.75);
  border: 1px solid rgba(214, 213, 212, 0.12);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sandbox-editor-header {
  padding: 10px 16px 4px;
  background: transparent;
  border-bottom: none;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(214, 213, 212, 0.55);
}
  color: rgba(214, 213, 212, 0.82);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.sandbox-editor-textarea {
  width: 100%;
  min-height: 140px;
  background: transparent;
  border: none;
  outline: none;
  padding: 14px;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.5;
  resize: vertical;
}

.sandbox-editor-textarea::placeholder {
  color: rgba(214, 213, 212, 0.4);
}

.sandbox-submit-btn {
  width: 100%;
  background: #0066ff;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 13px 20px;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 4px 16px rgba(0, 102, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sandbox-submit-btn:hover {
  background: #0052cc;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 102, 255, 0.5);
}

/* ==========================================================================
   AUTHENTICATION UI (USER SLOT, POPOVER & AUTH MODAL)
   ========================================================================== */

/* User Slot Container at Bottom of Left Navigation Bar (Compact Hierarchy) */
.user-profile-slot-container {
  margin-top: auto;
  padding: 6px 8px;
  border-top: none;
  position: relative;
}

.user-profile-slot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.user-profile-slot:hover {
  background: rgba(255, 255, 255, 0.07);
}

.user-avatar-wrapper {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #20B2AA 0%, #0D9488 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: none;
}

.user-avatar-initials {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.68rem;
  color: #ffffff;
  letter-spacing: 0.3px;
}

.user-info-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.user-display-name {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.user-subtext {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.user-slot-action-icon {
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
}

/* User Popover Menu (Black & White Minimalist — No Outline) */
.user-popover-menu {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 8px;
  right: 8px;
  background: #111215;
  border: none;
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85);
  z-index: 500;
  animation: popoverFadeIn 0.18s ease-out;
}

@keyframes popoverFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.popover-user-header {
  padding: 8px 10px;
}

.popover-user-name {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.88rem;
  color: #ffffff;
}

.popover-user-email {
  font-family: var(--font-sans);
  font-size: 0.76rem;
  color: var(--text-tertiary);
  word-break: break-all;
}

.popover-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 6px 0;
}

.popover-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.popover-menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.popover-menu-item.danger {
  color: #ff5252;
}

.popover-menu-item.danger:hover {
  background: rgba(255, 82, 82, 0.12);
  color: #ff6b6b;
}

/* Auth Full-Screen Canvas Overlay (Perplexity-Style No-Card Layout) */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: #131416;
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  overflow-y: auto;
  padding: 40px 20px;
  animation: modalOverlayFade 0.2s ease;
}

@keyframes modalOverlayFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.auth-top-close {
  position: fixed;
  top: 24px;
  right: 28px;
  background: transparent;
  border: none;
  color: #8E8E87;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s ease;
  z-index: 2010;
}

.auth-top-close:hover {
  color: #ECECE9;
}

.auth-fullscreen-container {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: auto;
  animation: modalCardSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.auth-modal-header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-modal-title {
  font-family: 'Lora', 'Georgia', serif;
  font-size: 1.85rem;
  font-weight: 400;
  color: #ECECE9;
  line-height: 1.3;
  margin: 0 0 12px 0;
  letter-spacing: -0.3px;
}

.auth-modal-subtitle {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: #8E8E87;
  margin: 0;
  line-height: 1.4;
}

.auth-policy-underline {
  text-decoration: underline;
  color: #8E8E87;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s ease;
}

.auth-policy-underline:hover {
  color: #ECECE9;
}

/* Social Action Buttons */
.auth-social-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-social-btn {
  width: 100%;
  height: 46px;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.18s ease;
  border: none;
  box-shadow: none;
}

.auth-social-btn.primary-social {
  background: #ECECE9;
  color: #131416;
}

.auth-social-btn.primary-social:hover {
  background: #D8D8D4;
}

/* Divider Line */
.auth-modal-divider {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 20px 0;
}

/* Form Controls */
.auth-error-banner {
  width: 100%;
  background: rgba(255, 82, 82, 0.12);
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: #ff6b6b;
  margin-bottom: 16px;
  text-align: left;
}

.auth-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-field-group {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.auth-input {
  width: 100%;
  height: 46px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 0 16px;
  color: #ECECE9;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  outline: none;
  transition: all 0.18s ease;
  text-align: left;
}

.auth-input::placeholder {
  color: #6B7280;
}

.auth-input:focus {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

.auth-submit-btn {
  width: 100%;
  height: 46px;
  background: rgba(255, 255, 255, 0.08);
  color: #ECECE9;
  border: none;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.auth-submit-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
}

.auth-submit-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.auth-spinner {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ECECE9;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.auth-modal-footer {
  margin-top: 14px;
  text-align: center;
}

.auth-mode-switch-footer {
  margin-bottom: 12px;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: #8E8E87;
}

.auth-switch-btn {
  background: transparent;
  border: none;
  color: #ECECE9;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  margin-left: 4px;
  transition: color 0.15s ease;
}

.auth-switch-btn:hover {
  color: #FFFFFF;
}

.auth-sso-link {
  background: transparent;
  border: none;
  color: #8E8E87;
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s ease;
}

.auth-sso-link:hover {
  color: #ECECE9;
}

.auth-bottom-close-container {
  margin-top: 28px;
  text-align: center;
}

.auth-bottom-close-btn {
  background: transparent;
  border: none;
  color: #8E8E87;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s ease;
}

.auth-bottom-close-btn:hover {
  color: #ECECE9;
}



