/* Free report creation wizard */
body.create-report-page {
  background: radial-gradient(circle at top, rgba(37, 75, 66, 0.08), transparent 40rem),
    linear-gradient(180deg, #fbf6ed 0%, var(--bg) 55%, #efe8dc 100%);
}

body.create-report-page .create-report-main {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 64px;
}

body.home-combined.create-report-page .create-report-main {
  max-width: none;
  padding-bottom: 0;
}

body.create-report-page .create-intro {
  text-align: center;
  padding: 28px 0 8px;
}

body.create-report-page .create-intro h1 {
  font-size: clamp(34px, 5vw, 52px);
  margin: 0 0 12px;
  letter-spacing: -0.06em;
}

body.create-report-page .create-intro .lede {
  margin: 0 auto;
  max-width: 560px;
}

body.create-report-page .create-intro-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

body.create-report-page .free-pill {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 0;
}

body.create-report-page .ai-chat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(37, 75, 66, 0.18);
  background: linear-gradient(135deg, #eef4f1, #fff8ec);
  color: var(--accent);
}

body.create-report-page .ai-chat-pill-icon {
  color: var(--accent-2);
  font-size: 13px;
  line-height: 1;
}

body.create-report-page .free-callout {
  font-size: 15px;
  color: #4d5966;
  margin: 8px 0 0;
}

body.create-report-page .free-callout strong {
  color: var(--accent);
}

body.create-report-page .wizard-card {
  margin-top: 24px;
  position: static;
  padding: 28px 26px 30px;
}

body.create-report-page .wizard-progress {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

body.create-report-page .wizard-progress span {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: #e6dccb;
}

body.create-report-page .wizard-progress span.active {
  background: var(--accent);
}

body.create-report-page .wizard-progress span.done {
  background: #7dbb86;
}

body.create-report-page .wizard-step {
  display: none;
  animation: wizardFade 0.28s ease;
}

body.create-report-page .wizard-step.is-active {
  display: block;
}

@keyframes wizardFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body.create-report-page .wizard-step h2 {
  margin: 0 0 10px;
  font-size: clamp(24px, 4vw, 30px);
  letter-spacing: -0.04em;
}

body.create-report-page .wizard-step .wizard-lede {
  color: #4d5966;
  line-height: 1.5;
  margin: 0 0 20px;
  font-size: 16px;
}

body.create-report-page .wizard-choice-grid {
  display: grid;
  gap: 12px;
}

body.create-report-page .wizard-choice {
  text-align: left;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffdf8;
  padding: 16px 18px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.create-report-page .wizard-choice:hover {
  border-color: rgba(37, 75, 66, 0.45);
  box-shadow: 0 8px 24px rgba(37, 75, 66, 0.08);
}

body.create-report-page .wizard-choice strong {
  display: block;
  font-size: 17px;
  color: var(--accent);
  margin-bottom: 4px;
}

body.create-report-page .wizard-choice span {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.4;
}

body.create-report-page .wizard-back {
  margin-top: 16px;
}

body.create-report-page .wizard-step-no {
  text-align: center;
  padding: 12px 0;
}

body.create-report-page .wizard-step-no .callout {
  margin: 20px 0;
  text-align: left;
}

body.create-report-page #wizardStepPaste textarea#quoteText {
  min-height: 220px;
  display: block;
}

body.create-report-page #wizardStepFinalize {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 20px;
}

body.create-report-page .nav-pill {
  background: rgba(37, 75, 66, 0.08);
  color: var(--accent);
  font-weight: 700;
}

body.create-report-page #analyzeBtn {
  width: 100%;
  justify-content: center;
  font-size: 17px;
  padding: 15px 18px;
}

@media (max-width: 600px) {
  body.create-report-page .wizard-card {
    padding: 22px 18px 24px;
  }
}

/* AI intake chat layout */
body.create-report-chat .create-report-main {
  max-width: 760px;
}

