@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@600;700;800&family=JetBrains+Mono:wght@500;600;700&display=swap');
/* ==========================================================================
   shared.css — Karol Jasztal Portfolio & Case Studies Global Stylesheet
   Single Source of Truth for Design Tokens, Components, & Layout Primitives
   ========================================================================== */

/* --- 1. CSS Variables & Theme Foundations --- */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-subtle: #f1f5f9;
  --surface-muted: #e2e8f0;
  --surface-elevated: #ffffff;
  --border: #e2e8f0;
  --border-subtle: #cbd5e1;
  --ink: #0f172a;
  --ink-muted: #475569;
  --ink-faint: #64748b;
  --accent: #0284c7;
  --accent-subtle: #e0f2fe;
  --accent-hover: #0369a1;
  --success: #059669;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --warning-border: #fde68a;
  --purple: #7c3aed;
  --purple-bg: #f5f3ff;
  --purple-border: #ddd6fe;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --accent-glow: rgba(2, 132, 199, 0.22);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

/* Dark Mode Theme */
html.dark {
  --bg: #090d16;
  --surface: #111827;
  --surface-subtle: #1f2937;
  --surface-muted: #243248;
  --surface-elevated: #1e293b;
  --border: #243248;
  --border-subtle: #334155;
  --ink: #f8fafc;
  --ink-muted: #94a3b8;
  --ink-faint: #64748b;
  --accent: #0284c7;
  --accent-subtle: rgba(56, 189, 248, 0.12);
  --accent-hover: #0369a1;
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.1);
  --success-border: rgba(16, 185, 129, 0.3);
  --danger: #f87171;
  --danger-bg: rgba(239, 68, 68, 0.1);
  --danger-border: rgba(239, 68, 68, 0.3);
  --warning: #fbbf24;
  --warning-bg: rgba(245, 158, 11, 0.1);
  --warning-border: rgba(245, 158, 11, 0.3);
  --purple: #a78bfa;
  --purple-bg: rgba(167, 139, 250, 0.12);
  --purple-border: rgba(167, 139, 250, 0.3);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
}

/* --- 2. Base Reset & Typography --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* --- 3. Top Navigation & Sticky Chapter Bar --- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.sticky-nav-bar {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

html.dark .sticky-nav-bar {
  background-color: rgba(9, 13, 22, 0.94);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.sticky-nav-bar .nav-grid-track {
  border-top: none;
}

/* Backward-compatible alias for any legacy containers */
.sticky-header-container {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

html.dark .sticky-header-container {
  background-color: rgba(9, 13, 22, 0.96);
}

.top-nav {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.nav-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.85rem;
}

.brand-title {
  color: var(--ink);
  font-weight: 700;
  font-family: var(--mono);
  letter-spacing: -0.01em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

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

.nav-back-link {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.15s ease;
}

.nav-back-link:hover {
  color: var(--accent);
}

.nav-divider {
  color: var(--ink-faint);
}

.nav-context {
  color: var(--ink-muted);
  font-weight: 500;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.btn-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  color: var(--ink);
  padding: 0.45rem 0.95rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-nav:hover {
  background: var(--border);
  border-color: var(--border-subtle);
}

.theme-toggle-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s ease;
}

.theme-toggle-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Quick-Jump Chapter Pill Bar (Unified Seamless Canvas & Ghost Pills) */
.chapter-bar {
  background: transparent;
  border-top: 1px solid var(--border);
  padding: 0;
}

.chapter-bar-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0.5rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.chapter-pill {
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-decoration: none;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
}

.chapter-pill:hover {
  color: var(--ink);
  background: var(--surface-subtle);
  border-color: var(--border);
}

.chapter-pill.active {
  color: var(--accent);
  background: var(--surface-subtle);
  border-color: var(--border-highlight);
  font-weight: 700;
}

.chapter-pill.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

/* --- 4. Container & Dossier Layout --- */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
}

header.dossier-header {
  margin-bottom: 3.5rem;
  padding-bottom: 2.25rem;
  border-bottom: 1px solid var(--border);
}

.meta-tagline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 0.85rem;
}

.dossier-title {
  font-size: clamp(1.8rem, 3.6vw, 2.75rem);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 1.1rem;
}

.dossier-subtitle {
  font-size: 1.1rem;
  color: var(--ink-muted);
  max-width: 860px;
  line-height: 1.65;
}

footer {
  border-top: 1px solid var(--border);
  padding-top: 2.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-faint);
  font-family: var(--mono);
}

/* --- 5. Portfolio Hub Index Elements --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.card {
  --card-hover-border: var(--accent);
}

.card:hover {
  border-color: var(--card-hover-border, var(--accent));
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-accent {
  border-top: 4px solid var(--accent);
  --card-hover-border: var(--accent);
}
.card-accent:hover {
  border-color: var(--accent);
}

.card-danger {
  border-top: 4px solid var(--danger);
  --card-hover-border: var(--danger);
}
.card-danger:hover {
  border-color: var(--danger);
}

.card-warning {
  border-top: 4px solid var(--warning);
  --card-hover-border: var(--warning);
}
.card-warning:hover {
  border-color: var(--warning);
}

.card-success {
  border-top: 4px solid var(--success);
  --card-hover-border: var(--success);
}
.card-success:hover {
  border-color: var(--success);
}

.card.wip {
  border-style: dashed;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 1rem;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.35;
}

.card-title a,
.card-title-link {
  color: inherit;
  text-decoration: none;
}

.card-title a:hover,
.card-title a:focus,
.card-title a:active,
.card-title-link:hover,
.card-title-link:focus,
.card-title-link:active {
  color: inherit;
  text-decoration: none;
}

.card-prose {
  font-size: 0.92rem;
  color: var(--ink-muted);
  line-height: 1.7;
  margin-bottom: 1.75rem;
  flex: 1;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.75rem;
}

.tag-pill {
  font-family: var(--mono);
  font-size: 0.72rem;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  color: var(--ink-faint);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.card-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.15s ease;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--accent);
  color: #ffffff;
  border: 1px solid var(--accent);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
}

html.dark .btn-primary {
  color: #090d16;
  font-weight: 700;
}

.btn-secondary {
  background-color: var(--surface-subtle);
  color: var(--ink);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background-color: var(--border);
  border-color: var(--border-subtle);
}

.btn-disabled {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  background-color: var(--surface-subtle);
  color: var(--ink-faint);
  border: 1px dashed var(--border);
  cursor: not-allowed;
  opacity: 0.75;
}

/* --- 6. Case Study Framework --- */
section.doc-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2.75rem 2.25rem;
  margin-bottom: 3.5rem;
  box-shadow: var(--shadow-sm);
  scroll-margin-top: 7.5rem;
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.25rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .section-header {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: baseline;
    gap: 2rem;
  }
}

