/* ==========================================================================
   VALLEZA CONSULTING — Shared Stylesheet
   Used by: index.html, guides/index.html, guides/*.html
   ========================================================================== */

/* ============ THEME TOKENS ============ */
:root,
html[data-resolved="light"] {
  --c-bg:          #ffffff;
  --c-bg-soft:     #f5f8fc;
  --c-bg-elev:     #eef3fa;
  --c-surface:     #ffffff;
  --c-border:      #dde5ef;
  --c-border-soft: #e8eef6;

  --c-navy:        #1e3a5f;
  --c-navy-bright: #2b5082;
  --c-steel:       #2b6cb0;
  --c-steel-light: #4a90c2;
  --c-gray:        #64748b;
  --c-gray-dim:    #94a3b8;

  --c-text:        #0f1b2d;
  --c-text-muted:  #475569;
  --c-text-dim:    #64748b;

  --c-btn-primary-bg:   #1e3a5f;
  --c-btn-primary-fg:   #ffffff;
  --c-btn-primary-hov:  #2b5082;

  --c-grid-line:   rgba(30, 58, 95, 0.055);
  --c-hero-glow:   rgba(74, 144, 194, 0.14);

  --c-code-bg:     #0f1b2d;
  --c-code-fg:     #e6ebf2;
  --c-code-inline-bg:  #eef3fa;
  --c-code-inline-fg:  #1e3a5f;
  --c-code-border: #1a2740;

  --c-callout-info-bg:    #eef5fb;
  --c-callout-info-border:#2b6cb0;
  --c-callout-warn-bg:    #fef6e8;
  --c-callout-warn-border:#c28a1d;
  --c-callout-danger-bg:  #fde8e8;
  --c-callout-danger-border:#c14343;
  --c-callout-tip-bg:     #e8f5ef;
  --c-callout-tip-border: #2a8560;

  --c-critical:    #c14343;
  --c-high:        #c28a1d;
  --c-medium:      #64748b;

  --shadow-sm: 0 1px 2px rgba(15, 27, 45, 0.04);
  --shadow-md: 0 4px 16px rgba(15, 27, 45, 0.06);
  --shadow-lg: 0 12px 40px -12px rgba(30, 58, 95, 0.18);
  --shadow-cta: 0 8px 24px -8px rgba(30, 58, 95, 0.35);

  --nav-bg: rgba(255, 255, 255, 0.78);
}

html[data-resolved="dark"] {
  --c-bg:          #07090c;
  --c-bg-soft:     #0d1117;
  --c-bg-elev:     #121821;
  --c-surface:     #161d28;
  --c-border:      #1f2937;
  --c-border-soft: #141a24;

  --c-navy:        #1e3a5f;
  --c-navy-bright: #2b5082;
  --c-steel:       #4a90c2;
  --c-steel-light: #7bb4d9;
  --c-gray:        #8892a0;
  --c-gray-dim:    #5a6270;

  --c-text:        #e6ebf2;
  --c-text-muted:  #9aa4b2;
  --c-text-dim:    #6b7685;

  --c-btn-primary-bg:   #4a90c2;
  --c-btn-primary-fg:   #07090c;
  --c-btn-primary-hov:  #7bb4d9;

  --c-grid-line:   rgba(74, 144, 194, 0.035);
  --c-hero-glow:   rgba(30, 58, 95, 0.35);

  --c-code-bg:     #0a0f17;
  --c-code-fg:     #e6ebf2;
  --c-code-inline-bg:  #1a2434;
  --c-code-inline-fg:  #7bb4d9;
  --c-code-border: #1f2937;

  --c-callout-info-bg:    rgba(74, 144, 194, 0.08);
  --c-callout-info-border:#4a90c2;
  --c-callout-warn-bg:    rgba(194, 138, 29, 0.1);
  --c-callout-warn-border:#d4a34a;
  --c-callout-danger-bg:  rgba(193, 67, 67, 0.1);
  --c-callout-danger-border:#e68a8a;
  --c-callout-tip-bg:     rgba(42, 133, 96, 0.1);
  --c-callout-tip-border: #5ab58a;

  --c-critical:    #e68a8a;
  --c-high:        #d4a34a;
  --c-medium:      #9aa4b2;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 40px -12px rgba(0, 0, 0, 0.5);
  --shadow-cta: 0 8px 24px -8px rgba(74, 144, 194, 0.5);

  --nav-bg: rgba(7, 9, 12, 0.72);
}

:root {
  --font-display:  'IBM Plex Serif', 'Source Serif Pro', Georgia, serif;
  --font-body:     'Inter Tight', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:     'IBM Plex Mono', 'JetBrains Mono', Menlo, monospace;

  --radius-sm: 3px;
  --radius-md: 6px;
  --radius-lg: 10px;

  --max-w: 1200px;
  --max-w-prose: 780px;
  --gutter: clamp(20px, 4vw, 48px);
}

/* ============ RESET ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.6;
  font-weight: 400;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.3s ease, color 0.3s ease;
}
/* Prevent long italicized phrases from causing horizontal scroll */
h1, h2, h3, h4, p {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Defensive: catch any stray overflow culprits */
img, svg, iframe, video { max-width: 100%; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--c-grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--c-grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 1;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-steel);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}
.eyebrow::before {
  content: "";
  width: 20px;
  height: 1px;
  background: var(--c-steel);
  display: inline-block;
}

