/* ========================================
   KYRA MDR - Terminal / Matrix Theme
   ======================================== */

:root {
  --bg: #0a0a0a;
  --bg-terminal: #0d1117;
  --bg-terminal-header: #161b22;
  --green: #00ff41;
  --green-dim: #00cc33;
  --green-dark: #003b00;
  --accent: #00ff41;
  --text: #c9d1d9;
  --text-dim: #6e7681;
  --text-bright: #e6edf3;
  --red: #ff3333;
  --yellow: #ffcc00;
  --blue: #58a6ff;
  --border: #21262d;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --glow: 0 0 10px rgba(0, 255, 65, 0.3);
}

/* Screen-reader only (SEO h1) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  animation: pageBlurIn 0.4s ease-out;
  overflow-anchor: auto;
  scroll-padding-top: 64px;
}

body {
  font-family: var(--font-mono);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--green);
  text-decoration: none;
  transition: color 0.2s, text-shadow 0.2s;
}

a:hover {
  color: #33ff66;
  text-shadow: var(--glow);
}

::selection {
  background: var(--green);
  color: var(--bg);
}

/* Matrix Canvas */
#matrix-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.06;
  pointer-events: none;
}

/* Scanline */
.scanline {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
}

/* Container */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Navigation */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}

.nav-logo {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}

.nav-links a {
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 400;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--green);
  text-shadow: none;
}

.nav-cta {
  color: var(--green) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  border: 1px solid var(--green-dark);
  padding: 6px 16px;
  border-radius: 4px;
  transition: all 0.2s !important;
  white-space: nowrap;
}

.nav-cta:hover {
  background: rgba(0, 255, 65, 0.08) !important;
  border-color: var(--green) !important;
}

.nav-signup {
  color: #111 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  background: var(--green) !important;
  padding: 6px 18px;
  border-radius: 4px;
  transition: all 0.2s !important;
  white-space: nowrap;
}

.nav-signup:hover {
  background: #00cc41 !important;
  text-shadow: none !important;
}

/* Pricing footer (scale text + CTA) — pushed to bottom */
.tier-footer {
  margin-top: auto;
  padding-top: 16px;
}

.tier-footer .output {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Pricing CTA buttons — base */
.tier-cta {
  display: inline-block;
  padding: 10px 24px;
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.2s;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border);
  color: var(--text);
  background: transparent;
}

.tier-cta:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--text-dim);
}

/* FREE — ghost/dim outline */
.tier-cta-free {
  border-color: var(--text-dim);
  color: var(--text);
}

.tier-cta-free:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--text);
  color: var(--text-bright);
}

/* MDR — filled green (primary) */
.tier-cta-featured {
  background: var(--green);
  color: #0a0a0a;
  border-color: var(--green);
  font-weight: 700;
  box-shadow: 0 0 12px rgba(0, 255, 65, 0.25);
}

.tier-cta-featured:hover {
  background: #00cc41;
  border-color: #00cc41;
  color: #0a0a0a;
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.4);
}

/* PRO — filled blue */
.tier-cta-pro {
  background: var(--blue);
  color: #0a0a0a;
  border-color: var(--blue);
  font-weight: 700;
  box-shadow: 0 0 12px rgba(88, 166, 255, 0.2);
}

.tier-cta-pro:hover {
  background: #79b8ff;
  border-color: #79b8ff;
  color: #0a0a0a;
  box-shadow: 0 0 20px rgba(88, 166, 255, 0.35);
}

/* CUSTOM — bright outline */
.tier-cta-custom {
  border-color: var(--text-bright);
  color: var(--text-bright);
}

.tier-cta-custom:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #fff;
  color: #fff;
}

/* Signup form */
.signup-wrapper {
  max-width: 520px;
  margin: 0 auto;
}

.signup-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.signup-field {
  display: flex;
  align-items: center;
  gap: 12px;
}

.signup-field .label {
  min-width: 120px;
  font-size: 13px;
  text-align: right;
  flex-shrink: 0;
}

