/* ==========================================================================
   NEXUSOPEN SEO — THE EDITORIAL TECHNICAL LEDGER & OBSERVATORY
   Bespoke Art Direction: Institutional Serif + Precision Monospace + Clean Humanist Sans
   ========================================================================== */

:root {
  /* Editorial Palette: Deep Obsidian & Technical Ink */
  --canvas: #08090b;
  --surface: #0f1218;
  --surface-hover: #151a23;
  --border: #1f2735;
  --border-strong: #2e3a50;
  --text: #f2f4f8;
  --muted: #8b95a5;
  --accent: #e8590c;          /* Engineering International Orange */
  --accent-hover: #d94e02;
  --mono-bg: #050608;

  /* Priority & Status Colors */
  --critical: #fa5252;
  --critical-bg: rgba(250, 82, 82, 0.1);
  --important: #fd7e14;
  --important-bg: rgba(253, 126, 20, 0.1);
  --opportunity: #4dabf7;
  --opportunity-bg: rgba(77, 171, 247, 0.1);
  --pass: #40c057;
  --pass-bg: rgba(64, 192, 87, 0.1);

  /* Typography */
  --font-display: 'Fraunces', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Sizing */
  --radius: 8px;
  --radius-lg: 12px;
  --container-width: 1240px;
}

/* Global Reset & Base Styles */
*, *:before, *:after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.observatory-body {
  background: var(--canvas);
  color: var(--text);
  font-family: var(--font-sans);
  margin: 0;
  min-height: 100vh;

  position: relative;
  -webkit-font-smoothing: antialiased;
}

button, input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(var(--container-width), calc(100% - 48px));
  margin-inline: auto;
}

/* Ambient Observatory Grid */
.ambient-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(to right, rgba(31, 39, 53, 0.15) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(31, 39, 53, 0.15) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: -1;
}

/* ===== HEADER OBSERVATORY BAR ===== */
.site-header {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 10;
}

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

.brand-glyph {
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  display: grid;
  place-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
}

.brand-text {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

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

.brand-text small {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
  background: rgba(232, 89, 12, 0.15);
  color: var(--accent);
  padding: 2px 6px;
  margin-left: 6px;
  border-radius: 4px;
  vertical-align: middle;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.nav-links a:hover, .nav-links a.external-link {
  color: var(--text);
}

.nav-links .external-link {
  color: var(--accent);
}

/* ===== HERO SECTION ===== */
.hero-observatory {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  padding: 60px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.eyebrow-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--accent);
  font-weight: 700;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--accent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 20px var(--accent); }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 5.8vw, 76px);
  line-height: 1.12;
  letter-spacing: -1.5px;
  margin: 0;
  font-weight: 700;
}

.mask-wrap {
  display: block;
  overflow: hidden;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}

.line-reveal {
  display: block;
  transform: translateY(0);
  opacity: 1;
  padding-bottom: 0.04em;
}

.hero-title .accent {
  color: var(--accent);
  font-style: italic;
}

.hero-lead {
  font-size: 17px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 540px;
  margin: 0;
}

.proof-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--muted);
  margin-top: 12px;
}

.proof-stat b {
  color: var(--text);
  font-weight: 700;
}

.proof-divider {
  width: 1px;
  height: 16px;
  background: var(--border);
}

/* ===== SCANNER OBSERVATORY CARD ===== */
.hero-scanner-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.6);
  position: relative;
}

.scanner-window-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.window-controls {
  display: flex;
  gap: 6px;
}

.ctl {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.ctl.red { background: #ff5f56; }
.ctl.yellow { background: #ffbd2e; }
.ctl.green { background: #27c93f; }

.window-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.window-status-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  background: rgba(64, 192, 87, 0.15);
  color: var(--pass);
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 700;
}

.scanner-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 1px;
}

.url-input-wrapper {
  display: flex;
  align-items: center;
  background: var(--mono-bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 4px 4px 4px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.url-input-wrapper:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 89, 12, 0.15);
}

.url-prefix {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--muted);
  user-select: none;
  display: flex;
  align-items: center;
}

.url-input-wrapper input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 15px;
  padding: 12px 8px;
  outline: none;
}

.url-input-wrapper input::placeholder {
  color: #3b465c;
}

#scan-button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s ease, transform 0.1s ease;
}

#scan-button:hover:not(:disabled) {
  background: var(--accent-hover);
}