/* ============ NAV ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--c-border-soft);
  transition: background 0.3s ease, border-color 0.3s ease;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  gap: 20px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 44px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--c-text);
}
.brand-sub {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-text-dim);
  margin-top: 2px;
}
.nav-right { display: flex; align-items: center; gap: 20px; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--c-text-muted);
  transition: color 0.2s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--c-text); }
.nav-links a.active { color: var(--c-steel); }
.nav-links a.nav-cta {
  padding: 9px 18px;
  background: var(--c-btn-primary-bg);
  color: var(--c-btn-primary-fg);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}
.nav-links a.nav-cta:hover {
  background: var(--c-btn-primary-hov);
  color: var(--c-btn-primary-fg);
}

.theme-toggle {
  display: flex;
  align-items: center;
  background: var(--c-bg-soft);
  border: 1px solid var(--c-border);
  border-radius: 999px;
  padding: 3px;
}
.theme-toggle button {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text-dim);
  transition: color 0.2s ease, background 0.2s ease;
}
.theme-toggle button:hover { color: var(--c-text); }
.theme-toggle button[aria-pressed="true"] {
  color: var(--c-steel);
  background: var(--c-surface);
  box-shadow: var(--shadow-sm);
}
.theme-toggle svg { width: 15px; height: 15px; }
.mobile-toggle { display: none; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-lg { padding: 16px 30px; font-size: 15px; }
.btn-primary {
  background: var(--c-btn-primary-bg);
  color: var(--c-btn-primary-fg);
}
.btn-primary:hover {
  background: var(--c-btn-primary-hov);
  transform: translateY(-1px);
  box-shadow: var(--shadow-cta);
}
.btn-ghost {
  color: var(--c-text);
  border-color: var(--c-border);
}
.btn-ghost:hover {
  border-color: var(--c-steel);
  color: var(--c-steel);
}
.btn .arrow { transition: transform 0.2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ============ HERO ============ */
.hero {
  padding: clamp(72px, 11vh, 120px) 0 clamp(56px, 7vh, 80px);
  position: relative;
  text-align: center;
}
.hero-eyebrow { margin-bottom: 28px; justify-content: center; }
.hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(40px, 5.5vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--c-text);
  margin: 0 auto 26px;
  max-width: 920px;
}
.hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--c-steel);
}
.hero .lede {
  font-size: 18px;
  line-height: 1.6;
  color: var(--c-text-muted);
  max-width: 620px;
  margin: 0 auto 36px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.hero-trust {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-text-dim);
}
.hero-trust .sep { margin: 0 10px; color: var(--c-border); }

/* ============ PROOF STRIP ============ */
.proof-strip {
  padding: 56px 0;
  border-top: 1px solid var(--c-border-soft);
  border-bottom: 1px solid var(--c-border-soft);
  background: var(--c-bg-soft);
}
.proof-head {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-text-dim);
  margin-bottom: 40px;
}
.proof-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.proof-stat {
  padding: 0 28px;
  border-right: 1px solid var(--c-border);
  text-align: center;
}
.proof-stat:last-child { border-right: none; }
.proof-stat .num {
  font-family: var(--font-display);
  font-size: clamp(40px, 5.2vw, 60px);
  font-weight: 500;
  color: var(--c-text);
  line-height: 1;
  letter-spacing: -0.02em;
  display: block;
  margin-bottom: 14px;
}
.proof-stat .num .accent { color: var(--c-steel); }
.proof-stat .label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  line-height: 1.45;
}

/* ============ SECTION SHELL ============ */
section { padding: clamp(70px, 9vh, 110px) 0; position: relative; }
.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-head.left { margin-left: 0; margin-right: 0; text-align: left; }
.section-head .eyebrow { justify-content: center; margin-bottom: 20px; }
.section-head.left .eyebrow { justify-content: flex-start; }
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(30px, 3.8vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
  color: var(--c-text);
}
.section-head h2 em { font-style: italic; color: var(--c-steel); font-weight: 400; }
.section-head p {
  font-size: 16.5px;
  color: var(--c-text-muted);
  line-height: 1.65;
  max-width: 600px;
  margin: 0 auto;
}
.section-head.left p { margin-left: 0; }

/* ============ THE PROBLEM ============ */
.problem {
  background: var(--c-bg-soft);
}
.problem-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
}
.problem-copy h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
  color: var(--c-text);
}
.problem-copy h2 em { font-style: italic; color: var(--c-steel); font-weight: 400; }
.problem-copy > p {
  font-size: 16px;
  color: var(--c-text-muted);
  line-height: 1.65;
  margin-bottom: 26px;
}
.problem-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}
.problem-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15.5px;
  color: var(--c-text);
}
.problem-list li::before {
  content: "!";
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--c-callout-danger-bg);
  color: var(--c-critical);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.problem-closer {
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.45;
  color: var(--c-text);
  font-weight: 500;
  letter-spacing: -0.005em;
  padding: 22px 26px;
  border-left: 3px solid var(--c-steel);
  background: var(--c-surface);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.problem-closer em { font-style: italic; color: var(--c-steel); }

/* Risk area panel */
.risk-panel {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 30px;
  box-shadow: var(--shadow-md);
}
.risk-panel h6 {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-text-dim);
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--c-border);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}
.risk-panel h6 svg { width: 14px; height: 14px; color: var(--c-critical); }
.risk-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--c-border-soft);
  font-size: 14.5px;
}
.risk-row:last-child { border-bottom: none; }
.risk-row .name { color: var(--c-text); font-weight: 500; }
.risk-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 3px;
  font-weight: 500;
}
.risk-badge.critical { color: var(--c-critical); background: color-mix(in srgb, var(--c-critical) 10%, transparent); border: 1px solid color-mix(in srgb, var(--c-critical) 28%, transparent); }
.risk-badge.high { color: var(--c-high); background: color-mix(in srgb, var(--c-high) 10%, transparent); border: 1px solid color-mix(in srgb, var(--c-high) 28%, transparent); }
.risk-badge.medium { color: var(--c-medium); background: color-mix(in srgb, var(--c-medium) 10%, transparent); border: 1px solid color-mix(in srgb, var(--c-medium) 28%, transparent); }

