/* ============================================
   PaintLaunch AI Ad Analyzer — Styles
   Dark theme, Inter font, brand tokens
   ============================================ */

/* --- CSS Custom Properties (Brand Tokens) --- */
:root {
  --background: 222 47% 7%;
  --foreground: 213 31% 91%;
  --card: 217 33% 10%;
  --card-foreground: 213 31% 91%;
  --muted: 217 33% 15%;
  --muted-foreground: 215 20% 65%;
  --border: 217 33% 17%;
  --primary: 217 91% 60%;
  --primary-foreground: 0 0% 100%;
  --secondary: 217 33% 15%;
  --secondary-foreground: 213 31% 91%;
  --accent: 217 33% 18%;
  --accent-foreground: 213 31% 91%;
  --destructive: 0 84% 60%;
  --destructive-foreground: 0 0% 100%;
  --success: 142 71% 45%;
  --warning: 45 93% 47%;
  --info: 239 84% 67%;
  --radius: 0.75rem;
  --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);

  /* Batch B — spacing scale (8px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  /* Batch B — shadow scale */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 32px hsla(var(--primary), 0.22);
  --shadow-glow-strong: 0 0 48px hsla(var(--primary), 0.35);

  /* Batch B — z-index scale */
  --z-header: 10;
  --z-modal-backdrop: 90;
  --z-modal: 100;

  /* Batch B — content max-widths */
  --container-xl: 1120px;
  --container-lg: 960px;
  --container-md: 720px;

  /* Batch B — timing */
  --dur-fast: 150ms;
  --dur-base: 250ms;
  --dur-slow: 400ms;

  /* Batch B — report interpretation band accents */
  --band-low: 0 84% 60%;
  --band-mid: 38 92% 55%;
  --band-high: 142 71% 45%;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  line-height: 1.6;
  min-height: 100vh;
}

/* --- Layout --- */
.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

/* --- Header --- */
.header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid hsl(var(--border));
}

.header-logo {
  display: flex;
  align-items: center;
}

.logo-icon {
  height: 28px;
  width: auto;
}

/* --- Footer --- */
.footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid hsl(var(--border));
  text-align: center;
}

.footer-text {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  letter-spacing: 0.025em;
}

.footer-legal {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  margin-top: 0.5rem;
  letter-spacing: 0.025em;
}

.footer-legal a {
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  transition: color 0.2s var(--ease-premium);
}

.footer-legal a:hover {
  color: hsl(var(--foreground));
  text-decoration: underline;
}

.footer-legal-sep {
  display: inline-block;
  margin: 0 0.5rem;
  opacity: 0.6;
}

/* --- State Management --- */
.state {
  display: none;
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
}

.state.active {
  display: block;
  animation: fadeInUp 0.4s var(--ease-premium) both;
}

/* --- Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 hsla(var(--primary), 0.3); }
  50% { box-shadow: 0 0 0 8px hsla(var(--primary), 0); }
}

/* --- Form Container --- */
.form-container {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 2rem;
}

.form-header {
  margin-bottom: 2rem;
  text-align: center;
}

.form-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.form-subtitle {
  font-size: 0.9375rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.5;
  max-width: 420px;
  margin: 0 auto;
}

