/* ==========================================================================
   CSVCleanMerge.com — Morandi Emerald Light Design System
   Zero external fonts / Zero CDN bloat / Core Web Vitals 98+
   ========================================================================== */

:root {
  --emerald-900: #064E3B;
  --emerald-800: #065F46;
  --emerald-700: #0F766E;
  --emerald-600: #0D9488;
  --emerald-500: #10B981;
  --emerald-100: #D1FAE5;
  --emerald-50:  #ECFDF5;

  --slate-950: #020617;
  --slate-900: #0F172A;
  --slate-800: #1E293B;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748B;
  --slate-400: #94A3B8;
  --slate-300: #CBD5E1;
  --slate-200: #E2E8F0;
  --slate-100: #F1F5F9;
  --slate-50:  #F8FAFC;
  --white:     #FFFFFF;

  --danger-700: #B91C1C;
  --danger-600: #DC2626;
  --danger-100: #FEE2E2;
  --danger-50:  #FEF2F2;

  --warn-800: #92400E;
  --warn-100: #FEF3C7;
  --warn-50:  #FFFBEB;

  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.12);

  --max-width: 1180px;
  --header-height: 70px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--slate-800);
  background: var(--slate-50);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--emerald-700);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--emerald-800);
}

code, pre, .mono {
  font-family: var(--font-mono);
}

code {
  font-size: 0.88em;
  background: var(--slate-100);
  color: var(--slate-900);
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid var(--slate-200);
}

pre {
  background: var(--slate-900);
  color: #E2E8F0;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.6;
  border: 1px solid var(--slate-800);
}

pre code {
  background: transparent;
  color: inherit;
  border: none;
  padding: 0;
}

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

/* ==========================================================================
   Sticky Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg, rgba(255, 255, 255, 0.92));
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--slate-200);
  height: var(--header-height);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--slate-900);
  letter-spacing: -0.02em;
}

.brand:hover {
  color: var(--slate-900);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--emerald-700), var(--emerald-500));
  color: var(--white);
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: -0.03em;
  box-shadow: var(--shadow-xs);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--slate-600);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--emerald-700);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-sm);
  padding: 7px 11px;
  font-size: 1.05rem;
  color: var(--slate-800);
  cursor: pointer;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 11px 20px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.16s ease;
  text-decoration: none;
  line-height: 1.2;
}

.btn-sm {
  font-size: 0.88rem;
  padding: 9px 16px;
}

.btn-lg {
  font-size: 1rem;
  padding: 14px 24px;
}

.btn-primary {
  background: var(--emerald-700);
  color: var(--white);
  box-shadow: 0 2px 6px rgba(15, 118, 110, 0.25);
}

.btn-primary:hover {
  background: var(--emerald-800);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 118, 110, 0.28);
}

.btn-emerald {
  background: var(--emerald-500);
  color: var(--slate-950);
}

.btn-emerald:hover {
  background: #059669;
  color: var(--white);
}

.btn-secondary {
  background: var(--white);
  color: var(--slate-800);
  border-color: var(--slate-300);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  background: var(--slate-100);
  color: var(--slate-900);
  border-color: var(--slate-400);
}

.btn-outline-emerald {
  background: var(--emerald-50);
  color: var(--emerald-800);
  border-color: #A7F3D0;
}

.btn-outline-emerald:hover {
  background: var(--emerald-100);
  color: var(--emerald-900);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  padding: 68px 0 56px;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(16, 185, 129, 0.13), transparent 70%),
    linear-gradient(180deg, var(--white) 0%, var(--slate-50) 100%);
  border-bottom: 1px solid var(--slate-200);
}

.hero-center {
  text-align: center;
  max-width: 880px;
  margin: 0 auto;
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--emerald-50);
  color: var(--emerald-800);
  border: 1px solid #A7F3D0;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
  margin-bottom: 22px;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.15rem, 4.4vw, 3.25rem);
  font-weight: 850;
  line-height: 1.13;
  letter-spacing: -0.03em;
  color: var(--slate-900);
}

.hero-sub {
  margin: 0 auto 30px;
  max-width: 740px;
  font-size: 1.14rem;
  color: var(--slate-600);
  line-height: 1.65;
}

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

.hero-subtext {
  font-size: 0.88rem;
  color: var(--slate-500);
  font-weight: 500;
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section {
  padding: 76px 0;
}

.section-alt {
  background: var(--white);
  border-top: 1px solid var(--slate-200);
  border-bottom: 1px solid var(--slate-200);
}

.section-header {
  text-align: center;
  max-width: 740px;
  margin: 0 auto 44px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--emerald-700);
  margin-bottom: 10px;
}

.section-header h2 {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--slate-900);
  line-height: 1.2;
}

.section-header p {
  margin: 0;
  color: var(--slate-600);
  font-size: 1.05rem;
}

/* ==========================================================================
   Interactive Live Diff & Health Score Widget
   ========================================================================== */
