/* ============================================
   AMES Intelligence Portal
   Palantir-inspired · Space Intelligence Aesthetic
   ============================================ */

:root {
  --bg-void: #03050a;
  --bg-deep: #05070b;
  --bg-panel: #0a0f18;
  --bg-elevated: #0e1522;
  --bg-hover: #131c2e;
  --border: rgba(120, 160, 220, 0.12);
  --border-strong: rgba(120, 180, 255, 0.28);
  --text: #e8eef7;
  --text-muted: #8b9bb4;
  --text-dim: #5a6a82;
  --cyan: #22d3ee;
  --cyan-dim: rgba(34, 211, 238, 0.15);
  --blue: #3b82f6;
  --blue-bright: #60a5fa;
  --violet: #8b5cf6;
  --amber: #f59e0b;
  --red: #f87171;
  --green: #34d399;
  --orange: #fb923c;
  --grad: linear-gradient(135deg, #22d3ee 0%, #3b82f6 50%, #8b5cf6 100%);
  --grad-text: linear-gradient(90deg, #e0f7ff 0%, #22d3ee 40%, #60a5fa 100%);
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --radius: 12px;
  --radius-lg: 20px;
  --nav-h: 72px;
  --glow-cyan: 0 0 40px rgba(34, 211, 238, 0.25);
  --glow-blue: 0 0 60px rgba(59, 130, 246, 0.2);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

::selection {
  background: rgba(34, 211, 238, 0.3);
  color: #fff;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }
.mono { font-family: var(--mono); }

/* Ambient */
.starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(3, 5, 10, 0.75) 100%);
}

.container {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all 0.25s var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #1ec8e0, #3b82f6);
  color: #041018;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.1), var(--glow-cyan);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.2), 0 0 50px rgba(34, 211, 238, 0.4);
}

.btn-ghost {
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: rgba(255,255,255,0.03);
}

.btn-outline {
  border: 1px solid var(--border-strong);
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.05);
}

.btn-outline:hover {
  background: rgba(34, 211, 238, 0.12);
  box-shadow: var(--glow-cyan);
}

.btn-lg {
  padding: 14px 24px;
  font-size: 0.95rem;
  border-radius: 10px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 1.4rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

/* NAV */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 100;
  backdrop-filter: blur(20px) saturate(1.4);
  background: rgba(5, 7, 11, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}

.nav.scrolled {
  border-bottom-color: var(--border);
  background: rgba(5, 7, 11, 0.9);
}

.nav-inner {
  height: 100%;
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.logo-mark {
  display: grid;
  place-items: center;
  filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.4));
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo-text strong {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-text small {
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255,255,255,0.04);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text);
  transition: 0.25s;
}

/* HERO */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + 40px) 0 80px;
  z-index: 2;
  overflow: hidden;
}

.hero-canvas-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}

#heroCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-scanline {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
  pointer-events: none;
  opacity: 0.4;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(900px, calc(100% - 48px));
  margin: 0 auto;
  text-align: center;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 100px;
  background: rgba(34, 211, 238, 0.06);
  border: 1px solid rgba(34, 211, 238, 0.2);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--cyan);
  margin-bottom: 32px;
  font-family: var(--mono);
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: pulse-dot 1.6s ease infinite;
}

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

.status-sep { opacity: 0.4; }

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.hero-line {
  display: block;
}

.hero-line.accent {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-bottom: 56px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 720px;
  margin: 0 auto;
}

.metric {
  padding: 18px 12px;
  border-radius: var(--radius);
  background: rgba(10, 15, 24, 0.7);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.metric-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  font-family: var(--mono);
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 4px;
}

.metric-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}

.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 2;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--cyan), transparent);
  animation: scroll-pulse 2s ease infinite;
}

@keyframes scroll-pulse {
  0% { opacity: 0.3; transform: scaleY(0.6); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); }
  100% { opacity: 0.3; transform: scaleY(0.6); }
}

/* SECTIONS */
.section {
  position: relative;
  z-index: 2;
  padding: 100px 0;
}

.section-head {
  margin-bottom: 48px;
  max-width: 720px;
}

.section-head.center,
.section-head {
  /* left-aligned by default */
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 16px;
  font-family: var(--mono);
}

.kicker-icon {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
  animation: pulse-dot 2s ease infinite;
}

