/* ==========================================================================
   W.B.M. ZION SENIOR HIGH SCHOOL — COMPACT PROFESSIONAL LANDING SYSTEM
   Theme: Modern FinTech / Institutional (Emerald & Slate)
   Aesthetic: Compact, Modern, Balanced, Elegant (Zero Duplicates)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Colors - Light Mode */
  --bg-base: #f8fafc;
  --bg-subtle: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-glass: rgba(255, 255, 255, 0.9);
  --border-card: #e2e8f0;
  --border-focus: #10b981;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --emerald-50: #ecfdf5;
  --emerald-100: #d1fae5;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-700: #047857;
  --emerald-glow: rgba(16, 185, 129, 0.12);
  --emerald-gradient: linear-gradient(135deg, #059669 0%, #10b981 100%);

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 8px -1px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 6px 18px -3px rgba(15, 23, 42, 0.08);
  --shadow-glow: 0 4px 18px rgba(16, 185, 129, 0.2);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;

  --container-max: 1080px;
}

[data-theme="dark"] {
  --bg-base: #090e13;
  --bg-subtle: #0f161f;
  --bg-card: #131c26;
  --bg-card-glass: rgba(19, 28, 38, 0.88);
  --border-card: rgba(255, 255, 255, 0.08);
  --border-focus: #34d399;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-light: #64748b;

  --emerald-50: rgba(16, 185, 129, 0.12);
  --emerald-100: rgba(16, 185, 129, 0.2);
  --emerald-glow: rgba(16, 185, 129, 0.2);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 2px 8px -1px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 6px 20px -3px rgba(0, 0, 0, 0.6);
}

/* Base Resets */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 15px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: hidden;
  transition: background-color 0.2s ease, color 0.2s ease;
  -webkit-font-smoothing: antialiased;
}

.ambient-glow {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 400px;
  background: radial-gradient(circle at 50% -10%, rgba(16, 185, 129, 0.12), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-card-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-card);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.brand-crest {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--emerald-50);
  border: 1px solid var(--emerald-glow);
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-crest img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-text h1 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.15;
}

.brand-text p {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--emerald-600);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-menu a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  transition: color 0.15s ease;
}

.nav-menu a:hover {
  color: var(--emerald-600);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.15s ease;
}

.theme-toggle-btn:hover {
  color: var(--text-main);
  border-color: var(--emerald-500);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--emerald-gradient);
  color: #ffffff !important;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-card);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: var(--emerald-500);
}

.btn-sm {
  padding: 5px 12px;
  font-size: 0.78rem;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--text-main);
}

/* ==========================================================================
   Hero Section (Ultra-Compact)
   ========================================================================== */
.hero-section {
  padding: 24px 0 16px;
  text-align: center;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--emerald-50);
  color: var(--emerald-700);
  border: 1px solid var(--emerald-100);
  padding: 3px 12px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  margin-bottom: 8px;
}

[data-theme="dark"] .hero-chip {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.25);
}

.hero-chip-dot {
  width: 6px;
  height: 6px;
  background-color: var(--emerald-500);
  border-radius: 50%;
}

.hero-title {
  font-size: clamp(1.75rem, 3.4vw, 2.25rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: var(--text-main);
  max-width: 720px;
  margin: 0 auto 8px;
}

.hero-title .text-gradient {
  background: var(--emerald-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 0.92rem;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 14px;
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.hero-visual {
  width: min(100%, 780px);
  margin: 0 auto 18px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-md);
  background: var(--bg-card);
}

.hero-visual img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 440px;
  object-fit: cover;
}

/* Integrated Hero Stats Bar */
.hero-stats-bar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-full);
  padding: 6px 20px;
  box-shadow: var(--shadow-xs);
  flex-wrap: wrap;
}

.hero-stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
}

.hero-stat-item strong {
  font-family: var(--font-mono);
  color: var(--emerald-600);
  font-weight: 700;
}

.hero-stat-item span {
  color: var(--text-muted);
}

.hero-stat-sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--border-card);
}

/* ==========================================================================
   Section Headers (Compact)
   ========================================================================== */
.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 16px;
}

.section-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--emerald-600);
  margin-bottom: 2px;
}

.section-title {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--text-main);
  line-height: 1.2;
  margin-bottom: 3px;
}

.section-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* ==========================================================================
   Portfolios Section
   ========================================================================== */
.portfolios-section {
  padding: 16px 0 24px;
}

.portfolio-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.portfolio-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-xs);
  transition: all 0.2s ease;
}

.portfolio-card:hover {
  transform: translateY(-2px);
  border-color: var(--emerald-500);
  box-shadow: var(--shadow-sm);
}