/* ============ SERVICES — tight cards ============ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.service-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.25s ease;
}
.service-card:hover {
  border-color: var(--c-steel);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.service-card .icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--c-steel) 8%, transparent);
  color: var(--c-steel);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--c-steel) 20%, transparent);
}
.service-card .icon svg { width: 20px; height: 20px; }
.service-card h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--c-text);
}
.service-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 2px;
}
.service-card ul li {
  font-size: 14px;
  color: var(--c-text-muted);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}
.service-card ul li::before {
  content: "";
  flex-shrink: 0;
  width: 5px;
  height: 5px;
  background: var(--c-steel);
  border-radius: 50%;
  margin-top: 8px;
}

/* ============ RESULTS / TRACK RECORD ============ */
.results {
  background: var(--c-bg-soft);
}
.results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.result-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: all 0.25s ease;
  position: relative;
}
.result-card:hover {
  border-color: var(--c-steel);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.result-metric {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--c-border-soft);
}
.result-metric .kicker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-steel);
  font-weight: 500;
}
.result-metric .big {
  font-family: var(--font-display);
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 500;
  line-height: 1;
  color: var(--c-text);
  letter-spacing: -0.02em;
}
.result-metric .big .accent { color: var(--c-steel); }
.result-metric .sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--c-text-dim);
  margin-top: 2px;
}
.result-card h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--c-text);
}
.result-card p {
  font-size: 14.5px;
  color: var(--c-text-muted);
  line-height: 1.6;
}
.results-foot {
  text-align: center;
  margin-top: 44px;
  font-size: 14px;
  color: var(--c-text-dim);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

/* ============ DIFFERENTIATORS ============ */
.diff-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 44px;
}
.diff-item { text-align: left; }
.diff-item .icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--c-navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
html[data-resolved="dark"] .diff-item .icon {
  background: var(--c-steel);
  color: var(--c-bg);
}
.diff-item .icon svg { width: 22px; height: 22px; }
.diff-item h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--c-text);
  margin-bottom: 10px;
  line-height: 1.25;
}
.diff-item p {
  font-size: 15px;
  color: var(--c-text-muted);
  line-height: 1.6;
}

/* ============ PROCESS / HOW IT WORKS ============ */
.process {
  background: var(--c-bg-soft);
}
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  counter-reset: step;
  position: relative;
}
.process-grid::before {
  content: "";
  position: absolute;
  top: 26px;
  left: 8%;
  right: 8%;
  height: 1px;
  background: var(--c-border);
  z-index: 0;
}
.process-step {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 12px;
}
.process-step .num {
  counter-increment: step;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  color: var(--c-steel);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: var(--shadow-sm);
}
.process-step .num::before { content: counter(step); }
.process-step h4 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  color: var(--c-text);
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.process-step p {
  font-size: 13.5px;
  color: var(--c-text-muted);
  line-height: 1.55;
}

/* ============ ABOUT (compressed) ============ */
.about-compact {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}
.about-compact .logo-mark {
  width: auto;
  height: 80px;
  margin: 0 auto 24px;
}
.about-compact h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 3.4vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: var(--c-text);
}
.about-compact h2 em { font-style: italic; color: var(--c-steel); font-weight: 400; }
.about-compact p {
  font-size: 16.5px;
  color: var(--c-text-muted);
  line-height: 1.7;
  margin-bottom: 18px;
}
.about-compact .signed {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--c-border-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--c-text-dim);
  text-transform: uppercase;
}
.about-compact .signed strong { color: var(--c-text); font-family: var(--font-display); font-size: 17px; text-transform: none; letter-spacing: -0.01em; font-weight: 500; }
.about-compact .signed span { display: block; margin-top: 4px; }

/* ============ FINAL CTA ============ */
.final-cta {
  background:
    radial-gradient(ellipse at top, color-mix(in srgb, var(--c-steel) 18%, transparent), transparent 60%),
    var(--c-navy);
  color: #fff;
  text-align: center;
  padding: clamp(70px, 10vh, 110px) 0;
  position: relative;
  overflow: hidden;
}
html[data-resolved="dark"] .final-cta {
  background:
    radial-gradient(ellipse at top, color-mix(in srgb, var(--c-steel) 22%, transparent), transparent 65%),
    #0a1220;
}
.final-cta::before,
.final-cta::after {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--c-steel-light) 20%, transparent), transparent 70%);
  pointer-events: none;
}
.final-cta::before { top: -120px; left: -120px; }
.final-cta::after { bottom: -120px; right: -120px; }
.final-cta-inner { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }
.final-cta .eyebrow { justify-content: center; color: var(--c-steel-light); margin-bottom: 22px; }
.final-cta .eyebrow::before { background: var(--c-steel-light); }
.final-cta h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
  color: #fff;
}
.final-cta h2 em { font-style: italic; color: var(--c-steel-light); font-weight: 400; }
.final-cta p {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.6;
  max-width: 560px;
  margin: 0 auto 32px;
}
.final-cta .btn-primary {
  background: #fff;
  color: var(--c-navy);
}
.final-cta .btn-primary:hover {
  background: var(--c-steel-light);
  color: var(--c-navy);
}
.final-cta-direct {
  margin-top: 32px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.6);
}
.final-cta-direct a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.final-cta-direct .sep { margin: 0 12px; opacity: 0.4; }

/* ============ FOOTER ============ */
footer {
  padding: 52px 0 32px;
  border-top: 1px solid var(--c-border-soft);
  background: var(--c-bg);
}
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--c-border-soft);
  margin-bottom: 28px;
}
.footer-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.footer-brand img { height: 48px; }
.footer-brand-text .n {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--c-text);
}
.footer-brand-text .s {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-text-dim);
  margin-top: 3px;
}
.footer-tag {
  font-size: 14px;
  color: var(--c-text-muted);
  line-height: 1.6;
  max-width: 360px;
}
.footer-col h6 {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-steel);
  margin-bottom: 14px;
  font-weight: 500;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-col a, .footer-col li {
  font-size: 14px;
  color: var(--c-text-muted);
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--c-steel); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: var(--c-text-dim);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
.footer-bottom .dot {
  display: inline-block;
  width: 4px; height: 4px;
  background: var(--c-steel);
  border-radius: 50%;
  margin: 0 8px;
  vertical-align: middle;
}