.signup-input {
  flex: 1;
  background: rgba(0, 255, 65, 0.04);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 4px;
  outline: none;
  transition: border-color 0.2s;
}

.signup-input:focus {
  border-color: var(--green-dark);
}

.signup-input::placeholder {
  color: var(--text-dim);
  opacity: 0.5;
}

.signup-btn {
  margin-top: 4px;
  cursor: pointer;
  font-family: var(--mono);
}

.signup-btn:disabled {
  opacity: 0.5;
  cursor: wait;
}

.signup-error {
  color: #ff6b6b;
  font-size: 13px;
  padding: 8px 0;
}

.signup-success {
  color: var(--green);
  font-size: 13px;
  padding: 8px 0;
}

/* Google OAuth signup button */
.google-signup-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  background: #ffffff;
  color: #1f1f1f;
  border: 1px solid #dadce0;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: box-shadow 0.2s, background 0.2s;
}

.google-signup-btn:hover {
  background: #f8f9fa;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
}

.google-signup-btn .google-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.signup-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 16px 0 12px;
  font-size: 11px;
  color: var(--dim);
  font-family: var(--mono);
}

.signup-divider::before,
.signup-divider::after {
  content: '';
  flex: 1;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.signup-divider span {
  padding: 0 12px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  transition: 0.2s;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 52px;
}

.hero-terminal {
  max-width: 750px;
}

.hero-ascii pre {
  color: var(--green);
  font-size: 11px;
  line-height: 1.2;
  margin-bottom: 24px;
  text-shadow: 0 0 20px rgba(0, 255, 65, 0.4);
  overflow-x: auto;
}

.hero-desc {
  margin: 8px 0 16px 0;
}

.status-grid {
  display: grid;
  gap: 4px;
  margin: 8px 0 16px 0;
}

.status-item {
  display: flex;
  gap: 16px;
}

.status-item .label {
  color: var(--text-dim);
  min-width: 180px;
}

.cursor-line {
  margin-top: 8px;
}

/* Terminal Window */
.terminal-window {
  background: var(--bg-terminal);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-terminal-header);
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }

.terminal-title {
  color: var(--text-dim);
  font-size: 11px;
  margin-left: 8px;
}

.terminal-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Text Styles */
.prompt {
  color: var(--green);
  font-weight: 700;
}

.cmd {
  color: var(--blue);
  font-weight: 500;
}

.output {
  color: var(--text);
}

.highlight {
  color: var(--green);
  font-weight: 500;
}

.dim {
  color: var(--text-dim) !important;
}

.ok {
  color: var(--green);
  font-weight: 700;
}

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

.blink {
  animation: blink-cursor 1s step-end infinite;
  color: var(--green);
  font-weight: 700;
}

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

/* Labels & Values */
.label {
  color: var(--blue);
  font-weight: 400;
  padding-right: 16px;
  white-space: nowrap;
}

.value {
  color: var(--text-bright);
}

/* Sections */
.section {
  padding: 80px 0;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 32px;
  letter-spacing: 0.5px;
}

.mt-2 {
  margin-top: 24px;
}

/* Grids */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  min-height: 480px;
}

/* Info Table */
.info-table {
  width: 100%;
  border-collapse: collapse;
}

.info-table tr {
  border-bottom: 1px solid rgba(33, 38, 45, 0.5);
}

.info-table tr:last-child {
  border-bottom: none;
}

.info-table td {
  padding: 6px 0;
  vertical-align: top;
}

.info-table td:first-child {
  color: var(--blue);
  padding-right: 20px;
  white-space: nowrap;
  width: 1%;
}

.info-table td:last-child {
  color: var(--text-dim);
  font-size: 12px;
}

/* Feature Comparison Table — overrides .info-table defaults */
.compare-table {
  table-layout: fixed;
}