.portfolio-card.featured {
  border-color: var(--emerald-500);
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--emerald-50) 100%);
}

[data-theme="dark"] .portfolio-card.featured {
  background: linear-gradient(180deg, var(--bg-card) 0%, rgba(16, 185, 129, 0.05) 100%);
}

.portfolio-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--emerald-100);
  color: var(--emerald-700);
  margin-bottom: 10px;
}

.portfolio-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.portfolio-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 14px;
}

.portfolio-features {
  list-style: none;
}

.portfolio-features li {
  font-size: 0.76rem;
  color: var(--text-main);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.portfolio-features li svg {
  color: var(--emerald-500);
  flex-shrink: 0;
}

/* ==========================================================================
   Platform Capabilities Section (Clean 3-Card Grid)
   ========================================================================== */
.capabilities-section {
  padding: 20px 0 24px;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-card);
  border-bottom: 1px solid var(--border-card);
}

.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.capability-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: all 0.15s ease;
}

.capability-card:hover {
  transform: translateY(-2px);
  border-color: var(--emerald-500);
  box-shadow: var(--shadow-xs);
}

.capability-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--emerald-50);
  color: var(--emerald-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  margin-bottom: 8px;
}

.capability-card h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 3px;
}

.capability-card p {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.38;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-card);
  padding: 14px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-brand-text {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
  list-style: none;
}

.footer-links a {
  text-decoration: none;
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--emerald-600);
}

.footer-copy {
  font-size: 0.72rem;
  color: var(--text-light);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 860px) {
  .portfolio-cards-grid {
    grid-template-columns: 1fr;
    max-width: 440px;
    margin: 0 auto;
  }
  .capabilities-grid {
    grid-template-columns: 1fr;
    max-width: 440px;
    margin: 0 auto;
  }
  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
}

@media (max-width: 640px) {
  .nav-menu {
    display: none;
  }
  .nav-menu.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-card);
    padding: 16px;
    box-shadow: var(--shadow-md);
  }
  .mobile-menu-toggle {
    display: block;
  }
  .hero-stats-bar {
    border-radius: var(--radius-md);
    padding: 10px 14px;
    gap: 10px;
  }
}
\n\n/* ==========================================================================
   TECLYQ AI ASSISTANT - WBM WELFARE & MUTUAL FUND PLATFORM
   SKOOLMS-CALIBER UI & EMERALD BRAND THEME
   ========================================================================== */

/* -------------------------------------------------------------
   1. 3D Interactive Floating Button
   ------------------------------------------------------------- */
.ai-faq-btn.teclyq-ai-trigger,
#ai-faq-widget-floating,
#teclyqAiTrigger {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  left: auto;
  height: 44px;
  min-width: 142px;
  padding: 0 0.95rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #065f46 0%, #059669 50%, #10b981 100%);
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 5px 18px -2px rgba(5, 150, 105, 0.55), 0 2px 5px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.85rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  cursor: pointer;
  z-index: 1000;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
  user-select: none;
  outline: none;
  overflow: visible !important;
  perspective: 700px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  will-change: transform;
}

.ai-faq-btn.teclyq-ai-trigger:hover,
#ai-faq-widget-floating:hover,
#teclyqAiTrigger:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -2px rgba(5, 150, 105, 0.7), 0 3px 6px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.65);
  filter: brightness(1.08);
}

.ai-faq-btn.teclyq-ai-trigger:active,
.ai-faq-btn.teclyq-ai-trigger[aria-expanded="true"],
#ai-faq-widget-floating:active,
#ai-faq-widget-floating[aria-expanded="true"],
#teclyqAiTrigger:active,
#teclyqAiTrigger[aria-expanded="true"] {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.4), inset 0 2px 4px rgba(0, 0, 0, 0.25) !important;
}

.ai-flipper {
  position: relative;
  width: 100%;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: wbmAiFlipCycle 6s infinite ease-in-out;
}

.ai-faq-btn:hover .ai-flipper,
#teclyqAiTrigger:hover .ai-flipper {
  transform: rotateX(180deg);
  animation-play-state: paused;
}

.ai-flip-front,
.ai-flip-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  height: 100%;
  white-space: nowrap;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  position: relative;
}

.ai-flip-front { transform: rotateX(0deg); }
.ai-flip-back { position: absolute; inset: 0; transform: rotateX(180deg); }

.ai-faq-btn .sparkle,
#teclyqAiTrigger .sparkle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  line-height: 1;
}

