/* ==========================================================================
   MASAR AI — Precision Tech SaaS Design System (Reference: OpenAI / Linear Style)
   ========================================================================== */

:root {
  /* Core Dark Theme Palette (From Reference Image 1) */
  --bg-app: #0c0f0e;
  --bg-surface: #121715;
  --bg-card: #141a17;
  --bg-card-hover: #18211d;
  --bg-input: #0e1311;

  /* Accent Colors */
  --lime-accent: #bcf068;
  --lime-accent-hover: #a8e84a;
  --lime-glow: rgba(188, 240, 104, 0.25);
  --lime-text-dark: #0a110a;

  --forest-green: #174233;
  --forest-deep: #0f2c22;
  --forest-surface: #16261f;

  /* Borders & Dividers */
  --border-subtle: #1c2521;
  --border-card: #222d28;
  --border-active: #bcf068;

  /* Typography Colors */
  --text-white: #ffffff;
  --text-primary: #e6ede9;
  --text-secondary: #9ea8a3;
  --text-muted: #647069;
  --text-mono: #8c9992;

  /* Chat Bubbles */
  --bubble-user-bg: #173b2e;
  --bubble-user-text: #ffffff;
  --bubble-assistant-bg: #141a17;
  --bubble-assistant-text: #e6ede9;

  /* Shadows & Radius */
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.45);
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  /* Fonts */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-ar: 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

html[dir="rtl"] body {
  font-family: var(--font-ar);
}

/* ==========================================================================
   Site Navigation Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 15, 14, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-group {
  display: flex;
  align-items: center;
}

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

.brand-icon-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: var(--radius-xs);
}

.brand-text {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-white);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--text-white);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ctrl-btn-text {
  background: transparent;
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.ctrl-btn-text:hover {
  border-color: var(--lime-accent);
  color: var(--lime-accent);
}

.btn-lime-nav {
  background: var(--lime-accent);
  color: var(--lime-text-dark);
  font-size: 0.9rem;
  font-weight: 800;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-lime-nav:hover {
  background: var(--lime-accent-hover);
  transform: translateY(-1px);
}

.arrow-diag {
  font-size: 0.95rem;
  font-weight: 900;
  display: inline-block;
  transition: transform 0.2s ease;
}

.btn-lime-nav:hover .arrow-diag,
.btn-lime-primary:hover .arrow-diag,
.btn-ghost-secondary:hover .arrow-diag,
.pillar-card:hover .arrow-diag {
  transform: translate(2px, -2px);
}

html[dir="rtl"] .arrow-diag {
  transform: scaleX(-1);
}
html[dir="rtl"] .btn-lime-nav:hover .arrow-diag,
html[dir="rtl"] .btn-lime-primary:hover .arrow-diag,
html[dir="rtl"] .btn-ghost-secondary:hover .arrow-diag,
html[dir="rtl"] .pillar-card:hover .arrow-diag {
  transform: scaleX(-1) translate(2px, -2px);
}

/* ==========================================================================
   Platform Layout
   ========================================================================== */