/* ============ REVEAL ANIMATION (disabled — content renders immediately) ============ */
.reveal {
  opacity: 1;
  transform: none;
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* ============ HOMEPAGE RESPONSIVE ============ */
/* ============ RESPONSIVE — TABLET (1024px and below) ============ */
@media (max-width: 1024px) {
  .proof-grid { grid-template-columns: repeat(2, 1fr); gap: 40px 0; }
  .proof-stat { padding: 20px 28px; border-right: none; border-bottom: 1px solid var(--c-border); }
  .proof-stat:nth-last-child(-n+2) { border-bottom: none; }
  .proof-stat:nth-child(odd) { border-right: 1px solid var(--c-border); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .results-grid { grid-template-columns: 1fr; }
  .diff-grid { grid-template-columns: 1fr; gap: 32px; }
  .process-grid { grid-template-columns: repeat(2, 1fr); row-gap: 44px; }
  .process-grid::before { display: none; }
  .footer-top { grid-template-columns: 1fr; gap: 36px; }
}

/* ============ RESPONSIVE — MOBILE LANDSCAPE / SMALL TABLET (760px) ============ */
@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-border);
    padding: 20px var(--gutter);
    gap: 18px;
    align-items: flex-start;
  }
  .mobile-toggle { display: flex; flex-direction: column; gap: 4px; padding: 8px; }
  .mobile-toggle span {
    width: 22px; height: 1.5px; background: var(--c-text);
    transition: all 0.3s;
  }
  .brand img { height: 38px; }
  .brand-name { font-size: 15px; }

  section { padding: 60px 0; }
  .section-head { margin-bottom: 40px; }

  .proof-grid { grid-template-columns: 1fr; }
  .proof-stat { border-right: none !important; border-bottom: 1px solid var(--c-border); padding: 24px 0; }
  .proof-stat:last-child { border-bottom: none; }

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

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

  /* Wide service card (Managed DBA) — collapse bullets to single column earlier */
  .service-card.service-card-wide { padding: 28px 24px; gap: 20px; }
  .service-card-wide .wide-left { flex-direction: column; gap: 14px; }
  .service-card-wide .wide-bullets { grid-template-columns: 1fr; gap: 8px; }

  /* Symptom/diagnosis grid — stack pairs */
  .sx-grid { grid-template-columns: 1fr; }
  .sx-head-symptoms,
  .sx-head-diagnosis { grid-column: 1; border-left: none; }
  .sx-head-diagnosis { border-top: 1px solid var(--c-border); }
  .sx-grid::before { display: none; }
  .sx-row { display: block; border-bottom: 1px solid var(--c-border); }
  .sx-row:last-child { border-bottom: none; }
  .sx-row > * { padding: 14px 20px; border-bottom: none; display: block; }
  .sx-arrow { display: none; }
  .sx-symptom { padding-bottom: 8px; font-weight: 500; font-size: 15px; }
  .sx-diagnosis {
    border-left: none;
    background: var(--c-bg-soft);
    padding-top: 10px;
    font-size: 13px;
  }

  /* Form on dark CTA — stack fields */
  .cta-form-row { grid-template-columns: 1fr; }
  .final-cta-direct .sep { display: block; margin: 6px 0; }

  /* Footer tighter */
  footer { padding: 40px 0 28px; }
  .footer-top { padding-bottom: 28px; margin-bottom: 22px; gap: 28px; }
  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    text-align: center;
    font-size: 11.5px;
  }
}

/* ============ RESPONSIVE — PHONE (520px and below) ============ */
@media (max-width: 520px) {
  :root {
    --gutter: 18px;
  }

  /* Hero — dramatically smaller on phones */
  .hero { padding: 48px 0 40px; }
  .hero h1 {
    font-size: 30px;
    line-height: 1.15;
    letter-spacing: -0.01em;
  }
  .hero .lede {
    font-size: 15.5px;
    line-height: 1.55;
    margin-bottom: 28px;
  }
  .hero-eyebrow { margin-bottom: 18px; font-size: 10px; }
  .hero-trust {
    font-size: 10px;
    line-height: 1.7;
  }
  .hero-trust .sep { display: none; }

  /* Buttons — full width feels native on mobile */
  .btn-lg { padding: 14px 22px; font-size: 14px; width: 100%; justify-content: center; }

  /* Section headings — reduce to manageable size */
  .section-head h2 {
    font-size: 26px;
    line-height: 1.18;
  }
  .section-head p { font-size: 15px; }

  /* Proof stat numbers — reduce from huge to readable */
  .proof-stat .num { font-size: 42px; }
  .proof-stat .label { font-size: 10px; }

  /* Problem section */
  .problem .section-head h2 { font-size: 24px; }

  /* Services — tighter padding */
  .service-card { padding: 22px 20px; }
  .service-card h3 { font-size: 17px; }
  .service-card ul li { font-size: 13.5px; }
  .service-card-wide { padding: 22px 20px; }
  .service-card-wide .wide-title-row h3 { font-size: 18px; }

  /* Results — reduce big numbers */
  .result-card { padding: 24px 22px; }
  .result-metric .big { font-size: 36px; }
  .result-card h3 { font-size: 17px; }
  .result-card p { font-size: 14px; }

  /* Why Valleza */
  .diff-item h3 { font-size: 18px; }
  .diff-item p { font-size: 14.5px; }

  /* About */
  .about-compact h2 { font-size: 24px; }
  .about-compact p { font-size: 15px; }
  .about-compact .logo-mark { width: 64px; height: 64px; }

  /* Final CTA */
  .final-cta { padding: 60px 0; }
  .final-cta h2 { font-size: 26px; }
  .final-cta p { font-size: 15px; }
  .final-cta-direct { font-size: 11px; }

  /* Form fields — slightly smaller, finger-friendly */
  .cta-field input,
  .cta-field select,
  .cta-field textarea { font-size: 15px; padding: 11px 12px; }
  .cta-field label { font-size: 10px; }

  /* Closer quote */
  .problem-closer {
    font-size: 17px;
    padding: 18px 22px;
    margin-top: 32px !important;
  }
}

/* ============ ACCESSIBILITY — reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   GUIDES — Index & Individual Pages (unchanged from previous)
   ========================================================================== */

/* ============ GUIDES INDEX ============ */
.guides-hero { padding: clamp(70px, 10vh, 110px) 0 clamp(50px, 6vh, 80px); }
.guides-hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--c-text);
  margin: 20px 0 24px;
  max-width: 820px;
}
.guides-hero h1 em { font-style: italic; color: var(--c-steel); font-weight: 400; }
.guides-hero p {
  font-size: 18px;
  color: var(--c-text-muted);
  line-height: 1.65;
  max-width: 620px;
}

.guides-controls {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--c-border-soft);
}
.guides-search { position: relative; max-width: 460px; margin-bottom: 20px; }
.guides-search input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--c-text);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 12px 14px 12px 42px;
  transition: all 0.2s ease;
}
.guides-search input:focus {
  outline: none;
  border-color: var(--c-steel);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-steel) 18%, transparent);
}
.guides-search svg {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--c-text-dim);
}

