/**
 * Aira Antivirus — Stage 3: Technology Section Styles
 * Visual Direction: Premium Cybersecurity × AI Infrastructure
 * Strictly adhering to:
 * - tokens.css & primitives.css
 * - frontend-design (cybersecurity-first, zero SaaS clichés, deliberate typography)
 * - frontend-ui-engineering (mobile-first, 4px scale, responsive clamp, 44px touch targets)
 * - better-colors (semantic tokens, verified WCAG AA/AAA contrast)
 * - better-accessibility (visible focus, prefers-reduced-motion, semantic ARIA)
 */

/* ==========================================================================
   1. Section Shell & Geometry
   ========================================================================== */

.tech-section {
  position: relative;
  width: 100%;
  padding-top: clamp(var(--space-12), 7vw, var(--space-20));
  padding-bottom: clamp(var(--space-12), 7vw, var(--space-20));
  overflow: hidden;
  border-top: 1px solid var(--border-subtle);
}

/* Ambient glow accent */
.tech__glow {
  position: absolute;
  top: 25%;
  left: 5%;
  width: min(500px, 80vw);
  height: 420px;
  border-radius: 50%;
  pointer-events: none;
  z-index: var(--z-background);
  filter: blur(140px);
  opacity: 0.22;
  background: radial-gradient(
    ellipse at center,
    rgba(6, 182, 212, 0.35) 0%,
    rgba(59, 102, 255, 0.15) 50%,
    transparent 70%
  );
}

/* ==========================================================================
   2. Section Header
   ========================================================================== */

.tech__header {
  margin-bottom: clamp(var(--space-8), 5vw, var(--space-14));
}

.tech__title {
  font-family: var(--font-sans);
  font-size: clamp(2rem, 1.65rem + 1.8vw, 3.15rem);
  font-weight: var(--weight-bold);
  line-height: 1.15;
  letter-spacing: var(--tracking-tighter);
  color: var(--text-primary);
  margin-top: var(--space-3);
  margin-bottom: var(--space-4);
  max-width: 38ch;
  text-wrap: balance;
}

.tech__subtitle {
  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: 1.65;
  color: var(--color-neutral-200);
  max-width: var(--container-prose);
}

/* ==========================================================================
   3. Interactive Payload Simulator Box
   ========================================================================== */

.tech-sim-box {
  background-color: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-5), 3.5vw, var(--space-8));
  box-shadow: var(--shadow-lg);
  margin-bottom: clamp(var(--space-10), 6vw, var(--space-16));
  position: relative;
  overflow: hidden;
}

.tech-sim-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.45), rgba(59, 102, 255, 0.45), transparent);
}

/* Simulator Bar Top Controls */
.tech-sim__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--border-subtle);
}

.tech-sim__heading-group {
  max-width: 56ch;
}

.tech-sim__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-cyan-400);
  margin-bottom: var(--space-1);
}

.tech-sim__title {
  font-family: var(--font-sans);
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-1);
}

.tech-sim__title-icon {
  width: 14px;
  height: 14px;
  color: var(--color-cyan-400);
}

.tech-sim__desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-normal);
}

/* Scenario Selector Switcher */
.tech-sim__scenarios {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.tech-scenario-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4);
  min-height: var(--hit-target-min);
  background-color: var(--surface-subtle);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
}

.tech-scenario-btn:hover {
  background-color: var(--surface-interactive);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.tech-scenario-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.tech-scenario-btn.is-active {
  background-color: var(--surface-interactive-active);
  border-color: var(--border-accent);
  color: var(--text-primary);
  box-shadow: var(--glow-primary);
}

.tech-scenario-btn__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background-color: var(--color-neutral-600);
  transition: background-color var(--transition-fast);
}

.tech-scenario-btn--clean.is-active .tech-scenario-btn__dot,
.tech-scenario-btn--known.is-active .tech-scenario-btn__dot {
  background-color: var(--color-cyan-400);
  box-shadow: 0 0 8px var(--color-cyan-400);
}

.tech-scenario-btn--threat.is-active .tech-scenario-btn__dot {
  background-color: var(--status-danger);
  box-shadow: 0 0 8px var(--status-danger);
}

.tech-scenario-btn__text {
  display: flex;
  flex-direction: column;
}

