/* ==========================================================================
   Ayentra Design System: Clean Editorial Light & Strict Usability Tokens
   ========================================================================== */

:root {
  --bg-app: #F6F5F2;
  --bg-surface: #FCFCFA;
  --bg-card: #FFFFFF;
  --bg-code: #14171A;
  --bg-code-surface: #1E2228;

  --border-subtle: #E6E3DC;
  --border-default: #D5D0C5;
  --border-strong: #B8B2A6;
  --border-dark: #2D333B;

  /* Consolidated 8-Color Text Token System */
  --text-primary: #191B1F;
  --text-secondary: #525761;
  --text-muted: #6E7683;
  --text-inverse: #FFFFFF;
  --text-code: #E2E8F0;
  --text-code-muted: #94A3B8;

  --accent-terracotta: #C85A32;
  --accent-terracotta-soft: #FBF0EB;
  --accent-green: #166534;
  --accent-green-soft: #DCFCE7;
  --accent-blue: #0969DA;
  --accent-blue-soft: #EBF0F7;
  --accent-danger: #991B1B;
  --accent-danger-soft: #FEE2E2;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;

  /* Consolidated 4-Step Radius Scale */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 9999px;

  --shadow-sm: 0 1px 2px rgba(20, 22, 26, 0.05);
  --shadow-md: 0 4px 12px rgba(20, 22, 26, 0.07);
  --shadow-lg: 0 10px 28px rgba(20, 22, 26, 0.1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  overflow-x: hidden;
}

/* ==========================================================================
   Consolidated Button System (3 Variants: Primary, Secondary, Ghost)
   ========================================================================== */
.btn-primary,
.btn-run {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--text-primary);
  color: var(--text-inverse);
  border: 1px solid var(--text-primary);
  padding: 8px 16px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover,
.btn-run:hover {
  background-color: var(--accent-terracotta);
  border-color: var(--accent-terracotta);
}

.btn-run.loading {
  opacity: 0.75;
  cursor: wait;
}

.btn-secondary,
.cli-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background-color: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  padding: 8px 14px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover,
.cli-copy-btn:hover {
  background-color: var(--bg-surface);
  border-color: var(--border-strong);
}

.quickstart-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background-color: var(--bg-code-surface);
  color: var(--text-code);
  border: 1px solid var(--border-dark);
  padding: 6px 12px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.quickstart-copy-btn:hover {
  border-color: var(--text-code-muted);
}

.quickstart-copy-btn.copied {
  background-color: var(--accent-green);
  border-color: var(--accent-green);
  color: var(--text-inverse);
}

.receipt-copy-link {
  background: transparent;
  border: 1px solid var(--border-dark);
  color: var(--text-code);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.receipt-copy-link:hover {
  border-color: var(--text-code-muted);
}

/* ==========================================================================
   Navigation Header (Simplified to 5 Top-Level Links, Zero Overflow)
   ========================================================================== */
.nav-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(246, 245, 242, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

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

.brand-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.brand-pill {
  font-size: 12px;
  font-weight: 600;
  background-color: var(--border-subtle);
  color: var(--text-secondary);
  padding: 2px 10px;
  border-radius: var(--radius-pill);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
  flex-wrap: wrap;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 100%;
}

/* ==========================================================================
   Hero Section (Clear Visual Hierarchy Between Primary CTA and Pip Command)
   ========================================================================== */
.hero-section {
  padding: 64px 24px 48px;
  max-width: 1040px;
  margin: 0 auto;
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-green);
  border-radius: var(--radius-pill);
}

.hero-title {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.hero-title-accent {
  color: var(--accent-terracotta);
}

.hero-subtitle {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 32px;
}

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

.hero-primary-cta {
  padding: 10px 22px;
  font-size: 14px;
}

.cli-badge-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 4px 6px 4px 14px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  max-width: 100%;
}

.cli-badge-group:hover {
  border-color: var(--border-strong);
}

.cli-badge-code {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 600;
}

.cli-badge-code span {
  color: var(--text-muted);
  user-select: none;
}

.hero-proof-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  font-size: 14px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.hero-proof-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.check-icon {
  color: var(--accent-green);
  font-weight: 700;
}

/* ==========================================================================
   Shared Section Headers &Unified Tab System
   ========================================================================== */
.demo-section,
.difference-section,
.table-section,
.cli-section,
.quickstart-section,
.benchmark-section,
.sbom-section {
  padding: 64px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header-centered {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 32px;
}

.section-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-terracotta);
  margin-bottom: 8px;
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.section-desc,
.section-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 720px;
  margin: 0 auto;
}

/* Unified Folder-Tab Navigation for Quickstart, CLI, and SBOM */
.quickstart-card {
  background-color: var(--bg-code);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--border-dark);
  color: var(--text-code);
  display: flex;
  flex-direction: column;
}

