﻿/* ============================================
   INDEX PAGE STYLES
   Extracted from index.html
   ============================================ */

/* Inter font is now loaded via <link> in HTML */
    
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ============================================
   CSS VARIABLES - Single source of truth
   ============================================ */
:root {
  /* Text colors */
  --text-primary: #222;
  --text-secondary: #444;
  --text-muted: #555;
  --text-light: #666;
  --text-faint: #888;
  --text-subtle: #999;
  
  /* Brand colors */
  --teal: #156082;
  --teal-light: #4a9bb8;
  --accent-blue: #007AFF;
  --accent-blue-hover: #0056D6;
  --accent-green: #007AFF;
  --accent-green-hover: #0056D6;
  
  /* Backgrounds */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f8f8;
  --bg-tertiary: #f0f0f0;
  --bg-card: rgba(255,255,255,0.95);
  --bg-dark-card: #2a2a2a;
  
  /* Borders */
  --border-light: rgba(0,0,0,0.06);
  --border-medium: rgba(0,0,0,0.08);
  
  /* Node/Brain colors */
  --node-idle: linear-gradient(135deg, #666 0%, #444 100%);
  --node-active: linear-gradient(135deg, #1a7a9e 0%, #156082 100%);
  --node-glow: rgba(21, 96, 130, 0.3);
  --node-pulse: rgba(21, 96, 130, 0.5);
  
  /* RIBA Stage colors */
  --stage-0: #F5A623;
  --stage-1: #E91E8C;
  --stage-2: #4FC3F7;
  --stage-3: #FFEB3B;
  --stage-4: #26A69A;
  --stage-5: #9C27B0;
  --stage-6: #FDD835;
  --stage-7: #8BC34A;
}

html.dark-mode {
  /* Text colors - dark mode */
  --text-primary: #e0e0e0;
  --text-secondary: #ccc;
  --text-muted: #aaa;
  --text-light: #999;
  --text-faint: #888;
  --text-subtle: #666;
  
  /* Brand colors - dark mode */
  --teal: #4a9bb8;
  
  /* Backgrounds - dark mode */
  --bg-primary: #1a1a1a;
  --bg-secondary: #252525;
  --bg-tertiary: #2a2a2a;
  --bg-card: #2a2a2a;
  
  /* Borders - dark mode */
  --border-light: rgba(255,255,255,0.06);
  --border-medium: rgba(255,255,255,0.08);
  
  /* Node/Brain colors - dark mode */
  --node-idle: linear-gradient(135deg, #555 0%, #333 100%);
  --node-active: linear-gradient(135deg, #4ECDC4 0%, #3db8b0 100%);
  --node-glow: rgba(74, 155, 184, 0.35);
  --node-pulse: rgba(74, 155, 184, 0.5);
}

/* ============================================
   UTILITY CLASSES - Reusable patterns
   ============================================ */

/* Center absolute - replaces 15 duplicate blocks */
.center-absolute {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Hidden state - replaces 9+ duplicate visibility patterns */
.hidden-state {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.hidden-state.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

html, body {
  width: 100%;
  height: 100%;
  font-family: 'Inter', sans-serif;
  background: #ffffff;
  cursor: default;
  overflow: hidden;
}

/* Premium UX: 90% zoom - now in shared-styles.css for all pages */

/* Logo - styles inherited from shared-styles.css */

/* Section Indicator - dots on left side */
.section-indicator {
  position: fixed;
  left: 40px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 1;
}

.section-indicator.hidden {
  opacity: 0 !important;
  pointer-events: none;
}

.section-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(21, 96, 130, 0.35);
  transition: background 0.3s ease, transform 0.3s ease;
  cursor: pointer;
  position: relative;
}

.section-dot:hover {
  background: rgba(21, 96, 130, 0.6);
  transform: scale(1.2);
}

.section-dot.active {
  background: transparent;
  transform: scale(1);
}

/* Active indicator ball that animates between dots */
.section-active-ball {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #156082;
  transform: scale(1.2);
  pointer-events: none;
  left: 0;
  top: 0;
  transition: top 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

/* Trail effect - fading balls behind the active one */
.section-trail-ball {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #156082;
  pointer-events: none;
  left: 0;
  opacity: 0;
  transform: scale(1);
  z-index: 0;
}

.section-trail-ball.animating {
  animation: trailFade 0.2s ease-out forwards;
}

@keyframes trailFade {
  0% { opacity: 0.4; transform: scale(1.1); }
  100% { opacity: 0; transform: scale(0.7); }
}

/* Section dots use brand blue in both light and dark modes */
html.dark-mode .section-dot {
  background: rgba(21, 96, 130, 0.35);
}

html.dark-mode .section-dot:hover {
  background: rgba(21, 96, 130, 0.6);
}

html.dark-mode .section-dot.active {
  background: transparent;
}

html.dark-mode .section-active-ball,
html.dark-mode .section-trail-ball {
  background: #156082;
}

/* Moveable hero text */
.hero-text-container {
  position: fixed;
  z-index: 1002;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease, 
              top 1s cubic-bezier(0.65, 0, 0.35, 1), 
              left 1s cubic-bezier(0.65, 0, 0.35, 1),
              transform 1s cubic-bezier(0.65, 0, 0.35, 1);
}

.hero-text-container.visible {
  opacity: 1;
  pointer-events: none; /* Let brain events through */
}

.hero-text-container .hero-text-inner {
  pointer-events: auto; /* Only text is interactive */
}

.hero-text-container.fade-out {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.5s ease-out;
}

.hero-text-container.fade-out .hero-text-inner {
  pointer-events: none !important;
}

.hero-text-container.right-position {
  top: 50%;
  left: 55%;
  right: 0;
  width: 45%;
  max-width: none;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 40px;
  box-sizing: border-box;
}

.hero-text-container.right-position .hero-text-inner {
  max-width: 600px;
  width: 100%;
  text-align: left;
}

.hero-text-container.left-position {
  top: 72px;
  left: 40px;
  width: auto;
  transform: translateY(0) scale(0.9);
  transform-origin: top left;
}

.hero-text-container .hero-heading {
  font-family: 'Inter Display', 'Inter', sans-serif;
  font-size: 44px;
  font-weight: 500;
  line-height: 1.3;
  color: #222;
  margin: 0 0 12px 0;
  padding-left: 0;
}

.hero-text-container .hero-subheading {
  font-family: 'Inter Display', 'Inter', sans-serif;
  font-size: 22px;
  font-weight: 300;
  letter-spacing: 0.5px;
  line-height: 1.5;
  color: #000;
  margin: 0;
  padding-left: 0;
}

html.dark-mode .hero-text-container .hero-heading {
  color: var(--text-primary);
}

html.dark-mode .hero-text-container .hero-subheading {
  color: var(--text-primary);
}

/* Dark Mode Toggle */
.dark-toggle {
  position: fixed;
  top: 75px;
  right: 40px;
  z-index: 1005;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 1;
  pointer-events: auto;
}

.dark-toggle-label {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: #999;
  text-transform: uppercase;
}

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  background: #ddd;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 0.3s ease;
}

/* Toggle state is driven by html.dark-mode, not .active class */
/* This ensures no flash - CSS applies immediately with inline head script */
html.dark-mode .toggle-switch {
  background: #156082;
}

html.dark-mode .toggle-switch::after {
  transform: translateX(20px);
}

/* Color Palette Button & Dropdown */
.color-palette-btn {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.color-palette-btn .palette-icon {
  font-size: 14px;
  color: #999;
  transition: color 0.2s ease;
}

/* Larger icon for main palette button (next to dark mode toggle) */
.color-palette-btn.main-palette .palette-icon {
  font-size: 18px;
}

.color-palette-btn.main-palette {
  margin-right: 6px;
}

.color-palette-btn:hover .palette-icon {
  color: #666;
}

html.dark-mode .color-palette-btn .palette-icon {
  color: #666;
}

html.dark-mode .color-palette-btn:hover .palette-icon {
  color: #999;
}

.color-palette-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  padding: 12px;
  min-width: 160px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  z-index: 2000;
}

.color-palette-btn:hover .color-palette-dropdown,
.color-palette-dropdown:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

html.dark-mode .color-palette-dropdown {
  background: #2a2a2a;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

/* Word-style color palette dropdown */
.color-palette-dropdown.word-style {
  min-width: 220px;
  padding: 10px;
}

.palette-section {
  margin-bottom: 10px;
}

.palette-section:last-of-type {
  margin-bottom: 8px;
}

.palette-header {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #666;
  margin-bottom: 6px;
  padding: 0;
  border: none;
}

html.dark-mode .palette-header {
  color: #888;
}

.palette-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 2px;
}

.palette-grid.standard-colors {
  grid-template-columns: repeat(10, 1fr);
}

.color-swatch {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 2px;
  cursor: pointer;
  padding: 0;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.color-swatch:hover {
  transform: scale(1.15);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  z-index: 10;
  position: relative;
}

.color-swatch.active {
  outline: 2px solid #156082;
  outline-offset: 1px;
}

html.dark-mode .color-swatch {
  border-color: rgba(255,255,255,0.15);
}

html.dark-mode .color-swatch.active {
  outline-color: #1a9cc2;
}

/* Apply background color from data attribute */
.color-swatch[data-color] {
  background-color: attr(data-color);
}

/* More Colors button */
.more-colors-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 6px;
  border: none;
  background: transparent;
  border-top: 1px solid rgba(0,0,0,0.08);
  margin-top: 4px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: #555;
  transition: background 0.15s ease;
  border-radius: 0 0 6px 6px;
}

.more-colors-btn:hover {
  background: rgba(0,0,0,0.05);
}

html.dark-mode .more-colors-btn {
  border-top-color: rgba(255,255,255,0.08);
  color: #aaa;
}

html.dark-mode .more-colors-btn:hover {
  background: rgba(255,255,255,0.08);
}

.more-colors-icon {
  font-size: 14px;
}

/* Hidden color input for custom picker */
.hidden-color-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Chat Settings Wrapper for dropdown positioning */
.chat-settings-wrapper {
  position: relative;
  display: inline-flex;
}

.chat-settings-wrapper .color-palette-dropdown.chat-palette {
  top: calc(100% + 4px);
  right: 0;
}

.chat-settings-wrapper:hover .color-palette-dropdown.chat-palette,
.chat-settings-wrapper .color-palette-dropdown.chat-palette:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Dark Mode Styles */
html.dark-mode body {
  background: #1a1a1a;
}

html.dark-mode canvas {
  background: radial-gradient(ellipse at center, #2a2a2a 0%, #1a1a1a 70%);
}

/* dark-mode .logo - inherited from shared-styles.css */

html.dark-mode .right-panel {
  background: transparent;
  pointer-events: none; /* Transparent = let events through */
}

html.dark-mode .right-panel .panel-content {
  pointer-events: auto; /* Only content receives events */
}

html.dark-mode .dark-toggle-label {
  color: #666;
}


html.dark-mode .service-item-title {
  color: var(--text-primary);
}

html.dark-mode .service-item-body {
  color: #888;
}

html.dark-mode .scroll-indicator-text {
  color: #666;
}

html.dark-mode .scroll-indicator-arrow svg {
  stroke: #666;
}


/* Download buttons */
.download-buttons {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 100;
  display: flex;
  gap: 8px;
}

canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: #ffffff;
  pointer-events: auto;
  z-index: 0;
}

/* Right Panel Styles (40% width) */
.right-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 45%;
  height: 100%;
  background: #ffffff;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.8s ease, visibility 0s linear 0.8s;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  font-family: 'Inter', sans-serif;
  overflow: hidden;
}

.right-panel.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: none; /* Let brain events through - only content is interactive */
  transition: opacity 0.8s ease, visibility 0s linear 0s;
}

.right-panel.visible .panel-content {
  pointer-events: auto; /* Only actual content is interactive */
}

.panel-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 100px 2.5rem 2.5rem;
  overflow: auto;
  color: #111;
  position: relative;
}

/* Build label at bottom right of panels */
.build-label-bottom-right {
  position: absolute;
  bottom: 40px;
  right: 40px;
  font-family: 'Gotham Medium', 'Montserrat', Helvetica, Arial, sans-serif;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 2pt;
  color: #222;
}

.build-label-bottom-right .teal {
  color: var(--teal);
}

html.dark-mode .build-label-bottom-right {
  color: var(--text-primary);
}

/* RIBA Stages Panel - LEFT SIDE (55% brain area) */
.riba-left-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 55%;
  height: 100%;
  z-index: 600;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.5s ease, visibility 0s linear 0.5s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 40px 20px 120px;
  box-sizing: border-box;
  overflow-y: auto;
}

.riba-left-panel.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: none;
  transition: opacity 0.5s ease, visibility 0s linear 0s;
}

.riba-grid-left {
  pointer-events: none; /* Let brain events through gaps/empty cells */
}

.riba-card-left,
.riba-backdrop {
  pointer-events: auto; /* Only actual cards receive events */
}

.riba-left-panel::-webkit-scrollbar {
  width: 6px;
}

.riba-left-panel::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.05);
  border-radius: 3px;
}

.riba-left-panel::-webkit-scrollbar-thumb {
  background: rgba(0,160,160,0.3);
  border-radius: 3px;
}

.riba-left-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(0,160,160,0.5);
}

.riba-grid-left {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  flex-shrink: 0;
  width: 100%;
  max-width: 800px;
}

.riba-card-left {
  background: rgba(255,255,255,0.95);
  border-radius: 10px;
  padding: 12px 16px;
  cursor: pointer;
  border: 1px solid rgba(0,0,0,0.06);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: background 0.1s ease, border-color 0.1s ease, box-shadow 0.1s ease;
  transform: scale(0.88);
  transform-origin: center center;
  display: flex;
  flex-direction: column;
}

.riba-card-left:hover:not(.expanded) {
  background: rgba(255,255,255,1);
  border-color: rgba(0, 160, 160, 0.3);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

/* Expanded card - OLD STYLE (keeping for reference but clone approach is used) */
.riba-card-left.expanded {
  position: fixed !important;
  top: 50% !important;
  left: calc(27.5% + 40px) !important;
  transform: translate(-50%, -50%) !important;
  width: 650px !important;
  max-height: 80vh !important;
  overflow: hidden; /* Changed from overflow-y: auto !important - clone handles scrollbar timing */
  background: #fff;
  border-color: rgba(0, 160, 160, 0.4);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  z-index: 700;
  border-radius: 8px;
  transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

html.dark-mode .riba-card-left.expanded {
  background: var(--bg-tertiary);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

/* Blur backdrop when card is expanded */
.riba-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 55%;
  height: 100%;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 650;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.1s ease, visibility 0s linear 0.1s;
}

html.dark-mode .riba-backdrop {
  background: rgba(0,0,0,0.2);
}

.riba-backdrop.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.1s ease, visibility 0s linear 0s;
}

/* Clone for expansion animation */
.riba-clone-expanded {
  background: rgba(255,255,255,0.95);
  border-radius: 10px;
  padding: 50px 50px;
  border: 1px solid rgba(0,0,0,0.06);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  cursor: pointer;
  box-sizing: border-box;
  overflow: hidden;
}

/* Hide all content initially */
.riba-clone-expanded > * {
  opacity: 0;
  transition: opacity 0.1s ease;
}

/* Show content */
.riba-clone-expanded.show-content > * {
  opacity: 1;
}

/* Enable scrollbar only after content visible */
.riba-clone-expanded.show-scrollbar {
  overflow-y: auto;
}

/* Lock view scrolling when RIBA card is expanded */
body.riba-expanded-lock {
  overflow: hidden;
}

/* Lock RIBA panel scrolling when card is expanded */
.riba-left-panel.scroll-locked {
  overflow: hidden !important;
}

.riba-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 6px;
}

.riba-num-left {
  font-size: 3vh;
  font-weight: 400;
  color: #333;
  line-height: 1;
}

.riba-ring-left {
  width:6vh;
  height: 6vh;
}

.riba-ring-left svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-seg-left {
  fill: none;
  stroke: #e0e0e0;
  stroke-width: 3;
  stroke-dasharray: 5.6 48;
}

.ring-seg-left.seg-0 { stroke-dashoffset: 0; }
.ring-seg-left.seg-1 { stroke-dashoffset: -6.7; }
.ring-seg-left.seg-2 { stroke-dashoffset: -13.4; }
.ring-seg-left.seg-3 { stroke-dashoffset: -20.1; }
.ring-seg-left.seg-4 { stroke-dashoffset: -26.8; }
.ring-seg-left.seg-5 { stroke-dashoffset: -33.5; }
.ring-seg-left.seg-6 { stroke-dashoffset: -40.2; }
.ring-seg-left.seg-7 { stroke-dashoffset: -46.9; }

.ring-seg-left.active { stroke-width: 4; }