.section-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ink);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.badge-index {
  font-family: var(--mono);
  font-size: 0.75rem;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  color: var(--accent);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.section-meta {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink-faint);
}

.prose-block {
  font-size: 0.98rem;
  color: var(--ink-muted);
  line-height: 1.75;
  max-width: 80ch;
  margin-bottom: 2rem;
}

.prose-block strong {
  color: var(--ink);
}

.subheading-h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 2rem;
  margin-bottom: 0.85rem;
}

.subheading-prefix {
  color: var(--accent);
  font-family: var(--mono);
}

.subheading-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
  margin-bottom: 0.85rem;
}

.subheading-row .subheading-h3 {
  margin-top: 0;
  margin-bottom: 0;
}

/* --- 7. Metrics & KPI Stat Displays --- */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3.5rem;
}

.top-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.15rem;
  margin-bottom: 3.5rem;
}

@media (min-width: 1024px) {
  .top-metrics-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.4rem 1.2rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
  margin-bottom: 0.5rem;
}

.metric-val {
  font-size: 2.15rem;
  font-family: var(--mono);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.1;
  margin-bottom: 0.4rem;
}

.metric-desc {
  font-size: 0.82rem;
  font-weight: 600;
}

.metric-desc.success { color: var(--success); }
.metric-desc.accent { color: var(--accent); }
.metric-desc.warning { color: var(--warning); }
.metric-desc.danger { color: var(--danger); }

/* Compact Metric Boxes */
.stat-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.stat-mini-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem;
}

.stat-mini-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink-faint);
}

.stat-mini-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0.15rem 0;
}

.stat-mini-sub {
  font-size: 0.72rem;
  color: var(--ink-muted);
}

/* --- 8. Tables & Data Grids --- */
.table-frame {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  margin-top: 1.25rem;
}

.table-scroll-lg {
  max-height: 650px;
  overflow-y: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

th {
  background: var(--surface-subtle);
  color: var(--ink);
  font-weight: 700;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

td {
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--border);
  color: var(--ink-muted);
  vertical-align: top;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: var(--surface-subtle);
}

.mono-cell {
  font-family: var(--mono);
}

.table-summary-row, .table-row-total, tfoot tr {
  background: var(--surface-subtle) !important;
  font-weight: 800;
}

.table-summary-row td, .table-row-total td, tfoot td {
  font-weight: 700;
  color: var(--ink) !important;
  border-top: 2px solid var(--border-highlight, var(--border)) !important;
  border-bottom: none;
  padding: 1.1rem 1.25rem;
}

.cell-success-bg {
  background: var(--success-bg) !important;
  color: var(--ink) !important;
  font-weight: 600;
}

.cell-subtle-dim {
  color: var(--border-subtle) !important;
  text-align: center !important;
}

/* Standardized Table Column Widths */
.w-col-idx { width: 45px; }
.w-col-sm { width: 140px; }
.w-col-md { width: 220px; }
.w-col-lg { width: 250px; }
.w-col-xl { width: 260px; }
.w-pct-8 { width: 8%; }
.w-pct-16 { width: 16%; }
.w-pct-20 { width: 20%; }
.w-pct-24 { width: 24%; }
.w-pct-25 { width: 25%; }
.w-pct-35 { width: 35%; }
.w-pct-37 { width: 37.5%; }
.w-pct-40 { width: 40%; }
.w-pct-50 { width: 50%; }

/* --- 9. Schematics, Sub-Cards & Radar Grids --- */
.schematic-frame {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 2.5rem;
}

.schematic-svg {
  width: 100%;
  height: auto;
  display: block;
}

.row-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin: 1.25rem 0 2rem;
}

.sub-card {
  flex: 1 1 260px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
}

.sub-card.flex-wide {
  flex: 1 1 340px;
}

.sub-card h4 {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 0.65rem;
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  line-height: 1.4;
}

.sub-card h4 svg {
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.sub-card p {
  font-size: 0.85rem;
  color: var(--ink-muted);
  line-height: 1.65;
  flex: 1;
}

.sub-card code {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink);
}

.radar-grid-3col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.15rem;
  margin: 1.25rem 0 2rem;
}

@media (min-width: 900px) {
  .radar-grid-3col {
    grid-template-columns: repeat(3, 1fr);
  }
}

.radar-step-card {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.radar-step-card h5 {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.radar-badge-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff !important;
  font-family: var(--mono);
  font-weight: 800;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.radar-step-card p {
  font-size: 0.84rem;
  color: var(--ink-muted);
  line-height: 1.55;
  flex: 1;
}

.spec-box {
  padding: 0.65rem;
  background: var(--surface-subtle);
  border-radius: 6px;
  font-size: 0.8rem;
}

/* --- 10. Callout Boxes & Diagnostics --- */
.grid-callouts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
}

@media (min-width: 768px) {
  .grid-callouts {
    grid-template-columns: 1fr 1fr;
  }
}

.box-danger {
  border: 1px solid var(--danger-border);
  background: var(--danger-bg);
  border-radius: 10px;
  padding: 1.5rem;
}

.box-danger h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--danger);
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.box-danger ul {
  list-style-type: disc;
  padding-left: 1.35rem;
  font-size: 0.85rem;
  color: var(--ink);
  line-height: 1.65;
}