.compare-table col:nth-child(1) { width: 36%; }
.compare-table col:nth-child(2) { width: 16%; }
.compare-table col:nth-child(3) { width: 16%; }
.compare-table col:nth-child(4) { width: 16%; }
.compare-table col:nth-child(5) { width: 16%; }

.compare-table td {
  padding: 6px 8px;
  font-size: 12px;
  vertical-align: middle;
  text-align: center;
  color: var(--text);
}

.compare-table td:first-child {
  text-align: left;
  white-space: normal;
  color: var(--blue);
  font-size: 12px;
}

.compare-table td:last-child {
  color: var(--text);
  font-size: 12px;
}

.compare-table td .ok {
  color: var(--green);
}

.compare-table td.dim {
  color: var(--text-dim);
  opacity: 0.4;
}

.compare-table thead td {
  font-weight: 600;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.compare-table tr.compare-section td {
  text-align: left;
  color: var(--blue);
  font-weight: 600;
  font-size: 12px;
  padding-top: 16px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(88, 166, 255, 0.2);
}

/* Tree View */
.tree-view {
  margin: 8px 0;
}

/* Bar Chart */
.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.bar-label {
  color: var(--text-dim);
  font-size: 11px;
  min-width: 140px;
  text-align: right;
}

.bar {
  flex: 1;
  height: 12px;
  background: rgba(0, 255, 65, 0.06);
  border-radius: 2px;
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--green-dark), var(--green-dim));
  border-radius: 2px;
  transition: width 1.5s ease;
  box-shadow: 0 0 8px rgba(0, 255, 65, 0.2);
}

.bar-val {
  color: var(--green);
  font-size: 11px;
  min-width: 36px;
  text-align: right;
  font-weight: 500;
}

/* MITRE Grid */
.mitre-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
}

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

.mitre-name {
  font-size: 9px;
  color: var(--text-dim);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mitre-cells {
  display: flex;
  gap: 3px;
  justify-content: center;
}

.cell {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.cell.covered {
  background: var(--green-dark);
  border-color: var(--green-dim);
  box-shadow: 0 0 4px rgba(0, 255, 65, 0.15);
}

/* Method Grid */
.method-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.method-card {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: rgba(0, 255, 65, 0.01);
}

.method-title {
  color: var(--green);
  font-weight: 500;
  margin-bottom: 8px;
  font-size: 13px;
}

/* Flow Diagram */
.flow-diagram pre,
.arch-diagram,
.pipeline-flow {
  color: var(--text);
  font-size: 11px;
  line-height: 1.4;
  overflow-x: auto;
  white-space: pre;
  max-width: 100%;
}

/* Capability Grid */
.cap-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.cap-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.cap-icon {
  color: var(--green);
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Connectors */
.connector-section {
  margin-bottom: 16px;
}

.connector-category {
  color: var(--text-dim);
  font-size: 11px;
  margin-bottom: 8px;
  font-style: italic;
}

.connector-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.connector {
  font-size: 11px;
  color: var(--text-bright);
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: rgba(0, 255, 65, 0.02);
  transition: all 0.2s;
}

.connector:hover {
  border-color: var(--green-dim);
  background: rgba(0, 255, 65, 0.06);
  box-shadow: 0 0 8px rgba(0, 255, 65, 0.1);
}

/* Tier Cards */
.tier-card {
  transition: transform 0.3s, box-shadow 0.3s;
}

.tier-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.tier-card.featured {
  border-color: var(--green-dark);
  box-shadow: 0 0 24px rgba(0, 255, 65, 0.08);
}

.tier-card.featured:hover {
  box-shadow: 0 0 32px rgba(0, 255, 65, 0.15);
}

.tier-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: 2px;
  margin-bottom: 4px;
}

.tier-name.accent {
  color: var(--green);
  text-shadow: var(--glow);
}

.tier-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--green);
  margin: 6px 0 4px;
}

.tier-price-unit {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-dim);
}

.tier-price-annual {
  font-size: 11px;
  margin-bottom: 2px;
}