.quickstart-nav {
  background-color: var(--bg-code);
  border-bottom: 1px solid var(--border-dark);
  padding: 8px 16px 0;
}

.quickstart-tabs,
.scenario-tabs {
  display: flex;
  gap: 6px;
  align-items: center;
  overflow-x: auto;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.quickstart-tabs::-webkit-scrollbar,
.scenario-tabs::-webkit-scrollbar {
  display: none;
}

.quickstart-tab,
.scenario-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
  padding: 10px 16px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-code-muted);
  cursor: pointer;
  white-space: nowrap;
  margin-bottom: -1px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.quickstart-tab:hover {
  color: var(--text-code);
  background-color: rgba(255, 255, 255, 0.04);
}

.quickstart-tab.active {
  color: var(--text-inverse);
  background-color: var(--bg-code-surface);
  border-color: var(--border-dark);
  border-top: 2px solid var(--accent-terracotta);
  border-bottom: 1px solid var(--bg-code-surface);
}

/* Light-surface folder tabs for Demo Scenarios */
.demo-scenario-bar {
  background-color: var(--bg-app);
  border-bottom: 1px solid var(--border-default);
  padding: 8px 16px 0;
}

.scenario-tab {
  color: var(--text-secondary);
}

.scenario-tab:hover {
  color: var(--text-primary);
  background-color: var(--bg-surface);
}

.scenario-tab.active {
  color: var(--text-primary);
  background-color: var(--bg-card);
  border-color: var(--border-default);
  border-top: 2px solid var(--accent-terracotta);
  border-bottom: 1px solid var(--bg-card);
}

.quickstart-tab-icon {
  font-size: 14px;
}

/* ==========================================================================
   Interactive Demo Section (Grouped Controls & Line Number Gutter)
   ========================================================================== */
.demo-container {
  background-color: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.demo-toolbar {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.view-mode-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: var(--bg-app);
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
}

.view-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
}

.view-tab.active {
  background-color: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.demo-action-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-left: 16px;
  border-left: 1px solid var(--border-default);
}