/* --- Form Elements --- */
.form-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 500px) {
  .form-row-2col {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: hsl(var(--foreground));
  letter-spacing: 0.01em;
}

.label-optional {
  color: hsl(var(--muted-foreground));
  font-weight: 400;
}

.form-input {
  width: 100%;
  padding: 0.6875rem 0.875rem;
  background: hsl(var(--muted));
  border: 1px solid hsl(var(--border));
  border-radius: 0.5rem;
  color: hsl(var(--foreground));
  font-family: inherit;
  font-size: 0.9375rem;
  line-height: 1.5;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.form-input::placeholder {
  color: hsl(var(--muted-foreground));
  opacity: 0.7;
}

.form-input:focus {
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 3px hsla(var(--primary), 0.15);
}

.form-input.input-error {
  border-color: hsl(var(--destructive));
  box-shadow: 0 0 0 3px hsla(var(--destructive), 0.1);
}

.form-error {
  font-size: 0.75rem;
  color: hsl(var(--destructive));
  min-height: 0;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.form-error.visible {
  opacity: 1;
}

/* --- Select --- */
.select-wrapper {
  position: relative;
}

.form-select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 2.5rem;
}

.select-chevron {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.125rem;
  height: 1.125rem;
  color: hsl(var(--muted-foreground));
  pointer-events: none;
}

/* --- Radio Buttons --- */
.radio-group {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.25rem;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
}

.radio-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-custom {
  width: 1.125rem;
  height: 1.125rem;
  border: 2px solid hsl(var(--border));
  border-radius: 50%;
  position: relative;
  transition: border-color 0.2s ease;
  flex-shrink: 0;
}

.radio-custom::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: hsl(var(--primary));
  transition: transform 0.2s var(--ease-premium);
}

.radio-input:checked + .radio-custom {
  border-color: hsl(var(--primary));
}

.radio-input:checked + .radio-custom::after {
  transform: translate(-50%, -50%) scale(1);
}

.radio-input:focus-visible + .radio-custom {
  box-shadow: 0 0 0 3px hsla(var(--primary), 0.15);
}

.radio-text {
  font-size: 0.9375rem;
  color: hsl(var(--foreground));
}

/* --- Buttons --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border: none;
  border-radius: 0.5rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  outline: none;
}

.btn-primary:hover {
  background: hsl(217 91% 55%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px hsla(var(--primary), 0.3);
}

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

.btn-primary:focus-visible {
  box-shadow: 0 0 0 3px hsla(var(--primary), 0.3);
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-large {
  width: 100%;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
}

.btn-text {
  white-space: nowrap;
}

.btn-arrow {
  width: 1.125rem;
  height: 1.125rem;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.btn-primary:hover .btn-arrow {
  transform: translateX(3px);
}

/* Loading state on submit button */
.btn-primary.loading .btn-text {
  opacity: 0;
}

.btn-primary.loading .btn-arrow {
  display: none;
}

.btn-primary.loading {
  position: relative;
  pointer-events: none;
}

.btn-primary.loading::after {
  content: '';
  position: absolute;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid hsla(var(--primary-foreground), 0.3);
  border-top-color: hsl(var(--primary-foreground));
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* --- Link Buttons --- */
.link-btn {
  background: none;
  border: none;
  color: hsl(var(--muted-foreground));
  font-family: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.2s ease;
  text-decoration: none;
}

.link-btn:hover {
  color: hsl(var(--foreground));
}

.link-btn:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- Form Footer --- */
.form-footer {
  text-align: center;
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  margin-top: 1rem;
}

/* ============================================
   STATE 2: Searching
   ============================================ */
.searching-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
}

.searching-text {
  font-size: 1rem;
  color: hsl(var(--muted-foreground));
  margin-top: 1.5rem;
}

/* --- Spinner --- */
.spinner {
  width: 2.5rem;
  height: 2.5rem;
  border: 3px solid hsl(var(--border));
  border-top-color: hsl(var(--primary));
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-large {
  width: 3.5rem;
  height: 3.5rem;
  border-width: 4px;
}

/* ============================================
   STATE 2: Page Confirmation
   ============================================ */
.pages-container {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 2rem;
}

.pages-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.pages-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  letter-spacing: -0.02em;
  margin-bottom: 0.375rem;
}

.pages-subtitle {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

/* --- Page Cards Grid --- */
.pages-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.page-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1rem;
  background: hsl(var(--muted));
  border: 2px solid hsl(var(--border));
  border-radius: 0.625rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
}

.page-card:hover {
  border-color: hsla(var(--primary), 0.3);
  background: hsl(var(--accent));
}

.page-card.selected {
  border-color: hsl(var(--primary));
  background: hsla(var(--primary), 0.08);
  box-shadow: 0 0 0 1px hsl(var(--primary));
}

.page-card-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  object-fit: cover;
  flex-shrink: 0;
  background: hsl(var(--border));
}

.page-card-info {
  flex: 1;
  min-width: 0;
}

.page-card-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  margin-top: 0.125rem;
}

.page-card-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: hsl(var(--muted-foreground));
  opacity: 0.5;
  flex-shrink: 0;
}

.page-card-check {
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 50%;
  border: 2px solid hsl(var(--border));
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.page-card.selected .page-card-check {
  border-color: hsl(var(--primary));
  background: hsl(var(--primary));
}

.page-card-check svg {
  width: 0.75rem;
  height: 0.75rem;
  color: hsl(var(--primary-foreground));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.page-card.selected .page-card-check svg {
  opacity: 1;
}

/* --- No Results --- */
.no-results {
  text-align: center;
  padding: 1.5rem 1rem;
}

.no-results-text {
  font-size: 0.9375rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 0.5rem;
}

/* --- Fallback Links --- */
.pages-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.fallback-divider {
  color: hsl(var(--border));
  font-size: 0.8125rem;
}

/* --- Manual URL Section --- */
.manual-url-section {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid hsl(var(--border));
  animation: fadeIn 0.3s var(--ease-premium);
}

.manual-url-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.375rem;
}

.manual-url-row .form-input {
  flex: 1;
}

.manual-url-row .btn-primary {
  white-space: nowrap;
  flex-shrink: 0;
}

.hidden {
  display: none !important;
}

/* ============================================
   STATE 3: Loading Theater
   ============================================ */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}