/* RIBA Stage colors - set via CSS variable per stage */
.riba-card-left[data-stage="0"] { --stage-color: var(--stage-0); --stage-arrow: var(--stage-0); }
.riba-card-left[data-stage="1"] { --stage-color: var(--stage-1); --stage-arrow: var(--stage-1); }
.riba-card-left[data-stage="2"] { --stage-color: var(--stage-2); --stage-arrow: var(--stage-2); }
.riba-card-left[data-stage="3"] { --stage-color: var(--stage-3); --stage-arrow: #d4a000; }
.riba-card-left[data-stage="4"] { --stage-color: var(--stage-4); --stage-arrow: var(--stage-4); }
.riba-card-left[data-stage="5"] { --stage-color: var(--stage-5); --stage-arrow: var(--stage-5); }
.riba-card-left[data-stage="6"] { --stage-color: var(--stage-6); --stage-arrow: #d4a000; }
.riba-card-left[data-stage="7"] { --stage-color: var(--stage-7); --stage-arrow: var(--stage-7); }

/* Apply stage color to all elements (was 32 rules, now 4) */
.riba-card-left .ring-seg-left.active { stroke: var(--stage-color); }
.riba-card-left .riba-line-left { background: var(--stage-color); }
.riba-card-left .riba-dot-left { background: var(--stage-color); }
.riba-card-left .riba-arrow-left { color: var(--stage-arrow); }

.riba-title-left {
  font-family: 'Inter Display', 'Inter', sans-serif;
  font-size: 4vh;
  font-weight: 400;
  color: #222;
  margin-bottom: 6px;
}

.riba-line-left {
  height: 3px;
  border-radius: 2px;
  margin-bottom: 10px;
  width: 50px;
}

.riba-desc-left {
  font-family: 'Inter Display', 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 300;
  color: #666;
  line-height: 1.5;
  margin-bottom: 10px;
  display: none; /* Hidden when collapsed */
}

.riba-card-left.expanded .riba-desc-left,
.riba-clone-expanded.expanded .riba-desc-left {
  display: block; /* Show when expanded */
}

.riba-toggle-left {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 6px;
  border-top: 1px solid #eee;
  margin-top: auto; /* Pin to bottom of card */
}

.riba-toggle-label {
  font-size: 11px;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.riba-toggle-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.1s ease;
}

.riba-toggle-icon svg {
  width: 100%;
  height: 100%;
  stroke: #999;
  stroke-width: 2;
  fill: none;
}

.riba-card-left.expanded .riba-toggle-icon {
  transform: rotate(180deg);
}

.riba-details-left {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.1s ease;
}

.riba-card-left.expanded .riba-details-left,
.riba-clone-expanded.expanded .riba-details-left {
  max-height: 2000px;
}

/* Two-column layout for expanded details */
.riba-clone-expanded.expanded .riba-details-left {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.riba-section-left {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed #e0e0e0;
}

/* In expanded view, remove top margin/border for grid layout */
.riba-clone-expanded.expanded .riba-section-left {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.riba-clone-expanded.expanded .riba-section-left:first-child {
  border-right: 1px dashed #e0e0e0;
  padding-right: 28px;
}

.riba-clone-expanded.expanded .riba-section-left:last-child {
  padding-left: 12px;
}

.riba-section-head {
  font-size: 11px;
  font-weight: 700;
  color: #156082;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  padding-top: 8px;
}

.riba-list-left {
  list-style: none;
  padding: 0;
  margin: 0;
}

.riba-list-left li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 5px 0;
  font-size: 12px;
  color: #555;
  line-height: 1.5;
  text-align: justify;
}

.riba-dot-left {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.riba-arrow-left {
  flex-shrink: 0;
  font-size: 11px;
  margin-top: 2px;
}

/* Dark mode for LEFT RIBA panel */
html.dark-mode .riba-card-left {
  background: var(--bg-tertiary);
  border-color: rgba(255,255,255,0.08);
}

html.dark-mode .riba-card-left:hover {
  background: #333333;
  border-color: rgba(78, 205, 196, 0.4);
}

html.dark-mode .riba-num-left,
html.dark-mode .riba-title-left {
  color: var(--text-primary);
}

html.dark-mode .riba-desc-left,
html.dark-mode .riba-list-left li {
  color: #aaa;
}

html.dark-mode .ring-seg-left {
  stroke: #3a3a3a;
}

html.dark-mode .riba-toggle-left,
html.dark-mode .riba-section-left {
  border-color: #3a3a3a;
}

html.dark-mode .riba-panel-header {
  color: #4a9bb8;
  border-bottom-color: rgba(74, 155, 184, 0.3);
}

/* Dark mode for RIBA clone (expanded card) */
html.dark-mode .riba-clone-expanded {
  background: var(--bg-tertiary);
  border-color: rgba(255,255,255,0.08);
}

html.dark-mode .riba-clone-expanded.expanded .riba-section-left:first-child {
  border-right-color: #3a3a3a;
}

.typing-word {
  color: #666;
}

.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: #666;
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 0.8s step-end infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.typing-cursor.hidden {
  display: none;
}

.subtitle-line {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: #999;
  margin: 0.3rem 0 0.75rem;
  min-height: 1.3em;
}

.subtitle-line .highlight-blue {
  color: #0088cc;
}

.panel-blurb {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.7;
  color: #444;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out, margin 0.4s ease-out;
}

.panel-blurb.visible {
  max-height: 200px;
  margin: 0 0 0.75rem;
}

.panel-blurb .line {
  display: inline;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.panel-blurb .line.visible {
  opacity: 1;
}

/* Interactive overlay nodes - positioned over brain nodes */
.overlay-nodes-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1001;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.overlay-nodes-container.visible {
  opacity: 1;
}

.overlay-node {
  position: absolute;
  width: 28px;
  height: 28px;
  pointer-events: auto;
  cursor: pointer;
  transform: translate(-50%, -50%);
}

/* Node title label - permanently visible on MEP screen */
.overlay-node .node-title {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: rgba(50, 50, 50, 0.9);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  -webkit-font-smoothing: antialiased;
}

html.dark-mode .overlay-node .node-title {
  color: rgba(255, 255, 255, 0.9);
}

.overlay-node.show-title .node-title {
  opacity: 1;
  visibility: visible;
}

/* Hover here label below node - permanently visible with bounce */
.overlay-node .node-hint {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 400;
  color: rgba(50, 50, 50, 0.9);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  -webkit-font-smoothing: antialiased;
}

html.dark-mode .overlay-node .node-hint {
  color: rgba(255, 255, 255, 0.9);
}

.overlay-node .node-arrow {
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: rgba(50, 50, 50, 0.9);
  opacity: 0;
  visibility: hidden;
}

html.dark-mode .overlay-node .node-arrow {
  color: rgba(255, 255, 255, 0.9);
}

.overlay-node.show-hint .node-hint,
.overlay-node.show-hint .node-arrow {
  opacity: 1;
  visibility: visible;
  animation: hintBounce 1.5s ease-in-out infinite;
}

@keyframes hintBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-4px); }
}

/* MEP Engineer node shine effect */
.overlay-node.mep-shine .node-core {
  animation: mepShine 2s ease-in-out infinite;
}

.overlay-node.mep-shine::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(21, 96, 130, 0.3) 0%, transparent 70%);
  animation: mepGlow 2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes mepShine {
  0%, 100% { 
    background: linear-gradient(135deg, #1a7a9e 0%, #156082 100%);
    box-shadow: 0 0 8px rgba(21, 96, 130, 0.6);
  }
  50% { 
    background: linear-gradient(135deg, #2090b8 0%, #1a7a9e 100%);
    box-shadow: 0 0 14px rgba(32, 144, 184, 0.8);
  }
}

@keyframes mepGlow {
  0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.2); }
}

/* Code snippet beside node - grey text */
.overlay-node .node-code {
  position: absolute;
  top: 50%;
  left: 36px;
  transform: translateY(-50%);
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 9px;
  color: rgba(180, 180, 180, 0.9);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.overlay-node .node-code.visible {
  opacity: 1;
}

/* Synced state - all nodes glow together */
.overlay-node.synced .node-core {
  background: linear-gradient(135deg, #00ffc8 0%, #00ddb0 100%);
  box-shadow: 0 0 12px rgba(0, 255, 200, 0.8);
}

.overlay-node.synced .node-glow {
  width: 24px;
  height: 24px;
  background: rgba(0, 255, 200, 0.4);
}

.overlay-node.synced .node-pulse-ring {
  border-color: rgba(0, 255, 200, 0.7);
  animation: overlay-node-pulse 1s ease-out infinite;
}

/* Project completion overlay with big tick */
.project-complete-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease, visibility 0s linear 1s;
  pointer-events: none;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
}

.project-complete-overlay.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 1s ease, visibility 0s linear 0s, background 1s ease, backdrop-filter 1s ease;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.project-complete-overlay .project-complete-content {
  position: absolute;
  left: 27.5%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.project-complete-overlay.visible .project-complete-content {
  opacity: 1;
  transition: opacity 0.5s ease 0.8s;
}

html.dark-mode .project-complete-overlay.visible {
  background: rgba(0, 0, 0, 0.5);
}

.project-complete-tick {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a7a9e 0%, #156082 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 40px rgba(21, 96, 130, 0.5);
  transform: scale(0);
}

.project-complete-overlay.visible .project-complete-tick {
  animation: tickPopIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 1s forwards;
}

.project-complete-tick svg {
  width: 60px;
  height: 60px;
  stroke: white;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.project-complete-tick svg path {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
}

.project-complete-overlay.visible .project-complete-tick svg path {
  animation: tickDraw 0.4s ease-out 1.3s forwards;
}

@keyframes tickPopIn {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}

@keyframes tickDraw {
  0% { stroke-dashoffset: 100; }
  100% { stroke-dashoffset: 0; }
}

.project-complete-text {
  margin-top: 24px;
  font-family: 'Inter', sans-serif;
  font-size: 24px;
  font-weight: 600;
  color: #333;
  text-align: center;
  opacity: 0;
  transform: translateY(10px);
  -webkit-font-smoothing: antialiased;
}

.project-complete-overlay.visible .project-complete-text {
  animation: textFadeIn 0.4s ease-out 1.5s forwards;
}

.project-complete-savings {
  margin-top: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #00a0a0;
  text-align: center;
  opacity: 0;
  transform: translateY(10px);
  -webkit-font-smoothing: antialiased;
}

.project-complete-overlay.visible .project-complete-savings {
  animation: textFadeIn 0.4s ease-out 1.7s forwards;
}

.project-complete-btn {
  margin-top: 24px;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: auto;
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
}

.project-complete-btn .open-chat-btn {
  position: relative;
  bottom: auto;
  left: auto;
}

.project-complete-overlay.visible .project-complete-btn {
  animation: textFadeIn 0.4s ease-out 1.9s forwards;
}

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

html.dark-mode .project-complete-tick {
  background: linear-gradient(135deg, #4ECDC4 0%, #3dbdb5 100%);
  box-shadow: 0 0 40px rgba(78, 205, 196, 0.5);
}

html.dark-mode .project-complete-text {
  color: var(--text-primary);
}

html.dark-mode .project-complete-savings {
  color: #4ECDC4;
}

/* Idle state - matches original thinking node */
.overlay-node .node-core {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: linear-gradient(135deg, #666 0%, #444 100%);
  border-radius: 50%;
  transition: all 0.5s ease;
}

.overlay-node .node-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: rgba(0, 180, 180, 0);
  border-radius: 50%;
  filter: blur(4px);
  transition: all 0.5s ease;
}

.overlay-node .node-pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border: 2px solid rgba(0, 180, 180, 0);
  border-radius: 50%;
  transition: border-color 0.5s ease;
}

/* Hover state - matches original thinking node processing state */
.overlay-node:hover .node-core {
  background: linear-gradient(135deg, #1a7a9e 0%, #156082 100%);
  box-shadow: 0 0 8px rgba(21, 96, 130, 0.5);
}

.overlay-node:hover .node-glow {
  width: 18px;
  height: 18px;
  background: rgba(21, 96, 130, 0.3);
}

.overlay-node:hover .node-pulse-ring {
  border-color: rgba(21, 96, 130, 0.5);
  animation: overlay-node-pulse 1.5s ease-out infinite;
}

/* Loading ring - SVG progress circle */
.overlay-node .loading-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-90deg);
  width: 32px;
  height: 32px;
  opacity: 0;
  pointer-events: none;
}

.overlay-node .loading-ring circle {
  fill: none;
  stroke: rgba(0, 220, 200, 0.9);
  stroke-width: 2;
  stroke-linecap: round;
  /* Circle circumference = 2 * PI * r = 2 * 3.14159 * 14 = 88 */
  stroke-dasharray: 88;
  stroke-dashoffset: 88;
  filter: drop-shadow(0 0 4px rgba(0, 220, 200, 0.5));
}

.overlay-node.loading .loading-ring {
  opacity: 1;
}

.overlay-node.loading .loading-ring circle {
  animation: loading-progress 3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.overlay-node.loaded .loading-ring {
  opacity: 1;
}

.overlay-node.loaded .loading-ring circle {
  stroke: rgba(0, 255, 200, 1);
  stroke-dashoffset: 0;
  filter: drop-shadow(0 0 8px rgba(0, 255, 200, 0.8));
  animation: loading-complete-glow 0.8s ease-out forwards;
}

@keyframes loading-progress {
  0% { 
    stroke-dashoffset: 88;
  }
  100% { 
    stroke-dashoffset: 0;
  }
}

@keyframes loading-complete-glow {
  0% { 
    filter: drop-shadow(0 0 8px rgba(0, 255, 200, 0.8));
    opacity: 1;
  }
  40% {
    filter: drop-shadow(0 0 16px rgba(0, 255, 200, 1));
    opacity: 1;
  }
  100% { 
    filter: drop-shadow(0 0 24px rgba(0, 255, 200, 0));
    opacity: 0;
  }
}

/* Dark mode loading ring */
html.dark-mode .overlay-node .loading-ring circle {
  stroke: rgba(78, 220, 210, 0.9);
  filter: drop-shadow(0 0 4px rgba(78, 220, 210, 0.5));
}

html.dark-mode .overlay-node.loaded .loading-ring circle {
  stroke: rgba(100, 255, 230, 1);
  filter: drop-shadow(0 0 8px rgba(100, 255, 230, 0.8));
}

@keyframes overlay-node-pulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.7;
  }
  100% {
    transform: translate(-50%, -50%) scale(3);
    opacity: 0;
  }
}

/* Dark mode adjustments */
html.dark-mode .overlay-node .node-core {
  background: linear-gradient(135deg, #555 0%, #333 100%);
}

html.dark-mode .overlay-node .node-glow {
  background: rgba(78, 205, 196, 0);
}

html.dark-mode .overlay-node:hover .node-core {
  background: linear-gradient(135deg, #4ECDC4 0%, #3db8b0 100%);
  box-shadow: 0 0 10px rgba(78, 205, 196, 0.6);
}

html.dark-mode .overlay-node:hover .node-glow {
  background: rgba(78, 205, 196, 0.35);
}

html.dark-mode .overlay-node:hover .node-pulse-ring {
  border-color: rgba(78, 205, 196, 0.5);
}

/* Dark mode synced state */
html.dark-mode .overlay-node.synced .node-core {
  background: linear-gradient(135deg, #4ECDC4 0%, #3dbdb5 100%);
  box-shadow: 0 0 14px rgba(78, 205, 196, 0.9);
}

html.dark-mode .overlay-node.synced .node-glow {
  background: rgba(78, 205, 196, 0.5);
}

html.dark-mode .overlay-node.synced .node-pulse-ring {
  border-color: rgba(78, 205, 196, 0.8);
}

/* Dark mode MEP shine */
html.dark-mode .overlay-node.mep-shine .node-core {
  animation: mepShineDark 2s ease-in-out infinite;
}

html.dark-mode .overlay-node.mep-shine::after {
  background: radial-gradient(circle, rgba(78, 205, 196, 0.3) 0%, transparent 70%);
}

@keyframes mepShineDark {
  0%, 100% { 
    background: linear-gradient(135deg, #4ECDC4 0%, #3dbdb5 100%);
    box-shadow: 0 0 8px rgba(78, 205, 196, 0.6);
  }
  50% { 
    background: linear-gradient(135deg, #5ee0d8 0%, #4ECDC4 100%);
    box-shadow: 0 0 14px rgba(78, 205, 196, 0.9);
  }
}

.services-label {
  display: none;
}

.services-label.visible {
  display: none;
}

/* Services 3-column grid */
.services-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.2rem;
}

.services-full-width {
  margin-bottom: 1.2rem;
}

.service-item {
  margin-bottom: 0;
}

.service-item:last-child {
  margin-bottom: 0;
}

.service-item .line {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.service-item .line.visible {
  opacity: 1;
}

.service-item-title .line {
  display: block;
}

.service-item-body .line {
  display: inline;
}

.service-item-title {
  font-family: 'Gotham Medium', 'Montserrat', Helvetica, Arial, sans-serif;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 2pt;
  margin: 0 0 0.4rem;
  color: #222;
}

.service-item-title .teal {
  color: var(--teal);
}

.service-item-body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.7;
  color: #444;
  text-align: justify;
}

/* Thinking section - toggle visibility on scroll */
.thinking-section {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  max-width: 500px;
  width: 100%;
}

.thinking-section.visible {
  opacity: 1;
  pointer-events: auto;
}

/* Our Solution section - always visible */
.our-solution-section {
  margin-bottom: 20px;
  margin-left: auto;
  margin-right: auto;
}

.solution-heading {
  font-family: 'Inter Display', 'Inter', sans-serif;
  font-size: 44px;
  font-weight: 500;
  letter-spacing: normal;
  color: #000;
  margin: 0 0 16px 0;
}

.solution-text {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.7;
  letter-spacing: 0.01em;
  color: #555;
  margin: 0 0 12px 0;
  text-align: justify;
}

.solution-text:last-child {
  margin-bottom: 0;
}

html.dark-mode .solution-heading {
  color: var(--text-primary);
}

html.dark-mode .solution-text {
  color: #999;
}

/* Brain Overlay Nodes - positioned over brain nodes */
.brain-overlay-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1001;
}

.brain-overlay-node {
  position: absolute;
  width: 28px;
  height: 28px;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.4s ease-out;
}

.brain-overlay-node.visible {
  opacity: 1;
}

.brain-overlay-node .overlay-core {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, #4a6a7a 0%, #3a5a6a 100%);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.brain-overlay-node .overlay-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background: rgba(0, 140, 160, 0.15);
  border-radius: 50%;
  filter: blur(4px);
  transition: all 0.3s ease;
}

.brain-overlay-node .overlay-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  border: 1.5px solid rgba(0, 140, 160, 0.2);
  border-radius: 50%;
  transition: all 0.3s ease;
}

/* Hover state - activates */
.brain-overlay-node:hover .overlay-core {
  background: linear-gradient(135deg, #1a7a9e 0%, #156082 100%);
  box-shadow: 0 0 10px rgba(21, 96, 130, 0.6);
}

.brain-overlay-node:hover .overlay-glow {
  width: 22px;
  height: 22px;
  background: rgba(21, 96, 130, 0.4);
}

.brain-overlay-node:hover .overlay-ring {
  border-color: rgba(21, 96, 130, 0.6);
  animation: overlay-pulse 1.2s ease-out infinite;
}

@keyframes overlay-pulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.8;
  }
  100% {
    transform: translate(-50%, -50%) scale(2.5);
    opacity: 0;
  }
}

/* Dark mode */
html.dark-mode .brain-overlay-node .overlay-core {
  background: linear-gradient(135deg, #3a5a6a 0%, #2a4a5a 100%);
}

html.dark-mode .brain-overlay-node:hover .overlay-core {
  background: linear-gradient(135deg, #00b8b8 0%, #008888 100%);
}

.services-section {
  padding-top: 0;
  margin-top: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.5s ease-out, padding 0.4s ease-out, margin 0.4s ease-out, opacity 0.3s ease;
  width: 100%;
}

.services-section.visible {
  max-height: 800px;
  padding-top: 0.5rem;
  margin-top: 0.25rem;
  opacity: 1;
}

/* Scroll Indicator */
.scroll-indicator {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  z-index: 600;
  cursor: pointer;
  width: fit-content;
  height: fit-content;
  text-decoration: none;
}

.scroll-indicator.visible {
  opacity: 1;
  pointer-events: auto;
}

.scroll-indicator:hover {
  opacity: 1;
}

.scroll-indicator:hover .scroll-indicator-text {
  color: #666;
}

.scroll-indicator-text {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #999;
}

.scroll-indicator-arrow {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bounce 2s infinite;
}

.scroll-indicator-arrow svg {
  width: 20px;
  height: 20px;
  stroke: #999;
  stroke-width: 2;
  fill: none;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(8px);
  }
  60% {
    transform: translateY(4px);
  }
}

/* Back to Top Arrow */
.back-to-top {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  z-index: 600;
  cursor: pointer;
  width: fit-content;
  height: fit-content;
  text-decoration: none;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  opacity: 1;
}

.back-to-top:hover .back-to-top-text {
  color: #666;
}

.back-to-top-text {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #999;
}

.back-to-top-arrow {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bounce-up 2s infinite;
}

.back-to-top-arrow svg {
  width: 20px;
  height: 20px;
  stroke: #999;
  stroke-width: 2;
  fill: none;
}

@keyframes bounce-up {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-8px);
  }
  60% {
    transform: translateY(-4px);
  }
}

/* Software Carousel */
.software-carousel {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

#softwareCarousel {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.software-carousel.visible {
  opacity: 1;
  transform: translateY(0);
}

.carousel-label {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 0.8rem;
}

.carousel-track {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.carousel-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(0,0,0,0.02);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.carousel-item::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 40%,
    rgba(255,255,255,0.8) 50%,
    transparent 60%
  );
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.carousel-item:hover::before {
  transform: translateX(100%);
}

.carousel-item:hover {
  background: rgba(21, 96, 130, 0.08);
  box-shadow: 0 4px 15px rgba(21, 96, 130, 0.15);
  transform: translateY(-2px);
}

.carousel-item img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 6px;
}

.carousel-item span {
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  letter-spacing: 0.05em;
  color: #666;
  text-transform: uppercase;
}

html.dark-mode .software-carousel {
  border-top-color: #444;
}

html.dark-mode .carousel-label {
  color: #666;
}

html.dark-mode .carousel-item {
  background: rgba(255,255,255,0.03);
}

html.dark-mode .carousel-item:hover {
  background: rgba(78, 205, 196, 0.1);
  box-shadow: 0 4px 15px rgba(78, 205, 196, 0.2);
}

html.dark-mode .carousel-item span {
  color: #888;
}

/* View 3: Demo View Overlay (same layout as demos.html View 2) */
.demo-view-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 500;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.5s ease, visibility 0s linear 0.5s;
}