.section h2 {
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.section-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* INFRASTRUCTURE */
.infrastructure {
  background: linear-gradient(180deg, transparent, rgba(10, 20, 40, 0.4), transparent);
}

.infra-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.infra-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.25s var(--ease);
}

.infra-tab:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.infra-tab.active {
  color: var(--bg-void);
  background: linear-gradient(135deg, #22d3ee, #3b82f6);
  border-color: transparent;
  box-shadow: var(--glow-cyan);
}

.tab-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}

.infra-tab.active .tab-dot { background: var(--bg-void); opacity: 1; }

.infra-stage {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(160deg, rgba(14, 21, 34, 0.9), rgba(5, 7, 11, 0.95));
  overflow: hidden;
  box-shadow: var(--glow-blue), inset 0 1px 0 rgba(255,255,255,0.04);
}

.infra-panel {
  display: none;
  grid-template-columns: 1.2fr 1fr;
  min-height: 480px;
}

.infra-panel.active {
  display: grid;
  animation: fade-in 0.45s var(--ease);
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.infra-visual {
  position: relative;
  background: radial-gradient(ellipse at 40% 50%, rgba(34, 211, 238, 0.08), transparent 60%),
              radial-gradient(ellipse at 70% 80%, rgba(59, 130, 246, 0.1), transparent 50%),
              #060a12;
  min-height: 400px;
}

.infra-canvas {
  width: 100%;
  height: 100%;
  display: block;
  min-height: 400px;
}

.infra-hud {
  position: absolute;
  inset: 16px;
  pointer-events: none;
}

.hud-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: rgba(34, 211, 238, 0.5);
  border-style: solid;
}

.hud-corner.tl { top: 0; left: 0; border-width: 1.5px 0 0 1.5px; }
.hud-corner.tr { top: 0; right: 0; border-width: 1.5px 1.5px 0 0; }
.hud-corner.bl { bottom: 0; left: 0; border-width: 0 0 1.5px 1.5px; }
.hud-corner.br { bottom: 0; right: 0; border-width: 0 1.5px 1.5px 0; }

.hud-badge {
  position: absolute;
  top: 12px;
  left: 28px;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  color: var(--cyan);
  opacity: 0.85;
}

.infra-info {
  padding: 36px 32px;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.infra-info h3 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.infra-info > p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

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

.signal-list li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  transition: border-color 0.2s, background 0.2s;
}

.signal-list li:hover {
  border-color: var(--border-strong);
  background: rgba(34, 211, 238, 0.04);
}

.signal-list .sig-status {
  font-family: var(--mono);
  font-size: 0.65rem;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(34, 211, 238, 0.12);
  color: var(--cyan);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.signal-list .sig-status.upcoming { background: rgba(245, 158, 11, 0.15); color: var(--amber); }
.signal-list .sig-status.active { background: rgba(52, 211, 153, 0.15); color: var(--green); }
.signal-list .sig-status.build { background: rgba(139, 92, 246, 0.15); color: #c4b5fd; }

.signal-list .sig-title { font-weight: 600; color: var(--text); }
.signal-list .sig-meta { color: var(--text-dim); font-size: 0.78rem; margin-top: 2px; }
.signal-list .sig-loc {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  text-align: right;
}

.signal-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.signal-stats > div {
  text-align: center;
}

.stat-n {
  display: block;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--cyan);
  margin-bottom: 2px;
}

.stat-l {
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* MACHINES */
.machines-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.machine-card {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-elevated), var(--bg-panel));
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s, box-shadow 0.35s;
}

.machine-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--glow-blue);
}

.machine-card.featured {
  border-color: rgba(34, 211, 238, 0.35);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.1), var(--glow-cyan);
}

.machine-num {
  position: absolute;
  top: 16px;
  right: 18px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  z-index: 2;
}

.machine-visual {
  height: 160px;
  background: #060a12;
  border-bottom: 1px solid var(--border);
}

.machine-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.machine-body {
  padding: 24px;
}

.machine-tag {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.machine-tag.accent {
  color: var(--cyan);
}

.machine-body h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.machine-code {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--blue-bright);
  margin-bottom: 12px;
  font-weight: 600;
}

.machine-body > p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.machine-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.machine-features li {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-left: 14px;
  position: relative;
}

.machine-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: var(--cyan);
  opacity: 0.7;
}

