/* Style guide and Design System for Convertmax Attribution Audit */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  /* HSL Color System */
  --bg-main: hsl(222, 47%, 6%);
  --bg-card: hsl(222, 47%, 10%);
  --bg-card-hover: hsl(222, 47%, 14%);
  --bg-input: hsl(222, 47%, 12%);
  --border-color: hsla(215, 20%, 65%, 0.15);
  --border-color-glow: hsla(263, 90%, 55%, 0.4);

  --primary: hsl(263, 90%, 60%);
  --primary-glow: hsla(263, 90%, 60%, 0.35);
  --secondary: hsl(171, 100%, 41%);
  --secondary-glow: hsla(171, 100%, 41%, 0.25);
  
  --text-main: hsl(210, 40%, 98%);
  --text-muted: hsl(215, 20%, 72%);
  --text-dimmed: hsl(215, 12%, 50%);

  --danger: hsl(0, 84%, 58%);
  --danger-glow: hsla(0, 84%, 58%, 0.2);
  --warning: hsl(38, 92%, 50%);
  --warning-glow: hsla(38, 92%, 50%, 0.2);
  --success: hsl(142, 70%, 45%);
  --success-glow: hsla(142, 70%, 45%, 0.2);

  --font-title: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Base resets & setups */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Background Gradients */
body::before {
  content: '';
  position: absolute;
  top: -10%;
  left: -20%;
  width: 70%;
  height: 60%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
  z-index: -1;
  pointer-events: none;
}

body::after {
  content: '';
  position: absolute;
  bottom: -10%;
  right: -20%;
  width: 70%;
  height: 60%;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.12) 0%, rgba(0, 0, 0, 0) 70%);
  z-index: -1;
  pointer-events: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fff;
}

a {
  color: var(--secondary);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  filter: brightness(1.2);
}

.logo-link:hover,
.logo-link:focus-visible {
  filter: none;
}

/* Utility Layouts */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.h-12 { height: 3rem; }
.h-14 { height: 3.5rem; }
.h-5 { height: 1.25rem; }
.h-16 { height: 4rem; }
.h-6 { height: 1.5rem; }
.h-7 { height: 1.75rem; }
.w-auto { width: auto; }

@media (min-width: 1024px) {
  .lg\:h-14 { height: 3.5rem; }
  .lg\:h-16 { height: 4rem; }
  .lg\:h-20 { height: 5rem; }
  .lg\:h-6 { height: 1.5rem; }
  .lg\:h-7 { height: 1.75rem; }
  .lg\:h-9 { height: 2.25rem; }
}

.glass {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.8rem;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  position: relative;
  overflow: hidden;
  gap: 0.5rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, hsl(263, 85%, 50%) 100%);
  color: white;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--primary-glow);
  filter: brightness(1.1);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-muted);
}

/* Header / Navigation */
header {
  padding: 0;
  border-bottom: 1px solid var(--border-color);
  background: rgba(10, 15, 30, 0.8);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-header-row {
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.site-nav a {
  color: #475569;
  font-size: 0.875rem;
  font-weight: 600;
}

.site-nav a:hover {
  color: #0f172a;
}

.site-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.desktop-only {
  display: none;
}

.header-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.header-btn-primary {
  color: #0a1628;
  background: #58f5d0;
  box-shadow: 0 4px 12px -8px rgba(16, 185, 129, 0.7);
}

.header-btn-primary:hover {
  background: #4be8c3;
}

.header-btn-secondary {
  color: #334155;
  background: #ffffff;
  border: 2px solid #cbd5e1;
}

.header-btn-secondary:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.mobile-menu-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
  margin-left: auto;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.9);
  color: #0f172a;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.mobile-menu-btn:hover {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.2);
}

.mobile-menu-btn__bar {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: currentColor;
  border-radius: 99px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-menu-btn[aria-expanded='true'] .mobile-menu-btn__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn[aria-expanded='true'] .mobile-menu-btn__bar:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn[aria-expanded='true'] .mobile-menu-btn__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav-menu {
  display: none;
  background: #ffffff;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 12px 24px -16px rgba(15, 23, 42, 0.2);
}

.mobile-nav-menu.open {
  display: block;
}

.mobile-nav-menu__inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 0.85rem;
  padding-bottom: 1rem;
}

.mobile-nav-menu .header-btn {
  width: 100%;
  min-height: 2.75rem;
  font-size: 0.9375rem;
}

body:not(.convertmax-light-mode):not(.report-route) .mobile-menu-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: #f8fafc;
}

