:root {
  --bg-main: #090d16;
  --bg-card: #111726;
  --bg-card-alt: #171f33;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(99, 102, 241, 0.35);
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --accent-cyan: #06b6d4;
  --accent-green: #10b981;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

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

/* Reading Progress Bar */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent-cyan));
  z-index: 9999;
  width: 0%;
  transition: width 0.1s ease-out;
}

/* Typography & Links */
a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--accent-cyan);
}

/* Navigation Bar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(9, 13, 22, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 1.5rem;
}
.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text-main);
}
.brand-logo {
  color: var(--primary);
  display: flex;
  align-items: center;
}
.brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.brand-highlight {
  color: var(--accent-cyan);
}
.badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  letter-spacing: 0.5px;
}
.badge-primary {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.4);
}
.badge-success {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

/* Desktop Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav-link {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
  padding: 0.25rem 0.1rem;
  position: relative;
}
.nav-link:hover, .nav-link.active {
  color: var(--text-main);
}
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-cyan);
  border-radius: 2px;
}
.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
}
.nav-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Mobile Hamburger Menu Button */
.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
  z-index: 1001;
}
.hamburger-bar {
  width: 22px;
  height: 2px;
  background-color: var(--text-main);
  border-radius: 2px;
  transition: all 0.3s ease;
}
.mobile-menu-btn.open .hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-menu-btn.open .hamburger-bar:nth-child(2) {
  opacity: 0;
}
.mobile-menu-btn.open .hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hero Section */
.hero {
  padding: clamp(3rem, 6vw + 1rem, 5.5rem) 1.5rem clamp(2rem, 4vw + 1rem, 3.5rem);
  text-align: center;
  background: radial-gradient(circle at 50% 15%, rgba(99, 102, 241, 0.15) 0%, transparent 65%);
}
.hero-container {
  max-width: 960px;
  margin: 0 auto;
}
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  font-size: clamp(0.75rem, 1vw + 0.5rem, 0.85rem);
  font-weight: 500;
  color: #c7d2fe;
  margin-bottom: 1.5rem;
  max-width: 90%;
}
.pill-dot {
  width: 7px;
  height: 7px;
  min-width: 7px;
  border-radius: 50%;
  background-color: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
}
.hero-title {
  font-size: clamp(2rem, 5vw + 1rem, 3.25rem);
  font-weight: 800;
  letter-spacing: -1.2px;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}
.gradient-text {
  background: linear-gradient(135deg, #a5b4fc 0%, #6366f1 50%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-subtitle {
  font-size: clamp(0.95rem, 1.2vw + 0.7rem, 1.15rem);
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 2.2rem;
  line-height: 1.6;
}
.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  min-height: 42px;
}
.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}
.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--bg-card-alt);
  color: var(--text-main);
  border-color: var(--border-color);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}
.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border-color);
}
.btn-outline:hover {
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Metrics Bar */
.hero-metrics-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  max-width: 880px;
  margin: 0 auto;
}
.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 1.25rem 1rem;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s, border-color 0.2s;
}
.metric-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-2px);
}
.metric-val {
  display: block;
  font-size: clamp(1.4rem, 2vw + 1rem, 1.75rem);
  font-weight: 700;
  color: var(--text-main);
  font-family: var(--font-mono);
}
.metric-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Sections */
.section {
  padding: clamp(3rem, 5vw + 1rem, 4.5rem) 1.5rem;
  border-top: 1px solid var(--border-color);
}
.section-container {
  max-width: 1280px;
  margin: 0 auto;
}
.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}
.section-title {
  font-size: clamp(1.6rem, 2.5vw + 1rem, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.6px;
  margin-bottom: 0.5rem;
}
.section-subtitle {
  font-size: clamp(0.9rem, 1vw + 0.6rem, 1.05rem);
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Simulator View Switcher Filter Pills */
.sim-view-filter-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.filter-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}
.filter-pills {
  display: inline-flex;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  padding: 3px;
  gap: 4px;
  flex-wrap: wrap;
}
.view-pill {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.view-pill:hover {
  color: var(--text-main);
}
.view-pill.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

/* Interactive Simulator Controls */
.sim-control-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.sim-scenario-selector {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}
.form-select {
  background: var(--bg-card-alt);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  outline: none;
  max-width: 100%;
}
.sim-button-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.sim-btn {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.15s;
  min-height: 36px;
}
.sim-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}
.sim-btn-primary {
  background: var(--primary);
  border-color: var(--primary);
}
.sim-btn-primary:hover {
  background: var(--primary-hover);
}
.sim-status-indicators {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.sim-progress-badge {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-cyan);
}
.sim-step-progress-track {
  width: 80px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  overflow: hidden;
}
.sim-step-progress-fill {
  height: 100%;
  width: 20%;
  background: var(--accent-cyan);
  transition: width 0.3s ease;
}

/* Tri-Pane Dashboard Grid */
.tri-pane-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 1.25rem;
  transition: all 0.3s ease;
}
.pane-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 480px;
  transition: all 0.25s ease;
}
.pane-card.is-hidden {
  display: none !important;
}
.pane-card.is-focused {
  grid-column: 1 / -1;
  height: 520px;
}
.pane-header {
  background: #0f1422;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pane-dots {
  display: flex;
  gap: 6px;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }
.dot-blue { background: #38bdf8; }
.pane-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}
.pane-badge {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.08);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}
.pane-body {
  padding: 1rem;
  flex: 1;
  overflow-y: auto;
}

/* Terminal Body */
.terminal-body {
  background: #080b12;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.t-prompt {
  color: #10b981;
}
.terminal-line {
  margin-bottom: 0.5rem;
}
.terminal-stdout {
  color: #cbd5e1;
  white-space: pre-wrap;
  line-height: 1.5;
}

/* Desktop Canvas */
.desktop-canvas-body {
  background: #1e222d;
  position: relative;
  overflow: hidden;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sim-window {
  background: #ffffff;
  color: #1e293b;
  border-radius: var(--radius-sm);
  overflow: hidden;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.sim-win-bar {
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.5rem 0.85rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
}
.win-state {
  color: #10b981;
  font-size: 0.72rem;
}
.sim-win-content {
  padding: 1.5rem;
  flex: 1;
  background: #ffffff;
  overflow-y: auto;
}
.doc-header {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}
.doc-h1 {
  font-size: clamp(1.1rem, 1.5vw + 0.5rem, 1.35rem);
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.65rem;
}
.doc-h2 {
  font-size: clamp(0.88rem, 1vw + 0.4rem, 0.98rem);
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.4rem;
}
.doc-p {
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.5;
}
.sim-cursor {
  position: absolute;
  top: 180px;
  left: 240px;
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
  z-index: 50;
}
.click-ripple {
  position: absolute;
  top: -8px;
  left: -8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #ef4444;
  opacity: 0;
  transform: scale(0.5);
}
.click-ripple.animate {
  animation: ripple 0.6s ease-out;
}
@keyframes ripple {
  0% { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}
.som-tag {
  position: absolute;
  background: #ef4444;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  z-index: 40;
}

/* Telemetry Body */
.telemetry-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 0.85rem;
}
.telem-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 0.35rem;
  font-weight: 600;
}
.router-decision {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
}
.json-code {
  background: #080b12;
  border: 1px solid var(--border-color);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #38bdf8;
  max-height: 180px;
  overflow: auto;
}
.token-meter {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
}
.token-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.25rem;
  font-size: 0.82rem;
}
.text-green { color: #10b981; }

/* Architecture Tabs */
.arch-tabs-wrapper {
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  -webkit-overflow-scrolling: touch;
}
.arch-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  min-width: max-content;
  margin: 0 auto;
}
.arch-tab {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.6rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.arch-tab.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}
.arch-content-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw + 0.5rem, 2.5rem);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}
.arch-panel {
  display: none;
}
.arch-panel.active {
  display: block;
}
.arch-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: center;
}
.arch-info h3 {
  font-size: 1.45rem;
  margin-bottom: 0.85rem;
  color: var(--text-main);
}
.arch-info p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}
.feature-list {
  list-style: none;
}
.feature-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  color: #cbd5e1;
  font-size: 0.92rem;
}
.feature-list li::before {
  content: "✔";
  position: absolute;
  left: 0;
  color: var(--accent-cyan);
  font-weight: 700;
}
.code-box-header {
  background: #080b12;
  border: 1px solid var(--border-color);
  border-bottom: none;
  padding: 0.4rem 0.85rem;
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}
.copy-code-btn {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.72rem;
  transition: all 0.15s;
}
.copy-code-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.1);
}
.arch-code pre, .qs-card pre {
  background: #080b12;
  border: 1px solid var(--border-color);
  padding: 1.25rem;
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: #38bdf8;
  overflow-x: auto;
  max-width: 100%;
  box-sizing: border-box;
}
.arch-code pre code, .qs-card pre code {
  white-space: pre;
  display: block;
  font-family: inherit;
  font-size: inherit;
}
.arch-code pre::-webkit-scrollbar, .qs-card pre::-webkit-scrollbar {
  height: 6px;
}
.arch-code pre::-webkit-scrollbar-track, .qs-card pre::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}
.arch-code pre::-webkit-scrollbar-thumb, .qs-card pre::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.4);
  border-radius: 3px;
}
.arch-code pre::-webkit-scrollbar-thumb:hover, .qs-card pre::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.7);
}