.demo-shortcut-hint {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.kbd-badge {
  background-color: var(--border-subtle);
  color: var(--text-primary);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.demo-workspace {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  min-height: 500px;
}

@media (max-width: 900px) {
  .demo-workspace {
    grid-template-columns: 1fr;
  }
  .demo-action-group {
    border-left: none;
    padding-left: 0;
  }
}

.code-pane {
  background-color: var(--bg-card);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pane-header {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.pane-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pane-file-title {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.pane-tag,
.status-pill,
.pass-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.tag-contract,
.pill-info {
  background-color: var(--accent-blue-soft);
  color: var(--accent-blue);
}

.tag-verified,
.pill-pass,
.pass-badge {
  background-color: var(--accent-green-soft);
  color: var(--accent-green);
}

.tag-violation,
.pill-fail {
  background-color: var(--accent-danger-soft);
  color: var(--accent-danger);
}

.editor-wrapper {
  padding: 16px 0;
  overflow-x: auto;
  flex: 1;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
}

pre.code-block {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-primary);
}

/* Line Number Gutter */
.code-line-row {
  display: flex;
  padding: 0 20px 0 0;
}

.code-line-row:hover {
  background-color: var(--bg-surface);
}

.line-num {
  width: 44px;
  min-width: 44px;
  padding-right: 12px;
  text-align: right;
  color: var(--text-muted);
  user-select: none;
  border-right: 1px solid var(--border-subtle);
  margin-right: 14px;
  font-size: 12px;
}

.line-code {
  white-space: pre;
}

/* Syntax Tokens (Consolidated Palette) */
.kw, .syn-key { color: var(--accent-blue); font-weight: 600; }
.fn, .syn-sec { color: var(--text-primary); font-weight: 700; }
.str, .syn-str { color: var(--accent-green); }
.dec, .num, .syn-num, .syn-bool { color: var(--accent-terracotta); font-weight: 600; }
.cmt, .syn-comment { color: var(--text-muted); font-style: italic; }

/* Dark code block overrides */
.terminal-body .syn-key,
.quickstart-code .syn-key { color: var(--accent-blue); }
.terminal-body .syn-str,
.quickstart-code .syn-str,
.terminal-body .syn-sec,
.quickstart-code .syn-sec { color: var(--accent-green); }
.terminal-body .syn-num,
.quickstart-code .syn-num,
.terminal-body .syn-bool,
.quickstart-code .syn-bool { color: var(--accent-terracotta); }
.terminal-body .syn-comment,
.quickstart-code .syn-comment { color: var(--text-code-muted); }

/* Inspector Pane */
.inspector-pane {
  background-color: var(--bg-surface);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.inspector-body {
  padding: 20px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}

.empty-state-icon {
  font-size: 28px;
  margin-bottom: 12px;
}

.empty-state-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.empty-state-text {
  font-size: 14px;
  max-width: 300px;
  line-height: 1.5;
}

.step-card,
.sandbox-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}

.step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.step-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.step-meta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.meta-item {
  background-color: var(--bg-app);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.meta-label {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  display: block;
}

.meta-value {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-primary);
  font-weight: 600;
}

.counterexample-box {
  background-color: var(--accent-terracotta-soft);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-danger);
}

.counterexample-title {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
}

.sandbox-check-list {
  list-style: none;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sandbox-check-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}

.check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  font-weight: 600;
}

.check-status {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  color: var(--accent-green);
}

.receipt-card {
  background-color: var(--bg-code);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  color: var(--text-code);
  font-family: var(--font-mono);
  font-size: 12px;
}

.receipt-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--border-dark);
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.receipt-tag {
  color: var(--accent-green);
  font-weight: 700;
}

.receipt-kv {
  display: flex;
  justify-content: space-between;
  line-height: 1.6;
}

.receipt-key {
  color: var(--text-code-muted);
}

.receipt-val {
  color: var(--text-code);
}

/* ==========================================================================
   Feature Cards & 4-Stage Architecture Loop
   ========================================================================== */
.cards-grid-three {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.cards-grid-four {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 28px;
  margin-bottom: 28px;
}

@media (max-width: 900px) {
  .cards-grid-three,
  .cards-grid-four {
    grid-template-columns: 1fr;
  }
}

.feature-card,
.difference-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.feature-icon-badge {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-bottom: 16px;
  font-weight: 700;
}

.icon-race {
  background-color: var(--accent-terracotta-soft);
  color: var(--accent-terracotta);
}

.icon-shrink {
  background-color: var(--accent-blue-soft);
  color: var(--accent-blue);
}

.icon-sandbox {
  background-color: var(--accent-green-soft);
  color: var(--accent-green);
}

.feature-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.feature-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 16px;
  flex: 1;
}

.feature-code-snippet {
  background-color: var(--bg-app);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-primary);
  line-height: 1.5;
  white-space: pre-wrap;
}

.how-section {
  padding: 64px 24px;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.how-container {
  max-width: 1200px;
  margin: 0 auto;
}

.workflow-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 32px;
}

@media (max-width: 900px) {
  .workflow-steps {
    grid-template-columns: 1fr;
  }
}

.workflow-step {
  background-color: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 20px;
}

.step-num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-terracotta);
  margin-bottom: 8px;
}

.step-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.step-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ==========================================================================
   Tables (Comparison, Dogfood, 15-Target Latency Matrix, SBOM)
   ========================================================================== */
