/* --- CSS Variables & Design System --- */
:root {
  --bg-dark: #07090e;
  --bg-slate: #0d1118;
  --bg-card: rgba(22, 27, 34, 0.6);
  --border-color: rgba(48, 54, 61, 0.6);
  --border-focus: rgba(0, 242, 254, 0.4);
  
  --text-main: #f0f6fc;
  --text-muted: #8b949e;
  --text-dark: #0d1117;
  
  --primary: #ff5e62;     /* Shrimp/Lobster Red-Orange */
  --secondary: #00f2fe;   /* Cyber Teal */
  --tertiary: #7f00ff;    /* Synth Purple */
  
  --primary-glow: rgba(255, 94, 98, 0.15);
  --secondary-glow: rgba(0, 242, 254, 0.15);
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-display: 'Space Grotesk', var(--font-sans);
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
  
  --shadow-premium: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
  --shadow-neon: 0 0 20px rgba(0, 242, 254, 0.2);
}

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

html {
  scroll-behavior: smooth;
}

section[id] {
  scroll-margin-top: 80px;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

/* --- Typographical Utilities --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

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

.section-header {
  margin-bottom: 4rem;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ffffff 0%, #b2bbd2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto;
}

/* --- Navigation Bar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(7, 9, 14, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition-smooth);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 28px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text-main);
}

.nav-links a:active {
  color: var(--secondary);
}

.github-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  transition: var(--transition-fast);
}

.github-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-muted);
}

.github-btn:active {
  transform: scale(0.97);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  padding: 10rem 0 6rem 0;
  overflow: hidden;
}

.hero-bg-glow {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translate(-50%, 0);
  width: 80vw;
  height: 60vh;
  background: radial-gradient(circle, rgba(127, 0, 255, 0.12) 0%, rgba(0, 242, 254, 0.05) 50%, rgba(7, 9, 14, 0) 100%);
  z-index: 0;
  pointer-events: none;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 4rem;
  position: relative;
  z-index: 1;
}

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  background: rgba(255, 94, 98, 0.08);
  border: 1px solid rgba(255, 94, 98, 0.2);
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: 3.5rem;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #ffffff 30%, #e2e8f0 70%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 550px;
}

.hero-cta {
  display: flex;
  gap: 1rem;
}

.btn-primary {
  padding: 0.8rem 1.8rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--tertiary) 100%);
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(255, 94, 98, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 94, 98, 0.45);
}

.btn-secondary {
  padding: 0.8rem 1.8rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-main);
  font-weight: 600;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--text-muted);
}

.btn-primary:active, .btn-secondary:active {
  transform: translateY(0);
  transition: transform 0.05s ease;
}

/* --- Terminal Mockup System --- */
.terminal-mock {
  background: #090d14;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-premium);
  display: flex;
  flex-direction: column;
  width: 100%;
}

.terminal-header {
  background: #0b0f19;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(48, 54, 61, 0.4);
}

.terminal-header .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 6px;
  display: inline-block;
}

