/* ============================================================
   HOSA Documentation Site — Stylesheet
   Pure CSS, no frameworks, no preprocessors.
   ============================================================ */

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Background */
  --bg-root: #06080f;
  --bg-primary: #0b0e1a;
  --bg-secondary: #111628;
  --bg-card: #161c33;
  --bg-card-hover: #1c2440;
  --bg-code: #0d1017;

  /* Accent — bio-inspired green */
  --accent: #00e5a0;
  --accent-dim: #00b880;
  --accent-glow: rgba(0, 229, 160, 0.12);
  --accent-glow-strong: rgba(0, 229, 160, 0.25);

  /* Text */
  --text-primary: #e4e7ef;
  --text-secondary: #8891a8;
  --text-tertiary: #5c6478;
  --text-accent: var(--accent);

  /* Borders */
  --border: #1e2540;
  --border-hover: #2c3558;

  /* Severity colors */
  --level-0: #00e5a0;
  --level-1: #38bdf8;
  --level-2: #facc15;
  --level-3: #fb923c;
  --level-4: #f87171;
  --level-5: #ef4444;

  /* Layout */
  --max-width: 1140px;
  --nav-height: 64px;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-root);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-dim);
}

img {
  max-width: 100%;
  display: block;
}

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--bg-code);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* --- Utilities --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.text-secondary {
  color: var(--text-secondary);
}

.text-center {
  text-align: center;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(6, 8, 15, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.nav-brand .brand-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-glow-strong);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--accent-glow-strong); }
  50% { opacity: 0.6; box-shadow: 0 0 16px var(--accent-glow-strong); }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 6px;
  transition: all var(--transition-fast);
}

.nav-links a:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.nav-links .active a {
  color: var(--accent);
}

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

.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--bg-secondary);
  border-radius: 6px;
  padding: 2px;
  border: 1px solid var(--border);
}

.lang-switch a {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  color: var(--text-tertiary);
  transition: all var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lang-switch a:hover {
  color: var(--text-secondary);
}

.lang-switch a.active {
  color: var(--text-primary);
  background: var(--bg-card);
}

.nav-github {
  display: flex;
  align-items: center;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.nav-github:hover {
  color: var(--text-primary);
}

.nav-github svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* Mobile menu */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text-secondary);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  margin: 5px 0;
  border-radius: 1px;
  transition: all var(--transition-fast);
}

/* --- Hero --- */
.hero {
  padding: 160px 0 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.hero-badge .badge-dot {
  width: 6px;
  height: 6px;
  background: var(--level-3);
  border-radius: 50%;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.hero h1 .accent-word {
  background: linear-gradient(135deg, var(--accent) 0%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  font-family: var(--font-sans);
}

.btn-primary {
  background: var(--accent);
  color: #06080f;
}

.btn-primary:hover {
  background: var(--accent-dim);
  color: #06080f;
  transform: translateY(-1px);
  box-shadow: 0 4px 24px var(--accent-glow-strong);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* --- Sections --- */
.section {
  padding: 100px 0;
}

.section-alt {
  background: var(--bg-primary);
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.7;
}

/* --- Lethal Interval Section --- */
.lethal-diagram {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  overflow-x: auto;
  margin-top: 48px;
}

.lethal-diagram pre {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--text-secondary);
  white-space: pre;
  margin: 0;
}

.lethal-diagram .hl-hosa {
  color: var(--accent);
  font-weight: 600;
}

.lethal-diagram .hl-prom {
  color: var(--level-3);
}

.lethal-diagram .hl-dead {
  color: var(--level-5);
}

.lethal-diagram .hl-label {
  color: var(--text-primary);
  font-weight: 600;
}

/* --- Feature Cards --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 28px;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.feature-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  font-size: 1.8rem;
  margin-bottom: 16px;
  display: block;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.65;
}

/* --- Response Levels Table --- */
.levels-table-wrap {
  overflow-x: auto;
  margin-top: 48px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.levels-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  min-width: 700px;
}

.levels-table thead {
  background: var(--bg-secondary);
}

.levels-table th {
  padding: 14px 20px;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border);
}

.levels-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: top;
}

.levels-table tbody tr:last-child td {
  border-bottom: none;
}

.levels-table tbody tr {
  transition: background var(--transition-fast);
}

.levels-table tbody tr:hover {
  background: var(--bg-card);
}

.level-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 3px 10px;
  border-radius: 4px;
  white-space: nowrap;
}

.level-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.level-0 { color: var(--level-0); }
.level-0 .dot { background: var(--level-0); }
.level-1 { color: var(--level-1); }
.level-1 .dot { background: var(--level-1); }
.level-2 { color: var(--level-2); }
.level-2 .dot { background: var(--level-2); }
.level-3 { color: var(--level-3); }
.level-3 .dot { background: var(--level-3); }
.level-4 { color: var(--level-4); }
.level-4 .dot { background: var(--level-4); }
.level-5 { color: var(--level-5); }
.level-5 .dot { background: var(--level-5); }

/* --- Architecture Diagram --- */
.arch-diagram {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  overflow-x: auto;
  margin-top: 48px;
}