.guides-filters { display: flex; flex-wrap: wrap; gap: 10px; }
.filter-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  padding: 8px 14px;
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.filter-chip:hover { border-color: var(--c-steel); color: var(--c-text); }
.filter-chip.active { background: var(--c-navy); color: #fff; border-color: var(--c-navy); }
html[data-resolved="dark"] .filter-chip.active { background: var(--c-steel); color: var(--c-bg); border-color: var(--c-steel); }

.guides-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding-bottom: 80px;
}
.guide-card {
  display: flex;
  flex-direction: column;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 28px 28px 24px;
  transition: all 0.25s ease;
  position: relative;
  min-height: 260px;
}
.guide-card:hover { border-color: var(--c-steel); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.guide-card-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.guide-category {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-steel);
  font-weight: 500;
}
.guide-difficulty {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--c-text-dim);
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
}
.guide-difficulty .pips { display: inline-flex; gap: 3px; }
.guide-difficulty .pip { width: 5px; height: 5px; border-radius: 50%; background: var(--c-border); }
.guide-difficulty[data-level="1"] .pip:nth-child(1) { background: var(--c-steel); }
.guide-difficulty[data-level="2"] .pip:nth-child(-n+2) { background: var(--c-steel); }
.guide-difficulty[data-level="3"] .pip { background: var(--c-steel); }

.guide-card h3 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 500;
  color: var(--c-text);
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin-bottom: 12px;
}
.guide-card p {
  font-size: 14.5px;
  color: var(--c-text-muted);
  line-height: 1.55;
  flex-grow: 1;
  margin-bottom: 20px;
}
.guide-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--c-border-soft);
}
.guide-time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--c-text-dim);
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.guide-time svg { width: 12px; height: 12px; }
.guide-read {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--c-steel);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}
.guide-card a.stretched-link { position: absolute; inset: 0; z-index: 1; }

.guides-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--c-text-dim);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.05em;
}

/* ============ GUIDE PAGE ============ */
.guide-page { padding: clamp(40px, 6vh, 70px) 0 clamp(60px, 8vh, 100px); }

.guide-breadcrumb {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--c-text-dim);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.guide-breadcrumb a { color: var(--c-text-muted); transition: color 0.2s; }
.guide-breadcrumb a:hover { color: var(--c-steel); }
.guide-breadcrumb .sep { opacity: 0.5; }

.guide-header {
  max-width: var(--max-w-prose);
  margin: 0 auto 48px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--c-border);
}
.guide-header .category {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-steel);
  margin-bottom: 16px;
  font-weight: 500;
  display: inline-block;
  padding: 5px 12px;
  background: color-mix(in srgb, var(--c-steel) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--c-steel) 20%, transparent);
  border-radius: 999px;
}
.guide-header h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--c-text);
  margin-bottom: 18px;
}
.guide-header .summary {
  font-size: 19px;
  line-height: 1.6;
  color: var(--c-text-muted);
  font-weight: 400;
  margin-bottom: 28px;
}
.guide-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 32px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--c-text-dim);
  letter-spacing: 0.04em;
}
.guide-meta-item { display: flex; align-items: center; gap: 8px; }
.guide-meta-item svg { width: 14px; height: 14px; color: var(--c-steel); }
.guide-meta-item strong {
  color: var(--c-text);
  font-weight: 500;
  font-family: var(--font-body);
  font-size: 13.5px;
  letter-spacing: 0;
  margin-left: 4px;
}
.guide-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.guide-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--c-text-muted);
  padding: 3px 10px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: var(--c-bg-soft);
}

.guide-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 200px;
  gap: 48px;
  align-items: start;
  max-width: var(--max-w);
  margin: 0 auto;
}

.guide-toc {
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  padding-right: 16px;
}
.guide-toc h6 {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-text-dim);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--c-border);
  font-weight: 500;
}
.guide-toc ul { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.guide-toc a {
  display: block;
  font-size: 13px;
  color: var(--c-text-muted);
  padding: 5px 10px;
  border-left: 2px solid transparent;
  transition: all 0.15s ease;
  line-height: 1.45;
}
.guide-toc a:hover { color: var(--c-text); }
.guide-toc a.active { color: var(--c-steel); border-left-color: var(--c-steel); font-weight: 500; }
.guide-toc a.level-3 { padding-left: 22px; font-size: 12.5px; }

.guide-aside-right { padding-top: 4px; }
.guide-share { position: sticky; top: 100px; }
.guide-share h6 {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-text-dim);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--c-border);
  font-weight: 500;
}
.guide-share-btns { display: flex; flex-direction: column; gap: 8px; }
.guide-share-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--c-text-muted);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  background: var(--c-surface);
  cursor: pointer;
  width: 100%;
  text-align: left;
}
.guide-share-btn:hover { border-color: var(--c-steel); color: var(--c-steel); }
.guide-share-btn svg { width: 13px; height: 13px; }

/* ============ GUIDE CONTENT TYPOGRAPHY ============ */
.guide-content {
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--c-text);
  max-width: var(--max-w-prose);
}
.guide-content > * + * { margin-top: 1.3em; }
.guide-content h2 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--c-text);
  margin-top: 2.4em;
  margin-bottom: 0.6em;
  padding-top: 1.2em;
  border-top: 1px solid var(--c-border);
  scroll-margin-top: 100px;
}
.guide-content h2:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.guide-content h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--c-text);
  margin-top: 2em;
  margin-bottom: 0.4em;
  scroll-margin-top: 100px;
}
.guide-content h4 {
  font-family: var(--font-body);
  font-size: 16.5px;
  font-weight: 600;
  color: var(--c-text);
  margin-top: 1.6em;
  margin-bottom: 0.4em;
  letter-spacing: 0;
}
.guide-content p { color: var(--c-text); }
.guide-content a {
  color: var(--c-steel);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}
.guide-content a:hover { color: var(--c-steel-light); }
.guide-content strong { font-weight: 600; color: var(--c-text); }
.guide-content em { font-style: italic; }

.guide-content ul, .guide-content ol { padding-left: 24px; color: var(--c-text); }
.guide-content ul li, .guide-content ol li { margin-bottom: 0.5em; padding-left: 6px; }
.guide-content ul > li::marker { color: var(--c-steel); }
.guide-content ol > li::marker { color: var(--c-steel); font-family: var(--font-mono); font-size: 0.9em; }