@keyframes intakeGradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

body.create-report-chat .intake-chat-shell {
  padding: 2px;
  border-radius: calc(var(--radius) + 4px);
  background: linear-gradient(
    120deg,
    #254b42,
    #5a9a7a,
    #d97706,
    #7eb8d4,
    #254b42
  );
  background-size: 320% 320%;
  animation: intakeGradientShift 10s ease infinite;
  box-shadow: 0 20px 50px rgba(37, 75, 66, 0.14);
}

body.create-report-chat .intake-chat-card {
  position: static;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 520px;
  border: none;
  box-shadow: none;
  background: linear-gradient(145deg, #eef4f1 0%, #fff8ec 48%, #f5ebe0 100%);
}

body.create-report-chat .intake-chat-card.intake-phase-initial {
  min-height: auto;
  justify-content: center;
}

body.create-report-chat .intake-chat-card.intake-phase-initial .intake-chat-form {
  border-top: none;
  padding: 28px 22px 22px;
}

body.create-report-chat .intake-chat-card.intake-phase-initial .intake-composer-row {
  flex-direction: column;
  align-items: stretch;
}

body.create-report-chat .intake-chat-card.intake-phase-initial #intakeChatInput {
  font-size: 17px;
  padding: 16px 18px;
  border-radius: 18px;
  min-height: 56px;
}

body.create-report-chat .intake-chat-log {
  flex: 1;
  min-height: 280px;
  max-height: min(52vh, 480px);
  overflow-y: auto;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: transparent;
}

body.create-report-chat .intake-chat-log[hidden] {
  display: none !important;
  min-height: 0;
  padding: 0;
}

body.create-report-chat .intake-chat-msg {
  max-width: 92%;
  padding: 12px 14px;
  border-radius: 16px;
  line-height: 1.45;
  font-size: 15px;
  white-space: pre-wrap;
}

body.create-report-chat .intake-chat-msg.assistant {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  color: #44515d;
}

body.create-report-chat .intake-chat-msg.user {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
}

body.create-report-chat .intake-chat-form {
  border-top: 1px solid rgba(37, 75, 66, 0.12);
  padding: 14px 16px 16px;
  background: rgba(255, 255, 255, 0.35);
}

body.create-report-chat .intake-composer-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}

body.create-report-chat .intake-composer-actions {
  display: block;
}

body.create-report-chat .intake-composer-actions .intake-send-btn {
  width: 100%;
  justify-content: center;
}

body.create-report-chat #intakeChatInput {
  width: 100%;
  min-height: 48px;
  max-height: 200px;
  resize: none;
  overflow-y: auto;
  line-height: 1.45;
  field-sizing: content;
}

body.create-report-chat .intake-send-btn {
  border: none;
  min-width: 88px;
}

body.create-report-chat .intake-phase-initial .intake-send-btn {
  background: linear-gradient(135deg, #254b42 0%, #4d8b72 35%, #d97706 70%, #254b42 100%);
  background-size: 220% 220%;
  animation: intakeGradientShift 6s ease infinite;
  color: #fff;
  box-shadow: 0 12px 28px rgba(37, 75, 66, 0.28);
}

body.create-report-chat .intake-phase-chat .intake-send-btn {
  background: var(--accent);
  animation: none;
  box-shadow: 0 12px 28px rgba(37, 75, 66, 0.2);
}

body.create-report-chat .intake-upload-btn {
  width: 100%;
  margin-top: 12px;
  justify-content: center;
  font-weight: 700;
}

body.create-report-chat .intake-upload-btn--highlight {
  border-color: var(--accent);
  background: #eef4f1;
  color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 75, 66, 0.1);
}

body.create-report-chat .intake-file-offer-actions {
  padding: 0 18px 16px;
  text-align: center;
}

body.create-report-chat .intake-skip-file-btn {
  width: 100%;
  justify-content: center;
}