.ai-faq-btn .ai-btn-label,
#teclyqAiTrigger .ai-btn-label {
  display: inline-block !important;
  font-weight: 800;
  white-space: nowrap;
  font-size: 0.85rem;
  letter-spacing: -0.01em;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

@keyframes wbmAiFlipCycle {
  0%, 42% { transform: rotateX(0deg); }
  50%, 92% { transform: rotateX(180deg); }
  100% { transform: rotateX(360deg); }
}

/* Position back-to-top gracefully above AI trigger */
.back-to-top,
#backToTopButton,
#back-to-top-floating {
  bottom: 4.8rem !important;
  right: 1.25rem !important;
}

/* -------------------------------------------------------------
   2. Assistant Drawer Card
   ------------------------------------------------------------- */
.sc-assistant.teclyq-ai-panel,
#faq-drawer-container,
#teclyqAiPanel {
  position: fixed;
  bottom: 4.6rem;
  right: 1.25rem;
  left: auto;
  width: 330px;
  max-width: calc(100vw - 2.5rem);
  height: 500px;
  max-height: min(560px, calc(100vh - 6.5rem));
  background: #ffffff;
  color: #17211f;
  border: 1px solid rgba(22, 101, 52, 0.18);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16), 0 3px 10px rgba(0, 0, 0, 0.08);
  z-index: 1001;
  display: none;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

[data-theme="dark"] .sc-assistant.teclyq-ai-panel,
[data-theme="dark"] #faq-drawer-container,
[data-theme="dark"] #teclyqAiPanel {
  background: #17201e;
  color: #eef3f1;
  border-color: #273531;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), 0 3px 10px rgba(0, 0, 0, 0.25);
}

.sc-assistant.teclyq-ai-panel.open,
#faq-drawer-container.open,
#teclyqAiPanel.open {
  display: flex !important;
  animation: wbmAiRiseIn 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes wbmAiRiseIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* -------------------------------------------------------------
   3. Assistant Header
   ------------------------------------------------------------- */
