/**
 * CodeTM - Component Stylesheets (Neat, Crisp & Minimalist SaaS Design System)
 * CodeMirror IDE Theme, Landing Page, Problem & Analogy, Documentation, AI Analyzer, Full-Width System Architect Flow (HLD/SLD/LLD).
 */

/* ==========================================================================
   0. Text Stylizers & Typography Utilities
   ========================================================================== */
.stylized-bold {
  font-weight: 700;
  color: #0f172a;
}

.stylized-em {
  font-style: italic;
  color: #334155;
}

.stylized-code {
  font-family: var(--font-mono);
  background: #f1f5f9;
  color: #0f172a;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #e2e8f0;
  display: inline-block;
  line-height: 1.3;
}

.desc-para {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.7;
  color: #334155;
  margin-bottom: 12px;
}

/* ==========================================================================
   1. Landing Page Components
   ========================================================================== */
.landing-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 4px 0 24px 0;
  width: 100%;
}

.landing-hero {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px;
  padding: 44px 36px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  width: 100%;
}

.hero-tagline-pill {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: #0f172a;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 4px 14px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-title {
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.6px;
  line-height: 1.3;
  max-width: 820px;
}

.hero-subtitle {
  font-family: var(--font-mono);
  font-size: 14.5px;
  color: #475569;
  max-width: 720px;
  line-height: 1.6;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.hero-stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 18px;
  border-top: 1px solid #e2e8f0;
  width: 100%;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--font-mono);
}

.stat-num {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
}

.stat-label {
  font-size: 11.5px;
  color: #64748b;
  font-weight: 600;
}

/* Landing Features Grid */
.landing-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  width: 100%;
}

.feature-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.feature-card:hover {
  border-color: #cbd5e1 !important;
  transform: translateY(-2px);
}

.feature-card-icon {
  width: 36px;
  height: 36px;
  background: #0f172a;
  color: #ffffff;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  margin-bottom: 4px;
}

.feature-card-title {
  font-family: var(--font-mono);
  font-size: 15.5px;
  font-weight: 700;
  color: #0f172a;
}

.feature-card-desc {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #475569;
  line-height: 1.55;
}

/* Curated Tracks */
.landing-tracks-section {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  width: 100%;
}

.tracks-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}

.tracks-title {
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
}

.tracks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.track-card {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 6px;
  padding: 14px 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: all 0.15s ease;
  font-family: var(--font-mono);
}

.track-card:hover {
  background: #ffffff !important;
  border-color: #0f172a !important;
}

.track-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.track-card-title {
  font-weight: 700;
  font-size: 14px;
  color: #0f172a;
}

.track-card-meta {
  font-size: 11.5px;
  color: #64748b;
}

/* ==========================================================================
   2. Problem Card & Analogy Components
   ========================================================================== */
.problem-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px;
  padding: 26px 28px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  width: 100%;
}

.problem-header {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 16px;
}

.problem-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.problem-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.problem-num {
  font-family: var(--font-mono);
  font-size: 19px;
  color: #64748b;
  font-weight: 700;
}

.problem-title {
  font-family: var(--font-mono);
  font-size: 25px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.5px;
}

.problem-meta-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Score Overview */
.score-overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 12px 0;
}

