/* NuCortex CSS Design System & Stylings */

:root {
  --bg: #09090b;
  --bg-card: #18181b;
  --text: #fafafa;
  --text-muted: #a1a1aa;
  --border: #27272a;
  --border-strong: #3f3f46;
  --accent-cyan: 196 100% 48%; /* HSL values for flexibility */
  --accent-emerald: 158 64% 52%;
  --accent-cyan-hex: #06b6d4;
  --accent-emerald-hex: #10b981;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', sfmono-regular, Consolas, monospace;
  --radius: 8px;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --line-height: 1.6;
  --letter-spacing: normal;
}

/* Base resets */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: var(--line-height);
  letter-spacing: var(--letter-spacing);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

.mono {
  font-family: var(--font-mono);
}

.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
header {
  background: rgba(9, 9, 11, 0.85);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.header-wrapper {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  background: linear-gradient(135deg, hsl(var(--accent-cyan-hex)), hsl(var(--accent-emerald-hex)));
  color: #000;
  font-weight: 800;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  letter-spacing: -0.05em;
}

.logo-meta {
  display: flex;
  flex-direction: column;
}

.logo-text {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.logo-subtext {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--text);
}

.status-indicator-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1e1b4b; /* Deep purple */
  border: 1px solid #312e81;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #c084fc;
}

.status-dot {
  width: 6px;
  height: 6px;
  background-color: var(--text-muted);
  border-radius: 50%;
  display: inline-block;
}

.status-dot.online {
  background-color: hsl(var(--accent-emerald));
  box-shadow: 0 0 8px hsl(var(--accent-emerald));
}

/* Hero Section */
.hero-section {
  padding: 80px 0 64px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.hero-badge {
  display: inline-block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.hero-headline {
  font-size: 48px;
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 24px;
}

.hero-headline strong {
  font-weight: 800;
}

.hero-subtitle {
  max-width: 680px;
  margin: 0 auto 36px;
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Lens Selector */
.lens-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 32px;
}

.lens-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lens-buttons {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 4px;
  border-radius: 9999px;
}

.btn-lens {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 9999px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-lens.active {
  background: var(--border-strong);
  color: var(--text);
}

/* Drawers container */
.drawer-container {
  max-width: 800px;
  margin: 0 auto;
}

.lens-drawer {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: left;
  animation: slideDown var(--transition);
  opacity: 1;
  max-height: 500px;
  overflow: hidden;
  transition: opacity 0.3s ease, max-height 0.3s ease;
}

.lens-drawer.hidden {
  opacity: 0;
  max-height: 0;
  padding: 0 24px;
  border-color: transparent;
  pointer-events: none;
  margin-bottom: 0;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.drawer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
}

.drawer-info h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

.drawer-info p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 16px;
}

.tech-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-badges span {
  background: #27272a;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-strong);
}

.drawer-code {
  background: #09090b;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
}

.code-comment {
  color: #71717a;
  display: block;
}

.code-var {
  display: block;
}

.drawer-grid-simple h4 {
  font-size: 16px;
  margin-bottom: 12px;
}

.drawer-grid-simple p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.quote-block {
  border-left: 2px solid hsl(var(--accent-cyan));
  padding-left: 16px;
  font-style: italic;
  color: var(--text-muted);
}

/* Onboarding Section & Wizard */
.onboarding-section {
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 14px;
}

.onboarding-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 680px;
  margin: 0 auto;
  overflow: hidden;
}

.onboarding-progress {
  display: flex;
  background: #09090b;
  border-bottom: 1px solid var(--border);
}

.progress-step {
  flex: 1;
  text-align: center;
  padding: 14px 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

.progress-step.active {
  color: hsl(var(--accent-cyan));
  border-bottom-color: hsl(var(--accent-cyan));
}

.onboarding-panels {
  padding: 32px;
  position: relative;
}

.wizard-panel {
  display: none;
  animation: fadeIn var(--transition);
}

.wizard-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.99); }
  to { opacity: 1; transform: scale(1); }
}

.wizard-panel h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.panel-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.form-select, .form-textarea, .form-input {
  width: 100%;
  background: #09090b;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  transition: var(--transition);
}