/* Showcase Section */
.showcase-section {
  padding-bottom: 40px;
}

.showcase-subtitle {
  color: var(--text-dim);
  font-size: 13px;
  margin-top: -24px;
  margin-bottom: 28px;
}

.showcase-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.showcase-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.showcase-tab:hover {
  color: var(--text);
}

.showcase-tab.active {
  color: var(--green);
  border-bottom-color: var(--green);
}

.showcase-viewport {
  position: relative;
  background: var(--bg-terminal);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.showcase-screen {
  display: none;
}

.showcase-screen.active {
  display: block;
  animation: showcaseFadeIn 0.3s ease;
}

@keyframes showcaseFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.showcase-screen img {
  width: 100%;
  height: auto;
  display: block;
}

.showcase-caption {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-terminal-header);
}

.showcase-caption .highlight {
  font-size: 13px;
}

.showcase-caption .dim {
  font-size: 11px;
  line-height: 1.5;
}

/* Compliance Grid */
.compliance-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.compliance-item {
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.compliance-item .highlight {
  font-size: 14px;
  margin-bottom: 4px;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  margin-top: 40px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  margin-bottom: 32px;
}

.footer-logo {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

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

.footer-links div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-links .highlight {
  font-size: 12px;
  margin-bottom: 4px;
}

.footer-links a {
  color: var(--text-dim);
  font-size: 12px;
}

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

.footer-link {
  color: var(--green) !important;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  text-align: center;
}

/* Animations */
@keyframes pageBlurIn {
  from { filter: blur(6px); opacity: 0.7; }
  to { filter: blur(0); opacity: 1; }
}

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

.section {
  animation: fadeInUp 0.6s ease-out;
}

/* Responsive */
@media (max-width: 900px) {
  .grid-2, .method-grid, .cap-grid {
    grid-template-columns: 1fr;
  }

  .grid-3, .grid-4 {
    grid-template-columns: 1fr;
    gap: 16px;
  }

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

  .mitre-grid {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  }
}

@media (max-width: 700px) {
  body {
    font-size: 12px;
  }

  .hero-ascii pre {
    font-size: 7px;
  }

  .container {
    padding: 0 16px;
  }

  .section {
    padding: 48px 0;
  }

  .terminal-body {
    padding: 16px;
  }

  .status-item .label {
    min-width: 120px;
  }

  .bar-label {
    min-width: 100px;
    font-size: 10px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.98);
    flex-direction: column;
    padding: 16px 24px;
    gap: 12px;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-signup,
  .nav-cta {
    text-align: center;
  }

  .footer-content {
    flex-direction: column;
    gap: 24px;
  }

  .footer-links {
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 4px;
  }

  .arch-diagram,
  .pipeline-flow,
  .flow-diagram pre {
    font-size: 9px;
  }

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

  .status-item .label {
    min-width: auto;
  }

  .info-table td:first-child {
    white-space: normal;
  }

  .install-option-code code {
    white-space: pre-wrap;
    word-break: break-all;
  }

  .install-arch-diagram {
    font-size: 8px;
    padding: 12px;
  }

  .hero-ascii pre {
    max-width: 100%;
  }

  .terminal-body {
    overflow-x: hidden;
  }

  .showcase-tabs {
    -webkit-overflow-scrolling: touch;
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-dim);
}

/* Print */
@media print {
  #matrix-bg, .scanline, #nav {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  .terminal-window {
    border: 1px solid #ccc;
    box-shadow: none;
  }
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  gap: 2px;
  margin-left: 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}

.lang-btn {
  background: transparent;
  color: var(--text-dim);
  border: none;
  padding: 4px 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.5px;
}

.lang-btn:hover {
  color: var(--green);
  background: var(--green-dark);
}

.lang-btn.active {
  color: var(--bg);
  background: var(--green);
  font-weight: 700;
}

@media (max-width: 768px) {
  .lang-switcher {
    position: absolute;
    top: 12px;
    right: 56px;
  }
}

/* ========================================
   Security Score CTA (Hero)
   ======================================== */
.score-section {
  padding: 0 0 20px;
  margin-top: -40px;
}
.score-cta {
  margin: 0;
  padding: 40px 32px;
  background: linear-gradient(135deg, rgba(0, 255, 65, 0.08), rgba(0, 200, 255, 0.05));
  border: 1px solid rgba(0, 255, 65, 0.25);
  border-radius: 12px;
  text-align: center;
}
.score-question {
  font-size: 22px;
  font-weight: 700;
  color: #00ff41;
  margin: 0 0 10px;
  letter-spacing: -0.5px;
  font-family: 'JetBrains Mono', monospace;
}
.score-sub {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 24px;
}
.score-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: #00ff41;
  color: #000;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  transition: all 0.2s;
}
.score-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 255, 65, 0.25);
  color: #000;
}
.score-btn-icon { font-size: 20px; transition: transform 0.2s; }
.score-btn:hover .score-btn-icon { transform: translateX(4px); }

