/* ============================================================
   ETIC PROPOSTA — Design System (Responsive & High-Contrast Light Theme)
   Soft Slate Canvas · Layered Surfaces · Mobile-First Touch & Scroll Optimization
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:ital,wght@0,400;0,500;0,600;1,400&display=swap');

/* ── TOKENS ──────────────────────────────────────────────── */
:root {
  /* Slate Canvas (Soft & High Contrast) */
  --bg-page:        #F1F5F9;
  --bg-surface:     #F8FAFC;
  --bg-card:        #FFFFFF;
  --bg-card-subtle: #F1F5F9;
  --bg-card-hover:  #F8FAFC;
  --bg-elevated:    #E2E8F0;
  
  /* Brand Accents */
  --brand-blue:     #0D50E8;
  --brand-blue-dark:#0A38A8;
  --brand-blue-soft:#E0EAFF;
  --brand-blue-mid: #BFD5FD;
  --brand-cyan:     #0284C7;
  --brand-cyan-soft:#E0F2FE;
  
  --accent-teal:    #0D9488;
  --accent-teal-soft:#CCFBF1;
  --accent-amber:   #B45309;
  --accent-amber-soft:#FEF3C7;
  --accent-emerald: #059669;
  --accent-emerald-soft:#D1FAE5;
  --accent-rose:    #E11D48;
  --accent-rose-soft:#FFE4E6;

  /* Typography */
  --text-main:      #0F172A;
  --text-body:      #334155;
  --text-muted:     #64748B;
  --text-subtle:    #94A3B8;

  /* Borders */
  --border-subtle:  rgba(15, 23, 42, 0.07);
  --border-card:    #E2E8F0;
  --border-strong:  #CBD5E1;

  /* Fonts */
  --font-sans:      'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:      'JetBrains Mono', monospace;

  /* Radii */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Shadows */
  --shadow-subtle:  0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
  --shadow-card:    0 4px 16px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  --shadow-hover:   0 14px 30px -4px rgba(15, 23, 42, 0.09), 0 6px 12px -2px rgba(15, 23, 42, 0.04);
  --shadow-blue:    0 8px 24px -4px rgba(13, 80, 232, 0.28);

  --transition:     0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── BASE & GLOBAL RESETS ────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-body);
  line-height: 1.7;
  overflow-x: hidden;
  max-width: 100vw;
  position: relative;
}

img, video, iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── PREVENT CODE/CONTAINER HORIZONTAL BLOWOUT ──────────── */
pre, code, .terminal-body, .arch-diagram {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Custom Scrollbar for code blocks */
pre::-webkit-scrollbar,
.terminal-body::-webkit-scrollbar,
.arch-diagram::-webkit-scrollbar {
  height: 6px;
  width: 6px;
}
pre::-webkit-scrollbar-track,
.terminal-body::-webkit-scrollbar-track,
.arch-diagram::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}
pre::-webkit-scrollbar-thumb,
.terminal-body::-webkit-scrollbar-thumb,
.arch-diagram::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}

/* ── PROGRESS BAR ────────────────────────────────────────── */
#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-cyan));
  z-index: 10000;
  transition: width 0.1s linear;
}

/* ── STICKY TOP NAVBAR ───────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  z-index: 1000;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(248, 250, 252, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-card);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: -0.02em;
  color: var(--text-main);
  white-space: nowrap;
}

.navbar-logo .brand-badge {
  background: var(--brand-blue);
  color: #fff;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.chapter-indicator {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 500;
  background: var(--bg-card);
  padding: 4px 12px;
  border-radius: 99px;
  border: 1px solid var(--border-card);
  white-space: nowrap;
}

.chapter-indicator span {
  color: var(--brand-blue);
  font-weight: 700;
}

.navbar-tag {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  background: #E2E8F0;
  padding: 4px 10px;
  border-radius: 99px;
  white-space: nowrap;
}

/* ── BUTTONS & TOUCH TARGETS ─────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  min-height: 44px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  border: 1px solid transparent;
  text-align: center;
}

.btn-primary {
  background: var(--brand-blue);
  color: #FFFFFF;
  box-shadow: var(--shadow-blue);
}
.btn-primary:hover {
  background: var(--brand-blue-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -2px rgba(13, 80, 232, 0.38);
}

.btn-outline {
  background: var(--bg-card);
  color: var(--text-main);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-subtle);
}
.btn-outline:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
  background: var(--brand-blue-soft);
  transform: translateY(-1px);
}

/* ── HERO SECTION ────────────────────────────────────────── */
.hero {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4.5rem 1.25rem 3.5rem;
  position: relative;
  background: linear-gradient(180deg, #E2E8F0 0%, #EDF2F7 40%, var(--bg-page) 100%);
  border-bottom: 1px solid var(--border-card);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FFFFFF;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-subtle);
  border-radius: 99px;
  padding: 6px 14px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--brand-blue);
  margin-bottom: 1.5rem;
  max-width: 92vw;
  line-height: 1.3;
}