.demo-view-overlay.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: none; /* Let brain events through - only content is interactive */
  transition: opacity 0.5s ease, visibility 0s linear 0s;
}

/* Demo Split View Layout */
.demo-view-overlay .demo-split-view {
  width: 100%;
  height: 100%;
  display: flex;
}

/* Reversed Layout - Text on right, panels on left */
.demo-view-overlay .demo-split-view.reversed {
  flex-direction: row-reverse;
}

/* Left indent for reversed layout (avoid section indicator) */
.demo-view-overlay .demo-split-view.reversed .demo-containers-panel {
  padding-left: 80px;
  padding-right: 0;
  justify-content: flex-start;
}

/* Text Panel - 40% */
.demo-view-overlay .demo-text-panel {
  flex: 0 0 40%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 60px;
  max-width: 40%;
  background: #ffffff;
  pointer-events: none; /* Let brain events through in light mode */
}

.demo-view-overlay .demo-text-inner {
  max-width: 400px;
  pointer-events: auto; /* Only actual content is interactive */
}

html.dark-mode .demo-view-overlay .demo-text-panel {
  background: transparent;
}

/* Large hero heading for Views 7 & 8 - 5vh */
.demo-view-overlay .demo-hero-heading {
  font-family: 'Inter', sans-serif;
  font-size: 44px;
  font-weight: 500;
  line-height: 1.3;
  color: #000;
  margin-bottom: 32px;
}

html.dark-mode .demo-view-overlay .demo-hero-heading {
  color: var(--text-primary);
}

.demo-view-overlay .demo-text-heading {
  font-family: 'Inter', sans-serif;
  font-size: 44px;
  font-weight: 500;
  line-height: 1.3;
  color: #000;
  margin-bottom: 24px;
}

html.dark-mode .demo-view-overlay .demo-text-heading {
  color: var(--text-primary);
}

.demo-view-overlay .demo-text-body {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.8;
  color: #555;
  text-align: justify;
  max-width: 400px;
}

html.dark-mode .demo-view-overlay .demo-text-body {
  color: #aaa;
}

.demo-view-overlay .demo-text-body p {
  margin-bottom: 18px;
}

.demo-view-overlay .demo-text-body p:last-child {
  margin-bottom: 0;
}

/* Containers Panel - 60% (image side) */
.demo-view-overlay .demo-containers-panel {
  flex: 0 0 60%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  padding-right: 0;
  box-sizing: border-box;
  max-width: 60%;
  overflow: hidden;
  pointer-events: none; /* Let brain events through gaps */
}

.demo-view-overlay .demo-containers-panel .demo-image-container,
.demo-view-overlay .demo-containers-panel .demo-chat-box,
.demo-view-overlay .demo-containers-panel .demo-revit-box,
.demo-view-overlay .demo-containers-panel .demo-intro-image,
.demo-view-overlay .demo-containers-panel .demo-intro-video {
  pointer-events: auto; /* Only actual content is interactive */
}

.demo-view-overlay .demo-image-container {
  display: flex;
  height: 60vh;
  width: 100%;
  background: transparent;
  position: relative;
  overflow: hidden;
  align-items: center;
  justify-content: flex-end;
  padding: 0;
  box-sizing: border-box;
  border-radius: 0;
}

/* View 3 intro image - full width, height 60vh responsive, no skew */
.demo-view-overlay .demo-intro-image {
  width: 100%;
  height: 60vh;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
}

/* Demo intro video - same sizing as intro image */
.demo-view-overlay .demo-intro-video {
  width: 100%;
  height: 60vh;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
  pointer-events: auto;
}

/* View 7 QA Manager container - embeds the QA Manager directly in the view */
.qa-manager-container {
  display: flex;
  width: 100%;
  height: 70vh;
  min-height: 500px;
  background: transparent;
  border-radius: 8px;
  overflow: hidden;
}

.qa-manager-container .qa-manager {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* View 7 QA placeholder */
.qa-view-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 60vh;
  background: rgba(21, 96, 130, 0.05);
  border: 2px dashed rgba(21, 96, 130, 0.2);
  border-radius: 8px;
  color: #666;
  font-size: 14px;
}

html.dark-mode .qa-view-placeholder {
  background: rgba(21, 96, 130, 0.1);
  border-color: rgba(21, 96, 130, 0.3);
  color: #aaa;
}

/* QA Manager positioning when View 7 is active - left edge of 60% panel */
#schedulesOverlay.visible ~ .qa-manager,
body.view-7-active .qa-manager {
  left: 5% !important;
  transform: translate(0, -50%) !important;
}

/* View 8 Spec Builder - using v8-three-column layout (see bottom of file) */
/* Old container rules removed - replaced with v8-center-panel */

/* View 5 video container - video plays in background of placeholder image */
.demo-video-container {
  position: relative;
  overflow: hidden;
}

.demo-video-container .video-poster {
  width: 100%;
  height: 60vh;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
  position: relative;
  z-index: 1;
  transition: opacity 0.5s ease;
}

.demo-video-container .demo-background-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.demo-video-container .demo-background-video.playing {
  opacity: 1;
}

/* Demo Example Output Button */
.demo-example-btn {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 24px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: white;
  background: #156082;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.demo-example-btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to right,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.3) 50%,
    rgba(255,255,255,0) 100%
  );
  transform: rotate(30deg);
  animation: btn-shine 2.5s ease-in-out infinite;
}

.demo-example-btn:hover {
  background: #0e4560;
  transform: scale(1.02);
}

html.dark-mode .demo-example-btn {
  background: #156082;
}

html.dark-mode .demo-example-btn:hover {
  background: #0e4560;
}

/* Demo Button Row - multiple buttons side by side */
.demo-btn-row {
  display: flex;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: nowrap;
}

.demo-btn-row .demo-example-btn {
  margin-top: 0;
  padding: 12px 12px;
  font-size: 14px;
}

/* Coming Soon Button Wrapper */
.demo-btn-coming-soon {
  position: relative;
  display: inline-block;
}

.demo-btn-coming-soon .demo-example-btn {
  cursor: pointer;
}

.demo-btn-coming-soon .demo-example-btn:hover {
  background: #0e4560;
  transform: scale(1.02);
}

/* Coming Soon Dropdown for buttons */
.demo-btn-dropdown {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 8px;
  padding: 12px 16px;
  min-width: 200px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 10001;
  margin-bottom: 10px;
  text-align: left;
}

.demo-btn-coming-soon:hover .demo-btn-dropdown {
  opacity: 1;
  visibility: visible;
}

.demo-btn-dropdown .badge {
  display: inline-block;
  background: #156082;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.demo-btn-dropdown .blurb {
  font-size: 12px;
  color: #444;
  margin: 0;
  line-height: 1.5;
}

html.dark-mode .demo-btn-dropdown {
  background: #2a2a2a;
  border-color: rgba(255,255,255,0.1);
}

html.dark-mode .demo-btn-dropdown .blurb {
  color: #aaa;
}

/* Coming Soon Badge */
.coming-soon-badge {
  display: inline-block;
  padding: 6px 16px;
  background: linear-gradient(135deg, #156082, #1a7aa8);
  color: white;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 20px;
  margin-bottom: 16px;
}

/* Coming Soon Overlay in Revit container */
.coming-soon-gif {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(21, 96, 130, 0.1), rgba(26, 122, 168, 0.05));
}

.coming-soon-overlay {
  text-align: center;
  padding: 40px;
}

.coming-soon-overlay h3 {
  font-family: 'Gotham Medium', 'Inter', sans-serif;
  font-size: 28px;
  font-weight: 500;
  color: #333;
  margin-top: 16px;
}

.coming-soon-overlay .teal {
  color: #156082;
}

html.dark-mode .coming-soon-overlay h3 {
  color: #e0e0e0;
}

/* Sidebar Tab Bar */
.demo-view-overlay .sidebar-tab-bar {
  display: flex;
  align-items: stretch;
  padding: 0;
  gap: 0;
  background: #e0e0e0;
}

.demo-view-overlay .sidebar-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 12px;
  background: transparent;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.6rem;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.demo-view-overlay .sidebar-tab:hover {
  background: rgba(0,0,0,0.04);
  color: #444;
}

.demo-view-overlay .sidebar-tab.active {
  background: #ececec;
  color: #333;
}

.demo-view-overlay .sidebar-tab-bar .share-chat-btn {
  margin-left: auto;
  padding: 6px 10px;
}

html.dark-mode .demo-view-overlay .sidebar-tab-bar {
  background: #1a1a1a;
}

html.dark-mode .demo-view-overlay .sidebar-tab {
  color: #888;
}

html.dark-mode .demo-view-overlay .sidebar-tab:hover {
  background: rgba(255,255,255,0.04);
  color: #aaa;
}

html.dark-mode .demo-view-overlay .sidebar-tab.active {
  background: #1e1e1e;
  color: #fff;
}

/* Sidebar Panels */
.demo-view-overlay .sidebar-panel {
  display: none;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  overscroll-behavior: contain;
}

.demo-view-overlay .sidebar-panel.active {
  display: flex;
}

/* Prevent scroll from propagating to parent */
.demo-view-overlay .demo-chat-history-sidebar {
  overscroll-behavior: contain;
}

.demo-view-overlay .demo-outputs-tree {
  overscroll-behavior: contain;
}

/* Files panel - full height for tree */
.demo-view-overlay .sidebar-panel[data-panel="files"] .demo-outputs-section {
  flex: 1;
  margin: 0;
  padding: 0.5rem;
  border-top: none;
  max-height: none;
  overflow-x: auto;
  overflow-y: auto;
}

.demo-view-overlay .sidebar-panel[data-panel="files"] .demo-outputs-tree {
  max-height: none;
  min-width: max-content;
}

/* Sidebar Footer */
.demo-view-overlay .sidebar-footer {
  padding: 8px 12px;
  border-top: 1px solid rgba(0,0,0,0.08);
  background: #e8e8e8;
  flex-shrink: 0;
}

.demo-view-overlay .sidebar-footer .footer-text {
  font-family: 'Inter', sans-serif;
  font-size: 0.55rem;
  color: #888;
}

html.dark-mode .demo-view-overlay .sidebar-footer {
  border-top-color: rgba(255,255,255,0.06);
  background: #252525;
}

html.dark-mode .demo-view-overlay .sidebar-footer .footer-text {
  color: #666;
}

/* Sidebar Tab SVG icons */
.demo-view-overlay .sidebar-tab svg {
  width: 11px;
  height: 11px;
  stroke: currentColor;
  flex-shrink: 0;
}

/* Outputs File List in Chat Sidebar */
.demo-outputs-section {
  margin-top: 0;
  padding: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(128, 128, 128, 0.2);
  flex: 0 0 auto;
  max-height: 40%;
  overflow: hidden;
}

.demo-outputs-header {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03125rem;
  color: #888;
  margin-bottom: 0.5rem;
  padding: 0 0.5rem;
}