body:not(.convertmax-light-mode):not(.report-route) .mobile-nav-menu {
  background: hsl(222, 47%, 10%);
  border-top-color: var(--border-color);
}

.report-dashboard-actions {
  margin-top: 4rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (min-width: 1024px) {
  .desktop-only {
    display: flex;
  }

  .mobile-menu-btn,
  .mobile-nav-menu {
    display: none !important;
  }
}

.logo {
  display: flex;
  align-items: center;
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  gap: 0.5rem;
}

.logo span {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--secondary);
}

/* Landing Section */
.hero {
  padding: 6rem 0 4rem;
  text-align: center;
}

.hero-tag {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: rgba(13, 148, 136, 0.1);
  border: 1px solid rgba(13, 148, 136, 0.2);
  border-radius: 9999px;
  color: var(--secondary);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: 3.5rem;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  font-weight: 800;
  background: linear-gradient(to right, #ffffff, #d8b4fe, #99f6e4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 750px;
  margin: 0 auto 3rem;
}

/* Coming soon view */
#coming-soon-view {
  min-height: calc(100vh - 220px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 0;
}

.coming-soon-card {
  width: 100%;
  max-width: 820px;
  padding: 3.5rem;
  text-align: center;
  border-radius: 20px;
}

.coming-soon-badge {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border-color-glow);
  background: rgba(124, 58, 237, 0.12);
  color: var(--secondary);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.coming-soon-card h1 {
  font-size: 3rem;
  margin-bottom: 1.25rem;
  line-height: 1.15;
}

.coming-soon-card p {
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto;
  font-size: 1.1rem;
}

/* Convertmax-like clean theme for public coming-soon mode */
body.coming-soon-mode {
  background: #f8fafc;
  color: #0f172a;
}

body.coming-soon-mode::before,
body.coming-soon-mode::after {
  display: none;
}

body.coming-soon-mode header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(8px);
}

body.coming-soon-mode .logo-link {
  color: #0f172a;
}

body.coming-soon-mode .coming-soon-card {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 24px 60px -30px rgba(2, 6, 23, 0.25);
}

body.coming-soon-mode .coming-soon-badge {
  border-color: rgba(15, 23, 42, 0.15);
  background: rgba(15, 23, 42, 0.04);
  color: #0f172a;
}

body.coming-soon-mode .coming-soon-card h1 {
  color: #0f172a;
  background: none;
  -webkit-text-fill-color: #0f172a;
}

body.coming-soon-mode .coming-soon-card p {
  color: #334155;
}

body.report-route #landing-view,
body.report-route #form-modal,
body.report-route #coming-soon-view {
  display: none !important;
}

body.report-route #report-view.active {
  display: block;
}

/* Report pages use the light theme even without convertmax-light-mode on body */
body.report-route {
  background: #f8fafc;
  color: #0f172a;
}

body.report-route::before,
body.report-route::after {
  display: none;
}

body.report-route header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(8px);
}

/* Report route: light tokens + components (shared /report/* pages) */
body.report-route {
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --border-color: rgba(15, 23, 42, 0.12);
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dimmed: #64748b;
  --primary: hsl(210, 88%, 42%);
  --secondary: hsl(197, 79%, 46%);
}

body.report-route .glass {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 18px 45px -30px rgba(2, 6, 23, 0.12);
}

body.report-route h1,
body.report-route h2,
body.report-route h3,
body.report-route h4 {
  color: #0f172a;
}

body.report-route .gauge-bg {
  stroke: rgba(15, 23, 42, 0.08);
}

body.report-route .gauge-number {
  color: #0f172a;
}

body.report-route .spend-leakage-card {
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.06) 0%, rgba(8, 145, 178, 0.04) 100%);
  border-color: rgba(15, 23, 42, 0.1);
}

body.report-route .slider-container label span.value {
  color: #0f172a;
}

body.report-route input[type="range"] {
  background: rgba(15, 23, 42, 0.1);
}

body.report-route .leakage-display {
  background: #fef2f2;
  border: 1px solid rgba(220, 38, 38, 0.18);
}

body.report-route .leakage-val {
  color: hsl(0, 72%, 42%);
}

body.report-route .leakage-label {
  color: #64748b;
}

body.report-route .cat-bar-outer {
  background: rgba(15, 23, 42, 0.08);
}

body.report-route .cat-critique {
  background: #f8fafc;
  border-left-color: var(--primary);
}

body.report-route .booking-section {
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.08) 0%, rgba(8, 145, 178, 0.05) 100%);
  border: 1px solid rgba(29, 78, 216, 0.2);
}