.machine-ask {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border-radius: 10px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
}

.ask-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  font-family: var(--mono);
}

.ask-bad {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: line-through;
  opacity: 0.7;
}

.ask-good {
  font-size: 0.85rem;
  color: var(--cyan);
  font-weight: 500;
}

/* LOOP */
.loop-section {
  background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.08), transparent 60%);
}

.loop-track {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 4px;
  padding: 32px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-panel);
}

.loop-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 14px;
  min-width: 90px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  transition: all 0.3s var(--ease);
}

.loop-node.active {
  border-color: var(--cyan);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.3);
  background: rgba(34, 211, 238, 0.08);
  color: var(--cyan);
}

.loop-icon {
  font-size: 1.1rem;
  opacity: 0.8;
}

.loop-arrow {
  width: 28px;
  height: 2px;
  background: linear-gradient(90deg, var(--text-dim), var(--cyan));
  position: relative;
  flex-shrink: 0;
}

.loop-arrow::after {
  content: "";
  position: absolute;
  right: -2px;
  top: -3px;
  border: 4px solid transparent;
  border-left-color: var(--cyan);
}

.loop-feedback {
  margin-top: 24px;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--violet);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.feedback-line {
  width: min(600px, 80%);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--violet), transparent);
  position: relative;
}

.feedback-line::before {
  content: "↻";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-void);
  padding: 0 10px;
  color: var(--violet);
  animation: spin-slow 8s linear infinite;
}

@keyframes spin-slow {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* RADAR */
.radar-section {
  background: linear-gradient(180deg, transparent, rgba(8, 12, 24, 0.8), transparent);
}

.radar-console {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  min-height: 640px;
}

.radar-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-panel);
  padding: 16px;
  max-height: 720px;
}

.radar-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid transparent;
  transition: all 0.2s;
}

.filter-btn:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.filter-btn.active {
  color: var(--text);
  border-color: var(--border-strong);
  background: rgba(34, 211, 238, 0.08);
}

.sev {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.sev.critical { background: var(--red); box-shadow: 0 0 8px var(--red); }
.sev.accelerating { background: var(--orange); box-shadow: 0 0 8px var(--orange); }
.sev.developing { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.sev.latent { background: var(--blue-bright); box-shadow: 0 0 8px var(--blue); }

.problem-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.problem-list::-webkit-scrollbar { width: 4px; }
.problem-list::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }

.problem-item {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.2);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
  width: 100%;
}

.problem-item:hover {
  border-color: var(--border-strong);
  background: rgba(255,255,255,0.03);
}

.problem-item.active {
  border-color: rgba(34, 211, 238, 0.4);
  background: rgba(34, 211, 238, 0.06);
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.1);
}

.problem-item .pi-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.problem-item .pi-id {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-dim);
}

.problem-item .pi-title {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.3;
}

.problem-item .pi-meta {
  display: flex;
  gap: 10px;
  font-size: 0.7rem;
  color: var(--text-dim);
  font-family: var(--mono);
}

.radar-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(160deg, var(--bg-elevated), var(--bg-panel));
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.radar-visual-wrap {
  position: relative;
  height: 280px;
  border-radius: 12px;
  overflow: hidden;
  background: #050810;
  border: 1px solid var(--border);
}

.radar-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.radar-center-label {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: none;
}

.radar-center-label .mono {
  font-size: 0.7rem;
  color: var(--cyan);
  letter-spacing: 0.08em;
}

.radar-center-label strong {
  font-size: 1.1rem;
  font-weight: 700;
}

.radar-detail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.rd-stat {
  padding: 14px;
  border-radius: 10px;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border);
}

.rd-stat .rd-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  font-family: var(--mono);
  margin-bottom: 6px;
}

.rd-stat .rd-value {
  font-size: 1.05rem;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--text);
}

.rd-stat .rd-value.up { color: var(--red); }
.rd-stat .rd-value.good { color: var(--green); }
.rd-stat .rd-value.warn { color: var(--amber); }

.radar-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: auto;
}

.solve-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bg-void);
  animation: pulse-dot 1.2s ease infinite;
}

/* Causal panel */
.causal-panel,
.solve-panel {
  margin-top: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  padding: 24px;
  animation: fade-in 0.4s var(--ease);
  box-shadow: var(--glow-blue);
}