.tech-scenario-btn__name {
  font-weight: var(--weight-semibold);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  color: var(--text-primary);
}

.tech-scenario-btn__file {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--color-cyan-400);
  opacity: 0.85;
}

/* ==========================================================================
   4. Four-Stage Pipeline Visualizer
   ========================================================================== */

.tech-pipeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(6px, 1.2vw, 14px);
  margin-bottom: var(--space-4);
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

/* Scenario 1: Known threat 2-stage compact layout */
.tech-pipeline.tech-pipeline--known {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tech-pipeline.tech-pipeline--known .tech-stage-node[data-stage="2"],
.tech-pipeline.tech-pipeline--known .tech-stage-node[data-stage="3"] {
  display: none !important;
}

.tech-pipeline.tech-pipeline--known #tech-node-1 .tech-stage-node__connector {
  display: flex;
}

.tech-pipeline.tech-pipeline--known #tech-node-4 .tech-stage-node__connector {
  display: none;
}

/* Pipeline Stage Interactive Tab Node */
.tech-stage-node {
  background-color: var(--surface-subtle);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: clamp(12px, 1.2vw, 16px) clamp(10px, 1vw, 14px);
  text-align: left;
  cursor: pointer;
  position: relative;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 140px;
  min-width: 0;
  box-sizing: border-box;
}

.tech-stage-node > *:not(.tech-stage-node__connector) {
  pointer-events: none;
}

.tech-stage-node:hover {
  background-color: var(--surface-interactive);
  border-color: var(--border-strong);
}

.tech-stage-node:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

@property --card-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes cardRotateAngle {
  to { --card-angle: 360deg; }
}

.tech-stage-node.is-active {
  background: linear-gradient(var(--surface-interactive), var(--surface-interactive)) padding-box,
              conic-gradient(from var(--card-angle, 0deg), rgba(59, 102, 255, 0.15), #38bdf8 30%, rgba(59, 102, 255, 0.15) 60%) border-box;
  border: 1px solid transparent;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.08);
  animation: cardRotateAngle 5s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .tech-stage-node.is-active {
    animation: none;
    border-color: var(--border-accent);
    background: var(--surface-interactive);
  }
}

/* Stable Header Row: left index/title, right status badge */
.tech-stage-node__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  margin-bottom: 0;
  min-width: 0;
  flex-shrink: 0;
}

.tech-stage-node__idx {
  font-family: var(--font-mono);
  font-size: clamp(0.62rem, 0.56rem + 0.18vw, 0.72rem);
  color: var(--text-tertiary);
  font-weight: var(--weight-medium);
  white-space: nowrap;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tech-stage-node__aira-mark {
  width: 14px;
  height: 14px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  margin: 0;
  object-fit: contain;
  filter: drop-shadow(0 0 5px rgba(56, 189, 248, 0.45));
}

.tech-stage-node.is-active .tech-stage-node__idx {
  color: var(--color-cyan-400);
}

.tech-stage-node__status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: clamp(9px, 0.52rem + 0.12vw, 10px);
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-tertiary);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

/* Dynamic simulation states */
.tech-stage-node__status--pass {
  background-color: rgba(16, 185, 129, 0.12);
  border-color: var(--border-status-secure);
  color: var(--status-secure);
}

.tech-stage-node__status--flag {
  background-color: rgba(245, 158, 11, 0.12);
  border-color: var(--border-status-warning);
  color: var(--status-warning);
}

.tech-stage-node__status--danger {
  background-color: rgba(244, 63, 94, 0.12);
  border-color: var(--border-status-danger);
  color: var(--status-danger);
}

.tech-stage-node__status--bypass {
  background-color: rgba(100, 116, 139, 0.12);
  border-color: var(--border-subtle);
  color: var(--text-tertiary);
  opacity: 0.65;
}

/* Card Body: Title & Meta below header */
.tech-stage-node__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  margin-top: auto;
}

.tech-stage-node__name {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  line-height: var(--leading-snug);
  margin: 0;
}

.tech-stage-node__meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: var(--leading-normal);
  margin: 0;
}

