/* ═══════════════════════════════════════════════════════════════════
   WarmPatch Visual Upgrade v1.0 — v4.0 Design System
   Loads AFTER styles.css and benchmark-v3-2.css — extends, does not replace.
   Phase B/C implementation stylesheet.
   Source: Phase A Local Visual Blueprint v1 (FROZEN 2026-05-11)
   ═══════════════════════════════════════════════════════════════════ */

/* =============================================
   1. Design Tokens — v4.0 New Additions
   ============================================= */

:root {
  /* New color tokens (Phase A Section 2.2) */
  --trust-green: #6b8a5e;
  --trust-green-bg: #eef1e8;
  --image-warm: rgba(193, 125, 90, 0.06);

  /* Shadow system (Phase A Section 2.2) */
  --shadow-card: 0 1px 0 var(--sand-line), 0 4px 16px rgba(46, 31, 24, 0.06);
  --shadow-raised: 0 1px 0 var(--sand-line-strong), 0 8px 32px rgba(46, 31, 24, 0.10);
  --shadow-image: 0 2px 0 var(--sand-line), 0 12px 40px rgba(46, 31, 24, 0.12);

  /* Spacing scale (Phase A Section 4.1) */
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 20px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-2xl: 64px;
  --space-3xl: 96px;

  /* Section padding */
  --section-pad: clamp(64px, 8vw, 84px);
  --section-pad-tight: clamp(36px, 5vw, 48px);
  --section-pad-generous: clamp(72px, 10vw, 100px);
}

/* =============================================
   2. Typography Refinements — v4.0
   ============================================= */

/* Phase A Section 3.2 — refined type scale */
/* Override v3.2 heading sizes to match v4.0 spec */

.v4-display {
  font-family: Georgia, "Times New Roman", "Noto Serif", serif;
  font-weight: 400;
  font-size: clamp(40px, 5vw, 72px);
  letter-spacing: -0.015em;
  line-height: 1.08;
  color: var(--stone);
}

h1, .v4-h1 {
  font-family: Georgia, "Times New Roman", "Noto Serif", serif;
  font-weight: 400;
  font-size: clamp(28px, 3.5vw, 48px);
  letter-spacing: -0.01em;
  line-height: 1.12;
  color: var(--stone);
  max-width: 18ch;
}

h2, .v4-h2 {
  font-family: Georgia, "Times New Roman", "Noto Serif", serif;
  font-weight: 400;
  font-size: clamp(22px, 2.5vw, 32px);
  letter-spacing: -0.005em;
  line-height: 1.2;
  color: var(--stone);
}

h3, .v4-h3 {
  font-family: Georgia, "Times New Roman", "Noto Serif", serif;
  font-weight: 400;
  font-size: clamp(17px, 1.8vw, 22px);
  letter-spacing: 0;
  line-height: 1.3;
  color: var(--stone);
}

.v4-eyebrow {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--terracotta-deep);
  margin: 0 0 10px;
}

.v4-lead {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400;
  font-size: clamp(15px, 1.6vw, 19px);
  line-height: 1.55;
  color: var(--clay);
  max-width: 38ch;
}

.v4-body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.65;
  color: var(--clay);
}

.v4-body-sm {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.55;
  color: var(--clay);
}

.v4-caption {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.45;
  color: var(--warm-sand);
}

.v4-stat {
  font-family: Georgia, "Times New Roman", "Noto Serif", serif;
  font-weight: 400;
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1;
  color: var(--terracotta);
}

.v4-quote {
  font-family: Georgia, "Times New Roman", "Noto Serif", serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(20px, 2.5vw, 28px);
  line-height: 1.35;
  color: var(--stone);
}

/* =============================================
   3. Button System — v4.0 (Phase A Section 5.1)
   ============================================= */

.v4-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 28px;
  background: var(--terracotta);
  color: #fff;
  border: none;
  border-radius: 3px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(139, 74, 46, 0.14);
  transition: background 0.2s, box-shadow 0.2s;
}

.v4-btn:hover {
  background: var(--terracotta-deep);
  box-shadow: 0 10px 22px rgba(139, 74, 46, 0.22);
}

.v4-btn-secondary {
  background: transparent;
  color: var(--terracotta-deep);
  border: 1px solid var(--terracotta);
  box-shadow: none;
}

.v4-btn-secondary:hover {
  background: rgba(193, 125, 90, 0.06);
  box-shadow: none;
}

.v4-btn-text {
  background: none;
  color: var(--terracotta-deep);
  border: none;
  padding: 8px 0;
  box-shadow: none;
  font-weight: 600;
  min-height: auto;
}

.v4-btn-text:hover {
  color: var(--terracotta);
  background: none;
  box-shadow: none;
}