.causal-head,
.solve-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 16px;
}

.causal-chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.causal-node {
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.25);
  font-size: 0.82rem;
  font-weight: 500;
}

.causal-arrow {
  color: var(--cyan);
  opacity: 0.6;
  font-family: var(--mono);
}

/* Solve panel */
.solve-pipeline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.pipe-step {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-family: var(--mono);
  border: 1px solid var(--border);
  color: var(--text-dim);
  transition: all 0.3s;
}

.pipe-step.done {
  color: var(--green);
  border-color: rgba(52, 211, 153, 0.4);
  background: rgba(52, 211, 153, 0.08);
}

.pipe-step.running {
  color: var(--cyan);
  border-color: rgba(34, 211, 238, 0.5);
  background: rgba(34, 211, 238, 0.1);
  animation: pulse-border 1s ease infinite;
}

@keyframes pulse-border {
  50% { box-shadow: 0 0 12px rgba(34, 211, 238, 0.3); }
}

.solutions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.sol-card {
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.25);
  cursor: pointer;
  transition: all 0.25s var(--ease);
  text-align: left;
  width: 100%;
}

.sol-card:hover,
.sol-card.active {
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(34, 211, 238, 0.06);
  transform: translateY(-2px);
}

.sol-letter {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--cyan);
  margin-bottom: 6px;
  letter-spacing: 0.08em;
}

.sol-card h4 {
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.sol-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.score-panel {
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.score-panel h4 {
  margin-bottom: 16px;
  font-size: 1rem;
}

.score-bars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
}

.score-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  align-items: center;
}

.score-row .sr-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.score-row .sr-val {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--cyan);
}

.score-row .sr-bar {
  grid-column: 1 / -1;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}

.score-row .sr-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  width: 0;
  transition: width 0.8s var(--ease);
}

/* TRI GRID */
.tri-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.tri-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-panel);
}

.tri-card h3 {
  font-size: 1.15rem;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.scale-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.scale-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(34, 211, 238, calc(0.03 + var(--i) * 0.03));
  border: 1px solid rgba(34, 211, 238, calc(0.1 + var(--i) * 0.05));
  border-left-width: 3px;
  border-left-color: color-mix(in srgb, var(--cyan) calc(40% + var(--i) * 12%), transparent);
}

.scale-row > span:first-child {
  font-weight: 700;
  font-size: 0.9rem;
}

.scale-q {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.buyer-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.buyer {
  padding: 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.2);
}

.buyer strong {
  display: block;
  margin-bottom: 6px;
  color: var(--cyan);
  font-size: 0.95rem;
}

.buyer p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.horizon-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.horizon {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 0.85rem;
  transition: border-color 0.2s;
}

.horizon:hover {
  border-color: var(--border-strong);
}

.hy {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--blue-bright);
  min-width: 42px;
  font-size: 0.8rem;
}

.horizon-note {
  margin-top: 14px;
  font-size: 0.78rem;
  color: var(--text-dim);
  font-style: italic;
}

/* PROVENANCE */
.prov-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.claim-card {
  margin-top: 24px;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
}

.claim-type {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.claim-type.fact,
.tl.fact {
  background: rgba(52, 211, 153, 0.15);
  color: var(--green);
}

.tl.inference {
  background: rgba(59, 130, 246, 0.15);
  color: var(--blue-bright);
}

.tl.hypothesis {
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber);
}

.tl.speculation {
  background: rgba(248, 113, 113, 0.12);
  color: var(--red);
}

.claim-text {
  font-size: 0.95rem;
  margin-bottom: 14px;
  line-height: 1.55;
}

.claim-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}

.claim-meta span {
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
}

.type-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tl {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 5px 10px;
  border-radius: 4px;
}

.ip-score {
  display: flex;
  gap: 28px;
  align-items: center;
  margin-top: 24px;
  padding: 24px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
}

.ip-ring {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}

.ip-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ip-bg {
  fill: none;
  stroke: rgba(255,255,255,0.06);
  stroke-width: 8;
}