/* ========================================
   Install Section
   ======================================== */
#install { padding: 40px 0 60px; }

.install-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 32px 0 0;
  max-width: 100%;
}

.install-card {
  background: rgba(0, 255, 65, 0.03);
  border: 1px solid rgba(0, 255, 65, 0.15);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s;
  overflow: hidden;
  min-width: 0;
}
.install-card:hover { border-color: rgba(0, 255, 65, 0.4); }

.install-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
}
.install-icon { font-size: 24px; flex-shrink: 0; }
.install-header h3 {
  font-size: 16px;
  color: #00ff41;
  font-family: 'JetBrains Mono', monospace;
  margin: 0;
  white-space: normal;
  word-break: keep-all;
}
.install-badge {
  background: rgba(0, 255, 65, 0.15);
  color: #00ff41;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  margin-left: auto;
  white-space: nowrap;
}

/* Linux card */
.install-code { cursor: pointer; }
.install-code code {
  font-size: 13px;
  color: #00ff41;
  word-break: break-all;
}
.btn-copy {
  margin: 10px 0 0;
  padding: 6px 16px;
  background: rgba(0, 255, 65, 0.1);
  border: 1px solid rgba(0, 255, 65, 0.3);
  color: #00ff41;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  transition: background 0.2s;
  align-self: flex-start;
}
.btn-copy:hover { background: rgba(0, 255, 65, 0.2); }

.install-desc {
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  line-height: 1.6;
  margin: 16px 0 0;
}
.install-options {
  margin: 16px 0 0;
  padding: 12px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.install-option-label {
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  margin: 0 0 6px;
  display: block;
}
.install-option-code {
  background: rgba(0, 0, 0, 0.3);
  padding: 8px 12px;
  border-radius: 6px;
  overflow-x: auto;
}
.install-option-code code {
  font-size: 11px;
  color: rgba(0, 255, 65, 0.7);
  white-space: nowrap;
}

/* Windows card */
.install-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  flex: 1;
}
.install-step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}
.step-num {
  width: 28px; height: 28px;
  background: rgba(0, 255, 65, 0.15);
  color: #00ff41;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

/* Architecture diagram */
.install-arch { margin: 40px 0 0; }
.install-arch-diagram {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 255, 65, 0.1);
  border-radius: 8px;
  padding: 24px;
  font-size: 13px;
  color: rgba(0, 255, 65, 0.6);
  overflow-x: auto;
  line-height: 1.6;
  white-space: pre;
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  max-width: 100%;
}

/* Responsive */
@media (max-width: 768px) {
  .install-grid { grid-template-columns: 1fr; }
  .score-question { font-size: 20px; }
  .score-btn { padding: 12px 24px; font-size: 14px; }
  .install-arch-diagram { font-size: 11px; padding: 16px; }
}

/* ========================================
   Contact Modal
   ======================================== */