/* Dark section buttons */
.v4-btn-dark {
  background: var(--terracotta);
  color: var(--chalk);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.v4-btn-dark:hover {
  background: var(--terracotta-deep);
}

.v4-btn-dark-secondary {
  background: transparent;
  color: var(--chalk);
  border: 1px solid rgba(254, 252, 249, 0.35);
  box-shadow: none;
}

.v4-btn-dark-secondary:hover {
  border-color: var(--chalk);
  background: rgba(254, 252, 249, 0.08);
}

/* =============================================
   4. Card System — v4.0 (Phase A Section 5.2)
   ============================================= */

.v4-card {
  background: var(--chalk);
  border: 1px solid var(--sand-line);
  border-radius: 3px;
  padding: 28px;
  box-shadow: var(--shadow-card);
}

.v4-card-image {
  padding: 0;
  overflow: hidden;
}

.v4-card-image-img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.v4-card-image-body {
  padding: 24px;
}

.v4-card-icon {
  text-align: center;
}

.v4-card-icon svg {
  display: block;
  width: 40px;
  height: 40px;
  margin: 0 auto 16px;
  color: var(--terracotta);
}

.v4-card-stat {
  text-align: center;
}

.v4-card-stat .v4-stat {
  display: block;
  margin-bottom: 4px;
}

.v4-card-stat-label {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--clay);
}

.v4-card-cta {
  background: linear-gradient(150deg, rgba(240, 232, 220, 0.45), rgba(254, 252, 249, 0.9));
  border-color: var(--sand-line-strong);
}

.v4-card-contact {
  border-left: 3px solid var(--terracotta);
}

.v4-card-contact-name {
  font-family: Georgia, "Times New Roman", "Noto Serif", serif;
  font-size: 18px;
  color: var(--stone);
  margin: 0 0 4px;
}

.v4-card-contact-title {
  font-size: 13px;
  color: var(--warm-sand);
  margin: 0 0 16px;
}

.v4-card-contact-detail {
  font-size: 14px;
  color: var(--clay);
  line-height: 1.7;
  margin: 0;
}

.v4-card-contact-detail a {
  color: var(--terracotta-deep);
  text-decoration: none;
}

.v4-card-contact-detail a:hover {
  text-decoration: underline;
}

/* =============================================
   5. Section System — v4.0 (Phase A Section 5.3)
   ============================================= */

.v4-section {
  padding: var(--section-pad) 0;
}

.v4-section-alt {
  padding: var(--section-pad) 0;
  background: var(--chalk);
  border-top: 1px solid var(--sand-line);
  border-bottom: 1px solid var(--sand-line);
}

.v4-section-dark {
  padding: var(--section-pad) 0;
  background: linear-gradient(170deg, var(--cedar), var(--cedar-deep));
  color: var(--chalk);
}

.v4-section-tight {
  padding: var(--section-pad-tight) 0;
}

.v4-section-generous {
  padding: var(--section-pad-generous) 0;
}

.v4-inner {
  width: min(1220px, calc(100% - 36px));
  margin: 0 auto;
}

/* Section head */
.v4-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.5fr);
  gap: 32px;
  align-items: start;
  margin-bottom: 40px;
}

.v4-section-head.centered {
  grid-template-columns: 1fr;
  text-align: center;
}

.v4-section-head.centered > div {
  margin: 0 auto;
}

.v4-section-head.centered > p {
  margin: 14px auto 0;
  max-width: 620px;
}

.v4-section-head h2 {
  margin: 0;
}

.v4-section-head .v4-eyebrow {
  margin-bottom: 10px;
}

.v4-section-head .v4-eyebrow + h2 {
  margin-top: 0;
}

.v4-section-head > p {
  color: var(--clay);
  font-size: 16px;
  line-height: 1.55;
  margin: 0;
  padding-top: 2px;
}

/* Dark section overrides */
.v4-section-dark .v4-section-head > p,
.v4-section-dark .v4-card p,
.v4-section-dark .v4-body,
.v4-section-dark .v4-body-sm {
  color: rgba(254, 252, 249, 0.74);
}

.v4-section-dark .v4-eyebrow {
  color: var(--chalk);
}

.v4-section-dark .v4-h2,
.v4-section-dark h2,
.v4-section-dark .v4-h3,
.v4-section-dark h3 {
  color: var(--chalk);
}

/* =============================================
   6. Grid System
   ============================================= */

.v4-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.v4-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.v4-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* =============================================
   7. Product Truth Strip — v4.0 (Phase A Section 5.5)
   ============================================= */

.v4-truth-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px 32px;
  padding: 28px 0;
}

.v4-truth-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 80px;
}

.v4-truth-badge-icon {
  width: 36px;
  height: 36px;
  color: var(--trust-green);
}