.box-success {
  border: 1px solid var(--success-border);
  background: var(--success-bg);
  border-radius: 10px;
  padding: 1.5rem;
}

.box-success h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--success);
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.box-success ul {
  list-style-type: disc;
  padding-left: 1.35rem;
  font-size: 0.85rem;
  color: var(--ink);
  line-height: 1.65;
}

.linters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}

.linter-box {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.linter-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.linter-q {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--ink-muted);
  margin-bottom: 1rem;
}

.linter-def {
  background: var(--danger-bg);
  border-left: 3px solid var(--danger);
  padding: 0.65rem 0.85rem;
  font-size: 0.8rem;
  color: var(--ink);
  border-radius: 0 5px 5px 0;
}

.diagnostic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.diag-card {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
}

.diag-card h4 {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 0.65rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.4;
}

.diag-card h4 .dot-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  margin-top: 0.35rem;
  flex-shrink: 0;
}

.diag-card p {
  font-size: 0.85rem;
  color: var(--ink-muted);
  line-height: 1.65;
}

/* --- 11. Stage Execution & Isolation Badges --- */
.stage-card {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}

.stage-card.gate-card {
  background: var(--warning-bg);
  border-color: var(--warning-border);
}

.stage-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.85rem;
  margin-bottom: 1.25rem;
}

.stage-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
}

.stage-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 1.15rem;
}

.stage-col {
  flex: 1 1 240px;
  display: flex;
  flex-direction: column;
}

.stage-col h5 {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink-faint);
  margin-bottom: 0.45rem;
}

.stage-col p {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  color: var(--ink-muted);
  line-height: 1.55;
  font-size: 0.82rem;
  flex: 1;
}

.stage-col.prevented h5 {
  color: var(--success);
}

.stage-col.prevented p {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--ink);
}

.isolation-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--mono);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  margin-right: 0.45rem;
  vertical-align: baseline;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--ink-muted);
  white-space: nowrap;
}

.isolation-badge.warning {
  background: var(--warning-bg);
  color: var(--warning);
  border-color: var(--warning-border);
}

.isolation-badge.fleet {
  background: #faf5ff;
  color: #7e22ce;
  border-color: #e9d5ff;
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
}

/* --- 12. Code & Prompt Cards --- */
.prompt-card {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1.75rem;
}

.prompt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  gap: 1rem;
}

.prompt-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.prompt-instructions {
  font-size: 0.85rem;
  color: var(--ink-faint);
  margin-bottom: 0.9rem;
  font-style: italic;
}

.code-container {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.4rem;
  margin: 1.25rem 0 2rem;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  gap: 1rem;
}

/* Modern Before/After Delta Comparison Grid */
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

@media (min-width: 768px) {
  .comparison-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.comparison-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.comparison-card.legacy {
  border-top: 4px solid var(--danger);
}

.comparison-card.transformed {
  border-top: 4px solid var(--success);
  box-shadow: none !important;
}

.comparison-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
}

.comparison-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.45rem 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.88rem;
}

.comparison-stat-label {
  color: var(--ink-muted);
}

.comparison-stat-val {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--ink);
}

.comparison-stat-val.bad {
  color: var(--danger);
}

.comparison-stat-val.good {
  color: var(--success);
}

.code-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
}

.code-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.15rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--ink);
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-x: auto;
}

.code-box.pre-formatted {
  white-space: pre;
}

.btn-copy {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-copy:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-copy.copied {
  color: var(--success) !important;
  border-color: var(--success) !important;
}

/* --- 13. Symmetrical Side-by-Side Audit Grid --- */
.audit-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 1.25rem 0 2rem;
}

.audit-entry {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}

.audit-entry-header {
  font-size: 0.8rem;
  font-family: var(--mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  margin-bottom: 1rem;
}

.audit-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.audit-col {
  flex: 1 1 340px;
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  padding: 1.25rem;
}

.audit-col.rejected {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
}

.audit-col.approved {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
}

.audit-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}

.audit-badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-family: var(--mono);
}

.audit-badge.bad {
  background: var(--danger);
  color: #fff;
}

.audit-badge.good {
  background: var(--success);
  color: #fff;
}

.audit-quote-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.85rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  margin-bottom: 0.85rem;
  min-height: 56px;
  display: flex;
  align-items: center;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-x: auto;
}

.audit-col.rejected .audit-quote-box {
  color: var(--danger);
}

.audit-col.approved .audit-quote-box {
  color: var(--success);
  font-weight: 700;
}

.audit-notes {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--ink);
}

/* --- 14. Semantic Utility Classes (Replacing Inline Styles) --- */

/* Alignment */
.text-left { text-align: left !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }

/* Colors */
.text-ink { color: var(--ink) !important; }
.text-muted { color: var(--ink-muted) !important; }
.text-faint { color: var(--ink-faint) !important; }
.text-accent { color: var(--accent) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }

/* Font Weights & Typography */
.font-bold { font-weight: 700 !important; }
.font-extrabold { font-weight: 800 !important; }
.font-semibold { font-weight: 600 !important; }
.font-medium { font-weight: 500 !important; }
.font-normal { font-weight: 400 !important; }
.font-mono { font-family: var(--mono) !important; }
.leading-normal { line-height: 1.55 !important; }
.table-title-mono { font-weight: 700; color: var(--ink); font-family: var(--mono); font-size: 0.85rem; }

/* Sizes */
.text-xs { font-size: 0.72rem !important; }
.text-sm { font-size: 0.8rem !important; }
.text-base { font-size: 0.95rem !important; }
.text-lg { font-size: 1.05rem !important; }

/* Spacings */
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 0.85rem !important; }
.mb-4 { margin-bottom: 1.25rem !important; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 0.85rem !important; }
.mt-4 { margin-top: 1.25rem !important; }
.mt-6 { margin-top: 2rem !important; }
.mt-8 { margin-top: 2.5rem !important; }

