/* v9-site-overhaul — 2026-05-11 — Fixes from 5-agent audit */

/* 1. CONTRAST FIX: Bump muted text to WCAG AA compliant */
:root {
  --muted: #8a8478;
  --ds-ink-soft: #8a8478;
}
[data-theme="dark"] {
  --muted: #a09890;
  --ds-ink-soft: #a09890;
}

/* 2. NAV CONSOLIDATION: Collapse to 4 core items on mobile */
@media (max-width: 768px) {
  .dr-canon-nav .links a[href="/focus/"],
  .dr-canon-nav .links a[href="/desk/v2/"],
  .dr-canon-nav .links a[href="/wall/"] {
    display: none;
  }
}

/* 3. FLOATING CRISIS BUTTON — always visible, bottom-left */
.dr-crisis-float {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9999;
  background: var(--ds-bg, #faf8f4);
  border: 1px solid var(--ds-rule, #e8e1d2);
  border-radius: 24px;
  padding: 8px 16px;
  font-family: 'Atkinson Hyperlegible', system-ui, sans-serif;
  font-size: 13px;
  color: var(--ds-ink-soft, #8a8478);
  text-decoration: none;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}
.dr-crisis-float:hover {
  background: var(--dr-clay, #c9613f);
  color: #fff;
  border-color: var(--dr-clay, #c9613f);
}
[data-theme="dark"] .dr-crisis-float {
  background: #1f1d19;
  border-color: #3a3630;
  color: #a09890;
}
[data-theme="dark"] .dr-crisis-float:hover {
  background: var(--dr-clay, #c9613f);
  color: #fff;
  border-color: var(--dr-clay, #c9613f);
}

/* 4. EXIT-INTENT POPUP */
.dr-exit-popup-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
}
.dr-exit-popup-overlay.active { display: flex; }
.dr-exit-popup {
  background: var(--ds-bg, #faf8f4);
  border-radius: 16px;
  padding: 40px 32px;
  max-width: 440px;
  width: 90%;
  text-align: center;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
[data-theme="dark"] .dr-exit-popup {
  background: #1f1d19;
}
.dr-exit-popup h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 22px;
  margin: 0 0 8px;
  color: var(--ds-ink, #14140e);
}
[data-theme="dark"] .dr-exit-popup h3 { color: #f0ebe4; }
.dr-exit-popup p {
  font-family: 'Atkinson Hyperlegible', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ds-ink-soft, #8a8478);
  margin: 0 0 20px;
}
.dr-exit-popup form {
  display: flex;
  gap: 8px;
}
.dr-exit-popup input[type="email"] {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--ds-rule, #e8e1d2);
  border-radius: 8px;
  font-size: 15px;
  font-family: 'Atkinson Hyperlegible', system-ui, sans-serif;
  background: var(--ds-bg, #fff);
  color: var(--ds-ink, #14140e);
}
[data-theme="dark"] .dr-exit-popup input[type="email"] {
  background: #2a2722;
  border-color: #3a3630;
  color: #f0ebe4;
}
.dr-exit-popup button[type="submit"] {
  padding: 12px 20px;
  background: var(--dr-clay, #c9613f);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Atkinson Hyperlegible', system-ui, sans-serif;
  cursor: pointer;
  white-space: nowrap;
}
.dr-exit-popup button[type="submit"]:hover { opacity: 0.9; }
.dr-exit-popup .close-popup {
  position: absolute;
  top: 12px; right: 16px;
  background: none; border: none;
  font-size: 22px;
  color: var(--ds-ink-soft, #8a8478);
  cursor: pointer;
}

/* 5. URGENCY STRIP */
.dr-urgency-strip {
  background: var(--dr-clay, #c9613f);
  color: #fff;
  text-align: center;
  padding: 8px 16px;
  font-family: 'Atkinson Hyperlegible', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.dr-urgency-strip a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* 6. Fix inline font-size from px to rem */
.hero-cta-sub, .hero-tools-hint {
  font-size: 0.875rem !important;
}

/* 7. Reduce hero clutter on mobile */
@media (max-width: 600px) {
  .hero-tools-hint { display: none; }
  .dr-hero-receipts { display: none; }
  .hpc-pullquote { display: none; }
}