/* Light Convertmax theme for full app (including ?test) */
body.convertmax-light-mode {
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-input: #ffffff;
  --border-color: rgba(15, 23, 42, 0.12);
  --border-color-glow: rgba(14, 116, 204, 0.35);
  --primary: hsl(210, 88%, 42%);
  --primary-glow: hsla(210, 88%, 42%, 0.25);
  --secondary: hsl(197, 79%, 46%);
  --secondary-glow: hsla(197, 79%, 46%, 0.2);
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dimmed: #64748b;
}

body.convertmax-light-mode::before,
body.convertmax-light-mode::after {
  display: none;
}

body.convertmax-light-mode header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(8px);
}

body.convertmax-light-mode .glass {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 18px 45px -30px rgba(2, 6, 23, 0.25);
}

body.convertmax-light-mode h1,
body.convertmax-light-mode h2,
body.convertmax-light-mode h3,
body.convertmax-light-mode h4,
body.convertmax-light-mode h5,
body.convertmax-light-mode h6 {
  color: #0f172a;
}

body.convertmax-light-mode .hero h1 {
  background: linear-gradient(to right, #0f172a, #1d4ed8, #0891b2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.convertmax-light-mode .hero-tag {
  background: rgba(8, 145, 178, 0.1);
  border-color: rgba(8, 145, 178, 0.2);
  color: #0369a1;
}

body.convertmax-light-mode .lead-box input {
  color: #0f172a;
}

body.convertmax-light-mode .lead-box input::placeholder {
  color: #64748b;
}

body.convertmax-light-mode .form-input,
body.convertmax-light-mode select,
body.convertmax-light-mode .option-card {
  color: #0f172a;
}

body.convertmax-light-mode .option-card span,
body.convertmax-light-mode .option-card strong {
  color: #0f172a !important;
}

body.convertmax-light-mode .booking-section {
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.08) 0%, rgba(8, 145, 178, 0.05) 100%);
  border: 1px solid rgba(29, 78, 216, 0.2);
}

body.convertmax-light-mode .modal-overlay {
  background: rgba(15, 23, 42, 0.45);
}

body.convertmax-light-mode .modal-content {
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.2);
}

body.convertmax-light-mode .modal-close {
  color: #64748b;
}

body.convertmax-light-mode .modal-close:hover {
  color: #0f172a;
}

body.convertmax-light-mode .modal-footer {
  background: #f8fafc;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

body.convertmax-light-mode .progress-bar-container {
  background: rgba(15, 23, 42, 0.06);
}

body.convertmax-light-mode .form-input,
body.convertmax-light-mode select {
  color: #0f172a;
  background-color: #ffffff;
}

body.convertmax-light-mode .option-card:hover {
  background: #f8fafc;
}

body.convertmax-light-mode .option-card.selected {
  background: rgba(8, 145, 178, 0.08);
  border-color: rgba(8, 145, 178, 0.45);
}

body.convertmax-light-mode .walkthrough-option-title {
  color: #0f172a;
}

.walkthrough-option-title {
  display: block;
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 0.15rem;
}

/* Lead input box */
.lead-box {
  max-width: 650px;
  margin: 0 auto 4rem;
  padding: 0.5rem;
  display: flex;
  border-radius: 12px;
}

form.lead-box {
  width: 100%;
  border: none;
  flex-direction: column;
  align-items: stretch;
}

.lead-box-row {
  display: flex;
  width: 100%;
  align-items: stretch;
}

.turnstile-wrap {
  display: none;
  justify-content: center;
  align-items: center;
  padding: 0.75rem 1rem 0.25rem;
  min-height: 0;
  width: 100%;
  overflow: visible;
}

.turnstile-wrap.turnstile-visible {
  display: flex;
  min-height: 72px;
}

.turnstile-wrap iframe {
  max-width: 100%;
}

.turnstile-wrap-modal {
  padding: 0;
}

.lead-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 1.1rem;
  padding: 0 1.5rem;
}

.lead-box input::placeholder {
  color: var(--text-dimmed);
}

/* Value Props Grid */
.props-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 6rem;
}

.prop-card {
  padding: 2rem 1.5rem;
  text-align: left;
}

.prop-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.prop-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-color-glow);
  box-shadow: 0 12px 40px -15px var(--primary-glow);
}

.prop-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.prop-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Form Dialog Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(10px);
  z-index: 100;
  display: none; /* Controlled dynamically */
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 1.5rem;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  width: 100%;
  max-width: 680px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 3rem);
}

.modal-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  font-size: 1.4rem;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-dimmed);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: var(--text-main);
}