/* Badges & Micro-components */
.badge-subtle {
  background: var(--surface-subtle);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  display: inline-block;
}

.artifact-meta {
  font-size: 0.75rem;
  color: var(--ink-faint);
  margin-top: 2px;
}

.flex-center {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.flex-center-sm {
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

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

.card-box-framed {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.15rem;
}

.card-box-framed.card-danger {
  border-color: var(--danger-border) !important;
  background: var(--danger-bg) !important;
}

.code-box-scroll-sm {
  font-size: 0.76rem !important;
  max-height: 380px !important;
  overflow-y: auto !important;
}

.grid-1col-gap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

.grid-2col-danger {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--danger);
}

.grid-autofit-320 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.15rem;
}

.grid-autofit-220 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.15rem;
}

.fleet-summary-box {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

.clipboard-hidden-area {
  position: fixed;
  opacity: 0;
  pointer-events: none;
}

/* --- 14b. Interactive Tabs & Decision Trade-Offs (Modern Segmented UI) --- */
.tabs-container {
  margin: 1.75rem 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.tabs-header-wrap {
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
}

.tabs-header {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 0.25rem;
  gap: 0.3rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tabs-header::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9999px;
  padding: 0.45rem 1.15rem;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--ink);
}

.tab-btn.active {
  color: var(--ink);
  background: var(--surface-subtle);
  border-color: var(--border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.tab-content {
  padding: 1.5rem;
}

.tab-panel, .capsule-tab-pane {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* Trade-Off & Decision Cards — Top-Border Accent (Modern Matrix) */
.tradeoff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 1.75rem 0;
}

.tradeoff-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.tradeoff-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.tradeoff-card.rejected {
  border-top: 4px solid var(--danger);
  background: var(--surface);
}

.tradeoff-card.accepted {
  border-top: 4px solid var(--success);
  background: var(--surface);
}

/* Universal Badge & Semantic Status Pill System (Zero Shadow) */
.badge, .tradeoff-badge {
  font-family: var(--font-mono, monospace);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  line-height: 1.3;
  white-space: nowrap;
  box-shadow: none !important;
}

.badge-success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.badge-warning {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.badge-accent {
  background: var(--accent-subtle);
  color: var(--accent);
  border: 1px solid var(--border-highlight);
}

.badge-neutral {
  background: var(--surface-subtle);
  color: var(--ink-muted);
  border: 1px solid var(--border);
}

.badge-purple {
  background: var(--purple-bg);
  color: var(--purple);
  border: 1px solid var(--purple-border);
}

.tradeoff-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.tradeoff-desc {
  font-size: 0.88rem;
  color: var(--ink-muted);
  line-height: 1.5;
  margin: 0;
}

.tradeoff-reason {
  font-size: 0.82rem;
  color: var(--ink);
  background: var(--surface-subtle);
  border-radius: 6px;
  padding: 0.65rem 0.85rem;
  line-height: 1.45;
  margin-top: auto;
}


/* --- 16. Modern Case Study & Bento Grid System (Plus Jakarta Sans) --- */

:root {
  --font-display:  Plus Jakarta Sans, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, sans-serif;
  --accent-glow: rgba(2, 132, 199, 0.22);
}

/* Hero Banner & Status Pill */
.hero-banner {
  position: relative;
  padding: 3rem 0 3.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3.5rem;
}

/* Centered Hero Header */
.hero-centered {
  text-align: center;
}
.hero-centered .status-eyebrow {
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
}
.hero-centered .hero-title {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  max-width: 1140px;
}
.hero-centered .hero-subtitle {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  max-width: 820px;
}

.status-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1.25rem;
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 1.25rem;
  max-width: 1140px;
}

.hero-subtitle {
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--ink-muted);
  max-width: 820px;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-bottom: 2rem;
}

.btn-glow {
  background: var(--accent);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.75rem 1.4rem;
  border-radius: 10px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 4px 12px var(--accent-glow);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
}
.btn-glow:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4), 0 6px 16px var(--accent-glow);
}

.btn-ghost {
  background: var(--surface-subtle);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.75rem 1.4rem;
  border-radius: 10px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  transition: background 0.15s ease, transform 0.15s ease;
  cursor: pointer;
}
.btn-ghost:hover {
  background: var(--border);
  transform: translateY(-2px);
}

.hero-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.hero-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.hero-meta-item strong { color: var(--ink); }

/* Stacked Editorial Section Headers */
.section-wrap {
  margin-bottom: 4.5rem;
  scroll-margin-top: 6.5rem;
}

.section-header-modern {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 2.25rem;
  max-width: 840px;
}

.section-eyebrow {
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: block;
}

/* Section Headline Indicator Dots */
.indicator-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  vertical-align: 0.15em;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

.dot-blue {
  background-color: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow, rgba(2, 132, 199, 0.55));
}

.dot-purple {
  background-color: #a855f7;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.55);
}

.dot-green {
  background-color: var(--success);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.55);
}

.dot-red {
  background-color: var(--danger);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.55);
}

.dot-yellow, .dot-orange {
  background-color: var(--warning);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.55);
}

.shrink-0 {
  flex-shrink: 0;
}

.section-title-modern {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--ink);
  line-height: 1.25;
}

.section-desc-modern {
  font-size: 0.96rem;
  color: var(--ink-muted);
  line-height: 1.65;
}

/* 4-Column Executive Metrics Strip */
.metrics-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.metric-strip-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.metric-strip-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-highlight, var(--border));
}
.metric-strip-label {
  font-family: var(--font-mono, monospace);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.4rem;
}
.metric-strip-val {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.1;
  margin-bottom: 0.4rem;
}
.metric-strip-delta {
  font-size: 0.8rem;
  font-weight: 600;
}
.metric-strip-delta.success { color: var(--success); }