.loading-theater {
  width: 100%;
  max-width: 480px;
}

.loading-theater-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2.5rem;
}

.loading-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  letter-spacing: -0.02em;
  margin-top: 0;
}

.loading-subtitle {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  margin-top: 0.375rem;
}

/* Pulse ring animation */
.loading-pulse-ring {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 3px solid hsl(var(--border));
  border-top-color: hsl(var(--primary));
  animation: spin 1s linear infinite;
  margin-bottom: 1.25rem;
}

/* Theater Steps */
.theater-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  text-align: left;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  overflow: hidden;
}

.theater-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.125rem;
  opacity: 0.25;
  transform: translateY(0);
  transition: opacity 0.4s var(--ease-premium), background-color 0.3s ease;
  border-bottom: 1px solid hsl(var(--border));
}

.theater-step:last-child {
  border-bottom: none;
}

.theater-step.active {
  opacity: 1;
  background: hsla(var(--primary), 0.04);
}

.theater-step.completed {
  opacity: 0.7;
}

/* Step icon container */
.theater-step-icon {
  width: 1.375rem;
  height: 1.375rem;
  flex-shrink: 0;
  position: relative;
}

.theater-step-spinner,
.theater-step-check {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: opacity 0.3s ease;
}

.theater-step-spinner {
  color: hsl(var(--muted-foreground));
  opacity: 0;
  animation: spin 1s linear infinite;
}

.theater-step-check {
  color: hsl(var(--success));
  opacity: 0;
}

.theater-step.active .theater-step-spinner {
  opacity: 1;
  color: hsl(var(--primary));
}

.theater-step.active .theater-step-check {
  opacity: 0;
}

.theater-step.completed .theater-step-spinner {
  opacity: 0;
}

.theater-step.completed .theater-step-check {
  opacity: 1;
}

.theater-step-text {
  font-size: 0.875rem;
  color: hsl(var(--foreground));
  line-height: 1.4;
}

.theater-step.completed .theater-step-text {
  color: hsl(var(--muted-foreground));
}

/* Quote rotation */
.theater-quote-container {
  margin-top: 2rem;
  min-height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theater-quote {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  font-style: italic;
  line-height: 1.5;
  max-width: 360px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.theater-quote.visible {
  opacity: 1;
}

/* Loading error state */
.loading-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 0;
}

.loading-error-icon {
  width: 3rem;
  height: 3rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 1.25rem;
}

.loading-error-icon svg {
  width: 100%;
  height: 100%;
}

.loading-retry-btn {
  margin-top: 1.5rem;
}

/* ============================================
   STATE 4: Dead End
   ============================================ */
.dead-end-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  text-align: center;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
}

.dead-end-icon {
  width: 3.5rem;
  height: 3.5rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 1.25rem;
}

.dead-end-icon svg {
  width: 100%;
  height: 100%;
}

.dead-end-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  letter-spacing: -0.02em;
  margin-bottom: 0.625rem;
}

.dead-end-body {
  font-size: 0.9375rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.6;
  max-width: 400px;
  margin-bottom: 1.75rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: hsl(var(--primary));
}

.back-link:hover {
  color: hsl(217 91% 68%);
}

.back-arrow {
  width: 1rem;
  height: 1rem;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 600px) {
  .main-content {
    padding: 1.5rem 0.75rem;
    align-items: flex-start;
  }

  .form-container,
  .pages-container,
  .dead-end-container {
    padding: 1.5rem 1.25rem;
  }

  .form-title {
    font-size: 1.5rem;
  }

  .form-subtitle {
    font-size: 0.875rem;
  }

  .header {
    padding: 1rem 1rem;
  }

  .logo-icon {
    height: 24px;
  }

  .pages-fallback {
    flex-direction: column;
    gap: 0.5rem;
  }

  .fallback-divider {
    display: none;
  }

  .manual-url-row {
    flex-direction: column;
  }

  .page-card {
    padding: 0.75rem;
  }

  .page-card-avatar {
    width: 2.5rem;
    height: 2.5rem;
  }

  .page-card-meta {
    flex-wrap: wrap;
  }
}

@media (min-width: 601px) {
  .form-container {
    padding: 2.5rem;
  }

  .form-title {
    font-size: 1.875rem;
  }
}

/* ============================================
   Focus Visible (accessibility)
   ============================================ */
.form-input:focus-visible {
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 3px hsla(var(--primary), 0.15);
}