.progress-bar-container {
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  width: 100%;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  width: 25%;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  transition: width 0.3s ease;
}

.modal-body {
  padding: 2rem;
  overflow-y: auto;
  flex: 1;
}

.form-step {
  display: none;
}

.form-step.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group > label {
  display: block;
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.6rem;
  color: var(--text-main);
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.form-input, select {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-main);
  padding: 0.8rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.form-message {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  line-height: 1.45;
  margin-bottom: 1rem;
}

.form-message[hidden] {
  display: none !important;
}

.form-message-error {
  color: #991b1b;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.form-message-error::before {
  content: '!';
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.05rem;
}

#landing-form-error {
  max-width: 650px;
  margin: -2.5rem auto 3rem;
}

.lead-box.input-invalid-wrap {
  border-color: rgba(239, 68, 68, 0.55);
  box-shadow: 0 0 0 2px var(--danger-glow);
}

.form-input.input-invalid,
select.input-invalid,
.lead-box.input-invalid-wrap input {
  border-color: rgba(239, 68, 68, 0.65);
  box-shadow: 0 0 0 2px var(--danger-glow);
}

.page-form-error {
  margin-top: 1.5rem;
  margin-bottom: 0;
}

body.convertmax-light-mode .form-message-error {
  color: #b91c1c;
  background: #fef2f2;
  border-color: #fecaca;
}

/* Custom Grid of Options */
.options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.option-card {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  padding: 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.option-card input[type="radio"],
.option-card input[type="checkbox"] {
  accent-color: var(--secondary);
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
  margin: 0;
}

.option-card span {
  flex: 1;
  line-height: 1.35;
  min-width: 0;
  overflow-wrap: anywhere;
}

.option-card > div {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.option-card:hover {
  border-color: var(--border-color-glow);
  background: rgba(255,255,255,0.02);
}

.option-card.selected {
  border-color: var(--secondary);
  background: rgba(13, 148, 136, 0.08);
}

.options-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}

.modal-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  background: var(--bg-card-hover);
}

.modal-footer-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

/* Diagnostic Report Dashboard */
.report-container {
  display: none; /* Controlled dynamically */
  padding: 4rem 0 6rem;
  animation: fadeIn 0.6s ease;
}

.report-container.active {
  display: block;
}

.report-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 2rem;
}

.report-share-bar {
  margin-bottom: 2rem;
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
}

.report-share-bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.share-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  flex: 1;
  min-width: 260px;
  max-width: 520px;
}

.report-email-notice {
  flex-basis: 100%;
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: var(--text-dimmed, #64748b);
}

.share-link-row .form-input {
  flex: 1;
  min-width: 180px;
  font-size: 0.85rem;
}

body.mobile-nav-open {
  overflow: hidden;
}

@media (max-width: 767px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero {
    padding-top: 2rem;
  }

  .hero h1 {
    font-size: clamp(1.75rem, 8vw, 2.5rem);
  }

  .lead-box {
    padding: 0.65rem;
  }

  .lead-box-row {
    flex-direction: column;
    gap: 0.65rem;
  }

  .lead-box-row .btn {
    width: 100%;
    min-height: 2.75rem;
  }

  .lead-box input {
    width: 100%;
    min-height: 2.75rem;
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }

  .props-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 3rem;
  }

  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .modal-content {
    width: 100%;
    max-width: 100%;
    max-height: calc(100dvh - 0.5rem);
    margin: 0;
    border-radius: 16px 16px 0 0;
  }

  .modal-footer {
    padding: 1rem;
  }

  .modal-footer-actions {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 0.65rem;
  }

  .modal-footer-actions .btn {
    width: 100%;
    min-height: 2.75rem;
  }

  .options-list,
  .options-grid {
    grid-template-columns: 1fr;
  }

  .option-card {
    align-items: flex-start;
  }

  .modal-header,
  .modal-body {
    padding: 1rem 1.25rem;
  }

  .modal-audit-hud,
  .modal-leakage-teaser {
    margin-left: 1rem;
    margin-right: 1rem;
  }

  .modal-audit-hud {
    flex-direction: column;
    align-items: stretch;
  }

  .report-container {
    padding: 2rem 0 4rem;
  }

  .report-header-flex {
    flex-direction: column;
    gap: 1rem;
  }

  .report-meta h2 {
    font-size: 1.5rem;
  }

  .report-meta-detail {
    font-size: 0.9rem;
    line-height: 1.55;
  }

  .badge-risk {
    align-self: flex-start;
    font-size: 0.8rem;
    padding: 0.35rem 0.9rem;
  }

  .executive-brief,
  .score-widget-card,
  .categories-card,
  .compare-card,
  .checklist-box,
  .site-scan-card,
  .spend-leakage-card {
    padding: 1.25rem;
  }

  .executive-brief-title {
    font-size: 1.25rem;
  }

  .category-info {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.35rem 0.75rem;
  }

  .cat-title {
    flex: 1 1 12rem;
    min-width: 0;
  }

  .cat-score {
    flex-shrink: 0;
    white-space: nowrap;
  }

  .checklist-group-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .slider-container label {
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
  }

  .leakage-val {
    font-size: clamp(1.5rem, 7vw, 2.2rem);
    overflow-wrap: anywhere;
  }

  .compare-card h4 {
    flex-wrap: wrap;
  }

  .booking-section {
    padding: 2rem 1.25rem;
  }

  .booking-form.glass {
    padding: 1.25rem !important;
  }

  .share-link-row {
    min-width: 0;
    width: 100%;
  }

  .share-link-row .form-input {
    min-width: 0;
    width: 100%;
    flex: 1 1 100%;
  }

  .report-actions-row {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    width: 100%;
  }

  .report-actions-row .btn {
    width: 100%;
    min-height: 2.75rem;
  }

  .booking-form .btn {
    width: 100%;
    min-height: 2.75rem;
  }

  #expand-full-report-btn {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .report-share-bar-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .share-link-row {
    max-width: none;
  }

  .share-link-row .btn {
    width: 100%;
  }
}