.guide-content blockquote {
  border-left: 3px solid var(--c-steel);
  padding: 4px 0 4px 24px;
  margin-left: 0;
  font-style: italic;
  color: var(--c-text-muted);
  font-size: 17px;
}

.guide-content code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--c-code-inline-bg);
  color: var(--c-code-inline-fg);
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid color-mix(in srgb, var(--c-steel) 12%, transparent);
}

.guide-content pre {
  background: var(--c-code-bg);
  color: var(--c-code-fg);
  border: 1px solid var(--c-code-border);
  border-radius: var(--radius-md);
  padding: 0;
  overflow: hidden;
  position: relative;
  margin: 1.5em 0;
  box-shadow: var(--shadow-md);
}
.guide-content pre .code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: color-mix(in srgb, var(--c-code-bg) 80%, #fff 3%);
  border-bottom: 1px solid color-mix(in srgb, var(--c-code-bg) 60%, #fff 8%);
}
.guide-content pre .code-lang {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--c-code-fg) 70%, transparent);
}
.guide-content pre .code-copy {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: color-mix(in srgb, var(--c-code-fg) 75%, transparent);
  padding: 4px 10px;
  border: 1px solid color-mix(in srgb, var(--c-code-fg) 18%, transparent);
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
}
.guide-content pre .code-copy:hover { color: var(--c-code-fg); border-color: color-mix(in srgb, var(--c-code-fg) 40%, transparent); }
.guide-content pre .code-copy.copied { color: #7bc29a; border-color: color-mix(in srgb, #7bc29a 40%, transparent); }
.guide-content pre .code-copy svg { width: 12px; height: 12px; }
.guide-content pre code {
  display: block;
  padding: 18px 20px;
  background: none;
  color: var(--c-code-fg);
  border: none;
  white-space: pre;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.65;
  border-radius: 0;
}

.guide-content img { margin: 1.6em 0; border-radius: var(--radius-md); border: 1px solid var(--c-border); max-width: 100%; }
.guide-content figure { margin: 1.6em 0; border-radius: var(--radius-md); border: 1px solid var(--c-border); overflow: hidden; }
.guide-content figure img { border: none; border-radius: 0; margin: 0; display: block; width: 100%; }
.guide-content figcaption {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--c-text-dim);
  letter-spacing: 0.04em;
  padding: 10px 16px;
  background: var(--c-bg-soft);
  border-top: 1px solid var(--c-border);
  text-align: center;
}

.guide-content .table-wrap { overflow-x: auto; margin: 1.5em 0; border-radius: var(--radius-md); border: 1px solid var(--c-border); }
.guide-content table { width: 100%; border-collapse: collapse; font-size: 14px; }
.guide-content table th {
  background: var(--c-bg-soft);
  padding: 12px 16px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-text);
  border-bottom: 1px solid var(--c-border);
}
.guide-content table td { padding: 12px 16px; border-bottom: 1px solid var(--c-border-soft); color: var(--c-text-muted); }
.guide-content table tr:last-child td { border-bottom: none; }

.callout {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  border-left: 3px solid;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 1.5em 0;
  font-size: 15px;
  line-height: 1.6;
}
.callout .icon { flex-shrink: 0; width: 20px; height: 20px; margin-top: 2px; }
.callout strong { display: block; margin-bottom: 4px; font-size: 13.5px; }
.callout p { margin: 0; }
.callout.info { background: var(--c-callout-info-bg); border-color: var(--c-callout-info-border); color: var(--c-text); }
.callout.info .icon { color: var(--c-callout-info-border); }
.callout.warn { background: var(--c-callout-warn-bg); border-color: var(--c-callout-warn-border); color: var(--c-text); }
.callout.warn .icon { color: var(--c-callout-warn-border); }
.callout.danger { background: var(--c-callout-danger-bg); border-color: var(--c-callout-danger-border); color: var(--c-text); }
.callout.danger .icon { color: var(--c-callout-danger-border); }
.callout.tip { background: var(--c-callout-tip-bg); border-color: var(--c-callout-tip-border); color: var(--c-text); }
.callout.tip .icon { color: var(--c-callout-tip-border); }

.guide-content .step-list {
  list-style: none;
  padding: 0;
  counter-reset: step-counter;
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 1.5em 0;
}
.guide-content .step-list > li {
  counter-increment: step-counter;
  position: relative;
  padding: 20px 24px 20px 64px;
  background: var(--c-bg-soft);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--radius-md);
  margin: 0;
}
.guide-content .step-list > li::before {
  content: counter(step-counter);
  position: absolute;
  left: 20px;
  top: 18px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--c-navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
}
html[data-resolved="dark"] .guide-content .step-list > li::before { background: var(--c-steel); color: var(--c-bg); }
.guide-content .step-list > li::marker { content: none; }

.guide-nav-foot {
  max-width: var(--max-w-prose);
  margin: 80px auto 0;
  padding-top: 40px;
  border-top: 1px solid var(--c-border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.guide-nav-foot a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 24px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}
.guide-nav-foot a:hover { border-color: var(--c-steel); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.guide-nav-foot a.next { text-align: right; }
.guide-nav-foot .dir {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-text-dim);
}
.guide-nav-foot .title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  color: var(--c-text);
  line-height: 1.3;
}

.guide-cta {
  max-width: var(--max-w-prose);
  margin: 60px auto 0;
  padding: 36px 40px;
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--c-steel) 10%, transparent), transparent 70%),
    var(--c-bg-soft);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
}
.guide-cta .eyebrow { margin-bottom: 14px; }
.guide-cta h3 {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 500;
  color: var(--c-text);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}
.guide-cta h3 em { font-style: italic; color: var(--c-steel); font-weight: 400; }
.guide-cta p { color: var(--c-text-muted); font-size: 15px; line-height: 1.6; margin-bottom: 22px; max-width: 560px; }