.v4-truth-badge-label {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--warm-sand);
  text-align: center;
  line-height: 1.2;
}

.v4-truth-badge-value {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--stone);
  text-align: center;
  line-height: 1.3;
}

/* =============================================
   8. Hero — v4.0 Compact
   ============================================= */

.v4-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(380px, 1.04fr);
  gap: clamp(32px, 5vw, 56px);
  width: min(1220px, calc(100% - 36px));
  margin: 0 auto;
  padding: 56px 0 48px;
  align-items: center;
}

.v4-hero-text .v4-eyebrow {
  margin-bottom: 14px;
}

.v4-hero-text .v4-h1,
.v4-hero-text h1 {
  margin: 0;
  max-width: 16ch;
}

.v4-hero-text .v4-lead {
  margin: 14px 0 0;
}

.v4-hero-text .v4-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
  align-items: center;
}

.v4-hero-visual {
  position: relative;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: var(--shadow-image);
  background: linear-gradient(160deg, #faf7f2 0%, #f0e8dc 40%, #e8ded2 100%);
  min-height: 320px;
  display: grid;
  place-items: center;
}

.v4-hero-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.v4-hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(212, 200, 184, 0.5);
  border-radius: 3px;
  pointer-events: none;
}

/* =============================================
   9. Image Split Section (Phase A Section 5.3)
   ============================================= */

.v4-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 56px);
  align-items: center;
}