.platform-layout {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ==========================================================================
   Hero Split Section (Exact 2 Columns from Image 1)
   ========================================================================== */
.hero-split-section {
  padding: 70px 0 50px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.hero-left-col {
  display: flex;
  flex-direction: column;
}

.pre-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 24px;
}

.pre-tag .diag-arrow {
  color: var(--lime-accent);
}

.hero-headline {
  font-size: clamp(2.8rem, 5.2vw, 4.4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text-white);
  margin-bottom: 24px;
}

.accent-lime-text {
  color: var(--lime-accent);
}

.hero-subtext {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.75;
  max-width: 540px;
  margin-bottom: 34px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.btn-lime-primary {
  background: var(--lime-accent);
  color: var(--lime-text-dark);
  font-weight: 800;
  font-size: 0.98rem;
  padding: 14px 26px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-lime-primary:hover {
  background: var(--lime-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--lime-glow);
}

.btn-ghost-secondary {
  background: transparent;
  color: var(--text-white);
  border: 1px solid var(--border-card);
  font-weight: 700;
  font-size: 0.98rem;
  padding: 14px 26px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-ghost-secondary:hover {
  border-color: var(--text-white);
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-2px);
}

.hero-footnote-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.bullet-dot {
  color: var(--lime-accent);
  font-size: 1rem;
}

/* Right Column Artwork Card */
.hero-right-col {
  display: flex;
  justify-content: center;
}

.artwork-card {
  width: 100%;
  max-width: 440px;
  background: linear-gradient(145deg, rgba(20, 26, 23, 0.9) 0%, rgba(13, 17, 15, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.7), 0 0 30px rgba(188, 240, 104, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  transform: perspective(1000px) rotateY(-3deg) rotateX(2deg);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.artwork-card:hover {
  transform: perspective(1000px) rotateY(0deg) rotateX(0deg) translateY(-4px);
  border-color: rgba(188, 240, 104, 0.4);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 40px rgba(188, 240, 104, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.artwork-img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: #090e0c;
}

.artwork-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding: 4px 4px 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--lime-accent);
}

.caption-right {
  color: var(--text-muted);
}

/* ==========================================================================
   Hero Ticker Bar
   ========================================================================== */
.hero-ticker-bar {
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 18px 0;
  margin: 20px 0 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.ticker-col {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ticker-muted {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.ticker-sparkle {
  color: var(--lime-accent);
  font-size: 0.95rem;
}

.ticker-item {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ==========================================================================
   Role Selector Bar
   ========================================================================== */
.role-selector-section {
  margin-bottom: 60px;
}

.role-selector-bar {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.selector-heading {
  display: flex;
  flex-direction: column;
}

.selector-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--lime-accent);
}

.selector-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-white);
}

.selector-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.role-dropdown {
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  color: var(--text-white);
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.role-dropdown:focus {
  border-color: var(--lime-accent);
}

.btn-lime-small {
  background: var(--lime-accent);
  color: var(--lime-text-dark);
  border: none;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-lime-small:hover {
  background: var(--lime-accent-hover);
  transform: translateY(-1px);
}

/* ==========================================================================
   3D Metric / Trust Ribbon (Digital Silk Agency Style)
   ========================================================================== */
.metrics-ribbon-section {
  margin: 20px 0 50px;
}

.metrics-ribbon-card {
  background: linear-gradient(135deg, rgba(20, 26, 23, 0.85) 0%, rgba(13, 17, 15, 0.95) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 36px -12px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  transition: all 0.3s ease;
}

.metrics-ribbon-card:hover {
  border-color: rgba(188, 240, 104, 0.35);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.7), 0 0 24px rgba(188, 240, 104, 0.1);
}

.metric-item {
  flex: 1;
  text-align: center;
  padding: 16px 14px;
}

.metric-val {
  display: block;
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--lime-accent);
  margin-bottom: 4px;
}

.metric-desc {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 1.4;
}

.metric-sep {
  width: 1px;
  height: 44px;
  background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 860px) {
  .metrics-ribbon-card {
    flex-wrap: wrap;
    padding: 14px;
  }
  .metric-item {
    flex: 1 1 45%;
    padding: 12px 8px;
  }
  .metric-sep {
    display: none;
  }
}

/* ==========================================================================
   Editorial 3D Mosaic Grid (Agency Style)
   ========================================================================== */
.pillars-section {
  padding-bottom: 80px;
}

.section-title-wrap {
  margin-bottom: 36px;
}

.section-heading {
  font-size: clamp(2rem, 3.2vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-white);
  margin-bottom: 10px;
}

.section-subheading {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 640px;
}

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

.mosaic-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  min-height: 330px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--bg-card);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.mosaic-card.span-2 {
  grid-column: span 2;
}

.mosaic-card:hover {
  transform: translateY(-8px);
  border-color: rgba(188, 240, 104, 0.5);
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.7), 0 0 30px rgba(188, 240, 104, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.card-bg-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

.mosaic-card:hover .card-bg-img {
  transform: scale(1.06);
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 15, 14, 0.15) 0%, rgba(12, 15, 14, 0.7) 45%, rgba(12, 15, 14, 0.96) 100%);
  z-index: 2;
  transition: background 0.3s ease;
}

.mosaic-card:hover .card-overlay {
  background: linear-gradient(180deg, rgba(12, 15, 14, 0.1) 0%, rgba(12, 15, 14, 0.65) 45%, rgba(12, 15, 14, 0.94) 100%);
}

.mosaic-content {
  position: relative;
  z-index: 3;
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.mosaic-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.mosaic-badge {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--lime-accent);
  letter-spacing: 0.08em;
  background: rgba(12, 15, 14, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(188, 240, 104, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tag-pill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.08);
  padding: 5px 10px;
  border-radius: var(--radius-xs);
}

.tag-pill.accent {
  color: var(--lime-accent);
  background: rgba(188, 240, 104, 0.12);
  border: 1px solid rgba(188, 240, 104, 0.2);
}

.mosaic-body {
  margin: 18px 0 14px;
}

.mosaic-body h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 8px;
  line-height: 1.3;
  transition: color 0.2s ease;
}

.mosaic-card:hover .mosaic-body h3 {
  color: var(--lime-accent);
}

.mosaic-body p {
  font-size: 0.92rem;
  color: #c2cec7;
  line-height: 1.6;
}

.mosaic-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.tag-list {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mini-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.35);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.mosaic-action-btn {
  background: var(--lime-accent);
  color: var(--lime-text-dark);
  border: none;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.mosaic-card:hover .mosaic-action-btn {
  background: var(--lime-accent-hover);
  transform: translateY(-1px);
}

/* Glass 3D variation for Cards 5 & 6 */
.mosaic-card.glass-3d {
  background: linear-gradient(135deg, rgba(22, 30, 26, 0.9) 0%, rgba(14, 19, 17, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 992px) {
  .mosaic-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .mosaic-card.span-2 {
    grid-column: span 2;
  }
}

@media (max-width: 680px) {
  .mosaic-grid {
    grid-template-columns: 1fr;
  }
  .mosaic-card.span-2 {
    grid-column: span 1;
  }
}

/* ==========================================================================
   Coach Workspace Section (AI Assistant)
   ========================================================================== */
.coach-section {
  padding-bottom: 90px;
}

.coach-container {
  background: linear-gradient(180deg, rgba(20, 26, 23, 0.92) 0%, rgba(14, 18, 16, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px -15px rgba(0, 0, 0, 0.75), 0 0 35px rgba(188, 240, 104, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  height: 740px;
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.coach-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 26px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}

.coach-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.coach-bar-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  object-fit: contain;
  background: #090f0c;
  border: 1px solid var(--border-card);
}

.coach-name-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.coach-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: -0.01em;
}

.status-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--lime-accent);
}

.coach-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.btn-clear {
  background: transparent;
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-clear:hover {
  border-color: #ef4444;
  color: #ef4444;
}

/* Chat Log */
.chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  scroll-behavior: smooth;
}

.chat-log::-webkit-scrollbar {
  width: 6px;
}
.chat-log::-webkit-scrollbar-thumb {
  background: var(--border-card);
  border-radius: 999px;
}

/* Messages */
.message {
  display: flex;
  gap: 14px;
  max-width: 86%;
  animation: fadeInMsg 0.25s ease forwards;
}

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

.message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message.assistant {
  align-self: flex-start;
}

.msg-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  flex-shrink: 0;
  font-size: 16px;
}

.avatar-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.bubble {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  line-height: 1.7;
  word-break: break-word;
}

.message.user .bubble {
  background: var(--bubble-user-bg);
  color: var(--bubble-user-text);
  border: 1px solid rgba(188, 240, 104, 0.2);
  border-bottom-right-radius: 2px;
}
html[dir="ltr"] .message.user .bubble {
  border-bottom-right-radius: var(--radius-md);
  border-bottom-left-radius: 2px;
}

.message.assistant .bubble {
  background: var(--bubble-assistant-bg);
  color: var(--bubble-assistant-text);
  border: 1px solid var(--border-card);
  border-bottom-left-radius: 2px;
}
html[dir="ltr"] .message.assistant .bubble {
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: 2px;
}

/* Welcome Card in Chat */
.welcome-card {
  max-width: 100%;
}

.welcome-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--lime-accent);
  margin-bottom: 8px;
}

.welcome-heading {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 8px;
}

.welcome-body {
  color: var(--text-secondary);
  font-size: 0.94rem;
  margin-bottom: 12px;
}

.welcome-prompt-line {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--lime-accent);
}

/* Assistant Markdown */
.message.assistant .bubble p {
  margin-bottom: 0.75rem;
}
.message.assistant .bubble p:last-child {
  margin-bottom: 0;
}
.message.assistant .bubble ul,
.message.assistant .bubble ol {
  margin: 0.5rem 0 0.75rem 1.4rem;
  padding-right: 0.4rem;
}
.message.assistant .bubble li {
  margin-bottom: 0.35rem;
}
.message.assistant .bubble strong {
  color: var(--text-white);
  font-weight: 700;
}
.message.assistant .bubble h3,
.message.assistant .bubble h4 {
  margin: 1rem 0 0.4rem;
  font-weight: 800;
  color: var(--lime-accent);
}

/* Citations & Copy */
.bubble-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-card);
}

.sources-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.sources-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--lime-accent);
}