.report-meta h2 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.report-meta-detail {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
  color: var(--text-muted);
}

.report-meta-line {
  min-width: 0;
}

#report-url-display {
  color: var(--secondary);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.report-meta-sep {
  color: var(--text-dimmed);
  user-select: none;
}

@media (max-width: 479px) {
  .report-meta-detail {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .report-meta-sep {
    display: none;
  }
}

.badge-risk {
  display: inline-block;
  padding: 0.4rem 1.2rem;
  border-radius: 9999px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
}

.badge-risk.high {
  background: var(--danger-glow);
  border: 1px solid var(--danger);
  color: var(--danger);
}

.badge-risk.medium {
  background: var(--warning-glow);
  border: 1px solid var(--warning);
  color: var(--warning);
}

.badge-risk.low {
  background: var(--success-glow);
  border: 1px solid var(--success);
  color: var(--success);
}

.dashboard-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  margin-bottom: 3rem;
  min-width: 0;
}

.dashboard-layout > * {
  min-width: 0;
}

@media (max-width: 850px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
}

/* Left score widget */
.score-widget-card {
  padding: 2.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gauge-holder {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 1.5rem 0;
}

/* Circular Gauge styling using SVG */
.gauge-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.gauge-bg {
  fill: none;
  stroke: rgba(255,255,255,0.05);
  stroke-width: 12;
}

.gauge-fill {
  fill: none;
  stroke: var(--secondary);
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 565; /* 2 * PI * r (r=90) */
  stroke-dashoffset: 565;
  transition: stroke-dashoffset 1.5s cubic-bezier(0.16, 1, 0.3, 1), stroke 1.5s ease;
}

.gauge-number {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-title);
  font-size: 3rem;
  font-weight: 800;
  color: white;
}

.gauge-score-label {
  font-size: 0.95rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* Interactive Spend Leakage Estimator */
.spend-leakage-card {
  margin-top: 2rem;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, rgba(13, 148, 136, 0.03) 100%);
  border: 1px solid var(--border-color);
}

.leakage-calculator {
  margin-top: 1.5rem;
}

.slider-container {
  margin-bottom: 1.5rem;
}

.slider-container label {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-title);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

.slider-container label span.value {
  color: white;
  font-weight: bold;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--secondary);
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 9999px;
  outline: none;
}

.leakage-display {
  background: rgba(2, 6, 23, 0.4);
  border: 1px dashed var(--border-color);
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
}

.leakage-val {
  font-family: var(--font-title);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--danger);
  margin-bottom: 0.25rem;
}

.leakage-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Category Grid Right Side */
.categories-card {
  padding: 2.5rem;
}

.categories-card h3 {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
}

.category-row {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px dashed var(--border-color);
}

.category-row:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.category-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.cat-title {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 1.1rem;
}

.cat-score {
  font-family: var(--font-title);
  font-weight: 700;
  color: var(--secondary);
}

