/* =============================================
   CSS BOX MODEL INTERACTIVE SITE
   Design System — Minty Fresh
   ============================================= */

/* Helvetica is a system font — no import needed */

/* ── Variables ─────────────────────────────── */
:root {
  --bg: #F7F9F8;
  --bg-card: #ffffff;
  --bg-elevated: #f0f7f4;
  --text-primary: #1A1A1A;
  --text-secondary: #6B6B6B;
  --text-tertiary: #a0a8a4;
  --accent: #558B71;
  --accent-hover: #4a7d65;
  --accent-soft: rgba(152, 251, 203, 0.35);
  --border: rgba(85, 139, 113, 0.12);
  --border-strong: rgba(85, 139, 113, 0.22);
  --shadow-sm: 0 1px 3px rgba(85,139,113,0.08), 0 1px 2px rgba(85,139,113,0.04);
  --shadow-md: 0 4px 16px rgba(85,139,113,0.10), 0 1px 4px rgba(85,139,113,0.05);
  --shadow-lg: 0 12px 40px rgba(85,139,113,0.12), 0 2px 8px rgba(85,139,113,0.06);
  --shadow-xl: 0 24px 64px rgba(85,139,113,0.14), 0 4px 16px rgba(85,139,113,0.07);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Box model colors — Minty Fresh palette */
  --color-content: #BFFEED;
  --color-content-mid: #98FBCB;
  --color-content-dark: #558B71;
  --color-padding: #98FBCB;
  --color-padding-mid: #7FCFA8;
  --color-padding-dark: #558B71;
  --color-border: #7FCFA8;
  --color-border-mid: #6abf97;
  --color-border-dark: #558B71;
  --color-margin: rgba(85, 139, 113, 0.20);
  --color-margin-mid: rgba(85, 139, 113, 0.35);
  --color-margin-dark: #558B71;

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px;
  --space-12: 48px; --space-16: 64px; --space-20: 80px; --space-24: 96px;

  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
  --spring: 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Reset ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: Helvetica, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 300;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }

/* ── Typography ─ Helvetica weight system ──── */
/* Hero headings       → Bold (700)            */
/* Section titles      → Bold (700)            */
/* Subheadings         → Regular (400)         */
/* Body text           → Light (300)           */
/* Captions / labels   → Light Oblique (300i)  */
/* Emphasis / callouts → Bold Oblique (700i)   */

.text-xs  { font-size: 11px; line-height: 1.4; font-weight: 300; }
.text-sm  { font-size: 13px; line-height: 1.5; font-weight: 300; }
.text-base{ font-size: 17px; line-height: 1.6; font-weight: 300; }
.text-lg  { font-size: 18px; line-height: 1.6; font-weight: 300; }
.text-xl  { font-size: 24px; line-height: 1.4; font-weight: 400; }
.text-2xl { font-size: 28px; line-height: 1.3; font-weight: 400; }
.text-3xl { font-size: 38px; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }
.text-4xl { font-size: 48px; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }
.text-5xl { font-size: 60px; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }

.font-light    { font-weight: 300; }
.font-normal   { font-weight: 400; }
.font-medium   { font-weight: 400; }
.font-semibold { font-weight: 700; }
.font-bold     { font-weight: 700; }

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

.mono { font-family: 'Courier New', Courier, monospace; font-weight: 400; }

/* ── Layout ────────────────────────────────── */
.container { max-width: 1120px; margin: 0 auto; padding: 0 var(--space-6); }
.container-sm { max-width: 760px; margin: 0 auto; padding: 0 var(--space-6); }
.section { padding: var(--space-20) 0; }
.section-sm { padding: var(--space-12) 0; }