.arch-diagram pre {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.65;
  color: var(--text-secondary);
  white-space: pre;
  margin: 0;
}

/* --- Quick Start --- */
.quickstart-steps {
  display: grid;
  gap: 24px;
  margin-top: 48px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.quickstart-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 28px;
}

.step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--accent-glow);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 6px;
  flex-shrink: 0;
}

.step-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
}

.code-block {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  overflow-x: auto;
}

.code-block pre {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--text-primary);
  margin: 0;
  white-space: pre;
}

.code-block .comment {
  color: var(--text-tertiary);
}

.code-block .command {
  color: var(--accent);
}

/* --- Docs Navigation Grid --- */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.doc-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all var(--transition-base);
  text-decoration: none;
  color: var(--text-primary);
}

.doc-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.doc-card-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.doc-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.doc-card p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.doc-card .arrow {
  color: var(--accent);
  opacity: 0;
  transform: translateX(-4px);
  transition: all var(--transition-fast);
  margin-left: auto;
  flex-shrink: 0;
  align-self: center;
}

.doc-card:hover .arrow {
  opacity: 1;
  transform: translateX(0);
}

/* --- Comparison Section --- */
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 48px;
}

.comparison-card {
  padding: 32px 28px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.comparison-card.without {
  background: rgba(239, 68, 68, 0.04);
  border-color: rgba(239, 68, 68, 0.2);
}

.comparison-card.with {
  background: var(--accent-glow);
  border-color: rgba(0, 229, 160, 0.2);
}

.comparison-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.comparison-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comparison-card li {
  font-size: 0.875rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.5;
}

.comparison-card li .icon {
  flex-shrink: 0;
  margin-top: 2px;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0;
  background: var(--bg-primary);
}

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

.footer-left p {
  color: var(--text-tertiary);
  font-size: 0.82rem;
  margin-top: 4px;
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  color: var(--text-tertiary);
  font-size: 0.82rem;
  transition: color var(--transition-fast);
}

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

.footer-quote {
  width: 100%;
  text-align: center;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.footer-quote blockquote {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  font-style: italic;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
}

/* --- Mobile Responsive --- */
@media (max-width: 860px) {
  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-root);
    flex-direction: column;
    align-items: stretch;
    padding: 24px;
    gap: 4px;
    border-top: 1px solid var(--border);
    overflow-y: auto;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 12px 16px;
    font-size: 1rem;
  }

  .nav-toggle {
    display: block;
  }

  .hero {
    padding: 130px 0 80px;
  }

  .section {
    padding: 72px 0;
  }

  .comparison-grid {
    grid-template-columns: 1fr;
  }

  .lethal-diagram,
  .arch-diagram {
    padding: 20px 16px;
    border-radius: 8px;
  }

  .lethal-diagram pre,
  .arch-diagram pre {
    font-size: 0.65rem;
  }

  .section-header {
    margin-bottom: 40px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }

  .hero-ctas {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    justify-content: center;
  }

  .feature-card {
    padding: 24px 20px;
  }

  .footer-content {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ============================================================
   TIMELINE — Lethal Interval Visualization
   ============================================================ */
.timeline {
  margin-top: 64px;
}

.timeline-title {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
  margin-bottom: 40px;
}

.timeline-track {
  position: relative;
  padding-left: 60px;
  margin-left: 20px;
}

.timeline-track::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

/* Event */
.tl-event {
  position: relative;
  padding-bottom: 32px;
}

.tl-event:last-child {
  padding-bottom: 0;
}

/* Marker dot on the line */
.tl-marker {
  position: absolute;
  left: -49px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg-root);
  z-index: 2;
}

.tl-marker.hosa {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow-strong);
}

.tl-marker.dead {
  background: var(--level-5);
  border-color: var(--level-5);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.tl-marker.prom {
  background: var(--level-3);
  border-color: var(--level-3);
  box-shadow: 0 0 10px rgba(251, 146, 60, 0.3);
}

.tl-marker.neutral {
  background: var(--text-tertiary);
  border-color: var(--text-tertiary);
}

/* Time badge */
.tl-time {
  position: absolute;
  left: -90px;
  top: 2px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-align: right;
  width: 36px;
}

/* Card */
.tl-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
  transition: all var(--transition-base);
}

.tl-card:hover {
  background: var(--bg-card-hover);
  transform: translateX(4px);
}

.tl-card.tl-hosa {
  border-left-color: var(--accent);
}

.tl-card.tl-dead {
  border-left-color: var(--level-5);
  background: rgba(239, 68, 68, 0.04);
}

.tl-card.tl-prom {
  border-left-color: var(--level-3);
  background: rgba(251, 146, 60, 0.04);
}

.tl-card.tl-neutral {
  border-left-color: var(--text-tertiary);
}

.tl-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.tl-card-head h4 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.tl-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 8px;
}

.tl-card p:last-child {
  margin-bottom: 0;
}

/* Metric pills */
.tl-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.tl-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  white-space: nowrap;
}

.tl-pill.accent-pill {
  background: var(--accent-glow);
  border-color: rgba(0, 229, 160, 0.15);
  color: var(--accent);
}