.hero-kicker .pulse {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  background: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--accent-emerald-soft);
}

.hero-title {
  font-size: clamp(2rem, 4.8vw, 4.2rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.035em;
  color: var(--text-main);
  max-width: 900px;
  margin-bottom: 1.25rem;
  word-break: break-word;
}

.hero-title .highlight {
  background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(0.98rem, 1.6vw, 1.2rem);
  color: var(--text-body);
  max-width: 640px;
  margin-bottom: 2rem;
  line-height: 1.75;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2.25rem;
}

.hero-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 5px 12px;
  border-radius: 99px;
  border: 1px solid var(--border-card);
}

.hero-meta-item a,
.preview-url-bar a,
.domain-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.hero-meta-item a:hover,
.preview-url-bar a:hover,
.domain-link:hover {
  color: var(--brand-blue);
}

.hero-cta-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  max-width: 480px;
}

.hero-cta-group .btn {
  flex: 1 1 200px;
}

/* ── LAYOUT & CONTAINERS ─────────────────────────────────── */
.section {
  padding: 4.5rem 1.25rem;
  max-width: 1120px;
  margin: 0 auto;
}

.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.divider-full {
  width: 100%;
  height: 1px;
  background: var(--border-card);
}

/* ── CHAPTER HEADINGS ────────────────────────────────────── */
.chapter-header {
  margin-bottom: 2.25rem;
}

.chapter-number {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-blue);
  margin-bottom: 0.75rem;
}

.chapter-number .num {
  background: var(--brand-blue);
  color: white;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 0.72rem;
}

.chapter-title {
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: var(--text-main);
  margin-bottom: 0.85rem;
  word-break: break-word;
}

.chapter-lead {
  font-size: 1.05rem;
  color: var(--text-body);
  max-width: 680px;
  line-height: 1.75;
}