/* Connecting Arrow / Bridge between nodes */
.tech-stage-node__connector {
  position: absolute;
  top: 50%;
  right: -10px;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: var(--surface-card);
  border: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  color: var(--text-tertiary);
  pointer-events: none;
}

.tech-stage-node__connector svg {
  width: 10px;
  height: 10px;
}

.tech-stage-node:last-child .tech-stage-node__connector {
  display: none;
}

/* Illuminated state during simulation */
.tech-stage-node.is-illuminated {
  border-color: var(--color-cyan-400);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.28);
}

.tech-stage-node.is-illuminated-danger {
  border-color: var(--color-danger-500);
  box-shadow: 0 0 20px rgba(244, 63, 94, 0.3);
}

/* Stage 2 & 3: Aira Deep Analysis Branding */
.tech-stage-node--aira {
  background: linear-gradient(180deg, rgba(20, 27, 44, 0.75) 0%, rgba(13, 17, 27, 0.9) 100%);
  border-color: rgba(96, 133, 255, 0.32);
}

.tech-stage-node--aira:hover {
  border-color: var(--color-cyan-400);
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.16), 0 0 28px rgba(59, 102, 255, 0.14);
}

.tech-stage-node--aira.is-active,
.tech-stage-node--aira.is-illuminated {
  border-color: var(--color-cyan-400);
  background: linear-gradient(180deg, rgba(22, 32, 54, 0.92) 0%, rgba(14, 20, 36, 0.98) 100%);
  box-shadow:
    var(--glow-primary),
    0 0 24px rgba(6, 182, 212, 0.25),
    0 0 45px rgba(59, 102, 255, 0.22);
}

.tech-stage-node--aira.is-active::before {
  background: linear-gradient(90deg, var(--color-accent-400), var(--color-cyan-400));
}

.tech-stage-node--aira .tech-stage-node__meta {
  padding-right: 56px;
}

/* Aira Analysis Badge in Bottom-Right Corner of Stage Cards */
.tech-stage-node__aira-badge {
  position: absolute;
  bottom: 10px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(59, 102, 255, 0.15);
  border: 1px solid rgba(59, 102, 255, 0.35);
  color: var(--color-cyan-300);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: var(--weight-medium);
  letter-spacing: 0.02em;
  pointer-events: none;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: all var(--transition-fast);
}

.tech-stage-node__aira-logo {
  width: 13px;
  height: 13px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 0 4px rgba(59, 102, 255, 0.5));
}

.tech-stage-node--aira.is-active .tech-stage-node__aira-badge,
.tech-stage-node--aira.is-illuminated .tech-stage-node__aira-badge {
  background: rgba(6, 182, 212, 0.2);
  border-color: rgba(6, 182, 212, 0.55);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.45);
}

/* ==========================================================================
   5. Simulation Status Announcer Bar
   ========================================================================== */

.tech-sim__status-bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background-color: var(--surface-subtle);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-5);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.tech-sim__status-bar.is-clean,
.tech-sim__status-bar.is-known {
  border-color: rgba(6, 182, 212, 0.35);
  background-color: rgba(6, 182, 212, 0.08);
  color: var(--color-cyan-300);
}

.tech-sim__status-bar.is-threat {
  border-color: var(--border-status-danger);
  background-color: rgba(244, 63, 94, 0.06);
  color: var(--status-danger);
}

.tech-sim__status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-cyan-400);
  flex-shrink: 0;
}

.tech-sim__status-bar.is-clean .tech-sim__status-dot,
.tech-sim__status-bar.is-known .tech-sim__status-dot {
  background-color: var(--color-cyan-400);
  box-shadow: 0 0 8px var(--color-cyan-400);
}

.tech-sim__status-bar.is-threat .tech-sim__status-dot {
  background-color: var(--status-danger);
  box-shadow: 0 0 8px var(--status-danger);
}

/* ==========================================================================
   6. Stage Deep-Dive Inspector Panel
   ========================================================================== */

.tech-inspector {
  position: relative;
  background-color: var(--surface-subtle);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-5), 3vw, var(--space-8));
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(var(--space-6), 4vw, var(--space-10));
  align-items: stretch;
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal), height 280ms cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.tech-inspector__info,
.tech-inspector__terminal {
  transition: opacity 180ms ease;
}