.nav-contact {
  padding: 6px 16px;
  border: 1px solid #00ff41;
  border-radius: 6px;
  color: #00ff41;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.nav-contact:hover {
  background: rgba(0, 255, 65, 0.15);
}
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.modal-card {
  background: #0f172a;
  border: 1px solid rgba(0, 255, 65, 0.2);
  border-radius: 12px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.2s ease-out;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px 0;
}
.modal-dots {
  display: flex;
  gap: 6px;
}
.modal-header h3 {
  flex: 1;
  font-size: 14px;
  color: #00ff41;
  font-family: 'JetBrains Mono', monospace;
}
.modal-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
}
.modal-close:hover { color: #fff; }
.modal-form {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.modal-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 480px) {
  .modal-row { grid-template-columns: 1fr; }
}
.modal-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.modal-field label {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  font-family: 'JetBrains Mono', monospace;
}
.modal-field input,
.modal-field select,
.modal-field textarea {
  padding: 10px 12px;
  background: #0d1117;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  color: #e6edf3;
  font-size: 13px;
  outline: none;
  font-family: 'JetBrains Mono', monospace;
  width: 100%;
}
.modal-field input::placeholder,
.modal-field textarea::placeholder {
  color: rgba(255,255,255,0.25);
  font-family: 'JetBrains Mono', monospace;
}
.modal-field input:focus,
.modal-field select:focus,
.modal-field textarea:focus {
  border-color: rgba(0, 255, 65, 0.4);
}
.modal-field select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
  background-color: #0d1117;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2300ff41' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.modal-field select option {
  background-color: #0d1117;
  color: #e6edf3;
  padding: 8px;
}
.modal-submit {
  padding: 12px;
  background: #00ff41;
  color: #000;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-top: 4px;
}
.modal-submit:hover { opacity: 0.85; }
.modal-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.modal-result {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
}
.modal-result.success {
  background: rgba(34,197,94,0.15);
  color: #22c55e;
  border: 1px solid rgba(34,197,94,0.3);
}
.modal-result.error {
  background: rgba(239,68,68,0.15);
  color: #ef4444;
  border: 1px solid rgba(239,68,68,0.3);
}

/* Trust badges */
.trust-badges {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 32px;
}

.trust-badge {
  background: rgba(0,255,65,0.04);
  border: 1px solid rgba(0,255,65,0.15);
  border-radius: 8px;
  padding: 16px 24px;
  text-align: center;
  min-width: 140px;
}

/* ========================================
   Mobile Horizontal Scroll Fix
   ======================================== */