.form-select:focus, .form-textarea:focus {
  border-color: var(--border-strong);
  outline: none;
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

.form-slider {
  width: 100%;
  accent-color: hsl(var(--accent-cyan));
  margin-top: 8px;
  cursor: pointer;
}

.slider-val {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  text-align: right;
  margin-top: 4px;
}

.calculated-tax-box {
  background: #09090b;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
  margin: 24px 0;
  display: flex;
  justify-content: space-around;
  text-align: center;
}

.tax-metric {
  display: flex;
  flex-direction: column;
}

.metric-num {
  font-size: 24px;
  font-weight: 800;
  color: hsl(var(--accent-cyan));
  font-family: var(--font-mono);
}

.metric-lbl {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 4px;
  letter-spacing: 0.05em;
}

/* Recommendation display */
.recommendation-result {
  background: #09090b;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 24px;
  margin-bottom: 24px;
}

.rec-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.rec-badge {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: hsl(var(--accent-emerald));
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.rec-header h4 {
  font-size: 16px;
  font-weight: 700;
}

.recommendation-result p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.deliverables-list h5 {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

.deliverables-list ul {
  list-style: none;
  font-size: 13px;
}

.deliverables-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}

.deliverables-list li::before {
  content: "✓";
  color: hsl(var(--accent-emerald));
  font-weight: bold;
}

/* Canonical Record output */
.record-wrapper {
  background: #09090b;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 24px;
}

.record-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.record-id {
  font-family: var(--font-mono);
  font-weight: 700;
  color: hsl(var(--accent-cyan));
}

.record-status {
  font-size: 11px;
  text-transform: uppercase;
  background: #27272a;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.record-pre {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  color: #d4d4d8;
  white-space: pre-wrap;
}

.wizard-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.btn-primary {
  background: var(--text);
  color: #000;
  border: 1px solid var(--text);
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
  background: var(--bg-card);
}

/* Mirror Section */
.mirror-section {
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
  background: #09090b;
}

.mirror-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}

.mirror-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.panel-header h3 {
  font-size: 16px;
  font-weight: 700;
}

.dot-online {
  width: 8px;
  height: 8px;
  background-color: hsl(var(--accent-emerald));
  border-radius: 50%;
  box-shadow: 0 0 8px hsl(var(--accent-emerald));
}

.panel-intro {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* Models dynamic rendering */
.runtime-models-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.model-row {
  background: #09090b;
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.model-meta h4 {
  font-size: 13.5px;
  font-weight: 600;
}

.model-meta span {
  font-size: 11px;
  color: var(--text-muted);
}

.badge-tag {
  background: var(--border);
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
}

.loading-placeholder {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}

/* Skills list */
.skills-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.skill-pill {
  background: #09090b;
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.skill-pill::before {
  content: "⚡";
  color: hsl(var(--accent-cyan));
}

.skills-count-badge {
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: hsl(var(--accent-cyan));
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Codex Stats Banner */
.codex-stats-banner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.stats-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.stats-header h3 {
  font-size: 16px;
  font-weight: 700;
}

.stats-header span {
  font-size: 12px;
  color: var(--text-muted);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  text-align: center;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 32px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text);
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Registry Section */
.registry-section {
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
}

.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.registry-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.registry-table th {
  background: #09090b;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}

.registry-table td {
  padding: 14px 16px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.registry-table td:first-child {
  color: var(--text);
}

.registry-table tr:last-child td {
  border-bottom: none;
}

.maturity-pill {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
}

.maturity-pill.active {
  background: rgba(16, 185, 129, 0.1);
  color: hsl(var(--accent-emerald));
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.maturity-pill.info {
  background: rgba(6, 182, 212, 0.1);
  color: hsl(var(--accent-cyan));
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.maturity-pill.warning {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.maturity-pill.prototype {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.maturity-pill.planned {
  background: #27272a;
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
}

.maturity-pill.pilot {
  background: rgba(99, 102, 241, 0.1);
  color: #6366f1;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

/* System Specs Section */
.specs-section {
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
  background: #09090b;
}

.specs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
}

.specs-sidebar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.spec-nav-link {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: var(--radius);
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
}

.spec-nav-link:hover, .spec-nav-link.active {
  background: var(--bg-card);
  color: var(--text);
}

.spec-article {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  animation: fadeIn var(--transition);
}

.spec-article.active {
  display: block;
}

.spec-article h3 {
  font-size: 20px;
  margin-bottom: 12px;
}

.spec-article h4 {
  font-size: 14px;
  margin: 20px 0 8px;
}

.alert {
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 16px;
}

.alert.info {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
}

.spec-article ul {
  margin-left: 20px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.spec-article li {
  margin-bottom: 6px;
}

/* C4 Container context mockup */
.c4-container-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.c4-box {
  background: #09090b;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
  width: 100%;
  max-width: 420px;
  text-align: center;
}

.c4-box.cyan {
  border-color: hsl(var(--accent-cyan));
}

.c4-box.emerald {
  border-color: hsl(var(--accent-emerald));
}

.c4-title {
  display: block;
  font-weight: 700;
  font-size: 14px;
}

.c4-tech {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 8px;
}

.c4-box p {
  font-size: 12.5px;
  color: var(--text-muted);
}

.c4-connector {
  width: 1px;
  height: 24px;
  background-color: var(--border-strong);
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 16px;
}

.specs-table th {
  text-align: left;
  border-bottom: 1px solid var(--border);
  padding: 8px 4px;
  color: var(--text-muted);
}

.specs-table td {
  padding: 10px 4px;
  border-bottom: 1px solid var(--border);
}

/* Comfort layout AA spacer button */
.btn-comfort-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  z-index: 101;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: var(--transition);
}

.btn-comfort-toggle:hover {
  background: var(--border-strong);
}

/* COMFOR MODE / DYSLEXIA OVERRIDES */
body.comfort-mode {
  --line-height: 1.85;
  --letter-spacing: 0.05em;
  font-size: 16px;
}

body.comfort-mode .status-dot.online {
  box-shadow: none; /* remove glow */
}

body.comfort-mode * {
  animation: none !important; /* disable heavy UI transitions / flashing */
  transition: none !important;
}

/* Footer */
footer {
  padding: 64px 0 48px;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 48px;
}

.footer-brand p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 12px;
  max-width: 280px;
}

footer h4 {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--text);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

/* Responsive adjustments */
@media (max-width: 800px) {
  .hero-headline {
    font-size: 32px;
  }
  .drawer-grid {
    grid-template-columns: 1fr;
  }
  .onboarding-progress {
    overflow-x: auto;
  }
  .mirror-grid {
    grid-template-columns: 1fr;
  }
  .codex-stats-banner .stats-row {
    grid-template-columns: 1fr 1fr;
  }
  .specs-layout {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
px