.tech-inspector--aira {
  border-color: rgba(96, 133, 255, 0.42);
  box-shadow:
    var(--shadow-elevated),
    0 0 35px rgba(59, 102, 255, 0.16),
    0 0 16px rgba(6, 182, 212, 0.12);
}

/* Left Column: Stage Info & Metrics */
.tech-inspector__info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tech-inspector__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-cyan-400);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  margin-bottom: var(--space-2);
}

.tech-inspector__title {
  font-family: var(--font-sans);
  font-size: clamp(1.35rem, 1.2rem + 0.6vw, 1.75rem);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-3);
}

.tech-inspector__desc {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
}

.tech-inspector__highlight {
  padding: var(--space-3) var(--space-4);
  background-color: rgba(59, 102, 255, 0.08);
  border-left: 2px solid var(--color-accent-500);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: var(--text-xs);
  color: var(--color-accent-200);
  line-height: var(--leading-normal);
  margin-bottom: var(--space-6);
}

/* Inspector HUD Metrics */
.tech-inspector__metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.tech-metric-card {
  background-color: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
}

.tech-metric-card__label {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  margin-bottom: var(--space-1);
}

.tech-metric-card__val {
  font-family: var(--font-mono);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
}

.tech-metric-card__val--cyan {
  color: var(--color-cyan-400);
}

.tech-metric-card__val--secure {
  color: var(--status-secure);
}

/* Right Column: Code / Pipeline Telemetry Terminal */
.tech-inspector__terminal {
  background-color: #040508;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.8);
}

.tech-terminal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4);
  background-color: #06080e;
  border-bottom: 1px solid var(--border-subtle);
  min-width: 0;
}

.tech-terminal__dots {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.tech-terminal__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.15);
}

.tech-terminal__dot:nth-child(1) { background-color: rgba(244, 63, 94, 0.6); }
.tech-terminal__dot:nth-child(2) { background-color: rgba(245, 158, 11, 0.6); }
.tech-terminal__dot:nth-child(3) { background-color: rgba(16, 185, 129, 0.6); }

.tech-terminal__title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-tertiary);
  letter-spacing: var(--tracking-wide);
  white-space: nowrap;
  flex-shrink: 0;
}

.tech-terminal__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: #38bdf8;
  letter-spacing: 0.04em;
  margin-left: auto;
  white-space: nowrap;
  flex-shrink: 0;
}

.tech-terminal__aira-icon {
  width: 13px;
  height: 13px;
  object-fit: contain;
  filter: drop-shadow(0 0 4px rgba(56, 189, 248, 0.5));
}

.tech-terminal__body {
  padding: var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.6;
  color: var(--color-neutral-300);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tech-terminal__code-flow {
  white-space: pre-wrap;
  word-break: normal;
  overflow-wrap: anywhere;
  color: var(--color-cyan-300);
}

.tech-terminal__tag {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 2px;
  font-size: 0.68rem;
  font-weight: var(--weight-semibold);
  margin: 0 2px;
}

.tech-terminal__tag--pass {
  background-color: rgba(16, 185, 129, 0.2);
  color: var(--status-secure);
}

.tech-terminal__tag--threat {
  background-color: rgba(244, 63, 94, 0.25);
  color: var(--status-danger);
}

/* ==========================================================================
   7. Technical Benchmark & Paradigm Shift Matrix
   ========================================================================== */

.tech-comparison {
  margin-top: clamp(var(--space-12), 7vw, var(--space-16));
}

.tech-comparison__header {
  margin-bottom: var(--space-8);
}

.tech-comparison__title {
  font-family: var(--font-sans);
  font-size: clamp(1.6rem, 1.4rem + 1vw, 2.25rem);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  margin-top: var(--space-2);
  margin-bottom: var(--space-3);
}

.tech-comparison__desc {
  font-size: var(--text-base);
  color: var(--text-secondary);
  max-width: var(--container-prose);
}

/* Comparison Table Container */
.tech-table-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-default);
  background-color: var(--surface-card);
  box-shadow: var(--shadow-md);
  -webkit-overflow-scrolling: touch;
}

.tech-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 680px;
}

.tech-table th,
.tech-table td {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}

.tech-table th {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--text-tertiary);
  background-color: rgba(255, 255, 255, 0.02);
}