.diff-widget {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin-top: 42px;
}

.diff-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 22px;
  background: var(--slate-900);
  color: var(--white);
  border-bottom: 1px solid var(--slate-800);
}

.diff-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.diff-tab {
  background: rgba(255, 255, 255, 0.07);
  color: var(--slate-300);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.diff-tab:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
}

.diff-tab.active {
  background: var(--emerald-700);
  border-color: var(--emerald-500);
  color: var(--white);
}

.diff-toggle-wrap {
  display: inline-flex;
  background: var(--slate-800);
  border: 1px solid var(--slate-700);
  border-radius: 8px;
  padding: 3px;
  gap: 4px;
}

.diff-mode-btn {
  border: none;
  background: transparent;
  color: var(--slate-300);
  font-size: 0.84rem;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.diff-mode-btn.active-before {
  background: var(--danger-600);
  color: var(--white);
}

.diff-mode-btn.active-after {
  background: var(--emerald-500);
  color: var(--slate-950);
}

.diff-status-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px;
  background: var(--slate-50);
  border-bottom: 1px solid var(--slate-200);
  font-size: 0.88rem;
}

.health-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 999px;
}

.health-pill.dirty {
  background: var(--danger-100);
  color: var(--danger-700);
}

.health-pill.clean {
  background: var(--emerald-100);
  color: var(--emerald-800);
}

.diff-summary-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.summary-chip {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  color: var(--slate-700);
}

.diff-table-wrap {
  overflow-x: auto;
}

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

.diff-table th {
  background: var(--slate-100);
  color: var(--slate-700);
  font-weight: 700;
  padding: 11px 14px;
  border-bottom: 1px solid var(--slate-200);
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.diff-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--slate-100);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--slate-800);
  vertical-align: middle;
}

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

.cell-dirty {
  background: var(--danger-50);
  color: var(--danger-700);
}

.cell-clean {
  background: var(--emerald-50);
  color: var(--emerald-800);
  font-weight: 600;
}

.row-removed td {
  background: #FEF2F2;
  color: var(--danger-700);
  text-decoration: line-through;
  opacity: 0.85;
}

.row-removed td.no-strike {
  text-decoration: none;
  font-weight: 700;
}

.row-math-error td {
  background: #FEE2E2;
  color: #991B1B;
  font-weight: 700;
}

.badge-inline {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.badge-trash {
  background: var(--danger-100);
  color: var(--danger-700);
}

.badge-ok {
  background: var(--emerald-100);
  color: var(--emerald-800);
}

.badge-warn {
  background: var(--warn-100);
  color: var(--warn-800);
}

/* ==========================================================================
   Desktop Screenshot Showcase Frame
   ========================================================================== */
.screenshot-switcher {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 22px;
}

.shot-btn {
  background: var(--white);
  border: 1px solid var(--slate-300);
  color: var(--slate-700);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
}

.shot-btn:hover {
  border-color: var(--emerald-600);
  color: var(--emerald-700);
}

.shot-btn.active {
  background: var(--emerald-700);
  border-color: var(--emerald-700);
  color: var(--white);
}

.desktop-frame {
  background: var(--slate-900);
  border-radius: var(--radius-lg);
  padding: 10px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--slate-700);
}

.desktop-frame-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 10px 10px;
  color: var(--slate-400);
  font-size: 0.78rem;
  font-family: var(--font-mono);
}

.window-dots {
  display: inline-flex;
  gap: 6px;
}

.window-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--slate-600);
}

.window-dots span:nth-child(1) { background: #EF4444; }
.window-dots span:nth-child(2) { background: #F59E0B; }
.window-dots span:nth-child(3) { background: #10B981; }

.desktop-frame img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--slate-800);
}

/* ==========================================================================
   3-Step Workflow & Feature Cards
   ========================================================================== */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-xs);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

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

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--emerald-50);
  color: var(--emerald-700);
  border: 1px solid #A7F3D0;
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 16px;
}

.card h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--slate-900);
}

.card p {
  margin: 0;
  color: var(--slate-600);
  font-size: 0.95rem;
}

/* ==========================================================================
   Comparison Table
   ========================================================================== */