.demo-outputs-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.demo-output-file {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.5rem;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.demo-output-file:hover {
  background: rgba(128, 128, 128, 0.1);
}

.demo-output-icon {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 0.1875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.5rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.demo-output-icon.pdf { background: #e74c3c; }
.demo-output-icon.dwg { background: #e67e22; }
.demo-output-icon.rvt { background: #3498db; }
.demo-output-icon.xlsx { background: #27ae60; }
.demo-output-icon.docx { background: #2980b9; }

.demo-output-name {
  font-size: 0.6rem;
  font-weight: 400;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html.dark-mode .demo-outputs-header {
  color: #777;
}

html.dark-mode .demo-output-file:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Project Structure - File Tree Style */
.demo-outputs-section.project-structure .demo-outputs-tree {
  font-family: 'Inter', sans-serif;
  font-size: 0.6rem;
  padding: 0.25rem;
  max-height: 150px;
  overflow-x: auto;
  overflow-y: auto;
}

.demo-outputs-section.project-structure .demo-outputs-tree::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.demo-outputs-section.project-structure .demo-outputs-tree::-webkit-scrollbar-track {
  background: transparent;
}

.demo-outputs-section.project-structure .demo-outputs-tree::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.15);
  border-radius: 3px;
}

.demo-outputs-section.project-structure .demo-outputs-tree::-webkit-scrollbar-thumb:hover {
  background: rgba(0,0,0,0.25);
}

html.dark-mode .demo-outputs-section.project-structure .demo-outputs-tree::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
}

html.dark-mode .demo-outputs-section.project-structure .demo-outputs-tree::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.25);
}

.demo-outputs-section.project-structure .tree-folder {
  margin-bottom: 2px;
}

.demo-outputs-section.project-structure .tree-folder-header {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  border-radius: 3px;
  cursor: pointer;
  color: #444;
  font-weight: 500;
  transition: background 0.15s ease;
}

.demo-outputs-section.project-structure .tree-folder-header:hover {
  background: rgba(128, 128, 128, 0.1);
}

.demo-outputs-section.project-structure .folder-icon {
  font-size: 0.5rem;
  color: #888;
  width: 10px;
  text-align: center;
  transition: transform 0.15s ease;
}

.demo-outputs-section.project-structure .tree-folder:not(.expanded) .folder-icon {
  transform: rotate(-90deg);
}

.demo-outputs-section.project-structure .tree-folder-content {
  padding-left: 14px;
  border-left: 1px solid rgba(128, 128, 128, 0.15);
  margin-left: 5px;
}

.demo-outputs-section.project-structure .tree-folder:not(.expanded) > .tree-folder-content {
  display: none;
}

.demo-outputs-section.project-structure .tree-file {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px;
  border-radius: 3px;
  cursor: pointer;
  color: #555;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.demo-outputs-section.project-structure .tree-file:hover {
  background: rgba(128, 128, 128, 0.1);
}

.demo-outputs-section.project-structure .file-icon {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.4rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.demo-outputs-section.project-structure .file-icon::before {
  font-size: 0.35rem;
  font-weight: 700;
}

.demo-outputs-section.project-structure .file-icon.pdf { background: #e74c3c; }
.demo-outputs-section.project-structure .file-icon.pdf::before { content: 'PDF'; }
.demo-outputs-section.project-structure .file-icon.dwg { background: #e67e22; }
.demo-outputs-section.project-structure .file-icon.dwg::before { content: 'DWG'; }
.demo-outputs-section.project-structure .file-icon.rvt { background: #3498db; }
.demo-outputs-section.project-structure .file-icon.rvt::before { content: 'RVT'; }
.demo-outputs-section.project-structure .file-icon.xlsx { background: #27ae60; }
.demo-outputs-section.project-structure .file-icon.xlsx::before { content: 'XLS'; }
.demo-outputs-section.project-structure .file-icon.docx { background: #2980b9; }
.demo-outputs-section.project-structure .file-icon.docx::before { content: 'DOC'; }

html.dark-mode .demo-outputs-section.project-structure .tree-folder-header {
  color: #ccc;
}

html.dark-mode .demo-outputs-section.project-structure .tree-folder-header:hover {
  background: rgba(255, 255, 255, 0.05);
}

html.dark-mode .demo-outputs-section.project-structure .folder-icon {
  color: #666;
}

html.dark-mode .demo-outputs-section.project-structure .tree-folder-content {
  border-left-color: rgba(255, 255, 255, 0.1);
}

html.dark-mode .demo-outputs-section.project-structure .tree-file {
  color: #aaa;
}

html.dark-mode .demo-outputs-section.project-structure .tree-file:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Placeholder text for views under construction */
.demo-placeholder-text {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: rgba(128, 128, 128, 0.6);
  text-align: center;
  background: rgba(128, 128, 128, 0.1);
  border-radius: 12px;
  min-height: 300px;
}

html.dark-mode .demo-placeholder-text {
  color: rgba(200, 200, 200, 0.5);
  background: rgba(255, 255, 255, 0.05);
}

.demo-view-overlay .demo-containers-stack {
  display: flex;
  flex-direction: row;
  gap: 12px;
  height: 100%;
  width: 100%;
  max-width: 100%;
  position: relative;
  z-index: 1;
  overflow: visible;
  pointer-events: auto;
}

/* Revit/GIF Container (Left - 48%) */
.demo-view-overlay .demo-revit-wrapper {
  flex: 0 0 48%;
  min-width: 0;
  order: 1;
  pointer-events: auto;
}

/* Chat Container (Right - 50%) */
.demo-view-overlay .demo-chat-wrapper {
  flex: 0 0 50%;
  min-width: 0;
  order: 2;
  position: relative;
  pointer-events: auto;
}

/* ============================================
   NON-VIEW-8 PANEL OVERRIDES
   These override chat-panel.css rules that conflict
   View 8 (specWritingOverlay) has its own separate rules below
   ============================================ */

/* ============================================
   HIGHER SPECIFICITY OVERRIDES FOR NON-VIEW-8 PANELS
   Uses body prefix to beat chat-panel.css load order
   ============================================ */

/* Override chat-panel.css flex: 1 and width: 100% !important */
body .demo-view-overlay:not(#specWritingOverlay) .demo-containers-stack .demo-chat-wrapper {
  flex: 0 0 50% !important;
  width: unset !important;
  max-width: 50% !important;
  height: 100% !important;
  max-height: 100% !important;
  overflow: hidden !important;
}

/* Override chat-panel.css min-width: 700px and constrain size */
/* Exclude .free-floating so JS inline styles can take effect during drag/resize */
body .demo-view-overlay:not(#specWritingOverlay) .demo-containers-stack .demo-chat-wrapper .demo-chat-box:not(.free-floating) {
  min-width: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-height: 60vh !important;
}

/* Override chat-panel.css overflow: visible */
body .demo-view-overlay:not(#specWritingOverlay) .demo-containers-stack {
  overflow: hidden !important;
}

/* Revit wrapper */
.demo-view-overlay .demo-revit-wrapper {
  position: relative;
  pointer-events: auto;
}

/* Draggable/Resizable Chat Box - NON-VIEW-8 ONLY */
/* Width/height are set by JS inline styles during drag/resize */
.demo-view-overlay:not(#specWritingOverlay) .demo-chat-box.free-floating,
.demo-view-overlay:not(#specWritingOverlay) .demo-revit-box.free-floating {
  position: fixed !important;
  z-index: 10000;
  /* No width/height here - JS sets inline styles */
}

/* Generic free-floating for revit boxes (already works) */
.demo-chat-box.free-floating,
.demo-revit-box.free-floating {
  position: fixed !important;
  z-index: 10000;
}

.demo-chat-box.dragging,
.demo-revit-box.dragging {
  opacity: 0.95;
  box-shadow: 0 12px 48px rgba(0,0,0,0.25);
  transition: none !important;
  z-index: 10001; /* On top when actively dragging/resizing */
}

html.dark-mode .demo-chat-box.dragging,
html.dark-mode .demo-revit-box.dragging {
  box-shadow: 0 12px 48px rgba(0,0,0,0.5);
}

/* Snap-back animation */
.demo-chat-box.snapping-back,
.demo-revit-box.snapping-back {
  transition: left 0.3s ease, top 0.3s ease, width 0.3s ease, height 0.3s ease, transform 0.3s ease;
}

/* Snap zone indicator */
.demo-chat-wrapper.snap-target,
.demo-revit-wrapper.snap-target {
  outline: 2px dashed rgba(0, 122, 255, 0.5);
  outline-offset: -2px;
}

html.dark-mode .demo-chat-wrapper.snap-target,
html.dark-mode .demo-revit-wrapper.snap-target {
  outline-color: rgba(0, 122, 255, 0.5);
}


.demo-view-overlay .demo-chat-box {
  width: 100%;
  height: 100%;
  background: #f8f8f8;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

html.dark-mode .demo-view-overlay .demo-chat-box {
  background: #252525;
  box-shadow: 0 4px 16px rgba(0,0,0,0.30);
}

.demo-view-overlay .demo-chat-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* History sidebar */
.demo-view-overlay .demo-chat-history-sidebar {
  flex: 0 0 30%;
  background: #ececec;
  border-right: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 120px;
  max-width: 400px;
}

html.dark-mode .demo-view-overlay .demo-chat-history-sidebar {
  background: #1e1e1e;
  border-right-color: rgba(255,255,255,0.06);
}

/* Chat sidebar resize handle (horizontal) */
.demo-view-overlay .chat-sidebar-resize {
  width: 1px;
  background: rgba(128, 128, 128, 0.2);
  cursor: ew-resize;
  flex-shrink: 0;
  transition: background 0.15s ease;
  z-index: 1;
  position: relative;
}

.demo-view-overlay .chat-sidebar-resize:hover {
  background: rgba(128, 128, 128, 0.25);
}

html.dark-mode .demo-view-overlay .chat-sidebar-resize {
  background: rgba(255, 255, 255, 0.08);
}

html.dark-mode .demo-view-overlay .chat-sidebar-resize:hover {
  background: rgba(255, 255, 255, 0.15);
}

.demo-view-overlay .demo-history-header {
  padding: 0.625rem 0.75rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.03125rem;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

html.dark-mode .demo-view-overlay .demo-history-header {
  color: #888;
  border-bottom-color: rgba(255,255,255,0.06);
}

/* Share button */
.demo-view-overlay .share-chat-btn {
  background: transparent;
  border: none;
  color: #999;
  font-size: 0.75rem;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background 0.15s ease, color 0.15s ease;
  position: relative;
}

.demo-view-overlay .share-chat-btn:hover {
  background: #e8e8e8;
  color: #666;
}

html.dark-mode .demo-view-overlay .share-chat-btn:hover {
  background: #3a3a3a;
  color: #999;
}

/* Share button tooltip */
.demo-view-overlay .share-chat-btn[title]:hover::after {
  content: attr(title);
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  padding: 6px 8px;
  background: #333;
  color: #fff;
  font-size: 0.55rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.4;
  border-radius: 4px;
  white-space: normal;
  width: 150px;
  z-index: 200;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

html.dark-mode .demo-view-overlay .share-chat-btn[title]:hover::after {
  background: #1a1a1a;
}

/* History Search Bar */
.demo-view-overlay .demo-history-search {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.demo-view-overlay .history-search-input {
  width: 100%;
  padding: 6px 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.6rem;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 4px;
  background: #f8f8f8;
  color: #333;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.demo-view-overlay .history-search-input:focus {
  border-color: rgba(21, 96, 130, 0.4);
  background: #fff;
}

.demo-view-overlay .history-search-input::placeholder {
  color: #999;
}

html.dark-mode .demo-view-overlay .demo-history-search {
  border-bottom-color: rgba(255,255,255,0.06);
}

html.dark-mode .demo-view-overlay .history-search-input {
  background: #2a2a2a;
  border-color: rgba(255,255,255,0.1);
  color: #ccc;
}

html.dark-mode .demo-view-overlay .history-search-input:focus {
  border-color: rgba(74, 155, 184, 0.4);
  background: #333;
}

html.dark-mode .demo-view-overlay .history-search-input::placeholder {
  color: #666;
}

/* New Agent Button */
.demo-view-overlay .new-agent-btn {
  width: calc(100% - 1rem);
  margin: 0.5rem;
  padding: 6px 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.6rem;
  font-weight: 500;
  color: #156082;
  background: transparent;
  border: 1px dashed rgba(21, 96, 130, 0.4);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.demo-view-overlay .new-agent-btn:hover {
  background: rgba(21, 96, 130, 0.08);
  border-color: rgba(21, 96, 130, 0.6);
}

html.dark-mode .demo-view-overlay .new-agent-btn {
  color: #4a9bb8;
  border-color: rgba(74, 155, 184, 0.4);
}

html.dark-mode .demo-view-overlay .new-agent-btn:hover {
  background: rgba(74, 155, 184, 0.1);
  border-color: rgba(74, 155, 184, 0.6);
}

.demo-view-overlay .demo-history-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.5rem;
  padding-bottom: 0.75rem;
}

.demo-view-overlay .demo-history-item {
  padding: 0.625rem 0.75rem;
  margin-bottom: 0.25rem;
  background: #e0e0e0;
  border-radius: 0.375rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  color: #555;
  cursor: pointer;
  transition: all 0.2s ease;
}

.demo-view-overlay .demo-history-item:hover {
  background: #d5d5d5;
}

html.dark-mode .demo-view-overlay .demo-history-item {
  background: var(--bg-tertiary);
  color: #aaa;
}

html.dark-mode .demo-view-overlay .demo-history-item:hover {
  background: #333;
}

.demo-view-overlay .demo-history-item.active {
  background: #aeaeae96;
  color: #000000;
}

.demo-view-overlay .demo-history-item-title {
  font-family: 'Inter', sans-serif;
  font-size: 0.60rem;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 0.125rem;
}

.demo-view-overlay .demo-history-item-preview {
  font-size: 0.625rem;
  opacity: 0.7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Chat main area */
.demo-view-overlay .demo-chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

/* Design Options Bar */
.demo-view-overlay .design-options-bar {
  display: flex;
  align-items: center;
  padding: 0 8px;
  background: #f0f0f0;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  gap: 4px;
}

/* Design Tabs */
.demo-view-overlay .design-tabs {
  display: flex;
  align-items: stretch;
  gap: 0;
  flex: 1;
}

.demo-view-overlay .design-tab {
  padding: 8px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 0.6rem;
  font-weight: 500;
  color: #666;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  position: relative;
}

.demo-view-overlay .design-tab:hover {
  color: #333;
  background: rgba(0,0,0,0.03);
}

.demo-view-overlay .design-tab.active {
  color: #333;
  background: #fff;
}

.demo-view-overlay .design-tab .tab-close {
  margin-left: 6px;
  font-size: 0.75rem;
  color: #999;
  opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease;
  line-height: 1;
  padding: 2px;
  border-radius: 2px;
}

.demo-view-overlay .design-tab:hover .tab-close {
  opacity: 1;
}

.demo-view-overlay .design-tab .tab-close:hover {
  color: #333;
  background: rgba(0,0,0,0.1);
}

html.dark-mode .demo-view-overlay .design-tab .tab-close:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

html.dark-mode .demo-view-overlay .design-tab {
  color: #888;
}

html.dark-mode .demo-view-overlay .design-tab:hover {
  color: #ccc;
  background: rgba(255,255,255,0.03);
}

html.dark-mode .demo-view-overlay .design-tab.active {
  color: #fff;
  background: #333;
}

html.dark-mode .demo-view-overlay .design-tab .tab-close {
  color: #666;
}

html.dark-mode .demo-view-overlay .design-tab .tab-close:hover {
  color: #fff;
}

.demo-view-overlay .design-option-add {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 8px 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  color: #999;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  position: relative;
}

.demo-view-overlay .design-option-add:hover {
  background: rgba(0,0,0,0.03);
  color: #666;
}

.demo-view-overlay .design-option-add .plus-icon {
  font-size: 0.8rem;
  font-weight: 400;
}

.demo-view-overlay .design-option-add .branch-icon {
  font-size: 0.7rem;
  color: #156082;
}

/* Tab label styling */
.demo-view-overlay .design-tab .tab-label {
  font-weight: 400;
  color: #999;
  font-size: 0.55rem;
}

.demo-view-overlay .design-tab.active .tab-label {
  color: #888;
}

/* Design option tooltip */
.demo-view-overlay .design-option-add[title]:hover::after {
  content: attr(title);
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  padding: 8px 10px;
  background: #333;
  color: #fff;
  font-size: 0.55rem;
  font-weight: 400;
  line-height: 1.4;
  border-radius: 4px;
  white-space: normal;
  width: 180px;
  z-index: 200;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

html.dark-mode .demo-view-overlay .design-options-bar {
  background: #2a2a2a;
  border-bottom-color: rgba(255,255,255,0.06);
}

html.dark-mode .demo-view-overlay .design-option-add {
  color: #999;
}

html.dark-mode .demo-view-overlay .design-option-add:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}

html.dark-mode .demo-view-overlay .design-option-add .branch-icon {
  color: #4a9bb8;
}

html.dark-mode .demo-view-overlay .design-option-add[title]:hover::after {
  background: #1a1a1a;
}

.demo-view-overlay .demo-chat-messages {
  flex: 1;
  padding: 1rem;
  padding-bottom: 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  background: #f8f8f8;
  min-height: 0;
  min-width: 250px;
}

html.dark-mode .demo-view-overlay .demo-chat-messages {
  background: #252525;
}

.demo-view-overlay .demo-msg-user,
.demo-view-overlay .demo-msg-bot {
  padding: 0.625rem 0.875rem;
  border-radius: 0.625rem;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 0.7rem;
  line-height: 1.5;
  max-width: 90%;
}

/* Thinking container inside chat messages */
.demo-view-overlay .demo-chat-messages .thinking-container,
.demo-chat-container .demo-chat-messages .thinking-container {
  align-self: stretch;
  font-size: 0.8125rem;
}

.demo-view-overlay .demo-chat-messages .thinking-container .steps-list,
.demo-chat-container .demo-chat-messages .thinking-container .steps-list {
  font-size: 0.60rem;
  font-weight: 200;
}

/* Persistent neural node in demo chat - blends with chat */
.demo-view-overlay .chat-persistent-node-wrapper,
.demo-chat-container .chat-persistent-node-wrapper {
  padding: 8px 1rem;
  border: none;
  background: #f8f8f8;
}

html.dark-mode .demo-view-overlay .chat-persistent-node-wrapper,
html.dark-mode .demo-chat-container .chat-persistent-node-wrapper {
  background: #252525;
}

.demo-view-overlay .demo-msg-user {
  background: #b2b2b2b5;
  color: #000000;
  align-self: flex-end;
  margin-left: auto;
}

.demo-view-overlay .demo-msg-bot {
  background: #e8e8e8;
  color: #333;
  align-self: flex-start;
}

html.dark-mode .demo-view-overlay .demo-msg-bot {
  background: #333;
  color: var(--text-primary);
}

html.dark-mode .demo-view-overlay .demo-msg-user {
  background: #156082;
}

html.dark-mode .demo-view-overlay .demo-msg-user p {
  color: #fff;
}

.demo-view-overlay .demo-msg-user p {
  margin: 0;
  color: #232323;
}

.demo-view-overlay .demo-msg-bot p {
  margin: 0;
}

.demo-view-overlay .demo-ready-prompt {
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, rgba(21, 96, 130, 0.1) 0%, rgba(21, 96, 130, 0.08) 100%);
  border: 1px dashed rgba(21, 96, 130, 0.3);
  border-radius: 0.5rem;
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 0.66rem;
  line-height: 1.5;
  color: #156082;
  margin-top: 0.5rem;
  font-weight: 300;
  font-size: 0.7rem;
  line-height: 1.5;
  color: #156082;
  margin-top: 0.5rem;
}

html.dark-mode .demo-view-overlay .demo-ready-prompt {
  background: linear-gradient(135deg, rgba(21, 96, 130, 0.15) 0%, rgba(21, 96, 130, 0.1) 100%);
  border-color: rgba(21, 96, 130, 0.4);
}

.demo-view-overlay .demo-ready-prompt strong {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
}

.demo-view-overlay .demo-chat-titlebar {
  flex-shrink: 0;
  height: 30px;
  background: #e8e8e8;
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 8px;
  user-select: none;
}

html.dark-mode .demo-view-overlay .demo-chat-titlebar {
  background: #2d2d2d;
}

.demo-view-overlay .demo-chat-titlebar-text {
  font-family: 'Inter Display', 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 500;
  color: #333;
}

html.dark-mode .demo-view-overlay .demo-chat-titlebar-text {
  color: var(--text-primary);
}

.demo-view-overlay .demo-chat-titlebar-btns {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 5px;
}

.demo-view-overlay .demo-titlebar-btn {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
}

.demo-view-overlay .demo-titlebar-btn.settings {
  background: transparent;
  color: #666;
  font-size: 0.7rem;
  width: auto;
  height: auto;
  padding: 2px 4px;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.demo-view-overlay .demo-titlebar-btn.settings:hover {
  background: rgba(0,0,0,0.08);
  color: #333;
}

html.dark-mode .demo-view-overlay .demo-titlebar-btn.settings {
  color: #888;
}

html.dark-mode .demo-view-overlay .demo-titlebar-btn.settings:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.demo-view-overlay .demo-titlebar-btn.min { background: #f5c542; }
.demo-view-overlay .demo-titlebar-btn.max { background: #5dc65d; }
.demo-view-overlay .demo-titlebar-btn.max:disabled {
  background: #a0d4a0;
  opacity: 0.5;
  cursor: not-allowed;
}

/* Close button - always disabled (decorative) */
.demo-view-overlay .demo-titlebar-btn.close { 
  background: #f25656;
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Chat box min/max buttons are decorative (disabled) - only revit-box has functional ones */
/* Exception: View 8 (specWritingOverlay) has functional min/max buttons */
.demo-view-overlay .demo-chat-box .demo-titlebar-btn.min,
.demo-view-overlay .demo-chat-box .demo-titlebar-btn.max {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* View 8: Enable min/max buttons for spec builder */
#specWritingOverlay .demo-chat-box .demo-titlebar-btn.min,
#specWritingOverlay .demo-chat-box .demo-titlebar-btn.max {
  opacity: 1 !important;
  cursor: pointer !important;
  pointer-events: auto !important;
}

.demo-view-overlay .demo-chat-input-row {
  padding: 0.75rem 1rem;
  background: #fff;
  border-top: 1px solid rgba(0,0,0,0.06);
  display: flex;
  gap: 0.625rem;
}

html.dark-mode .demo-view-overlay .demo-chat-input-row {
  background: var(--bg-tertiary);
  border-top-color: rgba(255,255,255,0.06);
}

.demo-view-overlay .demo-chat-input {
  flex: 1;
  padding: 0.625rem 0.875rem;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 400;
  outline: none;
  background: #fafafa;
}

html.dark-mode .demo-view-overlay .demo-chat-input {
  background: #2a2a2a;
  border-color: #3a3a3a;
  color: var(--text-primary);
}

.demo-view-overlay .demo-chat-send {
  padding: 0.625rem 1.125rem;
  background: #156082;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}

.demo-view-overlay .demo-chat-send:hover {
  background: #0056D6;
}

/* ============================================
   CURSOR-STYLE CHAT INPUT
   ============================================ */

.demo-chat-input-row.cursor-style {
  padding: 0.5rem 0.75rem;
  background: #fff;
  border-top: 1px solid rgba(0,0,0,0.06);
}

html.dark-mode .demo-chat-input-row.cursor-style {
  background: var(--bg-tertiary);
  border-top-color: rgba(255,255,255,0.06);
}

.demo-chat-input-row.cursor-style .chat-input-wrapper {
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 10px 12px;
  width: 100%;
}

html.dark-mode .demo-chat-input-row.cursor-style .chat-input-wrapper {
  background: #2a2a2a;
  border-color: #3a3a3a;
}

/* Editable placeholder text - not a text box */
.demo-chat-input-row.cursor-style .chat-input-placeholder {
  display: block;
  width: 100%;
  min-height: 1.2em;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 400;
  color: #333;
  outline: none;
  margin-bottom: 10px;
  cursor: text;
}

.demo-chat-input-row.cursor-style .chat-input-placeholder:empty::before {
  content: attr(data-placeholder);
  color: #999;
}

html.dark-mode .demo-chat-input-row.cursor-style .chat-input-placeholder {
  color: var(--text-primary);
}

html.dark-mode .demo-chat-input-row.cursor-style .chat-input-placeholder:empty::before {
  color: #666;
}

.demo-chat-input-row.cursor-style .chat-input-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.demo-chat-input-row.cursor-style .chat-input-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Agent dropdown */
.demo-chat-input-row.cursor-style .chat-agent-dropdown,
.demo-chat-input-row.cursor-style .chat-build-dropdown {
  position: relative;
}

.demo-chat-input-row.cursor-style .chat-agent-badge {
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.demo-chat-input-row.cursor-style .chat-build-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  font-weight: 400;
  color: #888;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.demo-chat-input-row.cursor-style .dropdown-arrow {
  font-size: 0.5rem;
  opacity: 0.7;
}

html.dark-mode .demo-chat-input-row.cursor-style .chat-agent-badge {
  color: #999;
}

html.dark-mode .demo-chat-input-row.cursor-style .chat-build-label {
  color: #777;
}

/* Dropdown menus */
.demo-chat-input-row.cursor-style .chat-dropdown-menu {
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 6px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  min-width: 160px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 100;
}

.demo-chat-input-row.cursor-style .chat-agent-dropdown:hover .chat-dropdown-menu,
.demo-chat-input-row.cursor-style .chat-build-dropdown:hover .chat-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

html.dark-mode .demo-chat-input-row.cursor-style .chat-dropdown-menu {
  background: #2a2a2a;
  border-color: #3a3a3a;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.demo-chat-input-row.cursor-style .dropdown-item {
  padding: 6px 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  font-weight: 400;
  color: #333;
  cursor: pointer;
  transition: background 0.1s ease;
  position: relative;
}

.demo-chat-input-row.cursor-style .dropdown-item:hover {
  background: #f0f0f0;
}

html.dark-mode .demo-chat-input-row.cursor-style .dropdown-item {
  color: #ccc;
}

html.dark-mode .demo-chat-input-row.cursor-style .dropdown-item:hover {
  background: #3a3a3a;
}

.demo-chat-input-row.cursor-style .dropdown-item:first-child {
  border-radius: 5px 5px 0 0;
}

.demo-chat-input-row.cursor-style .dropdown-item:last-child {
  border-radius: 0 0 5px 5px;
}

/* Submenu for LLM options */
.demo-chat-input-row.cursor-style .dropdown-item.has-submenu::after {
  content: '›';
  position: absolute;
  right: 8px;
  opacity: 0.5;
}

.demo-chat-input-row.cursor-style .chat-submenu {
  position: absolute;
  left: 100%;
  top: 0;
  margin-left: 4px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  min-width: 100px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s;
}

.demo-chat-input-row.cursor-style .dropdown-item.has-submenu:hover .chat-submenu {
  opacity: 1;
  visibility: visible;
}

html.dark-mode .demo-chat-input-row.cursor-style .chat-submenu {
  background: #2a2a2a;
  border-color: #3a3a3a;
}

/* Dropdown section headers */
.demo-chat-input-row.cursor-style .dropdown-section-header {
  padding: 6px 10px 4px;
  font-family: 'Inter', sans-serif;
  font-size: 0.55rem;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

html.dark-mode .demo-chat-input-row.cursor-style .dropdown-section-header {
  color: #666;
}

.demo-chat-input-row.cursor-style .dropdown-divider {
  height: 1px;
  background: #e8e8e8;
  margin: 4px 0;
}

html.dark-mode .demo-chat-input-row.cursor-style .dropdown-divider {
  background: #3a3a3a;
}

/* LLM toggle row */
.demo-chat-input-row.cursor-style .llm-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.demo-chat-input-row.cursor-style .llm-toggle {
  position: relative;
  width: 28px;
  height: 16px;
  display: inline-block;
}

.demo-chat-input-row.cursor-style .llm-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.demo-chat-input-row.cursor-style .toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #ccc;
  border-radius: 16px;
  transition: background 0.2s ease;
}

.demo-chat-input-row.cursor-style .toggle-slider::before {
  content: '';
  position: absolute;
  height: 12px;
  width: 12px;
  left: 2px;
  bottom: 2px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.demo-chat-input-row.cursor-style .llm-toggle input:checked + .toggle-slider {
  background: #156082;
}

.demo-chat-input-row.cursor-style .llm-toggle input:checked + .toggle-slider::before {
  transform: translateX(12px);
}

html.dark-mode .demo-chat-input-row.cursor-style .toggle-slider {
  background: #555;
}

html.dark-mode .demo-chat-input-row.cursor-style .llm-toggle input:checked + .toggle-slider {
  background: #4a9bb8;
}

/* Disabled LLM options */
.demo-chat-input-row.cursor-style .dropdown-item.llm-option.disabled {
  color: #ccc;
  cursor: not-allowed;
  pointer-events: none;
}

html.dark-mode .demo-chat-input-row.cursor-style .dropdown-item.llm-option.disabled {
  color: #555;
}

.demo-chat-input-row.cursor-style .dropdown-item.llm-option.enabled {
  color: #333;
  cursor: pointer;
  pointer-events: auto;
}

html.dark-mode .demo-chat-input-row.cursor-style .dropdown-item.llm-option.enabled {
  color: #ccc;
}

/* Model dropdown */
.demo-chat-input-row.cursor-style .chat-model-dropdown {
  position: relative;
}

.demo-chat-input-row.cursor-style .chat-model-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  font-weight: 400;
  color: #888;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

html.dark-mode .demo-chat-input-row.cursor-style .chat-model-label {
  color: #777;
}

/* Model display brand formatting in label */
.demo-chat-input-row.cursor-style .chat-model-label .model-display {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-family: 'Gotham', 'Inter', sans-serif;
}

.demo-chat-input-row.cursor-style .chat-model-label .brand-build {
  font-weight: 500;
  color: #333;
}

.demo-chat-input-row.cursor-style .chat-model-label .brand-variant {
  font-weight: 500;
  color: #156082;
}

.demo-chat-input-row.cursor-style .chat-model-label .brand-dot {
  color: #333;
}

.demo-chat-input-row.cursor-style .chat-model-label .model-version-display {
  font-family: 'Inter', sans-serif;
  font-size: 0.55rem;
  color: #888;
  margin-left: 2px;
}

html.dark-mode .demo-chat-input-row.cursor-style .chat-model-label .brand-build {
  color: #ccc;
}

html.dark-mode .demo-chat-input-row.cursor-style .chat-model-label .brand-variant {
  color: #4a9bb8;
}

html.dark-mode .demo-chat-input-row.cursor-style .chat-model-label .brand-dot {
  color: #ccc;
}

html.dark-mode .demo-chat-input-row.cursor-style .chat-model-label .model-version-display {
  color: #666;
}

.demo-chat-input-row.cursor-style .chat-model-dropdown:hover .chat-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Mode toggle rows - Cursor style */
.demo-chat-input-row.cursor-style .mode-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
}

.demo-chat-input-row.cursor-style .mode-info {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

/* Mode tooltip - positioned above menu */
.demo-chat-input-row.cursor-style .mode-tooltip {
  display: none;
  position: fixed;
  bottom: auto;
  top: auto;
  left: 50%;
  transform: translateX(-50%);
  margin-top: -60px;
  padding: 8px 10px;
  background: #333;
  color: #fff;
  font-size: 0.55rem;
  font-weight: 400;
  line-height: 1.4;
  border-radius: 6px;
  white-space: normal;
  width: 180px;
  z-index: 400;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  pointer-events: none;
}

.demo-chat-input-row.cursor-style .mode-toggle-row:hover .mode-tooltip {
  display: block;
}

html.dark-mode .demo-chat-input-row.cursor-style .mode-tooltip {
  background: #1a1a1a;
}

.demo-chat-input-row.cursor-style .mode-icon {
  font-size: 0.75rem;
  color: #666;
  width: 16px;
  text-align: center;
}

.demo-chat-input-row.cursor-style .mode-name {
  font-size: 0.65rem;
  color: #333;
}

.demo-chat-input-row.cursor-style .mode-shortcut {
  font-size: 0.55rem;
  color: #999;
  margin-left: 8px;
}

html.dark-mode .demo-chat-input-row.cursor-style .mode-icon {
  color: #888;
}

html.dark-mode .demo-chat-input-row.cursor-style .mode-name {
  color: #ccc;
}

html.dark-mode .demo-chat-input-row.cursor-style .mode-shortcut {
  color: #666;
}

/* Mode toggle switch */
.demo-chat-input-row.cursor-style .mode-toggle {
  position: relative;
  width: 28px;
  height: 16px;
  display: inline-block;
}

.demo-chat-input-row.cursor-style .mode-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.demo-chat-input-row.cursor-style .mode-toggle .toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #ccc;
  border-radius: 16px;
  transition: background 0.2s ease;
}

.demo-chat-input-row.cursor-style .mode-toggle .toggle-slider::before {
  content: '';
  position: absolute;
  height: 12px;
  width: 12px;
  left: 2px;
  bottom: 2px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.demo-chat-input-row.cursor-style .mode-toggle input:checked + .toggle-slider {
  background: #156082;
}

.demo-chat-input-row.cursor-style .mode-toggle input:checked + .toggle-slider::before {
  transform: translateX(12px);
}

html.dark-mode .demo-chat-input-row.cursor-style .mode-toggle .toggle-slider {
  background: #555;
}

html.dark-mode .demo-chat-input-row.cursor-style .mode-toggle input:checked + .toggle-slider {
  background: #4a9bb8;
}

/* LLM Mode warning tooltip */
.demo-chat-input-row.cursor-style .llm-toggle-row[title] {
  position: relative;
}

.demo-chat-input-row.cursor-style .llm-toggle-row[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  margin-bottom: 8px;
  padding: 8px 10px;
  background: #333;
  color: #fff;
  font-size: 0.55rem;
  line-height: 1.4;
  border-radius: 6px;
  white-space: normal;
  z-index: 200;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

html.dark-mode .demo-chat-input-row.cursor-style .llm-toggle-row[title]:hover::after {
  background: #1a1a1a;
}

/* Model option with brand styling - column aligned */
.demo-chat-input-row.cursor-style .model-option {
  display: grid;
  grid-template-columns: auto 30px 20px;
  align-items: center;
  gap: 4px;
}

.demo-chat-input-row.cursor-style .model-name-brand {
  font-family: 'Gotham', 'Inter', sans-serif;
  font-weight: 500;
}

.demo-chat-input-row.cursor-style .brand-build {
  color: #000;
}

.demo-chat-input-row.cursor-style .brand-variant {
  color: #156082;
}

.demo-chat-input-row.cursor-style .brand-dot {
  color: #000;
}

.demo-chat-input-row.cursor-style .model-version {
  font-family: 'Inter', sans-serif;
  font-size: 0.6rem;
  color: #888;
  text-align: right;
}

html.dark-mode .demo-chat-input-row.cursor-style .brand-build {
  color: #fff;
}

html.dark-mode .demo-chat-input-row.cursor-style .brand-variant {
  color: #4a9bb8;
}

html.dark-mode .demo-chat-input-row.cursor-style .brand-dot {
  color: #fff;
}

html.dark-mode .demo-chat-input-row.cursor-style .model-version {
  color: #666;
}

/* Model tick mark - right aligned in column */
.demo-chat-input-row.cursor-style .model-tick {
  color: transparent;
  font-size: 0.65rem;
  text-align: center;
}

.demo-chat-input-row.cursor-style .model-option.active .model-tick {
  color: #156082;
}

html.dark-mode .demo-chat-input-row.cursor-style .model-option.active .model-tick {
  color: #4a9bb8;
}

/* Model tooltips - positioned above menu */
.demo-chat-input-row.cursor-style .model-tooltip {
  display: none;
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  margin-top: -60px;
  padding: 8px 10px;
  background: #333;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.55rem;
  font-weight: 400;
  line-height: 1.4;
  border-radius: 6px;
  white-space: normal;
  width: 180px;
  z-index: 400;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  pointer-events: none;
}

.demo-chat-input-row.cursor-style .model-option {
  position: relative;
}

.demo-chat-input-row.cursor-style .model-option:hover .model-tooltip {
  display: block;
}

html.dark-mode .demo-chat-input-row.cursor-style .model-tooltip {
  background: #1a1a1a;
}

/* Send button and meeting button row */
.demo-chat-input-row.cursor-style .chat-input-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Active mode highlight on badge */
.demo-chat-input-row.cursor-style .chat-agent-badge.active-mode {
  background: rgba(21, 96, 130, 0.1);
  padding: 3px 8px;
  border-radius: 4px;
}

html.dark-mode .demo-chat-input-row.cursor-style .chat-agent-badge.active-mode {
  background: rgba(74, 155, 184, 0.15);
}

/* Share button in chat input */
.demo-chat-input-row.cursor-style .chat-share-btn {
  width: 20px;
  height: 20px;
  border: none;
  background: transparent;
  color: #999;
  font-size: 0.7rem;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
  position: relative;
}

.demo-chat-input-row.cursor-style .chat-share-btn:hover {
  color: #666;
}

html.dark-mode .demo-chat-input-row.cursor-style .chat-share-btn {
  color: #666;
}

html.dark-mode .demo-chat-input-row.cursor-style .chat-share-btn:hover {
  color: #999;
}

/* Share button tooltip */
.demo-chat-input-row.cursor-style .chat-share-btn[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  right: 0;
  margin-bottom: 8px;
  padding: 8px 10px;
  background: #333;
  color: #fff;
  font-size: 0.55rem;
  line-height: 1.4;
  border-radius: 6px;
  white-space: normal;
  width: 160px;
  z-index: 200;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

html.dark-mode .demo-chat-input-row.cursor-style .chat-share-btn[title]:hover::after {
  background: #1a1a1a;
}

/* Meeting mode button */
.demo-chat-input-row.cursor-style .chat-meeting-btn {
  width: 20px;
  height: 20px;
  border: none;
  background: transparent;
  color: #999;
  font-size: 0.7rem;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
  position: relative;
}

.demo-chat-input-row.cursor-style .chat-meeting-btn:hover {
  color: #666;
}

.demo-chat-input-row.cursor-style .chat-meeting-btn.active {
  color: #156082;
}

html.dark-mode .demo-chat-input-row.cursor-style .chat-meeting-btn {
  color: #666;
}

html.dark-mode .demo-chat-input-row.cursor-style .chat-meeting-btn:hover {
  color: #999;
}

html.dark-mode .demo-chat-input-row.cursor-style .chat-meeting-btn.active {
  color: #4a9bb8;
}

/* Meeting button tooltip */
.demo-chat-input-row.cursor-style .chat-meeting-btn[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  right: 0;
  margin-bottom: 8px;
  padding: 8px 10px;
  background: #333;
  color: #fff;
  font-size: 0.55rem;
  line-height: 1.4;
  border-radius: 6px;
  white-space: normal;
  width: 180px;
  z-index: 200;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

html.dark-mode .demo-chat-input-row.cursor-style .chat-meeting-btn[title]:hover::after {
  background: #1a1a1a;
}

/* Send button - small circular up arrow */
.demo-chat-input-row.cursor-style .chat-send-btn {
  width: 20px;
  height: 20px;
  border: none;
  background: #333;
  color: #fff;
  font-size: 0.7rem;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
  line-height: 1;
}

.demo-chat-input-row.cursor-style .chat-send-btn:hover {
  background: #555;
}

html.dark-mode .demo-chat-input-row.cursor-style .chat-send-btn {
  background: #555;
  color: #fff;
}

html.dark-mode .demo-chat-input-row.cursor-style .chat-send-btn:hover {
  background: #666;
}

/* Revit container */
.demo-view-overlay .demo-revit-box {
  width: 100%;
  height: 100%;
  max-width: 100%;
  aspect-ratio: 1 / 0.85;
  background: #f0f0f0;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.demo-view-overlay .demo-revit-titlebar .demo-titlebar-btn {
  cursor: pointer;
}

html.dark-mode .demo-view-overlay .demo-revit-box {
  background: #1e1e1e;
  box-shadow: 0 4px 16px rgba(0,0,0,0.30);
}

/* Expanded state - fixed position, same height, stretched left */
.demo-view-overlay .demo-revit-box.expanded {
  position: fixed;
  z-index: 1000;
}

.demo-view-overlay .demo-revit-box.expanded .demo-revit-titlebar {
  cursor: default;
}

/* Titlebar text doesn't need pointer events */
.demo-view-overlay .demo-revit-box.expanded .demo-revit-titlebar-text {
  pointer-events: none;
}

/* Buttons container and buttons need pointer events */
.demo-view-overlay .demo-revit-box.expanded .demo-revit-titlebar-btns {
  pointer-events: auto;
  position: relative;
  z-index: 10;
}

.demo-view-overlay .demo-revit-box.expanded .demo-titlebar-btn {
  cursor: pointer;
  pointer-events: auto;
}

.demo-view-overlay .demo-revit-box.expanded .demo-titlebar-btn.min:hover {
  transform: scale(1.1);
}

.demo-view-overlay .demo-revit-box.expanded .demo-titlebar-btn.max:hover:not(:disabled) {
  transform: scale(1.1);
}

.demo-view-overlay .demo-revit-titlebar {
  flex-shrink: 0;
  height: 30px;
  background: #e8e8e8;
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 8px;
  user-select: none;
}

html.dark-mode .demo-view-overlay .demo-revit-titlebar {
  background: #2d2d2d;
}

.demo-view-overlay .demo-revit-titlebar-text {
  font-family: 'Inter Display', 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 500;
  color: #333;
}

html.dark-mode .demo-view-overlay .demo-revit-titlebar-text {
  color: var(--text-primary);
}

.demo-view-overlay .demo-revit-titlebar-btns {
  margin-left: auto;
  display: flex;
  gap: 5px;
}

.demo-view-overlay .demo-revit-content {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #f8f8f8;
}

html.dark-mode .demo-view-overlay .demo-revit-content {
  background: #252525;
}

.demo-view-overlay .demo-revit-content img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.demo-view-overlay .demo-revit-content img.playing {
  opacity: 1;
}

/* Video poster - height fixed, width based on aspect ratio, centered */
.demo-view-overlay .demo-revit-content .video-poster {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  width: auto;
  opacity: 1;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.demo-view-overlay .demo-revit-content .video-poster.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Video - height fixed, width based on aspect ratio, centered */
.demo-view-overlay .demo-revit-content video {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  width: auto;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.demo-view-overlay .demo-revit-content video.ready {
  opacity: 1;
}

/* Coming Soon Overlay in Revit Content - for demos not yet available */
.demo-revit-content.coming-soon-gif {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(21, 96, 130, 0.1), rgba(26, 122, 168, 0.05));
}

.demo-revit-content .coming-soon-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  z-index: 5;
}

/* Video Loading Overlay - elegant node with ring over video */
.video-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0s 0.4s;
  z-index: 10;
}

.video-loading-overlay.active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0s;
}

.video-loading-overlay.shine .loading-node {
  animation: loadingShine 0.6s ease-out forwards;
}

@keyframes loadingShine {
  0% { 
    transform: scale(1);
    filter: brightness(1);
  }
  50% { 
    transform: scale(1.2);
    filter: brightness(1.5) drop-shadow(0 0 20px rgba(0, 122, 255, 0.8));
  }
  100% { 
    transform: scale(0.8);
    opacity: 0;
  }
}

.loading-node {
  position: relative;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.loading-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.3);
  stroke-width: 2;
}

.loading-ring-progress {
  fill: none;
  stroke: #fff;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 125.6;
  stroke-dashoffset: 125.6;
  transition: stroke-dashoffset 0.1s ease-out;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.6));
}

.loading-node-dot {
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
  animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {
  0%, 100% { 
    transform: scale(1); 
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
  }
  50% { 
    transform: scale(1.15); 
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.8);
  }
}

.demo-view-overlay .demo-revit-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #999;
  background: rgba(248, 248, 248, 0.85);
  z-index: 5;
}

html.dark-mode .demo-view-overlay .demo-revit-placeholder {
  color: #555;
  background: rgba(37, 37, 37, 0.85);
}

.demo-view-overlay .demo-revit-placeholder-icon {
  font-size: 32px;
  margin-bottom: 8px;
  opacity: 0.4;
}

.demo-view-overlay .demo-revit-placeholder-text {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
}

/* Open Chat Button */
.open-chat-btn {
  position: absolute;
  bottom: 30px;
  left: 30px;
  padding: 12px 24px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: white;
  background: #156082;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 10;
  overflow: hidden;
}

.open-chat-btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 40%,
    rgba(255,255,255,0.4) 50%,
    transparent 60%
  );
  transform: translateX(-100%);
  animation: btn-shine 2.5s ease-in-out infinite;
}

.open-chat-btn.clicked::before {
  animation: none;
  opacity: 0;
}

@keyframes btn-shine {
  0% {
    transform: translateX(-100%);
  }
  50%, 100% {
    transform: translateX(100%);
  }
}

.open-chat-btn:hover {
  background: #0056D6;
  transform: scale(1.02);
}

.open-chat-btn-panel {
  position: relative;
  bottom: auto;
  left: auto;
  margin-top: 0;
}

.view3-buttons {
  display: flex;
  gap: 12px;
  margin-top: 25px;
}

.view3-buttons .open-chat-btn,
.view3-section .open-chat-btn {
  position: relative;
  bottom: auto;
  left: auto;
  cursor: pointer;
}

.open-chat-btn.secondary-btn {
  background: #6c757d;
}

.open-chat-btn.secondary-btn::before {
  display: none;
}

.open-chat-btn.secondary-btn:hover {
  background: #5a6268;
}

html.dark-mode .open-chat-btn {
  background: #156082;
}

html.dark-mode .open-chat-btn.secondary-btn {
  background: #6c757d;
}

html.dark-mode .open-chat-btn.secondary-btn:hover {
  background: #5a6268;
}

html.dark-mode .open-chat-btn:hover {
  background: #0056D6;
}

/* View 3: Right Panel Background - REMOVED (unused) */

/* Note: gif-title, view3-panel-bg, view7-panel-bg, view8-buildx-panel,
   buildx-*-home, build-x-title, build-x-subtitle, build-grid-12, 
   grid-cell, build-grid-item classes were removed - not used in any active HTML */

/* ~870 lines of unused CSS removed: view3-panel-bg, view7-panel-bg, view8-buildx-panel, buildx-*-home, build-x-*, build-grid-*, grid-cell styles */

/* ============================================
   VIEW 9: About Us Panel
   ============================================ */
.about-us-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1003;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.5s ease, visibility 0s linear 0.5s;
}

.about-us-panel.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: none;
  transition: opacity 0.5s ease, visibility 0s linear 0s;
}

.about-us-content {
  pointer-events: auto;
  display: flex;
  width: 100%;
  height: 100%;
  gap: 0;
  align-items: stretch;
}

.about-us-left {
  flex: 0 0 40%;
  padding: 0 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  max-width: 40%;
}

.about-us-inner {
  max-width: 400px;
}

.about-us-tagline {
  font-family: 'Inter Display', 'Inter', sans-serif;
  font-size: 44px;
  font-weight: 500;
  color: #000;
  margin-bottom: 24px;
  line-height: 1.3;
}

html.dark-mode .about-us-tagline {
  color: var(--text-primary);
}

.about-us-text {
  max-width: 475px;
}

.about-us-title {
  font-family: 'Inter Display', 'Inter', sans-serif;
  font-size: 22px;
  font-weight: 300;
  letter-spacing: normal;
  color: #333;
  margin-bottom: 0;
}

.about-us-title .teal {
  color: #000000;
}

.about-us-text {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.8;
  color: #555;
  text-align: justify;
}

.about-us-text p {
  margin-bottom: 18px;
}

.about-us-text p:last-child {
  margin-bottom: 0;
}

html.dark-mode .about-us-title {
  color: var(--text-primary);
}

html.dark-mode .about-us-title .teal {
  color: var(--teal);
}

html.dark-mode .about-us-text {
  color: #aaa;
}

.about-us-right {
  flex: 0 0 60%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  height: 100%;
}

.team-members-container {
  display: flex;
  height: 60vh;
  width: 100%;
}

.team-member {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  flex: 1;
  height: 100%;
  border-radius: 0;
  transition: flex 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
              z-index 0s,
              box-shadow 0.4s ease;
  z-index: 1;
}

.team-member:hover {
  flex: 2;
  z-index: 10;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.team-member-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(180deg, #e0e0e0 0%, #c0c0c0 100%);
  transition: filter 0.3s ease;
}

html.dark-mode .team-member-image {
  background: linear-gradient(180deg, #3a3a3a 0%, #252525 100%);
}

.team-member:hover .team-member-image {
  filter: brightness(0.75);
}

.team-member-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease 0.1s, transform 0.3s ease 0.1s;
}

.team-member:hover .team-member-overlay {
  opacity: 1;
  transform: translateY(0);
}

.team-member-name {
  font-family: 'Gotham', 'Century Gothic', 'AppleGothic', sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 1px;
  color: #fff;
  margin-bottom: 4px;
  white-space: nowrap;
}

.team-member-role {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 300;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
  margin-bottom: 8px;
}

.team-member-duties {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 300;
  line-height: 1.5;
  color: rgba(255,255,255,0.85);
  max-width: 200px;
}

/* Unified BUILD item styling - Gotham Medium 20px 2pt spacing */
.build-item {
  font-family: 'Gotham', 'Century Gothic', 'AppleGothic', sans-serif;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 2pt;
  color: #444;
  padding: 8px 0;
  cursor: default;
  pointer-events: auto;
  white-space: nowrap;
}

.build-item:hover {
  color: #156082;
}

.build-item .teal {
  color: var(--teal);
}

.build-item .desc {
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 1px;
  color: #888;
}

html.dark-mode .build-item {
  color: #ccc;
}

html.dark-mode .build-item:hover {
  color: #4a9bb8;
}


html.dark-mode .build-item .desc {
  color: #666;
}

/* Floating Draggable Chat Container - matches demos.html style */
.demo-chat-container {
  position: fixed;
  top: 50%;
  left: 22.5%;
  right: auto;
  transform: translate(-50%, -50%) scale(0.3);
  transform-origin: center center;
  width: 420px;
  height: 500px;
  min-width: 280px;
  max-width: 700px;
  min-height: 250px;
  background: #f8f8f8;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

html.dark-mode .demo-chat-container {
  background: #252525;
  box-shadow: 0 4px 16px rgba(0,0,0,0.30);
}

.demo-chat-container.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.demo-chat-container.dragging {
  transition: none;
  transform: none;
  left: auto;
}

/* Titlebar - matches demos.html exactly */
.demo-chat-container .demo-chat-titlebar {
  flex-shrink: 0;
  height: 30px;
  background: #e8e8e8;
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 8px;
  cursor: move;
  user-select: none;
  border-radius: 10px 10px 0 0;
}

html.dark-mode .demo-chat-container .demo-chat-titlebar {
  background: #2d2d2d;
}

.demo-chat-container .demo-chat-titlebar-text {
  font-family: 'Inter Display', 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: #333;
}

html.dark-mode .demo-chat-container .demo-chat-titlebar-text {
  color: var(--text-primary);
}

.demo-chat-container .demo-chat-titlebar-btns {
  margin-left: auto;
  display: flex;
  gap: 6px;
}

.demo-chat-container .demo-titlebar-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
}

/* Chat container titlebar buttons - all disabled (decorative) */
.demo-chat-container .demo-titlebar-btn.min { 
  background: #f5c542;
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
.demo-chat-container .demo-titlebar-btn.max { 
  background: #5dc65d;
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
.demo-chat-container .demo-titlebar-btn.close { 
  background: #f25656;
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.demo-chat-body {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: row;
}

/* Inline option buttons in chat body */
.demo-inline-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.demo-option-btn {
  padding: 8px 16px;
  background: #156082;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.demo-option-btn:hover {
  background: #0e4560;
  transform: scale(1.02);
}

.demo-option-btn.active {
  background: #156082;
}

html.dark-mode .demo-option-btn {
  background: #156082;
}

html.dark-mode .demo-option-btn:hover {
  background: #0e4560;
}

html.dark-mode .demo-option-btn.active {
  background: #156082;
}

/* History sidebar within chat */
.demo-chat-history-sidebar {
  flex: 0 0 30%;
  background: #ececec;
  border-right: 1px solid rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

html.dark-mode .demo-chat-history-sidebar {
  background: #1e1e1e;
  border-right-color: rgba(255,255,255,0.06);
}

.demo-history-header {
  padding: 10px 12px;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

html.dark-mode .demo-history-header {
  color: #888;
  border-bottom-color: rgba(255,255,255,0.06);
}

.demo-history-list {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px;
}

.demo-history-item {
  padding: 10px 12px;
  margin-bottom: 4px;
  background: #e0e0e0;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: #555;
  cursor: pointer;
  transition: all 0.2s ease;
}

.demo-history-item:hover {
  background: #d5d5d5;
}

html.dark-mode .demo-history-item {
  background: var(--bg-tertiary);
  color: #aaa;
}

html.dark-mode .demo-history-item:hover {
  background: #333;
}

.demo-history-item.active {
  background: #aeaeae96;
  color: #000000;
}

html.dark-mode .demo-history-item.active {
  background: #4a4a4a96;
  color: #fff;
}

.demo-history-item-title {
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 0.125rem;
}

.demo-history-preview,
.demo-history-item-preview {
  font-size: 10px;
  opacity: 0.7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Chat main area */
.demo-chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Floating chat messages (demos page style) */
.demo-chat-container .demo-chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.demo-chat-container .demo-msg-user,
.demo-chat-container .demo-msg-bot {
  padding: 0.625rem 0.875rem;
  border-radius: 0.625rem;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 0.7rem;
  line-height: 1.5;
  max-width: 90%;
}

.demo-chat-container .demo-msg-user {
  background: #156082;
  color: #fff;
  align-self: flex-end;
  margin-left: auto;
}

.demo-chat-container .demo-msg-bot {
  background: #e8e8e8;
  color: #333;
  align-self: flex-start;
}

html.dark-mode .demo-chat-container .demo-msg-bot {
  background: #333;
  color: var(--text-primary);
}

.demo-chat-container .demo-msg-user p {
  margin: 0;
  color: #fff;
}

.demo-chat-container .demo-msg-bot p {
  margin: 0;
}

.demo-chat-container .demo-ready-prompt {
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, rgba(21, 96, 130, 0.1) 0%, rgba(21, 96, 130, 0.08) 100%);
  border: 1px dashed rgba(21, 96, 130, 0.3);
  border-radius: 0.5rem;
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 0.7rem;
  line-height: 1.5;
  color: #156082;
  margin-top: 0.5rem;
}

html.dark-mode .demo-chat-container .demo-ready-prompt {
  background: linear-gradient(135deg, rgba(21, 96, 130, 0.15) 0%, rgba(21, 96, 130, 0.1) 100%);
  border-color: rgba(21, 96, 130, 0.4);
}

.demo-chat-container .demo-ready-prompt strong {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
}

.demo-chat-container .demo-chat-input-row {
  padding: 0.75rem 1rem;
  background: #fff;
  border-top: 1px solid rgba(0,0,0,0.06);
  display: flex;
  gap: 0.625rem;
  flex-shrink: 0;
}

html.dark-mode .demo-chat-container .demo-chat-input-row {
  background: var(--bg-tertiary);
  border-top-color: rgba(255,255,255,0.06);
}

.demo-chat-container .demo-chat-input {
  flex: 1;
  padding: 0.625rem 0.875rem;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 400;
  outline: none;
  background: #fafafa;
}

html.dark-mode .demo-chat-container .demo-chat-input {
  background: #2a2a2a;
  border-color: #3a3a3a;
  color: var(--text-primary);
}

.demo-chat-container .demo-chat-send {
  padding: 0.625rem 1.125rem;
  background: #156082;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}

.demo-chat-container .demo-chat-send:hover {
  background: #0056D6;
}

.demo-chat-messages-area {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.chat-message {
  opacity: 0;
  animation: chatFadeIn 0.4s ease forwards;
}

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

.bot-message {
  background: white;
  padding: 12px 14px;
  border-radius: 10px;
}

.bot-message p {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 300;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: #333;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.user-message {
  background: #156082;
  padding: 10px 14px;
  border-radius: 10px;
  margin-left: 40px;
  align-self: flex-end;
}

.user-message p {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 300;
  line-height: 1.5;
  color: white;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Thinking animation in chat - matches View 2 neural node */
.chat-thinking {
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  overflow: hidden;
  min-width: 200px;
}

.chat-thinking-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease;
}

.chat-thinking-content.visible {
  max-height: 200px;
  opacity: 1;
}

.chat-thinking-content.collapsing {
  max-height: 0;
  opacity: 0;
}

.chat-thinking-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: #888;
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.chat-thinking-header.done {
  color: #666;
}

.chat-steps-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: #888;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.2s ease;
}

.chat-steps-list.expanded {
  max-height: 150px;
  opacity: 1;
}

.chat-steps-list li {
  padding: 3px 0;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transform: translateX(-5px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.chat-steps-list li.visible {
  opacity: 1;
  transform: translateX(0);
}

.chat-step-icon {
  color: #00a0a0;
  font-size: 8px;
}

.chat-thinking-node-wrapper {
  width: 100%;
  padding-top: 8px;
}

/* Persistent node wrapper - stays at bottom of chat */
.chat-persistent-node-wrapper {
  width: 100%;
  padding: 8px 0;
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

/* Node status text - stays in place on the left */
.chat-node-status {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.chat-node-status.active {
  opacity: 1;
}

.chat-node-status .status-text {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 400;
  color: #888;
  background: linear-gradient(
    90deg, 
    #888 0%, 
    #888 40%, 
    #fff 50%, 
    #888 60%, 
    #888 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: statusShine 2s ease-in-out infinite;
}

@keyframes statusShine {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

html.dark-mode .chat-node-status .status-text {
  background: linear-gradient(
    90deg, 
    #777 0%, 
    #777 40%, 
    #ccc 50%, 
    #777 60%, 
    #777 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: statusShine 2s ease-in-out infinite;
}

/* Complete state - solid text, no animation */
.chat-node-status.complete .status-text {
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  -webkit-text-fill-color: #666;
  animation: none;
}

html.dark-mode .chat-node-status.complete .status-text {
  -webkit-text-fill-color: #999;
}

/* Chat node - matches View 2 neural node exactly */
.chat-neural-node {
  position: relative;
  width: 20px;
  height: 20px;
  transform: scale(1);
  margin-left: calc(100% - 20px);
  transition: transform 0.4s ease-out, margin-left 0.4s ease-in-out;
}

.chat-neural-node.left {
  margin-left: 0;
}

.chat-node-core {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, #666 0%, #444 100%);
  border-radius: 50%;
  transition: all 0.5s ease;
}

.chat-node-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: rgba(0, 180, 180, 0);
  border-radius: 50%;
  filter: blur(3px);
  transition: all 0.5s ease;
}

.chat-node-pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border: 2px solid rgba(0, 180, 180, 0);
  border-radius: 50%;
  transition: border-color 0.5s ease;
}

/* Processing state - pulsing */
.chat-neural-node.processing .chat-node-core {
  background: linear-gradient(135deg, #1a7a9e 0%, #156082 100%);
  box-shadow: 0 0 6px rgba(21, 96, 130, 0.5);
}

.chat-neural-node.processing .chat-node-glow {
  width: 14px;
  height: 14px;
  background: rgba(21, 96, 130, 0.3);
}

.chat-neural-node.processing .chat-node-pulse-ring {
  border-color: rgba(21, 96, 130, 0.5);
  animation: chat-node-pulse 1.5s ease-out infinite;
}

@keyframes chat-node-pulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.7;
  }
  100% {
    transform: translate(-50%, -50%) scale(3);
    opacity: 0;
  }
}

html.dark-mode .chat-thinking {
  background: #3a3a3a;
}

html.dark-mode .chat-node-core {
  background: linear-gradient(135deg, #888 0%, #666 100%);
}

html.dark-mode .chat-neural-node.processing .chat-node-core {
  background: linear-gradient(135deg, #4a9bb8 0%, #1a7a9e 100%);
}

html.dark-mode .chat-thinking-header {
  color: #aaa;
  border-bottom-color: rgba(255,255,255,0.1);
}

html.dark-mode .chat-steps-list {
  color: #999;
}

/* Inline demo buttons in chat message */
.inline-demo-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.inline-demo-btn {
  padding: 8px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: white;
  background: #156082;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-shadow: none;
  box-shadow: none;
  position: relative;
  overflow: hidden;
}

.inline-demo-btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 40%,
    rgba(255,255,255,0.4) 50%,
    transparent 60%
  );
  transform: translateX(-100%);
  animation: btn-shine 2.5s ease-in-out infinite;
}

.inline-demo-btn:hover {
  background: #0e4560;
  transform: scale(1.02);
}

.inline-demo-btn.active {
  background: #0e4560;
}

.inline-demo-btn.active::before {
  animation: none;
  opacity: 0;
}

/* See output button - same style, slightly larger */
.see-output-btn {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

html.dark-mode .see-output-btn {
  background: #156082;
}

html.dark-mode .see-output-btn:hover {
  background: #0e4560;
}

.demo-chat-footer {
  padding: 10px 12px;
  background: white;
  border-top: 1px solid #e5e5e5;
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.demo-chat-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-family: 'Inter Display', 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 400;
  outline: none;
  transition: border-color 0.2s ease;
  background: #fafafa;
}

.demo-chat-input:focus {
  border-color: #156082;
}

.demo-chat-send-btn {
  padding: 10px 24px;
  background: #156082;
  color: white;
  border: none;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  position: relative;
  overflow: hidden;
}

.demo-chat-send-btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 40%,
    rgba(255,255,255,0.4) 50%,
    transparent 60%
  );
  transform: translateX(-100%);
  animation: btn-shine 2.5s ease-in-out infinite;
}

.demo-chat-send-btn:hover {
  background: #0e4560;
  transform: scale(1.02);
}

/* Invisible resize edges - match chat-panel.css exactly */
.resize-edge {
  position: absolute;
  background: transparent;
  z-index: 100;
}

.resize-edge-right {
  top: 0;
  right: 0;
  width: 6px;
  height: 100%;
  cursor: ew-resize;
}

.resize-edge-bottom {
  bottom: 0;
  left: 0;
  width: 100%;
  height: 6px;
  cursor: ns-resize;
}

.resize-edge-corner {
  bottom: 0;
  right: 0;
  width: 14px;
  height: 14px;
  cursor: nwse-resize;
}

.resize-edge-left {
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  cursor: ew-resize;
}

.resize-edge-top {
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  cursor: ns-resize;
}

.resize-edge-corner-tl {
  top: 0;
  left: 0;
  width: 14px;
  height: 14px;
  cursor: nwse-resize;
}

.resize-edge-corner-tr {
  top: 0;
  right: 0;
  width: 14px;
  height: 14px;
  cursor: nesw-resize;
}

.resize-edge-corner-bl {
  bottom: 0;
  left: 0;
  width: 14px;
  height: 14px;
  cursor: nesw-resize;
}

/* Dark mode for View 3 */
html.dark-mode .demo-chat-container {
  background: var(--bg-tertiary);
  border-color: rgba(136,136,136,0.15);
}

html.dark-mode .demo-chat-header {
  background: #333;
}

html.dark-mode .demo-title-text {
  color: var(--text-primary);
}

html.dark-mode .demo-subtitle {
  color: #888;
}

html.dark-mode .demo-chat-body {
  background: var(--bg-tertiary);
}

html.dark-mode .bot-message {
  background: #3a3a3a;
}

html.dark-mode .bot-message p {
  color: var(--text-primary);
}

html.dark-mode .user-message {
  background: #156082;
}

html.dark-mode .user-message p {
  color: #1a1a1a;
}

html.dark-mode .chat-thinking {
  background: #3a3a3a;
}

html.dark-mode .thinking-text {
  color: #888;
}

html.dark-mode .inline-demo-btn {
  color: white;
  background: #156082;
}

html.dark-mode .inline-demo-btn:hover {
  background: #0e4560;
  color: white;
}

html.dark-mode .inline-demo-btn.active {
  background: #0e4560;
  color: white;
}

html.dark-mode .revit-demo-btn {
  background: #156082;
}

html.dark-mode .revit-demo-btn:hover {
  background: #0e4560;
}

html.dark-mode .demo-chat-footer {
  background: #333;
  border-top-color: #444;
}

html.dark-mode .demo-chat-input {
  background: #2a2a2a;
  border-color: #3a3a3a;
  color: var(--text-primary);
}

html.dark-mode .demo-chat-input:focus {
  border-color: #156082;
}

html.dark-mode .demo-chat-send-btn {
  background: #156082;
  color: white;
}

html.dark-mode .demo-chat-send-btn:hover {
  background: #0e4560;
  color: white;
  transform: scale(1.02);
}

/* MENUBAR - styles inherited from shared-styles.css */


/* ~680 lines of unused CSS removed: revit-background, revit-chat-embedded, revit-plan-*, revit-overlay, placeholder-panel-*, placeholder-chat-* styles */

/* ============================================
   VIEW 11: BUILD X - Full Page Layout
   ============================================ */
/* BUILD X overlay - let wheel events through to document for view navigation */
#buildXOverlay.visible {
  pointer-events: none; /* Let wheel events through */
}

/* All interactive content inside BUILD X overlay gets pointer-events */
#buildXOverlay.visible .buildx-ribbon-panel,
#buildXOverlay.visible .buildx-content,
#buildXOverlay.visible .buildx-site-footer,
#buildXOverlay.visible .buildx-package-btn,
#buildXOverlay.visible .buildx-signup-btn {
  pointer-events: auto;
}

.view-buildx {
  display: flex;
  width: 100%;
  height: 100%;
  background: #2a2a2a;
  position: relative;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  pointer-events: none; /* Let wheel events through to document handler */
}

/* Re-enable pointer events on direct children and all interactive elements */
.view-buildx > *,
.view-buildx .buildx-ribbon-content,
.view-buildx .buildx-panel-text,
.view-buildx .buildx-panel-list,
.view-buildx button,
.view-buildx a {
  pointer-events: auto;
}

/* Ribbon Panels - positioned inward like shoulder straps */
.buildx-ribbon-panel {
  position: absolute;
  top: 0;
  bottom: 15vh; /* Height of buildx-site-footer */
  width: 260px;
  background: rgba(20, 20, 20, 0.2);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 5;
  pointer-events: auto;
}

.buildx-ribbon-panel.left {
  left: 280px;
  background: rgba(20, 20, 20, 0.2);
}

.buildx-ribbon-panel.right {
  right: 280px;
  background: rgba(20, 20, 20, 0.2);
}

.buildx-ribbon-content {
  padding: 100px 20px 40px;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: auto;
  user-select: text;
}

.buildx-ribbon-panel.has-content .buildx-ribbon-content {
  opacity: 1;
}

.buildx-ribbon-panel * {
  user-select: text;
}

/* Center area */
.buildx-center-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  width: 100%;
}

/* Panel content styles */
.buildx-panel-header {
  margin-bottom: 20px;
}

.buildx-panel-name {
  font-family: 'Gotham Medium', 'Montserrat', Helvetica, Arial, sans-serif;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 2px;
  color: #fff;
  margin-bottom: 4px;
}

.buildx-panel-name .teal {
  color: #4a9bb8;
}

.buildx-panel-subtitle {
  font-family: 'Inter Display', 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 300;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.7);
  margin: 0;
}

.buildx-panel-section {
  margin-bottom: 18px;
}

.buildx-panel-section-title {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: #fff;
  margin: 0 0 8px 0;
}

.buildx-panel-text {
  font-family: 'Inter Display', 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.65;
  color: rgba(255,255,255,0.75);
}

.buildx-panel-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.buildx-panel-list li {
  font-family: 'Inter Display', 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.5;
  color: rgba(255,255,255,0.7);
  padding: 3px 0;
  padding-left: 12px;
  position: relative;
}

.buildx-panel-list li::before {
  content: '\2192';
  position: absolute;
  left: 0;
  color: #4a9bb8;
  font-size: 9px;
}

.buildx-panel-highlight {
  background: rgba(74, 155, 184, 0.1);
  border: 1px solid rgba(74, 155, 184, 0.25);
  border-radius: 6px;
  padding: 12px;
  margin-top: 14px;
}

.buildx-panel-highlight-title {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 600;
  color: #4a9bb8;
  margin-bottom: 5px;
}

.buildx-panel-highlight-text {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 300;
  line-height: 1.55;
  color: rgba(255,255,255,0.7);
}

/* Scrollbar styling for ribbon panels */
.buildx-ribbon-panel::-webkit-scrollbar {
  width: 4px;
}

.buildx-ribbon-panel::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.2);
}

.buildx-ribbon-panel::-webkit-scrollbar-thumb {
  background: rgba(74, 155, 184, 0.3);
  border-radius: 2px;
}

.buildx-ribbon-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(74, 155, 184, 0.5);
}

/* Active button state */
.buildx-package-btn.active {
  background: rgba(74, 155, 184, 0.25);
  border-color: #4a9bb8;
  box-shadow: 0 0 12px rgba(74, 155, 184, 0.3);
}

/* Main content container */
.buildx-content {
  text-align: center;
  max-width: 600px;
  padding: 40px;
}

/* Header section */
.buildx-header {
  margin-bottom: 50px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

#buildXOverlay.visible .buildx-header {
  opacity: 1;
  transform: translateY(0);
}

/* View 11 dark header - logo only, menubar uses html.dark-mode from shared-styles.css */
body.view-dark-header .logo {
  color: #e0e0e0;
}

body.view-dark-header .logo .ai {
  color: #156082;
}

.buildx-label {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 16px;
}

.buildx-title {
  font-family: 'Gotham Medium', 'Montserrat', Helvetica, Arial, sans-serif;
  font-size: 48px;
  font-weight: 500;
  letter-spacing: 2px;
  color: #fff;
  margin-bottom: 16px;
}

.buildx-title .teal {
  color: #4a9bb8;
}

.buildx-subtitle {
  font-family: 'Inter Display', 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 300;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
}

/* Package grid */
.buildx-packages-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
}

#buildXOverlay.visible .buildx-packages-grid {
  opacity: 1;
  transform: translateY(0);
}

/* Package buttons */
.buildx-package-btn {
  font-family: 'Gotham Medium', 'Montserrat', Helvetica, Arial, sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  color: #fff;
  cursor: pointer;
  outline: none;
  padding: 10px 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  transition: all 0.2s ease;
  text-decoration: none;
  display: block;
  text-align: center;
}

.buildx-package-btn:hover {
  background: rgba(74, 155, 184, 0.2);
  border-color: rgba(74, 155, 184, 0.5);
}

.buildx-package-btn .teal {
  color: #4a9bb8;
}

/* Centered row for BUILD D */
.buildx-centered-row {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
}

/* Featured BUILD X button */
.buildx-featured {
  grid-column: 1 / -1;
  width: 100%;
}

.buildx-package-btn.featured {
  width: 100%;
  font-size: 14px;
  padding: 14px 24px;
  background: linear-gradient(135deg, rgba(74, 155, 184, 0.12), rgba(21, 96, 130, 0.12));
  border-color: rgba(74, 155, 184, 0.35);
}

.buildx-package-btn.featured:hover {
  background: linear-gradient(135deg, rgba(74, 155, 184, 0.22), rgba(21, 96, 130, 0.22));
  border-color: rgba(74, 155, 184, 0.55);
}

/* Sign Up Buttons */
.buildx-signup-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 30px;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.6s ease 0.3s, transform 0.6s ease 0.3s;
}

#buildXOverlay.visible .buildx-signup-buttons {
  opacity: 1;
  transform: translateY(0);
}

.buildx-signup-btn {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 12px 28px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.buildx-signup-btn.primary {
  background: #156082;
  color: #fff;
  border: none;
}

.buildx-signup-btn.primary:hover {
  background: #0e4560;
  transform: scale(1.02);
}

.buildx-signup-btn.secondary {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
}

.buildx-signup-btn.secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.5);
}

/* Footer text */
.buildx-footer {
  opacity: 0;
  transition: opacity 0.6s ease 0.4s;
}

#buildXOverlay.visible .buildx-footer {
  opacity: 1;
}

.buildx-footer-text {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 300;
  color: rgba(255,255,255,0.35);
  line-height: 1.7;
}

/* Site footer embedded in BUILD X view - 15% of screen height */
.buildx-site-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 15vh;
  background: #2a2a2a;
  padding: 20px 0 15px;
  border-top: 1px solid rgba(255,255,255,0.1);
  opacity: 0;
  transition: opacity 0.6s ease 0.5s;
  z-index: 100;
  box-sizing: border-box;
  overflow: hidden;
}

#buildXOverlay.visible .buildx-site-footer {
  opacity: 1;
}

.buildx-site-footer .footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  gap: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.buildx-site-footer .footer-brand {
  flex: 0 0 250px;
}

.buildx-site-footer .footer-brand .footer-copyright {
  margin-top: 8px;
}

.buildx-site-footer .footer-links {
  gap: 30px;
}

.buildx-site-footer .footer-links-column {
  min-width: 100px;
}

.buildx-site-footer .footer-logo-adelphos {
  font-family: 'Gotham Medium', 'Montserrat', Helvetica, Arial, sans-serif;
  font-size: 4vh;
  font-weight: 500;
  color: #e0e0e0;
  letter-spacing: 5pt;
}

.buildx-site-footer .footer-logo-ai {
  font-family: 'Gotham Medium', 'Montserrat', Helvetica, Arial, sans-serif;
  font-size: 4vh;
  font-weight: 500;
  color: #156082;
  letter-spacing: 5pt;
  margin-left: 6px;
}

.buildx-site-footer .footer-logo {
  margin-bottom: 6px;
}

.buildx-site-footer .footer-tagline {
  font-family: 'Inter Display', 'Inter', sans-serif;
  font-weight: 300;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}

.buildx-site-footer .footer-links-title {
  font-family: 'Inter Display', 'Inter', sans-serif;
  font-weight: 300;
  font-size: 10px;
  margin-bottom: 6px;
  color: rgba(255,255,255,0.7);
}

.buildx-site-footer .footer-links-list a {
  font-family: 'Inter Display', 'Inter', sans-serif;
  font-weight: 300;
  font-size: 11px;
  color: rgba(255,255,255,0.5);
}

.buildx-site-footer .footer-links-list li {
  margin-bottom: 3px;
}

.buildx-site-footer .footer-links-list a:hover {
  color: #4a9bb8;
}

.buildx-site-footer .footer-bottom {
  border-top-color: rgba(255,255,255,0.1);
}

.buildx-site-footer .footer-copyright,
.buildx-site-footer .footer-legal a {
  font-family: 'Inter Display', 'Inter', sans-serif;
  font-weight: 300;
  font-size: 10px;
  color: rgba(255,255,255,0.35);
}

.buildx-site-footer .footer-legal a:hover {
  color: #4a9bb8;
}

/* Apply dark mode styles to logo and menu when BUILD X is visible (view 11) */
/* Uses body.view-dark-header class added by view-controller.js */
/* These override html.dark-mode styles for better visibility on charcoal */
body.view-dark-header .logo {
  color: #e0e0e0 !important;
}

body.view-dark-header .menubar .menu-link {
  color: #fff !important;
}

body.view-dark-header .menubar .menu-link:hover {
  color: #fff !important;
}

body.view-dark-header .menubar .menu-highlight {
  background: rgba(255, 255, 255, 0.1) !important;
}

body.view-dark-header .menubar .menu-highlight.bright {
  background: rgba(255, 255, 255, 0.15) !important;
}

body.view-dark-header .menubar .menu-tail {
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.06), transparent) !important;
}

body.view-dark-header .section-indicator .section-dot {
  background: rgba(21, 96, 130, 0.35) !important;
}

body.view-dark-header .section-indicator .section-active-ball {
  background: #156082 !important;
}

body.view-dark-header .section-indicator .section-trail-ball {
  background: rgba(21, 96, 130, 0.4) !important;
}

/* ============================================
   VIEW 8 SPECIFIC RESIZE EDGES (v8-resize-*)
   Completely isolated from other resize edges
   ============================================ */
.v8-resize-edge {
  position: absolute;
  background: transparent;
  z-index: 100;
  pointer-events: auto;
}

.v8-resize-top {
  top: 0;
  left: 14px;
  right: 14px;
  height: 6px;
  cursor: ns-resize;
}

.v8-resize-bottom {
  bottom: 0;
  left: 14px;
  right: 14px;
  height: 6px;
  cursor: ns-resize;
}

.v8-resize-left {
  top: 14px;
  bottom: 14px;
  left: 0;
  width: 6px;
  cursor: ew-resize;
}

.v8-resize-right {
  top: 14px;
  bottom: 14px;
  right: 0;
  width: 6px;
  cursor: ew-resize;
}

.v8-resize-corner-se {
  bottom: 0;
  right: 0;
  width: 14px;
  height: 14px;
  cursor: nwse-resize;
}

.v8-resize-corner-nw {
  top: 0;
  left: 0;
  width: 14px;
  height: 14px;
  cursor: nwse-resize;
}

.v8-resize-corner-ne {
  top: 0;
  right: 0;
  width: 14px;
  height: 14px;
  cursor: nesw-resize;
}

.v8-resize-corner-sw {
  bottom: 0;
  left: 0;
  width: 14px;
  height: 14px;
  cursor: nesw-resize;
}

/* Debug visibility removed - resize edges now transparent */

/* ============================================
   VIEW 8 THREE-COLUMN LAYOUT
   Left text (20%) | Center panel (50%) | Right text (20%)
   Panel is centered and percentage-based
   5% indent from each side
   ============================================ */
#specWritingOverlay .v8-three-column {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  gap: 80px; /* Space between columns */
  padding: 0 80px; /* Equal to gap for balanced spacing */
  box-sizing: border-box;
}

#specWritingOverlay .v8-text-column {
  flex: 1 1 0; /* Grow equally to fill available space */
  max-width: 400px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
}

/* Left text aligns to left edge */
#specWritingOverlay .v8-text-left {
  text-align: left;
}

/* Right text aligns to left edge (reads left-to-right) */
#specWritingOverlay .v8-text-right {
  text-align: left;
}

#specWritingOverlay .v8-text-column .demo-text-heading {
  font-family: 'Inter', sans-serif;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.3;
  color: #000;
  margin-bottom: 16px;
}

html.dark-mode #specWritingOverlay .v8-text-column .demo-text-heading {
  color: var(--text-primary);
}