#scan-button:disabled {
  background: #232b38;
  color: #55627a;
  cursor: not-allowed;
}

.url-preview-feedback {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  min-height: 16px;
}

/* Telemetry HUD */
.telemetry-hud {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--mono-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.telemetry-hud.hidden {
  display: none;
}

.hud-step {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.hud-step.active {
  color: var(--text);
}

.hud-step.completed {
  color: var(--pass);
}

.hud-step.completed .hud-icon::before {
  content: "✓";
}

.scanner-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.status-msg {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.sample-trigger-row {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sample-label {
  font-size: 12px;
  color: var(--muted);
}

.btn-sample {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-sample:hover {
  background: var(--surface-hover);
  border-color: var(--text);
}

/* ===== PINNED SCROLL-DRIVEN INSPECTION SEQUENCE ===== */
.inspection-scroll-wrapper {
  position: relative;
  height: 250vh; /* Deliberate scroll travel for smooth scrubbing */
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.inspection-sticky-viewport {
  position: sticky;
  top: 40px;
  min-height: calc(100vh - 80px);
  height: auto;
  display: flex;
  align-items: center;
  overflow: visible;
  padding: 40px 0;
}

.inspection-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 48px;
  align-items: center;
  width: 100%;
}

.inspection-narrative {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--accent);
  font-weight: 700;
}

.inspection-headline {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.2;
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.narrative-cards-track {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.narrative-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 1;
  transition: opacity 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.narrative-card.active {
  opacity: 1;
  border-color: var(--accent);
  transform: translateX(8px);
}

.stage-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 1px;
}

.narrative-card h3 {
  font-family: var(--font-display);
  font-size: 16px;
  margin: 0;
  color: var(--text);
}

.narrative-card p {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
}

.stage-metric-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text);
  background: var(--mono-bg);
  padding: 2px 6px;
  border-radius: 4px;
  width: fit-content;
  margin-top: 2px;
}

/* Chamber Visuals */
.inspection-chamber {
  display: flex;
  justify-content: center;
}

.chamber-window {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 580px;
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.chamber-bar {
  background: #0a0d14;
  border-bottom: 1px solid var(--border);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.chamber-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2a3547;
}

.chamber-url-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  background: var(--mono-bg);
  padding: 3px 12px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.chamber-mode {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  font-weight: 700;
}

.chamber-viewport {
  position: relative;
  min-height: 340px;
  background: var(--mono-bg);
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.chamber-view {
  visibility: hidden;  position: absolute;
  inset: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
  transform: translateY(10px);
}

.chamber-view.active {
  visibility: visible;  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* View 01: Detect */
.network-stream-visual {
  display: flex;
  flex-direction: column;
  gap: 12px;
  line-height: 1.6;
}

.stream-line .kw {
  color: var(--opportunity);
  font-weight: 700;
}

.stream-line.success {
  color: var(--pass);
}

.radar-scan-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: sweep 2.5s infinite linear;
}

@keyframes sweep {
  0% { top: 10%; opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { top: 90%; opacity: 0; }
}

/* View 02: Analyze */
.dom-inspector-visual {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.code-row {
  color: #adb5bd;
}

.code-row.indent { padding-left: 16px; }
.code-row.indent-2 { padding-left: 32px; }

.code-row.highlight {
  background: rgba(232, 89, 12, 0.1);
  border-left: 2px solid var(--accent);
  padding-left: 30px;
}

.code-row .tag { color: #fa5252; }
.code-row .attr { color: #ffd43b; }
.code-row .val { color: #51cf66; }
.code-row .meta { color: var(--muted); font-size: 11px; margin-left: 8px; }

/* View 03: Understand */
.heuristic-cards-visual {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mini-rule-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mini-rule-card .rule-icon {
  font-weight: 700;
  font-size: 14px;
}

.mini-rule-card.pass .rule-icon { color: var(--pass); }
.mini-rule-card.warn .rule-icon { color: var(--important); }

.rule-data {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.rule-data b {
  color: var(--text);
  font-size: 12px;
}

.rule-data span {
  font-size: 11px;
  color: var(--muted);
}

.rule-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
}

.rule-badge.pass { background: var(--pass-bg); color: var(--pass); }
.rule-badge.opportunity { background: var(--opportunity-bg); color: var(--opportunity); }

/* View 04: Improve */
.remediation-snippet-visual {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.snippet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
}

.badge-free {
  background: rgba(64, 192, 87, 0.15);
  color: var(--pass);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

.remediation-snippet-visual pre {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: 6px;
  color: #ff922b;
  overflow-x: auto;
  font-size: 11px;
  line-height: 1.5;
}

.checklist-item-mock {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

/* ===== RESULTS OBSERVATORY INSTRUMENT ===== */
.results-observatory {
  padding: 60px 0 120px 0;
}

.results-observatory.hidden {
  display: none;
}

.results-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 40px;
  align-items: start;
}

.results-sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 32px;
}

.dossier-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dossier-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--accent);
  font-weight: 700;
}

.dossier-header h2 {
  font-family: var(--font-display);
  font-size: 24px;
  margin: 0;
}

.dossier-meta-url {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
}

.score-card-widget {
  background: var(--mono-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.score-display {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.score-number {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
}

.score-unit {
  font-size: 13px;
  color: var(--muted);
}

.score-progress-track {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.score-progress-bar {
  height: 100%;
  background: var(--pass);
  width: 0%;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.score-breakdown-text {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

.export-action-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-export {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-export.primary {
  background: var(--text);
  color: var(--canvas);
  border: none;
}

.btn-export.primary:hover {
  background: #fff;
}

.btn-export.secondary {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
}

.btn-export.secondary:hover {
  background: var(--surface-hover);
}

.limitations-container {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.limitations-container h4 {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--muted);
  margin: 0 0 10px 0;
  letter-spacing: 0.5px;
}

.limitations-container ul {
  margin: 0;
  padding-left: 16px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.limitations-container li {
  margin-bottom: 6px;
}

/* Main Ledger Content */
.results-main-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ledger-control-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.ledger-title-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ledger-title-area h3 {
  font-family: var(--font-display);
  font-size: 20px;
  margin: 0;
}

.badge-count {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--mono-bg);
  color: var(--muted);
  padding: 3px 8px;
  border-radius: 4px;
}

.filter-pill-group {
  display: flex;
  gap: 6px;
  background: var(--mono-bg);
  padding: 4px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.filter-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  color: var(--text);
}

.filter-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Findings Ledger Cards */
.findings-ledger {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.finding-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.2s ease;
}

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

.finding-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.finding-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.finding-id {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

.finding-card h4 {
  font-family: var(--font-display);
  font-size: 18px;
  margin: 0;
}

.priority-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.priority-badge.critical {
  background: var(--critical-bg);
  color: var(--critical);
  border: 1px solid rgba(250, 82, 82, 0.3);
}

.priority-badge.important {
  background: var(--important-bg);
  color: var(--important);
  border: 1px solid rgba(253, 126, 20, 0.3);
}

.priority-badge.opportunity {
  background: var(--opportunity-bg);
  color: var(--opportunity);
  border: 1px solid rgba(77, 171, 247, 0.3);
}

.priority-badge.passed {
  background: var(--pass-bg);
  color: var(--pass);
  border: 1px solid rgba(64, 192, 87, 0.3);
}

.priority-badge.unable-to-verify {
  background: rgba(139, 149, 165, 0.1);
  color: var(--muted);
  border: 1px solid rgba(139, 149, 165, 0.3);
}

/* Evidence Box */
.finding-evidence {
  background: var(--mono-bg);
  border-left: 3px solid var(--border-strong);
  padding: 12px 16px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  line-height: 1.5;
  word-break: break-all;
}

.finding-card.status-error .finding-evidence {
  border-left-color: var(--critical);
  color: #ffc9c9;
}

.finding-card.status-warning .finding-evidence {
  border-left-color: var(--important);
  color: #ffe3d3;
}

.finding-card.status-pass .finding-evidence {
  border-left-color: var(--pass);
  color: #b2f2bb;
}

.finding-impact {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.finding-fix-box {
  background: rgba(232, 89, 12, 0.05);
  border: 1px solid rgba(232, 89, 12, 0.2);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fix-instructions {
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
  margin: 0;
}

.code-snippet-wrapper {
  background: var(--mono-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.code-snippet-wrapper code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #ff922b;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.btn-copy-snippet {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 4px 8px;
  font-size: 11px;
  font-family: var(--font-mono);
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease;
}

.btn-copy-snippet:hover {
  background: var(--surface-hover);
}

/* Nexus World Banner */
.nexus-world-banner {
  margin-top: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.banner-copy h3 {
  font-family: var(--font-display);
  font-size: 20px;
  margin: 0 0 6px 0;
}

.banner-copy p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

.banner-cta-btn {
  background: var(--accent);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: background 0.2s ease;
}

.banner-cta-btn:hover {
  background: var(--accent-hover);
}

/* ===== MANIFESTO ===== */
.manifesto-observatory {
  padding: 80px 0;
}

.manifesto-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px;
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.manifesto-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--accent);
  font-weight: 700;
}

.manifesto-card h2 {
  font-family: var(--font-display);
  font-size: 32px;
  margin: 0;
}

.manifesto-card p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
}

.manifesto-signatures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  margin-top: 12px;
  padding-top: 8px;
}

.manifesto-author {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  font-family: var(--font-mono);
}

.manifesto-author-name {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  line-height: 1.5;
}

.manifesto-author-name b {
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
}

.manifesto-author-org {
  color: var(--muted);
  font-size: 13px;
}

.manifesto-author-line {
  width: 48px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

/* ===== FOOTER ===== */
.site-footer {
  height: 90px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
}

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

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

/* ===== RESPONSIVE & MOBILE ADAPTATIONS ===== */
@media (max-width: 968px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .results-layout {
    grid-template-columns: 1fr;
  }
  .results-sidebar {
    position: static;
  }
  .nexus-world-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .inspection-scroll-wrapper {
    height: auto; /* Release sticky on tablets & mobile */
  }
  .inspection-sticky-viewport {
    position: static;
    height: auto;
    padding: 60px 0;
  }
  .inspection-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .chamber-viewport {
    min-height: 280px;
  }
}

@media (max-width: 768px) {
  .ledger-control-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 18px;
  }
  .filter-pill-group {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    scrollbar-width: none;
  }
  .filter-pill-group::-webkit-scrollbar {
    display: none;
  }
  .filter-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }
  .hero-observatory {
    padding: 40px 0;
  }
}

@media (max-width: 640px) {
  .site-header {
    height: auto;
    padding-top: 16px;
    padding-bottom: 16px;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  .nav-links {
    width: 100%;
    gap: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    font-size: 12px;
  }
  .nav-links a {
    white-space: nowrap;
  }
  .manifesto-card {
    padding: 32px 20px;
  }
  .manifesto-card h2 {
    font-size: 24px;
  }
  .manifesto-signatures {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .site-footer {
    height: auto;
    padding: 32px 0;
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  .footer-col.links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }
}

@media (max-width: 540px) {
  .container {
    width: calc(100% - 32px);
  }
  .hero-scanner-card {
    padding: 20px 16px;
  }
  .url-input-wrapper {
    flex-wrap: wrap;
    padding: 8px 12px;
    gap: 8px;
  }
  .url-input-wrapper input {
    min-width: 140px;
    padding: 8px 4px;
  }
  #scan-button {
    width: 100%;
    justify-content: center;
    padding: 12px;
  }
  .sample-trigger-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .btn-sample {
    justify-content: center;
  }
  .proof-bar {
    gap: 10px;
    flex-wrap: wrap;
  }
  .proof-divider {
    display: none;
  }
  .proof-stat {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
  }
  .chamber-bar {
    flex-wrap: wrap;
    gap: 8px;
  }
  .chamber-url-pill {
    order: 3;
    width: 100%;
    text-align: center;
  }
  .finding-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .code-snippet-wrapper {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-copy-snippet {
    align-self: flex-start;
  }
}

/* ===== PREFERS-REDUCED-MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .radar-scan-line {
    display: none;
  }
  .pulse-dot {
    animation: none;
  }
  .inspection-scroll-wrapper {
    height: auto;
  }
  .inspection-sticky-viewport {
    position: static;
    height: auto;
  }
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

@media (max-width: 968px) { .narrative-card.active { transform: none; } }

.banner-cta-btn { color: #08090b; font-weight: 700; }

/* Let report grid items shrink within narrow viewports. */
.results-layout > *, .results-main-content, .findings-ledger, .finding-card { min-width: 0; }
.results-layout { grid-template-columns: 320px minmax(0, 1fr); }
@media (max-width: 968px) { .results-layout { grid-template-columns: minmax(0, 1fr); } }
.ledger-control-bar { flex-wrap: wrap; }
.filter-pill-group { max-width: 100%; overflow-x: auto; }
.filter-btn { flex-shrink: 0; white-space: nowrap; }