/* Bento Metrics Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.25rem;
  margin: 1.5rem 0;
}
.bento-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.bento-card:hover {
  border-color: var(--border-highlight, var(--border));
  transform: translateY(-2px);
}
.bento-span-7 { grid-column: span 12; }
.bento-span-5 { grid-column: span 12; }
.bento-span-4 { grid-column: span 12; }
@media (min-width: 900px) {
  .bento-span-7 { grid-column: span 7; }
  .bento-span-5 { grid-column: span 5; }
  .bento-span-4 { grid-column: span 4; }
}
.bento-stat-label {
  font-family: var(--font-mono, monospace);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}
.bento-stat-num {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--ink);
  line-height: 1.1;
  margin-bottom: 0.75rem;
}
.bento-stat-delta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
}
.delta-success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success-border);
}
.delta-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}
.delta-warning {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid var(--warning-border);
}
.delta-purple {
  background: var(--purple-bg);
  color: var(--purple);
  border: 1px solid var(--purple-border);
}
.delta-accent {
  background: var(--accent-subtle);
  color: var(--accent);
  border: 1px solid var(--border-highlight, var(--border));
}
.delta-neutral {
  background: var(--surface-subtle);
  color: var(--ink-muted);
  border: 1px solid var(--border);
}

/* ==========================================================================
   Option 03C • Centered Connected HUD Telemetry Bar
   Continuous single-row panel with hairline dividers and centered metrics
   ========================================================================== */
.hud-telemetry-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-top: 2.25rem;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.hud-cell {
  padding: 1.25rem 1.15rem;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.35rem;
  transition: background 0.2s ease;
}

.hud-cell:hover {
  background: var(--surface-subtle);
}

.hud-cell:last-child {
  border-right: none;
}

.hud-label {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.15rem;
  text-align: center;
}

.hud-num {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 1.9vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--ink);
  text-align: center;
  margin-bottom: 0.2rem;
}

.hud-delta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 700;
  margin: 0 auto;
}

.hud-sub {
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  color: var(--ink-faint);
  line-height: 1.35;
  text-align: center;
}

@media (max-width: 1080px) {
  .hud-telemetry-bar {
    grid-template-columns: repeat(3, 1fr);
  }
  .hud-cell {
    border-bottom: 1px solid var(--border);
  }
  .hud-cell:nth-child(3) {
    border-right: none;
  }
}

@media (max-width: 680px) {
  .hud-telemetry-bar {
    grid-template-columns: 1fr;
  }
  .hud-cell {
    border-right: none !important;
    border-bottom: 1px solid var(--border);
  }
  .hud-cell:last-child {
    border-bottom: none;
  }
}

/* Dual-Segment Progress Bar */
.bento-progress-track {
  width: 100%;
  height: 10px;
  border-radius: 9999px;
  background: var(--surface-subtle);
  margin-top: 1.5rem;
  overflow: hidden;
  display: flex;
  border: 1px solid var(--border);
}
.bento-progress-segment {
  height: 100%;
  transition: width 0.3s ease;
}
.bento-progress-segment.green { background: #10b981; }
.bento-progress-segment.red   { background: #ef4444; }

.bento-progress-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 0.75rem;
  font-size: 0.78rem;
  font-family: var(--font-mono, monospace);
  color: var(--ink-muted);
}

/* Symmetrical Architectural Battlecards */
.battlecard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .battlecard-grid { grid-template-columns: 1fr 1fr; }
}
.battlecard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
}
.battlecard.legacy { border-top: 4px solid var(--danger); }
.battlecard.transformed {
  border: 1px solid var(--border-highlight, var(--border));
  border-top: 4px solid var(--success);
  box-shadow: none !important;
}
.battlecard h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.feature-row {
  display: grid;
  grid-template-columns: 20px minmax(180px, 215px) 1fr;
  align-items: start;
  gap: 0.85rem;
  font-size: 0.9rem;
}
@media (max-width: 640px) {
  .feature-row { grid-template-columns: 20px 1fr; }
  .feature-col-desc { grid-column: 2 / -1; }
}
.feature-row svg { flex-shrink: 0; margin-top: 4px; }
.feature-row.bad svg { color: var(--danger); }
.feature-row.good svg { color: var(--success); }
.feature-col-label { font-weight: 700; color: var(--ink); white-space: nowrap; }
.feature-col-desc { color: var(--ink-muted); line-height: 1.5; }

/* 5-Stage Human-in-the-Loop Sequence Rail */
.pipeline-rail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}
.pipeline-node {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.pipeline-node:hover {
  transform: translateY(-2px);
  border-color: var(--border-highlight, var(--border));
}
.node-num {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff !important;
  font-family: var(--font-mono, monospace);
  font-weight: 800;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none !important;
}
.node-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}
.node-desc {
  font-size: 0.84rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

/* Capsule Pill Tabs */
.capsule-tabs-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.capsule-tabs-bar {
  background: var(--surface-subtle);
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.capsule-tab-nav {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 0.25rem;
  gap: 0.25rem;
}
.capsule-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9999px;
  padding: 0.5rem 1.25rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.capsule-tab-btn:hover { color: var(--ink); }
.capsule-tab-btn.active {
  background: var(--surface-subtle);
  border-color: var(--border);
  color: var(--ink);
}
.capsule-tab-pane {
  display: none;
  padding: 2rem;
}
.capsule-tab-pane.active { display: block; }

/* Adaptive Terminal & Prompt Box (Zero Mac Dots) */
.terminal-card {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  margin: 1rem 0;
}
.terminal-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.terminal-filename {
  font-family: var(--font-mono, monospace);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.terminal-body {
  padding: 1.5rem;
  color: var(--ink);
  background: var(--surface-subtle);
  font-family: var(--font-mono, monospace);
  font-size: 0.85rem;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre-wrap;
}

.terminal-scroll-20 {
  max-height: 440px !important;
  overflow-y: auto !important;
  overflow-x: auto !important;
}
.terminal-scroll-20::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
.terminal-scroll-20::-webkit-scrollbar-track {
  background: var(--surface-subtle);
  border-radius: 4px;
}
.terminal-scroll-20::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
.terminal-scroll-20::-webkit-scrollbar-thumb:hover {
  background: var(--ink-muted);
}

/* Modern In-Box Copy Icon Button */
.btn-copy-icon {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--ink-muted);
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  padding: 0;
}
.btn-copy-icon:hover {
  background: var(--surface-subtle);
  border-color: var(--accent);
  color: var(--ink);
}
.btn-copy-icon.copied {
  border-color: var(--success);
  color: var(--success);
}

/* Top-Accent Trade-Off Matrix */
.tradeoff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin: 1.25rem 0;
}
.tradeoff-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 0.15s ease;
}
.tradeoff-card:hover { transform: translateY(-2px); }
.tradeoff-card.rejected { border-top: 4px solid var(--danger); }
.tradeoff-card.accepted {
  border: 1px solid var(--border-highlight, var(--border));
  border-top: 4px solid var(--success);
  box-shadow: none !important;
}
.tradeoff-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
}
.tradeoff-desc {
  font-size: 0.88rem;
  color: var(--ink-muted);
  line-height: 1.55;
}
.tradeoff-reason {
  font-size: 0.84rem;
  padding: 0.75rem;
  border-radius: 8px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  color: var(--ink);
  margin-top: auto;
}