#specWritingOverlay .v8-text-column .demo-text-body {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 300;
  line-height: 1.7;
  color: #555;
}

html.dark-mode #specWritingOverlay .v8-text-column .demo-text-body {
  color: #aaa;
}

#specWritingOverlay .v8-text-column .demo-text-body p {
  margin-bottom: 14px;
}

#specWritingOverlay .v8-center-panel {
  /* Percentage-based sizing: 50% width, 70% height */
  flex: 0 0 50%;
  height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Fixed position in layout - doesn't collapse when panel floats */
  position: relative;
  z-index: 10;
}

#specWritingOverlay .v8-center-panel .demo-chat-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
}

#specWritingOverlay .v8-center-panel .demo-chat-box {
  width: 100%;
  height: 100%;
}

/* ============================================
   VIEW 8: FIXED COLUMN SIZES - DO NOT CHANGE ON UNDOCK
   Columns must stay the same size whether panel is docked or floating
   ============================================ */

/* Text columns: Flexible width to fill available space */
#specWritingOverlay .v8-text-column {
  flex: 1 1 0 !important;
  min-width: 200px;
  max-width: 400px;
}

/* Center panel: FIXED 50% width, never grow or shrink */
#specWritingOverlay .v8-center-panel {
  flex: 0 0 50% !important;
  min-width: 500px;
  max-width: 962px;
}