/* ── Navigation ────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 52px;
  background: rgba(247, 249, 248, 0.88);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  transition: background var(--transition);
}
.nav-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 var(--space-6);
  width: 100%; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-size: 15px; font-weight: 700; color: var(--text-primary);
  display: flex; align-items: center; gap: var(--space-2);
}
.nav-logo-icon {
  width: 26px; height: 26px; background: var(--accent);
  border-radius: 6px; display: flex; align-items: center; justify-content: center;
}
.nav-logo-icon svg { width: 14px; height: 14px; color: white; }
.nav-links { display: flex; gap: var(--space-8); align-items: center; }
.nav-link {
  font-size: 13px; color: var(--text-secondary); font-weight: 400;
  transition: color var(--transition); padding: 4px 0;
  position: relative;
}
.nav-link:hover { color: var(--text-primary); }
.nav-link.active { color: var(--text-primary); font-weight: 700; }
.nav-link.active::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
  height: 1.5px; background: var(--accent); border-radius: 2px;
}
.nav-cta {
  font-size: 13px; font-weight: 700; color: var(--accent);
  background: var(--accent-soft); border-radius: var(--radius-full);
  padding: 6px 14px; transition: all var(--transition);
}
.nav-cta:hover { background: var(--accent); color: white; }

/* ── Hero ──────────────────────────────────── */
.hero {
  padding: calc(52px + var(--space-20)) 0 var(--space-20);
  text-align: center;
  background: linear-gradient(180deg, #F7F9F8 0%, #eef8f3 50%, #ffffff 100%);
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: 52px; left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 400px;
  background: radial-gradient(ellipse at center, rgba(152, 251, 203, 0.22) 0%, transparent 70%);
  pointer-events: none;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; font-style: oblique; color: var(--accent);
  text-transform: uppercase; letter-spacing: 1.4px;
  background: var(--accent-soft); border-radius: var(--radius-full);
  padding: 5px 14px; margin-bottom: var(--space-5);
}
.hero-title {
  font-size: clamp(40px, 6vw, 64px); font-weight: 700; letter-spacing: -0.02em;
  line-height: 1.2; color: var(--text-primary); margin-bottom: var(--space-5);
}
.hero-title span { color: var(--accent); }
.hero-subtitle {
  font-size: clamp(16px, 2vw, 18px); color: var(--text-secondary);
  font-weight: 300; max-width: 560px; margin: 0 auto var(--space-8);
  line-height: 1.6;
}
.hero-actions { display: flex; gap: var(--space-3); justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 15px; font-weight: 700; border-radius: var(--radius-full);
  padding: 10px 22px; cursor: pointer; border: none;
  transition: all var(--transition); text-decoration: none;
  font-family: Helvetica, 'Helvetica Neue', Arial, sans-serif;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(85,139,113,0.35); }
.btn-secondary { background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border-strong); font-weight: 400; }
.btn-secondary:hover { background: var(--bg); transform: translateY(-1px); box-shadow: var(--shadow-md); }

/* ── Cards ─────────────────────────────────── */
.card {
  background: var(--bg-card); border-radius: var(--radius-lg);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  overflow: hidden; transition: box-shadow var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-body { padding: var(--space-6); }

/* ── Layer Badges ──────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px;
  padding: 4px 10px; border-radius: var(--radius-full);
}
.badge-content  { background: var(--color-content); color: var(--color-content-dark); }
.badge-padding  { background: var(--color-padding); color: var(--color-padding-dark); }
.badge-border   { background: var(--color-border); color: var(--color-border-dark); }
.badge-margin   { background: var(--color-margin); color: var(--color-margin-dark); }

/* ── Section headers ───────────────────────── */
.section-label {
  font-size: 12px; font-weight: 700; font-style: oblique; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--accent); margin-bottom: var(--space-3);
}
.section-title {
  font-size: clamp(28px, 4vw, 40px); font-weight: 700; letter-spacing: -0.02em;
  color: var(--text-primary); margin-bottom: var(--space-4); line-height: 1.2;
}
.section-desc {
  font-size: 17px; font-weight: 300; color: var(--text-secondary); line-height: 1.65;
  max-width: 580px;
}