.table-wrap {
  overflow-x: auto;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

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

.compare-table th,
.compare-table td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--slate-200);
  vertical-align: top;
}

.compare-table thead th {
  background: var(--slate-50);
  color: var(--slate-900);
  font-weight: 800;
}

.compare-table th.col-highlight,
.compare-table td.col-highlight {
  background: var(--emerald-50);
  border-left: 2px solid var(--emerald-500);
  border-right: 2px solid var(--emerald-500);
}

.compare-table thead th.col-highlight {
  background: var(--emerald-700);
  color: var(--white);
}

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

/* ==========================================================================
   Pricing Grid
   ========================================================================== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: stretch;
}

.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  box-shadow: var(--shadow-xs);
}

.price-card.popular {
  border: 2px solid var(--emerald-600);
  box-shadow: 0 14px 36px rgba(15, 118, 110, 0.14);
}

.popular-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--emerald-700);
  color: var(--white);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.price-tier {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--slate-900);
  margin: 0 0 6px;
}

.price-amount {
  font-size: 2.3rem;
  font-weight: 850;
  color: var(--slate-900);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 4px;
}

.price-period {
  font-size: 0.84rem;
  color: var(--slate-500);
  font-weight: 600;
  margin-bottom: 18px;
}

.price-features {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  flex: 1;
}

.price-features li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  font-size: 0.9rem;
  color: var(--slate-700);
}

.price-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--emerald-600);
  font-weight: 800;
}

.pricing-footnote {
  text-align: center;
  margin-top: 28px;
  font-size: 0.93rem;
  color: var(--slate-600);
}

/* ==========================================================================
   FAQ Accordion
   ========================================================================== */
.faq-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  background: transparent;
  border: none;
  text-align: left;
  font-family: inherit;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--slate-900);
  cursor: pointer;
}

.faq-question:hover {
  background: var(--slate-50);
}

.faq-icon {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--emerald-700);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  display: none;
  padding: 0 22px 18px;
  color: var(--slate-600);
  font-size: 0.95rem;
}

.faq-item.open .faq-answer {
  display: block;
}

/* ==========================================================================
   Documentation / User Guide Layout (Sticky Left TOC)
   ========================================================================== */
.docs-layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 40px;
  align-items: start;
  padding: 44px 0 80px;
}

.docs-toc {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-xs);
}

.docs-toc-title {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-500);
  margin: 0 0 12px;
}

.docs-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.docs-toc li {
  margin-bottom: 6px;
}

.docs-toc a {
  display: block;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.89rem;
  font-weight: 600;
  color: var(--slate-600);
}

.docs-toc a:hover,
.docs-toc a.active {
  background: var(--emerald-50);
  color: var(--emerald-800);
}

.docs-content {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 40px 44px;
  box-shadow: var(--shadow-xs);
  min-width: 0;
}

.docs-content h1 {
  margin: 0 0 14px;
  font-size: 2.2rem;
  font-weight: 850;
  letter-spacing: -0.025em;
  color: var(--slate-900);
}

.docs-content h2 {
  margin: 42px 0 14px;
  padding-top: 24px;
  border-top: 1px solid var(--slate-200);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--slate-900);
  scroll-margin-top: 90px;
}

.docs-content h3 {
  margin: 24px 0 10px;
  font-size: 1.14rem;
  font-weight: 700;
  color: var(--slate-900);
}

/* ==========================================================================
   Callout Boxes
   ========================================================================== */
.callout {
  padding: 18px 20px;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--emerald-600);
  background: var(--emerald-50);
  color: var(--slate-800);
  margin: 20px 0;
}

.callout-warn {
  border-left-color: #D97706;
  background: var(--warn-50);
}

.callout-danger {
  border-left-color: var(--danger-600);
  background: var(--danger-50);
}

.callout strong.callout-title {
  display: block;
  margin-bottom: 6px;
  font-size: 0.96rem;
  color: var(--slate-900);
}

/* ==========================================================================
   Use-Case & Legal Article Pages
   ========================================================================== */
.page-hero {
  padding: 54px 0 40px;
  background: var(--white);
  border-bottom: 1px solid var(--slate-200);
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--slate-500);
  margin-bottom: 14px;
}

.breadcrumb a {
  color: var(--slate-600);
  font-weight: 600;
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(1.85rem, 3.6vw, 2.65rem);
  font-weight: 850;
  letter-spacing: -0.025em;
  color: var(--slate-900);
  line-height: 1.18;
}