body.create-report-chat .intake-disclosures {
  max-width: 760px;
  margin: 18px auto 0;
  padding: 0 4px 8px;
  text-align: left;
}

body.create-report-chat .intake-chat-card.intake-mode-upload-only {
  min-height: auto;
  justify-content: flex-end;
}

body.create-report-chat .intake-chat-card.intake-mode-upload-only .intake-ready-panel {
  border-top: none;
}

body.create-report-chat .intake-openai-notice {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

body.create-report-chat .intake-openai-notice a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

@keyframes intakeTypingBounce {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }
  30% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

body.create-report-chat .intake-chat-msg.intake-typing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 16px;
  min-width: 64px;
}

body.create-report-chat .intake-typing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7a8f96;
  animation: intakeTypingBounce 1.2s ease-in-out infinite;
}

body.create-report-chat .intake-typing-dot:nth-child(2) {
  animation-delay: 0.15s;
}

body.create-report-chat .intake-typing-dot:nth-child(3) {
  animation-delay: 0.3s;
}

body.create-report-chat .intake-ready-panel {
  border-top: 1px solid rgba(37, 75, 66, 0.12);
  padding: 16px 18px 20px;
  background: rgba(255, 255, 255, 0.5);
}

body.create-report-chat .intake-chat-card.intake-phase-chat .intake-ready-panel:not([hidden]) {
  margin: 4px 14px 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(31, 41, 51, 0.08);
}

body.create-report-chat .intake-ready-panel--compact {
  margin-top: 8px;
}

body.create-report-chat .intake-ready-panel--compact .intake-ready-lede {
  display: none;
}

body.create-report-chat .intake-chat-card.intake-phase-ready .intake-ready-panel:not([hidden]) {
  animation: wizardFade 0.28s ease;
}

body.create-report-chat .intake-ready-lede {
  margin: 0 0 12px;
  color: #4d5966;
  line-height: 1.45;
}

body.create-report-chat .intake-generate-btn {
  width: 100%;
  justify-content: center;
  margin-top: 12px;
  font-size: 17px;
  padding: 14px 18px;
}

/* Report generation loading (upload + chat paths) */
@keyframes qcSpin {
  to {
    transform: rotate(360deg);
  }
}

body.create-report-page .qc-loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(37, 75, 66, 0.25);
  border-top-color: #254b42;
  border-radius: 50%;
  display: inline-block;
  flex: 0 0 auto;
  animation: qcSpin 0.8s linear infinite;
}

body.create-report-page .qc-loading-spinner--lg {
  width: 48px;
  height: 48px;
  border-width: 3px;
  margin: 0 auto 16px;
}

body.create-report-page .qc-loading-spinner--btn {
  width: 17px;
  height: 17px;
  border-color: rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  vertical-align: middle;
  margin-right: 8px;
}

body.create-report-page #status.status.show.info {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

body.create-report-page .report-generation-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(31, 41, 51, 0.48);
  backdrop-filter: blur(6px);
}

body.create-report-page .report-generation-overlay[hidden] {
  display: none !important;
}

body.create-report-page.create-report-generating {
  overflow: hidden;
}

body.create-report-page .report-generation-overlay-card {
  width: min(420px, 100%);
  padding: 28px 26px 24px;
  border-radius: 22px;
  background: var(--paper);
  box-shadow: var(--shadow);
  text-align: center;
}

body.create-report-page .report-generation-overlay-message {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.35;
}

body.create-report-page .report-generation-overlay-hint {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}

body.create-report-page .intake-generate-btn.is-generating {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

@media (min-width: 721px) {
  body.create-report-chat .intake-composer-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
  }

  body.create-report-chat .intake-composer-actions .intake-send-btn {
    width: auto;
    min-width: 88px;
  }

  body.create-report-chat .intake-chat-card.intake-phase-initial .intake-composer-row {
    grid-template-columns: 1fr auto;
  }
}