.cat-bar-outer {
  height: 8px;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.cat-bar-inner {
  height: 100%;
  width: 0;
  border-radius: 4px;
  background: var(--secondary);
  transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.cat-bar-inner.danger { background-color: var(--danger); }
.cat-bar-inner.warning { background-color: var(--warning); }
.cat-bar-inner.success { background-color: var(--success); }

.cat-critique {
  font-size: 0.9rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.01);
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--primary);
  border-radius: 0 6px 6px 0;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

/* Live site scan */
.site-scan-section {
  margin: 2.5rem 0 1rem;
}

.site-scan-section h3 {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

.site-scan-intro {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.site-scan-card {
  padding: 1.5rem 1.75rem;
}

.site-scan-detected-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.site-scan-tag {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.03);
}

body.convertmax-light-mode .site-scan-tag {
  background: rgba(15, 23, 42, 0.03);
}

.site-scan-tag--detected {
  border-color: hsla(142, 70%, 45%, 0.35);
}

.site-scan-tag--missing {
  border-color: hsla(38, 92%, 50%, 0.35);
  opacity: 0.9;
}

.site-scan-tag-status {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--success);
}

.site-scan-tag--missing .site-scan-tag-status {
  color: var(--warning);
}

.site-scan-tag-name {
  font-weight: 600;
  color: var(--text-main);
}

.site-scan-tag-evidence {
  font-size: 0.8rem;
  color: var(--text-dimmed);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  word-break: break-all;
  flex: 1 1 100%;
}

.site-scan-tag-category {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: capitalize;
}

.site-scan-notes {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: hsla(38, 92%, 50%, 0.08);
  border: 1px solid hsla(38, 92%, 50%, 0.2);
}

.site-scan-error {
  color: var(--warning);
  font-size: 0.9rem;
}

.site-scan-details {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.site-scan-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--secondary);
}

.site-scan-hosts-list {
  margin-top: 0.75rem;
  padding-left: 1.25rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
  color: var(--text-dimmed);
}

/* Compare Attribution section */
.compare-section {
  margin-top: 3rem;
}

.compare-section h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .compare-grid {
    grid-template-columns: 1fr;
  }
}

.compare-card {
  padding: 2rem;
}