/* Wrapper maintains size even when chat box floats out */
#specWritingOverlay .v8-center-panel .demo-chat-wrapper {
  width: 100% !important;
  height: 100% !important;
  min-width: 500px;
  min-height: 400px;
}

/* View 8 free-floating override is above in the main section */

/* When panel is free-floating, the v8-center-panel keeps its space reserved */

/* ============================================
   VIEW 7: QA MANAGER - 3-COLUMN LAYOUT
   Same structure as View 8, but with QA Manager panel
   Left text (20%) | Center panel (50%) | Right text (20%)
   ============================================ */
#schedulesOverlay .v8-three-column {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  gap: 80px; /* Space between columns */
  padding: 0 80px; /* Equal to gap for balanced spacing */
  box-sizing: border-box;
}

#schedulesOverlay .v8-text-column {
  flex: 1 1 0; /* Grow equally to fill available space */
  max-width: 400px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
}

/* Left text aligns to left edge */
#schedulesOverlay .v8-text-left {
  text-align: left;
}

/* Right text aligns to left edge (reads left-to-right) */
#schedulesOverlay .v8-text-right {
  text-align: left;
}

#schedulesOverlay .v8-text-column .demo-text-heading {
  font-family: 'Inter', sans-serif;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.3;
  color: #000;
  margin-bottom: 16px;
}