.page-hero p.lead {
  margin: 0;
  max-width: 760px;
  font-size: 1.1rem;
  color: var(--slate-600);
}

.article-body {
  max-width: 900px;
  margin: 40px auto 72px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 40px 44px;
  box-shadow: var(--shadow-xs);
}

.article-body h2 {
  margin: 34px 0 12px;
  font-size: 1.42rem;
  font-weight: 800;
  color: var(--slate-900);
}

.article-body h2:first-child {
  margin-top: 0;
}

.before-after-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 22px 0;
}

.ba-box {
  border-radius: var(--radius-md);
  padding: 18px;
  border: 1px solid var(--slate-200);
}

.ba-box.before {
  background: var(--danger-50);
  border-color: #FECACA;
}

.ba-box.after {
  background: var(--emerald-50);
  border-color: #A7F3D0;
}

.ba-label {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.ba-box.before .ba-label { color: var(--danger-700); }
.ba-box.after .ba-label { color: var(--emerald-800); }

.cta-banner {
  margin-top: 36px;
  padding: 32px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--slate-900), #0F3D3A);
  color: var(--white);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.cta-banner h3 {
  margin: 0 0 6px;
  font-size: 1.35rem;
  color: var(--white);
}

.cta-banner p {
  margin: 0;
  color: var(--slate-300);
  font-size: 0.95rem;
}

.related-links {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--slate-200);
}

.related-links ul {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 24px;
  padding-left: 18px;
}

/* ==========================================================================
   Modal (Enterprise Custom Lab)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 200;
}

.modal-backdrop.open {
  display: flex;
}

.modal-dialog {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  padding: 28px 30px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--slate-200);
}

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

.modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--slate-900);
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--slate-500);
  cursor: pointer;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--slate-900);
  color: var(--slate-300);
  padding: 60px 0 36px;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.3fr 1fr;
  gap: 36px;
  margin-bottom: 40px;
}

.footer-brand {
  color: var(--white);
  font-weight: 800;
  font-size: 1.15rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.site-footer h4 {
  color: var(--white);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 14px;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin-bottom: 9px;
}

.site-footer a {
  color: var(--slate-300);
}

.site-footer a:hover {
  color: var(--emerald-500);
}

.footer-bottom {
  border-top: 1px solid var(--slate-800);
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.84rem;
  color: var(--slate-400);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .docs-layout {
    grid-template-columns: 1fr;
  }
  .docs-toc {
    position: static;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 24px 22px;
    gap: 14px;
    border-bottom: 1px solid var(--slate-200);
    box-shadow: var(--shadow-md);
  }
  .nav-links.open {
    display: flex;
  }
  .nav-toggle {
    display: inline-flex;
  }
  .grid-3,
  .grid-2,
  .pricing-grid,
  .before-after-grid,
  .related-links ul,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .docs-content,
  .article-body {
    padding: 26px 20px;
  }
}



/* ==========================================================================
   Skins: white (default) + 5 Morandi + dark. Override the shared tokens.
   ========================================================================== */