.v4-split-image {
  border-radius: 3px;
  overflow: hidden;
  box-shadow: var(--shadow-image);
  min-height: 400px;
  background: linear-gradient(160deg, #faf7f2, #f0e8dc);
}

.v4-split-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.v4-split-text h2 {
  margin: 0 0 16px;
}

.v4-split-text p {
  color: var(--clay);
  font-size: 16px;
  line-height: 1.65;
  margin: 0 0 20px;
}

/* =============================================
   10. Process Component (Phase A Section 5.4)
   ============================================= */

.v4-process {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.v4-process-step {
  text-align: left;
}

.v4-process-step-icon {
  width: 40px;
  height: 40px;
  color: var(--terracotta);
  margin-bottom: 14px;
}

.v4-process-step-num {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--warm-sand);
  margin: 0 0 8px;
}

.v4-process-step h3 {
  margin: 0 0 8px;
}

.v4-process-step p {
  font-size: 14px;
  color: var(--clay);
  line-height: 1.55;
  margin: 0;
}

/* =============================================
   11. Comparison Component (Phase A Section 5.6)
   ============================================= */

.v4-comparison {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.v4-comparison .v4-card-image-img {
  aspect-ratio: 4 / 3;
}

/* =============================================
   12. Answer Grid — FAQ / GEO blocks
   ============================================= */

.v4-answer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.v4-answer-block {
  padding: 28px 30px;
  border: 1px solid rgba(193, 125, 90, 0.20);
  background: linear-gradient(135deg, rgba(254, 252, 249, 0.96), rgba(240, 232, 220, 0.56));
  border-radius: 3px;
}

.v4-answer-block h3 {
  margin: 0 0 10px;
}

.v4-answer-block p {
  color: var(--clay);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

/* =============================================
   13. Buyer Checklist
   ============================================= */

.v4-checklist {
  padding: 28px 30px;
  border: 1px solid var(--sand-line);
  background: var(--chalk);
  border-radius: 3px;
  box-shadow: var(--shadow-card);
}

.v4-checklist ul {
  margin: 16px 0 0;
  padding-left: 20px;
}

.v4-checklist li {
  color: var(--clay);
  font-size: 15px;
  line-height: 1.6;
}

.v4-checklist li + li {
  margin-top: 8px;
}

/* =============================================
   14. Visual Strip — icon+text badges row
   ============================================= */

.v4-visual-strip {
  padding: 36px 0;
  background: var(--chalk);
  border-top: 1px solid var(--sand-line);
  border-bottom: 1px solid var(--sand-line);
}

.v4-visual-strip-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px 48px;
}

.v4-visual-strip-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.v4-visual-strip-item svg {
  width: 28px;
  height: 28px;
  color: var(--terracotta);
  flex-shrink: 0;
}

.v4-visual-strip-item span {
  font-size: 14px;
  font-weight: 500;
  color: var(--stone);
}

/* =============================================
   15. CTA Card Section
   ============================================= */

.v4-cta-card-section {
  padding: 64px 0;
}

.v4-cta-card {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  padding: 48px 40px;
  border: 1px solid var(--sand-line-strong);
  background: linear-gradient(150deg, rgba(240, 232, 220, 0.45), rgba(254, 252, 249, 0.9));
  border-radius: 3px;
  box-shadow: var(--shadow-raised);
}

.v4-cta-card h2 {
  margin: 0 0 16px;
}

.v4-cta-card p {
  color: var(--clay);
  font-size: 16px;
  line-height: 1.6;
  max-width: 540px;
  margin: 0 auto 24px;
}

.v4-cta-card .v4-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* =============================================
   16. Final CTA — Dark Section
   ============================================= */

.v4-final-cta {
  padding: 72px 0;
  background: linear-gradient(170deg, var(--cedar), var(--cedar-deep));
  color: var(--chalk);
  text-align: center;
}

.v4-final-cta-inner {
  width: min(1220px, calc(100% - 36px));
  margin: 0 auto;
}

.v4-final-cta h2 {
  color: var(--chalk);
  margin: 0 0 16px;
}

.v4-final-cta p {
  color: rgba(254, 252, 249, 0.74);
  max-width: 560px;
  margin: 0 auto 28px;
  font-size: 17px;
  line-height: 1.55;
}

.v4-final-cta .v4-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
}

.v4-final-cta-sep {
  width: min(400px, 80%);
  height: 1px;
  margin: 0 auto 32px;
  background: rgba(254, 252, 249, 0.12);
  border: 0;
}

.v4-final-cta-contact {
  color: rgba(254, 252, 249, 0.68);
  font-size: 14px;
  line-height: 1.7;
}

.v4-final-cta-contact strong {
  color: var(--chalk);
  font-weight: 600;
}

.v4-final-cta-contact a {
  color: var(--chalk);
  text-decoration: underline;
}

/* =============================================
   17. Callout
   ============================================= */

.v4-callout {
  padding: 30px 34px;
  border-left: 4px solid var(--trust-green);
  background: var(--trust-green-bg);
  border-radius: 0 3px 3px 0;
}

.v4-callout p {
  color: var(--clay);
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

/* =============================================
   18. Link Strip
   ============================================= */

.v4-link-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.v4-link-strip a {
  padding: 8px 14px;
  border: 1px solid var(--sand-line-strong);
  border-radius: 999px;
  color: var(--terracotta-deep);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  background: rgba(254, 252, 249, 0.7);
  transition: background 0.2s;
}

.v4-link-strip a:hover {
  background: rgba(193, 125, 90, 0.08);
}

/* =============================================
   19. Placeholder Image — warm gradient backing
   ============================================= */

.v4-placeholder-img {
  background: linear-gradient(160deg, #faf7f2 0%, #f0e8dc 40%, #e8ded2 100%);
  display: grid;
  place-items: center;
  position: relative;
}

.v4-placeholder-img::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(212, 200, 184, 0.45);
  border-radius: 3px;
  pointer-events: none;
}

/* =============================================
   20. Responsive — 980px
   ============================================= */

@media (max-width: 980px) {
  .v4-hero {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 48px 0 40px;
  }

  .v4-hero-visual {
    min-height: 280px;
    max-width: 560px;
    margin: 0 auto;
  }

  .v4-hero-visual img {
    aspect-ratio: 4 / 3;
  }

  .v4-section-head {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 32px;
  }

  .v4-section-head > p {
    font-size: 15px;
  }

  .v4-split {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .v4-split-image {
    min-height: 280px;
    order: -1;
  }

  .v4-grid,
  .v4-grid-2,
  .v4-grid-4 {
    grid-template-columns: 1fr;
  }

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

  .v4-process {
    grid-template-columns: repeat(2, 1fr);
  }

  .v4-answer-grid {
    grid-template-columns: 1fr;
  }
}

/* =============================================
   21. Responsive — 720px (mobile)
   ============================================= */

@media (max-width: 720px) {
  .v4-inner {
    width: min(1220px, calc(100% - 32px));
  }

  .v4-hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 40px 0 32px;
  }

  .v4-hero-visual {
    min-height: 240px;
    max-width: 100%;
  }

  .v4-hero-visual img {
    aspect-ratio: 3 / 2;
  }

  .v4-hero-text .v4-h1,
  .v4-hero-text h1 {
    font-size: clamp(22px, 5.5vw, 28px);
  }

  .v4-hero-text .v4-lead {
    font-size: 15px;
  }

  .v4-hero-text .v4-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .v4-hero-text .v4-actions .v4-btn,
  .v4-hero-text .v4-actions .v4-btn-secondary {
    width: 100%;
  }

  .v4-hero-text .v4-actions .v4-btn-text {
    width: auto;
    align-self: flex-start;
  }

  /* Section rhythm */
  .v4-section {
    padding: 48px 0;
  }

  .v4-section-alt {
    padding: 48px 0;
  }

  .v4-section-dark {
    padding: 48px 0;
  }

  .v4-section-tight {
    padding: 36px 0;
  }

  .v4-section-generous {
    padding: 64px 0;
  }

  /* Section head */
  .v4-section-head {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 28px;
  }

  .v4-section-head h2 {
    font-size: clamp(19px, 3.5vw, 24px);
  }

  .v4-section-head > p {
    font-size: 14px;
  }

  /* Grids — all single column */
  .v4-grid,
  .v4-grid-2,
  .v4-grid-4 {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .v4-comparison {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .v4-process {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .v4-answer-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  /* Split */
  .v4-split {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .v4-split-image {
    min-height: 240px;
  }

  /* Truth strip */
  .v4-truth-strip {
    gap: 16px 24px;
    padding: 20px 0;
  }

  .v4-truth-badge {
    min-width: 60px;
  }

  /* Cards */
  .v4-card {
    padding: 20px 18px;
  }

  .v4-card-image-body {
    padding: 18px;
  }

  /* CTA card */
  .v4-cta-card-section {
    padding: 48px 0;
  }

  .v4-cta-card {
    padding: 32px 24px;
  }

  .v4-cta-card h2 {
    font-size: 22px;
  }

  .v4-cta-card p {
    font-size: 15px;
  }

  .v4-cta-card .v4-actions {
    flex-direction: column;
    align-items: stretch;
  }

  /* Final CTA */
  .v4-final-cta {
    padding: 48px 0;
  }

  .v4-final-cta h2 {
    font-size: 24px;
  }

  .v4-final-cta p {
    font-size: 15px;
  }

  .v4-final-cta .v4-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .v4-final-cta-contact {
    font-size: 13px;
  }

  /* Visual strip */
  .v4-visual-strip-row {
    gap: 18px 28px;
  }

  /* Buttons — full width on mobile */
  .v4-actions .v4-btn,
  .v4-actions .v4-btn-secondary {
    width: 100%;
  }

  .v4-actions .v4-btn-text {
    width: auto;
  }
}

/* =============================================
   22. Responsive — 480px (tight)
   ============================================= */

@media (max-width: 480px) {
  .v4-inner {
    width: calc(100% - 32px);
  }

  .v4-hero {
    padding: 32px 0 28px;
    gap: 20px;
  }

  .v4-hero-visual {
    min-height: 220px;
  }

  .v4-truth-strip {
    gap: 16px 12px;
    justify-content: flex-start;
  }

  .v4-truth-badge {
    min-width: 56px;
    flex: 0 0 auto;
  }

  .v4-truth-badge-value {
    font-size: 11px;
    white-space: nowrap;
  }

  .v4-truth-badge-label {
    font-size: 10px;
  }

  /* Cards */
  .v4-card {
    padding: 18px 16px;
  }

  .v4-card-image-body {
    padding: 16px;
  }

  /* CTA card */
  .v4-cta-card {
    padding: 28px 20px;
  }

  /* Checklist */
  .v4-checklist {
    padding: 20px 18px;
  }

  .v4-checklist li {
    font-size: 14px;
  }

  /* Answer blocks */
  .v4-answer-block {
    padding: 20px 18px;
  }
}

/* =============================================
   23. Responsive — 390px (narrowest)
   ============================================= */

@media (max-width: 390px) {
  .v4-inner {
    width: calc(100% - 20px);
  }

  .v4-hero-text .v4-h1,
  .v4-hero-text h1 {
    font-size: clamp(20px, 5.5vw, 24px);
  }

  .v4-hero-visual {
    min-height: 200px;
  }

  .v4-section-head h2 {
    font-size: 19px;
  }

  .v4-cta-card {
    padding: 24px 18px;
  }

  .v4-cta-card h2 {
    font-size: 20px;
  }
}

/* =============================================
   23.5. Inner Page Mobile Unification (Phase D.1 v2)
   Comprehensive overflow safety net targeting all
   v3.2 classes used by inner pages.
   Strategy: global resets → container constraints →
   text wrapping → layout stacking → visual polish.
   ============================================= */

/* ── 540px: broad mobile safety net ── */
@media (max-width: 540px) {
  /* ── 0. Global box model & containment ── */
  *, *::before, *::after { box-sizing: border-box; }

  html, body, body.sub-page, main {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  /* Deep min-width reset — prevent grid/flex children from forcing overflow */
  main * {
    min-width: 0 !important;
  }

  /* ── 1. All major containers — explicit width constraint ── */
  .section,
  .section.alt,
  .section.dark,
  .section.light,
  .inner,
  .hero,
  .hero.compact,
  .v4-hero-visual,
  .split,
  .callout,
  .section-head,
  .answer-grid,
  .grid,
  .grid.two,
  .grid.four,
  .card,
  .answer-block,
  .buyer-checklist,
  .comparison,
  .process,
  .form-layout,
  .form-grid {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* ── 2. All text elements — force wrapping ── */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, label, strong, em, small,
  .lead, .eyebrow, .stage-note, .note,
  .pkg-label, .pkg-spec, .pkg-note {
    max-width: 100% !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    hyphens: auto;
  }

  /* ── 3. All images and media — never exceed container ── */
  img, svg, picture, video, canvas,
  .v4-hero-visual img, .v4-section-visual img,
  .v4-packaging-img img, .v4-sample-visual img {
    max-width: 100% !important;
    height: auto;
  }

  /* ── 4. Hero — single column, reduced ── */
  .hero, .hero.compact {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 32px 16px 20px !important;
    gap: 20px;
    margin: 0;
  }

  .hero.compact h1, .hero h1 {
    font-size: 22px !important;
    line-height: 1.15;
    max-width: 100% !important;
  }

  .hero.compact .lead, .hero .lead {
    font-size: 14px !important;
    line-height: 1.5;
    max-width: 100% !important;
  }

  .hero.compact .actions, .hero .actions {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px;
    margin-top: 18px;
    width: 100% !important;
  }

  .hero.compact .actions .btn, .hero .actions .btn {
    width: 100% !important;
    text-align: center;
    justify-content: center;
    font-size: 14px;
  }

  /* Hero visual */
  .v4-hero-visual {
    min-height: 180px !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  /* ── 5. Section spacing ── */
  .section {
    padding: 38px 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0;
  }

  .section.alt { padding: 38px 16px !important; }
  .section.dark { padding: 38px 16px !important; }
  .section.light { padding: 38px 16px !important; }

  /* ── 6. Section heads — stack vertically ── */
  .section-head {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px;
    margin-bottom: 24px;
    width: 100% !important;
    max-width: 100% !important;
  }

  .section-head h2 {
    font-size: 19px !important;
    line-height: 1.2;
    max-width: 100% !important;
  }

  .section-head p {
    font-size: 13px !important;
    line-height: 1.5;
    max-width: 100% !important;
  }

  /* ── 7. Actions / CTAs — always stack ── */
  .actions {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px;
    margin-top: 18px;
    width: 100% !important;
    flex-wrap: wrap;
  }

  .actions .btn {
    width: 100% !important;
    text-align: center;
    justify-content: center;
  }

  .actions .btn.text {
    width: auto !important;
    align-self: flex-start;
  }

  /* ── 8. Grids — single column ── */
  .grid,
  .grid.two,
  .grid.four,
  .answer-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px;
    width: 100% !important;
    max-width: 100% !important;
  }

  .comparison {
    grid-template-columns: 1fr !important;
    gap: 14px;
    display: grid !important;
  }

  .process {
    grid-template-columns: 1fr !important;
    display: grid !important;
  }

  /* ── 9. Cards & blocks — full width, tighter padding ── */
  .card {
    padding: 18px 16px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .card h3 { font-size: 16px !important; }

  .card p, .card li {
    font-size: 13px !important;
    line-height: 1.5;
  }

  .answer-block {
    padding: 18px 16px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .answer-block h3 { font-size: 16px !important; }
  .answer-block p { font-size: 13px !important; }

  /* ── 10. Process steps ── */
  .process-step {
    padding: 16px 14px !important;
  }

  .process-step:not(:last-child)::after { display: none; }
  .process-step.spacer { display: none; }

  /* ── 11. Link strips — wrap ── */
  .link-strip {
    flex-wrap: wrap !important;
    gap: 6px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .link-strip a {
    font-size: 12px;
    padding: 6px 10px;
    white-space: normal;
  }

  /* ── 12. Forms — single column ── */
  .form-grid {
    grid-template-columns: 1fr !important;
    display: grid !important;
  }

  .form-layout {
    grid-template-columns: 1fr !important;
    gap: 20px;
    display: grid !important;
  }

  input, select, textarea {
    max-width: 100% !important;
    box-sizing: border-box;
  }

  form.card, .card.preview-only {
    width: 100% !important;
    max-width: 100% !important;
    padding: 20px 16px !important;
  }

  /* ── 13. Callouts & checklists ── */
  .callout {
    padding: 18px 16px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .buyer-checklist {
    padding: 18px 16px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .buyer-checklist ul { padding-left: 18px; }

  .buyer-checklist li {
    font-size: 13px;
    line-height: 1.5;
  }

  /* ── 14. Packaging panels ── */
  .pkg-panel {
    padding: 16px 18px !important;
    margin-bottom: 14px;
  }

  .pkg-label { font-size: 14px !important; }
  .pkg-spec { font-size: 11px !important; }
  .pkg-note { font-size: 11px !important; }

  /* ── 15. Split layouts — stack ── */
  .split {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px;
    width: 100% !important;
    max-width: 100% !important;
  }

  .split .callout {
    padding: 18px 16px !important;
    margin-top: 0;
    width: 100% !important;
  }

  .split .lead { font-size: 14px !important; }

  .split .actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .split .actions .btn {
    width: 100% !important;
    text-align: center;
  }

  /* ── 16. Footer ── */
  .footer {
    padding: 28px 16px !important;
    font-size: 12px;
    width: 100% !important;
  }

  /* ── 17. Misc — short text elements ── */
  .eyebrow { font-size: 11px; max-width: 100% !important; }
  hr { max-width: 100% !important; }
}

/* ── 390px: tightest viewport refinements ── */
@media (max-width: 390px) {
  .hero, .hero.compact {
    padding: 28px 12px 20px !important;
  }

  .hero.compact h1, .hero h1 {
    font-size: 20px !important;
  }

  .hero.compact .lead, .hero .lead {
    font-size: 13px !important;
  }

  .v4-hero-visual {
    min-height: 160px !important;
  }

  .section {
    padding: 32px 12px !important;
  }

  .section.alt { padding: 32px 12px !important; }
  .section.dark { padding: 32px 12px !important; }

  .card { padding: 16px 14px !important; }
  .card h3 { font-size: 15px !important; }

  .section-head h2 { font-size: 18px !important; }

  .pkg-panel {
    padding: 14px 16px !important;
    margin-bottom: 12px;
  }

  .actions .btn { font-size: 14px; }
}

/* =============================================
   23.6. Phase D.2 Mobile Hard Containment
   Scope: inner pages only. Fixes mobile visual clipping
   caused by mixed v3.2/v4 grids, fixed min columns,
   nowrap buttons/chips, and media wrappers.
   ============================================= */

@media (max-width: 540px) {
  body.sub-page,
  body.sub-page * ,
  body.sub-page *::before,
  body.sub-page *::after {
    box-sizing: border-box;
  }

  body.sub-page,
  body.sub-page main {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
  }

  body.sub-page main,
  body.sub-page main * {
    min-width: 0 !important;
  }

  body.sub-page .inner,
  body.sub-page .v4-inner,
  body.sub-page .hero,
  body.sub-page .v4-hero,
  body.sub-page .section-head,
  body.sub-page .v4-section-head,
  body.sub-page .split,
  body.sub-page .v4-split,
  body.sub-page .section,
  body.sub-page .v4-section,
  body.sub-page .v4-section-alt,
  body.sub-page .v4-section-dark,
  body.sub-page .v4-section-tight,
  body.sub-page .v4-section-generous,
  body.sub-page .callout,
  body.sub-page .v4-callout,
  body.sub-page .card,
  body.sub-page .v4-card,
  body.sub-page .answer-block,
  body.sub-page .v4-answer-block,
  body.sub-page .buyer-checklist,
  body.sub-page .v4-checklist,
  body.sub-page .form-layout,
  body.sub-page .form-grid,
  body.sub-page .comparison,
  body.sub-page .v4-comparison,
  body.sub-page .process,
  body.sub-page .v4-process,
  body.sub-page .v4-cta-card,
  body.sub-page .v4-final-cta,
  body.sub-page .v4-final-cta-inner,
  body.sub-page .v4-visual-strip,
  body.sub-page .v4-link-strip,
  body.sub-page .link-strip {
    max-width: 100% !important;
  }

  body.sub-page .inner,
  body.sub-page .v4-inner,
  body.sub-page .hero,
  body.sub-page .v4-hero {
    width: min(100%, calc(100vw - 24px)) !important;
  }

  body.sub-page .section,
  body.sub-page .section.alt,
  body.sub-page .section.dark,
  body.sub-page .section.light,
  body.sub-page .v4-section,
  body.sub-page .v4-section-alt,
  body.sub-page .v4-section-dark,
  body.sub-page .v4-section-tight,
  body.sub-page .v4-section-generous {
    overflow: clip;
  }

  body.sub-page .hero,
  body.sub-page .hero.compact,
  body.sub-page .v4-hero,
  body.sub-page .split,
  body.sub-page .v4-split,
  body.sub-page .section-head,
  body.sub-page .v4-section-head,
  body.sub-page .form-layout,
  body.sub-page .comparison,
  body.sub-page .v4-comparison {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.sub-page .grid,
  body.sub-page .grid.two,
  body.sub-page .grid.four,
  body.sub-page .answer-grid,
  body.sub-page .v4-grid,
  body.sub-page .v4-grid-2,
  body.sub-page .v4-grid-4,
  body.sub-page .v4-answer-grid,
  body.sub-page .process,
  body.sub-page .v4-process,
  body.sub-page .form-grid,
  body.sub-page .spec-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  body.sub-page .actions,
  body.sub-page .v4-actions,
  body.sub-page .link-strip,
  body.sub-page .v4-link-strip,
  body.sub-page .v4-truth-strip,
  body.sub-page .v4-visual-strip-row,
  body.sub-page .mobile-cta-row,
  body.sub-page .cta-row,
  body.sub-page .pill-row,
  body.sub-page .chip-row,
  body.sub-page .badges,
  body.sub-page .nav-links {
    display: flex !important;
    flex-wrap: wrap !important;
    max-width: 100% !important;
  }

  body.sub-page .actions,
  body.sub-page .v4-actions,
  body.sub-page .cta-row,
  body.sub-page .mobile-cta-row {
    align-items: stretch !important;
  }

  body.sub-page .actions .btn,
  body.sub-page .btn,
  body.sub-page .v4-btn,
  body.sub-page button,
  body.sub-page input[type="submit"] {
    max-width: 100% !important;
    min-width: 0 !important;
    white-space: normal !important;
    text-align: center;
    overflow-wrap: anywhere;
  }

  body.sub-page .actions .btn,
  body.sub-page .v4-actions .v4-btn,
  body.sub-page .v4-actions .v4-btn-secondary {
    width: 100% !important;
  }

  body.sub-page .actions .btn.text,
  body.sub-page .v4-actions .v4-btn-text {
    width: auto !important;
    align-self: flex-start;
  }

  body.sub-page .link-strip a,
  body.sub-page .v4-link-strip a,
  body.sub-page .pill,
  body.sub-page .chip,
  body.sub-page .badge,
  body.sub-page .v4-truth-badge,
  body.sub-page .v4-truth-badge-label,
  body.sub-page .v4-truth-badge-value,
  body.sub-page .v4-visual-strip-item,
  body.sub-page .v4-visual-strip-item span {
    max-width: 100% !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: normal;
    text-align: center;
  }

  body.sub-page h1,
  body.sub-page h2,
  body.sub-page h3,
  body.sub-page h4,
  body.sub-page h5,
  body.sub-page h6,
  body.sub-page p,
  body.sub-page li,
  body.sub-page dd,
  body.sub-page dt,
  body.sub-page blockquote,
  body.sub-page label,
  body.sub-page small,
  body.sub-page strong,
  body.sub-page em,
  body.sub-page a,
  body.sub-page .lead,
  body.sub-page .v4-lead,
  body.sub-page .v4-body,
  body.sub-page .v4-body-sm,
  body.sub-page .eyebrow,
  body.sub-page .v4-eyebrow,
  body.sub-page .note,
  body.sub-page .stage-note,
  body.sub-page .pkg-label,
  body.sub-page .pkg-spec,
  body.sub-page .pkg-note {
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
    word-break: normal;
  }

  body.sub-page h1,
  body.sub-page .v4-h1,
  body.sub-page .v4-hero-text h1,
  body.sub-page .hero.compact h1 {
    max-width: 100% !important;
  }

  body.sub-page img,
  body.sub-page svg,
  body.sub-page picture,
  body.sub-page video,
  body.sub-page canvas,
  body.sub-page .v4-hero-visual,
  body.sub-page .v4-hero-visual img,
  body.sub-page .v4-split-image,
  body.sub-page .v4-split-image img,
  body.sub-page .v4-placeholder-img,
  body.sub-page .mockup,
  body.sub-page .visual,
  body.sub-page .visual-card,
  body.sub-page .proof-panel,
  body.sub-page .preview-only {
    max-width: 100% !important;
  }

  body.sub-page img,
  body.sub-page svg,
  body.sub-page picture,
  body.sub-page video,
  body.sub-page canvas {
    height: auto;
  }

  body.sub-page input,
  body.sub-page select,
  body.sub-page textarea {
    width: 100%;
    max-width: 100% !important;
  }
}

@media (max-width: 390px) {
  body.sub-page .inner,
  body.sub-page .v4-inner,
  body.sub-page .hero,
  body.sub-page .v4-hero {
    width: min(100%, calc(100vw - 20px)) !important;
  }

  body.sub-page .section,
  body.sub-page .section.alt,
  body.sub-page .section.dark,
  body.sub-page .section.light,
  body.sub-page .v4-section,
  body.sub-page .v4-section-alt,
  body.sub-page .v4-section-dark {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
}

/* =============================================
   24. Reduced Motion
   ============================================= */

@media (prefers-reduced-motion: reduce) {
  .v4-btn,
  .v4-link-strip a {
    transition: none;
  }

  html {
    scroll-behavior: auto;
  }
}