.tech-table th:nth-child(1) {
  width: 25%;
}

.tech-table th:nth-child(2) {
  width: 35%;
  color: var(--color-neutral-400);
}

.tech-table th:nth-child(3) {
  width: 40%;
  color: var(--color-cyan-400);
  background-color: rgba(59, 102, 255, 0.04);
  border-left: 1px solid var(--border-accent);
}

.tech-table tbody tr:last-child td {
  border-bottom: none;
}

.tech-table tbody tr:hover td {
  background-color: rgba(255, 255, 255, 0.015);
}

.tech-table tbody tr:hover td:nth-child(3) {
  background-color: rgba(59, 102, 255, 0.06);
}

/* Feature cell */
.tech-table__feature {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  line-height: var(--leading-snug);
}

@media (min-width: 768px) {
  .tech-table th:nth-child(1),
  .tech-table td.tech-table__feature {
    position: relative;
  }

  .tech-table th:nth-child(1)::after,
  .tech-table td.tech-table__feature::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 1px;
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.10) 0%, rgba(59, 102, 255, 0.22) 50%, rgba(56, 189, 248, 0.10) 100%);
    pointer-events: none;
  }
}

/* Legacy cell */
.tech-table__legacy {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-normal);
}

/* Aira cell */
.tech-table__aira {
  font-size: var(--text-sm);
  color: var(--text-primary);
  font-weight: var(--weight-medium);
  line-height: var(--leading-normal);
  background-color: rgba(59, 102, 255, 0.03);
  border-left: 1px solid var(--border-accent);
}

.tech-table__badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--status-secure);
  margin-bottom: var(--space-2);
}

.tech-table__badge-icon {
  width: 12px;
  height: 12px;
}

/* Mobile labels hidden on desktop */
.tech-table__mobile-label {
  display: none;
}

/* ==========================================================================
   8. Responsive Layouts & Tablet/Mobile Optimizations
   ========================================================================== */