.source-badge {
  font-size: 0.76rem;
  padding: 3px 9px;
  background: rgba(188, 240, 104, 0.08);
  border: 1px solid rgba(188, 240, 104, 0.25);
  border-radius: var(--radius-xs);
  color: var(--lime-accent);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.copy-btn {
  background: transparent;
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  border-color: var(--lime-accent);
  color: var(--lime-accent);
}

/* Suggestion Chips */
.chips-container {
  padding: 10px 24px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.chips-container::-webkit-scrollbar {
  display: none;
}

.chips-label {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--lime-accent);
  white-space: nowrap;
}

.suggested-questions {
  display: flex;
  gap: 8px;
}

.suggestion-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  padding: 7px 15px;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.suggestion-chip:hover {
  border-color: var(--lime-accent);
  color: var(--lime-accent);
  transform: translateY(-1px);
}

/* Input Card */
.input-card {
  padding: 16px 24px 14px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
}

.chat-form {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  transition: border-color 0.2s ease;
}

.chat-form:focus-within {
  border-color: var(--lime-accent);
}

.chat-textarea {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-white);
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  resize: none;
  max-height: 120px;
  padding: 4px 0;
}

.chat-textarea::placeholder {
  color: var(--text-muted);
}

.btn-send {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-xs);
  background: var(--lime-accent);
  border: none;
  color: var(--lime-text-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 900;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.btn-send:hover:not(:disabled) {
  background: var(--lime-accent-hover);
  transform: scale(1.05);
}

.btn-send:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

.input-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.meta-dot {
  color: var(--lime-accent);
  font-size: 0.6rem;
}

/* Typing Dots */
.typing-dots {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
}
.typing-dots span {
  width: 6px;
  height: 6px;
  background: var(--lime-accent);
  border-radius: 50%;
  animation: bounceDot 1.4s infinite ease-in-out both;
}
.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

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

.error-banner {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  padding: 8px 16px;
  font-size: 0.85rem;
}
.hidden { display: none; }

/* ==========================================================================
   Site Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 30px 28px;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

.footer-brand {
  font-weight: 800;
  color: var(--text-white);
}

.footer-sep {
  color: var(--lime-accent);
}

/* Responsive Adaptations */
@media (max-width: 960px) {
  .hero-split-section {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .hero-right-col {
    order: -1;
  }
  .nav-menu {
    display: none;
  }
}

@media (max-width: 640px) {
  .nav-container { padding: 12px 16px; }
  .platform-layout { padding: 0 16px; }
  .hero-split-section { padding: 40px 0 30px; }
  .hero-headline { font-size: 2.3rem; }
  .hero-cta-group { flex-direction: column; width: 100%; }
  .btn-lime-primary, .btn-ghost-secondary { width: 100%; justify-content: center; }
  .role-selector-bar { flex-direction: column; align-items: stretch; }
  .selector-controls { flex-direction: column; width: 100%; }
  .role-dropdown, .btn-lime-small { width: 100%; justify-content: center; }
  .coach-container { height: 600px; }
  .btn-lime-nav { display: none; }
}