@media (max-width: 1100px) {
  .guide-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 36px; }
  .guide-aside-right { display: none; }
}
@media (max-width: 1024px) { .guides-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) {
  .guide-layout { grid-template-columns: 1fr; }
  .guide-toc {
    position: static;
    max-height: none;
    padding: 20px;
    background: var(--c-bg-soft);
    border: 1px solid var(--c-border-soft);
    border-radius: var(--radius-md);
    margin-bottom: 40px;
    padding-right: 20px;
  }
}
@media (max-width: 760px) {
  .guides-grid { grid-template-columns: 1fr; }
  .guide-nav-foot { grid-template-columns: 1fr; }
  .guide-cta { padding: 28px 24px; }
  .guide-content pre code { font-size: 12.5px; padding: 14px 16px; }
  .guide-content { font-size: 15.5px; }
  .guide-content h2 { font-size: 26px; }
}
/* ============ SERVICES — wide featured card (Managed DBA) ============ */
.service-card.service-card-wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  align-items: center;
  padding: 32px 36px;
}

.service-card-wide .wide-left {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.service-card-wide .wide-head { flex: 1; }

.service-card-wide .wide-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.service-card-wide .wide-title-row h3 {
  margin: 0;
  font-size: 22px;
}

.service-card-wide .wide-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-steel);
  padding: 3px 10px;
  background: color-mix(in srgb, var(--c-steel) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--c-steel) 28%, transparent);
  border-radius: 999px;
  font-weight: 500;
}

.service-card-wide .wide-lede {
  font-size: 15px;
  color: var(--c-text-muted);
  line-height: 1.55;
  margin: 0;
}

.service-card-wide .wide-bullets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 28px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.service-card-wide .wide-bullets li {
  font-size: 14px;
  color: var(--c-text-muted);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}

.service-card-wide .wide-bullets li::before {
  content: "";
  flex-shrink: 0;
  width: 5px;
  height: 5px;
  background: var(--c-steel);
  border-radius: 50%;
  margin-top: 8px;
}

@media (max-width: 1024px) {
  .service-card.service-card-wide { grid-template-columns: 1fr; gap: 24px; }
  .service-card-wide .wide-bullets { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .service-card.service-card-wide { padding: 28px 26px; }
  .service-card-wide .wide-left { flex-direction: column; gap: 16px; }
  .service-card-wide .wide-bullets { grid-template-columns: 1fr; }
}

/* ============ FINAL CTA — FORM ============ */
.cta-form {
  max-width: 620px;
  margin: 36px auto 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.cta-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.cta-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.cta-field label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

.cta-field label .req { color: var(--c-steel-light); margin-left: 3px; }

.cta-field input,
.cta-field select,
.cta-field textarea {
  font-family: var(--font-body);
  font-size: 15px;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
}

.cta-field input::placeholder,
.cta-field textarea::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.cta-field input:focus,
.cta-field select:focus,
.cta-field textarea:focus {
  outline: none;
  border-color: var(--c-steel-light);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 0 3px rgba(123, 180, 217, 0.18);
}

.cta-field textarea {
  resize: vertical;
  min-height: 130px;
  font-family: var(--font-body);
}

.cta-field select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237bb4d9' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-color: rgba(255, 255, 255, 0.06);
  padding-right: 40px;
}

.cta-field select option {
  background: #0a1220;
  color: #fff;
}

.cta-submit {
  align-self: center;
  margin-top: 8px;
}

.cta-form-note {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.06em;
  text-align: center;
}

.cta-form-feedback {
  font-size: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  display: none;
  text-align: center;
}
.cta-form-feedback.success {
  display: block;
  background: rgba(90, 181, 138, 0.12);
  border: 1px solid rgba(90, 181, 138, 0.4);
  color: #9ad9b9;
}
.cta-form-feedback.error {
  display: block;
  background: rgba(230, 138, 138, 0.12);
  border: 1px solid rgba(230, 138, 138, 0.4);
  color: #f0b0b0;
}

.cta-form-sending .cta-submit {
  opacity: 0.6;
  pointer-events: none;
}

@media (max-width: 760px) {
  .cta-form-row { grid-template-columns: 1fr; }
}
/* ============ THE PROBLEM — Symptoms / Diagnosis ============ */
.problem {
  background: var(--c-bg-soft);
}

.sx-grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: 1fr auto 1.1fr;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  background: var(--c-surface);
  overflow: hidden;
}

.sx-head {
  padding: 18px 26px;
  background: var(--c-bg-soft);
  border-bottom: 1px solid var(--c-border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sx-head-symptoms {
  grid-column: 1;
}

.sx-head-diagnosis {
  grid-column: 3;
  border-left: 1px solid var(--c-border);
}

/* Empty middle column header cell — keeps grid aligned */
.sx-grid::before {
  content: "";
  grid-column: 2;
  grid-row: 1;
  background: var(--c-bg-soft);
  border-bottom: 1px solid var(--c-border);
}

.sx-head-kicker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--c-steel);
  font-weight: 500;
}

.sx-head-sub {
  font-size: 12px;
  color: var(--c-text-dim);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.sx-row {
  display: contents;
}

.sx-row > * {
  padding: 20px 26px;
  border-bottom: 1px solid var(--c-border-soft);
  display: flex;
  align-items: center;
}

.sx-row:last-child > * {
  border-bottom: none;
}

.sx-symptom {
  font-size: 16px;
  color: var(--c-text);
  font-weight: 500;
  line-height: 1.45;
}

.sx-arrow {
  padding: 20px 4px;
  justify-content: center;
  color: var(--c-steel);
  opacity: 0.55;
}
.sx-arrow svg {
  width: 18px;
  height: 18px;
}

.sx-diagnosis {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--c-text-muted);
  line-height: 1.55;
  border-left: 1px solid var(--c-border);
  letter-spacing: -0.005em;
}