.table-wrapper,
.data-table-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-top: 24px;
}

.data-table-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.table-scroll {
  overflow-x: auto;
}

table.comp-table,
table.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

table.comp-table th,
table.comp-table td,
table.data-table th,
table.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

table.comp-table th,
table.data-table th {
  background-color: var(--bg-surface);
  font-weight: 700;
  color: var(--text-secondary);
  font-size: 12px;
}

table.data-table th.num-col,
table.data-table td.num-col {
  text-align: right;
  font-family: var(--font-mono);
}

table.data-table th.center-col,
table.data-table td.center-col {
  text-align: center;
}

table.comp-table th.col-ayentra {
  background-color: var(--accent-terracotta-soft);
  color: var(--accent-terracotta);
}

table.comp-table td.col-ayentra {
  background-color: var(--bg-surface);
  font-weight: 600;
}

.check-yes {
  color: var(--accent-green);
  font-weight: 700;
}

.check-no {
  color: var(--text-muted);
}

/* ==========================================================================
   Terminal Cards & Code Snippets (Overflow-Safe)
   ========================================================================== */
.cli-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 28px;
}

@media (max-width: 850px) {
  .cli-grid {
    grid-template-columns: 1fr;
  }
}

.terminal-card {
  background-color: var(--bg-code);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  border: 1px solid var(--border-dark);
  color: var(--text-code);
  display: flex;
  flex-direction: column;
}

.terminal-bar {
  background-color: var(--bg-code-surface);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border-dark);
  flex-wrap: wrap;
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-pill);
  background-color: var(--border-dark);
}

.terminal-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-code-muted);
  font-weight: 600;
}

.terminal-body,
.quickstart-terminal-body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  flex: 1;
  overflow-x: auto;
  max-width: 100%;
}

.quickstart-code,
.quickstart-code-pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-code);
  white-space: pre-wrap;
  word-break: break-all;
  max-width: 100%;
}

.term-line {
  margin-bottom: 12px;
}

.term-cmd {
  color: var(--accent-blue);
  font-family: var(--font-mono);
}

.term-out {
  color: var(--text-code-muted);
}

.term-highlight {
  color: var(--accent-green);
}

/* Code Snippet Pill with Copy Affordance (Replaces Button-Like Text) */
.cmd-snippet-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: var(--bg-app);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-primary);
  max-width: 100%;
  overflow-x: auto;
}

/* ==========================================================================
   PR Bot Simulation Cards
   ========================================================================== */
.pr-bot-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
  color: var(--text-primary);
}

.pr-bot-header {
  background-color: var(--bg-surface);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.pr-bot-author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.pr-bot-avatar {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-sm);
  background-color: var(--text-primary);
  color: var(--text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.pr-bot-badge {
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  background-color: var(--accent-blue-soft);
  color: var(--accent-blue);
}

.pr-bot-body {
  padding: 16px;
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.55;
}

.pr-bot-risk-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 12px;
  margin-bottom: 12px;
}

.risk-critical,
.risk-high {
  background-color: var(--accent-danger-soft);
  color: var(--accent-danger);
}

.pr-diff-container {
  margin: 12px 0;
  background-color: var(--bg-code);
  border-radius: var(--radius-md);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
}

.pr-diff-header {
  background-color: var(--bg-code-surface);
  color: var(--text-code-muted);
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-dark);
  display: flex;
  justify-content: space-between;
}

.pr-diff-content {
  padding: 10px 12px;
  overflow-x: auto;
  color: var(--text-code);
}

.diff-line {
  display: block;
  white-space: pre;
}

.diff-add {
  color: var(--accent-green);
  background-color: rgba(46, 160, 67, 0.15);
}

.diff-del {
  color: var(--accent-terracotta);
  background-color: rgba(248, 81, 73, 0.15);
}

.diff-hunk {
  color: var(--accent-blue);
}

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

/* ==========================================================================
   Metric Cards, AST Pills, Studio Callout & Footer
   ========================================================================== */