/* 3-Column Linters Grid (3 in Row 1, 2 in Row 2) */
.linters-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin: 1.25rem 0;
}
@media (min-width: 640px) {
  .linters-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 960px) {
  .linters-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Framed Artifact & Prompt Deck Container */
.prompt-deck-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin: 1.75rem 0;
}
.prompt-deck-header {
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--border);
  padding: 1.1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.prompt-deck-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.prompt-deck-kicker {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 0.06em;
}
.prompt-deck-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}
.prompt-deck-body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.prompt-deck-item {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.prompt-deck-item:not(:last-child) {
  padding-bottom: 2rem;
  border-bottom: 1px dashed var(--border);
}
.prompt-item-header {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}
.prompt-item-num {
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent);
  background: var(--accent-subtle);
  border: 1px solid var(--border-highlight);
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  line-height: 1;
  margin-top: 0.15rem;
  flex-shrink: 0;
}
.prompt-item-title {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.25rem;
}
.prompt-item-desc {
  font-size: 0.85rem;
  color: var(--ink-muted);
  line-height: 1.5;
  margin: 0;
}

/* Operational Workflow & SOP Cards (Zero Copy Button, Non-Prompt Pattern) */
.workflow-deck-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 1.5rem 0;
}
.workflow-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.workflow-card.purple {
  border-top-color: var(--purple);
}
.workflow-card.warning {
  border-top-color: var(--warning);
}
.workflow-card.success {
  border-top-color: var(--success);
}
.workflow-card.danger {
  border-top-color: var(--danger);
}
.workflow-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.workflow-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: var(--ink);
}
.workflow-desc {
  font-size: 0.88rem;
  color: var(--ink-muted);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}
.workflow-trigger-box {
  background: var(--surface-subtle);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  padding: 0.65rem 0.9rem;
  margin-bottom: 1.15rem;
  font-size: 0.82rem;
}
.workflow-trigger-box.purple {
  border-left-color: var(--purple);
}
.workflow-step-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.workflow-step-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.85rem;
}

/* Quotes & Diagnostic Callouts */
.callout-box {
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin: 1.25rem 0;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.callout-danger {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger);
}
.callout-success {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success);
}
.callout-info,
.callout-accent {
  background: var(--accent-subtle);
  border: 1px solid var(--border-highlight, rgba(2, 132, 199, 0.35));
  color: var(--accent);
}
.callout-warning {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  color: var(--warning);
}
.callout-purple {
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.25);
  color: var(--purple, #7c3aed);
}
.callout-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}
.callout-text {
  font-size: 0.88rem;
  line-height: 1.6;
}

.quote-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  margin: 1.5rem 0;
}
.quote-text {
  font-size: 1.05rem;
  font-style: italic;
  color: var(--ink);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}
.quote-author {
  font-family: var(--font-mono, monospace);
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 700;
}


/* --- Table Expand / Collapse System --- */
tbody:not(.is-expanded) .table-row-hidden {
  display: none !important;
}

tbody.is-expanded .table-row-hidden {
  display: table-row !important;
}

.table-expand-row {
  background: var(--surface-subtle);
  border-top: 1px solid var(--border);
}

.table-expand-row td {
  text-align: center;
  padding: 0.85rem 1rem !important;
}

.btn-table-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.15rem;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-highlight, var(--border));
  border-radius: 9999px;
  cursor: pointer;
  box-shadow: none !important;
  transition: all 0.15s ease;
}

.btn-table-toggle:hover {
  background: var(--surface-muted);
  border-color: var(--accent);
  color: var(--accent);
}

.btn-table-toggle .chevron-icon {
  transition: transform 0.2s ease;
}

/* Quality Gate QA Battlecards: Clean 1px border all around, zero heavy 4px top colored border */
#quality-gate .battlecard,
#quality-gate .battlecard.legacy,
#quality-gate .battlecard.transformed {
  border-top: 1px solid var(--border) !important;
}

/* The Five Deterministic Heuristic Linters: Top borders restored */
.linters-grid .tradeoff-card {
  border-top: 4px solid var(--accent) !important;
}

/* Two-Color Headline Accent */
.headline-accent {
  color: var(--accent);
}

/* 3-Column Diagnostic Matrix */
.tradeoff-grid.tradeoff-grid-3col,
.tradeoff-grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 1.5rem;
  margin: 1.75rem 0;
}