.terminal-header .dot.red { background: #ff5f56; }
.terminal-header .dot.yellow { background: #ffbd2e; }
.terminal-header .dot.green { background: #27c93f; }

.terminal-title {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  margin-left: 1rem;
  flex: 1;
}

.terminal-status-badge {
  font-size: 0.7rem;
  color: var(--secondary);
  background: rgba(0, 242, 254, 0.1);
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.terminal-body {
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-main);
  height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.terminal-line {
  word-break: break-word;
  white-space: pre-wrap;
}

.t-prompt {
  color: var(--secondary);
}

.t-system {
  color: var(--text-muted);
}

.t-success {
  color: #27c93f;
}

.t-error {
  color: var(--primary);
}

.t-user {
  color: #ffe066;
}

.t-agent-supa {
  color: var(--primary);
  font-weight: bold;
}

.t-agent-koe {
  color: #00f2fe;
  font-weight: bold;
}

.t-agent-mave {
  color: #7f00ff;
  font-weight: bold;
}

.t-agent-forge {
  color: #fb8c00;
  font-weight: bold;
}

.t-agent-worker {
  color: #e0f2f1;
  font-style: italic;
}

.blink-line::after {
  content: '█';
  animation: blink 1s step-end infinite;
}

.cursor-blink {
  animation: cursor-blink-anim 1s step-end infinite;
  color: var(--text-main);
}

@keyframes cursor-blink-anim {
  from, to { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes blink {
  from, to { color: transparent }
  50% { color: var(--text-main) }
}

/* --- Interactive Simulator Layout --- */
.demo-section {
  padding: 6rem 0;
  background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-slate) 50%, var(--bg-dark) 100%);
}

.demo-presets {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.preset-btn {
  padding: 0.6rem 1.2rem;
  background: rgba(22, 27, 34, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 30px;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.preset-btn:hover, .preset-btn.active {
  color: var(--text-main);
  border-color: var(--secondary);
  background: rgba(0, 242, 254, 0.05);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.1);
}

.preset-btn:active {
  transform: scale(0.97);
}

.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  grid-template-columns: 1fr 1fr;
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.demo-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  backdrop-filter: blur(8px);
}

.card-header-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--secondary) 50%, transparent 100%);
  opacity: 0.7;
}

.full-terminal .terminal-body {
  height: 400px;
}

/* --- Band.ai Simulator Layout --- */
.band-mock {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 460px;
}

.band-header {
  background: rgba(9, 13, 20, 0.8);
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.band-title-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.band-avatar {
  background: rgba(255, 94, 98, 0.15);
  border: 1px solid var(--primary);
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.band-title {
  font-size: 0.95rem;
  color: var(--text-main);
  font-weight: 600;
}

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

.live-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.live-indicator .ping {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  display: inline-block;
  position: relative;
}

.live-indicator .ping::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse-ping 1.5s infinite;
}

@keyframes pulse-ping {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(3.5); opacity: 0; }
}

.band-messages {
  padding: 1.5rem;
  overflow-y: auto;
  height: 380px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.band-msg {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  animation: msg-appear 0.25s cubic-bezier(0.1, 0.8, 0.2, 1) forwards;
}

@keyframes msg-appear {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: bold;
  flex-shrink: 0;
}

.msg-avatar.supa { background: rgba(255, 94, 98, 0.1); border: 1px solid var(--primary); color: var(--primary); }
.msg-avatar.koe { background: rgba(0, 242, 254, 0.1); border: 1px solid var(--secondary); color: var(--secondary); }
.msg-avatar.mave { background: rgba(127, 0, 255, 0.1); border: 1px solid var(--tertiary); color: var(--tertiary); }
.msg-avatar.forge { background: rgba(251, 140, 0, 0.1); border: 1px solid #fb8c00; color: #fb8c00; }
.msg-avatar.worker { background: rgba(224, 242, 241, 0.1); border: 1px solid #e0f2f1; color: #e0f2f1; }

.msg-content {
  flex: 1;
}

.msg-author {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.msg-text {
  font-size: 0.85rem;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.6rem 0.8rem;
  border-radius: 0 8px 8px 8px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.msg-mention {
  color: var(--secondary);
  background: rgba(0, 242, 254, 0.1);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  font-weight: 500;
}

/* --- Architecture & SVG Diagram --- */
.architecture-section {
  position: relative;
  padding: 8rem 0;
  overflow: hidden;
}

.architecture-glow {
  position: absolute;
  bottom: 0;
  left: 20%;
  width: 50vw;
  height: 50vh;
  background: radial-gradient(circle, rgba(0, 242, 254, 0.05) 0%, rgba(7, 9, 14, 0) 70%);
  z-index: -1;
  pointer-events: none;
}

.glass-card {
  background: rgba(22, 27, 34, 0.35);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2.25rem;
  backdrop-filter: blur(10px);
  transition: var(--transition-smooth);
}

.glass-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 94, 98, 0.4);
  box-shadow: 0 15px 30px -10px rgba(255, 94, 98, 0.1);
}

.card-icon {
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.glass-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.glass-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.diagram-wrapper {
  margin-top: 5rem;
  text-align: center;
}

.diagram-wrapper h3 {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  color: var(--text-main);
}

.diagram-container {
  background: #090d14;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  overflow-x: auto;
  box-shadow: var(--shadow-premium);
}

.arch-diagram {
  min-width: 750px;
  max-width: 100%;
  height: auto;
}

.diagram-node rect {
  transition: var(--transition-smooth);
}

.diagram-node:hover rect {
  fill-opacity: 0.15;
  filter: drop-shadow(0 0 8px var(--primary));
  cursor: pointer;
}

/* --- Agent Roster & Filters --- */
.agents-section {
  padding: 6rem 0;
  background: var(--bg-slate);
}

.agent-filters {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 3.5rem;
}

.filter-btn {
  padding: 0.5rem 1.1rem;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.filter-btn:hover, .filter-btn.active {
  color: var(--text-main);
  border-color: var(--primary);
  background: rgba(255, 94, 98, 0.05);
}

.agent-card {
  background: rgba(7, 9, 14, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: var(--transition-smooth);
}

.agent-card:hover {
  transform: translateY(-3px);
  border-color: var(--secondary);
  box-shadow: 0 10px 25px -10px rgba(0, 242, 254, 0.15);
}

.agent-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.agent-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.agent-badge.manager { background: rgba(255, 94, 98, 0.1); border: 1px solid rgba(255, 94, 98, 0.2); color: var(--primary); }
.agent-badge.worker { background: rgba(224, 242, 241, 0.1); border: 1px solid rgba(224, 242, 241, 0.2); color: #80cbc4; }
.agent-badge.blob { background: rgba(127, 0, 255, 0.1); border: 1px solid rgba(127, 0, 255, 0.2); color: #b388ff; }

.agent-icon {
  font-size: 1.5rem;
}

.agent-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.agent-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  flex: 1;
}

.agent-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.agent-tools span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

/* --- Features Section --- */
.features-section {
  padding: 6rem 0;
}

.features-grid {
  gap: 3rem;
}

.feature-item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.feature-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.feature-icon {
  font-size: 1.75rem;
}

.feature-item h4 {
  font-size: 1.2rem;
  color: var(--text-main);
}

.feature-item p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* --- Quick Start Section --- */
.quickstart-section {
  padding: 6rem 0;
  background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-slate) 100%);
}

.quickstart-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

.code-box-container {
  background: #090d14;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-premium);
  margin: 3rem 0 1.5rem 0;
}

.code-box-header {
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.copy-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-muted);
  padding: 0.2rem 0.6rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.copy-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.copy-btn:active {
  transform: scale(0.95);
}

.code-box {
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #cbd5e1;
  overflow-x: auto;
}

.prereqs {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.prereqs a {
  color: var(--secondary);
  border-bottom: 1px solid rgba(0, 242, 254, 0.2);
}

.prereqs a:hover {
  color: var(--text-main);
  border-bottom-color: var(--text-main);
}

/* --- Footer --- */
.footer {
  padding: 4rem 0 2rem 0;
  border-top: 1px solid var(--border-color);
  background: var(--bg-dark);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.footer-brand {
  text-align: center;
}

.footer-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.footer-logo-img {
  height: 24px;
  width: auto;
  display: block;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a:hover {
  color: var(--text-main);
}

.copyright {
  font-size: 0.75rem;
}

/* --- WebUI Dashboard Simulator (Vintage Suit Theme) --- */
:root {
  --brass: #caa05a;
  --brass-hover: #d7b277;
  --surface-suit: #1a1d24;
  --surface-felt: #242933;
  --surface-flannel: #313745;
  --blackboard-felt: #15291b;
  --blackboard-border: #52311f;
}

.webui-simulator-card {
  width: 100%;
  background: #111317;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-premium);
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
}

.webui-demo-notice {
  border: 1.5px solid var(--brass);
  border-radius: 6px;
  padding: 14px 20px;
  text-align: center;
  color: var(--brass);
  background: rgba(202, 160, 90, 0.05);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  margin-top: 0;
  margin-bottom: 3rem;
  letter-spacing: 0.5px;
  box-shadow: 0 0 15px rgba(202, 160, 90, 0.05);
}

.webui-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 56px;
  background: var(--surface-suit);
  border-bottom: 3px double var(--border-color);
  z-index: 10;
}

.webui-topbar-left {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.webui-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 2px;
  background: linear-gradient(135deg, var(--brass), var(--brass-hover));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--brass);
}

.webui-logo-sub {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.webui-project-select-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-felt);
  border: 1px solid var(--border-color);
  padding: 4px 12px;
  border-radius: 4px;
}

.webui-select-label {
  font-size: 11px;
  font-style: italic;
  color: var(--text-muted);
}

.webui-project-select {
  background: transparent;
  color: var(--text-main);
  border: none;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 13px;
  outline: none;
  cursor: default;
}

.webui-topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.webui-status-summary {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  background: var(--surface-felt);
  padding: 3px 8px;
  border-radius: 2px;
  border: 1px solid var(--border-color);
}

.webui-theme-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-felt);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: default;
}

.webui-main-layout {
  display: flex;
  height: 480px;
  overflow: hidden;
}

.webui-sidebar {
  width: 220px;
  background: var(--surface-suit);
  border-right: 3px double var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  padding: 12px 8px;
  overflow-y: auto;
}

.webui-sidebar-header {
  padding: 12px 14px 6px 14px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--brass);
}

.webui-sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.webui-sidebar-item {
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
  border-left: 2px solid transparent;
}

.webui-sidebar-item:hover, .webui-sidebar-item.active {
  background: var(--surface-felt);
  color: var(--text-main);
}

.webui-sidebar-item.active {
  border-left-color: var(--brass);
}

.webui-content-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #111317;
  overflow: hidden;
}

.webui-tabs-nav {
  display: flex;
  background: var(--surface-suit);
  border-bottom: 1px solid var(--border-color);
  padding: 0 12px;
}

.webui-tab {
  padding: 12px 16px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

.webui-tab:hover, .webui-tab.active {
  color: var(--text-main);
}

.webui-tab.active {
  border-bottom-color: var(--brass);
  background: rgba(202, 160, 90, 0.05);
}

.webui-tab:active {
  opacity: 0.7;
}

.badge-dot {
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  display: none;
  margin-left: 4px;
}

.badge-dot.active {
  display: inline-block;
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}

.webui-tab-content {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.webui-pane {
  display: none;
  width: 100%;
  height: 100%;
  padding: 20px;
  overflow-y: auto;
}

.webui-pane.active {
  display: flex;
  flex-direction: column;
}

/* --- WebUI Tab: Chats --- */
.webui-chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.webui-chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 12px;
}

.webui-chat-input-bar {
  display: flex;
  gap: 10px;
  background: var(--surface-felt);
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: 4px;
}

.webui-chat-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 13px;
  outline: none;
}

.webui-chat-send-btn {
  background: var(--brass);
  color: var(--text-dark);
  border: none;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

/* --- WebUI Tab: Blackboard (Green Felt wood frame) --- */
.blackboard-frame {
  background: var(--blackboard-border);
  padding: 10px;
  border-radius: 6px;
  box-shadow: var(--shadow-premium);
  height: 100%;
  min-height: 380px;
}

.blackboard-canvas {
  background: var(--blackboard-felt);
  height: 100%;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.05);
  padding: 16px;
  overflow-y: auto;
  background-image: radial-gradient(rgba(255,255,255,0.02) 1px, transparent 0);
  background-size: 24px 24px;
}

.blackboard-title-chalk {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: rgba(240, 234, 225, 0.7);
  text-shadow: 0 0 4px rgba(240, 234, 225, 0.4);
  text-align: center;
  border-bottom: 1px dashed rgba(240, 234, 225, 0.2);
  padding-bottom: 8px;
  margin-bottom: 16px;
  font-style: italic;
  letter-spacing: 0.5px;
}

.blackboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 16px;
}

.blackboard-pin-card {
  background: #fdfaf2;
  color: #2b2b2b;
  padding: 12px;
  border-radius: 2px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
  border-top: 4px solid var(--primary);
  position: relative;
  transition: var(--transition-smooth);
  animation: pin-drop 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

.blackboard-pin-card::after {
  content: '';
  width: 8px;
  height: 8px;
  background: #d62828;
  border-radius: 50%;
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.blackboard-pin-card:nth-child(even) {
  transform: rotate(1deg);
  border-top-color: var(--secondary);
}

.blackboard-pin-card:nth-child(3n) {
  transform: rotate(-1.5deg);
  border-top-color: var(--tertiary);
}

@keyframes pin-drop {
  from { opacity: 0; transform: scale(1.3) translateY(-20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.pin-key {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11px;
  word-break: break-all;
}

.pin-meta {
  font-size: 9px;
  color: #666;
  margin-top: 6px;
  border-top: 1px solid rgba(0,0,0,0.06);
  padding-top: 4px;
}

/* --- WebUI Tab: Production --- */
.production-board {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.production-header {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--brass);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.production-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.production-card {
  background: var(--surface-suit);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  animation: card-fade 0.3s ease forwards;
}

@keyframes card-fade {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.prod-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--text-main);
}

.prod-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.prod-badge {
  font-size: 10px;
  font-weight: 700;
  color: #52b788;
  background: rgba(82, 183, 136, 0.1);
  padding: 2px 8px;
  border-radius: 20px;
  width: max-content;
}

.prod-visual-preview {
  background: var(--surface-felt);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
  min-height: 120px;
}

.prod-visual-preview svg {
  max-width: 100%;
  max-height: 120px;
  height: auto;
}

/* --- WebUI Tab: Todos --- */
.todos-board {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.todos-header {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--brass);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.todos-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.todo-card {
  background: var(--surface-suit);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  animation: card-fade 0.3s ease forwards;
  transition: var(--transition-smooth);
}

.todo-card.approved {
  border-color: #52b788;
  background: rgba(82, 183, 136, 0.03);
}

.todo-desc {
  font-size: 13px;
  color: var(--text-main);
}

.todo-btn {
  background: var(--brass);
  color: var(--text-dark);
  border: none;
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}

.todo-btn:hover {
  background: var(--brass-hover);
}

.todo-btn:active {
  transform: scale(0.96);
}

.todo-btn.approved {
  background: rgba(82, 183, 136, 0.15);
  color: #52b788;
  border: 1px solid #52b788;
  cursor: default;
}

/* --- WebUI Tab: Fleet Status --- */
.fleet-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fleet-row {
  background: var(--surface-suit);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 12px 20px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  align-items: center;
  gap: 20px;
}

.fleet-agent-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fleet-status-bulb {
  width: 8px;
  height: 8px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: var(--transition-smooth);
}

.fleet-status-bulb.online {
  background: #52b788;
  box-shadow: 0 0 8px #52b788;
}

.fleet-status-bulb.thinking {
  background: #f4a261;
  box-shadow: 0 0 8px #f4a261;
}

.fleet-agent-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--text-main);
}

.fleet-pid {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

.fleet-metric {
  display: flex;
  align-items: center;
  gap: 8px;
}

.metric-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

.metric-bar-container {
  flex: 1;
  height: 6px;
  background: var(--surface-felt);
  border-radius: 3px;
  overflow: hidden;
}

.metric-bar {
  height: 100%;
  background: var(--brass);
  width: 0%;
  transition: width 0.5s ease;
}

.tui-logs-wrapper {
  margin-top: 4rem;
  border-top: 1px dashed var(--border-color);
  padding-top: 3rem;
}

.tui-logs-header {
  margin-bottom: 2rem;
}

.tui-logs-header h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tui-logs-header p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* --- Mobile Responsiveness --- */
@media (max-width: 992px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .hero-content {
    align-items: center;
    text-align: center;
  }
  
  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
  
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .webui-main-layout {
    flex-direction: column;
    height: auto;
  }

  .webui-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 2px double var(--border-color);
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 8px 16px;
  }

  .webui-sidebar-list {
    flex-direction: row;
  }

  .webui-sidebar-item {
    padding: 6px 12px;
    font-size: 11px;
    border-left: none;
    border-bottom: 2px solid transparent;
  }

  .webui-sidebar-item.active {
    border-bottom-color: var(--brass);
  }

  .webui-content-pane {
    height: 400px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }
  
  .hero-title {
    font-size: 2.75rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .preset-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }

  .webui-tabs-nav {
    overflow-x: auto;
  }
}

/* --- SVG Icon Formatting --- */
.btn-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.badge-icon {
  width: 14px;
  height: 14px;
  stroke: var(--brass);
  vertical-align: middle;
  margin-right: 6px;
  display: inline-block;
}

.brand-avatar-svg {
  width: 22px;
  height: 22px;
  display: block;
}

.agent-icon svg {
  width: 24px;
  height: 24px;
  display: block;
}

.feature-icon svg {
  width: 28px;
  height: 28px;
  display: block;
}

.msg-avatar svg {
  width: 18px;
  height: 18px;
  display: block;
}

.preset-btn svg {
  width: 16px;
  height: 16px;
  margin-right: 6px;
  vertical-align: middle;
  display: inline-block;
}

.webui-tab svg {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  display: inline-block;
}

.sidebar-icon {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  vertical-align: middle;
  display: inline-block;
}


