/* v12-audit-fixes-v20260514a.css — 2026-05-14
 *
 * 2026-05-14 audit additions:
 *   - Defect 4: dampen the hero ::after vignette from 0.55 → 0.25 opacity
 *     so the hero content stops feeling "covered" on light theme.
 *   - Defect 7: hide injected .dr-crisis-float on ALL viewports when a
 *     hardcoded .spiraling-badge-link is present (was mobile-only before).
 *   - Defect 8 styles: exit popup pointer-events tightened.
 *
 * (Carries forward all original v20260511a audit fixes.)
 */

/* ═══════════════════════════════════════════════════════════════════
   0. NEW — Defect 4: tame the hero vignette
   ═══════════════════════════════════════════════════════════════════ */
.hero-vp::after { opacity: 0.25 !important; }

/* ═══════════════════════════════════════════════════════════════════
   0b. NEW — Defect 7: dedup bottom-left badges on all viewports
   ═══════════════════════════════════════════════════════════════════ */
.spiraling-badge-link ~ .dr-crisis-float,
body:has(.spiraling-badge-link) .dr-crisis-float,
body:has(.dr-spiraling-badge) .dr-crisis-float {
  display: none !important;
}

/* ═══════════════════════════════════════════════════════════════════
   1. CONTRAST FIXES — WCAG AA
   ═══════════════════════════════════════════════════════════════════ */
.fs-timer-display { color: var(--ink, #1a1814); }

.lib-card p,
.game-card p,
.wall-card p,
.az-card p {
  color: #3d3428;
}
[data-theme="dark"] .lib-card p,
[data-theme="dark"] .game-card p,
[data-theme="dark"] .wall-card p,
[data-theme="dark"] .az-card p {
  color: #c4b89a;
}

.section-eyebrow,
.hero-eyebrow {
  color: #8b4a2a;
}
[data-theme="dark"] .section-eyebrow,
[data-theme="dark"] .hero-eyebrow {
  color: #d4885e;
}

.dr-muted,
.text-muted,
.subtitle {
  color: #5e4e38;
}
[data-theme="dark"] .dr-muted,
[data-theme="dark"] .text-muted,
[data-theme="dark"] .subtitle {
  color: #a89878;
}

/* ═══════════════════════════════════════════════════════════════════
   2. TOUCH TARGETS — 44px minimum
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 760px) {
  .dr-theme-toggle {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
  }

  .dr-sound-toggle,
  [data-deskrune-sound-toggle] {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   3. CRISIS BUTTON — consistent dark style
   ═══════════════════════════════════════════════════════════════════ */
.spiraling-badge-link {
  position: fixed !important;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important;
  left: 14px !important;
  background: #1a1814 !important;
  color: #faf7f2 !important;
  padding: 9px 14px !important;
  border-radius: 99px !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  z-index: 50 !important;
  border: 1px solid #c9613f !important;
  box-shadow: 0 6px 18px rgba(20,20,19,0.18) !important;
}
[data-theme="dark"] .spiraling-badge-link {
  background: #f2ead8 !important;
  color: #1a1814 !important;
  border-color: #c9613f !important;
}

/* ═══════════════════════════════════════════════════════════════════
   4. NAV ACTIVE STATE
   ═══════════════════════════════════════════════════════════════════ */
.dr-canon-nav .links a[aria-current="page"],
.nav-mobile-panel-links a[aria-current="page"] {
  font-weight: 600;
  opacity: 1;
  border-bottom: 2px solid #c9613f;
  padding-bottom: 2px;
}
[data-theme="dark"] .dr-canon-nav .links a[aria-current="page"] {
  border-bottom-color: #e88e5f;
}

/* ═══════════════════════════════════════════════════════════════════
   5. EMPTY STATES
   ═══════════════════════════════════════════════════════════════════ */
.wall-empty-state,
.comments-empty-state,
.today-empty-state {
  text-align: center;
  padding: 48px 24px;
  color: #6f6a60;
  font-size: 14px;
  font-style: italic;
}
[data-theme="dark"] .wall-empty-state,
[data-theme="dark"] .comments-empty-state,
[data-theme="dark"] .today-empty-state {
  color: #8a8070;
}

/* ═══════════════════════════════════════════════════════════════════
   6. MOBILE HERO OVERFLOW
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .hero h1,
  .section h1,
  .page-header h1 {
    font-size: clamp(24px, 7vw, 44px);
    line-height: 1.15;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .cta-primary,
  .cta-secondary,
  .buy-cta,
  .dr-buy-btn {
    white-space: normal;
    min-height: 48px;
    padding: 12px 20px;
    text-align: center;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   7. PRICING CARD HOVER STATES
   ═══════════════════════════════════════════════════════════════════ */
.tip-card,
.pricing-card,
.support-tier {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tip-card:hover,
.pricing-card:hover,
.support-tier:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(20,20,19,0.15);
}