.sc-assist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  background: linear-gradient(135deg, #064e3b 0%, #059669 100%);
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.sc-assist-header-left {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.sc-assist-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.sc-assist-title {
  font-size: 0.88rem;
  font-weight: 750;
  line-height: 1.2;
  color: #ffffff;
}

.sc-assist-subtitle {
  font-size: 0.7rem;
  opacity: 0.9;
  color: rgba(255, 255, 255, 0.9);
}

.sc-assist-close {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.16);
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
}

.sc-assist-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* -------------------------------------------------------------
   4. Assistant Body & Shortcuts Bar
   ------------------------------------------------------------- */
.sc-assist-body {
  flex: 1 1 0%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #f8fafc;
}

[data-theme="dark"] .sc-assist-body {
  background: #111a18;
}

.sc-assist-shortcuts-wrap {
  flex-shrink: 0;
  padding: 0.6rem 0.85rem 0.35rem;
  border-bottom: 1px solid #dcfce7;
  background: #f0fdf4;
}

[data-theme="dark"] .sc-assist-shortcuts-wrap {
  border-bottom-color: #1c2b27;
  background: #111a18;
}

.sc-assist-shortcuts-title {
  font-size: 0.72rem;
  font-weight: 750;
  color: #065f46;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

[data-theme="dark"] .sc-assist-shortcuts-title {
  color: #4ade80;
}

.sc-assist-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0 0 0.2rem 0;
}

.sc-assist-chip {
  padding: 0.3rem 0.6rem;
  border-radius: 9999px;
  border: 1px solid #bbf7d0;
  background: #ffffff;
  color: #166534;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

[data-theme="dark"] .sc-assist-chip {
  background: #17201e;
  color: #4ade80;
  border-color: #273531;
}

.sc-assist-chip:hover {
  border-color: #059669;
  color: #ffffff;
  background: #059669;
}

/* -------------------------------------------------------------
   5. Message Thread
   ------------------------------------------------------------- */
.sc-assist-thread {
  flex: 1 1 0%;
  overflow-y: auto;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 0;
  overscroll-behavior: contain;
}

.sc-assist-msg {
  max-width: 88%;
  padding: 0.6rem 0.8rem;
  border-radius: 14px;
  font-size: 0.82rem;
  line-height: 1.5;
  word-break: break-word;
}

.sc-assist-msg p {
  margin: 0.25rem 0;
}

.sc-assist-msg.from-bot {
  align-self: flex-start;
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  border-left: 3px solid #059669;
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .sc-assist-msg.from-bot {
  background: #17201e;
  color: #e2e8f0;
  border-color: #273531;
  border-left: 3px solid #10b981;
}

.sc-assist-msg.from-user {
  align-self: flex-end;
  background: linear-gradient(135deg, #065f46 0%, #059669 100%);
  color: #ffffff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.35);
}

.sc-assist-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.sc-assist-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #065f46;
  font-size: 0.73rem;
  font-weight: 650;
  text-decoration: none;
  transition: all 0.15s ease;
}

[data-theme="dark"] .sc-assist-link {
  background: #111a18;
  border-color: #1e2d28;
  color: #4ade80;
}

.sc-assist-link:hover {
  background: #059669;
  border-color: #059669;
  color: #ffffff;
}

/* -------------------------------------------------------------
   6. Typing Wave Indicator
   ------------------------------------------------------------- */
.sc-assist-typing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: #64748b;
  padding: 0.2rem 0;
}

[data-theme="dark"] .sc-assist-typing {
  color: #94a3b8;
}

.sc-assist-typing .typing-dots {
  display: inline-flex;
  gap: 4px;
}

.sc-assist-typing .typing-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #059669;
  animation: wbmTypingBounce 1.4s infinite ease-in-out both;
}

[data-theme="dark"] .sc-assist-typing .typing-dot {
  background: #10b981;
}

.sc-assist-typing .typing-dot:nth-child(1) { animation-delay: -0.32s; }
.sc-assist-typing .typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes wbmTypingBounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* -------------------------------------------------------------
   7. Assistant Input Form
   ------------------------------------------------------------- */
.sc-assist-form {
  display: flex;
  gap: 0.45rem;
  padding: 0.65rem 0.85rem;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .sc-assist-form {
  background: #17201e;
  border-top-color: #273531;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.2);
}

.sc-assist-input {
  flex: 1;
  min-width: 0;
  border: 1px solid #cbd5e1;
  border-radius: 9999px;
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  color: #0f172a;
  background: #f8fafc;
  outline: none;
  font-family: inherit;
  transition: all 0.15s ease;
}

[data-theme="dark"] .sc-assist-input {
  background: #111a18;
  color: #f1f5f9;
  border-color: #273531;
}

.sc-assist-input:focus {
  border-color: #059669;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.2);
}

[data-theme="dark"] .sc-assist-input:focus {
  background: #17201e;
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

.sc-assist-send {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #065f46 0%, #059669 100%);
  color: #ffffff;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.35);
}

.sc-assist-send:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(5, 150, 105, 0.5);
}

.sc-assist-send:active {
  transform: scale(0.96);
}


/* Mobile layout: position on bottom-left to avoid colliding with bottom-right mobile menu FAB and back-to-top */
@media (max-width: 860px) {
  .ai-faq-btn.teclyq-ai-trigger,
  #ai-faq-widget-floating,
  #teclyqAiTrigger {
    right: auto !important;
    left: max(16px, env(safe-area-inset-left, 0px)) !important;
    bottom: max(18px, env(safe-area-inset-bottom, 0px)) !important;
    z-index: 59 !important;
  }
  .sc-assistant.teclyq-ai-panel,
  #faq-drawer-container,
  #teclyqAiPanel {
    right: 0.75rem !important;
    left: 0.75rem !important;
    width: auto !important;
    max-width: calc(100vw - 1.5rem) !important;
    bottom: 4.8rem !important;
    z-index: 1001 !important;
  }
}


/* ==========================================================================
   TECLYQ FLOATING DOCK & CONNECTED BUTTONS POSITIONING FIX
   Guarantees that Diagnostics button and AI button sit side-by-side
   and NEVER overlap or hide beneath each other.
   ========================================================================== */

.teclyq-floating-dock,
#teclyqFloatingDock {
  position: fixed !important;
  bottom: 1.25rem !important;
  right: 1.25rem !important;
  left: auto !important;
  top: auto !important;
  z-index: 1050 !important;
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 0.65rem !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none !important;
}

.teclyq-floating-dock > * {
  pointer-events: auto !important;
}

/* Force both buttons inside the dock to be relative flex items with NO position:fixed */
.teclyq-floating-dock #teclyqAiTrigger,
.teclyq-floating-dock .ai-faq-btn.teclyq-ai-trigger,
#teclyqFloatingDock #teclyqAiTrigger,
#teclyqFloatingDock .ai-faq-btn.teclyq-ai-trigger {
  position: relative !important;
  bottom: auto !important;
  right: auto !important;
  left: auto !important;
  top: auto !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
  z-index: 10 !important;
  order: 2 !important; /* On desktop, AI button is on far right corner */
}