@media (max-width: 768px) {
  /* Global overflow containment */
  html, body {
    overflow-x: hidden;
    max-width: 100vw;
  }

  /* All sections and containers */
  .section, .container, .terminal-window, .terminal-body {
    max-width: 100vw;
    overflow-x: hidden;
  }

  /* Info tables: stack label/value vertically on mobile (NOT compare-table) */
  .info-table:not(.compare-table) {
    display: block;
    max-width: 100%;
  }

  .info-table:not(.compare-table) tbody,
  .info-table:not(.compare-table) tr {
    display: block;
    width: 100%;
  }

  .info-table:not(.compare-table) td {
    display: block;
    width: 100% !important;
    padding: 2px 0;
  }

  .info-table:not(.compare-table) td:first-child {
    white-space: normal;
    word-break: break-word;
    padding-right: 0;
    padding-top: 8px;
    font-size: 12px;
  }

  .info-table:not(.compare-table) td:last-child {
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(33, 38, 45, 0.3);
  }

  .info-table:not(.compare-table) tr {
    border-bottom: none;
  }

  .info-table:not(.compare-table) tr:last-child td:last-child {
    border-bottom: none;
  }

  /* Comparison table: sticky first column + horizontal scroll */
  .terminal-body:has(.compare-table) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-left: 0;
    padding-right: 0;
  }

  .compare-table {
    display: table;
    table-layout: fixed;
    min-width: 520px;
    font-size: 11px;
    border-collapse: separate;
    border-spacing: 0;
  }

  .compare-table colgroup { display: none; }

  .compare-table thead,
  .compare-table tbody {
    display: table-header-group;
  }
  .compare-table tbody { display: table-row-group; }

  .compare-table tr {
    display: table-row;
  }

  .compare-table td {
    display: table-cell;
    padding: 5px 8px;
    font-size: 11px;
    min-width: 80px;
    width: auto !important;
  }

  .compare-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #0d1117;
    font-size: 11px;
    white-space: normal;
    word-break: keep-all;
    min-width: 110px;
    max-width: 140px;
    padding: 5px 10px 5px 12px;
    border-right: 1px solid rgba(255,255,255,0.08);
    box-shadow: 2px 0 4px rgba(0,0,0,0.3);
  }

  .compare-table thead td:first-child,
  .compare-table tr.compare-section td:first-child {
    background: #0d1117;
  }

  .compare-table tr.compare-section td {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #0d1117;
    min-width: auto;
    max-width: none;
    box-shadow: none;
  }

  /* ASCII art: contain within viewport */
  .hero-ascii pre,
  .arch-diagram,
  .pipeline-flow,
  .flow-diagram pre,
  .install-arch-diagram {
    max-width: calc(100vw - 32px);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 7px;
  }

  /* Status items: allow wrapping */
  .status-item {
    flex-wrap: wrap;
  }

  .status-item .label {
    min-width: auto;
    white-space: normal;
  }

  .status-item .value {
    white-space: normal;
    word-break: break-word;
  }

  /* Bar chart labels */
  .bar-label {
    min-width: auto;
    white-space: normal;
    font-size: 10px;
  }

  /* Card grids */
  .cap-grid .card,
  .grid-4 > * {
    min-width: 0;
  }

  /* Install cards mobile */
  .install-card {
    padding: 16px;
  }

  .install-header {
    flex-wrap: wrap;
  }

  .install-header h3 {
    font-size: 14px;
  }

  .install-step {
    font-size: 12px;
  }

  .install-desc {
    font-size: 11px;
  }

  /* Install code blocks */
  .install-code code,
  .install-option-code code {
    white-space: pre-wrap;
    word-break: break-all;
    font-size: 11px;
  }

  /* Showcase tabs: horizontal scroll */
  .showcase-tabs {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .showcase-tabs::-webkit-scrollbar {
    display: none;
  }

  /* Compliance grid */
  .compliance-grid {
    grid-template-columns: 1fr;
  }

  /* Score CTA */
  .score-question {
    font-size: 16px;
    word-break: keep-all;
  }

  .score-btn {
    padding: 10px 20px;
    font-size: 13px;
  }

  /* Footer */
  .footer-links {
    flex-wrap: wrap;
    gap: 16px;
  }

  /* Trust badges: stack on mobile */
  .trust-badges {
    gap: 10px;
  }

  .trust-badge {
    min-width: 0;
    flex: 1 1 calc(50% - 10px);
    padding: 12px 16px;
  }

  .trust-badge .highlight {
    font-size: 1rem !important;
  }

  /* Grids: force single column */
  .grid-2, .grid-3, .grid-4,
  .method-grid, .cap-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  /* Compliance grid single column */
  .compliance-grid {
    grid-template-columns: 1fr !important;
  }

  /* Navigation: ensure burger menu works */
  .nav-links {
    display: none;
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.98);
    flex-direction: column;
    padding: 16px 24px;
    gap: 12px;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  /* Prevent any fixed-width child from overflowing */
  img, video, iframe, svg, canvas, pre, code, table {
    max-width: 100%;
  }

  pre {
    white-space: pre-wrap;
    word-break: break-word;
  }

  /* Inline max-width elements: constrain to viewport */
  [style*="max-width:600px"],
  [style*="max-width:400px"],
  [style*="max-width: 600px"],
  [style*="max-width: 400px"] {
    max-width: 90vw !important;
  }
}