:root, html[data-theme="white"] { --header-bg: rgba(255,255,255,.92); color-scheme: light; }
html[data-theme="sage"] {
  --header-bg: rgba(238,242,236,.94);
  --white:#F6F8F4; --slate-50:#EEF2EA; --slate-100:#E4EADF; --slate-200:#D3DCCD; --slate-300:#B9C5B2;
  --slate-400:#8FA088; --slate-500:#6B7C66; --slate-600:#4F5F4B; --slate-700:#3D4B3A; --slate-800:#2C382B; --slate-900:#1F2A1E;
  --emerald-700:#5E7F63; --emerald-600:#6F9174; --emerald-500:#82A587; --emerald-100:#DCE8DB; --emerald-50:#EAF1E8; --emerald-800:#4B6A50; --emerald-900:#38523D;
}
html[data-theme="sand"] {
  --header-bg: rgba(244,238,226,.94);
  --white:#FAF6EC; --slate-50:#F3ECDD; --slate-100:#EBE2CF; --slate-200:#DCCFB5; --slate-300:#C6B697;
  --slate-400:#A39478; --slate-500:#7F7059; --slate-600:#625644; --slate-700:#4B4234; --slate-800:#37302A; --slate-900:#2A2520;
  --emerald-700:#8A6F4E; --emerald-600:#9C8160; --emerald-500:#B09672; --emerald-100:#EBDFC9; --emerald-50:#F4EBDA; --emerald-800:#705A3F; --emerald-900:#584630;
}
html[data-theme="mist"] {
  --header-bg: rgba(238,242,247,.94);
  --white:#F6F8FB; --slate-50:#EBF0F6; --slate-100:#E0E7F0; --slate-200:#CFD9E6; --slate-300:#B3C1D3;
  --slate-400:#8798AE; --slate-500:#64758C; --slate-600:#4A5A70; --slate-700:#3A4859; --slate-800:#2A3543; --slate-900:#1D2733;
  --emerald-700:#5A7896; --emerald-600:#6B8AA8; --emerald-500:#7F9DBA; --emerald-100:#DAE5F0; --emerald-50:#E8EFF6; --emerald-800:#486480; --emerald-900:#364E66;
}
html[data-theme="lavender"] {
  --header-bg: rgba(243,240,247,.94);
  --white:#F9F7FB; --slate-50:#F0ECF5; --slate-100:#E7E1EE; --slate-200:#D8CFE3; --slate-300:#BFB2CF;
  --slate-400:#9A8BAE; --slate-500:#76688C; --slate-600:#5A4E6E; --slate-700:#463C58; --slate-800:#322B40; --slate-900:#241F2E;
  --emerald-700:#7B6A9C; --emerald-600:#8C7BAC; --emerald-500:#9E8EBC; --emerald-100:#E5DEF0; --emerald-50:#EFEAF6; --emerald-800:#645582; --emerald-900:#4C4066;
}
html[data-theme="rose"] {
  --header-bg: rgba(248,239,238,.94);
  --white:#FCF7F6; --slate-50:#F6EBE9; --slate-100:#EFDFDC; --slate-200:#E3CDC9; --slate-300:#CFB1AC;
  --slate-400:#AE8D88; --slate-500:#8B6C67; --slate-600:#6C524E; --slate-700:#56413D; --slate-800:#3F302D; --slate-900:#2E2321;
  --emerald-700:#A66A66; --emerald-600:#B87E7A; --emerald-500:#C99390; --emerald-100:#F0DAD7; --emerald-50:#F7E8E6; --emerald-800:#8A5450; --emerald-900:#6C403D;
}
html[data-theme="dark"] {
  color-scheme: dark; --header-bg: rgba(17,24,39,.92);
  --white:#111827; --slate-50:#0B1220; --slate-100:#1A2332; --slate-200:#2A3547; --slate-300:#3B4A60;
  --slate-400:#6B7C93; --slate-500:#8A9AB0; --slate-600:#AAB7C8; --slate-700:#C4CEDB; --slate-800:#DCE3EC; --slate-900:#F1F5F9;
  --emerald-700:#2DD4BF; --emerald-600:#14B8A6; --emerald-500:#10B981; --emerald-100:#0F3B36; --emerald-50:#0C2B28; --emerald-800:#5EEAD4; --emerald-900:#99F6E4;
  --danger-100:#3B1515; --danger-50:#2A1010; --warn-100:#3A2A0B; --warn-50:#2B2008;
  --shadow-sm:0 2px 8px rgba(0,0,0,.4); --shadow-md:0 10px 30px rgba(0,0,0,.45); --shadow-lg:0 20px 50px rgba(0,0,0,.5);
}

/* Header controls (injected by main.js) */
.hdr-select {
  height: 32px; max-width: 104px; padding: 0 6px; font: inherit; font-size: .8rem; font-weight: 600;
  color: var(--slate-800); background: var(--white); border: 1px solid var(--slate-300);
  border-radius: var(--radius-sm); cursor: pointer; text-overflow: ellipsis;
}
.hdr-select:focus-visible { outline: 2px solid var(--emerald-600); outline-offset: 1px; }
.nav-links a, .header-actions .btn { white-space: nowrap; }
body { overflow-x: hidden; }
@media (max-width: 1100px) {
  .nav-links { gap: 16px; }
  .nav-links a { font-size: .86rem; }
  .header-inner { gap: 10px; }
}
@media (max-width: 768px) {
  .header-actions { gap: 6px; }
  .header-actions .btn { display: none; }
  .hdr-select { max-width: 78px; font-size: .74rem; padding: 0 3px; }
}
@media (max-width: 380px) { .hdr-select { max-width: 64px; } }

@media (max-width: 480px) {
  .header-inner { gap: 6px; }
  .brand { min-width: 0; overflow: hidden; white-space: nowrap; font-size: 1rem; }
  .brand-mark { flex: 0 0 auto; }
  .header-actions { flex: 0 0 auto; gap: 4px; }
  .hdr-select { max-width: 60px; }
}