/* Builder Section */
.builder-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.builder-form-card, .builder-preview-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: clamp(1.25rem, 2.5vw + 0.5rem, 1.75rem);
}
.form-group {
  margin-bottom: 1.5rem;
}
.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.65rem;
}
.radio-group, .checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: #cbd5e1;
}
.range-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
}
.form-range {
  width: 50%;
  accent-color: var(--primary);
  cursor: pointer;
}
.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.preview-tabs {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
}
.preview-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.preview-tab.active {
  background: var(--bg-card-alt);
  color: var(--text-main);
}
.preview-code {
  background: #080b12;
  border: 1px solid var(--border-color);
  padding: 1rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #cbd5e1;
  height: 380px;
  overflow-y: auto;
}

/* Charts & Benchmarks */
.chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}
.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}
.chart-header h3 {
  font-size: 1rem;
  font-weight: 600;
}
.chart-body {
  position: relative;
  height: 250px;
  width: 100%;
}
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}
.benchmark-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
  min-width: 680px;
}
.benchmark-table th {
  background: #0f1422;
  color: var(--text-muted);
  font-weight: 600;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}
.benchmark-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  white-space: nowrap;
}
.benchmark-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Quickstart Cards */
.quickstart-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  width: 100%;
  box-sizing: border-box;
}
.qs-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.qs-num {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  font-size: 1.8rem;
  font-weight: 800;
  color: rgba(99, 102, 241, 0.25);
  font-family: var(--font-mono);
}
.qs-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}
.qs-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  flex: 1;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 2.5rem 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.footer-container {
  max-width: 960px;
  margin: 0 auto;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}
.footer-copy {
  font-size: 0.78rem;
  color: #64748b;
}

/* Floating Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

/* ==============================================================================
 * RESPONSIVE MEDIA QUERIES (BREAKPOINTS)
 * ============================================================================== */

/* Laptop / Standard Desktop Screens (<= 1240px) */
@media (max-width: 1240px) {
  .quickstart-steps {
    grid-template-columns: 1fr;
    max-width: 820px;
    margin: 0 auto;
  }
  .tri-pane-grid {
    grid-template-columns: 1fr;
  }
  .pane-card {
    height: 440px;
  }
  .hero-metrics-bar {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tablet / Medium Screens (<= 992px) */
@media (max-width: 992px) {
  .hero-metrics-bar {
    grid-template-columns: repeat(2, 1fr);
  }
  .arch-grid {
    grid-template-columns: 1fr;
  }
  .builder-grid {
    grid-template-columns: 1fr;
  }
  .chart-grid {
    grid-template-columns: 1fr;
  }
  .quickstart-steps {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
  .tri-pane-grid {
    grid-template-columns: 1fr;
  }
  .pane-card {
    height: 420px;
  }
}

/* Mobile Screens (<= 768px) */
@media (max-width: 768px) {
  .mobile-menu-btn {
    display: flex;
  }
  .nav-links {
    position: fixed;
    top: 61px;
    left: 0;
    right: 0;
    background: rgba(11, 15, 25, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 2rem 1.5rem;
    gap: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: translateY(-120%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 999;
  }
  .nav-links.open {
    transform: translateY(0);
  }
  .nav-link {
    font-size: 1.05rem;
    width: 100%;
    text-align: center;
    padding: 0.5rem;
  }
  .nav-btn {
    width: 100%;
    justify-content: center;
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .sim-control-panel {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }
  .sim-scenario-selector {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }
  .sim-scenario-selector .form-select {
    width: 100%;
  }
  .sim-button-group {
    justify-content: space-between;
    width: 100%;
  }
  .sim-button-group .sim-btn {
    flex: 1;
    text-align: center;
    padding: 0.5rem 0.25rem;
    font-size: 0.8rem;
  }
  .sim-status-indicators {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }
  .sim-step-progress-track {
    width: 120px;
  }
  .back-to-top {
    bottom: 1.25rem;
    right: 1.25rem;
  }
}

/* Very Small Mobile Screens (<= 480px) */
@media (max-width: 480px) {
  .hero-metrics-bar {
    grid-template-columns: 1fr;
  }
  .metric-card {
    padding: 0.85rem;
  }
  .sim-view-filter-bar {
    flex-direction: column;
  }
  .filter-pills {
    width: 100%;
    justify-content: center;
  }
  .view-pill {
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
  }
  .doc-h1 {
    font-size: 1.1rem;
  }
  .chart-body {
    height: 220px;
  }
}