/* ============================================
   Selection
   ============================================ */
::selection {
  background: hsla(var(--primary), 0.25);
  color: hsl(var(--foreground));
}

/* ============================================
   Scrollbar (subtle)
   ============================================ */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: hsl(var(--border));
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--muted-foreground));
}

/* ============================================
   REPORT PAGE
   ============================================ */

/* --- Report Layout --- */
.report-page .main-content,
.report-main {
  display: block;
  padding: 0;
}

.report-main {
  flex: 1;
  padding: 2rem 1rem 4rem;
}

.report-content {
  max-width: 720px;
  margin: 0 auto;
}

.report-content.loaded > * {
  animation: fadeInUp 0.4s var(--ease-premium) both;
}

/* Stagger children on load */
.report-content.loaded > *:nth-child(1) { animation-delay: 0ms; }
.report-content.loaded > *:nth-child(2) { animation-delay: 100ms; }
.report-content.loaded > *:nth-child(3) { animation-delay: 200ms; }
.report-content.loaded > *:nth-child(4) { animation-delay: 300ms; }
.report-content.loaded > *:nth-child(5) { animation-delay: 400ms; }
.report-content.loaded > *:nth-child(6) { animation-delay: 500ms; }

/* --- Report Header --- */
.report-header {
  text-align: center;
  margin-bottom: 2rem;
}

.report-business-name {
  font-size: 1.75rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.report-meta {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  letter-spacing: 0.01em;
}

/* --- Hero Score Card --- */
.report-hero-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.report-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--score-color, hsl(var(--primary)));
  border-radius: var(--radius) var(--radius) 0 0;
}

.report-hero-score-wrapper {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

.report-hero-score {
  font-size: 4rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}

.report-hero-max {
  font-size: 1.5rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
}

.report-hero-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.25rem;
}

.report-hero-subtitle {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
}

/* --- Report Sections --- */
.report-section {
  margin-bottom: 2rem;
}

.report-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.report-section-subtitle {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 1.25rem;
}

/* --- Top Fixes --- */
.report-fixes-grid {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.report-fix-card {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1rem 1.125rem;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  animation: fadeInUp 0.4s var(--ease-premium) both;
}

.report-fix-badge {
  width: 1.625rem;
  height: 1.625rem;
  border-radius: 50%;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.report-fix-content {
  flex: 1;
  min-width: 0;
}

.report-fix-text {
  font-size: 0.9375rem;
  color: hsl(var(--foreground));
  line-height: 1.5;
}

.report-fix-impact {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  margin-top: 0.25rem;
  font-style: italic;
}

/* --- Benchmarks --- */
.report-benchmarks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}

.report-benchmark-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1.125rem;
}

.report-benchmark-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.report-benchmark-values {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.report-benchmark-value-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.report-benchmark-tag {
  font-size: 0.6875rem;
  color: hsl(var(--muted-foreground));
  font-weight: 500;
}

.report-benchmark-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  line-height: 1.2;
}

.report-benchmark-value.better {
  color: hsl(var(--success));
}

.report-benchmark-value.worse {
  color: hsl(var(--destructive));
}

.report-benchmark-divider {
  width: 1px;
  height: 2rem;
  background: hsl(var(--border));
  flex-shrink: 0;
}

/* --- Ad-by-Ad Breakdown --- */
.report-ads-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.report-ad-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  overflow: hidden;
  animation: fadeInUp 0.4s var(--ease-premium) both;
}

.report-ad-header {
  padding: 1.125rem;
  border-bottom: 1px solid hsl(var(--border));
}

.report-ad-thumbnail {
  width: 100%;
  height: 14rem;
  border-radius: 0.5rem;
  overflow: hidden;
  background: hsl(var(--muted));
  display: flex;
  align-items: center;
  justify-content: center;
}

.report-ad-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.report-ad-thumbnail.no-image {
  color: hsl(var(--muted-foreground));
}

.report-ad-thumbnail.no-image svg {
  width: 2rem;
  height: 2rem;
  opacity: 0.5;
}

.report-ad-thumbnail.no-image img {
  display: none;
}

.report-ad-body-preview {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.5;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

/* Ad Copy Sections (Headline, Primary Text, Transcript, CTA) */
.report-ad-copy-sections {
  padding: 0;
  border-bottom: 1px solid hsl(var(--border));
}

.report-ad-copy-block {
  padding: 0.875rem 1.125rem;
  border-bottom: 1px solid hsl(var(--border));
}

.report-ad-copy-block:last-child {
  border-bottom: none;
}

.report-ad-copy-block--transcript {
  background: hsla(var(--muted), 0.5);
}

.report-ad-copy-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.375rem;
}