@media (max-width: 992px) {
  .tradeoff-grid.tradeoff-grid-3col,
  .tradeoff-grid-3col {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 640px) {
  .tradeoff-grid.tradeoff-grid-3col,
  .tradeoff-grid-3col {
    grid-template-columns: 1fr !important;
  }
}

/* --- 15. Print & PDF Layout Styles --- */
@page {
  size: A4 portrait;
  margin: 12mm 10mm;
}

@media print {
  /* Force all hidden progressive disclosure table rows visible in print/PDF ONLY */
  tbody .table-row-hidden,
  tbody:not(.is-expanded) .table-row-hidden,
  .table-row-hidden {
    display: table-row !important;
  }

  .tradeoff-grid.tradeoff-grid-3col,
  .tradeoff-grid-3col {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1rem !important;
  }
  .site-header,
  .sticky-nav-bar,
  .sticky-header-container,
  .btn-copy,
  .btn-nav,
  .nav-actions,
  .tabs-header,
  .capsule-tabs-bar,
  .btn-copy-icon,
    .table-expand-row,
    .btn-table-toggle,
  .chapter-bar,
  .nav-grid-bar,
  .segmented-chapter-dock,
  .hero-actions {
    display: none !important;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 8pt !important;
  }

  section.doc-section {
    border: 1px solid #cccccc !important;
    background: #ffffff !important;
    break-inside: avoid;
    page-break-inside: avoid;
    padding: 1rem !important;
  }

  thead {
    display: table-header-group !important;
  }

  tr {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  th {
    background: #f2f2f2 !important;
    color: #000000 !important;
  }

  td {
    color: #111111 !important;
  }

  /* Print Grace: Unroll all tab panels sequentially */
  .tab-panel, .capsule-tab-pane {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    border-top: 1px dashed #dddddd;
    margin-top: 1rem;
    padding-top: 0.75rem;
  }

  .code-box,
  .code-container,
  .prompt-card,
  .stage-card,
  .sub-card,
  .audit-entry,
  .tradeoff-card,
  .workflow-card,
  .battlecard,
  .credentials-container,
  .terminal-card {
    background: #fafafa !important;
    border-color: #dddddd !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* Connected HUD Bar Print Rules (Unrolls cleanly in 5 equal columns on A4) */
  .hud-telemetry-bar {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    background: #ffffff !important;
    border: 1px solid #cccccc !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    margin-top: 1rem !important;
    margin-bottom: 1.25rem !important;
  }
  .hud-cell {
    padding: 0.65rem 0.5rem !important;
    border-right: 1px solid #cccccc !important;
    border-bottom: none !important;
    background: #ffffff !important;
    text-align: center !important;
    align-items: center !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }
  .hud-cell:last-child {
    border-right: none !important;
  }
  .hud-label {
    font-size: 6.5pt !important;
    color: #444444 !important;
    margin-bottom: 0.1rem !important;
  }
  .hud-num {
    font-size: 11pt !important;
    color: #000000 !important;
    margin-bottom: 0.15rem !important;
  }
  .hud-delta {
    font-size: 6.5pt !important;
    padding: 0.1rem 0.35rem !important;
  }
  .hud-sub {
    font-size: 6.5pt !important;
    color: #555555 !important;
  }

  .terminal-scroll-20 {
    max-height: 380px !important;
    overflow: hidden !important;
  }

  /* Executive 8-Page Structure for HubSpot Case Study */
  #architecture-blueprint,
  #operational-schema,
  #workflow-engine,
  #workflow-03,
  #quality-gates,
  #retrospective {
    break-before: page !important;
    page-break-before: always !important;
  }

  /* Compact Print Tuning to Guarantee Clean 8 Pages with Zero Spillovers */
  .section-header-modern {
    margin-bottom: 0.75rem !important;
  }
  .section-desc-modern {
    margin-bottom: 0.55rem !important;
    line-height: 1.35 !important;
  }

  /* Page 2: Battlecards */
  #pipeline-architecture .battlecard {
    padding: 0.85rem 1rem !important;
    margin-bottom: 0.85rem !important;
  }
  #pipeline-architecture .battlecard-title {
    font-size: 0.98rem !important;
    margin-bottom: 0.45rem !important;
  }
  #pipeline-architecture .battlecard-list li {
    font-size: 7.2pt !important;
    line-height: 1.35 !important;
    margin-bottom: 0.35rem !important;
  }

  /* Page 3: Architecture Blueprint & Time Study Table */
  #architecture-blueprint {
    margin-bottom: 0.65rem !important;
    padding: 0.75rem 1rem !important;
  }
  #architecture-blueprint div[style*="min-height: 82px"] {
    min-height: 48px !important;
    padding: 0.25rem 0.2rem !important;
  }
  #architecture-blueprint div[style*="font-size: 0.8rem"] {
    font-size: 6.8pt !important;
    line-height: 1.15 !important;
    margin: 0.1rem 0 !important;
  }
  #architecture-blueprint div[style*="font-size: 0.65rem"] {
    font-size: 5.8pt !important;
  }
  #architecture-blueprint div[style*="font-size: 0.63rem"] {
    font-size: 5.6pt !important;
  }
  #architecture-blueprint div[style*="gap: 1.5rem"] {
    gap: 0.5rem !important;
  }
  #time-study-table {
    margin-bottom: 0 !important;
    padding: 0.65rem 0.85rem !important;
  }
  #time-study-table .data-table th,
  #time-study-table .data-table td {
    padding: 0.22rem 0.4rem !important;
    font-size: 6.8pt !important;
    line-height: 1.2 !important;
  }

  /* Page 4: Schema Table & Sales Rep Form */
  #operational-schema .data-table th,
  #operational-schema .data-table td {
    padding: 0.25rem 0.4rem !important;
    font-size: 6.9pt !important;
    line-height: 1.25 !important;
  }
  #operational-schema .terminal-card,
  #operational-schema .table-frame {
    margin-bottom: 0.65rem !important;
    padding: 0.75rem 0.9rem !important;
  }

  /* Page 5 & 6: Duality Panel & 6 Workflow Cards */
  .operational-duality-panel {
    margin-bottom: 0.75rem !important;
    gap: 0.65rem !important;
  }
  .operational-duality-panel > div {
    padding: 0.65rem 0.8rem !important;
  }
  .operational-duality-panel ul li {
    font-size: 7.2pt !important;
    line-height: 1.3 !important;
    margin-bottom: 0.25rem !important;
  }
  .workflow-deck-grid {
    gap: 0.55rem !important;
  }
  .workflow-card {
    padding: 0.55rem 0.85rem !important;
    margin-bottom: 0.45rem !important;
    border-radius: 6px !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }
  .workflow-card h3 {
    font-size: 8.5pt !important;
    margin: 0 0 0.2rem 0 !important;
  }
  .workflow-card p {
    margin-bottom: 0.35rem !important;
    font-size: 7.1pt !important;
    line-height: 1.3 !important;
  }
  .workflow-card div[style*="background: var(--surface-subtle)"] {
    padding: 0.35rem 0.55rem !important;
    margin-bottom: 0.35rem !important;
    font-size: 7pt !important;
  }
  .workflow-card div[style*="display: flex; flex-direction: column"] {
    gap: 0.28rem !important;
  }
  .workflow-card div[style*="display: flex; gap: 0.75rem"] {
    gap: 0.4rem !important;
    font-size: 7pt !important;
    line-height: 1.25 !important;
  }
  .workflow-card span[style*="width: 26px"] {
    width: 18px !important;
    height: 18px !important;
    font-size: 6.5pt !important;
    border-radius: 4px !important;
  }

  /* Page 7: Quality Gates & Alternatives */
  .tradeoff-grid {
    margin-bottom: 0.85rem !important;
  }
  .tradeoff-card {
    padding: 0.75rem !important;
  }
  .tradeoff-card p,
  .tradeoff-card ul li {
    font-size: 7.2pt !important;
    line-height: 1.3 !important;
  }

  /* Page 8: Retrospective & Credentials */
  #retrospective .battlecard {
    padding: 0.85rem 1rem !important;
    margin-bottom: 0.85rem !important;
  }
  #retrospective .card-prose {
    font-size: 7.5pt !important;
    line-height: 1.35 !important;
  }
  .credentials-container {
    padding: 0.85rem 1rem !important;
  }
}