.teclyq-floating-dock #teclyqDiagTrigger,
.teclyq-floating-dock .teclyq-diag-pill,
#teclyqFloatingDock #teclyqDiagTrigger,
#teclyqFloatingDock .teclyq-diag-pill {
  position: relative !important;
  bottom: auto !important;
  right: auto !important;
  left: auto !important;
  top: auto !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
  z-index: 11 !important;
  order: 1 !important; /* Diagnostics sits connected immediately to the left of AI */
}

/* Mobile responsive layout */
@media (max-width: 860px) {
  .teclyq-floating-dock,
  #teclyqFloatingDock {
    left: max(16px, env(safe-area-inset-left, 0px)) !important;
    right: auto !important;
    bottom: max(16px, env(safe-area-inset-bottom, 0px)) !important;
    top: auto !important;
    justify-content: flex-start !important;
    gap: 0.45rem !important;
    z-index: 1050 !important;
  }

  .teclyq-floating-dock #teclyqAiTrigger,
  .teclyq-floating-dock .ai-faq-btn.teclyq-ai-trigger,
  #teclyqFloatingDock #teclyqAiTrigger {
    order: 1 !important; /* On mobile bottom-left, AI is first on the left */
    position: relative !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    top: auto !important;
    margin: 0 !important;
  }

  .teclyq-floating-dock #teclyqDiagTrigger,
  .teclyq-floating-dock .teclyq-diag-pill,
  #teclyqFloatingDock #teclyqDiagTrigger {
    order: 2 !important; /* Diagnostics sits next to it on the right */
    position: relative !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    top: auto !important;
    margin: 0 !important;
    padding: 0 0.65rem !important;
    min-width: unset !important;
  }

  .teclyq-diag-pill .dbg-pill-text {
    display: none !important;
  }
}


/* ==========================================================================
   COMPACT SHORTCUTS & FULLY VISIBLE GREETING FIX
   Reduces vertical space consumed by shortcuts so the welcome greeting is 100% visible
   ========================================================================== */

.sc-assist-shortcuts-wrap,
#sc-assist-shortcuts-wrap {
  flex-shrink: 0 !important;
  padding: 0.35rem 0.65rem 0.35rem !important;
  border-bottom: 1px solid #dcfce7 !important;
  background: #f0fdf4 !important;
  margin: 0 !important;
}

[data-theme="dark"] .sc-assist-shortcuts-wrap,
[data-theme="dark"] #sc-assist-shortcuts-wrap {
  border-bottom-color: #1c2b27 !important;
  background: #111a18 !important;
}

.sc-assist-shortcuts-title,
#sc-assist-shortcuts-wrap .sc-assist-shortcuts-title {
  display: none !important;
}

.sc-assist-chips,
#sc-assist-chips {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  gap: 0.35rem !important;
  padding: 0 0 0.15rem 0 !important;
  scrollbar-width: none !important;
  -webkit-overflow-scrolling: touch !important;
}

.sc-assist-chips::-webkit-scrollbar,
#sc-assist-chips::-webkit-scrollbar {
  display: none !important;
}

.sc-assist-chip,
#sc-assist-chips .sc-assist-chip {
  padding: 0.24rem 0.6rem !important;
  border-radius: 9999px !important;
  border: 1px solid #bbf7d0 !important;
  background: #ffffff !important;
  color: #166534 !important;
  font-size: 0.72rem !important;
  font-weight: 650 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  line-height: 1.3 !important;
  transition: all 0.15s ease !important;
}

[data-theme="dark"] .sc-assist-chip,
[data-theme="dark"] #sc-assist-chips .sc-assist-chip {
  background: #17201e !important;
  color: #4ade80 !important;
  border-color: #273531 !important;
}

.sc-assist-chip:hover,
#sc-assist-chips .sc-assist-chip:hover {
  border-color: #059669 !important;
  color: #ffffff !important;
  background: #059669 !important;
}

.sc-assistant.teclyq-ai-panel,
#faq-drawer-container,
#teclyqAiPanel {
  width: 350px !important;
  max-width: calc(100vw - 2.5rem) !important;
  height: 520px !important;
  max-height: min(580px, calc(100vh - 6.5rem)) !important;
}

.sc-assist-thread,
#teclyqAiMessages {
  flex: 1 1 0% !important;
  overflow-y: auto !important;
  padding: 0.85rem !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.6rem !important;
  min-height: 0 !important;
  overscroll-behavior: contain !important;
}

.sc-assist-msg,
#teclyqAiMessages .sc-assist-msg {
  max-width: 90% !important;
  padding: 0.65rem 0.85rem !important;
  border-radius: 14px !important;
  font-size: 0.82rem !important;
  line-height: 1.5 !important;
  word-break: break-word !important;
}