.report-ad-copy-value {
  font-size: 0.875rem;
  color: hsl(var(--foreground));
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.report-ad-copy-value--muted {
  color: hsl(var(--muted-foreground));
  font-style: italic;
}

.report-ad-cta-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.report-ad-cta-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.report-ad-cta-item-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
}

.report-ad-cta-item-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.report-ad-cta-divider {
  width: 1px;
  height: 1rem;
  background: hsl(var(--border));
  flex-shrink: 0;
}

/* Show More / Show Less toggle */
.text-preview {
  max-height: 4.5em; /* ~3 lines */
  overflow: hidden;
  transition: max-height 0.3s var(--ease-premium);
}

.text-preview.expanded {
  max-height: none;
}

.show-more-btn {
  color: hsl(var(--primary));
  cursor: pointer;
  font-size: 0.8125rem;
  font-family: inherit;
  border: none;
  background: none;
  padding: 0.25rem 0;
  margin-top: 0.25rem;
  display: inline-block;
  transition: color 0.2s ease;
}

.show-more-btn:hover {
  color: hsl(217 91% 68%);
}

.show-more-btn:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 2px;
  border-radius: 4px;
}

/* Ad Scores */
.report-ad-scores {
  padding: 1rem 1.125rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  border-bottom: 1px solid hsl(var(--border));
}

.report-ad-score-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.report-ad-score-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.report-ad-score-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.report-ad-score-value {
  font-size: 0.8125rem;
  font-weight: 700;
}

.report-ad-score-bar {
  width: 100%;
  height: 0.375rem;
  background: hsl(var(--muted));
  border-radius: 999px;
  overflow: hidden;
}

.report-ad-score-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.8s var(--ease-premium);
}

/* Ad Fixes & Strengths Lists */
.report-ad-list-section {
  padding: 0.875rem 1.125rem;
  border-bottom: 1px solid hsl(var(--border));
}

.report-ad-list-section:last-child {
  border-bottom: none;
}

.report-ad-list-title {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.report-ad-list-title--fix {
  color: hsl(var(--destructive));
}

.report-ad-list-title--strength {
  color: hsl(var(--success));
}

.report-ad-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.report-ad-list-item {
  font-size: 0.8125rem;
  color: hsl(var(--foreground));
  line-height: 1.5;
  padding-left: 1rem;
  position: relative;
}

.report-ad-list-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
}

.report-ad-list-item--fix::before {
  background: hsl(var(--destructive));
  opacity: 0.6;
}

.report-ad-list-item--strength::before {
  background: hsl(var(--success));
  opacity: 0.6;
}

/* --- CTA Section --- */
.report-cta-section {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.report-cta-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 0.625rem;
}

.report-cta-subtitle {
  font-size: 0.9375rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.5;
  max-width: 440px;
  margin: 0 auto 1.5rem;
}

.report-cta-btn {
  max-width: 320px;
  margin: 0 auto;
  animation: pulseGlow 2s ease-in-out infinite;
}

.report-cta-phone {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  margin-top: 1rem;
}

/* --- Report Empty State --- */
.report-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
}

.report-empty-icon {
  width: 3rem;
  height: 3rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 1.25rem;
}

.report-empty-icon svg {
  width: 100%;
  height: 100%;
}

.report-empty-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.report-empty-text {
  font-size: 0.9375rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.6;
  max-width: 400px;
  margin-bottom: 1.5rem;
}

/* --- Report Page Responsive --- */
@media (max-width: 600px) {
  .report-main {
    padding: 1.5rem 0.75rem 3rem;
  }

  .report-business-name {
    font-size: 1.375rem;
  }

  .report-hero-score {
    font-size: 3rem;
  }

  .report-hero-max {
    font-size: 1.125rem;
  }

  .report-hero-card {
    padding: 2rem 1.25rem;
  }

  .report-cta-section {
    padding: 2rem 1.25rem;
  }

  .report-cta-title {
    font-size: 1.25rem;
  }

  .report-benchmarks-grid {
    grid-template-columns: 1fr;
  }

  .report-ad-thumbnail {
    height: 10rem;
  }

  .report-ad-cta-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .report-ad-cta-divider {
    display: none;
  }

  .theater-step {
    padding: 0.75rem 1rem;
  }

  .theater-step-text {
    font-size: 0.8125rem;
  }

  .loading-theater-header {
    margin-bottom: 2rem;
  }
}

@media (min-width: 601px) {
  .report-main {
    padding: 2.5rem 1.5rem 5rem;
  }

  .report-business-name {
    font-size: 2rem;
  }
}