.compare-card h4 {
  font-size: 1.15rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.compare-card.current h4 { color: var(--danger); }
.compare-card.multitouch h4 { color: var(--secondary); }

.compare-card ul {
  padding-left: 1.2rem;
}

.compare-card li {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

/* 30-Day Checklist Section */
.checklist-section {
  margin-top: 3rem;
}

.checklist-section h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.checklist-desc {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.checklist-box {
  padding: 2rem;
}

.checklist-group {
  margin-bottom: 2rem;
}

.checklist-group:last-child {
  margin-bottom: 0;
}

.checklist-group-title {
  font-family: var(--font-title);
  color: var(--text-main);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.4rem;
  display: flex;
  justify-content: space-between;
}

.checklist-group-title span.days {
  color: var(--secondary);
  font-size: 0.9rem;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.8rem;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 6px;
  transition: background 0.2s;
}

.check-item:hover {
  background: rgba(255,255,255,0.02);
}

.check-item input[type="checkbox"] {
  accent-color: var(--secondary);
  width: 18px;
  height: 18px;
  margin-top: 0.2rem;
}

.check-item-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: all 0.2s;
}

.check-item input[type="checkbox"]:checked + .check-item-text {
  text-decoration: line-through;
  color: var(--text-dimmed);
}

/* Scheduler / Booking Form Section */
.booking-section {
  margin-top: 3rem;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, rgba(13, 148, 136, 0.05) 100%);
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: 16px;
  text-align: center;
}

.booking-section h3 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.booking-section p {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.booking-form {
  max-width: 500px;
  margin: 0 auto;
  text-align: left;
}

/* Print-only report chrome (hidden on screen) */
.print-only {
  display: none;
}

.report-print-brand img {
  height: 1.65rem;
  width: auto;
  max-width: 220px;
}

.report-print-domain {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: #64748b;
  letter-spacing: 0.02em;
}

.report-print-cta {
  margin-top: 2rem;
  padding: 1.5rem;
  border: 2px solid #c7d2fe;
  border-radius: 12px;
  background: #f8fafc;
}

.report-print-cta h3 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  color: #1e1b4b;
}

.report-print-cta p {
  margin: 0 0 0.65rem;
  color: #334155;
  font-size: 0.95rem;
}

.report-print-cta-urls {
  font-size: 1.05rem;
  color: #0f172a;
}

.report-print-cta-booking {
  font-size: 0.9rem;
  color: #475569;
  word-break: break-all;
}

/* Keyframes animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* PRINT MEDIA STYLES - formatted multi-page PDF */
@media print {
  @page {
    margin: 0.75in;
    size: letter;
  }

  body,
  body.report-route {
    background-color: white !important;
    color: #0f172a !important;
    font-size: 11pt !important;
    line-height: 1.5 !important;
  }

  body::before,
  body::after,
  header,
  footer,
  .mobile-menu-btn,
  .mobile-nav-menu,
  .btn,
  .lead-box,
  .props-grid,
  .modal-overlay,
  .spend-leakage-card,
  .booking-section,
  .checklist-desc,
  .report-actions-row,
  .report-dashboard-actions,
  .report-share-bar,
  #booking-success-message,
  input[type="range"] {
    display: none !important;
  }

  .print-only,
  .report-print-brand,
  .report-print-cta {
    display: block !important;
  }

  .report-print-brand {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 1.25rem !important;
    padding-bottom: 0.75rem !important;
    border-bottom: 2px solid #e2e8f0 !important;
    page-break-after: avoid;
  }

  .report-print-cta {
    margin-top: 1.5rem !important;
    padding: 1.25rem !important;
    border: 2px solid #6366f1 !important;
    border-radius: 8px !important;
    background: #f8fafc !important;
    page-break-inside: avoid;
  }

  .report-print-cta h3 {
    color: #1e1b4b !important;
    font-size: 14pt !important;
  }

  .report-print-cta p,
  .report-print-cta-booking {
    color: #334155 !important;
    font-size: 11pt !important;
  }

  .report-print-cta-urls {
    font-size: 12pt !important;
    color: #0f172a !important;
  }

  .report-print-domain {
    color: #475569 !important;
    font-size: 10pt !important;
  }

  #report-view,
  .report-container,
  body.report-route #report-view.active {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  #site-scan-section:not([style*="display: none"]) {
    display: block !important;
    page-break-before: always;
  }

  .site-scan-details summary {
    display: none !important;
  }

  .site-scan-details > *:not(summary) {
    display: block !important;
  }

  .glass {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* Force page breaks to structure exactly 4 pages */
  
  /* PAGE 1: Executive Scorecard Cover */
  .report-header-flex {
    margin-bottom: 2rem !important;
  }

  .report-meta h2 {
    color: #1e1b4b !important;
    font-size: 28pt !important;
  }

  .report-meta-detail {
    color: #475569 !important;
    font-size: 12pt !important;
  }

  .badge-risk {
    border: 2px solid black !important;
    background: transparent !important;
    color: black !important;
  }

  .dashboard-layout {
    grid-template-columns: 1fr !important;
    gap: 1.5in !important;
  }

  .score-widget-card {
    border: 1px solid #cbd5e1 !important;
    padding: 2rem !important;
    margin-bottom: 1in !important;
    page-break-after: always; /* Force Page 2 after executive score */
  }

  .gauge-bg {
    stroke: #e2e8f0 !important;
  }

  .gauge-fill {
    stroke: #0284c7 !important;
  }

  .gauge-number {
    color: black !important;
    font-size: 32pt !important;
  }

  .gauge-score-label {
    color: #475569 !important;
  }

  /* PAGE 2: Scored Gaps and Critiques */
  .categories-card {
    border: 1px solid #cbd5e1 !important;
    padding: 1.5rem !important;
    margin: 0 !important;
    page-break-after: always; /* Force Page 3 after Gaps list */
  }

  .categories-card h3 {
    color: #1e1b4b !important;
    border-bottom: 2px solid #e2e8f0 !important;
  }

  .cat-title {
    color: #1e293b !important;
  }

  .cat-score {
    color: #0284c7 !important;
  }

  .cat-bar-outer {
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
  }

  .cat-bar-inner {
    background-color: #0284c7 !important;
  }

  .cat-critique {
    color: #334155 !important;
    background: #f8fafc !important;
    border-left: 3px solid #6366f1 !important;
  }

  /* PAGE 3: Model Fit & Industry Risks */
  .compare-section {
    page-break-after: always; /* Force Page 4 after compares */
  }

  .compare-section h3 {
    color: #1e1b4b !important;
    border-bottom: 2px solid #cbd5e1 !important;
    padding-bottom: 0.5rem !important;
  }

  .compare-card {
    border: 1px solid #cbd5e1 !important;
    padding: 1.5rem !important;
    background: transparent !important;
  }

  .compare-card h4 {
    color: black !important;
    font-weight: 700 !important;
  }

  .compare-card li {
    color: #334155 !important;
  }

  /* PAGE 4: 30-Day Fix Action Plan */
  .checklist-section h3 {
    color: #1e1b4b !important;
    border-bottom: 2px solid #cbd5e1 !important;
    padding-bottom: 0.5rem !important;
  }

  .checklist-box {
    border: 1px solid #cbd5e1 !important;
    padding: 1.5rem !important;
  }

  .checklist-group-title {
    color: #1e293b !important;
    border-bottom: 1px solid #cbd5e1 !important;
  }

  .checklist-group-title span.days {
    color: #6366f1 !important;
  }

  .check-item {
    display: flex !important;
    align-items: flex-start !important;
    gap: 0.35rem !important;
    margin-bottom: 0.5rem !important;
    border-bottom: 1px dashed #f1f5f9 !important;
    page-break-inside: avoid;
  }

  /* PDF engines often drop form controls — draw boxes with ::before */
  .check-item input[type="checkbox"] {
    display: none !important;
  }

  .check-item::before {
    content: '☐' !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
    width: 1em !important;
    font-size: 12pt !important;
    line-height: 1.2 !important;
    color: #0f172a !important;
  }

  .check-item:has(input:checked)::before {
    content: '☑' !important;
  }

  .check-item-text {
    color: #334155 !important;
    flex: 1 !important;
  }
}

/* --- Audit UX enhancements --- */
.modal-audit-hud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 1.5rem 1rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  align-items: center;
  justify-content: space-between;
}