.ip-fg {
  fill: none;
  stroke: url(#lg);
  stroke: var(--cyan);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 327;
  stroke-dashoffset: 62;
  transition: stroke-dashoffset 1s var(--ease);
}

.ip-value {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ip-value span {
  font-family: var(--mono);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--cyan);
}

.ip-value small {
  font-size: 0.6rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
  max-width: 70px;
}

.ip-checks {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ip-checks li {
  font-size: 0.88rem;
  color: var(--text-muted);
  padding-left: 18px;
  position: relative;
}

.ip-checks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--cyan);
  font-size: 0.8rem;
}

/* ARCHITECTURE */
.arch-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 40px;
}

.arch-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  width: 100%;
}

.arch-row.dual { max-width: 900px; }
.arch-row.triple { max-width: 700px; }

.arch-box {
  flex: 1;
  padding: 20px 24px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  text-align: center;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.arch-box:hover {
  border-color: var(--border-strong);
  box-shadow: var(--glow-blue);
}

.arch-box h4 {
  font-size: 0.8rem;
  font-family: var(--mono);
  letter-spacing: 0.1em;
  color: var(--cyan);
  margin-bottom: 8px;
}

.arch-box p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.arch-sub {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--blue-bright);
}

.arch-box.sources {
  max-width: 700px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.06), rgba(59, 130, 246, 0.06));
}

.arch-box.ames-core {
  max-width: 800px;
  border-color: rgba(34, 211, 238, 0.35);
  background: linear-gradient(160deg, rgba(34, 211, 238, 0.1), rgba(59, 130, 246, 0.08));
  box-shadow: var(--glow-cyan);
}

.arch-box.buyer {
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  color: var(--text);
  padding: 18px;
}

.arch-box.impl {
  max-width: 700px;
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  color: var(--violet);
  border-color: rgba(139, 92, 246, 0.35);
}

.arch-flow {
  color: var(--cyan);
  font-size: 1.2rem;
  opacity: 0.7;
  font-family: var(--mono);
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.stack-item {
  padding: 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.25);
  text-align: center;
}

.stack-item strong {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 6px;
  color: var(--cyan);
}

.stack-item span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* VENTURES */
.biz-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.biz-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-panel);
  transition: transform 0.3s var(--ease), border-color 0.3s;
}

.biz-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
}

.biz-card.featured {
  grid-column: span 2;
  border-color: rgba(34, 211, 238, 0.3);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.08), var(--bg-panel));
}

.biz-tier {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.biz-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.biz-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.venture-flow {
  margin-top: 16px;
  padding: 14px;
  border-radius: 8px;
  background: rgba(0,0,0,0.3);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--cyan);
  letter-spacing: 0.02em;
  line-height: 1.6;
  overflow-x: auto;
}

/* DEMO */
.demo-console {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-panel);
  overflow: hidden;
  box-shadow: var(--glow-blue);
}

.demo-input-row {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.2);
}

.demo-input-row input {
  flex: 1;
  padding: 14px 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-void);
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.2s;
}

.demo-input-row input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}

.demo-output {
  padding: 28px;
  min-height: 360px;
  max-height: 640px;
  overflow-y: auto;
}

.demo-placeholder {
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.85rem;
  text-align: center;
  padding: 60px 20px;
}

.demo-section-block {
  margin-bottom: 24px;
  animation: fade-in 0.5s var(--ease) both;
}

.demo-section-block:nth-child(1) { animation-delay: 0.05s; }
.demo-section-block:nth-child(2) { animation-delay: 0.1s; }
.demo-section-block:nth-child(3) { animation-delay: 0.15s; }
.demo-section-block:nth-child(4) { animation-delay: 0.2s; }
.demo-section-block:nth-child(5) { animation-delay: 0.25s; }
.demo-section-block:nth-child(6) { animation-delay: 0.3s; }
.demo-section-block:nth-child(7) { animation-delay: 0.35s; }
.demo-section-block:nth-child(8) { animation-delay: 0.4s; }
.demo-section-block:nth-child(9) { animation-delay: 0.45s; }
.demo-section-block:nth-child(10) { animation-delay: 0.5s; }
.demo-section-block:nth-child(11) { animation-delay: 0.55s; }
.demo-section-block:nth-child(12) { animation-delay: 0.6s; }
.demo-section-block:nth-child(13) { animation-delay: 0.65s; }

.demo-section-block h4 {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--cyan);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.demo-section-block p,
.demo-section-block li {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.demo-section-block ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 0;
}

.demo-section-block li {
  padding-left: 14px;
  position: relative;
}