.score-card {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 6px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.score-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.score-card-title {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.score-val {
  font-family: var(--font-mono);
  font-size: 21px;
  font-weight: 800;
  color: #0f172a;
}

.difficulty-meter {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}

.difficulty-bar {
  height: 100%;
  background: linear-gradient(90deg, #059669, #d97706, #dc2626);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.verdict-text {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: #475569;
  line-height: 1.5;
}

/* Analogy Cards */
.analogy-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 6px;
  padding: 16px 20px;
  margin-top: 12px;
}

.real-world-analogy { border-left: 4px solid #0f172a; }
.mental-model { border-left: 4px solid #2563eb; }
.pattern-radar { border-left: 4px solid #059669; }
.traps-card { border-left: 4px solid #d97706; }

.analogy-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.analogy-title {
  font-family: var(--font-mono);
  font-size: 14.5px;
  font-weight: 700;
  color: #0f172a;
}

.analogy-metaphor {
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.6;
  color: #334155;
}

.mental-model-diagram {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 6px;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.5;
  color: #0f172a;
  overflow-x: auto;
  margin: 8px 0;
}

.key-invariant-box {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: #0f172a;
}

.pattern-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pattern-chip {
  font-family: var(--font-mono);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.pattern-chip.primary {
  background: #0f172a;
  color: #ffffff;
}

.pattern-chip.secondary {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.traps-list {
  padding-left: 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: #334155;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.section-subtitle {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  margin: 16px 0 8px 0;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.example-box {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
}

.example-title {
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
}

.example-row {
  margin-bottom: 4px;
  color: #334155;
}

.constraints-list {
  padding-left: 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: #334155;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* ==========================================================================
   3. Code Workspace & CodeMirror IDE Editor
   ========================================================================== */
.editor-container-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  width: 100%;
}

.editor-toolbar {
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.editor-toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.editor-toolbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.custom-select {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 5px;
  padding: 5px 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

/* Code Editor Wrapper & Textarea */
.code-editor-wrapper {
  position: relative;
  width: 100% !important;
  height: 480px !important;
  background: #0f172a !important;
  overflow: hidden;
  display: block;
}

.code-editor-wrapper textarea#code-textarea {
  width: 100% !important;
  height: 480px !important;
  background: #0f172a !important;
  color: #f8fafc !important;
  font-family: 'JetBrains Mono', 'Fira Code', Menlo, Consolas, monospace !important;
  font-size: 14px !important;
  line-height: 23px !important;
  padding: 12px 14px !important;
  border: none !important;
  outline: none !important;
  resize: none !important;
  white-space: pre !important;
  tab-size: 4 !important;
  box-sizing: border-box !important;
}

/* CodeMirror Core & Theme (VS Code Dark+ Style) */
.CodeMirror {
  height: 480px !important;
  width: 100% !important;
  font-family: 'JetBrains Mono', 'Fira Code', Menlo, Consolas, monospace !important;
  font-size: 14px !important;
  line-height: 23px !important;
  background: #0f172a !important;
  color: #f8fafc !important;
}

.CodeMirror-gutters {
  background: #0b1120 !important;
  border-right: 1px solid #1e293b !important;
  padding-right: 4px;
}

.CodeMirror-linenumber {
  color: #64748b !important;
  font-family: var(--font-mono) !important;
  font-size: 12.5px !important;
}

.CodeMirror-cursor {
  border-left: 2px solid #38bdf8 !important;
}

.CodeMirror-activeline-background {
  background: rgba(30, 41, 59, 0.6) !important;
}

.CodeMirror-selected {
  background: #2563eb !important;
}

.CodeMirror-matchingbracket {
  background: #1e3a8a !important;
  outline: 1px solid #38bdf8 !important;
  color: #ffffff !important;
}

/* VS Code Dark+ IDE Syntax Tokens */
.cm-s-material-darker .cm-keyword,
.CodeMirror .cm-keyword {
  color: #c586c0 !important;
  font-weight: 700 !important;
}

.cm-s-material-darker .cm-def,
.CodeMirror .cm-def {
  color: #dcdcaa !important;
}

.cm-s-material-darker .cm-type,
.cm-s-material-darker .cm-variable-2,
.CodeMirror .cm-type,
.CodeMirror .cm-variable-2 {
  color: #4ec9b0 !important;
  font-weight: 600 !important;
}

.cm-s-material-darker .cm-variable,
.CodeMirror .cm-variable {
  color: #9cdcfe !important;
}

.cm-s-material-darker .cm-property,
.CodeMirror .cm-property {
  color: #dcdcaa !important;
}

.cm-s-material-darker .cm-string,
.CodeMirror .cm-string {
  color: #ce9178 !important;
}

.cm-s-material-darker .cm-number,
.CodeMirror .cm-number {
  color: #b5cea8 !important;
}

.cm-s-material-darker .cm-comment,
.CodeMirror .cm-comment {
  color: #6a9955 !important;
  font-style: italic !important;
}

.cm-s-material-darker .cm-operator,
.CodeMirror .cm-operator {
  color: #d4d4d4 !important;
}

.cm-s-material-darker .cm-punctuation,
.CodeMirror .cm-punctuation {
  color: #cbd5e1 !important;
}

.cm-s-material-darker .cm-meta,
.CodeMirror .cm-meta {
  color: #9cdcfe !important;
}

.editor-status-bar {
  background: #0b1120 !important;
  border-top: 1px solid #1e293b;
  padding: 5px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #64748b;
}

.status-bar-left, .status-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Multi-file Project Tree */
.project-files-box {
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  padding: 6px 12px;
}

.project-files-header {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 4px;
}

.project-files-list {
  display: flex;
  gap: 6px;
  overflow-x: auto;
}

.project-file-item {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 4px;
  padding: 3px 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #334155 !important;
  cursor: pointer;
}

.project-file-item.active {
  background: #0f172a !important;
  border-color: #0f172a !important;
  color: #ffffff !important;
}

/* Test Runner Terminal */
.terminal-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  margin-top: 16px;
  width: 100%;
}

.terminal-header {
  background: #f8fafc !important;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e2e8f0 !important;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: #0f172a !important;
}

.terminal-body {
  padding: 14px;
  min-height: 110px;
  max-height: 300px;
  overflow-y: auto;
  font-family: var(--font-mono);
  background: #ffffff !important;
}

.terminal-summary {
  padding: 8px 12px;
  border-radius: 5px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.terminal-summary.badge-success {
  background: #ecfdf5 !important;
  border: 1px solid #a7f3d0 !important;
  color: #047857 !important;
}

.terminal-summary.badge-error {
  background: #fef2f2 !important;
  border: 1px solid #fecaca !important;
  color: #b91c1c !important;
}

.status-pill {
  font-weight: 800;
  font-size: 12.5px;
  text-transform: uppercase;
}

.summary-stats {
  font-size: 12px;
  font-weight: 600;
}

.testcase-item {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 5px;
  padding: 10px 14px;
  margin-bottom: 6px;
}

.testcase-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.tc-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
}

.tc-badge.passed { color: #047857; font-size: 11.5px; font-weight: 700; }
.tc-badge.failed { color: #b91c1c; font-size: 11.5px; font-weight: 700; }

.tc-row {
  display: flex;
  gap: 8px;
  font-size: 12.5px;
  margin-bottom: 2px;
  font-family: var(--font-mono);
}

.tc-label { color: #64748b; min-width: 60px; }
.tc-val { color: #0f172a; }
.tc-highlight { color: #0f172a; font-weight: 700; }
.tc-wrong { color: #dc2626; font-weight: 700; }

/* ==========================================================================
   4. AI Analyzer Section & Charts
   ========================================================================== */
.analyzer-header-banner {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  width: 100%;
}

.analyzer-title-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.analyzer-icon-mark {
  width: 38px;
  height: 38px;
  background: #0f172a !important;
  color: #ffffff !important;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.analyzer-title-text h3 {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
}

.analyzer-title-text p {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: #475569;
}

.pillar-section {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  width: 100%;
}

.pillar-title {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}

.complexity-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.chart-card {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 6px;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.chart-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.chart-title {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
}

.complexity-badge {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 800;
  color: #0f172a;
  background: #e2e8f0;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
}

.chart-canvas {
  width: 100%;
  height: 200px;
  border-radius: 4px;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
}

.complexity-explanation {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: #475569;
  margin-top: 8px;
  line-height: 1.5;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.metric-box {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 6px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.metric-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
}

.metric-value {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
}

.metric-progress {
  width: 100%;
  height: 5px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 3px;
}

.metric-progress-bar {
  height: 100%;
  background: #0f172a;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.insights-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.insight-item {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 6px;
  padding: 14px 16px;
}

.insight-item.insight-warn { border-left: 4px solid #d97706; }
.insight-item.insight-good { border-left: 4px solid #059669; }

.insight-item-title {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 3px;
}

.insight-item-desc {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: #334155;
  line-height: 1.5;
}

.pitch-box {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px;
  padding: 14px 18px;
  margin-top: 8px;
}

.pitch-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.pitch-title {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
}

.pitch-content {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: #334155;
}

/* ==========================================================================
   5. System Architect & Full-Width Visual Flow Graph (HLD/SLD/LLD)
   ========================================================================== */
.arch-view-tabs {
  display: inline-flex;
  gap: 4px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  margin-bottom: 16px;
  overflow-x: auto;
  max-width: 100%;
}

.arch-view-btn {
  background: transparent !important;
  border: none !important;
  border-radius: 6px;
  padding: 7px 16px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: #475569 !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.arch-view-btn:hover {
  color: #0f172a !important;
  background: rgba(255, 255, 255, 0.7) !important;
}

.arch-view-btn.active {
  background: #ffffff !important;
  color: #0f172a !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  font-weight: 700 !important;
}

.architect-blueprint-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px;
  padding: 22px 24px;
  margin-bottom: 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  width: 100%;
}

/* Full-Width Visual Microservice Stages Grid */
.arch-visual-flow-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 14px 0;
  width: 100%;
}

.arch-stage-card {
  background: #0f172a !important;
  border: 1px solid #1e293b;
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.arch-stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #1e293b;
  padding-bottom: 8px;
}

.arch-stage-title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: #38bdf8;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.arch-stage-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.arch-stage-nodes {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.arch-node-box {
  background: #1e293b !important;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.arch-node-top {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #f8fafc;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
}

.arch-node-top i {
  color: #38bdf8;
  font-size: 12px;
}

.arch-node-desc {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.4;
}

/* macOS Terminal Window for ASCII Mode */
.architect-blueprint-wrapper {
  background: #0b1120 !important;
  border: 1px solid #1e293b;
  border-radius: 8px;
  overflow: hidden;
  margin: 14px 0;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
  width: 100%;
}

.architect-blueprint-toolbar {
  background: #070d19 !important;
  border-bottom: 1px solid #1e293b;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.terminal-dots {
  display: flex;
  align-items: center;
  gap: 5px;
}

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

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.architect-blueprint-pre {
  background: transparent !important;
  color: #38bdf8 !important;
  padding: 16px 20px;
  font-family: 'JetBrains Mono', 'Fira Code', Menlo, Consolas, monospace !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
  overflow-x: auto;
  border: none !important;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}

.arch-decisions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 14px;
  width: 100%;
}

.arch-decision-box {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 6px;
  padding: 12px 16px;
}

.arch-decision-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #0f172a;
  margin-bottom: 4px;
  letter-spacing: 0.3px;
}

.arch-decision-val {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: #475569;
  line-height: 1.5;
}

.arch-code-snippet-pre {
  background: #0b1120 !important;
  color: #f8fafc !important;
  padding: 16px 18px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 12.5px !important;
  line-height: 1.5 !important;
  overflow-x: auto;
  border: 1px solid #1e293b;
  margin-top: 8px;
  width: 100%;
}

/* 5 Pillars Grid */
.arch-pillars-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  margin-top: 6px;
}

.arch-pillar-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px;
  padding: 20px 22px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  width: 100%;
}

.arch-pillar-card.pillar-algo { border-left: 4px solid #0f172a !important; }
.arch-pillar-card.pillar-arch { border-left: 4px solid #2563eb !important; }
.arch-pillar-card.pillar-scale { border-left: 4px solid #059669 !important; }
.arch-pillar-card.pillar-storage { border-left: 4px solid #7c3aed !important; }
.arch-pillar-card.pillar-security { border-left: 4px solid #dc2626 !important; }

.arch-pillar-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}

.arch-pillar-title {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.arch-pillar-summary-text {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}

.arch-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 10px;
  width: 100%;
}

.arch-item-box {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 6px;
  padding: 14px 16px;
  transition: border-color 0.15s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.arch-item-box:hover {
  border-color: #cbd5e1 !important;
}

.arch-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 6px;
  flex-wrap: wrap;
  gap: 8px;
}

.arch-item-topic {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
}

.arch-impact-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
  line-height: 1.2;
  white-space: nowrap;
}

.arch-impact-badge.badge-emerald {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.arch-impact-badge.badge-rose {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.arch-impact-badge.badge-blue {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.arch-impact-badge.badge-neutral {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.arch-item-desc {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #334155;
  line-height: 1.6;
}

/* Tradeoff Matrix Table */
.tradeoff-table-wrapper {
  overflow-x: auto;
  margin-top: 12px;
  width: 100%;
}

.tradeoff-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 12.5px;
}

.tradeoff-table th {
  background: #0f172a !important;
  color: #ffffff !important;
  padding: 10px 14px;
  text-align: left;
  font-weight: 700;
}

.tradeoff-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #e2e8f0 !important;
  color: #334155;
}

.tradeoff-table tr:nth-child(even) td {
  background: #f8fafc !important;
}

/* ==========================================================================
   6. Documentation & Notes Hub
   ========================================================================== */
.notes-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  min-height: 500px;
  width: 100%;
}

.notes-editor-pane, .notes-preview-pane {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.notes-toolbar {
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.notes-textarea {
  flex: 1;
  background: #ffffff !important;
  color: #0f172a !important;
  border: none;
  outline: none;
  resize: none;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.6;
}

.notes-preview-body {
  flex: 1;
  padding: 18px;
  background: #ffffff !important;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.6;
  color: #334155;
}

/* ==========================================================================
   7. Community Feed & Modals
   ========================================================================== */
.community-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  width: 100%;
}

.community-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.author-avatar-text {
  width: 30px;
  height: 30px;
  background: #0f172a !important;
  color: #ffffff !important;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.author-name {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #0f172a;
  font-size: 13.5px;
}

.author-role {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #64748b;
}

.community-title {
  font-family: var(--font-mono);
  font-size: 14.5px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 3px;
}

.community-notes {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: #475569;
  margin-bottom: 8px;
  line-height: 1.5;
}

.community-code-preview {
  background: #0f172a !important;
  border-radius: 5px;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #f8fafc !important;
  overflow-x: auto;
  max-height: 150px;
  margin-bottom: 8px;
}

.community-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.upvote-btn {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 4px;
  padding: 5px 10px;
  color: #0f172a !important;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}

.upvote-btn.upvoted {
  background: #0f172a !important;
  border-color: #0f172a !important;
  color: #ffffff !important;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px;
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid #e2e8f0 !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.modal-close {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
}

.modal-close:hover {
  color: #0f172a;
}

.modal-body {
  padding: 18px;
  overflow-y: auto;
}

.search-input {
  width: 100%;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px;
  padding: 8px 12px;
  color: #0f172a !important;
  font-family: var(--font-mono);
  font-size: 13px;
  outline: none;
  margin-bottom: 12px;
}

.search-input:focus {
  border-color: #0f172a !important;
}

.cat-filters {
  display: flex;
  gap: 5px;
  margin-bottom: 12px;
  overflow-x: auto;
}

.cat-filter-pill {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 4px;
  padding: 5px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: #475569 !important;
  cursor: pointer;
  white-space: nowrap;
}

.cat-filter-pill.active {
  background: #0f172a !important;
  border-color: #0f172a !important;
  color: #ffffff !important;
}

.problem-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 5px;
  cursor: pointer;
  border-bottom: 1px solid #e2e8f0 !important;
  font-family: var(--font-mono);
}

.problem-list-row:hover {
  background: #f8fafc !important;
}

.problem-list-row.active {
  background: #f1f5f9 !important;
}

.row-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.row-title {
  font-weight: 700;
  color: #0f172a;
  font-size: 13.5px;
}

.row-pattern {
  font-size: 11.5px;
  color: #64748b;
}

.row-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   AI Empty State Card
   ========================================================================== */
.ai-empty-state-card {
  background: #ffffff !important;
  border: 1.5px dashed #cbd5e1 !important;
  border-radius: 10px;
  padding: 56px 36px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 16px 0 24px 0;
}

.ai-empty-state-icon {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #64748b;
}

.ai-empty-state-title {
  font-family: var(--font-mono);
  font-size: 16.5px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.ai-empty-state-desc {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #64748b;
  max-width: 560px;
  line-height: 1.6;
  margin: 0;
}