/* ── Layer explanation cards ───────────────── */
.layers-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-4); margin-top: var(--space-8);
}
.layer-card {
  background: var(--bg-card); border-radius: var(--radius-md);
  border: 1px solid var(--border); padding: var(--space-5);
  transition: all var(--transition);
  position: relative; overflow: hidden;
}
.layer-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
}
.layer-card.content::before  { background: var(--color-content-dark); }
.layer-card.padding::before  { background: var(--color-padding-dark); }
.layer-card.border-layer::before  { background: var(--color-border-dark); }
.layer-card.margin::before   { background: var(--color-margin-dark); }
.layer-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.layer-icon {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; margin-bottom: var(--space-3);
}
.layer-card.content  .layer-icon { background: var(--color-content); }
.layer-card.padding  .layer-icon { background: var(--color-padding); }
.layer-card.border-layer  .layer-icon { background: var(--color-border); }
.layer-card.margin   .layer-icon { background: var(--color-margin); }
.layer-title { font-size: 15px; font-weight: 700; margin-bottom: var(--space-2); }
.layer-desc  { font-size: 14px; font-weight: 300; color: var(--text-secondary); line-height: 1.6; }

/* ── Playground ────────────────────────────── */
.playground {
  background: var(--bg-card); border-radius: var(--radius-xl);
  border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.playground-header {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  background: var(--bg-elevated);
}
.playground-title { font-size: 15px; font-weight: 700; }
.playground-body {
  display: grid; grid-template-columns: 280px 1fr;
  min-height: 480px;
}
.playground-controls {
  border-right: 1px solid var(--border); padding: var(--space-5);
  display: flex; flex-direction: column; gap: var(--space-4);
  overflow-y: auto;
}
.playground-canvas {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: var(--space-8); gap: var(--space-6);
  background: repeating-linear-gradient(45deg, transparent, transparent 8px, rgba(0,0,0,0.015) 8px, rgba(0,0,0,0.015) 16px);
}

/* ── Sliders ───────────────────────────────── */
.control-group { display: flex; flex-direction: column; gap: var(--space-2); }
.control-label {
  display: flex; justify-content: space-between; align-items: center;
}
.control-name { font-size: 12px; font-weight: 300; font-style: oblique; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }
.control-value { font-size: 13px; font-weight: 700; font-family: 'Courier New', Courier, monospace; color: var(--accent); }
.slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; border-radius: 2px;
  background: var(--border-strong); outline: none; cursor: pointer;
  transition: background var(--transition);
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,113,227,0.4);
  transition: transform var(--spring), box-shadow var(--transition);
}
.slider::-webkit-slider-thumb:hover { transform: scale(1.2); box-shadow: 0 2px 8px rgba(0,113,227,0.5); }
.slider::-webkit-slider-thumb:active { transform: scale(1.1); }
.slider::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%; border: none;
  background: var(--accent); cursor: pointer;
}
.slider.content-slider::-webkit-slider-thumb  { background: var(--color-content-dark); }
.slider.padding-slider::-webkit-slider-thumb  { background: var(--color-padding-dark); }
.slider.border-slider::-webkit-slider-thumb   { background: var(--color-border-dark); }
.slider.margin-slider::-webkit-slider-thumb   { background: var(--color-margin-dark); }
.slider.content-slider { accent-color: var(--color-content-dark); }
.slider.padding-slider { accent-color: var(--color-padding-dark); }
.slider.border-slider  { accent-color: var(--color-border-dark); }
.slider.margin-slider  { accent-color: var(--color-margin-dark); }

/* ── Toggle ────────────────────────────────── */
.toggle-group {
  display: flex; align-items: center; gap: var(--space-3);
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-full); padding: 3px;
}
.toggle-option {
  font-size: 11px; font-weight: 700; padding: 5px 12px;
  border-radius: var(--radius-full); cursor: pointer;
  transition: all var(--transition); color: var(--text-secondary);
  user-select: none;
}
.toggle-option.active { background: var(--accent); color: white; box-shadow: 0 1px 4px rgba(85,139,113,0.3); }

/* ── Box Model Visual ──────────────────────── */
.box-model-visual { position: relative; }
.bm-margin {
  background: var(--color-margin);
  border-radius: 4px;
  position: relative; display: flex; align-items: center; justify-content: center;
  transition: all 250ms ease; min-width: 80px; min-height: 60px;
}
.bm-border {
  background: var(--color-border-mid);
  border-radius: 4px;
  position: relative; display: flex; align-items: center; justify-content: center;
  transition: all 250ms ease;
}
.bm-padding {
  background: var(--color-padding);
  position: relative; display: flex; align-items: center; justify-content: center;
  transition: all 250ms ease;
}
.bm-content {
  background: var(--color-content);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: 'Courier New', Courier, monospace; font-size: 11px; color: var(--color-content-dark);
  font-weight: 700; transition: all 250ms ease; min-width: 40px; min-height: 30px;
  border-radius: 2px;
}