html.dark-mode #schedulesOverlay .v8-text-column .demo-text-heading {
  color: var(--text-primary);
}

#schedulesOverlay .v8-text-column .demo-text-body {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 300;
  line-height: 1.7;
  color: #555;
}

html.dark-mode #schedulesOverlay .v8-text-column .demo-text-body {
  color: #aaa;
}

#schedulesOverlay .v8-text-column .demo-text-body p {
  margin-bottom: 14px;
}

#schedulesOverlay .v8-center-panel,
#schedulesOverlay .v7-center-panel {
  flex: 0 0 50%;
  height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 10;
}

#schedulesOverlay .v8-center-panel .demo-chat-wrapper,
#schedulesOverlay .v7-center-panel .demo-chat-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
}

#schedulesOverlay .v8-center-panel .demo-chat-box,
#schedulesOverlay .v7-center-panel .demo-chat-box {
  width: 100%;
  height: 100%;
}

/* Text columns: Flexible width to fill available space */
#schedulesOverlay .v8-text-column {
  flex: 1 1 0 !important;
  min-width: 200px;
  max-width: 400px;
}

/* Center panel: FIXED 50% width */
#schedulesOverlay .v8-center-panel,
#schedulesOverlay .v7-center-panel {
  flex: 0 0 50% !important;
  min-width: 500px;
  max-width: 962px;
}