/* Tablet & Intermediate Screens (<= 900px) */
@media (max-width: 900px) {
  .tech-pipeline {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: var(--space-4);
  }

  .tech-pipeline.tech-pipeline--known {
    grid-template-columns: 1fr;
  }

  .tech-stage-node {
    min-height: auto;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 4px;
  }

  .tech-stage-node__top {
    margin-bottom: 0;
  }

  .tech-stage-node__body {
    margin-top: 0;
  }

  .tech-stage-node__name {
    margin-top: 0;
    font-size: var(--text-sm);
    line-height: 1.25;
  }

  .tech-stage-node__meta {
    margin-top: 2px;
    font-size: 0.72rem;
    line-height: 1.2;
  }

  .tech-stage-node__connector {
    display: none;
  }

  .tech-inspector {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
}

/* Mobile Screens (<= 640px) */
@media (max-width: 640px) {
  .tech-section {
    padding-top: var(--space-8);
    padding-bottom: var(--space-10);
  }

  .tech__header {
    margin-bottom: var(--space-8);
  }

  .tech__title {
    font-size: clamp(1.65rem, 6.5vw, 2.15rem);
    line-height: 1.18;
    margin-top: var(--space-2);
    margin-bottom: var(--space-3);
  }

  .tech__subtitle {
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
  }

  /* Simulator box compacting */
  .tech-sim-box {
    padding: var(--space-4);
    margin-bottom: var(--space-8);
    border-radius: var(--radius-lg);
  }

  .tech-sim__top {
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-4);
  }

  .tech-sim__title {
    font-size: var(--text-base);
  }

  .tech-sim__desc {
    font-size: var(--text-xs);
  }

  .tech-sim__scenarios {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: var(--space-2);
  }

  .tech-scenario-btn {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    min-height: 48px;
  }

  .tech-sim__rerun-btn {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }

  .tech-sim__status-bar {
    margin-bottom: var(--space-4);
    padding: var(--space-2) var(--space-3);
    font-size: 0.72rem;
    line-height: 1.45;
  }

  /* Pipeline nodes mobile refinement */
  .tech-pipeline {
    gap: 8px;
  }

  .tech-stage-node {
    padding: 10px 12px;
    border-radius: var(--radius-md);
  }

  /* Inspector panel compacting */
  .tech-inspector {
    padding: var(--space-4);
    gap: var(--space-4);
    border-radius: var(--radius-md);
  }

  .tech-stage-node__aira-badge {
    bottom: 8px;
    right: 10px;
    font-size: 0.5625rem;
    padding: 1px 6px;
  }

  .tech-inspector__aira-watermark {
    bottom: 10px;
    right: 12px;
    font-size: 0.625rem;
    padding: 2px 8px;
  }

  .tech-inspector__badge {
    font-size: 0.68rem;
    margin-bottom: var(--space-1);
  }

  .tech-inspector__title {
    font-size: clamp(1.2rem, 5vw, 1.45rem);
    margin-bottom: var(--space-2);
    line-height: 1.2;
  }

  .tech-inspector__desc {
    font-size: var(--text-xs);
    line-height: 1.55;
    margin-bottom: var(--space-3);
  }

  .tech-inspector__highlight {
    padding: 8px 12px;
    margin-bottom: var(--space-4);
    font-size: 0.75rem;
    line-height: 1.4;
  }

  /* Telemetry metrics strip */
  .tech-inspector__metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .tech-metric-card {
    padding: 8px 6px;
    border-radius: var(--radius-sm);
  }

  .tech-metric-card__label {
    font-size: 0.58rem;
    letter-spacing: 0.02em;
    line-height: 1.2;
    margin-bottom: 3px;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
  }

  .tech-metric-card__val {
    font-size: clamp(0.78rem, 2.5vw, 0.88rem);
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Terminal block */
  .tech-terminal__header {
    padding: 6px 12px;
  }

  .tech-terminal__title {
    font-size: 0.65rem;
  }

  .tech-terminal__body {
    padding: 12px 14px 20px;
    font-size: 0.74rem;
    line-height: 1.6;
    justify-content: flex-start;
  }

  /* Technical comparison table mobile tuning */
  .tech-comparison {
    margin-top: var(--space-8);
  }

  .tech-comparison__header {
    margin-bottom: var(--space-4);
  }

  .tech-comparison__title {
    font-size: clamp(1.35rem, 5.5vw, 1.85rem);
    margin-bottom: var(--space-2);
  }

  .tech-comparison__desc {
    font-size: var(--text-sm);
  }

  /* Mobile Stacked Card Presentation (No Horizontal Scroll) */
  .tech-table-wrapper {
    overflow-x: visible;
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
  }

  .tech-table {
    display: block;
    min-width: 0;
    width: 100%;
    border: none;
  }

  .tech-table thead {
    display: none;
  }

  .tech-table tbody {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    width: 100%;
  }

  .tech-table tbody tr {
    display: flex;
    flex-direction: column;
    background-color: var(--surface-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    gap: var(--space-3);
    box-shadow: var(--shadow-sm);
  }

  .tech-table td {
    display: block;
    width: 100% !important;
    padding: 0;
    border: none;
  }

  .tech-table__feature {
    font-size: 0.9375rem;
    font-weight: var(--weight-bold);
    color: var(--text-primary);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--border-subtle);
  }

  .tech-table td.tech-table__legacy {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    background-color: var(--surface-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    font-size: 0.8125rem;
    line-height: var(--leading-relaxed);
    color: var(--color-neutral-300);
  }

  .tech-table td.tech-table__aira {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    background-color: rgba(59, 102, 255, 0.08);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    font-size: 0.8125rem;
    line-height: var(--leading-relaxed);
    color: #ffffff;
  }

  .tech-table__mobile-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: var(--weight-semibold);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    margin-bottom: 0;
  }

  .tech-table__mobile-label--legacy {
    color: var(--color-neutral-400);
  }

  .tech-table__mobile-label--aira {
    color: var(--color-cyan-400);
  }

  .tech-table__badge {
    margin-bottom: 0;
    align-self: flex-start;
  }
}

/* ==========================================================================
   9. Reduced Motion & Responsive Guards
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .tech-sim-box.is-simulating .tech-sim__rerun-icon {
    animation: none;
  }

  .tech-stage-node,
  .tech-scenario-btn,
  .tech-sim__rerun-btn,
  .tech-sim__status-bar {
    transition: none !important;
  }
}