.metric-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.metric-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.metric-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.ast-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--bg-app);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 12px;
  color: var(--text-secondary);
}

.ast-pill code {
  font-family: var(--font-mono);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 12px;
}

.studio-callout-section {
  padding: 48px 24px 80px;
  max-width: 1040px;
  margin: 0 auto;
}

.studio-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.studio-info h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.studio-info p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 520px;
}

footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 40px 24px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 14px;
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-link:hover {
  color: var(--text-primary);
}

.toast-notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: var(--text-primary);
  color: var(--text-inverse);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.2s ease;
  z-index: 1000;
}

.toast-notice.show {
  transform: translateY(0);
  opacity: 1;
}


#code-supply-chain-req,
#code-sbom-req {
  display: block;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  max-width: 100%;
}

/* ==========================================================================
   Comprehensive Mobile & Tablet Responsive Adaptations (Zero Overflow)
   ========================================================================== */
@media (max-width: 768px) {
  .hero-section {
    padding: 44px 16px 36px;
  }

  .hero-title {
    font-size: clamp(28px, 7vw, 38px);
    line-height: 1.2;
    margin-bottom: 16px;
  }

  .hero-subtitle {
    font-size: 15px;
    line-height: 1.55;
    margin-bottom: 24px;
    padding: 0 4px;
  }

  .hero-cta-group {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }

  .hero-primary-cta {
    width: 100%;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
  }

  .cli-badge-group {
    width: 100%;
    justify-content: space-between;
    box-sizing: border-box;
  }

  .hero-proof-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    width: fit-content;
    margin: 0 auto;
    font-size: 13px;
  }

  .nav-container {
    padding: 10px 16px;
    gap: 12px;
  }

  .nav-links {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    max-width: 100%;
    gap: 14px;
    padding: 4px 0;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-link {
    font-size: 13px;
    white-space: nowrap;
  }

  .demo-section,
  .difference-section,
  .table-section,
  .cli-section,
  .quickstart-section,
  .benchmark-section,
  .sbom-section,
  .how-section {
    padding: 40px 16px;
  }

  .demo-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px 14px;
  }

  .view-mode-tabs {
    width: 100%;
    display: flex;
    box-sizing: border-box;
  }

  .view-tab {
    flex: 1;
    justify-content: center;
    text-align: center;
    font-size: 13px;
    padding: 8px 10px;
  }

  .demo-action-group {
    padding-left: 0;
    border-left: none;
    width: 100%;
    justify-content: stretch;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .demo-action-group .btn-secondary,
  .demo-action-group .btn-run {
    flex: 1 1 calc(50% - 8px);
    min-width: 120px;
    justify-content: center;
    box-sizing: border-box;
  }

  .demo-shortcut-hint {
    display: none;
  }

  .step-meta-row {
    grid-template-columns: 1fr;
  }

  .workflow-steps {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .studio-callout-section {
    padding: 32px 16px 48px;
  }

  .studio-card {
    padding: 24px 18px;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }

  .footer-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
  }

  .data-table {
    min-width: 580px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 26px;
  }

  .nav-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .nav-actions .btn-secondary,
  .nav-actions .btn-primary {
    padding: 6px 12px !important;
    font-size: 12.5px !important;
  }

  #portal-license-input {
    min-width: 0 !important;
    width: 100%;
  }

  .demo-action-group .btn-secondary,
  .demo-action-group .btn-run {
    flex: 1 1 100%;
    width: 100%;
  }

  .scenario-tab,
  .quickstart-tab {
    padding: 8px 12px;
    font-size: 13px;
  }
}

/* ==========================================================================
   Modals, Cookie Banner & Legal Links
   ========================================================================== */
.footer-modal-link {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  font-family: inherit;
}

.footer-modal-link:hover {
  color: var(--text-primary);
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-default);
  padding: 14px 24px;
  z-index: 999;
  box-shadow: var(--shadow-lg);
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-secondary);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.modal-body h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 14px 0 6px;
}

.modal-body h4:first-child {
  margin-top: 0;
}

.modal-body p {
  margin-bottom: 10px;
}

.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  background-color: var(--bg-app);
}