/* Navigation Architecture Exploration Demos */
.nav-demo-frame {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin: 1.5rem 0 2.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}
.nav-demo-titlebar {
  background: var(--surface-subtle);
  padding: 0.65rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-demo-label {
  font-family: var(--font-mono, monospace);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.nav-single-row {
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.nav-scroll-track {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0.25rem 0;
}
.nav-scroll-track::-webkit-scrollbar { display: none; }
.nav-scroll-pill {
  font-family: var(--font-mono, monospace);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-decoration: none;
  white-space: nowrap;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}
.nav-scroll-pill:hover {
  background: var(--surface-subtle);
  color: var(--ink);
  border-color: var(--border);
}
.nav-scroll-pill.active {
  background: var(--surface-subtle);
  color: var(--accent);
  border-color: var(--border-highlight);
  font-weight: 700;
}
.segmented-chapter-dock {
  padding: 0.65rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
}
.segmented-track {
  display: flex;
  flex-wrap: wrap;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.35rem;
  gap: 0.35rem;
  width: 100%;
}
.segmented-item {
  font-family: var(--font-mono, monospace);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-decoration: none;
  white-space: nowrap;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  border: none;
  transition: all 0.15s ease;
}
.segmented-item:hover {
  color: var(--ink);
  background: var(--surface);
}
.segmented-item.active {
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}
html.dark .segmented-item.active {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

/* Dual-Tier Stacked Capsule Tracks (Option 3B) */
.segmented-dock-stacked {
  padding: 0.65rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.segmented-track-capsule {
  display: flex;
  flex-wrap: wrap;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 0.25rem 0.35rem;
  gap: 0.25rem;
  align-items: center;
  width: fit-content;
}
.segmented-item-capsule {
  font-family: var(--font-mono, monospace);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-decoration: none;
  white-space: nowrap;
  padding: 0.3rem 0.8rem;
  border-radius: 9999px;
  border: none;
  transition: all 0.15s ease;
}
.segmented-item-capsule:hover {
  color: var(--ink);
  background: var(--surface);
}
.segmented-item-capsule.active {
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
html.dark .segmented-item-capsule.active {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

/* Technical Monospace Tag Grid (Option 2 Multi-Line) */
.nav-grid-bar {
  background: transparent;
  border-top: 1px solid var(--border);
  padding: 0;
}
.nav-grid-track {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0.55rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}
/* Option 2A: Rounded Rectangle Tags */
.nav-tag-chip {
  font-family: var(--font-mono, monospace);
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-decoration: none;
  white-space: nowrap;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  transition: all 0.15s ease;
}
.nav-tag-chip:hover {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-highlight);
}
.nav-tag-chip.active {
  background: var(--accent-subtle);
  color: var(--accent);
  border-color: var(--border-highlight);
  font-weight: 700;
}

/* Option 2B: 100% Round Pills */
.nav-tag-pill {
  font-family: var(--font-mono, monospace);
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-decoration: none;
  white-space: nowrap;
  padding: 0.3rem 0.85rem;
  border-radius: 9999px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  transition: all 0.15s ease;
}
.nav-tag-pill:hover {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-highlight);
}
.nav-tag-pill.active {
  background: var(--accent-subtle);
  color: var(--accent);
  border-color: var(--border-highlight);
  font-weight: 700;
}

/* Option 3B: Contained Segmented Tray with 100% Round Pills */
.segmented-track-pill {
  display: flex;
  flex-wrap: wrap;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.35rem;
  gap: 0.35rem;
  width: 100%;
}
.segmented-item-pill {
  font-family: var(--font-mono, monospace);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-decoration: none;
  white-space: nowrap;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  border: none;
  transition: all 0.15s ease;
}
.segmented-item-pill:hover {
  color: var(--ink);
  background: var(--surface);
}
.segmented-item-pill.active {
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}
html.dark .segmented-item-pill.active {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}
.underline-nav-track {
  padding: 0 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
}
.underline-nav-item {
  font-family: var(--font-mono, monospace);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-decoration: none;
  white-space: nowrap;
  padding: 0.75rem 0;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}
.underline-nav-item:hover { color: var(--ink); }
.underline-nav-item.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 700;
}