/* Wrapper maintains size - MUST match View 8 values for proper zoom behavior */
#schedulesOverlay .v8-center-panel .demo-chat-wrapper,
#schedulesOverlay .v7-center-panel .demo-chat-wrapper {
  flex: 1 1 0% !important; /* Match View 8's flex behavior */
  width: 100% !important;
  height: 100% !important;
  min-width: 500px;
  min-height: 400px;
}

/* ============================================
   VIEW 7: QA MANAGER EMBEDDED PANEL STYLES
   Overrides for the QA Manager when embedded in View 7
   ============================================ */
#schedulesOverlay .v7-qa-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#schedulesOverlay .qa-body {
  flex: 1;
  display: flex;
  flex-direction: row;
  min-height: 0;
  background: var(--bg-tertiary);
}

html.dark-mode #schedulesOverlay .qa-body {
  background: #1e1e1e;
}

#schedulesOverlay .qa-main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 6px;
  gap: 6px;
}

/* QA Ribbon in View 7 */
#schedulesOverlay .qa-ribbon {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  flex-shrink: 0;
}

html.dark-mode #schedulesOverlay .qa-ribbon {
  background: #2a2a2a;
  border-bottom-color: #3a3a3a;
}

#schedulesOverlay .qa-ribbon .ribbon-tabs {
  display: flex;
  padding: 0 6px;
  border-bottom: 1px solid #e0e0e0;
}

html.dark-mode #schedulesOverlay .qa-ribbon .ribbon-tabs {
  border-bottom-color: #3a3a3a;
}

#schedulesOverlay .qa-ribbon .ribbon-tab {
  background: none;
  border: none;
  padding: 4px 10px;
  font-size: 0.55rem;
  color: #666;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

#schedulesOverlay .qa-ribbon .ribbon-tab:hover {
  color: #444;
}

#schedulesOverlay .qa-ribbon .ribbon-tab.active {
  color: var(--teal);
  border-bottom-color: var(--teal);
}

html.dark-mode #schedulesOverlay .qa-ribbon .ribbon-tab {
  color: #888;
}

html.dark-mode #schedulesOverlay .qa-ribbon .ribbon-tab:hover {
  color: #ccc;
}

html.dark-mode #schedulesOverlay .qa-ribbon .ribbon-tab.active {
  color: var(--teal-light);
  border-bottom-color: var(--teal-light);
}

#schedulesOverlay .qa-ribbon .ribbon-content {
  height: 76px;
  min-height: 76px;
  display: none;
  align-items: stretch;
  padding: 4px 8px;
  gap: 6px;
  background: #fafafa;
}

html.dark-mode #schedulesOverlay .qa-ribbon .ribbon-content {
  background: #252525;
}

#schedulesOverlay .qa-ribbon .ribbon-content.active {
  display: flex;
}

#schedulesOverlay .qa-ribbon .ribbon-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

#schedulesOverlay .qa-ribbon .ribbon-group-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 3px;
  flex: 1;
}

#schedulesOverlay .qa-ribbon .ribbon-group-content.two-rows {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#schedulesOverlay .qa-ribbon .ribbon-row {
  display: flex;
  align-items: center;
  gap: 3px;
}

#schedulesOverlay .qa-ribbon .ribbon-group-label {
  font-size: 0.45rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

#schedulesOverlay .qa-ribbon .ribbon-separator {
  width: 1px;
  height: 64px;
  background: #e0e0e0;
  margin: 0 6px;
  align-self: center;
}

html.dark-mode #schedulesOverlay .qa-ribbon .ribbon-separator {
  background: #3a3a3a;
}

#schedulesOverlay .qa-ribbon .ribbon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  color: #333;
  font-size: 0.5rem;
  transition: background 0.15s, border-color 0.15s;
}

#schedulesOverlay .qa-ribbon .ribbon-btn:hover:not(:disabled) {
  background: rgba(21, 96, 130, 0.1);
  border-color: rgba(21, 96, 130, 0.2);
}

#schedulesOverlay .qa-ribbon .ribbon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

html.dark-mode #schedulesOverlay .qa-ribbon .ribbon-btn {
  color: #ccc;
}

html.dark-mode #schedulesOverlay .qa-ribbon .ribbon-btn:hover:not(:disabled) {
  background: rgba(74, 155, 184, 0.15);
  border-color: rgba(74, 155, 184, 0.25);
}

#schedulesOverlay .qa-ribbon .ribbon-btn.large {
  padding: 4px 8px;
  width: 52px;
  min-width: 52px;
  height: 54px;
}

#schedulesOverlay .qa-ribbon .ribbon-btn.large .ribbon-icon {
  font-size: 1.2rem;
  margin-bottom: 2px;
}

#schedulesOverlay .qa-ribbon .ribbon-btn.large .ribbon-label {
  font-size: 0.5rem;
  text-align: center;
}

#schedulesOverlay .qa-ribbon .ribbon-btn.small {
  flex-direction: row;
  padding: 2px 6px;
  width: 70px;
  min-width: 70px;
  height: 16px;
  font-size: 0.5rem;
  justify-content: flex-start;
  gap: 3px;
}

#schedulesOverlay .qa-ribbon .ribbon-btn-stack {
  display: flex;
  flex-direction: column;
  gap: 1px;
  height: 54px;
  justify-content: center;
}

#schedulesOverlay .qa-ribbon .ribbon-btn.primary {
  background: linear-gradient(135deg, #156082 0%, #1a7299 100%);
  color: white;
  border: none;
}

#schedulesOverlay .qa-ribbon .ribbon-btn.primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #1a7299 0%, #1d82a8 100%);
}

html.dark-mode #schedulesOverlay .qa-ribbon .ribbon-btn.primary {
  background: linear-gradient(135deg, #4a9bb8 0%, #5aabbf 100%);
}

/* Type badges for View 7 */
#schedulesOverlay .type-badge {
  display: inline-block;
  padding: 1px 4px;
  border-radius: 6px;
  font-size: 0.45rem;
  font-weight: 500;
}

#schedulesOverlay .type-badge.connectivity { background: #e74c3c20; color: #e74c3c; }
#schedulesOverlay .type-badge.fire-safety { background: #e6732020; color: #e67320; }
#schedulesOverlay .type-badge.hosting { background: #9b59b620; color: #9b59b6; }
#schedulesOverlay .type-badge.insulation { background: #3498db20; color: #3498db; }
#schedulesOverlay .type-badge.clashes { background: #e74c3c20; color: #e74c3c; }
#schedulesOverlay .type-badge.documentation { background: #95a5a620; color: #7f8c8d; }
#schedulesOverlay .type-badge.data { background: #1abc9c20; color: #1abc9c; }
#schedulesOverlay .type-badge.brief { background: #f39c1220; color: #f39c12; }

/* View 7 QA resizer - main content/chat panel divider */
#schedulesOverlay .qa-resizer {
  width: 4px;
  background: #e0e0e0;
  cursor: col-resize;
  flex-shrink: 0;
  transition: background 0.15s;
}

#schedulesOverlay .qa-resizer:hover,
#schedulesOverlay .qa-resizer.active {
  background: var(--teal);
}

html.dark-mode #schedulesOverlay .qa-resizer {
  background: #3a3a3a;
}

html.dark-mode #schedulesOverlay .qa-resizer:hover,
html.dark-mode #schedulesOverlay .qa-resizer.active {
  background: var(--teal-light);
}

/* View 7 inner-resizer - chat/sidebar divider */
#schedulesOverlay .inner-resizer {
  order: 2;
  width: 4px;
  background: #e0e0e0;
  cursor: col-resize;
  flex-shrink: 0;
  transition: background 0.15s;
}

#schedulesOverlay .inner-resizer:hover,
#schedulesOverlay .inner-resizer.active {
  background: var(--teal);
}

html.dark-mode #schedulesOverlay .inner-resizer {
  background: #3a3a3a;
}

html.dark-mode #schedulesOverlay .inner-resizer:hover,
html.dark-mode #schedulesOverlay .inner-resizer.active {
  background: var(--teal-light);
}

/* View 7 qa-chat-overlay - wrapper for right column */
#schedulesOverlay .qa-chat-overlay {
  width: 250px;
  min-width: 250px;
  max-width: 500px;
  display: flex;
  flex-direction: row;
  height: 100%;
  overflow: hidden;
}

/* View 7 right column (chat panel) - matches View 8 spec builder structure */
#schedulesOverlay .right-column {
  width: 100%;
  display: flex;
  flex-direction: row;
  height: 100%;
  overflow: hidden;
}

/* Chat main area - takes available space */
#schedulesOverlay .right-column .demo-chat-main {
  flex: 1;
  min-width: 250px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* History sidebar - fixed 125px width, independent of chat panel sizing */
#schedulesOverlay .right-column .demo-chat-history-sidebar {
  width: 125px !important;
  min-width: 125px;
  max-width: 125px;
  flex: 0 0 125px !important;
  flex-shrink: 0;
  border-left: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

html.dark-mode #schedulesOverlay .right-column .demo-chat-history-sidebar {
  border-left-color: #3a3a3a;
}

/* Ensure selected rows are visible */
#schedulesOverlay .qa-results-table tbody tr.selected {
  background: rgba(21, 96, 130, 0.12);
}

html.dark-mode #schedulesOverlay .qa-results-table tbody tr.selected {
  background: rgba(74, 155, 184, 0.15);
}

/* ============================================
   MOBILE RESPONSIVE - PHONE (max-width: 767px)
   ============================================
   NATURAL SCROLL MODE: View controller disabled on mobile.
   All views rendered as stacked sections, user scrolls naturally.
   Brain canvas hidden. No snap-scroll, no view transitions.
   ============================================ */

@media (max-width: 767px) {

  /* --- HTML & BODY: Allow natural scrolling --- */
  html, body {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    height: auto !important;
  }

  /* --- BRAIN CANVAS: Hide on mobile --- */
  #scene {
    display: none !important;
  }

  /* --- BACK TO TOP: Hide (natural scroll replaces it) --- */
  .back-to-top {
    display: none !important;
  }

  /* --- HERO TEXT: Hide on mobile --- */
  .hero-text-container {
    display: none !important;
  }

  /* --- RIGHT PANEL (View 2 services): Flow as section --- */
  .right-panel {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    z-index: 1 !important;
    background: #ffffff !important;
    overflow: visible !important;
  }

  html.dark-mode .right-panel {
    background: #1a1a1a !important;
  }

  .right-panel .panel-content {
    padding: 100px 24px 20px !important;
  }

  /* Force thinking section visible on mobile (JS doesn't add .visible) */
  .thinking-section {
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  /* --- RIBA PANEL (View 2 RIBA cards): Flow as section --- */
  .riba-left-panel {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    z-index: 1 !important;
    overflow: visible !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    padding: 0 !important;
  }

  /* Hide backdrop on mobile */
  .riba-backdrop {
    display: none !important;
  }

  .riba-grid-left {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    padding: 10px 16px 20px !important;
    pointer-events: auto !important;
    max-width: 100% !important;
  }

  .riba-card-left {
    width: 100% !important;
    min-width: 0 !important;
    min-height: auto !important;
    transform: scale(1) !important;
    padding: 10px 12px !important;
    font-size: 12px !important;
    box-sizing: border-box !important;
    cursor: default !important;
  }

  /* Disable hover effects on mobile */
  .riba-card-left:hover:not(.expanded) {
    border-color: rgba(0,0,0,0.06) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
  }

  /* RIBA card inner text sizing for mobile */
  .riba-card-left .riba-stage-number {
    font-size: 18px !important;
  }

  .riba-card-left .riba-stage-name {
    font-size: 11px !important;
  }

  /* --- ALL DEMO OVERLAYS: Flow as sections --- */
  .demo-view-overlay {
    position: relative !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    height: auto !important;
    width: 100% !important;
    z-index: 1 !important;
  }

  /* Override the .visible transition rule so non-visible overlays still show */
  .demo-view-overlay:not(.visible) {
    opacity: 1 !important;
    visibility: visible !important;
    transition: none !important;
  }

  .demo-view-overlay .demo-split-view {
    flex-direction: column !important;
    height: auto !important;
  }

  .demo-view-overlay .demo-split-view.reversed {
    flex-direction: column !important;
  }

  .demo-view-overlay .demo-text-panel {
    flex: none !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 30px 24px 20px !important;
    min-height: auto;
    background: #ffffff !important;
  }

  html.dark-mode .demo-view-overlay .demo-text-panel {
    background: #1a1a1a !important;
  }

  .demo-view-overlay .demo-text-inner {
    max-width: 100% !important;
    pointer-events: auto !important;
  }

  .demo-view-overlay .demo-containers-panel {
    flex: none !important;
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    padding: 20px 24px 40px !important;
  }

  .demo-view-overlay .demo-containers-panel .demo-containers-stack {
    flex-direction: column !important;
    height: auto !important;
  }

  /* Section dividers between views */
  .demo-view-overlay + .demo-view-overlay {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
  }

  html.dark-mode .demo-view-overlay + .demo-view-overlay {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  /* --- VIEW 3: Video auto-height --- */
  #demoIntroOverlay .demo-image-container {
    width: 100% !important;
    height: auto !important;
  }

  #demoIntroOverlay .demo-intro-video,
  #demoIntroOverlay img.demo-intro-video {
    width: 100% !important;
    height: auto !important;
    max-height: 50vh;
    object-fit: contain;
  }

  /* --- VIEW 4: Hide Revit window --- */
  #gifOverlay .demo-revit-wrapper {
    display: none !important;
  }

  #gifOverlay .demo-containers-stack .demo-chat-wrapper {
    flex: none !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 400px;
  }

  body .demo-view-overlay:not(#specWritingOverlay) .demo-containers-stack .demo-chat-wrapper {
    flex: none !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* --- VIEW 5: Hide demo panels --- */
  #schematicsOverlay .demo-containers-panel {
    display: none !important;
  }

  /* --- VIEW 6: Hide left container, text first --- */
  #modellingOverlay .demo-containers-panel {
    display: none !important;
  }

  #modellingOverlay .demo-split-view.reversed .demo-text-panel {
    order: -1;
  }

  /* --- VIEW 7: Keep left text, hide center + right --- */
  #schedulesOverlay .v8-three-column,
  #schedulesOverlay .v7-three-column {
    flex-direction: column !important;
    padding: 40px 24px !important;
    gap: 0 !important;
    height: auto !important;
  }

  #schedulesOverlay .v7-center-panel,
  #schedulesOverlay .v8-center-panel {
    display: none !important;
  }

  #schedulesOverlay .v8-text-right {
    display: none !important;
  }

  #schedulesOverlay .v8-text-left {
    max-width: 100% !important;
    width: 100% !important;
  }

  /* --- VIEW 8: Keep left text, hide center + right --- */
  #specWritingOverlay .v8-three-column {
    flex-direction: column !important;
    padding: 40px 24px !important;
    gap: 0 !important;
    height: auto !important;
  }

  #specWritingOverlay .v8-center-panel {
    display: none !important;
  }

  #specWritingOverlay .v8-text-right {
    display: none !important;
  }

  #specWritingOverlay .v8-text-left {
    max-width: 100% !important;
    width: 100% !important;
  }

  /* --- VIEW 9: Keep right text, hide left --- */
  #archBuildOverlay .demo-containers-panel {
    display: none !important;
  }

  #archBuildOverlay .demo-split-view.reversed .demo-text-panel {
    order: -1;
  }

  /* --- VIEW 10: Keep left text, hide right --- */
  #comingSoonOverlay .demo-containers-panel {
    display: none !important;
  }

  /* --- VIEW 11 (BUILD X): Hide ribbons, show content + footer --- */
  #buildXOverlay .buildx-ribbon-panel {
    display: none !important;
  }

  #buildXOverlay .view-buildx {
    height: auto !important;
    overflow: visible !important;
    flex-direction: column !important;
  }

  #buildXOverlay .buildx-center-area {
    width: 100% !important;
    padding: 40px 24px !important;
  }

  /* Ensure embedded site footer is visible and full width */
  #buildXOverlay .buildx-site-footer {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    bottom: auto !important;
    pointer-events: auto !important;
    padding: 20px 16px 15px !important;
    margin-top: 20px;
  }

  #buildXOverlay .buildx-content {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
  }

  /* BUILD X footer content: stack vertically on mobile */
  #buildXOverlay .buildx-site-footer .footer-content {
    flex-direction: column !important;
    gap: 16px !important;
    padding: 0 16px !important;
    height: auto !important;
  }

  #buildXOverlay .buildx-site-footer .footer-brand {
    flex: none !important;
  }

  /* BUILD X: Force ALL inner elements visible (no .visible class on mobile) */
  #buildXOverlay .buildx-header,
  #buildXOverlay .buildx-packages-grid,
  #buildXOverlay .buildx-signup-buttons,
  #buildXOverlay .buildx-footer,
  #buildXOverlay .buildx-site-footer,
  #buildXOverlay .buildx-content {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    pointer-events: auto !important;
  }

  /* BUILD X: Scale down package grid to fit mobile */
  #buildXOverlay .buildx-packages-grid {
    transform: scale(0.8) !important;
    transform-origin: center top;
    margin-bottom: 0 !important;
    gap: 8px !important;
  }

  /* BUILD X: Stack signup buttons vertically */
  #buildXOverlay .buildx-signup-buttons {
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
  }

  #buildXOverlay .buildx-signup-btn {
    width: 100% !important;
    max-width: 280px !important;
    text-align: center !important;
  }

  /* --- FOOTER: Show on mobile (hidden by .has-view-system) --- */
  body.has-view-system .site-footer {
    display: block !important;
  }

  /* --- Typography adjustments --- */
  .demo-view-overlay .demo-text-heading,
  .demo-view-overlay .demo-hero-heading {
    font-size: 24px !important;
  }

  .demo-view-overlay .demo-text-body {
    font-size: 14px !important;
  }

  #specWritingOverlay .v8-text-column .demo-text-heading,
  #schedulesOverlay .v8-text-column .demo-text-heading {
    font-size: 24px !important;
  }

  /* --- Settings cog - bigger for touch --- */
  .demo-view-overlay .demo-titlebar-btn.settings {
    font-size: 1.2rem !important;
    padding: 6px 8px !important;
    min-width: 36px;
    min-height: 36px;
  }

  /* --- Software carousel: Force visible on mobile --- */
  .software-carousel {
    opacity: 1 !important;
    transform: none !important;
    overflow-x: auto;
  }

  /* --- Overlay nodes / project completion: Hide on mobile --- */
  .overlay-nodes-container,
  .brain-overlay-container,
  .project-complete-overlay {
    display: none !important;
  }
}