.problem-closer {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.45;
  color: var(--c-text);
  font-weight: 500;
  letter-spacing: -0.005em;
  padding: 24px 28px;
  border-left: 3px solid var(--c-steel);
  background: var(--c-surface);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.problem-closer em {
  font-style: italic;
  color: var(--c-steel);
}

@media (max-width: 860px) {
  .sx-grid {
    grid-template-columns: 1fr;
  }
  .sx-head-symptoms,
  .sx-head-diagnosis,
  .sx-grid::before {
    grid-column: 1;
    border-left: none;
  }
  .sx-head-diagnosis {
    border-top: 1px solid var(--c-border);
  }
  .sx-grid::before {
    display: none;
  }
  .sx-row > * {
    padding: 16px 20px;
    border-bottom: none;
  }
  .sx-row {
    display: block;
    border-bottom: 1px solid var(--c-border);
  }
  .sx-row:last-child {
    border-bottom: none;
  }
  .sx-arrow {
    display: none;
  }
  .sx-diagnosis {
    border-left: none;
    background: var(--c-bg-soft);
    padding-top: 12px;
  }
  .sx-symptom {
    padding-bottom: 8px;
    font-weight: 500;
  }
}
/* ============ RESPONSIVE — GUIDE PAGES, PHONE (520px) ============ */
@media (max-width: 520px) {

  /* Page padding tighter */
  .guide-page { padding: 28px 0 50px; }

  /* Breadcrumb — smaller + wrapping friendly */
  .guide-breadcrumb {
    font-size: 10.5px;
    margin-bottom: 20px;
  }

  /* Guide header — scale everything down */
  .guide-header {
    margin-bottom: 32px;
    padding-bottom: 26px;
  }
  .guide-header .category {
    font-size: 10px;
    padding: 4px 10px;
    margin-bottom: 12px;
  }
  .guide-header h1 {
    font-size: 26px;
    line-height: 1.15;
    margin-bottom: 14px;
  }
  .guide-header .summary {
    font-size: 16px;
    line-height: 1.55;
    margin-bottom: 20px;
  }

  /* Meta row — stack vertically, smaller icons */
  .guide-meta {
    gap: 12px 20px;
    font-size: 11px;
  }
  .guide-meta-item { gap: 6px; }
  .guide-meta-item svg { width: 12px; height: 12px; }
  .guide-meta-item strong { font-size: 12.5px; }

  .guide-tags { margin-top: 16px; gap: 5px; }
  .guide-tag { font-size: 10px; padding: 2px 8px; }

  /* TOC box on mobile — smaller padding, tighter */
  .guide-toc {
    padding: 16px !important;
    margin-bottom: 28px;
  }
  .guide-toc h6 { font-size: 10px; margin-bottom: 10px; padding-bottom: 8px; }
  .guide-toc a { font-size: 12.5px; padding: 4px 8px; }

  /* Content typography — scale down */
  .guide-content { font-size: 15.5px; line-height: 1.7; }
  .guide-content h2 {
    font-size: 22px;
    line-height: 1.2;
    margin-top: 1.8em;
    padding-top: 0.9em;
  }
  .guide-content h3 {
    font-size: 18px;
    margin-top: 1.6em;
  }
  .guide-content h4 { font-size: 15.5px; }
  .guide-content blockquote { font-size: 15.5px; padding-left: 18px; }

  /* CRITICAL — prevent code blocks from causing horizontal scroll */
  .guide-content pre {
    margin-left: calc(-1 * var(--gutter));
    margin-right: calc(-1 * var(--gutter));
    border-radius: 0;
    border-left: none;
    border-right: none;
    max-width: none;
  }
  .guide-content pre code {
    padding: 14px 18px;
    font-size: 12px;
    line-height: 1.6;
  }
  .guide-content pre .code-head {
    padding: 8px 18px;
  }
  .guide-content pre .code-lang { font-size: 10px; }
  .guide-content pre .code-copy {
    font-size: 10px;
    padding: 3px 8px;
  }

  /* Inline code — allow wrapping */
  .guide-content code {
    white-space: normal;
    word-break: break-word;
    font-size: 0.9em;
  }

  /* Tables — extend edge-to-edge, already scroll inside */
  .guide-content .table-wrap {
    margin-left: calc(-1 * var(--gutter));
    margin-right: calc(-1 * var(--gutter));
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  .guide-content table { font-size: 13px; }
  .guide-content table th,
  .guide-content table td {
    padding: 10px 14px;
    font-size: 13px;
  }
  .guide-content table th { font-size: 10px; }

  /* Step list — reduce left padding from 64px to something phone-friendly */
  .guide-content .step-list > li {
    padding: 16px 18px 16px 54px;
  }
  .guide-content .step-list > li::before {
    width: 26px;
    height: 26px;
    font-size: 12px;
    left: 16px;
    top: 16px;
  }

  /* Callouts — tighter */
  .callout {
    padding: 14px 16px;
    font-size: 14px;
    gap: 10px;
  }
  .callout .icon { width: 18px; height: 18px; }
  .callout strong { font-size: 12.5px; }

  /* Figures */
  .guide-content figcaption { font-size: 10.5px; padding: 8px 14px; }

  /* End-of-guide CTA */
  .guide-cta {
    margin-top: 44px;
    padding: 24px 22px;
  }
  .guide-cta h3 { font-size: 19px; }
  .guide-cta p { font-size: 14px; }

  /* Prev/Next nav — tighter */
  .guide-nav-foot {
    margin-top: 48px;
    padding-top: 28px;
    gap: 12px;
  }
  .guide-nav-foot a { padding: 14px 18px; }
  .guide-nav-foot .dir { font-size: 10px; }
  .guide-nav-foot .title { font-size: 15px; }

  /* Lists — tighter */
  .guide-content ul, .guide-content ol { padding-left: 20px; }
  .guide-content ul li, .guide-content ol li { margin-bottom: 0.4em; }
}


/* ============ GUIDE PAGES — OVERFLOW CONTAINMENT ============ */

/* Grid item overflow fix — this is the key rule */
.guide-content {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Text elements wrap long strings gracefully */
.guide-content p,
.guide-content li,
.guide-content h2,
.guide-content h3,
.guide-content h4,
.guide-content blockquote {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Code blocks — scroll internally, never push page wider */
.guide-content pre {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Tables — scroll internally */
.guide-content .table-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Long inline code and paths wrap at character boundaries */
.guide-content p code,
.guide-content li code {
  word-break: break-all;
}

/* Mobile-only — guide layout enforcement */
@media (max-width: 860px) {
  .guide-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .guide-content {
    max-width: 100%;
    width: 100%;
  }
  /* TOC: on mobile it becomes a normal block above content */
  .guide-toc {
    position: static;
    max-height: none;
    overflow-y: visible;
    padding-right: 20px;
  }
  /* Page-level safety net for horizontal scroll */
  html, body {
    overflow-x: hidden;
    max-width: 100vw;
  }
}