.modal-scan-panel {
  flex: 1;
  min-width: 12rem;
}

.modal-scan-label,
.modal-live-score-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dimmed);
  margin-bottom: 0.25rem;
}

.modal-scan-status {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.modal-live-score-ring {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--secondary);
}

.modal-leakage-teaser {
  margin: 0 1.5rem 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border-left: 3px solid var(--warning);
}

.modal-leakage-teaser p {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.scan-preview-card {
  padding: 1.25rem;
  border-radius: 12px;
}

.scan-preview-loading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.scan-spinner {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--border-color);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: scan-spin 0.8s linear infinite;
}

@keyframes scan-spin {
  to { transform: rotate(360deg); }
}

.scan-preview-findings {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tools-scan-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}

.option-card.scan-confirmed {
  border-color: var(--success);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--success) 35%, transparent);
}

.option-card.scan-missing {
  border-color: var(--warning);
}

.executive-brief {
  padding: 2rem;
  border-radius: 16px;
  margin-bottom: 2rem;
}

.executive-brief-title {
  margin: 0 0 1rem;
  font-size: 1.5rem;
}

.executive-brief-list {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.executive-brief-list strong {
  color: var(--text-main);
}

.executive-ai-summary {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0 0 1.25rem;
  white-space: pre-wrap;
}

.scan-findings-headline {
  margin-bottom: 2rem;
}

.scan-findings-headline-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.scan-finding-item {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-start;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: var(--glass-bg, rgba(255,255,255,0.04));
  border: 1px solid var(--border-color);
}

.scan-finding-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  flex-shrink: 0;
}

.scan-finding-badge--confirmed { background: color-mix(in srgb, var(--success) 20%, transparent); color: var(--success); }
.scan-finding-badge--missing { background: color-mix(in srgb, var(--danger) 20%, transparent); color: var(--danger); }
.scan-finding-badge--unexpected { background: color-mix(in srgb, var(--warning) 20%, transparent); color: var(--warning); }
.scan-finding-badge--warning { background: color-mix(in srgb, var(--warning) 20%, transparent); color: var(--warning); }

.scan-finding-body {
  flex: 1;
  min-width: 10rem;
}

.scan-finding-body strong {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 0.15rem;
}

.scan-finding-body span {
  font-size: 0.82rem;
  color: var(--text-dimmed);
}

.fix-priority-section {
  margin: 2.5rem 0;
}

.fix-priority-list {
  margin: 1rem 0 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.fix-priority-list li {
  line-height: 1.5;
  color: var(--text-muted);
}

.fix-priority-list strong {
  color: var(--text-main);
}

.fix-impact {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--secondary);
  margin-left: 0.35rem;
}

.what-if-card {
  padding: 1rem;
  border-radius: 12px;
}

.what-if-toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.88rem;
  cursor: pointer;
}

.what-if-projection {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.what-if-projection strong {
  color: var(--secondary);
}

body.convertmax-light-mode .modal-audit-hud,
body.convertmax-light-mode .modal-leakage-teaser,
body.convertmax-light-mode .scan-preview-card {
  background: rgba(255, 255, 255, 0.85);
}