/* Badges */
.tl-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hosa-badge {
  background: var(--accent-glow);
  color: var(--accent);
}

.dead-badge {
  background: rgba(239, 68, 68, 0.12);
  color: var(--level-5);
}

.prom-badge {
  background: rgba(251, 146, 60, 0.12);
  color: var(--level-3);
}

/* Aside text */
.tl-aside {
  font-size: 0.78rem !important;
  color: var(--text-tertiary) !important;
  font-style: italic;
  border-top: 1px solid var(--border);
  padding-top: 8px;
  margin-top: 8px !important;
}

/* Lethal Interval Callout */
.tl-callout {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin: 32px 0 32px 20px;
  padding: 20px 24px;
  background: var(--accent-glow);
  border: 1px solid rgba(0, 229, 160, 0.2);
  border-radius: 10px;
}

.tl-callout-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.tl-callout-body strong {
  display: block;
  font-size: 0.95rem;
  color: var(--accent);
  margin-bottom: 4px;
}

.tl-callout-body p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* Counterfactual divider */
.tl-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 32px 0 32px 20px;
}

.tl-divider::before,
.tl-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(239, 68, 68, 0.2);
}

.tl-divider span {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--level-4);
  white-space: nowrap;
}


/* ============================================================
   ARCHITECTURE FLOW — Card-based diagram
   ============================================================ */
.arch-flow {
  margin-top: 48px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Layer */
.arch-layer {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.arch-layer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
}

.arch-kernel {
  background: var(--bg-card);
}

.arch-kernel .arch-layer-head {
  background: rgba(0, 229, 160, 0.06);
}

.arch-user {
  background: var(--bg-card);
}

.arch-user .arch-layer-head {
  background: rgba(56, 189, 248, 0.06);
}

.arch-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 12px;
  border-radius: 4px;
}

.kernel-tag {
  background: var(--accent-glow);
  color: var(--accent);
}

.user-tag {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
}

.arch-tech {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-tertiary);
}

/* Nodes inside layers */
.arch-nodes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
}

.arch-nodes-stack {
  grid-template-columns: 1fr;
}

.arch-node {
  padding: 24px;
  background: var(--bg-card);
}

.arch-node-icon {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.arch-node h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.arch-node ul,
.arch-node ol {
  padding-left: 0;
  list-style: none;
}

.arch-node ul li,
.arch-node ol li {
  font-size: 0.82rem;
  color: var(--text-secondary);
  padding: 3px 0;
  line-height: 1.5;
}

/* Cortex node */
.arch-node-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.arch-node-head .arch-node-icon {
  margin-bottom: 0;
}

.cortex-steps {
  counter-reset: step;
  padding-left: 0 !important;
}

.cortex-steps li {
  counter-increment: step;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 0 !important;
  border-bottom: 1px solid var(--border);
}

.cortex-steps li:last-child {
  border-bottom: none;
}

.cortex-steps li::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-secondary);
  flex-shrink: 0;
  margin-top: 1px;
}

/* Communication node */
.arch-comms-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.arch-comms-chip {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 100px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.arch-comms-note {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  font-style: italic;
  margin: 0;
}

/* Bridge between layers */
.arch-bridge {
  display: flex;
  justify-content: center;
  gap: 48px;
  padding: 16px 0;
}

.arch-bridge-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.arch-arrow-down,
.arch-arrow-up {
  flex-shrink: 0;
}

/* Step note */
.step-note {
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--text-tertiary);
  line-height: 1.6;
}

.step-note code {
  font-size: 0.78em;
}

.step-note a {
  color: var(--accent);
}


/* ============================================================
   RESPONSIVE — Timeline & Architecture additions
   ============================================================ */
@media (max-width: 860px) {
  .timeline-track {
    padding-left: 48px;
    margin-left: 12px;
  }

  .tl-time {
    left: -72px;
    font-size: 0.68rem;
    width: 30px;
  }

  .tl-marker {
    left: -41px;
    width: 10px;
    height: 10px;
  }

  .tl-card {
    padding: 16px 18px;
  }

  .arch-nodes {
    grid-template-columns: 1fr;
  }

  .arch-bridge {
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .timeline-track {
    padding-left: 40px;
    margin-left: 8px;
  }

  .tl-time {
    left: -60px;
    font-size: 0.65rem;
    width: 26px;
  }

  .tl-marker {
    left: -33px;
  }

  .tl-callout {
    margin-left: 8px;
    padding: 16px;
  }

  .tl-divider {
    margin-left: 8px;
  }

  .tl-metrics {
    gap: 4px;
  }

  .tl-pill {
    font-size: 0.65rem;
    padding: 2px 8px;
  }
}

/* ============================================================
   COMING SOON — Quick Start placeholder
   ============================================================ */
.coming-soon-box {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  background: var(--bg-card);
  border: 1px dashed var(--border-hover);
  border-radius: 16px;
  padding: 48px 36px;
}

.coming-soon-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.coming-soon-box h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.coming-soon-box p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 28px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

.coming-soon-box .btn {
  display: inline-flex;
}