.demo-section-block li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--cyan);
  font-size: 0.7rem;
  top: 0.25em;
}

.demo-roles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 8px;
}

.demo-role {
  padding: 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.2);
}

.demo-role strong {
  display: block;
  font-size: 0.8rem;
  color: var(--cyan);
  margin-bottom: 6px;
  font-family: var(--mono);
  letter-spacing: 0.04em;
}

.demo-role p {
  font-size: 0.82rem !important;
}

/* MVP */
.mvp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 20px;
}

.mvp-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-panel);
}

.mvp-card h3 {
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.mvp-card ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mvp-card li {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-left: 16px;
  position: relative;
}

.mvp-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--cyan);
  opacity: 0.6;
}

.mvp-card.principle {
  border-color: rgba(139, 92, 246, 0.35);
  background: linear-gradient(160deg, rgba(139, 92, 246, 0.1), var(--bg-panel));
}

.mvp-card blockquote {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  font-weight: 500;
  border-left: 3px solid var(--violet);
  padding-left: 16px;
}

/* HUMAN */
.human-section {
  padding: 80px 0;
}

.human-inner {
  text-align: center;
  max-width: 900px;
}

.human-inner h2 {
  margin-bottom: 12px;
}

.human-inner > p {
  color: var(--text-muted);
  margin-bottom: 28px;
}

.friction-chain {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 6px;
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-panel);
}

.friction-chain span {
  font-size: 0.8rem;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(34, 211, 238, 0.06);
  border: 1px solid rgba(34, 211, 238, 0.15);
  color: var(--text-muted);
  font-weight: 500;
}

.friction-chain span:nth-child(even) {
  background: none;
  border: none;
  color: var(--cyan);
  padding: 8px 4px;
}

/* CTA */
.cta-section {
  padding: 100px 0 120px;
}

.cta-inner {
  text-align: center;
  padding: 64px 40px;
  border-radius: 24px;
  border: 1px solid rgba(34, 211, 238, 0.25);
  background:
    radial-gradient(ellipse at 30% 20%, rgba(34, 211, 238, 0.12), transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(59, 130, 246, 0.15), transparent 50%),
    var(--bg-panel);
  box-shadow: var(--glow-cyan);
}

.cta-inner h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 14px;
}

.cta-inner p {
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 32px;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

/* FOOTER */
.footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--border);
  padding: 40px 0;
  background: rgba(3, 5, 10, 0.8);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-brand strong {
  font-size: 1rem;
  letter-spacing: 0.12em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.footer-brand span {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.footer-tag {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* RESPONSIVE */
@media (max-width: 1100px) {
  .machines-grid,
  .tri-grid,
  .biz-grid,
  .mvp-grid,
  .stack-grid {
    grid-template-columns: 1fr 1fr;
  }
  .biz-card.featured { grid-column: span 2; }
  .stack-grid { grid-template-columns: repeat(3, 1fr); }
  .radar-console { grid-template-columns: 1fr; }
  .radar-sidebar { max-height: 320px; }
  .infra-panel.active { grid-template-columns: 1fr; }
  .infra-info { border-left: none; border-top: 1px solid var(--border); }
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(5, 7, 11, 0.97);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    gap: 4px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  .nav-toggle { display: flex; }
  .nav-actions .btn-ghost { display: none; }
  .hero-metrics { grid-template-columns: 1fr 1fr; }
  .prov-grid { grid-template-columns: 1fr; }
  .radar-detail { grid-template-columns: 1fr 1fr; }
  .score-bars { grid-template-columns: 1fr; }
  .demo-roles { grid-template-columns: 1fr; }
  .arch-row.dual,
  .arch-row.triple { flex-direction: column; }
}

@media (max-width: 640px) {
  .machines-grid,
  .tri-grid,
  .biz-grid,
  .mvp-grid,
  .stack-grid {
    grid-template-columns: 1fr;
  }
  .biz-card.featured { grid-column: span 1; }
  .hero-metrics { grid-template-columns: 1fr 1fr; }
  .signal-stats { grid-template-columns: 1fr; }
  .radar-detail { grid-template-columns: 1fr; }
  .loop-arrow { display: none; }
  .container { width: calc(100% - 32px); }
  .section { padding: 72px 0; }
  .ip-score { flex-direction: column; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