/* Labels inside box model */
.bm-label {
  position: absolute; font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px; pointer-events: none;
  transition: opacity var(--transition);
}
.bm-margin .bm-label { color: var(--color-margin-dark); top: 4px; left: 6px; }
.bm-border .bm-label { color: var(--color-border-dark); top: 4px; left: 6px; }
.bm-padding .bm-label { color: var(--color-padding-dark); top: 4px; left: 6px; }

/* ── Size readout ──────────────────────────── */
.size-readout {
  display: flex; gap: var(--space-4); flex-wrap: wrap;
  justify-content: center;
}
.size-chip {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 14px; text-align: center;
  box-shadow: var(--shadow-sm);
}
.size-chip-label { font-size: 10px; font-weight: 300; font-style: oblique; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-tertiary); }
.size-chip-value { font-size: 16px; font-weight: 700; font-family: 'Courier New', Courier, monospace; color: var(--text-primary); }

/* ── Divider ───────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border); margin: 0; }

/* ── Code block ────────────────────────────── */
.code-block {
  background: #0f1a15; border-radius: var(--radius-md);
  padding: var(--space-5); font-family: 'Courier New', Courier, monospace;
  font-size: 13px; line-height: 1.7; overflow-x: auto;
  color: #c8f0dc;
}
.code-block .property { color: #98FBCB; }
.code-block .value { color: #BFFEED; }
.code-block .selector { color: #7FCFA8; }
.code-block .punctuation { color: #558B71; }

/* ── Div Playground ────────────────────────── */
.div-playground-body {
  display: grid; grid-template-columns: 260px 1fr 240px;
  min-height: 500px;
}
.div-canvas-area {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: var(--space-8);
  background: #eef7f2;
  background-image: radial-gradient(circle, #c2e8d4 1px, transparent 1px);
  background-size: 20px 20px;
  gap: var(--space-4);
}
.div-code-panel {
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  background: #0f1a15;
}
.code-panel-header {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid rgba(152,251,203,0.10);
  display: flex; align-items: center; gap: var(--space-2);
}
.code-panel-dot {
  width: 10px; height: 10px; border-radius: 50%;
}
.code-panel-title { font-size: 11px; color: #558B71; font-family: 'Courier New', Courier, monospace; }
.code-panel-body { padding: var(--space-4); flex: 1; }
.live-code { font-family: 'Courier New', Courier, monospace; font-size: 12.5px; line-height: 1.8; }
.lc-selector { color: #7FCFA8; }
.lc-brace    { color: #558B71; }
.lc-prop     { color: #98FBCB; }
.lc-colon    { color: #558B71; }
.lc-val      { color: #BFFEED; }
.lc-semi     { color: #558B71; }
.lc-comment  { color: #3d6b55; font-style: italic; }
.lc-line { display: block; transition: color var(--transition); }

/* Real div visualization */
.div-wrapper {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
}
.div-margin-box {
  background: rgba(85, 139, 113, 0.08); border: 2px dashed var(--color-margin-dark);
  border-radius: 4px; display: flex; align-items: center; justify-content: center;
  position: relative; transition: all 250ms ease;
}
.div-margin-label {
  position: absolute; top: 4px; left: 6px;
  font-size: 8px; font-weight: 700; color: var(--color-margin-dark);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.div-element {
  background: var(--color-content);
  border-color: var(--color-border-dark);
  border-style: solid;
  box-sizing: content-box;
  display: flex; align-items: center; justify-content: center;
  position: relative; transition: all 250ms ease;
  border-radius: 2px;
}
.div-element-inner {
  pointer-events: none; font-size: 12px; font-weight: 700;
  font-family: 'Courier New', Courier, monospace; color: var(--color-content-dark);
  text-align: center; line-height: 1.4;
  position: relative; z-index: 1;
}
.div-padding-overlay {
  position: absolute; inset: 0; pointer-events: none;
  border-radius: 2px; transition: all 250ms ease;
}

/* Footer */
.site-footer {
  padding: var(--space-10) 0;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  text-align: center;
}
.footer-nav { display: flex; gap: var(--space-8); justify-content: center; margin-bottom: var(--space-4); flex-wrap: wrap; }
.footer-nav a { font-size: 13px; color: var(--text-secondary); transition: color var(--transition); }
.footer-nav a:hover { color: var(--text-primary); }
.footer-copy { font-size: 12px; color: var(--text-tertiary); }

/* ── Scroll reveal ─────────────────────────── */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity 500ms ease, transform 500ms ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── Know More styles ──────────────────────── */
.know-hero {
  padding: calc(52px + var(--space-16)) 0 var(--space-12);
  background: linear-gradient(180deg, #F7F9F8 0%, #eef8f3 60%, #fff 100%);
}
.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-tertiary); margin-bottom: var(--space-6);
}
.breadcrumb a { color: var(--text-tertiary); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep { opacity: 0.5; }

.toc {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--space-5);
  margin-bottom: var(--space-10); box-shadow: var(--shadow-sm);
}
.toc-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-tertiary); margin-bottom: var(--space-3); }
.toc-list { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); list-style: none; }
.toc-list a { font-size: 13px; color: var(--text-secondary); }
.toc-list a:hover { color: var(--accent); }

.deep-section { padding: var(--space-12) 0; border-top: 1px solid var(--border); }
.deep-section:first-of-type { border-top: none; }
.deep-title {
  font-size: 28px; font-weight: 700; letter-spacing: -0.02em;
  margin-bottom: var(--space-4); color: var(--text-primary);
}
.deep-body {
  font-size: 16px; font-weight: 300; color: var(--text-secondary); line-height: 1.75;
}
.deep-body p { margin-bottom: var(--space-4); }
.deep-body strong { color: var(--text-primary); font-weight: 700; }

.callout {
  background: var(--accent-soft); border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: var(--space-4) var(--space-5); margin: var(--space-5) 0;
}
.callout-title { font-size: 13px; font-weight: 700; font-style: oblique; color: var(--accent); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.callout p { font-size: 14px; font-weight: 300; color: var(--text-primary); margin: 0; line-height: 1.6; }

.formula-block {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: var(--space-5);
  margin: var(--space-5) 0; font-family: 'Courier New', Courier, monospace;
}
.formula-label { font-size: 10px; font-weight: 300; font-style: oblique; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-tertiary); margin-bottom: var(--space-2); font-family: Helvetica, 'Helvetica Neue', Arial, sans-serif; }
.formula { font-size: 14px; color: var(--text-primary); line-height: 1.6; }
.formula span.highlight { color: var(--accent); font-weight: 700; }

.comparison-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--space-4); margin: var(--space-5) 0;
}
.comparison-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: var(--space-5);
}
.comparison-card-title { font-size: 15px; font-weight: 700; margin-bottom: var(--space-3); }
.comparison-card.cb .comparison-card-title { color: var(--color-border-dark); }
.comparison-card.bb .comparison-card-title { color: var(--color-padding-dark); }

.margin-collapse-demo {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: var(--space-5); margin: var(--space-5) 0;
}

/* ── Responsive ────────────────────────────── */
@media (max-width: 900px) {
  .playground-body { grid-template-columns: 1fr; }
  .playground-controls { border-right: none; border-bottom: 1px solid var(--border); }
  .div-playground-body { grid-template-columns: 1fr; }
  .div-code-panel { border-left: none; border-top: 1px solid var(--border); min-height: 200px; }
  .comparison-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .hero-title { letter-spacing: -0.5px; }
}

@media (max-width: 600px) {
  .container, .container-sm { padding: 0 var(--space-4); }
  .section { padding: var(--space-12) 0; }
  .layers-grid { grid-template-columns: 1fr 1fr; }
  .size-readout { gap: var(--space-2); }
}