/* ── NARRATIVE TYPOGRAPHY ────────────────────────────────── */
.narrative p {
  font-size: 1.02rem;
  color: var(--text-body);
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.narrative strong {
  color: var(--text-main);
  font-weight: 700;
}

.highlight-inline {
  background: #FEF3C7;
  color: #92400E;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.86em;
  font-weight: 600;
  border: 1px solid #FDE68A;
  display: inline-block;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-all;
}

.pull-quote {
  border-left: 4px solid var(--brand-blue);
  background: #FFFFFF;
  padding: 1.15rem 1.4rem;
  margin: 1.5rem 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  font-size: 1rem;
  color: var(--text-main);
  box-shadow: var(--shadow-subtle);
  border-top: 1px solid var(--border-card);
  border-bottom: 1px solid var(--border-card);
  border-right: 1px solid var(--border-card);
  line-height: 1.65;
}

/* ── STICKY SIDEBAR IN CHAPTERS (DESKTOP) ─────────────────── */
@media (min-width: 992px) {
  .sticky-side {
    position: sticky;
    top: 80px;
  }
}

/* ── HIGH CONTRAST TERMINAL COMPONENT ────────────────────── */
.terminal-wrapper {
  background: #0B1120;
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid #1E293B;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  font-family: var(--font-mono);
  max-width: 100%;
}

.terminal-header {
  background: #111827;
  padding: 9px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #1F2937;
}

.terminal-dot { width: 10px; height: 10px; border-radius: 50%; }
.terminal-dot.red    { background: #EF4444; }
.terminal-dot.yellow { background: #F59E0B; }
.terminal-dot.green  { background: #10B981; }

.terminal-title {
  margin-left: 6px;
  font-size: 0.72rem;
  color: #9CA3AF;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.terminal-body {
  padding: 1.15rem 1.25rem;
  font-size: 0.78rem;
  line-height: 1.7;
  color: #E5E7EB;
  flex: 1;
  min-height: 230px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.terminal-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 4px;
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal-prompt { color: #38BDF8; flex-shrink: 0; font-weight: 600; }
.terminal-cmd { color: #F9FAFB; font-weight: 500; word-break: break-all; }
.terminal-out { color: #9CA3AF; padding-left: 12px; word-break: break-all; }
.terminal-out.ok { color: #34D399; font-weight: 600; }
.terminal-out.err { color: #F87171; font-weight: 600; }

/* ── STATS ROW (Responsive Grid) ─────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-top: 2rem;
}

.stat-item {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.4rem 1rem;
  text-align: center;
  box-shadow: var(--shadow-subtle);
  transition: var(--transition);
}

.stat-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
  border-color: var(--border-strong);
}

.stat-number {
  font-size: clamp(1.6rem, 2.5vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 0.35rem;
}

.stat-number.blue  { color: var(--brand-blue); }
.stat-number.amber { color: var(--accent-amber); }
.stat-number.green { color: var(--accent-emerald); }
.stat-number.teal  { color: var(--accent-teal); }

.stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── ARCHITECTURE DIAGRAM ────────────────────────────────── */
.arch-diagram {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.25rem;
  font-family: var(--font-mono);
  box-shadow: var(--shadow-subtle);
  overflow-x: auto;
}

.arch-node {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.74rem;
  white-space: nowrap;
}

.arch-node.blue  { background: var(--brand-blue-soft); color: var(--brand-blue-dark); border: 1px solid var(--brand-blue-mid); }
.arch-node.teal  { background: var(--accent-teal-soft); color: #0F766E; border: 1px solid #99F6E4; }
.arch-node.red   { background: var(--accent-rose-soft); color: #BE123C; border: 1px solid #FECDD3; }
.arch-node.green { background: var(--accent-emerald-soft); color: #065F46; border: 1px solid #A7F3D0; }
.arch-node.amber { background: var(--accent-amber-soft); color: #92400E; border: 1px solid #FDE68A; }
.arch-arrow { color: var(--text-subtle); margin: 0 4px; font-weight: bold; }

/* ── COMPARISON SECTION ──────────────────────────────────── */
.comparison-section {
  background: #E8EEF5;
  border-top: 1px solid var(--border-card);
  border-bottom: 1px solid var(--border-card);
  padding: 4.5rem 1.25rem;
}

.comparison-inner {
  max-width: 1120px;
  margin: 0 auto;
}

.comparison-static {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

.comparison-card {
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.85rem 1.5rem;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.comparison-card.card-before {
  border-top: 4px solid var(--accent-amber);
}

.comparison-card.card-after {
  border-top: 4px solid var(--brand-blue);
}

.comp-card-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.card-before .comp-card-label { color: var(--accent-amber); }
.card-after  .comp-card-label { color: var(--brand-blue); }

.comp-card-title {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}

.comp-card-url {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-family: var(--font-mono);
}

.comp-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comp-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-body);
  line-height: 1.45;
}

.icon-bad  { color: var(--accent-rose); font-weight: bold; flex-shrink: 0; }
.icon-good { color: var(--accent-emerald); font-weight: bold; flex-shrink: 0; }

/* ── INTERACTIVE BEFORE/AFTER SLIDER ─────────────────────── */
.slider-showcase-wrap {
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  margin-top: 2rem;
}

.comparison-slider-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9.5;
  min-height: 320px;
  border-radius: var(--radius-md);
  overflow: hidden;
  user-select: none;
  cursor: ew-resize;
  background: #0B1120;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.1);
}

.comp-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.comp-layer-before {
  background: #F8FAFC;
  z-index: 1;
}

.comp-layer-after {
  background: #0B0F19;
  z-index: 2;
  clip-path: inset(0 50% 0 0);
  transition: none;
}

.comp-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.comp-mockup-screen {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.comp-mockup-header {
  height: 36px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  flex-shrink: 0;
}

.comp-layer-before .comp-mockup-header {
  background: #EDF2F7;
  color: #64748B;
  border-bottom-color: #CBD5E1;
}

.comp-layer-after .comp-mockup-header {
  background: #111827;
  color: #94A3B8;
  border-bottom-color: #1F2937;
}

.comp-mockup-body {
  flex: 1;
  padding: 1.75rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

/* Mockup Content Styling */
.mockup-classic-title {
  font-size: clamp(1.1rem, 2.4vw, 1.8rem);
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.5rem;
  line-height: 1.25;
}

.mockup-classic-sub {
  font-size: clamp(0.75rem, 1.2vw, 0.9rem);
  color: #64748B;
  max-width: 480px;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.mockup-classic-nav {
  display: flex;
  gap: 12px;
  margin-bottom: 1.5rem;
  font-size: 0.75rem;
  color: #475569;
}

.mockup-modern-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(13, 80, 232, 0.18);
  color: #38BDF8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.mockup-modern-title {
  font-size: clamp(1.25rem, 2.8vw, 2.2rem);
  font-weight: 800;
  color: #F8FAFC;
  line-height: 1.15;
  margin-bottom: 0.6rem;
  letter-spacing: -0.02em;
}

.mockup-modern-title span {
  background: linear-gradient(135deg, #38BDF8, #818CF8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mockup-modern-sub {
  font-size: clamp(0.8rem, 1.3vw, 0.95rem);
  color: #94A3B8;
  max-width: 520px;
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.mockup-modern-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mockup-tag {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #E2E8F0;
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 6px;
}

/* Floating Badges */
.comp-badge {
  position: absolute;
  bottom: 14px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  z-index: 10;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.comp-badge-before {
  right: 14px;
  background: rgba(254, 243, 199, 0.95);
  color: #92400E;
  border: 1px solid #FDE68A;
}

.comp-badge-after {
  left: 14px;
  background: rgba(13, 80, 232, 0.9);
  color: #FFFFFF;
  border: 1px solid #60A5FA;
}

/* Draggable Handle */
.comp-slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: #FFFFFF;
  z-index: 20;
  transform: translateX(-50%);
  cursor: ew-resize;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.4);
}

.comp-slider-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 42px;
  height: 42px;
  background: #FFFFFF;
  border: 2px solid var(--brand-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  color: var(--brand-blue);
  font-size: 0.78rem;
  font-weight: 800;
  user-select: none;
  cursor: ew-resize;
}

/* ── COMMUNICATION PILLARS ───────────────────────────────── */
.comm-pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.comm-pillar-card {
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-subtle);
  transition: var(--transition);
}

.comm-pillar-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
  border-color: var(--brand-blue-mid);
}

.comm-pillar-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  margin-bottom: 0.85rem;
}

.comm-pillar-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.comm-pillar-desc {
  font-size: 0.86rem;
  color: var(--text-body);
  line-height: 1.6;
}

/* ── TIMELINE ────────────────────────────────────────────── */
.timeline {
  position: relative;
  padding-left: 1.5rem;
  margin-top: 0.75rem;
}

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

.timeline-item {
  position: relative;
  padding-bottom: 1.5rem;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -1.9rem;
  top: 6px;
  width: 12px;
  height: 12px;
  background: #FFFFFF;
  border: 2px solid var(--brand-blue);
  border-radius: 50%;
}

.timeline-date {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--brand-blue);
  margin-bottom: 0.2rem;
}

.timeline-content {
  font-size: 0.9rem;
  color: var(--text-body);
  line-height: 1.55;
}

/* ── FEATURES GRID ───────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
  margin-top: 1.75rem;
}

.feature-card {
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  box-shadow: var(--shadow-subtle);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
  border-color: var(--border-strong);
}

.feature-num {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-subtle);
  margin-bottom: 0.5rem;
}

.feature-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
  font-size: 1.15rem;
}

.feature-icon.blue   { background: var(--brand-blue-soft); color: var(--brand-blue); }
.feature-icon.teal   { background: var(--accent-teal-soft); color: var(--accent-teal); }
.feature-icon.amber  { background: var(--accent-amber-soft); color: var(--accent-amber); }
.feature-icon.green  { background: var(--accent-emerald-soft); color: var(--accent-emerald); }

.feature-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.3rem;
}

.feature-desc {
  font-size: 0.82rem;
  color: var(--text-body);
  line-height: 1.55;
}

/* ── LIVE PREVIEW WRAPPER ────────────────────────────────── */
.preview-wrap {
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin-top: 1.75rem;
}

.preview-bar {
  background: #F8FAFC;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-card);
  flex-wrap: wrap;
}

.preview-dots { display: flex; gap: 5px; }
.preview-dot { width: 9px; height: 9px; border-radius: 50%; }
.preview-dot.r { background: #EF4444; }
.preview-dot.y { background: #F59E0B; }
.preview-dot.g { background: #10B981; }

.preview-url-bar {
  flex: 1 1 180px;
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  border-radius: 6px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-body);
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-iframe-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  min-height: 280px;
  overflow: hidden;
  background: #F1F5F9;
}

.preview-iframe-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ── PERSPECTIVE BOX ─────────────────────────────────────── */
.perspective-box {
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  border-left: 4px solid var(--brand-blue);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  box-shadow: var(--shadow-subtle);
  margin-top: 1.25rem;
}

.perspective-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-blue);
  margin-bottom: 0.4rem;
}

.perspective-box p {
  font-size: 0.92rem;
  color: var(--text-body);
  line-height: 1.7;
  margin: 0;
}

/* ── ARTICLE EXPAND SECTION ──────────────────────────────── */
.article-toggle-wrap { text-align: center; margin: 2rem 0; }
.article-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  min-height: 44px;
  background: #FFFFFF;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  box-shadow: var(--shadow-subtle);
  transition: var(--transition);
  max-width: 100%;
  text-align: left;
}

.article-toggle-btn:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
  background: var(--brand-blue-soft);
}

.article-full {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.article-full.expanded { max-height: 9999px; }

.article-content {
  background: #0B1120;
  border: 1px solid #1E293B;
  border-radius: var(--radius-md);
  padding: 1.75rem 1.25rem;
  color: #CBD5E1;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.75;
}

.article-content h2, .article-content h3 {
  font-family: var(--font-sans);
  color: #F8FAFC;
  margin-top: 1.5rem;
  margin-bottom: 0.4rem;
}
.article-content h2 { font-size: 1.02rem; border-bottom: 1px solid #1E293B; padding-bottom: 0.35rem; }
.article-content h3 { font-size: 0.88rem; color: #38BDF8; }

.article-content pre {
  background: #030712;
  border: 1px solid #1F2937;
  border-radius: 6px;
  padding: 0.85rem;
  overflow-x: auto;
  color: #E5E7EB;
  margin: 0.65rem 0;
  white-space: pre;
  word-break: normal;
}

/* ── CTA / CLOSING CHAPTER ───────────────────────────────── */
.cta-section {
  background: linear-gradient(180deg, #1E293B 0%, #0F172A 100%);
  color: #FFFFFF;
  padding: 5rem 1.25rem;
  text-align: center;
  position: relative;
}

.cta-inner {
  max-width: 680px;
  margin: 0 auto;
}

.cta-eyebrow {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #38BDF8;
  margin-bottom: 1rem;
}

.cta-title {
  font-size: clamp(1.85rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.18;
  color: #F8FAFC;
  margin-bottom: 1.15rem;
  word-break: break-word;
}

.cta-sub {
  font-size: 0.98rem;
  color: #94A3B8;
  line-height: 1.75;
  margin-bottom: 2rem;
}

.cta-inner > div:last-child a {
  color: #7DD3FC;
  text-decoration-color: rgba(125, 211, 252, 0.55);
  text-underline-offset: 3px;
}
.cta-inner > div:last-child a:hover,
.cta-inner > div:last-child a:focus-visible {
  color: #BAE6FD;
}

.cta-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.cta-buttons .btn {
  flex: 1 1 200px;
  max-width: 280px;
}

.btn-white {
  background: #FFFFFF;
  color: var(--brand-blue-dark);
  font-weight: 700;
}
.btn-white:hover {
  background: #F1F5F9;
  transform: translateY(-2px);
}

.btn-outline-white {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
}

/* ── FOOTER ──────────────────────────────────────────────── */
.footer {
  background: #090D16;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.75rem 1.25rem;
  text-align: center;
  color: #64748B;
  font-size: 0.76rem;
  line-height: 1.6;
}

/* ── RESPONSIVE BREAKPOINTS (Mobile-First Tuning) ────────── */
@media (max-width: 900px) {
  .grid-2col {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .comparison-static {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

@media (max-width: 640px) {
  .navbar {
    padding: 0 1rem;
    height: 56px;
  }
  .navbar-tag {
    display: none;
  }
  .chapter-indicator {
    font-size: 0.7rem;
    padding: 3px 8px;
  }
  .hero {
    padding: 3.5rem 1rem 2.5rem;
    min-height: auto;
  }
  .section {
    padding: 3.25rem 1rem;
  }
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
  }
  .stat-item {
    padding: 1.15rem 0.75rem;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .preview-iframe-wrap {
    min-height: 220px;
  }
  .slider-showcase-wrap { padding: 0.75rem; }
  .comparison-slider-container { min-height: 220px; aspect-ratio: 4 / 3; }
  .comp-badge { bottom: 8px; padding: 4px 7px; font-size: 0.58rem; letter-spacing: 0.04em; }
  .comp-badge-before { right: 8px; }
  .comp-badge-after { left: 8px; }
  .terminal-wrapper { height: auto; }
  .terminal-body { flex: none; height: 260px; padding: 0.85rem; font-size: 0.7rem; }
  .preview-bar .btn { width: 100%; text-align: center; }
  .terminal-wrapper { height: auto; }
  .terminal-body { flex: none; height: 260px; padding: 0.85rem; font-size: 0.7rem; }
  .cta-section {
    padding: 3.5rem 1rem;
  }
}

@media (max-width: 400px) {
  .chapter-indicator {
    display: none;
  }
}

.comm-pillar-icon svg, .feature-icon svg, .lock svg, .comp-slider-button svg { width: 1.2em; height: 1.2em; display: block; }
.lock svg { width: 0.95rem; height: 0.95rem; vertical-align: middle; }

/* ── ACCESSIBILITY & FALLBACKS ───────────────────────────── */
.skip-link {
  position: fixed;
  z-index: 10001;
  top: 0.75rem;
  left: 0.75rem;
  transform: translateY(-150%);
  background: var(--brand-blue-dark);
  color: #fff;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }

:focus-visible {
  outline: 3px solid var(--brand-cyan);
  outline-offset: 3px;
}

.comp-slider-range {
  position: absolute;
  z-index: 30;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
}

.preview-fallback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  position: absolute;
  z-index: 2;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  margin: 0;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.94);
  color: var(--text-body);
  font-size: 0.78rem;
  box-shadow: var(--shadow-card);
}
.preview-fallback.is-hidden { display: none; }
.preview-fallback-dismiss {
  flex: 0 0 auto;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.6rem;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
}
.preview-fallback-dismiss:hover,
.preview-fallback-dismiss:focus-visible { background: var(--bg-card-subtle); }
.preview-fallback a { color: var(--brand-blue-dark); font-weight: 700; }

@media (max-width: 640px) {
  .preview-fallback { align-items: stretch; flex-direction: column; }
  .preview-fallback-dismiss { align-self: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
/* ── THEME & TECHNICAL STORY ─────────────────────────────── */
.navbar-actions { display: flex; align-items: center; gap: 0.65rem; }
.theme-toggle { min-height: 34px; border: 1px solid var(--border-card); border-radius: 99px; padding: 0.35rem 0.65rem; background: var(--bg-card); color: var(--text-body); font: 700 0.7rem var(--font-sans); cursor: pointer; display: inline-flex; gap: 0.35rem; align-items: center; }
.story-content { background: var(--bg-card); border: 1px solid var(--border-card); border-left: 4px solid var(--brand-blue); border-radius: var(--radius-md); padding: 1.35rem; color: var(--text-body); }
.story-content p + p { margin-top: 0.9rem; }
.story-bridge { color: var(--text-muted); font-size: 0.9rem; }

body.dark-theme { --bg-page:#0B1120; --bg-surface:#101827; --bg-card:#162033; --bg-card-subtle:#111827; --bg-card-hover:#1C2940; --bg-elevated:#26344C; --text-main:#F1F5F9; --text-body:#CBD5E1; --text-muted:#94A3B8; --text-subtle:#64748B; --border-card:#2B3A54; --border-strong:#3C4C67; --brand-blue-soft:#132C66; --accent-teal-soft:#123D3A; --accent-amber-soft:#48320D; --accent-emerald-soft:#103D32; --accent-rose-soft:#461827; }
body.dark-theme .navbar { background: rgba(11, 17, 32, 0.9); }
body.dark-theme .navbar-tag { background: var(--bg-elevated); }
body.dark-theme .section, body.dark-theme .comparison-section { background: var(--bg-page); }
body.dark-theme .stat-item, body.dark-theme .feature-card, body.dark-theme .comm-pillar-card, body.dark-theme .perspective-box, body.dark-theme .preview-wrap, body.dark-theme .comparison-card, body.dark-theme .arch-diagram { background: var(--bg-card); }
body.dark-theme .preview-bar { background: var(--bg-card-subtle); }
body.dark-theme .preview-url-bar { background: var(--bg-card); }
body.dark-theme .preview-fallback { background: rgba(22, 32, 51, 0.96); color: var(--text-body); }
body.dark-theme .divider-full { background: var(--border-card); }

@media (max-width: 640px) { .theme-toggle-label { display: none; } .theme-toggle { min-width: 34px; justify-content: center; } }
/* ── PROPOSAL-FIRST FLOW & COMPLETE DARK THEME ───────────── */
.proposal-overview { background: var(--bg-surface); }
.proposal-grid { display:grid; grid-template-columns:repeat(3, 1fr); gap:1rem; margin:2rem 0 1.25rem; }
.proposal-card { background:var(--bg-card); border:1px solid var(--border-card); border-radius:var(--radius-md); padding:1.35rem; box-shadow:var(--shadow-subtle); }
.proposal-card h3 { color:var(--text-main); font-size:1rem; margin:0.5rem 0 0.35rem; }
.proposal-card p { color:var(--text-body); font-size:0.88rem; line-height:1.6; }
.proposal-num { color:var(--brand-blue); font:800 .72rem var(--font-mono); }
.proposal-next { background:var(--brand-blue-soft); border-left:4px solid var(--brand-blue); border-radius:var(--radius-sm); color:var(--text-body); padding:1rem 1.15rem; }
.technical-history { background:var(--bg-surface); }
.section-story { max-width:780px; margin:1.5rem auto 0; }

body.dark-theme { color-scheme: dark; }
body.dark-theme .hero, body.dark-theme .section, body.dark-theme .comparison-section { background:var(--bg-page) !important; color:var(--text-body); }
body.dark-theme .hero-title, body.dark-theme .chapter-title, body.dark-theme .feature-title, body.dark-theme .comm-pillar-title, body.dark-theme .comparison-card, body.dark-theme .perspective-box, body.dark-theme .proposal-card h3 { color:var(--text-main) !important; }
body.dark-theme .hero-kicker, body.dark-theme .chapter-indicator, body.dark-theme .navbar-tag, body.dark-theme .theme-toggle, body.dark-theme .stat-item, body.dark-theme .feature-card, body.dark-theme .comm-pillar-card, body.dark-theme .perspective-box, body.dark-theme .arch-diagram, body.dark-theme .comparison-card, body.dark-theme .preview-wrap, body.dark-theme .proposal-card, body.dark-theme .story-content { background:var(--bg-card) !important; color:var(--text-body) !important; border-color:var(--border-card) !important; }
body.dark-theme .preview-bar, body.dark-theme .preview-iframe-wrap { background:var(--bg-card-subtle) !important; }
body.dark-theme .preview-url-bar { background:var(--bg-card) !important; color:var(--text-body) !important; }
body.dark-theme .narrative, body.dark-theme .chapter-lead, body.dark-theme .comm-pillar-desc, body.dark-theme .feature-desc, body.dark-theme .timeline-content, body.dark-theme .stat-label { color:var(--text-body) !important; }
body.dark-theme .comparison-static .comp-card-url, body.dark-theme .preview-fallback { color:var(--text-muted) !important; }
@media (max-width: 760px) { .proposal-grid { grid-template-columns:1fr; } }
/* ── DARK THEME: SURFACE AND CONTRAST COMPLETION ─────────── */
body.dark-theme .pull-quote,
body.dark-theme .slider-showcase-wrap,
body.dark-theme .article-toggle-btn {
  background: var(--bg-card) !important;
  color: var(--text-main) !important;
  border-color: var(--border-card) !important;
}

body.dark-theme .pull-quote {
  border-left-color: var(--brand-blue);
}

body.dark-theme .timeline-dot {
  background: var(--bg-card);
}

body.dark-theme .highlight-inline {
  background: var(--accent-amber-soft);
  color: #FCD34D;
  border-color: #8A5A12;
}

body.dark-theme .arch-node.blue  { color: #BFDBFE; border-color: #315AA8; }
body.dark-theme .arch-node.teal  { color: #99F6E4; border-color: #277C75; }
body.dark-theme .arch-node.red   { color: #FECDD3; border-color: #9F3450; }
body.dark-theme .arch-node.green { color: #A7F3D0; border-color: #28775E; }
body.dark-theme .arch-node.amber { color: #FDE68A; border-color: #8A5A12; }

.comp-slider-range:focus-visible {
  opacity: 0.14;
  outline: 3px solid var(--brand-cyan);
  outline-offset: -5px;
}

/* ── NAVEGAÇÃO LATERAL DE TÓPICOS ────────────────────────── */
.topic-indicator {
  position: fixed;
  z-index: 50;
  top: 50%;
  right: 1.25rem;
  transform: translateY(-50%);
  display: grid;
  gap: 0.7rem;
}

.topic-indicator a {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  color: var(--text-muted);
  text-decoration: none;
}

.topic-dot {
  width: 10px;
  height: 10px;
  border: 2px solid var(--text-subtle);
  border-radius: 50%;
  background: var(--bg-card);
  box-shadow: 0 0 0 3px var(--bg-page);
  transition: var(--transition);
}

.topic-label {
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  border-radius: 99px;
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  opacity: 0;
  padding: 0;
  transition: var(--transition);
}

.topic-indicator a:hover .topic-label,
.topic-indicator a:focus-visible .topic-label,
.topic-indicator a[aria-current] .topic-label {
  max-width: 170px;
  opacity: 1;
  padding: 0.55rem 0.7rem;
}

.topic-indicator a:hover .topic-dot,
.topic-indicator a:focus-visible .topic-dot,
.topic-indicator a[aria-current] .topic-dot {
  border-color: var(--brand-blue);
  background: var(--brand-blue);
  transform: scale(1.2);
}

@media (max-width: 1100px) {
  .topic-indicator { display: none; }
}

/* ── MOBILE NAVIGATION & LAYOUT COMPLETION ───────────────── */
.navbar > * { min-width: 0; }
.navbar-actions { flex-shrink: 0; }
.chapter-indicator { overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 1100px) {
  .topic-indicator {
    top: auto;
    right: 50%;
    bottom: 0.85rem;
    transform: translateX(50%);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--border-card);
    border-radius: 99px;
    background: var(--bg-card);
    background: color-mix(in srgb, var(--bg-card) 92%, transparent);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .topic-indicator a { justify-content: center; }
  .topic-indicator .topic-label { display: none; }
  .topic-dot { width: 8px; height: 8px; box-shadow: none; }
}

@media (max-width: 640px) {
  .navbar { gap: 0.45rem; padding: 0 0.75rem; }
  .navbar-logo { flex: 0 1 auto; font-size: 0.8rem; overflow: hidden; }
  .navbar-logo > span:last-child { overflow: hidden; text-overflow: ellipsis; }
  .chapter-indicator { flex: 1 1 auto; max-width: 44vw; text-align: center; }
  .navbar-actions { gap: 0; }
  .topic-indicator { bottom: 0.65rem; gap: 0.5rem; padding: 0.38rem 0.55rem; }
  .topic-dot { width: 7px; height: 7px; }
  .hero-meta-item { max-width: 100%; justify-content: center; text-align: center; }
  .hero-cta-group .btn, .cta-buttons .btn { flex-basis: 100%; max-width: none; }
  .preview-url-bar { min-width: 0; }
  .arch-diagram { padding: 1rem 0.75rem; }
}

@media (max-width: 400px) {
  .navbar-logo > span:last-child { display: none; }
  .chapter-indicator { display: none; }
  .navbar { justify-content: space-between; }
}
body.dark-theme .arch-node.red { background: var(--accent-rose-soft); }
